From 4bf19f95493196238b9f486ec59f255f3d5aed1a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 31 Oct 2024 19:55:37 +0000 Subject: [PATCH 1/2] docs: add response types for async magic methods PiperOrigin-RevId: 691866489 Source-Link: https://github.com/googleapis/googleapis/commit/cf0f35efca7e0d507af89e9ddc46cba2f41eb9f7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e556aaed2dc6f46b6ff8cc769fabadcfbe2504a4 Copy-Tag: eyJwIjoiQmFyZU1ldGFsU29sdXRpb24vLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmF0Y2gvLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmV5b25kQ29ycEFwcENvbm5lY3Rpb25zLy5Pd2xCb3QueWFtbCIsImgiOiJlNTU2YWFlZDJkYzZmNDZiNmZmOGNjNzY5ZmFiYWRjZmJlMjUwNGE0In0= Copy-Tag: eyJwIjoiQmV5b25kQ29ycEFwcENvbm5lY3RvcnMvLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmV5b25kQ29ycEFwcEdhdGV3YXlzLy5Pd2xCb3QueWFtbCIsImgiOiJlNTU2YWFlZDJkYzZmNDZiNmZmOGNjNzY5ZmFiYWRjZmJlMjUwNGE0In0= Copy-Tag: eyJwIjoiQmV5b25kQ29ycENsaWVudENvbm5lY3RvclNlcnZpY2VzLy5Pd2xCb3QueWFtbCIsImgiOiJlNTU2YWFlZDJkYzZmNDZiNmZmOGNjNzY5ZmFiYWRjZmJlMjUwNGE0In0= Copy-Tag: eyJwIjoiQmV5b25kQ29ycENsaWVudEdhdGV3YXlzLy5Pd2xCb3QueWFtbCIsImgiOiJlNTU2YWFlZDJkYzZmNDZiNmZmOGNjNzY5ZmFiYWRjZmJlMjUwNGE0In0= Copy-Tag: eyJwIjoiQmlnUXVlcnlBbmFseXRpY3NIdWIvLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlDb25uZWN0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiJlNTU2YWFlZDJkYzZmNDZiNmZmOGNjNzY5ZmFiYWRjZmJlMjUwNGE0In0= Copy-Tag: eyJwIjoiQmlnUXVlcnlEYXRhRXhjaGFuZ2UvLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlEYXRhUG9saWNpZXMvLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlEYXRhVHJhbnNmZXIvLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlNaWdyYXRpb24vLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlSZXNlcnZhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiZTU1NmFhZWQyZGM2ZjQ2YjZmZjhjYzc2OWZhYmFkY2ZiZTI1MDRhNCJ9 Copy-Tag: eyJwIjoiQmlnUXVlcnlTdG9yYWdlLy5Pd2xCb3QueWFtbCIsImgiOiJlNTU2YWFlZDJkYzZmNDZiNmZmOGNjNzY5ZmFiYWRjZmJlMjUwNGE0In0= Copy-Tag: eyJwIjoiQmlndGFibGUvLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmlsbGluZy8uT3dsQm90LnlhbWwiLCJoIjoiZTU1NmFhZWQyZGM2ZjQ2YjZmZjhjYzc2OWZhYmFkY2ZiZTI1MDRhNCJ9 Copy-Tag: eyJwIjoiQmlsbGluZ0J1ZGdldHMvLk93bEJvdC55YW1sIiwiaCI6ImU1NTZhYWVkMmRjNmY0NmI2ZmY4Y2M3NjlmYWJhZGNmYmUyNTA0YTQifQ== Copy-Tag: eyJwIjoiQmluYXJ5QXV0aG9yaXphdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiZTU1NmFhZWQyZGM2ZjQ2YjZmZjhjYzc2OWZhYmFkY2ZiZTI1MDRhNCJ9 Copy-Tag: eyJwIjoiQ2VydGlmaWNhdGVNYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiJlNTU2YWFlZDJkYzZmNDZiNmZmOGNjNzY5ZmFiYWRjZmJlMjUwNGE0In0= --- .../V2/Baremetalsolution.php | 113 + .../Cloud/Baremetalsolution/V2/Common.php | Bin 0 -> 1191 bytes .../Cloud/Baremetalsolution/V2/Instance.php | Bin 0 -> 4926 bytes .../Google/Cloud/Baremetalsolution/V2/Lun.php | Bin 0 -> 2393 bytes .../Cloud/Baremetalsolution/V2/Network.php | Bin 0 -> 4326 bytes .../Cloud/Baremetalsolution/V2/NfsShare.php | Bin 0 -> 3207 bytes .../Cloud/Baremetalsolution/V2/Osimage.php | 45 + .../Baremetalsolution/V2/Provisioning.php | Bin 0 -> 7296 bytes .../Cloud/Baremetalsolution/V2/SshKey.php | 52 + .../Cloud/Baremetalsolution/V2/Volume.php | Bin 0 -> 4056 bytes .../Baremetalsolution/V2/VolumeSnapshot.php | Bin 0 -> 2450 bytes .../V2/CreateNfsShareRequest.php | 127 + .../V2/CreateProvisioningConfigRequest.php | 170 + .../V2/CreateSSHKeyRequest.php | 179 + .../V2/CreateVolumeSnapshotRequest.php | 127 + .../V2/DeleteNfsShareRequest.php | 81 + .../V2/DeleteSSHKeyRequest.php | 86 + .../V2/DeleteVolumeSnapshotRequest.php | 81 + .../BareMetalSolution/V2/DetachLunRequest.php | 152 + ...DisableInteractiveSerialConsoleRequest.php | 81 + ...isableInteractiveSerialConsoleResponse.php | 33 + .../EnableInteractiveSerialConsoleRequest.php | 81 + ...EnableInteractiveSerialConsoleResponse.php | 33 + .../BareMetalSolution/V2/EvictLunRequest.php | 81 + .../V2/EvictVolumeRequest.php | 81 + .../V2/GetInstanceRequest.php | 81 + .../BareMetalSolution/V2/GetLunRequest.php | 81 + .../V2/GetNetworkRequest.php | 81 + .../V2/GetNfsShareRequest.php | 81 + .../V2/GetProvisioningConfigRequest.php | 81 + .../BareMetalSolution/V2/GetVolumeRequest.php | 81 + .../V2/GetVolumeSnapshotRequest.php | 81 + .../Cloud/BareMetalSolution/V2/Instance.php | 779 +++ .../BareMetalSolution/V2/Instance/State.php | 99 + .../BareMetalSolution/V2/InstanceConfig.php | 549 ++ .../V2/InstanceConfig/NetworkAddress.php | 138 + .../V2/InstanceConfig/NetworkConfig.php | 65 + .../BareMetalSolution/V2/InstanceQuota.php | 216 + .../V2/ListInstancesRequest.php | 187 + .../V2/ListInstancesResponse.php | 135 + .../BareMetalSolution/V2/ListLunsRequest.php | 153 + .../BareMetalSolution/V2/ListLunsResponse.php | 135 + .../V2/ListNetworkUsageRequest.php | 81 + .../V2/ListNetworkUsageResponse.php | 67 + .../V2/ListNetworksRequest.php | 187 + .../V2/ListNetworksResponse.php | 135 + .../V2/ListNfsSharesRequest.php | 187 + .../V2/ListNfsSharesResponse.php | 135 + .../V2/ListOSImagesRequest.php | 161 + .../V2/ListOSImagesResponse.php | 105 + .../V2/ListProvisioningQuotasRequest.php | 161 + .../V2/ListProvisioningQuotasResponse.php | 105 + .../V2/ListSSHKeysRequest.php | 154 + .../V2/ListSSHKeysResponse.php | 105 + .../V2/ListVolumeSnapshotsRequest.php | 153 + .../V2/ListVolumeSnapshotsResponse.php | 135 + .../V2/ListVolumesRequest.php | 187 + .../V2/ListVolumesResponse.php | 135 + .../BareMetalSolution/V2/LogicalInterface.php | 151 + .../LogicalNetworkInterface.php | 210 + .../Google/Cloud/BareMetalSolution/V2/Lun.php | 459 ++ .../V2/Lun/MultiprotocolType.php | 57 + .../Cloud/BareMetalSolution/V2/Lun/State.php | 85 + .../BareMetalSolution/V2/Lun/StorageType.php | 64 + .../Cloud/BareMetalSolution/V2/Network.php | 611 +++ .../BareMetalSolution/V2/Network/State.php | 78 + .../BareMetalSolution/V2/Network/Type.php | 68 + .../V2/NetworkAddressReservation.php | 151 + .../BareMetalSolution/V2/NetworkConfig.php | 423 ++ .../V2/NetworkConfig/Bandwidth.php | 78 + .../V2/NetworkConfig/IntakeVlanAttachment.php | 104 + .../V2/NetworkConfig/ServiceCidr.php | 78 + .../V2/NetworkConfig/Type.php | 68 + .../V2/NetworkMountPoint.php | 169 + .../BareMetalSolution/V2/NetworkUsage.php | 111 + .../Cloud/BareMetalSolution/V2/NfsShare.php | 351 ++ .../V2/NfsShare/AllowedClient.php | 328 ++ .../V2/NfsShare/MountPermissions.php | 64 + .../BareMetalSolution/V2/NfsShare/State.php | 78 + .../V2/NfsShare/StorageType.php | 64 + .../Cloud/BareMetalSolution/V2/OSImage.php | 211 + .../V2/OperationMetadata.php | 307 ++ .../V2/ProvisioningConfig.php | 540 ++ .../V2/ProvisioningConfig/State.php | 102 + .../V2/ProvisioningQuota.php | 353 ++ .../V2/ProvisioningQuota/AssetType.php | 71 + .../V2/RenameInstanceRequest.php | 122 + .../V2/RenameNetworkRequest.php | 122 + .../V2/RenameNfsShareRequest.php | 122 + .../V2/RenameVolumeRequest.php | 122 + .../V2/ResetInstanceRequest.php | 81 + .../V2/ResetInstanceResponse.php | 33 + .../V2/ResizeVolumeRequest.php | 117 + .../V2/RestoreVolumeSnapshotRequest.php | 86 + .../Cloud/BareMetalSolution/V2/SSHKey.php | 105 + .../V2/ServerNetworkTemplate.php | 151 + .../LogicalInterface.php | 154 + .../LogicalInterface/InterfaceType.php | 64 + .../V2/StartInstanceRequest.php | 81 + .../V2/StartInstanceResponse.php | 33 + .../V2/StopInstanceRequest.php | 81 + .../V2/StopInstanceResponse.php | 33 + .../V2/SubmitProvisioningConfigRequest.php | 170 + .../V2/SubmitProvisioningConfigResponse.php | 77 + .../V2/UpdateInstanceRequest.php | 167 + .../V2/UpdateNetworkRequest.php | 157 + .../V2/UpdateNfsShareRequest.php | 162 + .../V2/UpdateProvisioningConfigRequest.php | 174 + .../V2/UpdateVolumeRequest.php | 157 + .../Google/Cloud/BareMetalSolution/V2/VRF.php | 191 + .../BareMetalSolution/V2/VRF/QosPolicy.php | 70 + .../Cloud/BareMetalSolution/V2/VRF/State.php | 64 + .../V2/VRF/VlanAttachment.php | 292 ++ .../Cloud/BareMetalSolution/V2/Volume.php | 933 ++++ .../BareMetalSolution/V2/Volume/Protocol.php | 65 + .../V2/Volume/SnapshotAutoDeleteBehavior.php | 73 + .../V2/Volume/SnapshotReservationDetail.php | 204 + .../BareMetalSolution/V2/Volume/State.php | 86 + .../V2/Volume/StorageType.php | 64 + .../V2/Volume/WorkloadProfile.php | 64 + .../BareMetalSolution/V2/VolumeConfig.php | 461 ++ .../V2/VolumeConfig/LunRange.php | 104 + .../V2/VolumeConfig/NfsExport.php | 292 ++ .../V2/VolumeConfig/NfsExport/Permissions.php | 64 + .../V2/VolumeConfig/Protocol.php | 64 + .../V2/VolumeConfig/Type.php | 64 + .../V2/VolumePerformanceTier.php | 68 + .../BareMetalSolution/V2/VolumeSnapshot.php | 251 + .../V2/VolumeSnapshot/SnapshotType.php | 64 + .../BareMetalSolution/V2/WorkloadProfile.php | 61 + .../create_nfs_share.php | 85 + .../create_provisioning_config.php | 74 + .../create_ssh_key.php | 81 + .../create_volume_snapshot.php | 74 + .../delete_nfs_share.php | 80 + .../delete_ssh_key.php | 70 + .../delete_volume_snapshot.php | 75 + .../V2/BareMetalSolutionClient/detach_lun.php | 87 + .../disable_interactive_serial_console.php | 83 + .../enable_interactive_serial_console.php | 83 + .../V2/BareMetalSolutionClient/evict_lun.php | 81 + .../BareMetalSolutionClient/evict_volume.php | 81 + .../BareMetalSolutionClient/get_instance.php | 71 + .../BareMetalSolutionClient/get_location.php | 57 + .../V2/BareMetalSolutionClient/get_lun.php | 71 + .../BareMetalSolutionClient/get_network.php | 71 + .../BareMetalSolutionClient/get_nfs_share.php | 71 + .../get_provisioning_config.php | 75 + .../V2/BareMetalSolutionClient/get_volume.php | 71 + .../get_volume_snapshot.php | 77 + .../list_instances.php | 76 + .../list_locations.php | 62 + .../V2/BareMetalSolutionClient/list_luns.php | 76 + .../list_network_usage.php | 72 + .../BareMetalSolutionClient/list_networks.php | 76 + .../list_nfs_shares.php | 76 + .../list_os_images.php | 76 + .../list_provisioning_quotas.php | 76 + .../BareMetalSolutionClient/list_ssh_keys.php | 78 + .../list_volume_snapshots.php | 78 + .../BareMetalSolutionClient/list_volumes.php | 76 + .../rename_instance.php | 76 + .../rename_network.php | 76 + .../rename_nfs_share.php | 76 + .../BareMetalSolutionClient/rename_volume.php | 76 + .../reset_instance.php | 84 + .../BareMetalSolutionClient/resize_volume.php | 83 + .../restore_volume_snapshot.php | 90 + .../start_instance.php | 83 + .../BareMetalSolutionClient/stop_instance.php | 83 + .../submit_provisioning_config.php | 75 + .../update_instance.php | 71 + .../update_network.php | 71 + .../update_nfs_share.php | 71 + .../update_provisioning_config.php | 62 + .../BareMetalSolutionClient/update_volume.php | 71 + .../src/V2/Client/BareMetalSolutionClient.php | 1856 +++++++ .../v2/src/V2/gapic_metadata.json | 248 + .../bare_metal_solution_client_config.json | 262 + .../bare_metal_solution_descriptor_config.php | 795 +++ ...bare_metal_solution_rest_client_config.php | 572 +++ .../V2/Client/BareMetalSolutionClientTest.php | 4556 +++++++++++++++++ .../Google/Cloud/Batch/V1/Batch.php | 93 + .../GPBMetadata/Google/Cloud/Batch/V1/Job.php | Bin 0 -> 6031 bytes .../Google/Cloud/Batch/V1/Task.php | Bin 0 -> 3962 bytes .../Google/Cloud/Batch/V1/Volume.php | Bin 0 -> 1026 bytes .../Cloud/Batch/V1/AllocationPolicy.php | 400 ++ .../Batch/V1/AllocationPolicy/Accelerator.php | 201 + .../V1/AllocationPolicy/AttachedDisk.php | 153 + .../Cloud/Batch/V1/AllocationPolicy/Disk.php | 349 ++ .../V1/AllocationPolicy/InstancePolicy.php | 321 ++ .../InstancePolicyOrTemplate.php | 316 ++ .../V1/AllocationPolicy/LocationPolicy.php | 112 + .../V1/AllocationPolicy/NetworkInterface.php | 202 + .../V1/AllocationPolicy/NetworkPolicy.php | 70 + .../V1/AllocationPolicy/PlacementPolicy.php | 133 + .../V1/AllocationPolicy/ProvisioningModel.php | 75 + .../Google/Cloud/Batch/V1/ComputeResource.php | 248 + .../Cloud/Batch/V1/CreateJobRequest.php | 278 + .../Cloud/Batch/V1/DeleteJobRequest.php | 188 + .../src/Google/Cloud/Batch/V1/Environment.php | 158 + .../Cloud/Batch/V1/Environment/KMSEnvMap.php | 102 + .../proto/src/Google/Cloud/Batch/V1/GCS.php | 71 + .../Google/Cloud/Batch/V1/GetJobRequest.php | 81 + .../Google/Cloud/Batch/V1/GetTaskRequest.php | 81 + .../proto/src/Google/Cloud/Batch/V1/Job.php | 513 ++ .../Google/Cloud/Batch/V1/JobNotification.php | 155 + .../Batch/V1/JobNotification/Message.php | 144 + .../Cloud/Batch/V1/JobNotification/Type.php | 64 + .../src/Google/Cloud/Batch/V1/JobStatus.php | 183 + .../Batch/V1/JobStatus/InstanceStatus.php | 182 + .../Google/Cloud/Batch/V1/JobStatus/State.php | 96 + .../Batch/V1/JobStatus/TaskGroupStatus.php | 108 + .../Google/Cloud/Batch/V1/LifecyclePolicy.php | 128 + .../Cloud/Batch/V1/LifecyclePolicy/Action.php | 64 + .../V1/LifecyclePolicy/ActionCondition.php | 82 + .../Google/Cloud/Batch/V1/ListJobsRequest.php | 220 + .../Cloud/Batch/V1/ListJobsResponse.php | 135 + .../Cloud/Batch/V1/ListTasksRequest.php | 201 + .../Cloud/Batch/V1/ListTasksResponse.php | 135 + .../src/Google/Cloud/Batch/V1/LogsPolicy.php | 158 + .../V1/LogsPolicy/CloudLoggingOption.php | 99 + .../Cloud/Batch/V1/LogsPolicy/Destination.php | 64 + .../proto/src/Google/Cloud/Batch/V1/NFS.php | 101 + .../Cloud/Batch/V1/OperationMetadata.php | 307 ++ .../src/Google/Cloud/Batch/V1/Runnable.php | 492 ++ .../Cloud/Batch/V1/Runnable/Barrier.php | 75 + .../Cloud/Batch/V1/Runnable/Container.php | 562 ++ .../Google/Cloud/Batch/V1/Runnable/Script.php | 153 + .../Google/Cloud/Batch/V1/ServiceAccount.php | 101 + .../src/Google/Cloud/Batch/V1/StatusEvent.php | 235 + .../proto/src/Google/Cloud/Batch/V1/Task.php | 123 + .../Google/Cloud/Batch/V1/TaskExecution.php | 100 + .../src/Google/Cloud/Batch/V1/TaskGroup.php | 479 ++ .../Batch/V1/TaskGroup/SchedulingPolicy.php | 66 + .../src/Google/Cloud/Batch/V1/TaskSpec.php | 440 ++ .../src/Google/Cloud/Batch/V1/TaskStatus.php | 101 + .../Cloud/Batch/V1/TaskStatus/State.php | 92 + .../src/Google/Cloud/Batch/V1/Volume.php | 268 + .../V1/BatchServiceClient/create_job.php | 81 + .../V1/BatchServiceClient/delete_job.php | 66 + .../samples/V1/BatchServiceClient/get_job.php | 71 + .../V1/BatchServiceClient/get_location.php | 57 + .../V1/BatchServiceClient/get_task.php | 77 + .../V1/BatchServiceClient/list_jobs.php | 62 + .../V1/BatchServiceClient/list_locations.php | 62 + .../V1/BatchServiceClient/list_tasks.php | 83 + .../v1/src/V1/Client/BatchServiceClient.php | 558 ++ .../Batch/v1/src/V1/gapic_metadata.json | 58 + .../batch_service_client_config.json | 84 + .../batch_service_descriptor_config.php | 163 + .../batch_service_rest_client_config.php | 167 + .../Unit/V1/Client/BatchServiceClientTest.php | 701 +++ .../V1/AppConnectionsService.php | Bin 0 -> 6753 bytes .../AppConnections/V1/AppConnection.php | 470 ++ .../V1/AppConnection/ApplicationEndpoint.php | 104 + .../V1/AppConnection/Gateway.php | 181 + .../V1/AppConnection/Gateway/Type.php | 57 + .../AppConnections/V1/AppConnection/State.php | 86 + .../AppConnections/V1/AppConnection/Type.php | 59 + .../V1/AppConnectionOperationMetadata.php | 307 ++ .../V1/CreateAppConnectionRequest.php | 295 ++ .../V1/DeleteAppConnectionRequest.php | 198 + .../V1/GetAppConnectionRequest.php | 86 + .../V1/ListAppConnectionsRequest.php | 258 + .../V1/ListAppConnectionsResponse.php | 139 + .../V1/ResolveAppConnectionsRequest.php | 220 + .../V1/ResolveAppConnectionsResponse.php | 139 + .../AppConnectionDetails.php | 118 + .../V1/UpdateAppConnectionRequest.php | 317 ++ .../create_app_connection.php | 114 + .../delete_app_connection.php | 85 + .../get_app_connection.php | 76 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../list_app_connections.php | 77 + .../list_locations.php | 62 + .../resolve_app_connections.php | 91 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_app_connection.php | 110 + .../V1/Client/AppConnectionsServiceClient.php | 668 +++ .../v1/src/V1/gapic_metadata.json | 73 + ...app_connections_service_client_config.json | 77 + ..._connections_service_descriptor_config.php | 217 + ...connections_service_rest_client_config.php | 271 + .../AppConnectionsServiceClientTest.php | 1146 +++++ .../V1/AppConnectorInstanceConfig.php | Bin 0 -> 1743 bytes .../Appconnectors/V1/AppConnectorsService.php | Bin 0 -> 6117 bytes .../Appconnectors/V1/ResourceInfo.php | Bin 0 -> 1587 bytes .../AppConnectors/V1/AppConnector.php | 395 ++ .../V1/AppConnector/PrincipalInfo.php | 78 + .../PrincipalInfo/ServiceAccount.php | 70 + .../AppConnectors/V1/AppConnector/State.php | 86 + .../V1/AppConnectorInstanceConfig.php | 215 + .../V1/AppConnectorOperationMetadata.php | 307 ++ .../V1/CreateAppConnectorRequest.php | 296 ++ .../V1/DeleteAppConnectorRequest.php | 198 + .../V1/GetAppConnectorRequest.php | 86 + .../AppConnectors/V1/HealthStatus.php | 75 + .../AppConnectors/V1/ImageConfig.php | 109 + .../V1/ListAppConnectorsRequest.php | 258 + .../V1/ListAppConnectorsResponse.php | 139 + .../AppConnectors/V1/NotificationConfig.php | 75 + .../CloudPubSubNotificationConfig.php | 70 + .../AppConnectors/V1/ReportStatusRequest.php | 244 + .../AppConnectors/V1/ResourceInfo.php | 240 + .../V1/UpdateAppConnectorRequest.php | 273 + .../create_app_connector.php | 93 + .../delete_app_connector.php | 85 + .../get_app_connector.php | 76 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../list_app_connectors.php | 77 + .../list_locations.php | 62 + .../report_status.php | 94 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_app_connector.php | 91 + .../V1/Client/AppConnectorsServiceClient.php | 624 +++ .../v1/src/V1/gapic_metadata.json | 73 + .../app_connectors_service_client_config.json | 77 + ...p_connectors_service_descriptor_config.php | 214 + ..._connectors_service_rest_client_config.php | 272 + .../Client/AppConnectorsServiceClientTest.php | 1173 +++++ .../Appgateways/V1/AppGatewaysService.php | Bin 0 -> 4655 bytes .../BeyondCorp/AppGateways/V1/AppGateway.php | 442 ++ .../V1/AppGateway/AllocatedConnection.php | 104 + .../AppGateways/V1/AppGateway/HostType.php | 58 + .../AppGateways/V1/AppGateway/State.php | 86 + .../AppGateways/V1/AppGateway/Type.php | 58 + .../V1/AppGatewayOperationMetadata.php | 307 ++ .../V1/CreateAppGatewayRequest.php | 295 ++ .../V1/DeleteAppGatewayRequest.php | 198 + .../AppGateways/V1/GetAppGatewayRequest.php | 86 + .../AppGateways/V1/ListAppGatewaysRequest.php | 258 + .../V1/ListAppGatewaysResponse.php | 139 + .../create_app_gateway.php | 102 + .../delete_app_gateway.php | 85 + .../get_app_gateway.php | 76 + .../get_iam_policy.php | 72 + .../AppGatewaysServiceClient/get_location.php | 57 + .../list_app_gateways.php | 77 + .../list_locations.php | 62 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../V1/Client/AppGatewaysServiceClient.php | 564 ++ .../v1/src/V1/gapic_metadata.json | 63 + .../app_gateways_service_client_config.json | 67 + ...app_gateways_service_descriptor_config.php | 175 + ...pp_gateways_service_rest_client_config.php | 244 + .../Client/AppGatewaysServiceClientTest.php | 904 ++++ .../V1/ClientConnectorServicesService.php | Bin 0 -> 6575 bytes .../V1/ClientConnectorService.php | 327 ++ .../V1/ClientConnectorService/Egress.php | 78 + .../Egress/PeeredVpc.php | 70 + .../V1/ClientConnectorService/Ingress.php | 79 + .../ClientConnectorService/Ingress/Config.php | 108 + .../Ingress/Config/DestinationRoute.php | 114 + .../Ingress/Config/TransportProtocol.php | 57 + .../V1/ClientConnectorService/State.php | 94 + ...lientConnectorServiceOperationMetadata.php | 307 ++ .../CreateClientConnectorServiceRequest.php | 301 ++ .../DeleteClientConnectorServiceRequest.php | 193 + .../V1/GetClientConnectorServiceRequest.php | 81 + .../V1/ListClientConnectorServicesRequest.php | 221 + .../ListClientConnectorServicesResponse.php | 135 + .../UpdateClientConnectorServiceRequest.php | 308 ++ .../create_client_connector_service.php | 96 + .../delete_client_connector_service.php | 84 + .../get_client_connector_service.php | 75 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../list_client_connector_services.php | 76 + .../list_locations.php | 62 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_client_connector_service.php | 93 + .../ClientConnectorServicesServiceClient.php | 602 +++ .../v1/src/V1/gapic_metadata.json | 68 + ...nector_services_service_client_config.json | 72 + ...tor_services_service_descriptor_config.php | 195 + ...or_services_service_rest_client_config.php | 260 + ...ientConnectorServicesServiceClientTest.php | 1037 ++++ .../V1/ClientGatewaysService.php | Bin 0 -> 4281 bytes .../ClientGateways/V1/ClientGateway.php | 265 + .../ClientGateways/V1/ClientGateway/State.php | 93 + .../V1/ClientGatewayOperationMetadata.php | 307 ++ .../V1/CreateClientGatewayRequest.php | 290 ++ .../V1/DeleteClientGatewayRequest.php | 193 + .../V1/GetClientGatewayRequest.php | 81 + .../V1/ListClientGatewaysRequest.php | 221 + .../V1/ListClientGatewaysResponse.php | 135 + .../create_client_gateway.php | 88 + .../delete_client_gateway.php | 84 + .../get_client_gateway.php | 75 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../list_client_gateways.php | 76 + .../list_locations.php | 62 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../V1/Client/ClientGatewaysServiceClient.php | 565 ++ .../v1/src/V1/gapic_metadata.json | 63 + ...client_gateways_service_client_config.json | 67 + ...ent_gateways_service_descriptor_config.php | 175 + ...nt_gateways_service_rest_client_config.php | 244 + .../ClientGatewaysServiceClientTest.php | 884 ++++ .../Bigquery/Analyticshub/V1/Analyticshub.php | Bin 0 -> 16329 bytes .../V1/CreateDataExchangeRequest.php | 182 + .../AnalyticsHub/V1/CreateListingRequest.php | 182 + .../BigQuery/AnalyticsHub/V1/DataExchange.php | 421 ++ .../BigQuery/AnalyticsHub/V1/DataProvider.php | 105 + .../V1/DeleteDataExchangeRequest.php | 86 + .../AnalyticsHub/V1/DeleteListingRequest.php | 86 + .../V1/DeleteSubscriptionRequest.php | 86 + .../AnalyticsHub/V1/DestinationDataset.php | 311 ++ .../V1/DestinationDatasetReference.php | 109 + .../AnalyticsHub/V1/DiscoveryType.php | 65 + .../V1/GetDataExchangeRequest.php | 86 + .../AnalyticsHub/V1/GetListingRequest.php | 86 + .../V1/GetSubscriptionRequest.php | 86 + .../V1/ListDataExchangesRequest.php | 162 + .../V1/ListDataExchangesResponse.php | 101 + .../AnalyticsHub/V1/ListListingsRequest.php | 162 + .../AnalyticsHub/V1/ListListingsResponse.php | 101 + .../V1/ListOrgDataExchangesRequest.php | 162 + .../V1/ListOrgDataExchangesResponse.php | 102 + ...ListSharedResourceSubscriptionsRequest.php | 201 + ...istSharedResourceSubscriptionsResponse.php | 101 + .../V1/ListSubscriptionsRequest.php | 228 + .../V1/ListSubscriptionsResponse.php | 101 + .../BigQuery/AnalyticsHub/V1/Listing.php | 624 +++ .../V1/Listing/BigQueryDatasetSource.php | 170 + .../RestrictedExportPolicy.php | 262 + .../SelectedResource.php | 87 + .../AnalyticsHub/V1/Listing/Category.php | 143 + .../V1/Listing/RestrictedExportConfig.php | 147 + .../AnalyticsHub/V1/Listing/State.php | 58 + .../AnalyticsHub/V1/OperationMetadata.php | 307 ++ .../BigQuery/AnalyticsHub/V1/Publisher.php | 105 + .../V1/RefreshSubscriptionRequest.php | 86 + .../V1/RefreshSubscriptionResponse.php | 77 + .../V1/RevokeSubscriptionRequest.php | 86 + .../V1/RevokeSubscriptionResponse.php | 33 + .../V1/SharingEnvironmentConfig.php | 109 + .../DcrExchangeConfig.php | 160 + .../DefaultExchangeConfig.php | 36 + .../V1/SubscribeDataExchangeRequest.php | 196 + .../V1/SubscribeDataExchangeResponse.php | 77 + .../V1/SubscribeListingRequest.php | 128 + .../V1/SubscribeListingResponse.php | 77 + .../BigQuery/AnalyticsHub/V1/Subscription.php | 432 ++ .../V1/Subscription/LinkedResource.php | 81 + .../AnalyticsHub/V1/Subscription/State.php | 73 + .../V1/UpdateDataExchangeRequest.php | 146 + .../AnalyticsHub/V1/UpdateListingRequest.php | 146 + .../create_data_exchange.php | 90 + .../create_listing.php | 97 + .../delete_data_exchange.php | 74 + .../delete_listing.php | 75 + .../delete_subscription.php | 85 + .../get_data_exchange.php | 76 + .../get_iam_policy.php | 71 + .../AnalyticsHubServiceClient/get_listing.php | 77 + .../get_subscription.php | 76 + .../list_data_exchanges.php | 77 + .../list_listings.php | 81 + .../list_org_data_exchanges.php | 77 + .../list_shared_resource_subscriptions.php | 78 + .../list_subscriptions.php | 77 + .../refresh_subscription.php | 90 + .../revoke_subscription.php | 76 + .../set_iam_policy.php | 73 + .../subscribe_data_exchange.php | 101 + .../subscribe_listing.php | 82 + .../test_iam_permissions.php | 78 + .../update_data_exchange.php | 78 + .../update_listing.php | 81 + .../V1/Client/AnalyticsHubServiceClient.php | 1009 ++++ .../v1/src/V1/gapic_metadata.json | 128 + .../analytics_hub_service_client_config.json | 145 + ...nalytics_hub_service_descriptor_config.php | 363 ++ ...alytics_hub_service_rest_client_config.php | 332 ++ .../Client/AnalyticsHubServiceClientTest.php | 1929 +++++++ .../Bigquery/Connection/V1/Connection.php | Bin 0 -> 6926 bytes .../BigQuery/Connection/V1/AwsAccessRole.php | 110 + .../Connection/V1/AwsCrossAccountRole.php | 152 + .../BigQuery/Connection/V1/AwsProperties.php | 122 + .../Connection/V1/AzureProperties.php | 287 ++ .../Connection/V1/CloudResourceProperties.php | 100 + .../Connection/V1/CloudSpannerProperties.php | 313 ++ .../Connection/V1/CloudSqlCredential.php | 101 + .../Connection/V1/CloudSqlProperties.php | 229 + .../V1/CloudSqlProperties/DatabaseType.php | 64 + .../BigQuery/Connection/V1/Connection.php | 488 ++ .../Connection/V1/CreateConnectionRequest.php | 169 + .../Connection/V1/DeleteConnectionRequest.php | 86 + .../Connection/V1/GetConnectionRequest.php | 87 + .../Connection/V1/ListConnectionsRequest.php | 155 + .../Connection/V1/ListConnectionsResponse.php | 102 + .../Connection/V1/MetastoreServiceConfig.php | 75 + .../V1/SalesforceDataCloudProperties.php | 140 + .../V1/SparkHistoryServerConfig.php | 79 + .../Connection/V1/SparkProperties.php | 188 + .../Connection/V1/UpdateConnectionRequest.php | 179 + .../create_connection.php | 74 + .../delete_connection.php | 70 + .../get_connection.php | 72 + .../get_iam_policy.php | 73 + .../list_connections.php | 82 + .../set_iam_policy.php | 76 + .../test_iam_permissions.php | 84 + .../update_connection.php | 78 + .../src/V1/Client/ConnectionServiceClient.php | 507 ++ .../v1/src/V1/gapic_metadata.json | 58 + .../connection_service_client_config.json | 85 + .../connection_service_descriptor_config.php | 138 + .../connection_service_rest_client_config.php | 128 + .../V1/Client/ConnectionServiceClientTest.php | 702 +++ .../Dataexchange/V1Beta1/Dataexchange.php | Bin 0 -> 10020 bytes .../V1beta1/CreateDataExchangeRequest.php | 182 + .../V1beta1/CreateListingRequest.php | 182 + .../DataExchange/V1beta1/DataExchange.php | 329 ++ .../DataExchange/V1beta1/DataProvider.php | 105 + .../V1beta1/DeleteDataExchangeRequest.php | 86 + .../V1beta1/DeleteListingRequest.php | 86 + .../V1beta1/DestinationDataset.php | 311 ++ .../V1beta1/DestinationDatasetReference.php | 109 + .../V1beta1/GetDataExchangeRequest.php | 86 + .../V1beta1/GetListingRequest.php | 86 + .../V1beta1/ListDataExchangesRequest.php | 162 + .../V1beta1/ListDataExchangesResponse.php | 101 + .../V1beta1/ListListingsRequest.php | 162 + .../V1beta1/ListListingsResponse.php | 101 + .../V1beta1/ListOrgDataExchangesRequest.php | 162 + .../V1beta1/ListOrgDataExchangesResponse.php | 102 + .../BigQuery/DataExchange/V1beta1/Listing.php | 540 ++ .../V1beta1/Listing/BigQueryDatasetSource.php | 80 + .../DataExchange/V1beta1/Listing/Category.php | 143 + .../DataExchange/V1beta1/Listing/State.php | 58 + .../DataExchange/V1beta1/Publisher.php | 105 + .../V1beta1/SubscribeListingRequest.php | 128 + .../V1beta1/SubscribeListingResponse.php | 33 + .../V1beta1/UpdateDataExchangeRequest.php | 146 + .../V1beta1/UpdateListingRequest.php | 146 + .../create_data_exchange.php | 91 + .../create_listing.php | 98 + .../delete_data_exchange.php | 74 + .../delete_listing.php | 75 + .../get_data_exchange.php | 76 + .../get_iam_policy.php | 71 + .../AnalyticsHubServiceClient/get_listing.php | 77 + .../get_location.php | 57 + .../list_data_exchanges.php | 77 + .../list_listings.php | 81 + .../list_locations.php | 62 + .../list_org_data_exchanges.php | 77 + .../set_iam_policy.php | 73 + .../subscribe_listing.php | 82 + .../test_iam_permissions.php | 78 + .../update_data_exchange.php | 79 + .../update_listing.php | 82 + .../src/V1beta1/AnalyticsHubServiceClient.php | 36 + .../Client/AnalyticsHubServiceClient.php | 815 +++ .../Gapic/AnalyticsHubServiceGapicClient.php | 1305 +++++ .../v1beta1/src/V1beta1/gapic_metadata.json | 103 + .../analytics_hub_service_client_config.json | 120 + ...nalytics_hub_service_descriptor_config.php | 274 + ...alytics_hub_service_rest_client_config.php | 260 + .../V1beta1/AnalyticsHubServiceClientTest.php | 1239 +++++ .../Client/AnalyticsHubServiceClientTest.php | 1387 +++++ .../Bigquery/Datapolicies/V1/Datapolicy.php | Bin 0 -> 5331 bytes .../V1/CreateDataPolicyRequest.php | 137 + .../DataPolicies/V1/DataMaskingPolicy.php | 114 + .../PredefinedExpression.php | 141 + .../BigQuery/DataPolicies/V1/DataPolicy.php | 234 + .../V1/DataPolicy/DataPolicyType.php | 65 + .../V1/DeleteDataPolicyRequest.php | 86 + .../DataPolicies/V1/GetDataPolicyRequest.php | 86 + .../V1/ListDataPoliciesRequest.php | 228 + .../V1/ListDataPoliciesResponse.php | 105 + .../V1/RenameDataPolicyRequest.php | 121 + .../V1/UpdateDataPolicyRequest.php | 168 + .../create_data_policy.php | 75 + .../delete_data_policy.php | 74 + .../get_data_policy.php | 76 + .../get_iam_policy.php | 71 + .../list_data_policies.php | 77 + .../rename_data_policy.php | 74 + .../set_iam_policy.php | 73 + .../test_iam_permissions.php | 78 + .../update_data_policy.php | 60 + .../src/V1/Client/DataPolicyServiceClient.php | 485 ++ .../v1/src/V1/gapic_metadata.json | 63 + .../data_policy_service_client_config.json | 79 + .../data_policy_service_descriptor_config.php | 149 + ...data_policy_service_rest_client_config.php | 135 + .../V1/Client/DataPolicyServiceClientTest.php | 734 +++ .../Bigquery/Datatransfer/V1/Datatransfer.php | Bin 0 -> 11719 bytes .../Bigquery/Datatransfer/V1/Transfer.php | Bin 0 -> 4804 bytes .../V1/CheckValidCredsRequest.php | 96 + .../V1/CheckValidCredsResponse.php | 67 + .../V1/CreateTransferConfigRequest.php | 403 ++ .../BigQuery/DataTransfer/V1/DataSource.php | 721 +++ .../V1/DataSource/AuthorizationType.php | 73 + .../V1/DataSource/DataRefreshType.php | 68 + .../DataTransfer/V1/DataSourceParameter.php | 659 +++ .../V1/DataSourceParameter/Type.php | 104 + .../V1/DeleteTransferConfigRequest.php | 92 + .../V1/DeleteTransferRunRequest.php | 96 + .../DataTransfer/V1/EmailPreferences.php | 68 + .../V1/EncryptionConfiguration.php | 104 + .../V1/EnrollDataSourcesRequest.php | 110 + .../DataTransfer/V1/EventDrivenSchedule.php | 75 + .../DataTransfer/V1/GetDataSourceRequest.php | 91 + .../V1/GetTransferConfigRequest.php | 91 + .../DataTransfer/V1/GetTransferRunRequest.php | 96 + .../V1/ListDataSourcesRequest.php | 175 + .../V1/ListDataSourcesResponse.php | 113 + .../V1/ListTransferConfigsRequest.php | 209 + .../V1/ListTransferConfigsResponse.php | 113 + .../V1/ListTransferLogsRequest.php | 213 + .../V1/ListTransferLogsResponse.php | 113 + .../V1/ListTransferRunsRequest.php | 248 + .../V1/ListTransferRunsRequest/RunAttempt.php | 57 + .../V1/ListTransferRunsResponse.php | 113 + .../DataTransfer/V1/ManualSchedule.php | 33 + .../DataTransfer/V1/ScheduleOptions.php | 195 + .../DataTransfer/V1/ScheduleOptionsV2.php | 159 + .../V1/ScheduleTransferRunsRequest.php | 193 + .../V1/ScheduleTransferRunsResponse.php | 67 + .../V1/StartManualTransferRunsRequest.php | 168 + .../TimeRange.php | 149 + .../V1/StartManualTransferRunsResponse.php | 67 + .../DataTransfer/V1/TimeBasedSchedule.php | 220 + .../DataTransfer/V1/TransferConfig.php | 980 ++++ .../DataTransfer/V1/TransferMessage.php | 145 + .../V1/TransferMessage/MessageSeverity.php | 71 + .../BigQuery/DataTransfer/V1/TransferRun.php | 707 +++ .../DataTransfer/V1/TransferState.php | 83 + .../BigQuery/DataTransfer/V1/TransferType.php | 63 + .../V1/UnenrollDataSourcesRequest.php | 110 + .../V1/UpdateTransferConfigRequest.php | 388 ++ .../BigQuery/DataTransfer/V1/UserInfo.php | 77 + .../check_valid_creds.php | 74 + .../create_transfer_config.php | 77 + .../delete_transfer_config.php | 72 + .../delete_transfer_run.php | 72 + .../enroll_data_sources.php | 62 + .../get_data_source.php | 73 + .../get_location.php | 57 + .../get_transfer_config.php | 73 + .../get_transfer_run.php | 74 + .../list_data_sources.php | 78 + .../list_locations.php | 62 + .../list_transfer_configs.php | 79 + .../list_transfer_logs.php | 78 + .../list_transfer_runs.php | 79 + .../schedule_transfer_runs.php | 82 + .../start_manual_transfer_runs.php | 60 + .../unenroll_data_sources.php | 59 + .../update_transfer_config.php | 63 + .../V1/Client/DataTransferServiceClient.php | 936 ++++ .../v1/src/V1/gapic_metadata.json | 108 + .../data_transfer_service_client_config.json | 135 + ...ata_transfer_service_descriptor_config.php | 300 ++ ...ta_transfer_service_rest_client_config.php | 339 ++ .../Client/DataTransferServiceClientTest.php | 1373 +++++ .../Migration/V2/MigrationEntities.php | Bin 0 -> 4645 bytes .../Migration/V2/MigrationErrorDetails.php | 40 + .../Migration/V2/MigrationMetrics.php | Bin 0 -> 1890 bytes .../Migration/V2/MigrationService.php | 81 + .../Migration/V2/TranslationConfig.php | Bin 0 -> 4030 bytes .../Migration/V2/TranslationDetails.php | Bin 0 -> 1792 bytes .../Migration/V2/TranslationSuggestion.php | Bin 0 -> 1330 bytes .../Migration/V2/TranslationUsability.php | 42 + .../Migration/V2/AzureSynapseDialect.php | 33 + .../BigQuery/Migration/V2/BigQueryDialect.php | 33 + .../V2/CreateMigrationWorkflowRequest.php | 132 + .../BigQuery/Migration/V2/DB2Dialect.php | 33 + .../V2/DeleteMigrationWorkflowRequest.php | 86 + .../Cloud/BigQuery/Migration/V2/Dialect.php | 603 +++ .../BigQuery/Migration/V2/ErrorDetail.php | 122 + .../BigQuery/Migration/V2/ErrorLocation.php | 109 + .../Migration/V2/GcsReportLogMessage.php | 415 ++ .../V2/GetMigrationSubtaskRequest.php | 130 + .../V2/GetMigrationWorkflowRequest.php | 130 + .../Migration/V2/GreenplumDialect.php | 33 + .../BigQuery/Migration/V2/HiveQLDialect.php | 33 + .../V2/ListMigrationSubtasksRequest.php | 256 + .../V2/ListMigrationSubtasksResponse.php | 105 + .../V2/ListMigrationWorkflowsRequest.php | 214 + .../V2/ListMigrationWorkflowsResponse.php | 105 + .../Cloud/BigQuery/Migration/V2/Literal.php | 142 + .../Migration/V2/MigrationSubtask.php | 449 ++ .../Migration/V2/MigrationSubtask/State.php | 94 + .../BigQuery/Migration/V2/MigrationTask.php | 609 +++ .../Migration/V2/MigrationTask/State.php | 93 + .../Migration/V2/MigrationTaskResult.php | 75 + .../Migration/V2/MigrationWorkflow.php | 278 + .../Migration/V2/MigrationWorkflow/State.php | 82 + .../BigQuery/Migration/V2/MySQLDialect.php | 33 + .../BigQuery/Migration/V2/NameMappingKey.php | 216 + .../Migration/V2/NameMappingKey/Type.php | 103 + .../Migration/V2/NameMappingValue.php | 182 + .../BigQuery/Migration/V2/NetezzaDialect.php | 33 + .../Migration/V2/ObjectNameMapping.php | 122 + .../Migration/V2/ObjectNameMappingList.php | 68 + .../BigQuery/Migration/V2/OracleDialect.php | 33 + .../Cloud/BigQuery/Migration/V2/Point.php | 153 + .../Migration/V2/PostgresqlDialect.php | 33 + .../BigQuery/Migration/V2/PrestoDialect.php | 33 + .../BigQuery/Migration/V2/RedshiftDialect.php | 33 + .../Migration/V2/ResourceErrorDetail.php | 153 + .../Migration/V2/SQLServerDialect.php | 33 + .../BigQuery/Migration/V2/SQLiteDialect.php | 33 + .../Migration/V2/SnowflakeDialect.php | 33 + .../Cloud/BigQuery/Migration/V2/SourceEnv.php | 163 + .../Migration/V2/SourceEnvironment.php | 163 + .../BigQuery/Migration/V2/SourceSpec.php | 142 + .../Migration/V2/SourceTargetMapping.php | 121 + .../BigQuery/Migration/V2/SparkSQLDialect.php | 33 + .../V2/StartMigrationWorkflowRequest.php | 86 + .../BigQuery/Migration/V2/TargetSpec.php | 75 + .../BigQuery/Migration/V2/TeradataDialect.php | 67 + .../Migration/V2/TeradataDialect/Mode.php | 64 + .../BigQuery/Migration/V2/TimeInterval.php | 131 + .../BigQuery/Migration/V2/TimeSeries.php | 213 + .../Migration/V2/TranslationConfigDetails.php | 372 ++ .../Migration/V2/TranslationDetails.php | 234 + .../Migration/V2/TranslationReportRecord.php | 211 + .../V2/TranslationReportRecord/Severity.php | 72 + .../Migration/V2/TranslationTaskResult.php | 101 + .../BigQuery/Migration/V2/TypedValue.php | 213 + .../BigQuery/Migration/V2/VerticaDialect.php | 33 + .../create_migration_workflow.php | 74 + .../delete_migration_workflow.php | 74 + .../get_migration_subtask.php | 77 + .../get_migration_workflow.php | 76 + .../list_migration_subtasks.php | 81 + .../list_migration_workflows.php | 77 + .../start_migration_workflow.php | 77 + .../src/V2/Client/MigrationServiceClient.php | 454 ++ .../v2/src/V2/gapic_metadata.json | 53 + .../migration_service_client_config.json | 79 + .../migration_service_descriptor_config.php | 133 + .../migration_service_rest_client_config.php | 107 + .../V2/Client/MigrationServiceClientTest.php | 581 +++ .../Bigquery/Reservation/V1/Reservation.php | Bin 0 -> 13099 bytes .../BigQuery/Reservation/V1/Assignment.php | 186 + .../Reservation/V1/Assignment/JobType.php | 80 + .../Reservation/V1/Assignment/State.php | 67 + .../BigQuery/Reservation/V1/BiReservation.php | 187 + .../Reservation/V1/CapacityCommitment.php | 466 ++ .../V1/CapacityCommitment/CommitmentPlan.php | 134 + .../V1/CapacityCommitment/State.php | 74 + .../V1/CreateAssignmentRequest.php | 181 + .../V1/CreateCapacityCommitmentRequest.php | 221 + .../V1/CreateReservationRequest.php | 179 + .../V1/DeleteAssignmentRequest.php | 89 + .../V1/DeleteCapacityCommitmentRequest.php | 129 + .../V1/DeleteReservationRequest.php | 87 + .../Cloud/BigQuery/Reservation/V1/Edition.php | 70 + .../V1/GetBiReservationRequest.php | 86 + .../V1/GetCapacityCommitmentRequest.php | 87 + .../Reservation/V1/GetReservationRequest.php | 87 + .../Reservation/V1/ListAssignmentsRequest.php | 168 + .../V1/ListAssignmentsResponse.php | 106 + .../V1/ListCapacityCommitmentsRequest.php | 155 + .../V1/ListCapacityCommitmentsResponse.php | 106 + .../V1/ListReservationsRequest.php | 155 + .../V1/ListReservationsResponse.php | 106 + .../V1/MergeCapacityCommitmentsRequest.php | 142 + .../Reservation/V1/MoveAssignmentRequest.php | 184 + .../BigQuery/Reservation/V1/Reservation.php | 489 ++ .../Reservation/V1/Reservation/Autoscale.php | 108 + .../V1/SearchAllAssignmentsRequest.php | 220 + .../V1/SearchAllAssignmentsResponse.php | 106 + .../V1/SearchAssignmentsRequest.php | 220 + .../V1/SearchAssignmentsResponse.php | 106 + .../V1/SplitCapacityCommitmentRequest.php | 123 + .../V1/SplitCapacityCommitmentResponse.php | 122 + .../Reservation/V1/TableReference.php | 136 + .../V1/UpdateAssignmentRequest.php | 137 + .../V1/UpdateBiReservationRequest.php | 136 + .../V1/UpdateCapacityCommitmentRequest.php | 137 + .../V1/UpdateReservationRequest.php | 137 + .../create_assignment.php | 110 + .../create_capacity_commitment.php | 72 + .../create_reservation.php | 72 + .../delete_assignment.php | 89 + .../delete_capacity_commitment.php | 76 + .../delete_reservation.php | 76 + .../get_bi_reservation.php | 72 + .../get_capacity_commitment.php | 76 + .../get_reservation.php | 76 + .../list_assignments.php | 106 + .../list_capacity_commitments.php | 77 + .../list_reservations.php | 77 + .../merge_capacity_commitments.php | 63 + .../move_assignment.php | 82 + .../search_all_assignments.php | 97 + .../search_assignments.php | 100 + .../split_capacity_commitment.php | 83 + .../update_assignment.php | 59 + .../update_bi_reservation.php | 64 + .../update_capacity_commitment.php | 63 + .../update_reservation.php | 57 + .../V1/Client/ReservationServiceClient.php | 1047 ++++ .../v1/src/V1/gapic_metadata.json | 123 + .../reservation_service_client_config.json | 150 + .../reservation_service_descriptor_config.php | 331 ++ ...reservation_service_rest_client_config.php | 274 + .../Client/ReservationServiceClientTest.php | 1506 ++++++ .../Cloud/Bigquery/Storage/V1/Annotations.php | 27 + .../Cloud/Bigquery/Storage/V1/Arrow.php | Bin 0 -> 1165 bytes .../Google/Cloud/Bigquery/Storage/V1/Avro.php | 35 + .../Cloud/Bigquery/Storage/V1/Protobuf.php | 31 + .../Cloud/Bigquery/Storage/V1/Storage.php | Bin 0 -> 8911 bytes .../Cloud/Bigquery/Storage/V1/Stream.php | Bin 0 -> 3971 bytes .../Cloud/Bigquery/Storage/V1/Table.php | Bin 0 -> 1875 bytes .../BigQuery/Storage/V1/AppendRowsRequest.php | 547 ++ .../V1/AppendRowsRequest/ArrowData.php | 126 + .../MissingValueInterpretation.php | 68 + .../V1/AppendRowsRequest/ProtoData.php | 153 + .../Storage/V1/AppendRowsResponse.php | 279 + .../V1/AppendRowsResponse/AppendResult.php | 113 + .../BigQuery/Storage/V1/ArrowRecordBatch.php | 110 + .../Cloud/BigQuery/Storage/V1/ArrowSchema.php | 71 + .../Storage/V1/ArrowSerializationOptions.php | 71 + .../CompressionCodec.php | 64 + .../Cloud/BigQuery/Storage/V1/AvroRows.php | 110 + .../Cloud/BigQuery/Storage/V1/AvroSchema.php | 71 + .../Storage/V1/AvroSerializationOptions.php | 95 + .../V1/BatchCommitWriteStreamsRequest.php | 120 + .../V1/BatchCommitWriteStreamsResponse.php | 135 + .../Storage/V1/CreateReadSessionRequest.php | 267 + .../Storage/V1/CreateWriteStreamRequest.php | 132 + .../Cloud/BigQuery/Storage/V1/DataFormat.php | 63 + .../Storage/V1/FinalizeWriteStreamRequest.php | 86 + .../V1/FinalizeWriteStreamResponse.php | 67 + .../BigQuery/Storage/V1/FlushRowsRequest.php | 158 + .../BigQuery/Storage/V1/FlushRowsResponse.php | 67 + .../Storage/V1/GetWriteStreamRequest.php | 124 + .../Cloud/BigQuery/Storage/V1/ProtoRows.php | 73 + .../Cloud/BigQuery/Storage/V1/ProtoSchema.php | 105 + .../BigQuery/Storage/V1/ReadRowsRequest.php | 127 + .../BigQuery/Storage/V1/ReadRowsResponse.php | 406 ++ .../Cloud/BigQuery/Storage/V1/ReadSession.php | 604 +++ .../Storage/V1/ReadSession/TableModifiers.php | 80 + .../V1/ReadSession/TableReadOptions.php | 471 ++ .../ResponseCompressionCodec.php | 63 + .../Cloud/BigQuery/Storage/V1/ReadStream.php | 73 + .../Cloud/BigQuery/Storage/V1/RowError.php | 135 + .../Storage/V1/RowError/RowErrorCode.php | 57 + .../Storage/V1/SplitReadStreamRequest.php | 125 + .../Storage/V1/SplitReadStreamResponse.php | 133 + .../BigQuery/Storage/V1/StorageError.php | 138 + .../V1/StorageError/StorageErrorCode.php | 154 + .../Cloud/BigQuery/Storage/V1/StreamStats.php | 77 + .../Storage/V1/StreamStats/Progress.php | 142 + .../BigQuery/Storage/V1/TableFieldSchema.php | 535 ++ .../V1/TableFieldSchema/FieldElementType.php | 70 + .../Storage/V1/TableFieldSchema/Mode.php | 63 + .../Storage/V1/TableFieldSchema/Type.php | 160 + .../Cloud/BigQuery/Storage/V1/TableSchema.php | 69 + .../BigQuery/Storage/V1/ThrottleState.php | 71 + .../Cloud/BigQuery/Storage/V1/WriteStream.php | 341 ++ .../BigQuery/Storage/V1/WriteStream/Type.php | 72 + .../Storage/V1/WriteStream/WriteMode.php | 58 + .../BigQuery/Storage/V1/WriteStreamView.php | 66 + .../create_read_session.php | 92 + .../V1/BigQueryReadClient/read_rows.php | 87 + .../BigQueryReadClient/split_read_stream.php | 87 + .../V1/BigQueryWriteClient/append_rows.php | 143 + .../batch_commit_write_streams.php | 83 + .../create_write_stream.php | 79 + .../finalize_write_stream.php | 78 + .../V1/BigQueryWriteClient/flush_rows.php | 83 + .../BigQueryWriteClient/get_write_stream.php | 77 + .../v1/src/V1/Client/BigQueryReadClient.php | 388 ++ .../v1/src/V1/Client/BigQueryWriteClient.php | 454 ++ .../v1/src/V1/gapic_metadata.json | 72 + .../big_query_read_client_config.json | 73 + .../big_query_read_descriptor_config.php | 74 + .../big_query_read_rest_client_config.php | 63 + .../big_query_write_client_config.json | 90 + .../big_query_write_descriptor_config.php | 107 + .../big_query_write_rest_client_config.php | 90 + .../Unit/V1/Client/BigQueryReadClientTest.php | 338 ++ .../V1/Client/BigQueryWriteClientTest.php | 537 ++ .../Admin/V2/BigtableInstanceAdmin.php | Bin 0 -> 10449 bytes .../Bigtable/Admin/V2/BigtableTableAdmin.php | Bin 0 -> 15587 bytes .../Google/Bigtable/Admin/V2/Common.php | Bin 0 -> 1093 bytes .../Google/Bigtable/Admin/V2/Instance.php | Bin 0 -> 5007 bytes .../Google/Bigtable/Admin/V2/Table.php | Bin 0 -> 6294 bytes .../Google/Bigtable/Admin/V2/Types.php | Bin 0 -> 3216 bytes .../Cloud/Bigtable/Admin/V2/AppProfile.php | 368 ++ .../AppProfile/DataBoostIsolationReadOnly.php | 90 + .../ComputeBillingOwner.php | 60 + .../AppProfile/MultiClusterRoutingUseAny.php | 123 + .../MultiClusterRoutingUseAny/RowAffinity.php | 44 + .../Bigtable/Admin/V2/AppProfile/Priority.php | 67 + .../V2/AppProfile/SingleClusterRouting.php | 114 + .../Admin/V2/AppProfile/StandardIsolation.php | 71 + .../Bigtable/Admin/V2/AuthorizedView.php | 203 + .../Admin/V2/AuthorizedView/FamilySubsets.php | 120 + .../Admin/V2/AuthorizedView/ResponseView.php | 72 + .../Admin/V2/AuthorizedView/SubsetView.php | 112 + .../Bigtable/Admin/V2/AutoscalingLimits.php | 101 + .../Bigtable/Admin/V2/AutoscalingTargets.php | 133 + .../Google/Cloud/Bigtable/Admin/V2/Backup.php | 573 +++ .../Bigtable/Admin/V2/Backup/BackupType.php | 69 + .../Cloud/Bigtable/Admin/V2/Backup/State.php | 65 + .../Cloud/Bigtable/Admin/V2/BackupInfo.php | 243 + .../Bigtable/Admin/V2/ChangeStreamConfig.php | 93 + .../Admin/V2/CheckConsistencyRequest.php | 215 + .../Admin/V2/CheckConsistencyResponse.php | 72 + .../Cloud/Bigtable/Admin/V2/Cluster.php | 349 ++ .../V2/Cluster/ClusterAutoscalingConfig.php | 124 + .../Admin/V2/Cluster/ClusterConfig.php | 80 + .../Admin/V2/Cluster/EncryptionConfig.php | 107 + .../Admin/V2/Cluster/NodeScalingFactor.php | 67 + .../Cloud/Bigtable/Admin/V2/Cluster/State.php | 85 + .../Cloud/Bigtable/Admin/V2/ColumnFamily.php | 157 + .../Bigtable/Admin/V2/CopyBackupMetadata.php | 172 + .../Bigtable/Admin/V2/CopyBackupRequest.php | 286 ++ .../Admin/V2/CreateAppProfileRequest.php | 217 + .../Admin/V2/CreateAuthorizedViewMetadata.php | 165 + .../Admin/V2/CreateAuthorizedViewRequest.php | 189 + .../Admin/V2/CreateBackupMetadata.php | 190 + .../Bigtable/Admin/V2/CreateBackupRequest.php | 199 + .../Admin/V2/CreateClusterMetadata.php | 223 + .../CreateClusterMetadata/TableProgress.php | 139 + .../TableProgress/State.php | 76 + .../Admin/V2/CreateClusterRequest.php | 183 + .../Admin/V2/CreateInstanceMetadata.php | 165 + .../Admin/V2/CreateInstanceRequest.php | 239 + .../V2/CreateTableFromSnapshotMetadata.php | 173 + .../V2/CreateTableFromSnapshotRequest.php | 184 + .../Bigtable/Admin/V2/CreateTableRequest.php | 265 + .../Admin/V2/CreateTableRequest/Split.php | 70 + .../Admin/V2/DataBoostReadLocalWrites.php | 34 + .../Admin/V2/DeleteAppProfileRequest.php | 125 + .../Admin/V2/DeleteAuthorizedViewRequest.php | 138 + .../Bigtable/Admin/V2/DeleteBackupRequest.php | 92 + .../Admin/V2/DeleteClusterRequest.php | 86 + .../Admin/V2/DeleteInstanceRequest.php | 86 + .../Admin/V2/DeleteSnapshotRequest.php | 96 + .../Bigtable/Admin/V2/DeleteTableRequest.php | 92 + .../Bigtable/Admin/V2/DropRowRangeRequest.php | 154 + .../Bigtable/Admin/V2/EncryptionInfo.php | 160 + .../V2/EncryptionInfo/EncryptionType.php | 72 + .../Google/Cloud/Bigtable/Admin/V2/GcRule.php | 180 + .../Bigtable/Admin/V2/GcRule/Intersection.php | 70 + .../Cloud/Bigtable/Admin/V2/GcRule/Union.php | 70 + .../V2/GenerateConsistencyTokenRequest.php | 92 + .../V2/GenerateConsistencyTokenResponse.php | 68 + .../Admin/V2/GetAppProfileRequest.php | 86 + .../Admin/V2/GetAuthorizedViewRequest.php | 130 + .../Bigtable/Admin/V2/GetBackupRequest.php | 92 + .../Bigtable/Admin/V2/GetClusterRequest.php | 86 + .../Bigtable/Admin/V2/GetInstanceRequest.php | 86 + .../Bigtable/Admin/V2/GetSnapshotRequest.php | 96 + .../Bigtable/Admin/V2/GetTableRequest.php | 130 + .../Cloud/Bigtable/Admin/V2/HotTablet.php | 315 ++ .../Cloud/Bigtable/Admin/V2/Instance.php | 354 ++ .../Bigtable/Admin/V2/Instance/State.php | 66 + .../Cloud/Bigtable/Admin/V2/Instance/Type.php | 68 + .../Admin/V2/ListAppProfilesRequest.php | 193 + .../Admin/V2/ListAppProfilesResponse.php | 155 + .../Admin/V2/ListAuthorizedViewsRequest.php | 222 + .../Admin/V2/ListAuthorizedViewsResponse.php | 110 + .../Bigtable/Admin/V2/ListBackupsRequest.php | 429 ++ .../Bigtable/Admin/V2/ListBackupsResponse.php | 110 + .../Bigtable/Admin/V2/ListClustersRequest.php | 135 + .../Admin/V2/ListClustersResponse.php | 151 + .../Admin/V2/ListHotTabletsRequest.php | 291 ++ .../Admin/V2/ListHotTabletsResponse.php | 125 + .../Admin/V2/ListInstancesRequest.php | 120 + .../Admin/V2/ListInstancesResponse.php | 155 + .../Admin/V2/ListSnapshotsRequest.php | 178 + .../Admin/V2/ListSnapshotsResponse.php | 114 + .../Bigtable/Admin/V2/ListTablesRequest.php | 217 + .../Bigtable/Admin/V2/ListTablesResponse.php | 110 + .../Admin/V2/ModifyColumnFamiliesRequest.php | 177 + .../Modification.php | 239 + .../Bigtable/Admin/V2/OperationProgress.php | 164 + .../V2/OptimizeRestoredTableMetadata.php | 114 + .../Admin/V2/PartialUpdateClusterMetadata.php | 165 + .../Admin/V2/PartialUpdateClusterRequest.php | 141 + .../Admin/V2/PartialUpdateInstanceRequest.php | 141 + .../Cloud/Bigtable/Admin/V2/RestoreInfo.php | 112 + .../Bigtable/Admin/V2/RestoreSourceType.php | 54 + .../Admin/V2/RestoreTableMetadata.php | 257 + .../Bigtable/Admin/V2/RestoreTableRequest.php | 163 + .../Cloud/Bigtable/Admin/V2/Snapshot.php | 334 ++ .../Bigtable/Admin/V2/Snapshot/State.php | 66 + .../Admin/V2/SnapshotTableMetadata.php | 169 + .../Admin/V2/SnapshotTableRequest.php | 286 ++ .../Admin/V2/StandardReadRemoteWrites.php | 34 + .../Cloud/Bigtable/Admin/V2/StorageType.php | 61 + .../Google/Cloud/Bigtable/Admin/V2/Table.php | 409 ++ .../Admin/V2/Table/AutomatedBackupPolicy.php | 132 + .../Bigtable/Admin/V2/Table/ClusterState.php | 120 + .../Table/ClusterState/ReplicationState.php | 93 + .../Admin/V2/Table/TimestampGranularity.php | 59 + .../Cloud/Bigtable/Admin/V2/Table/View.php | 86 + .../Google/Cloud/Bigtable/Admin/V2/Type.php | 458 ++ .../Bigtable/Admin/V2/Type/Aggregate.php | 284 + .../HyperLogLogPlusPlusUniqueCount.php | 42 + .../Bigtable/Admin/V2/Type/Aggregate/Max.php | 38 + .../Bigtable/Admin/V2/Type/Aggregate/Min.php | 38 + .../Bigtable/Admin/V2/Type/Aggregate/Sum.php | 38 + .../Cloud/Bigtable/Admin/V2/Type/Bytes.php | 81 + .../Bigtable/Admin/V2/Type/Bytes/Encoding.php | 78 + .../Admin/V2/Type/Bytes/Encoding/Raw.php | 39 + .../Cloud/Bigtable/Admin/V2/Type/Date.php | 37 + .../Cloud/Bigtable/Admin/V2/Type/Float32.php | 37 + .../Cloud/Bigtable/Admin/V2/Type/Float64.php | 37 + .../Cloud/Bigtable/Admin/V2/Type/Int64.php | 81 + .../Bigtable/Admin/V2/Type/Int64/Encoding.php | 78 + .../V2/Type/Int64/Encoding/BigEndianBytes.php | 87 + .../Cloud/Bigtable/Admin/V2/Type/Map.php | 134 + .../Cloud/Bigtable/Admin/V2/Type/PBArray.php | 81 + .../Cloud/Bigtable/Admin/V2/Type/PBBool.php | 37 + .../Cloud/Bigtable/Admin/V2/Type/PBString.php | 81 + .../Admin/V2/Type/PBString/Encoding.php | 116 + .../V2/Type/PBString/Encoding/Utf8Bytes.php | 42 + .../V2/Type/PBString/Encoding/Utf8Raw.php | 37 + .../Cloud/Bigtable/Admin/V2/Type/Struct.php | 73 + .../Bigtable/Admin/V2/Type/Struct/Field.php | 118 + .../Bigtable/Admin/V2/Type/Timestamp.php | 37 + .../Admin/V2/UndeleteTableMetadata.php | 156 + .../Admin/V2/UndeleteTableRequest.php | 92 + .../Admin/V2/UpdateAppProfileMetadata.php | 33 + .../Admin/V2/UpdateAppProfileRequest.php | 175 + .../Admin/V2/UpdateAuthorizedViewMetadata.php | 170 + .../Admin/V2/UpdateAuthorizedViewRequest.php | 220 + .../Bigtable/Admin/V2/UpdateBackupRequest.php | 173 + .../Admin/V2/UpdateClusterMetadata.php | 165 + .../Admin/V2/UpdateInstanceMetadata.php | 165 + .../Bigtable/Admin/V2/UpdateTableMetadata.php | 156 + .../Bigtable/Admin/V2/UpdateTableRequest.php | 189 + .../create_app_profile.php | 79 + .../create_cluster.php | 97 + .../create_instance.php | 107 + .../delete_app_profile.php | 78 + .../delete_cluster.php | 70 + .../delete_instance.php | 70 + .../get_app_profile.php | 76 + .../get_cluster.php | 72 + .../get_iam_policy.php | 72 + .../get_instance.php | 72 + .../list_app_profiles.php | 80 + .../list_clusters.php | 75 + .../list_hot_tablets.php | 79 + .../list_instances.php | 72 + .../partial_update_cluster.php | 85 + .../partial_update_instance.php | 90 + .../set_iam_policy.php | 74 + .../test_iam_permissions.php | 78 + .../update_app_profile.php | 74 + .../update_cluster.php | 90 + .../update_instance.php | 83 + .../check_consistency.php | 78 + .../BigtableTableAdminClient/copy_backup.php | 115 + .../create_authorized_view.php | 93 + .../create_backup.php | 113 + .../BigtableTableAdminClient/create_table.php | 81 + .../create_table_from_snapshot.php | 110 + .../delete_authorized_view.php | 76 + .../delete_backup.php | 76 + .../delete_snapshot.php | 82 + .../BigtableTableAdminClient/delete_table.php | 71 + .../drop_row_range.php | 73 + .../generate_consistency_token.php | 76 + .../get_authorized_view.php | 78 + .../BigtableTableAdminClient/get_backup.php | 78 + .../get_iam_policy.php | 73 + .../BigtableTableAdminClient/get_snapshot.php | 84 + .../V2/BigtableTableAdminClient/get_table.php | 73 + .../list_authorized_views.php | 78 + .../BigtableTableAdminClient/list_backups.php | 80 + .../list_snapshots.php | 86 + .../BigtableTableAdminClient/list_tables.php | 77 + .../modify_column_families.php | 79 + .../restore_table.php | 96 + .../set_iam_policy.php | 74 + .../snapshot_table.php | 107 + .../test_iam_permissions.php | 79 + .../undelete_table.php | 85 + .../update_authorized_view.php | 71 + .../update_backup.php | 80 + .../BigtableTableAdminClient/update_table.php | 74 + .../V2/Client/BigtableInstanceAdminClient.php | 1020 ++++ .../V2/Client/BigtableTableAdminClient.php | 1339 +++++ .../v2/Admin/src/V2/gapic_metadata.json | 282 + ...bigtable_instance_admin_client_config.json | 131 + ...table_instance_admin_descriptor_config.php | 349 ++ ...able_instance_admin_rest_client_config.php | 338 ++ .../bigtable_table_admin_client_config.json | 176 + ...bigtable_table_admin_descriptor_config.php | 495 ++ ...igtable_table_admin_rest_client_config.php | 459 ++ .../BigtableInstanceAdminClientTest.php | 2070 ++++++++ .../Client/BigtableTableAdminClientTest.php | 2806 ++++++++++ .../Google/Bigtable/V2/Bigtable.php | Bin 0 -> 12271 bytes .../GPBMetadata/Google/Bigtable/V2/Data.php | Bin 0 -> 5521 bytes .../Google/Bigtable/V2/FeatureFlags.php | 39 + .../Google/Bigtable/V2/RequestStats.php | Bin 0 -> 1345 bytes .../Google/Bigtable/V2/ResponseParams.php | Bin 0 -> 904 bytes .../GPBMetadata/Google/Bigtable/V2/Types.php | Bin 0 -> 2982 bytes .../Google/Cloud/Bigtable/V2/ArrayValue.php | 67 + .../src/Google/Cloud/Bigtable/V2/Cell.php | 163 + .../Bigtable/V2/CheckAndMutateRowRequest.php | 436 ++ .../Bigtable/V2/CheckAndMutateRowResponse.php | 71 + .../src/Google/Cloud/Bigtable/V2/Column.php | 118 + .../Cloud/Bigtable/V2/ColumnMetadata.php | 111 + .../Google/Cloud/Bigtable/V2/ColumnRange.php | 220 + .../Cloud/Bigtable/V2/ExecuteQueryRequest.php | 383 ++ .../Bigtable/V2/ExecuteQueryResponse.php | 117 + .../src/Google/Cloud/Bigtable/V2/Family.php | 122 + .../Google/Cloud/Bigtable/V2/FeatureFlags.php | 378 ++ .../Cloud/Bigtable/V2/FullReadStatsView.php | 137 + ...teInitialChangeStreamPartitionsRequest.php | 160 + ...eInitialChangeStreamPartitionsResponse.php | 78 + .../Cloud/Bigtable/V2/MutateRowRequest.php | 290 ++ .../Cloud/Bigtable/V2/MutateRowResponse.php | 33 + .../Cloud/Bigtable/V2/MutateRowsRequest.php | 264 + .../Bigtable/V2/MutateRowsRequest/Entry.php | 112 + .../Cloud/Bigtable/V2/MutateRowsResponse.php | 119 + .../Bigtable/V2/MutateRowsResponse/Entry.php | 130 + .../src/Google/Cloud/Bigtable/V2/Mutation.php | 240 + .../Cloud/Bigtable/V2/Mutation/AddToCell.php | 222 + .../Bigtable/V2/Mutation/DeleteFromColumn.php | 157 + .../Bigtable/V2/Mutation/DeleteFromFamily.php | 74 + .../Bigtable/V2/Mutation/DeleteFromRow.php | 36 + .../Bigtable/V2/Mutation/MergeToCell.php | 227 + .../Cloud/Bigtable/V2/Mutation/SetCell.php | 196 + .../Cloud/Bigtable/V2/PartialResultSet.php | 225 + .../Cloud/Bigtable/V2/PingAndWarmRequest.php | 148 + .../Cloud/Bigtable/V2/PingAndWarmResponse.php | 33 + .../Google/Cloud/Bigtable/V2/ProtoFormat.php | 34 + .../Google/Cloud/Bigtable/V2/ProtoRows.php | 78 + .../Cloud/Bigtable/V2/ProtoRowsBatch.php | 71 + .../Google/Cloud/Bigtable/V2/ProtoSchema.php | 67 + .../Cloud/Bigtable/V2/RateLimitInfo.php | 159 + .../Bigtable/V2/ReadChangeStreamRequest.php | 412 ++ .../Bigtable/V2/ReadChangeStreamResponse.php | 142 + .../ReadChangeStreamResponse/CloseStream.php | 179 + .../ReadChangeStreamResponse/DataChange.php | 439 ++ .../DataChange/Type.php | 72 + .../V2/ReadChangeStreamResponse/Heartbeat.php | 149 + .../MutationChunk.php | 136 + .../MutationChunk/ChunkInfo.php | 144 + .../Cloud/Bigtable/V2/ReadIterationStats.php | 179 + .../Bigtable/V2/ReadModifyWriteRowRequest.php | 296 ++ .../V2/ReadModifyWriteRowResponse.php | 77 + .../Cloud/Bigtable/V2/ReadModifyWriteRule.php | 204 + .../Cloud/Bigtable/V2/ReadRowsRequest.php | 426 ++ .../V2/ReadRowsRequest/RequestStatsView.php | 67 + .../Cloud/Bigtable/V2/ReadRowsResponse.php | 233 + .../V2/ReadRowsResponse/CellChunk.php | 560 ++ .../Cloud/Bigtable/V2/RequestLatencyStats.php | 135 + .../Google/Cloud/Bigtable/V2/RequestStats.php | 81 + .../Cloud/Bigtable/V2/ResponseParams.php | 128 + .../Cloud/Bigtable/V2/ResultSetMetadata.php | 75 + .../src/Google/Cloud/Bigtable/V2/Row.php | 114 + .../Google/Cloud/Bigtable/V2/RowFilter.php | 990 ++++ .../Cloud/Bigtable/V2/RowFilter/Chain.php | 78 + .../Cloud/Bigtable/V2/RowFilter/Condition.php | 189 + .../Bigtable/V2/RowFilter/Interleave.php | 159 + .../src/Google/Cloud/Bigtable/V2/RowRange.php | 183 + .../src/Google/Cloud/Bigtable/V2/RowSet.php | 101 + .../Bigtable/V2/SampleRowKeysRequest.php | 196 + .../Bigtable/V2/SampleRowKeysResponse.php | 137 + .../Bigtable/V2/StreamContinuationToken.php | 113 + .../Bigtable/V2/StreamContinuationTokens.php | 69 + .../Cloud/Bigtable/V2/StreamPartition.php | 82 + .../Cloud/Bigtable/V2/TimestampRange.php | 101 + .../src/Google/Cloud/Bigtable/V2/Type.php | 458 ++ .../Cloud/Bigtable/V2/Type/Aggregate.php | 284 + .../HyperLogLogPlusPlusUniqueCount.php | 42 + .../Cloud/Bigtable/V2/Type/Aggregate/Max.php | 38 + .../Cloud/Bigtable/V2/Type/Aggregate/Min.php | 38 + .../Cloud/Bigtable/V2/Type/Aggregate/Sum.php | 38 + .../Google/Cloud/Bigtable/V2/Type/Bytes.php | 81 + .../Cloud/Bigtable/V2/Type/Bytes/Encoding.php | 78 + .../Bigtable/V2/Type/Bytes/Encoding/Raw.php | 39 + .../Google/Cloud/Bigtable/V2/Type/Date.php | 37 + .../Google/Cloud/Bigtable/V2/Type/Float32.php | 37 + .../Google/Cloud/Bigtable/V2/Type/Float64.php | 37 + .../Google/Cloud/Bigtable/V2/Type/Int64.php | 81 + .../Cloud/Bigtable/V2/Type/Int64/Encoding.php | 78 + .../V2/Type/Int64/Encoding/BigEndianBytes.php | 87 + .../src/Google/Cloud/Bigtable/V2/Type/Map.php | 134 + .../Google/Cloud/Bigtable/V2/Type/PBArray.php | 81 + .../Google/Cloud/Bigtable/V2/Type/PBBool.php | 37 + .../Cloud/Bigtable/V2/Type/PBString.php | 81 + .../Bigtable/V2/Type/PBString/Encoding.php | 116 + .../V2/Type/PBString/Encoding/Utf8Bytes.php | 42 + .../V2/Type/PBString/Encoding/Utf8Raw.php | 37 + .../Google/Cloud/Bigtable/V2/Type/Struct.php | 73 + .../Cloud/Bigtable/V2/Type/Struct/Field.php | 118 + .../Cloud/Bigtable/V2/Type/Timestamp.php | 37 + .../src/Google/Cloud/Bigtable/V2/Value.php | 477 ++ .../Google/Cloud/Bigtable/V2/ValueRange.php | 183 + .../BigtableClient/check_and_mutate_row.php | 79 + .../V2/BigtableClient/execute_query.php | 83 + ...erate_initial_change_stream_partitions.php | 82 + .../samples/V2/BigtableClient/mutate_row.php | 82 + .../samples/V2/BigtableClient/mutate_rows.php | 89 + .../V2/BigtableClient/ping_and_warm.php | 74 + .../V2/BigtableClient/read_change_stream.php | 82 + .../BigtableClient/read_modify_write_row.php | 86 + .../samples/V2/BigtableClient/read_rows.php | 83 + .../V2/BigtableClient/sample_row_keys.php | 82 + .../v2/src/V2/Client/BigtableClient.php | 559 ++ .../Bigtable/v2/src/V2/gapic_metadata.json | 68 + .../V2/resources/bigtable_client_config.json | 64 + .../resources/bigtable_descriptor_config.php | 297 ++ .../resources/bigtable_rest_client_config.php | 219 + .../Unit/V2/Client/BigtableClientTest.php | 881 ++++ .../Google/Cloud/Billing/V1/CloudBilling.php | Bin 0 -> 5856 bytes .../Google/Cloud/Billing/V1/CloudCatalog.php | Bin 0 -> 4008 bytes .../Cloud/Billing/V1/AggregationInfo.php | 129 + .../AggregationInfo/AggregationInterval.php | 60 + .../V1/AggregationInfo/AggregationLevel.php | 60 + .../Cloud/Billing/V1/BillingAccount.php | 277 + .../src/Google/Cloud/Billing/V1/Category.php | 181 + .../V1/CreateBillingAccountRequest.php | 172 + .../Google/Cloud/Billing/V1/GeoTaxonomy.php | 105 + .../Cloud/Billing/V1/GeoTaxonomy/Type.php | 77 + .../Billing/V1/GetBillingAccountRequest.php | 86 + .../V1/GetProjectBillingInfoRequest.php | 86 + .../Billing/V1/ListBillingAccountsRequest.php | 243 + .../V1/ListBillingAccountsResponse.php | 109 + .../V1/ListProjectBillingInfoRequest.php | 171 + .../V1/ListProjectBillingInfoResponse.php | 113 + .../Cloud/Billing/V1/ListServicesRequest.php | 109 + .../Cloud/Billing/V1/ListServicesResponse.php | 109 + .../Cloud/Billing/V1/ListSkusRequest.php | 332 ++ .../Cloud/Billing/V1/ListSkusResponse.php | 109 + .../Billing/V1/MoveBillingAccountRequest.php | 121 + .../Cloud/Billing/V1/PricingExpression.php | 346 ++ .../Billing/V1/PricingExpression/TierRate.php | 126 + .../Google/Cloud/Billing/V1/PricingInfo.php | 277 + .../Cloud/Billing/V1/ProjectBillingInfo.php | 207 + .../src/Google/Cloud/Billing/V1/Service.php | 181 + .../proto/src/Google/Cloud/Billing/V1/Sku.php | 349 ++ .../V1/UpdateBillingAccountRequest.php | 180 + .../V1/UpdateProjectBillingInfoRequest.php | 146 + .../create_billing_account.php | 73 + .../get_billing_account.php | 74 + .../V1/CloudBillingClient/get_iam_policy.php | 74 + .../get_project_billing_info.php | 76 + .../list_billing_accounts.php | 64 + .../list_project_billing_info.php | 81 + .../move_billing_account.php | 82 + .../V1/CloudBillingClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 80 + .../update_billing_account.php | 78 + .../update_project_billing_info.php | 103 + .../V1/CloudCatalogClient/list_services.php | 62 + .../V1/CloudCatalogClient/list_skus.php | 77 + .../v1/src/V1/Client/CloudBillingClient.php | 659 +++ .../v1/src/V1/Client/CloudCatalogClient.php | 267 + .../Billing/v1/src/V1/gapic_metadata.json | 92 + .../cloud_billing_client_config.json | 100 + .../cloud_billing_descriptor_config.php | 189 + .../cloud_billing_rest_client_config.php | 190 + .../cloud_catalog_client_config.json | 42 + .../cloud_catalog_descriptor_config.php | 63 + .../cloud_catalog_rest_client_config.php | 44 + .../Unit/V1/Client/CloudBillingClientTest.php | 896 ++++ .../Unit/V1/Client/CloudCatalogClientTest.php | 234 + .../Cloud/Billing/Budgets/V1/BudgetModel.php | Bin 0 -> 3128 bytes .../Billing/Budgets/V1/BudgetService.php | 61 + .../Cloud/Billing/Budgets/V1/Budget.php | 349 ++ .../Cloud/Billing/Budgets/V1/BudgetAmount.php | 132 + .../Billing/Budgets/V1/CalendarPeriod.php | 74 + .../Budgets/V1/CreateBudgetRequest.php | 132 + .../Cloud/Billing/Budgets/V1/CustomPeriod.php | 129 + .../Budgets/V1/DeleteBudgetRequest.php | 86 + .../Cloud/Billing/Budgets/V1/Filter.php | 496 ++ .../V1/Filter/CreditTypesTreatment.php | 78 + .../Billing/Budgets/V1/GetBudgetRequest.php | 86 + .../Billing/Budgets/V1/LastPeriodAmount.php | 39 + .../Billing/Budgets/V1/ListBudgetsRequest.php | 220 + .../Budgets/V1/ListBudgetsResponse.php | 105 + .../Billing/Budgets/V1/NotificationsRule.php | 416 ++ .../Billing/Budgets/V1/ThresholdRule.php | 130 + .../Budgets/V1/ThresholdRule/Basis.php | 69 + .../Budgets/V1/UpdateBudgetRequest.php | 166 + .../V1/BudgetServiceClient/create_budget.php | 79 + .../V1/BudgetServiceClient/delete_budget.php | 70 + .../V1/BudgetServiceClient/get_budget.php | 77 + .../V1/BudgetServiceClient/list_budgets.php | 82 + .../V1/BudgetServiceClient/update_budget.php | 66 + .../v1/src/V1/Client/BudgetServiceClient.php | 382 ++ .../v1/src/V1/gapic_metadata.json | 43 + .../budget_service_client_config.json | 70 + .../budget_service_descriptor_config.php | 101 + .../budget_service_rest_client_config.php | 87 + .../V1/Client/BudgetServiceClientTest.php | 459 ++ .../Binaryauthorization/V1/Resources.php | Bin 0 -> 4629 bytes .../Cloud/Binaryauthorization/V1/Service.php | Bin 0 -> 5005 bytes .../BinaryAuthorization/V1/AdmissionRule.php | 164 + .../V1/AdmissionRule/EnforcementMode.php | 66 + .../V1/AdmissionRule/EvaluationMode.php | 71 + .../V1/AdmissionWhitelistPattern.php | 80 + .../Cloud/BinaryAuthorization/V1/Attestor.php | 200 + .../V1/AttestorPublicKey.php | 234 + .../V1/CreateAttestorRequest.php | 173 + .../V1/DeleteAttestorRequest.php | 86 + .../V1/GetAttestorRequest.php | 86 + .../V1/GetPolicyRequest.php | 86 + .../V1/GetSystemPolicyRequest.php | 86 + .../V1/ListAttestorsRequest.php | 166 + .../V1/ListAttestorsResponse.php | 109 + .../BinaryAuthorization/V1/PkixPublicKey.php | 124 + .../V1/PkixPublicKey/SignatureAlgorithm.php | 153 + .../Cloud/BinaryAuthorization/V1/Policy.php | 469 ++ .../V1/Policy/GlobalPolicyEvaluationMode.php | 62 + .../V1/UpdateAttestorRequest.php | 100 + .../V1/UpdatePolicyRequest.php | 100 + .../V1/UserOwnedGrafeasNote.php | 208 + .../ValidateAttestationOccurrenceRequest.php | 208 + .../ValidateAttestationOccurrenceResponse.php | 102 + .../Result.php | 64 + .../create_attestor.php | 86 + .../delete_attestor.php | 71 + .../get_attestor.php | 73 + .../get_policy.php | 78 + .../list_attestors.php | 78 + .../update_attestor.php | 74 + .../update_policy.php | 89 + .../get_system_policy.php | 72 + .../validate_attestation_occurrence.php | 87 + .../BinauthzManagementServiceV1Client.php | 499 ++ .../v1/src/V1/Client/SystemPolicyV1Client.php | 267 + .../V1/Client/ValidationHelperV1Client.php | 191 + .../v1/src/V1/gapic_metadata.json | 81 + ...z_management_service_v1_client_config.json | 80 + ...anagement_service_v1_descriptor_config.php | 129 + ...nagement_service_v1_rest_client_config.php | 171 + .../system_policy_v1_client_config.json | 27 + .../system_policy_v1_descriptor_config.php | 45 + .../system_policy_v1_rest_client_config.php | 97 + .../validation_helper_v1_client_config.json | 27 + ...validation_helper_v1_descriptor_config.php | 40 + ...alidation_helper_v1_rest_client_config.php | 98 + .../BinauthzManagementServiceV1ClientTest.php | 610 +++ .../V1/Client/SystemPolicyV1ClientTest.php | 159 + .../Client/ValidationHelperV1ClientTest.php | 186 + .../V1/CertificateIssuanceConfig.php | Bin 0 -> 3473 bytes .../V1/CertificateManager.php | Bin 0 -> 18077 bytes .../Certificatemanager/V1/TrustConfig.php | Bin 0 -> 2925 bytes .../CertificateManager/V1/Certificate.php | 460 ++ .../V1/Certificate/ManagedCertificate.php | 296 ++ .../AuthorizationAttemptInfo.php | 185 + .../FailureReason.php | 74 + .../AuthorizationAttemptInfo/State.php | 74 + .../ManagedCertificate/ProvisioningIssue.php | 112 + .../ProvisioningIssue/Reason.php | 68 + .../Certificate/ManagedCertificate/State.php | 77 + .../V1/Certificate/Scope.php | 72 + .../V1/Certificate/SelfManagedCertificate.php | 110 + .../V1/CertificateIssuanceConfig.php | 399 ++ .../CertificateAuthorityConfig.php | 79 + .../CertificateAuthorityServiceConfig.php | 78 + .../KeyAlgorithm.php | 64 + .../CertificateManager/V1/CertificateMap.php | 273 + .../V1/CertificateMap/GclbTarget.php | 161 + .../V1/CertificateMap/GclbTarget/IpConfig.php | 104 + .../V1/CertificateMapEntry.php | 388 ++ .../V1/CertificateMapEntry/Matcher.php | 59 + ...CreateCertificateIssuanceConfigRequest.php | 168 + .../V1/CreateCertificateMapEntryRequest.php | 168 + .../V1/CreateCertificateMapRequest.php | 168 + .../V1/CreateCertificateRequest.php | 168 + .../V1/CreateDnsAuthorizationRequest.php | 168 + .../V1/CreateTrustConfigRequest.php | 173 + ...DeleteCertificateIssuanceConfigRequest.php | 86 + .../V1/DeleteCertificateMapEntryRequest.php | 86 + .../V1/DeleteCertificateMapRequest.php | 86 + .../V1/DeleteCertificateRequest.php | 86 + .../V1/DeleteDnsAuthorizationRequest.php | 86 + .../V1/DeleteTrustConfigRequest.php | 128 + .../V1/DnsAuthorization.php | 368 ++ .../V1/DnsAuthorization/DnsResourceRecord.php | 148 + .../V1/DnsAuthorization/Type.php | 66 + .../GetCertificateIssuanceConfigRequest.php | 86 + .../V1/GetCertificateMapEntryRequest.php | 86 + .../V1/GetCertificateMapRequest.php | 86 + .../V1/GetCertificateRequest.php | 86 + .../V1/GetDnsAuthorizationRequest.php | 86 + .../V1/GetTrustConfigRequest.php | 86 + .../ListCertificateIssuanceConfigsRequest.php | 242 + ...ListCertificateIssuanceConfigsResponse.php | 143 + .../V1/ListCertificateMapEntriesRequest.php | 259 + .../V1/ListCertificateMapEntriesResponse.php | 143 + .../V1/ListCertificateMapsRequest.php | 238 + .../V1/ListCertificateMapsResponse.php | 143 + .../V1/ListCertificatesRequest.php | 238 + .../V1/ListCertificatesResponse.php | 143 + .../V1/ListDnsAuthorizationsRequest.php | 238 + .../V1/ListDnsAuthorizationsResponse.php | 143 + .../V1/ListTrustConfigsRequest.php | 238 + .../V1/ListTrustConfigsResponse.php | 143 + .../V1/OperationMetadata.php | 307 ++ .../CertificateManager/V1/ServingState.php | 61 + .../CertificateManager/V1/TrustConfig.php | 319 ++ .../V1/TrustConfig/IntermediateCA.php | 84 + .../V1/TrustConfig/TrustAnchor.php | 81 + .../V1/TrustConfig/TrustStore.php | 120 + .../V1/UpdateCertificateMapEntryRequest.php | 146 + .../V1/UpdateCertificateMapRequest.php | 146 + .../V1/UpdateCertificateRequest.php | 146 + .../V1/UpdateDnsAuthorizationRequest.php | 146 + .../V1/UpdateTrustConfigRequest.php | 146 + .../create_certificate.php | 89 + .../create_certificate_issuance_config.php | 113 + .../create_certificate_map.php | 89 + .../create_certificate_map_entry.php | 95 + .../create_dns_authorization.php | 98 + .../create_trust_config.php | 90 + .../delete_certificate.php | 85 + .../delete_certificate_issuance_config.php | 85 + .../delete_certificate_map.php | 87 + .../delete_certificate_map_entry.php | 86 + .../delete_dns_authorization.php | 85 + .../delete_trust_config.php | 85 + .../get_certificate.php | 76 + .../get_certificate_issuance_config.php | 76 + .../get_certificate_map.php | 76 + .../get_certificate_map_entry.php | 77 + .../get_dns_authorization.php | 76 + .../CertificateManagerClient/get_location.php | 57 + .../get_trust_config.php | 76 + .../list_certificate_issuance_configs.php | 77 + .../list_certificate_map_entries.php | 82 + .../list_certificate_maps.php | 77 + .../list_certificates.php | 77 + .../list_dns_authorizations.php | 77 + .../list_locations.php | 62 + .../list_trust_configs.php | 77 + .../update_certificate.php | 74 + .../update_certificate_map.php | 74 + .../update_certificate_map_entry.php | 74 + .../update_dns_authorization.php | 90 + .../update_trust_config.php | 74 + .../V1/Client/CertificateManagerClient.php | 1325 +++++ .../v1/src/V1/gapic_metadata.json | 173 + .../certificate_manager_client_config.json | 189 + .../certificate_manager_descriptor_config.php | 592 +++ ...certificate_manager_rest_client_config.php | 468 ++ .../Client/CertificateManagerClientTest.php | 3399 ++++++++++++ 1459 files changed, 236841 insertions(+) create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Baremetalsolution.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Common.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Instance.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Lun.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Network.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/NfsShare.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Osimage.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Provisioning.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/SshKey.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Volume.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/VolumeSnapshot.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateNfsShareRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateProvisioningConfigRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateSSHKeyRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateVolumeSnapshotRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteNfsShareRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteSSHKeyRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteVolumeSnapshotRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DetachLunRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictLunRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictVolumeRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetInstanceRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetLunRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNetworkRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNfsShareRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetProvisioningConfigRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeSnapshotRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance/State.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkAddress.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkConfig.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceQuota.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface/LogicalNetworkInterface.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/MultiprotocolType.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/State.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/StorageType.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/State.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/Type.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkAddressReservation.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Bandwidth.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/IntakeVlanAttachment.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/ServiceCidr.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Type.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkMountPoint.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkUsage.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/AllowedClient.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/MountPermissions.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/State.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/StorageType.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OSImage.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OperationMetadata.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig/State.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota/AssetType.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameInstanceRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNetworkRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNfsShareRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameVolumeRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResizeVolumeRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RestoreVolumeSnapshotRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SSHKey.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface/InterfaceType.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigResponse.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateInstanceRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNetworkRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNfsShareRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateProvisioningConfigRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateVolumeRequest.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/QosPolicy.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/State.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/VlanAttachment.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/Protocol.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotAutoDeleteBehavior.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotReservationDetail.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/State.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/StorageType.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/WorkloadProfile.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/LunRange.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport/Permissions.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Protocol.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Type.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumePerformanceTier.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot/SnapshotType.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/WorkloadProfile.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_nfs_share.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_provisioning_config.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_ssh_key.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_volume_snapshot.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_nfs_share.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_ssh_key.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/detach_lun.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_lun.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_volume.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_instance.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_location.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_lun.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_network.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_nfs_share.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_provisioning_config.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume_snapshot.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_instances.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_locations.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_luns.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_network_usage.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_networks.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_nfs_shares.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_os_images.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_ssh_keys.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volume_snapshots.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volumes.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_instance.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_network.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_nfs_share.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_volume.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/reset_instance.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/resize_volume.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/start_instance.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/stop_instance.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/submit_provisioning_config.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_instance.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_network.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_nfs_share.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_provisioning_config.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_volume.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/Client/BareMetalSolutionClient.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_client_config.json create mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_descriptor_config.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_rest_client_config.php create mode 100644 owl-bot-staging/BareMetalSolution/v2/tests/Unit/V2/Client/BareMetalSolutionClientTest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php create mode 100644 owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php create mode 100644 owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json create mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php create mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php create mode 100644 owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnections/V1/AppConnectionsService.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/ApplicationEndpoint.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway/Type.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/State.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Type.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnectionOperationMetadata.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/CreateAppConnectionRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/DeleteAppConnectionRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/GetAppConnectionRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsResponse.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse/AppConnectionDetails.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/UpdateAppConnectionRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/create_app_connection.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/delete_app_connection.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_app_connection.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_location.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_app_connections.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_locations.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/resolve_app_connections.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/update_app_connection.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/Client/AppConnectionsServiceClient.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_client_config.json create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_descriptor_config.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_rest_client_config.php create mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/tests/Unit/V1/Client/AppConnectionsServiceClientTest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorInstanceConfig.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorsService.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/ResourceInfo.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo/ServiceAccount.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/State.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorInstanceConfig.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorOperationMetadata.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/CreateAppConnectorRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/DeleteAppConnectorRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/GetAppConnectorRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/HealthStatus.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ImageConfig.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsResponse.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig/CloudPubSubNotificationConfig.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ReportStatusRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ResourceInfo.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/UpdateAppConnectorRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/create_app_connector.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/delete_app_connector.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_app_connector.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_location.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_app_connectors.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_locations.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/report_status.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/update_app_connector.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/Client/AppConnectorsServiceClient.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_client_config.json create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_descriptor_config.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_rest_client_config.php create mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/tests/Unit/V1/Client/AppConnectorsServiceClientTest.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appgateways/V1/AppGatewaysService.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/AllocatedConnection.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/HostType.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/State.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/Type.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGatewayOperationMetadata.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/CreateAppGatewayRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/DeleteAppGatewayRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/GetAppGatewayRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysRequest.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysResponse.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/create_app_gateway.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/delete_app_gateway.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_app_gateway.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_location.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_app_gateways.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_locations.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/Client/AppGatewaysServiceClient.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_client_config.json create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_descriptor_config.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_rest_client_config.php create mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/tests/Unit/V1/Client/AppGatewaysServiceClientTest.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientconnectorservices/V1/ClientConnectorServicesService.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress/PeeredVpc.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/DestinationRoute.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/TransportProtocol.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/State.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorServiceOperationMetadata.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/CreateClientConnectorServiceRequest.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/DeleteClientConnectorServiceRequest.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/GetClientConnectorServiceRequest.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesRequest.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesResponse.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/UpdateClientConnectorServiceRequest.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_location.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_locations.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/Client/ClientConnectorServicesServiceClient.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_client_config.json create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_descriptor_config.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_rest_client_config.php create mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/tests/Unit/V1/Client/ClientConnectorServicesServiceClientTest.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientgateways/V1/ClientGatewaysService.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway/State.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGatewayOperationMetadata.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/CreateClientGatewayRequest.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/DeleteClientGatewayRequest.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/GetClientGatewayRequest.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysRequest.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysResponse.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/create_client_gateway.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_client_gateway.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_location.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_client_gateways.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_locations.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/Client/ClientGatewaysServiceClient.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_client_config.json create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_descriptor_config.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_rest_client_config.php create mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/tests/Unit/V1/Client/ClientGatewaysServiceClientTest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Analyticshub/V1/Analyticshub.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateDataExchangeRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateListingRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataExchange.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataProvider.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteDataExchangeRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteListingRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteSubscriptionRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDataset.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDatasetReference.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DiscoveryType.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetDataExchangeRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetListingRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetSubscriptionRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesResponse.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsResponse.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesResponse.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsResponse.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsResponse.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/RestrictedExportPolicy.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/SelectedResource.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/Category.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/RestrictedExportConfig.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/State.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/OperationMetadata.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Publisher.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionResponse.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionResponse.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DcrExchangeConfig.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DefaultExchangeConfig.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeResponse.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingResponse.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/LinkedResource.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/State.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateDataExchangeRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateListingRequest.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_data_exchange.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_listing.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_listing.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_subscription.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_data_exchange.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_listing.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_subscription.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_listings.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_subscriptions.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/refresh_subscription.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/revoke_subscription.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_listing.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_data_exchange.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_listing.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/Client/AnalyticsHubServiceClient.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_client_config.json create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/tests/Unit/V1/Client/AnalyticsHubServiceClientTest.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Connection/V1/Connection.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsAccessRole.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsCrossAccountRole.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsProperties.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AzureProperties.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudResourceProperties.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSpannerProperties.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlCredential.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties/DatabaseType.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/Connection.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CreateConnectionRequest.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/DeleteConnectionRequest.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/GetConnectionRequest.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsRequest.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsResponse.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/MetastoreServiceConfig.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SalesforceDataCloudProperties.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkHistoryServerConfig.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkProperties.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/UpdateConnectionRequest.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/create_connection.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/delete_connection.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_connection.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/list_connections.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/update_connection.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/Client/ConnectionServiceClient.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_client_config.json create mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryConnection/v1/tests/Unit/V1/Client/ConnectionServiceClientTest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Dataexchange/V1Beta1/Dataexchange.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateDataExchangeRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateListingRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataExchange.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataProvider.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteDataExchangeRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteListingRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDataset.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDatasetReference.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetDataExchangeRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetListingRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesResponse.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsResponse.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesResponse.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/BigQueryDatasetSource.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/Category.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/State.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Publisher.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingResponse.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateDataExchangeRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateListingRequest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_listing.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_listing.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_location.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_listings.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_locations.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_listing.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/AnalyticsHubServiceClient.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Client/AnalyticsHubServiceClient.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_client_config.json create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php create mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/Client/AnalyticsHubServiceClientTest.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datapolicies/V1/Datapolicy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/CreateDataPolicyRequest.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy/PredefinedExpression.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy/DataPolicyType.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DeleteDataPolicyRequest.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/GetDataPolicyRequest.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesRequest.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesResponse.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/RenameDataPolicyRequest.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/UpdateDataPolicyRequest.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/create_data_policy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/delete_data_policy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_data_policy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/list_data_policies.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/rename_data_policy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/update_data_policy.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/Client/DataPolicyServiceClient.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_client_config.json create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/tests/Unit/V1/Client/DataPolicyServiceClientTest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Datatransfer.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Transfer.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsResponse.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CreateTransferConfigRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/AuthorizationType.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/DataRefreshType.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter/Type.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferConfigRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferRunRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EmailPreferences.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EncryptionConfiguration.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EnrollDataSourcesRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EventDrivenSchedule.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetDataSourceRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferConfigRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferRunRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesResponse.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsResponse.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsResponse.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest/RunAttempt.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsResponse.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ManualSchedule.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptions.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptionsV2.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsResponse.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest/TimeRange.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsResponse.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TimeBasedSchedule.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferConfig.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage/MessageSeverity.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferRun.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferState.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferType.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UnenrollDataSourcesRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UpdateTransferConfigRequest.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UserInfo.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/check_valid_creds.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/create_transfer_config.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_config.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_run.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/enroll_data_sources.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_data_source.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_location.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_config.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_run.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_data_sources.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_locations.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_configs.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_logs.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_runs.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/schedule_transfer_runs.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/unenroll_data_sources.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/update_transfer_config.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/Client/DataTransferServiceClient.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_client_config.json create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/tests/Unit/V1/Client/DataTransferServiceClientTest.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationEntities.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationErrorDetails.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationMetrics.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationService.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationConfig.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationDetails.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationSuggestion.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationUsability.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/AzureSynapseDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/BigQueryDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/CreateMigrationWorkflowRequest.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DB2Dialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DeleteMigrationWorkflowRequest.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Dialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorDetail.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorLocation.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GcsReportLogMessage.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationSubtaskRequest.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationWorkflowRequest.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GreenplumDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/HiveQLDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksRequest.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksResponse.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsRequest.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsResponse.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Literal.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask/State.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask/State.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTaskResult.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow/State.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MySQLDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey/Type.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingValue.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NetezzaDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMapping.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMappingList.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/OracleDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Point.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PostgresqlDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PrestoDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/RedshiftDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ResourceErrorDetail.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLServerDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLiteDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SnowflakeDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnv.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnvironment.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceSpec.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceTargetMapping.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SparkSQLDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/StartMigrationWorkflowRequest.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TargetSpec.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect/Mode.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeInterval.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeSeries.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationConfigDetails.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationDetails.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord/Severity.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationTaskResult.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TypedValue.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/VerticaDialect.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/create_migration_workflow.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/delete_migration_workflow.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_subtask.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_workflow.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_subtasks.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_workflows.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/start_migration_workflow.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/Client/MigrationServiceClient.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_client_config.json create mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryMigration/v2/tests/Unit/V2/Client/MigrationServiceClientTest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Reservation/V1/Reservation.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/BiReservation.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateAssignmentRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateCapacityCommitmentRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteAssignmentRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteCapacityCommitmentRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Edition.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetBiReservationRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetCapacityCommitmentRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsResponse.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsResponse.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsResponse.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsResponse.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsResponse.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentResponse.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/TableReference.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateAssignmentRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateBiReservationRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateCapacityCommitmentRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateReservationRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_assignment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_capacity_commitment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_assignment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_capacity_commitment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_bi_reservation.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_capacity_commitment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_assignments.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_capacity_commitments.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservations.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/merge_capacity_commitments.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/move_assignment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_all_assignments.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_assignments.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/split_capacity_commitment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_assignment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_bi_reservation.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_capacity_commitment.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_reservation.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json create mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableTableAdmin.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Common.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Instance.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Table.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Types.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny/RowAffinity.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/FamilySubsets.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/ResponseView.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/SubsetView.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/BackupType.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/NodeScalingFactor.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DataBoostReadLocalWrites.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAuthorizedViewRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAuthorizedViewRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StandardReadRemoteWrites.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/AutomatedBackupPolicy.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Max.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Min.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Sum.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding/Raw.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Date.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float32.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float64.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Map.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBArray.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBBool.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Bytes.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Raw.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct/Field.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Timestamp.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_authorized_view.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_authorized_view.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_authorized_view.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_authorized_views.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_authorized_view.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableInstanceAdminClient.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json create mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json create mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php create mode 100644 owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Bigtable.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Data.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/FeatureFlags.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/RequestStats.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/ResponseParams.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Types.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ArrayValue.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Cell.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/AddToCell.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/MergeToCell.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PartialResultSet.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoFormat.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRows.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRowsBatch.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoSchema.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResultSetMetadata.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Max.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Min.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Sum.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding/Raw.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Date.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float32.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float64.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding/BigEndianBytes.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Map.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBArray.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBBool.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Bytes.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Raw.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct/Field.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Timestamp.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Value.php create mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/execute_query.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php create mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php create mode 100644 owl-bot-staging/Bigtable/v2/src/V2/Client/BigtableClient.php create mode 100644 owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json create mode 100644 owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php create mode 100644 owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php create mode 100644 owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/GPBMetadata/Google/Cloud/Billing/V1/CloudBilling.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/GPBMetadata/Google/Cloud/Billing/V1/CloudCatalog.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationInterval.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationLevel.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/BillingAccount.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Category.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/CreateBillingAccountRequest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy/Type.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetBillingAccountRequest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetProjectBillingInfoRequest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsRequest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsResponse.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoRequest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoResponse.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesRequest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesResponse.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusRequest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusResponse.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/MoveBillingAccountRequest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression/TierRate.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingInfo.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ProjectBillingInfo.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Service.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Sku.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateBillingAccountRequest.php create mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateProjectBillingInfoRequest.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/create_billing_account.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_billing_account.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_iam_policy.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_project_billing_info.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_billing_accounts.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_project_billing_info.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/move_billing_account.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/set_iam_policy.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_billing_account.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_project_billing_info.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_services.php create mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_skus.php create mode 100644 owl-bot-staging/Billing/v1/src/V1/Client/CloudBillingClient.php create mode 100644 owl-bot-staging/Billing/v1/src/V1/Client/CloudCatalogClient.php create mode 100644 owl-bot-staging/Billing/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_client_config.json create mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_descriptor_config.php create mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_rest_client_config.php create mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_client_config.json create mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_descriptor_config.php create mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_rest_client_config.php create mode 100644 owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudBillingClientTest.php create mode 100644 owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudCatalogClientTest.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetModel.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetService.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Budget.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/BudgetAmount.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CalendarPeriod.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CreateBudgetRequest.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CustomPeriod.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/DeleteBudgetRequest.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter/CreditTypesTreatment.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/GetBudgetRequest.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/LastPeriodAmount.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsRequest.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsResponse.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/NotificationsRule.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule/Basis.php create mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/UpdateBudgetRequest.php create mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/create_budget.php create mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/delete_budget.php create mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/get_budget.php create mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/list_budgets.php create mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/update_budget.php create mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/Client/BudgetServiceClient.php create mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_client_config.json create mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_descriptor_config.php create mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_rest_client_config.php create mode 100644 owl-bot-staging/BillingBudgets/v1/tests/Unit/V1/Client/BudgetServiceClientTest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Resources.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Service.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EnforcementMode.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EvaluationMode.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionWhitelistPattern.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Attestor.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AttestorPublicKey.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/CreateAttestorRequest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/DeleteAttestorRequest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetAttestorRequest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetPolicyRequest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetSystemPolicyRequest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsRequest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsResponse.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey/SignatureAlgorithm.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy/GlobalPolicyEvaluationMode.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdateAttestorRequest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdatePolicyRequest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UserOwnedGrafeasNote.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceRequest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse/Result.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/create_attestor.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_attestor.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_policy.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/list_attestors.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_attestor.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_policy.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/SystemPolicyV1Client/get_system_policy.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/BinauthzManagementServiceV1Client.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/SystemPolicyV1Client.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/ValidationHelperV1Client.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_client_config.json create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_descriptor_config.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_rest_client_config.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_client_config.json create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_descriptor_config.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_rest_client_config.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_client_config.json create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_descriptor_config.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_rest_client_config.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/BinauthzManagementServiceV1ClientTest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/SystemPolicyV1ClientTest.php create mode 100644 owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/ValidationHelperV1ClientTest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateIssuanceConfig.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateManager.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/TrustConfig.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/FailureReason.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/State.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue/Reason.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/State.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/Scope.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/SelfManagedCertificate.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig/CertificateAuthorityServiceConfig.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/KeyAlgorithm.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget/IpConfig.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry/Matcher.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateIssuanceConfigRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapEntryRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateDnsAuthorizationRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateTrustConfigRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateIssuanceConfigRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapEntryRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteDnsAuthorizationRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteTrustConfigRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/DnsResourceRecord.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/Type.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateIssuanceConfigRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapEntryRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetDnsAuthorizationRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetTrustConfigRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsResponse.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesResponse.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsResponse.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesResponse.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsResponse.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsResponse.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/OperationMetadata.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ServingState.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/IntermediateCA.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustAnchor.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustStore.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapEntryRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateDnsAuthorizationRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateTrustConfigRequest.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_issuance_config.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map_entry.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_dns_authorization.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_trust_config.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map_entry.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_dns_authorization.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_trust_config.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_issuance_config.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map_entry.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_dns_authorization.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_location.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_trust_config.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_map_entries.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_maps.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificates.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_dns_authorizations.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_locations.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_trust_configs.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map_entry.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_dns_authorization.php create mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_trust_config.php create mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/Client/CertificateManagerClient.php create mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_client_config.json create mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_descriptor_config.php create mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_rest_client_config.php create mode 100644 owl-bot-staging/CertificateManager/v1/tests/Unit/V1/Client/CertificateManagerClientTest.php diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Baremetalsolution.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Baremetalsolution.php new file mode 100644 index 000000000000..fa0826e2f624 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Baremetalsolution.php @@ -0,0 +1,113 @@ +internalAddGeneratedFile( + ' +¨U +9google/cloud/baremetalsolution/v2/baremetalsolution.proto!google.cloud.baremetalsolution.v2google/api/client.protogoogle/api/field_behavior.proto0google/cloud/baremetalsolution/v2/instance.proto+google/cloud/baremetalsolution/v2/lun.proto/google/cloud/baremetalsolution/v2/network.proto1google/cloud/baremetalsolution/v2/nfs_share.proto/google/cloud/baremetalsolution/v2/osimage.proto4google/cloud/baremetalsolution/v2/provisioning.proto/google/cloud/baremetalsolution/v2/ssh_key.proto.google/cloud/baremetalsolution/v2/volume.proto7google/cloud/baremetalsolution/v2/volume_snapshot.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"€ +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" +ResetInstanceResponse2ºK +BareMetalSolution + ListInstances7.google.cloud.baremetalsolution.v2.ListInstancesRequest8.google.cloud.baremetalsolution.v2.ListInstancesResponse">ÚAparent‚Óä“/-/v2/{parent=projects/*/locations/*}/instances¯ + GetInstance5.google.cloud.baremetalsolution.v2.GetInstanceRequest+.google.cloud.baremetalsolution.v2.Instance"<ÚAname‚Óä“/-/v2/{name=projects/*/locations/*/instances/*}ê +UpdateInstance8.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.google.longrunning.Operation"ÊA +InstanceOperationMetadataÚAinstance,update_mask‚Óä“B26/v2/{instance.name=projects/*/locations/*/instances/*}:instanceÏ +RenameInstance8.google.cloud.baremetalsolution.v2.RenameInstanceRequest+.google.cloud.baremetalsolution.v2.Instance"VÚAname,new_instance_id‚Óä“9"4/v2/{name=projects/*/locations/*/instances/*}:rename:*Û + ResetInstance7.google.cloud.baremetalsolution.v2.ResetInstanceRequest.google.longrunning.Operation"rÊA* +ResetInstanceResponseOperationMetadataÚAname‚Óä“8"3/v2/{name=projects/*/locations/*/instances/*}:reset:*Û + StartInstance7.google.cloud.baremetalsolution.v2.StartInstanceRequest.google.longrunning.Operation"rÊA* +StartInstanceResponseOperationMetadataÚAname‚Óä“8"3/v2/{name=projects/*/locations/*/instances/*}:start:*× + StopInstance6.google.cloud.baremetalsolution.v2.StopInstanceRequest.google.longrunning.Operation"pÊA) +StopInstanceResponseOperationMetadataÚAname‚Óä“7"2/v2/{name=projects/*/locations/*/instances/*}:stop:*¨ +EnableInteractiveSerialConsoleH.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest.google.longrunning.Operation"œÊA; +&EnableInteractiveSerialConsoleResponseOperationMetadataÚAname‚Óä“Q"L/v2/{name=projects/*/locations/*/instances/*}:enableInteractiveSerialConsole:*¬ +DisableInteractiveSerialConsoleI.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest.google.longrunning.Operation"žÊA< +\'DisableInteractiveSerialConsoleResponseOperationMetadataÚAname‚Óä“R"M/v2/{name=projects/*/locations/*/instances/*}:disableInteractiveSerialConsole:*Ö + DetachLun3.google.cloud.baremetalsolution.v2.DetachLunRequest.google.longrunning.Operation"uÊA +InstanceOperationMetadataÚA instance,lun‚Óä“@";/v2/{instance=projects/*/locations/*/instances/*}:detachLun:*º + ListSSHKeys5.google.cloud.baremetalsolution.v2.ListSSHKeysRequest6.google.cloud.baremetalsolution.v2.ListSSHKeysResponse"<ÚAparent‚Óä“-+/v2/{parent=projects/*/locations/*}/sshKeysË + CreateSSHKey6.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest).google.cloud.baremetalsolution.v2.SSHKey"XÚAparent,ssh_key,ssh_key_id‚Óä“6"+/v2/{parent=projects/*/locations/*}/sshKeys:ssh_keyš + DeleteSSHKey6.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest.google.protobuf.Empty":ÚAname‚Óä“-*+/v2/{name=projects/*/locations/*/sshKeys/*}º + ListVolumes5.google.cloud.baremetalsolution.v2.ListVolumesRequest6.google.cloud.baremetalsolution.v2.ListVolumesResponse"<ÚAparent‚Óä“-+/v2/{parent=projects/*/locations/*}/volumes§ + GetVolume3.google.cloud.baremetalsolution.v2.GetVolumeRequest).google.cloud.baremetalsolution.v2.Volume":ÚAname‚Óä“-+/v2/{name=projects/*/locations/*/volumes/*}Ü + UpdateVolume6.google.cloud.baremetalsolution.v2.UpdateVolumeRequest.google.longrunning.Operation"uÊA +VolumeOperationMetadataÚAvolume,update_mask‚Óä“<22/v2/{volume.name=projects/*/locations/*/volumes/*}:volumeÅ + RenameVolume6.google.cloud.baremetalsolution.v2.RenameVolumeRequest).google.cloud.baremetalsolution.v2.Volume"RÚAname,new_volume_id‚Óä“7"2/v2/{name=projects/*/locations/*/volumes/*}:rename:*Õ + EvictVolume5.google.cloud.baremetalsolution.v2.EvictVolumeRequest.google.longrunning.Operation"pÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“6"1/v2/{name=projects/*/locations/*/volumes/*}:evict:*Ö + ResizeVolume6.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.google.longrunning.Operation"oÊA +VolumeOperationMetadataÚAvolume,size_gib‚Óä“9"4/v2/{volume=projects/*/locations/*/volumes/*}:resize:*¾ + ListNetworks6.google.cloud.baremetalsolution.v2.ListNetworksRequest7.google.cloud.baremetalsolution.v2.ListNetworksResponse"=ÚAparent‚Óä“.,/v2/{parent=projects/*/locations/*}/networksß +ListNetworkUsage:.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest;.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse"RÚAlocation‚Óä“A?/v2/{location=projects/*/locations/*}/networks:listNetworkUsage« + +GetNetwork4.google.cloud.baremetalsolution.v2.GetNetworkRequest*.google.cloud.baremetalsolution.v2.Network";ÚAname‚Óä“.,/v2/{name=projects/*/locations/*/networks/*}ã + UpdateNetwork7.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.google.longrunning.Operation"zÊA +NetworkOperationMetadataÚAnetwork,update_mask‚Óä“?24/v2/{network.name=projects/*/locations/*/networks/*}:networkô +CreateVolumeSnapshot>.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest1.google.cloud.baremetalsolution.v2.VolumeSnapshot"iÚAparent,volume_snapshot‚Óä“J"7/v2/{parent=projects/*/locations/*/volumes/*}/snapshots:volume_snapshot• +RestoreVolumeSnapshot?.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest.google.longrunning.Operation"›ÊA# +VolumeSnapshotOperationMetadataÚAvolume_snapshot‚Óä“]"X/v2/{volume_snapshot=projects/*/locations/*/volumes/*/snapshots/*}:restoreVolumeSnapshot:*¶ +DeleteVolumeSnapshot>.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.google.protobuf.Empty"FÚAname‚Óä“9*7/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}Ë +GetVolumeSnapshot;.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest1.google.cloud.baremetalsolution.v2.VolumeSnapshot"FÚAname‚Óä“97/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}Þ +ListVolumeSnapshots=.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest>.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse"HÚAparent‚Óä“97/v2/{parent=projects/*/locations/*/volumes/*}/snapshots¥ +GetLun0.google.cloud.baremetalsolution.v2.GetLunRequest&.google.cloud.baremetalsolution.v2.Lun"AÚAname‚Óä“42/v2/{name=projects/*/locations/*/volumes/*/luns/*}¸ +ListLuns2.google.cloud.baremetalsolution.v2.ListLunsRequest3.google.cloud.baremetalsolution.v2.ListLunsResponse"CÚAparent‚Óä“42/v2/{parent=projects/*/locations/*/volumes/*}/lunsÖ +EvictLun2.google.cloud.baremetalsolution.v2.EvictLunRequest.google.longrunning.Operation"wÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“="8/v2/{name=projects/*/locations/*/volumes/*/luns/*}:evict:*¯ + GetNfsShare5.google.cloud.baremetalsolution.v2.GetNfsShareRequest+.google.cloud.baremetalsolution.v2.NfsShare"<ÚAname‚Óä“/-/v2/{name=projects/*/locations/*/nfsShares/*} + ListNfsShares7.google.cloud.baremetalsolution.v2.ListNfsSharesRequest8.google.cloud.baremetalsolution.v2.ListNfsSharesResponse">ÚAparent‚Óä“/-/v2/{parent=projects/*/locations/*}/nfsSharesî +UpdateNfsShare8.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.google.longrunning.Operation"‚ÊA +NfsShareOperationMetadataÚAnfs_share,update_mask‚Óä“D27/v2/{nfs_share.name=projects/*/locations/*/nfsShares/*}: nfs_shareÞ +CreateNfsShare8.google.cloud.baremetalsolution.v2.CreateNfsShareRequest.google.longrunning.Operation"sÊA +NfsShareOperationMetadataÚAparent,nfs_share‚Óä“:"-/v2/{parent=projects/*/locations/*}/nfsShares: nfs_shareÏ +RenameNfsShare8.google.cloud.baremetalsolution.v2.RenameNfsShareRequest+.google.cloud.baremetalsolution.v2.NfsShare"VÚAname,new_nfsshare_id‚Óä“9"4/v2/{name=projects/*/locations/*/nfsShares/*}:rename:*Ô +DeleteNfsShare8.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest.google.longrunning.Operation"iÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“/*-/v2/{name=projects/*/locations/*/nfsShares/*}æ +ListProvisioningQuotas@.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequestA.google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse"GÚAparent‚Óä“86/v2/{parent=projects/*/locations/*}/provisioningQuotas‹ +SubmitProvisioningConfigB.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequestC.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse"fÚAparent,provisioning_config‚Óä“C">/v2/{parent=projects/*/locations/*}/provisioningConfigs:submit:*× +GetProvisioningConfig?.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest5.google.cloud.baremetalsolution.v2.ProvisioningConfig"FÚAname‚Óä“97/v2/{name=projects/*/locations/*/provisioningConfigs/*}ˆ +CreateProvisioningConfigB.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest5.google.cloud.baremetalsolution.v2.ProvisioningConfig"qÚAparent,provisioning_config‚Óä“N"7/v2/{parent=projects/*/locations/*}/provisioningConfigs:provisioning_config¢ +UpdateProvisioningConfigB.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest5.google.cloud.baremetalsolution.v2.ProvisioningConfig"ŠÚAprovisioning_config,update_mask‚Óä“b2K/v2/{provisioning_config.name=projects/*/locations/*/provisioningConfigs/*}:provisioning_configÊ + RenameNetwork7.google.cloud.baremetalsolution.v2.RenameNetworkRequest*.google.cloud.baremetalsolution.v2.Network"TÚAname,new_network_id‚Óä“8"3/v2/{name=projects/*/locations/*/networks/*}:rename:*¾ + ListOSImages6.google.cloud.baremetalsolution.v2.ListOSImagesRequest7.google.cloud.baremetalsolution.v2.ListOSImagesResponse"=ÚAparent‚Óä“.,/v2/{parent=projects/*/locations/*}/osImagesTÊA baremetalsolution.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB… +%com.google.cloud.baremetalsolution.v2BBareMetalSolutionProtoPZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpbª!Google.Cloud.BareMetalSolution.V2Ê!Google\\Cloud\\BareMetalSolution\\V2ê$Google::Cloud::BareMetalSolution::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Common.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..d062cb191bef4d3efad9b232c2e6dfe7051fa46d GIT binary patch literal 1191 zcmb7DQESss7`0V=xIQ=v1C=qpy2`qtDRgg{Q_?o=f?E^Pt^)~_+w`Wpc#|7$ZU!p* zL;ETI6kmPw$(y7tb6ExRl8~J5+>>*@^ZsLe6{9^EkcbE@$sA^1L0%Dv1()3C3}$H% z5CJ|9W6Fro0D3kI?J<}=Yg|{O2~UMjbXah{V5H?Up3Yk{EJ#QsW(jAhq&#X}w_A!M z-e*?=ASqP67eubj%-%E)md9pvG=OHIQP)c%Pe6*4+&vvY5SfbTIMdV;k7OQ=>a@LHazR!UU6ZXe!O(Dp>{@-x>}@@&y+*s6fTL5x zRhUYxfnXEH7>%sKP@$@|UG!=b>U6yI_>iIJmt1^d9M4sbfpVz^Xy?*)Kb_e|Z|b;q z-#Rnz$=g9MN{E3uG+nE!guO)DrLU*P(AcVWepk>Nwed^W|KVciS+UCbZaJ0Dqr&i& z`#fwd_ydK)F;$%^#S+hsA9#0LtryMG@@8pSv$D>y(XyY~r2S)s@s{<=`}Y^hQw984 qZ4^|xo^$DXiA>ig?b*}3=STbNMSNTA_nkUytU`_~w*Cg)AoK?lJA#J* literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Instance.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Instance.php new file mode 100644 index 0000000000000000000000000000000000000000..3649273023792f15c534a216d8e06ff9876a65ca GIT binary patch literal 4926 zcmcIoOK;mo5UyUfG;$n;i4(?XQd)5wyGf)*DcXe21Ck}X0vt)OWE(965EQktSW_fR zQc7LJmjVTP=%t7Lh5|+ZNc$fO^qgyNK@Xi>KH|tqBsY#P7O9zUznz`=X0(rpQBUX9u~gs@smND_v)|HGMZh&2{I{sulB%nYDr@R@xUa`T z2iXvGK55(O>k1_)P=_iqTwW1eOlrGm8W@Mig3qi*LxW*ymUV|%x~w&e#8xcTbPTJ8 zrlPn6=7_lEO|`kM z60KbzU3s7ymMFg3)hm!Uxo#2fJSX;g^FcM&j9$;sCnxY0sLlS_;8ck7+_3h~gwqb@ zc8^RB6(kNjpJ%dt3L1fLL&c(TElw0=mnepqP*kImx_P58|Ykl81JKk7#GhlKy z19r@wy)Sc2!cYXV9a?Kr4-eC`_{gIWSUCQPxd!P!5)k*Li@N|(DuaAT2rVZHk-zgX z?mUFmHlOrgM7U2OsaOQnS)x#U7{5v8{5ZOx$RrbF28Cf>eG?Vc^NLL7broiMveH#` zbUQE!AN6U(xDv#uZV^6)?`CuNyn}p88f5%!X6n?@<#in{cM;igy11vds_#iems=WX z^HYc$=QdzUlUqcy`Dr178~yw=>ufU5lI~as+(U?BV%U6~!7NPxgCgS|!Bd!aPu=EI z%zI@5Z&wZ|K$Ocv+{-hYPcVd!CqVGT$&FJM(yWSQY)u0q*~G$DCMkxFEtLc@0~#~e zAq8;*dtOi8Bm4|KHZBDb(`fVO=!3hlZAf{%B!~1&jUMML`+D_d{sDY;vY6d$#yYk$ zSeDs3u?EEQh&DV3t_qxH?5PS8WSl$L)NTGe+xYznHooaPvxZ82xhnt^P)E3q!C&w< z5aBiA%-7>(%*+5#uA;IgA4UWzEP64EA?7wt-M|?6;mJJ zdCb(dsypR+xmqb#Hc}xj3DaBK74{IO55>}Ese!f;ZU*ApwPLf-@9mTK3TYcoa-; z_)_%-ucP!fa2v$&!M4aZeQZwL)7M1p-rxD~%lz$AkV^j;f=ipK9RS-t@|E(f z{}6(?Au6_sp&{H8Nce%Ukq*_W+Y{uVA1uuA^E&y~k&aQI(w^WhLb9);I4WJLi^wao zoJjwKJhqvh`v87S3J~{su&A7l2GxZym&GOBW&zkv;juWEtTW;Hqqz_#>GH{8fd~LC;1?C^H-x*~zH{C3EEo)NLe}%y567 z{|f^={1O}4u~`_IMA-yNi+?t^duD6nP>SkKr;G;f8+&rx!nUPaIDpa)5KkB2-0LRS zVZK~xl(yFMYbB}iWo@{v$01s%R*Klpry)`)ucgA`FQFItpF{t9p4y$XDchrtK6~iC zmWD^Yqr$%-xQS!j_+S<=2Ce|(tmGKA&{uW$=bk$cvRQD?7;(>ojTf(aP9(J1S{?E3 zxA4LSyY9)bpZ=Kw_I7#^q}9D^qs&h3Pv55L-3hTvq1UXMcq{ZGyy!xSBEu5J6JVma nlWR?3XdUDJt>B079rw!R*bNQt8*h+C+|Dpd_YUOl5Q0ac(3sgd?)Y)|sxJyoOQu8PFdgj}2X1 z1XI{<1wKZ9KqjPGA|aRztL||cdbVpBG;%@~a6fFJsjd$wpQcf)?Cg%W6>#jF>?9m@ zeTL)#;bBZ~?@mZac^rEClD7aDO`oheDJuueI%3rASLlU3WPYgYH&NYyyw9~w$5p(y z*EAg_!%A}dGMK-kOyjpdvvJbO{r)sZN2sTrX;dP{ZTNQ;9({n2l+DCgm8w%`RHqJ0 z8=sHy?0{+EIL<_d8()n-Nl{{LH9iR@F)04M2pN=`vJMMEv4s>#?c^$%*X4`?kY@b? zhy`UIvZA)MkjB>sr9JgdRw|;Z9pR&_!BT`;?GAc{47z6&6O_x?lTMh4Ty%k* zY4==OSVV+nB@fFz-{)Oy@4}K?c>=4Gy(IT#$-Q(>?wy3DWW5RtFJ54tbAqe#1FX=O z0SjqY6soX-iz}s#3GAeb>Qs_Rr3}b159@;+9u-ze27~?%D|lUg1iN>JT_1ZEZOA6| z`V`hXX4$NEPft3n>S6t;UN!O`DXXx2*shk%`bjOH5^tw1BY8_JImqHC<5@lL;haa@Mr<@9y=;r$pDuVAggB7qi7 z;2y(bfNJ&lxOFuN_<@2CMAL{KmHnMnu=nK>_n%WwHf^prg#69kQGh9+DAxrMDsG)Y zoj#oC^!>9+Oa^$c}HeW_4xp)j~)gg2KrxaHHNx?VR z?RQhHEF;&JI1^i`Upq-ilc|T(V&KoY0^lscTfmICg5Lg|wLjCFHF+IS<#j-U_l z!R_E65*ky_N`Fmktnr;eUK-xAvhddMCcTwF>AJ+y^%*c-KP&YX7 zNI^BMzE)@}4(Sn3Ft*As=t5=@mWliyv)*6Fp zJ)`_L6i`p%gBlGEp(_G-^l$v1yerf zgjtAF`ic`$WMR4zdsB`H08w2NfgT9U5cdvkB1Z9Bx>(4+*Rs41oNuC-fLOXME1HHj zx?+q$UWQ~(QNzQy6hl2vV1kl~h?7jw{R=4CqH@9vOzj(rDWm06Oic>ns;)U=f_-}c zv3;i_PUDwk@$)gzcN(k0Doh$mn;5Q`L?e^Muf~uIp1;lntET513RmEgOPqaOC9ceD zN->)nkV3cM518nd>57+_l1Jk!LGDq%HijTV24c3QiD{~UM{^TWJ*#hevTY$}U2%qK z`EqP!gp09}m7fpRG8wm2Kwk-Z1W z<3343Y>ym@5$1_YFtM)~eNMCKQuOOc?jgh(gXSR9{Jvh5w>P%x)n~QUT6HD!3DRov z*?O(I(ac1IBuv#CwViUanu+FAnBaW40<&99JUbcgB7Y|1N7al9~>xHmDuh^d8#G$4O&~@SWw>nVhf* z8J5P1=PBxLk5I-=F~&X|)0!Qu0_9LTdlROI=$}Hmt(e+@u6et1w{5%Z;gRg0QAnSZ z6Xqag6XM80QK24+(JI4Ek=op?voP&gee9oht|vS`p3;^3Z_3ekkIOxsGA$SzK>EN>?0V8D(%Ymb#Bo-?_hBQST;64%B)NrXp`@Ld_u<<1y%@%@AyYQ`k5upd&BxPBfwtebt)Ay{{4 zLqnr*FvIfUpyePc6i^>SX0sV{OtP2_UJ{IN`EVZ1{Rk=F zh;0{*7nVN41e_ESeV1rhw_H?BpNe(ln7f&ZAoxp=2*P~f@T1w{D6SvM@<=EzFk>cvEB!ea z<{CI7^-dG$BNJ7)25FNV3`?lSjbq%Z{2GJLu-XS?I)9U>1eB`Nb+8`!VT<1l27R1k zy4D$6Fg6cdgh#w-x0lX1dmX*8#|pSab+ zrTK027KbX87*?q?0#+*FweoL~3-&u<`;0lwAzeC~7moOcL4i?Wq*vmF<3Aj0!GrcB g%j5^Q!^Q9}UyhIM(#TWX_0QO&*-gIf4qyQAKR^>?mH+?% literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/NfsShare.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/NfsShare.php new file mode 100644 index 0000000000000000000000000000000000000000..057823850ae33e14f4a303d78717bd065a07ff25 GIT binary patch literal 3207 zcmbtWO>^2-6fIz5xFoit#4YipGcrlXxM^TQ7j2X{88DbKV*`V*({z~82=OqAg{0_7 zq;AIBPB&e5)kU}6_Fwc@WSyUo>7w^NeVBkVDGeK>r+3f0_q=mI9zC%~Hry8L#3YXD zl7ZMi6WtLJZO3vg%`(KkHyjd2)U2_s8^kGyVznhUTV1hMZFINLlvzIcT88K9mRX#Xisq0ibcA0D938+^$AsFdM#Or%a){dps;l6WP9(}780>5hMu(HF7K;CECA;E?IXRC+~e(Ir0PcJ`_(|GT(9*|ZZ3?h#9QCj&ZDi-55{Ba%b zFRUqH%Qq=-85ZVbSeTSHZw9EUtrwjjT3?Zyp@_LY@rH{-Mx-*vnEV~N-_wu^WhY#N zB_`o)OpN8zmBj1vvTzfwL^4wRHHOKNPK>+ZVsD}zo^0iN4)wC4HvRs9}@KieDl&4rQOyIWaj;6G{ zc@HwvmzIIVDLM1$60XAXL^V9(2QS6Hjpd%fGFLFdU6Z@zZcRCA%I(@-W4}?Wu785L zl4*BZ#|^pBYT`mnxB{uYPOaQ+H0$ee_IA{+`fmyLR;?Y>__w883)bgi-h$5$TSv{V z(ynz58!|(cXHHDP65_L?Rsq>UC2y{M7RZ6x!dZL>oukOtUc@a3M6Ei zq2R-J)#`d&8owz&hn)|LWnbpKOxVTZ^PFfdExrn#&WnbnVNXK^6kmmp=d7J_3tWs! z&Ux+#ggSAVtRc<1^Rc&&nnzw|+_J{1byOu!DxT@&0k6ay7h- zHX9q;u^(iAbJ*;$4WC$-49u7>I5W@H4ZHvFlC?kMTXjA*7x>s*s9;L6f!dIR`MYpj z`a9gy3ubFRT)(rchtu_&_#Gcgk~o$m&4EeMajBo=3jBII8r#0|N7t!I_q|gt-|5ey I=Wq`2FZ(+NS^xk5 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Osimage.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Osimage.php new file mode 100644 index 000000000000..8ca039c2d73d --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Osimage.php @@ -0,0 +1,45 @@ +internalAddGeneratedFile( + ' +ç +/google/cloud/baremetalsolution/v2/osimage.proto!google.cloud.baremetalsolution.v2google/api/resource.proto"† +OSImage +name ( BàA +code (  + description ( ! +applicable_instance_types ( # +supported_network_templates ( :}êAz +(baremetalsolution.googleapis.com/OsImage;projects/{project}/locations/{location}/osImages/{os_image}*osImages2osImage"w +ListOSImagesRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size ( + +page_token ( "n +ListOSImagesResponse= + os_images ( 2*.google.cloud.baremetalsolution.v2.OSImage +next_page_token ( Bû +%com.google.cloud.baremetalsolution.v2B OsImageProtoPZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpbª!Google.Cloud.BareMetalSolution.V2Ê!Google\\Cloud\\BareMetalSolution\\V2ê$Google::Cloud::BareMetalSolution::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Provisioning.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Provisioning.php new file mode 100644 index 0000000000000000000000000000000000000000..6b8be6c35f8ded3b3845cab2ea75cbdb5246d545 GIT binary patch literal 7296 zcmdT}TXWmS6%Hv;A`fMnf^W3!#4zJdl$n~0X}d}2I0O)sEjqE6wMVTYb!GUJT(S;;gLpVeSEdsw<8o9!$uDZ$ZR=*07^%s_3|ii~rry z99c6oS5tKDmw3O2Vh>M6P{91Ry`iDf!-{l4-B8K)`y!V~zrAIdsE>!De>&XSHBmin z$#98nD0;h09M#q=*R&7t(|o>9+(5B(X8V0_TPjZLiQD{)`TX1=ABwI$B$K;~qD|bP zZ9HJ-rUH(GzuF6QSFp79jz;uuksK)_&9w9R@vX)}PFmU^o?Vw-b+WPAC37$^jpYyU z8c{XkJ~!>B%gYL^#FVkGIA>Yg($Gs?WneAdmwCqRPc_dE3f*pC_8kPxc3>!Kw)fyK zci`Sx&?4OAt1=8@nK_JQM!Bu4o?yk&vbJYKjvu z5!od~9I_R`^Pl+pQ-Bg6$Q4k?@q!?XuL~Pk1_DEBStf;CvG~Co0`(hI!WT0qz zYMm)1oC*nbh)_l$sVGh*au1d`$GoyLO)7#b`4U8RQ$-#%jZ}d1z~?xG!}@xD1JrrOJ*f6GQ3fq?_8n zAER`h-fHN`sA5Oylhir72HL13nToKMgJea{xR_Thv zLRBiG*m5#LhowTTRH;^RxF!Is?Gz;X_j>;O(5u4lLvVKIIO|&i=lnm9r(!DiCcY#<5Y;w9=s5ki5Zq`EI|I#~->*TQ4Uyo4k73Qi zXp26^k@o%%h46n0@4`)gL&tNe;Ote;J%lH40Z%%+Eh3Zp#{DySB6XXvAoza1GB)uD z#FMY$Sm<9wXe>Suz1Ud~l>XN$Y))$L(a?02MeNi7!0ZG8?Y^`KQ$iy5=_!@Kgl7s= zObew57a-nOEuRgLt|$nS69`>pGgsieGD2RU5JKZq!l0BA5x#(g&zSNvdT>T0@!T?u z=hG%T)81Q%y$#ArNKSkQ%0Vl8A>kTqdVDH(kiMR4UH6Ew5&iKJ#1XDGB3SNg9Y!cP zoi-pgzT_5ME;O5!mfZU4U>3Is=ZW8%mBwMEff&9F!sK+T-YD!=5X{r_wMy$rz42vo zCI1J+C2~aWRJi1pu6tlS6)f4(SyVCu92eIi!u~2IV8gSTrfcrY^lw7&c2#qxu*wDf z2w2^Om_@DNU`EWGGlD1sHszX6iNSp<{e1}DIq3`@$R5prj9tb-_Mq|j-dP-8K>sz! z3s;^v4keLT`k!l%@cl3doO5{rKp4XTTY(ODF7S8;M2;B@C`Sk=+dZ<0(#2u~<2DU6 zh$Rz?g#isQJPNnlkWh6E2~qak+QZD}OI&UGtQjw9z~m6~GN(x6_0QqFWosiENPY1X zNb%f{BOc8>M3l;g>7@iLt?;r4e@7>Xwlu&;k;fB0f_da%;XRT2?94azY?XqfFW4mm zOQ(4Xi~g9l2)fzVR7J;14NIvWmV*ukf9gYbm)N$-7qc>quBCQ&oFn-uc`38{5)+1% z?bucW64OSYUhkg?orc9cjQHycw~^;X*Wdzqflx$8@s&n14(3bgI-K)lde?j#u6k5c zs@Ha;-I?42^NA*A7S)P;SS{3$y%GTXkE<<-kHh(2y()YM^Yyc*h9K@vJC`6WOH4i< z_-T=q{D~k>_;(aGX0p@Qg6t}6I)-97N2WXWC90gLP=r+mI|{GFQgkr6afU^`FCdC{ zW4#Cl%0%v?C0t@k4n}OYo|=|Yp4{&+7)OLEfIc*2TQU0RaqGeU~g_6oJ0Q(+P?*_Z$|&Ael?i2(;y1CmH_ zJ<}f05(yJ^VzYeuH2OOj3uxi`t=kX{E{kOOY^WG61}g@f$fR~D{YJL_9ERBV;ES+! z5n!w_4mV6L60oXjU7I5e$6rGnuQJda+B>2}7WJmenN^stBTAf-DHDmz`>%xrZX6uv(UyUnaxpU5Ex= zo`Q>5vb5@@dUfUmyqMv??37RduXp%FZKs(G=U=`mjNtYgQ=>_I36*8ZXEagtBK7cL zKsjWI>loL}}KHqKPJYvq@4t!YU`Ki3sxNRD*HkQLWO zDi~nq;GjoQ%rE1x(^4^@DNo5EiYo-tgbfcIya~|Yc{uG3Fv!sKA(8v!)E8*-7DEYP zH_b4#lQ73HtQ8<2@w2Ns*qM<%7huUkRJaZozZniXrrfh>e>X@mC^bd5K7@-4uf}c5 zqcC!*rD!&dxfsSdHKgyq78qE2m#R{wM(g@GtRFO_LoCt}94f@d2D%EDiiKMFiBxXw z&A4&XovB`Vemz;e^4$CeTp3rder(`1CIx3? zSuIQ-b!jd5*$^+aCbA<|*c_)dxV}rKiZZS+zbKQY8kG-N`{e$aT0pE{Q^EqpCCKbS zUuAl`|CfHvU$OV}m~{+KzRL*>r2nN~!y8EBZYAwRGb&lstqk4=PHa0Be;tOOV8ias z>{^`a65*X)^C0wfllSd8URmd_Z_a1>S(enD1N;~2N+h8G literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/SshKey.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/SshKey.php new file mode 100644 index 000000000000..81b8ace59aae --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/SshKey.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' +÷ +/google/cloud/baremetalsolution/v2/ssh_key.proto!google.cloud.baremetalsolution.v2google/api/resource.proto"˜ +SSHKey +name ( BàA + +public_key ( :gêAd +\'baremetalsolution.googleapis.com/SshKey9projects/{project}/locations/{location}/sshKeys/{ssh_key}"v +ListSSHKeysRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size ( + +page_token ( "k +ListSSHKeysResponse; +ssh_keys ( 2).google.cloud.baremetalsolution.v2.SSHKey +next_page_tokenZ ( "ª +CreateSSHKeyRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location? +ssh_key ( 2).google.cloud.baremetalsolution.v2.SSHKeyBàA + +ssh_key_id ( BàA"T +DeleteSSHKeyRequest= +name ( B/àAúA) +\'baremetalsolution.googleapis.com/SshKeyBú +%com.google.cloud.baremetalsolution.v2B SshKeyProtoPZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpbª!Google.Cloud.BareMetalSolution.V2Ê!Google\\Cloud\\BareMetalSolution\\V2ê$Google::Cloud::BareMetalSolution::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Volume.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Volume.php new file mode 100644 index 0000000000000000000000000000000000000000..64c919dabd2da05a0ee93a2b6081ab24d818521c GIT binary patch literal 4056 zcmb_f-E!JS6fR(FbFdSr9>?S3SED;J-9>Ti;mhp7WibJ?GoA-#vBq9Jni1s6}1Pr#-QI zDEfO;bX?oFb=wrXqkf;dqHYfz!=!FT6iW@U-e`+*soGveRnH!|I?am%+a8!StDE+y zm+fjU9a3L2J=+}lhHYgJa@hm?9?}el2C%dt^&Cy7Vx?Jlj_bkXxQAOEcxo@!WzZ)m3RE5@`b_R$lHs%K^UBTHuv zicFzl>2!TV3^1AOnqy-QHpQ`DO_ml+NvCT0)U`CTQ=*>k8jf$fO%%=N2h^V=ldY_8 zgk~9>(HGYPAM^P$PHu|6JEF&}i=s>Yk!wBXelvih$yeu`tVxd1DI3)673iLJVAyUx zKaFY%@*&k04bSqzS|2{9PSG9?ZR_F=Oft&@c&>T-|3bHIU`_ej&^ce1pXP%nMtF8o zuQxfWG8XsxB)Kfr_u-uYnafo*Sq>JXC`N_-v~n@ITM30r7y*bH zJt4^!$TL{*u*$UoRsBPU3Q=6WlKVFF`5z+A1o#;x&~BqLc>;0P2ULi0lrkr zap^B3JZ#!iJ#2DyV048U1dEY-aL0Cyfq~s=9;)YvrMQ>?DShO+)bghQalV7#NM7!M zTKeI1?+V|$1`9*&)pT`(R8 zygl1TS3T+;AcNVK+CxG#Oko~{lDXm~(i4JVFORWG9E$A2orxvxY>%4Mr)oFk3L$~E zuH;IWwNDUtArQB0pL)XeaYQpjfz(Ue-8XHmr($S*q$uGAH}>el z#xlDh0!GLH$TyIruN=c=&SSF+h?mTbnI|9xWRlE;NrSjckT5LlSPa?|ZsL(93SS{X zyqCU!jk7ElkPZ@@mqEVDRzpp49p*LP*YrI+#uYRiBz5JF2;5XYShu{@SuwLtXY&H@ z9!63zau;p|O*7dWdH9J(q+?%mii(ppxP3}!+K!Ah7zM@1XK>?`)EI@aN_^!3B#&2S z5@P%GFyKnE2=N2W90i=1$VVSW(wmSx&Ud##P}+@_RFT#8i>9n@*OjJRtd^^CDfJ1N zgP5X}QW5sCRVt;TX$|5E<3~){lG2vir!^K}zSxqbcC}tXwFJcRN9jc>N^qkj*JQpC zW52eWr9f0wv;xyg)4P=ce)Zwe-HEHro%SB)@(J}jUqaCGBZoC zSgsaYvRd4d>UFsmshTKl~hD5S8JyemxQ^BT$fwbB0|l> z48lsOXukhe(xG$zqoo{Pl@GBUf2O+cWnYJ1M_JR>Id$XO`12?nd2uPAlB4vGkg8BW zfN2Fc7}-2=@n+vh(f88E#l1=Y9syD_yb#qJ!#;vp2M1{EgWyKr;J|lbb?lxOvdE-S zYhegD3M3qM(X*R1>>`{6_>yn$Q;YXZg5d0coPvWezj+hs-(dNKAD&}d9wm903&Qu% z6LuSHT$sMdr*PGxuYC2GZ8mr$$TB2HmP?UL*tLKTAt$j+EN?sbkf0|s`~+qL4|pmr z;{c<-D9NHR4$EgNo{{rNb27T79awJRg*80o$A3I&9D5cm`ZBziR2KzV?Xf^u8JtY$(-R3z6fRw~$O!Y3xs62;E4+`uJ-jYHUK@pE;0))FX5=R&n6}5G zH{Lh{`>fAR|XGI$Ukdq1+7+0f5mKQDn literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/VolumeSnapshot.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/VolumeSnapshot.php new file mode 100644 index 0000000000000000000000000000000000000000..342fa243e15aa9ca3642cbe463c02ee1eb9aa9a6 GIT binary patch literal 2450 zcmcImQE%H+6edYm)YGjk-UC?&;x-gDmB7{l(j=E|vXeBe*qX3pl{Q(59Q!6QIJWV< zt{77!g!UtN;s@};|KL~b4QW4NPaI#{SyHEh7Lk`+9pC$%bH4MPbMMy=gK+?#k{0!7 zXmVTO-;KEAd&+rDImh*c_L*k}Z0vJc_yF+C31xw4QPS$@kMWRga?@xD zIHMlJ8Tv&y~VdPnH#3Vk@_AFZ6CkbY}cQ^2nltYrm*NJ&Tj*JtJ)6g?rqd}P!Isx~?4sKP| z5#=*>V@q{EbsNJuLsCs*RMlLNhlGa_o%c>iNO=@`2O{nmU^-hFOW4x_$2fARYwL7u zo;!Z1s_(LT2XfibCp0bYzdkjiqvv2zxj6}zdlWQ&@xVz*(`ah?$%e{bCD>S0pmY;f zVojF|q)=UxHlgU)<<)qtmtJcn={Bs}sYXy{<)Ya26|7q!#SZMp4$3QNT(51*Y3!MI zc}8mj)q)L%LNiCSpEOtbhVY}HpSRjR7<>7A6G%*z$=K9N61(&*tne2BEx(WFH);nBGi&BoSy62Pj~ z=pVQ1TLtMBtaa&q+wo2Ci5yiM&7=o7H7)KbTw66-@=jL zduYp+({wVSDPeJ{uymTBDO*k}CX`#0FXsJ({t%(irRIFi_4}{2;#=+Bl_RdaD!}$5 zhh1>OGA|EdHNa8m@kCoX)*1a=rOqF~S`f>H;T#mwyCEU-!o>aWsaGz=0;>F4fV)fM zU;$D`rEg#>p=vhG8HQ9s&EC7Rbfgbq)1yD~{#+DEQ(&h=9(IK_HU}=n&`KDZ4R;&V zrJVk+h4=#rsEdYN?&iN&q79oDC=~U$4uf&O6)ORJgaaGL!6nRe@(#s>y0%*NUyAS< z&X9kuxPE()#ZG){b_&nC$$UwtTs)3Oe!j~U>~DNNpj1_0scH^PRnKaJRWYBx+?(B6pC>o> S+(m!sB`google.cloud.baremetalsolution.v2.CreateNfsShareRequest + */ +class CreateNfsShareRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent project and location. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The NfsShare to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $nfs_share = null; + + /** + * @param string $parent Required. The parent project and location. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BareMetalSolution\V2\NfsShare $nfsShare Required. The NfsShare to create. + * + * @return \Google\Cloud\BareMetalSolution\V2\CreateNfsShareRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\NfsShare $nfsShare): self + { + return (new self()) + ->setParent($parent) + ->setNfsShare($nfsShare); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent project and location. + * @type \Google\Cloud\BareMetalSolution\V2\NfsShare $nfs_share + * Required. The NfsShare to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent project and location. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent project and location. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The NfsShare to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\NfsShare|null + */ + public function getNfsShare() + { + return $this->nfs_share; + } + + public function hasNfsShare() + { + return isset($this->nfs_share); + } + + public function clearNfsShare() + { + unset($this->nfs_share); + } + + /** + * Required. The NfsShare to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\NfsShare $var + * @return $this + */ + public function setNfsShare($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\NfsShare::class); + $this->nfs_share = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateProvisioningConfigRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateProvisioningConfigRequest.php new file mode 100644 index 000000000000..af131bba0df5 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateProvisioningConfigRequest.php @@ -0,0 +1,170 @@ +google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest + */ +class CreateProvisioningConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent project and location containing the + * ProvisioningConfig. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ProvisioningConfig to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $provisioning_config = null; + /** + * Optional. Email provided to send a confirmation with provisioning config + * to. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $email = ''; + + /** + * @param string $parent Required. The parent project and location containing the + * ProvisioningConfig. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig Required. The ProvisioningConfig to create. + * + * @return \Google\Cloud\BareMetalSolution\V2\CreateProvisioningConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig): self + { + return (new self()) + ->setParent($parent) + ->setProvisioningConfig($provisioningConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent project and location containing the + * ProvisioningConfig. + * @type \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioning_config + * Required. The ProvisioningConfig to create. + * @type string $email + * Optional. Email provided to send a confirmation with provisioning config + * to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent project and location containing the + * ProvisioningConfig. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent project and location containing the + * ProvisioningConfig. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ProvisioningConfig to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig|null + */ + public function getProvisioningConfig() + { + return $this->provisioning_config; + } + + public function hasProvisioningConfig() + { + return isset($this->provisioning_config); + } + + public function clearProvisioningConfig() + { + unset($this->provisioning_config); + } + + /** + * Required. The ProvisioningConfig to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $var + * @return $this + */ + public function setProvisioningConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig::class); + $this->provisioning_config = $var; + + return $this; + } + + /** + * Optional. Email provided to send a confirmation with provisioning config + * to. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Optional. Email provided to send a confirmation with provisioning config + * to. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateSSHKeyRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateSSHKeyRequest.php new file mode 100644 index 000000000000..cfedc3945247 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateSSHKeyRequest.php @@ -0,0 +1,179 @@ +google.cloud.baremetalsolution.v2.CreateSSHKeyRequest + */ +class CreateSSHKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent containing the SSH keys. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The SSH key to register. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.SSHKey ssh_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ssh_key = null; + /** + * Required. The ID to use for the key, which will become the final component + * of the key's resource name. + * This value must match the regex: + * [a-zA-Z0-9@.\-_]{1,64} + * + * Generated from protobuf field string ssh_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ssh_key_id = ''; + + /** + * @param string $parent Required. The parent containing the SSH keys. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BareMetalSolution\V2\SSHKey $sshKey Required. The SSH key to register. + * @param string $sshKeyId Required. The ID to use for the key, which will become the final component + * of the key's resource name. + * + * This value must match the regex: + * [a-zA-Z0-9@.\-_]{1,64} + * + * @return \Google\Cloud\BareMetalSolution\V2\CreateSSHKeyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\SSHKey $sshKey, string $sshKeyId): self + { + return (new self()) + ->setParent($parent) + ->setSshKey($sshKey) + ->setSshKeyId($sshKeyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent containing the SSH keys. + * @type \Google\Cloud\BareMetalSolution\V2\SSHKey $ssh_key + * Required. The SSH key to register. + * @type string $ssh_key_id + * Required. The ID to use for the key, which will become the final component + * of the key's resource name. + * This value must match the regex: + * [a-zA-Z0-9@.\-_]{1,64} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\SshKey::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent containing the SSH keys. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent containing the SSH keys. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The SSH key to register. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.SSHKey ssh_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\SSHKey|null + */ + public function getSshKey() + { + return $this->ssh_key; + } + + public function hasSshKey() + { + return isset($this->ssh_key); + } + + public function clearSshKey() + { + unset($this->ssh_key); + } + + /** + * Required. The SSH key to register. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.SSHKey ssh_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\SSHKey $var + * @return $this + */ + public function setSshKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\SSHKey::class); + $this->ssh_key = $var; + + return $this; + } + + /** + * Required. The ID to use for the key, which will become the final component + * of the key's resource name. + * This value must match the regex: + * [a-zA-Z0-9@.\-_]{1,64} + * + * Generated from protobuf field string ssh_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSshKeyId() + { + return $this->ssh_key_id; + } + + /** + * Required. The ID to use for the key, which will become the final component + * of the key's resource name. + * This value must match the regex: + * [a-zA-Z0-9@.\-_]{1,64} + * + * Generated from protobuf field string ssh_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSshKeyId($var) + { + GPBUtil::checkString($var, True); + $this->ssh_key_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateVolumeSnapshotRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateVolumeSnapshotRequest.php new file mode 100644 index 000000000000..596dbb03246e --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateVolumeSnapshotRequest.php @@ -0,0 +1,127 @@ +google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest + */ +class CreateVolumeSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The volume to snapshot. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The snapshot to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $volume_snapshot = null; + + /** + * @param string $parent Required. The volume to snapshot. Please see + * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. + * @param \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot $volumeSnapshot Required. The snapshot to create. + * + * @return \Google\Cloud\BareMetalSolution\V2\CreateVolumeSnapshotRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot $volumeSnapshot): self + { + return (new self()) + ->setParent($parent) + ->setVolumeSnapshot($volumeSnapshot); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The volume to snapshot. + * @type \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot $volume_snapshot + * Required. The snapshot to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The volume to snapshot. + * + * 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 volume to snapshot. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The snapshot to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot|null + */ + public function getVolumeSnapshot() + { + return $this->volume_snapshot; + } + + public function hasVolumeSnapshot() + { + return isset($this->volume_snapshot); + } + + public function clearVolumeSnapshot() + { + unset($this->volume_snapshot); + } + + /** + * Required. The snapshot to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot $var + * @return $this + */ + public function setVolumeSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot::class); + $this->volume_snapshot = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteNfsShareRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteNfsShareRequest.php new file mode 100644 index 000000000000..f3f766e04791 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteNfsShareRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.DeleteNfsShareRequest + */ +class DeleteNfsShareRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the NFS share to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the NFS share to delete. Please see + * {@see BareMetalSolutionClient::nFSShareName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\DeleteNfsShareRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the NFS share to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the NFS share to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the NFS share to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteSSHKeyRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteSSHKeyRequest.php new file mode 100644 index 000000000000..814572e4b1b5 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteSSHKeyRequest.php @@ -0,0 +1,86 @@ +google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest + */ +class DeleteSSHKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the SSH key to delete. + * Currently, the only valid value for the location is "global". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the SSH key to delete. + * Currently, the only valid value for the location is "global". Please see + * {@see BareMetalSolutionClient::sshKeyName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\DeleteSSHKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the SSH key to delete. + * Currently, the only valid value for the location is "global". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\SshKey::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the SSH key to delete. + * Currently, the only valid value for the location is "global". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the SSH key to delete. + * Currently, the only valid value for the location is "global". + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteVolumeSnapshotRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteVolumeSnapshotRequest.php new file mode 100644 index 000000000000..19119d332bcb --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteVolumeSnapshotRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest + */ +class DeleteVolumeSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the snapshot to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the snapshot to delete. Please see + * {@see BareMetalSolutionClient::volumeSnapshotName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\DeleteVolumeSnapshotRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the snapshot to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the snapshot to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the snapshot to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DetachLunRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DetachLunRequest.php new file mode 100644 index 000000000000..81712c80e095 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DetachLunRequest.php @@ -0,0 +1,152 @@ +google.cloud.baremetalsolution.v2.DetachLunRequest + */ +class DetachLunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the instance. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $instance = ''; + /** + * Required. Name of the Lun to detach. + * + * Generated from protobuf field string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $lun = ''; + /** + * If true, performs lun unmapping without instance reboot. + * + * Generated from protobuf field bool skip_reboot = 3; + */ + protected $skip_reboot = false; + + /** + * @param string $instance Required. Name of the instance. Please see + * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. + * @param string $lun Required. Name of the Lun to detach. Please see + * {@see BareMetalSolutionClient::lunName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\DetachLunRequest + * + * @experimental + */ + public static function build(string $instance, string $lun): self + { + return (new self()) + ->setInstance($instance) + ->setLun($lun); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. Name of the instance. + * @type string $lun + * Required. Name of the Lun to detach. + * @type bool $skip_reboot + * If true, performs lun unmapping without instance reboot. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the instance. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. Name of the instance. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. Name of the Lun to detach. + * + * Generated from protobuf field string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLun() + { + return $this->lun; + } + + /** + * Required. Name of the Lun to detach. + * + * Generated from protobuf field string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLun($var) + { + GPBUtil::checkString($var, True); + $this->lun = $var; + + return $this; + } + + /** + * If true, performs lun unmapping without instance reboot. + * + * Generated from protobuf field bool skip_reboot = 3; + * @return bool + */ + public function getSkipReboot() + { + return $this->skip_reboot; + } + + /** + * If true, performs lun unmapping without instance reboot. + * + * Generated from protobuf field bool skip_reboot = 3; + * @param bool $var + * @return $this + */ + public function setSkipReboot($var) + { + GPBUtil::checkBool($var); + $this->skip_reboot = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleRequest.php new file mode 100644 index 000000000000..aa3868a802ab --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest + */ +class DisableInteractiveSerialConsoleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\DisableInteractiveSerialConsoleRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleResponse.php new file mode 100644 index 000000000000..737e33fffce2 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleResponse.php @@ -0,0 +1,33 @@ +google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse + */ +class DisableInteractiveSerialConsoleResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleRequest.php new file mode 100644 index 000000000000..6f2964df785f --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest + */ +class EnableInteractiveSerialConsoleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\EnableInteractiveSerialConsoleRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleResponse.php new file mode 100644 index 000000000000..26260201b3b4 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleResponse.php @@ -0,0 +1,33 @@ +google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleResponse + */ +class EnableInteractiveSerialConsoleResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictLunRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictLunRequest.php new file mode 100644 index 000000000000..38c315af1d6c --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictLunRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.EvictLunRequest + */ +class EvictLunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the lun. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the lun. Please see + * {@see BareMetalSolutionClient::lunName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\EvictLunRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the lun. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the lun. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the lun. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictVolumeRequest.php new file mode 100644 index 000000000000..3f04fee83e53 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictVolumeRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.EvictVolumeRequest + */ +class EvictVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Volume. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the Volume. Please see + * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\EvictVolumeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Volume. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Volume. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetInstanceRequest.php new file mode 100644 index 000000000000..7a98047a6e5c --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetInstanceRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\GetInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetLunRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetLunRequest.php new file mode 100644 index 000000000000..1b3818ef6068 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetLunRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.GetLunRequest + */ +class GetLunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::lunName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\GetLunRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNetworkRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNetworkRequest.php new file mode 100644 index 000000000000..b176df8e0052 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNetworkRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.GetNetworkRequest + */ +class GetNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::networkName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\GetNetworkRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNfsShareRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNfsShareRequest.php new file mode 100644 index 000000000000..95048183c5a2 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNfsShareRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.GetNfsShareRequest + */ +class GetNfsShareRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::nFSShareName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\GetNfsShareRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetProvisioningConfigRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetProvisioningConfigRequest.php new file mode 100644 index 000000000000..79256f54066f --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetProvisioningConfigRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest + */ +class GetProvisioningConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the ProvisioningConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the ProvisioningConfig. Please see + * {@see BareMetalSolutionClient::provisioningConfigName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\GetProvisioningConfigRequest + * + * @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. Name of the ProvisioningConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the ProvisioningConfig. + * + * 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. Name of the ProvisioningConfig. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeRequest.php new file mode 100644 index 000000000000..16d3f54aa0b8 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.GetVolumeRequest + */ +class GetVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\GetVolumeRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeSnapshotRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeSnapshotRequest.php new file mode 100644 index 000000000000..49af9dcb744f --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeSnapshotRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest + */ +class GetVolumeSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the snapshot. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the snapshot. Please see + * {@see BareMetalSolutionClient::volumeSnapshotName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\GetVolumeSnapshotRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the snapshot. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the snapshot. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the snapshot. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance.php new file mode 100644 index 000000000000..85e0e58624a5 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance.php @@ -0,0 +1,779 @@ +google.cloud.baremetalsolution.v2.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of this `Instance`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. An identifier for the `Instance`, generated by the backend. + * + * Generated from protobuf field string id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * Output only. Create a time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update a time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Immutable. The server type. + * [Available server + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field string machine_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $machine_type = ''; + /** + * Output only. The state of the server. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * True if you enable hyperthreading for the server, otherwise false. + * The default value is false. + * + * Generated from protobuf field bool hyperthreading_enabled = 6; + */ + protected $hyperthreading_enabled = false; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 7; + */ + private $labels; + /** + * Immutable. List of LUNs associated with this server. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 8 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private $luns; + /** + * Input only. List of Volumes to attach to this Instance on creation. + * This field won't be populated in Get/List responses. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + private $volumes; + /** + * Output only. List of networks associated with this server. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $networks; + /** + * Output only. True if the interactive serial console feature is enabled for + * the instance, false otherwise. The default value is false. + * + * Generated from protobuf field bool interactive_serial_console_enabled = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $interactive_serial_console_enabled = false; + /** + * The OS image currently installed on the server. + * + * Generated from protobuf field string os_image = 12; + */ + protected $os_image = ''; + /** + * Immutable. Pod name. + * Pod is an independent part of infrastructure. + * Instance can be connected to the assets (networks, volumes) allocated + * in the same pod only. + * + * Generated from protobuf field string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $pod = ''; + /** + * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. + * Generally, the template name follows the syntax of + * "bond" or "nic". + * + * Generated from protobuf field string network_template = 14 [(.google.api.resource_reference) = { + */ + protected $network_template = ''; + /** + * List of logical interfaces for the instance. The number of logical + * interfaces will be the same as number of hardware bond/nic on the chosen + * network template. For the non-multivlan configurations (for eg, existing + * servers) that use existing default network template (bondaa-bondaa), both + * the Instance.networks field and the Instance.logical_interfaces fields will + * be filled to ensure backward compatibility. For the others, only + * Instance.logical_interfaces will be filled. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + */ + private $logical_interfaces; + /** + * Output only. Text field about info for logging in. + * + * Generated from protobuf field string login_info = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $login_info = ''; + /** + * The workload profile for the instance. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18; + */ + protected $workload_profile = 0; + /** + * Output only. The firmware version for the instance. + * + * Generated from protobuf field string firmware_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $firmware_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of this `Instance`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * @type string $id + * Output only. An identifier for the `Instance`, generated by the backend. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create a time stamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update a time stamp. + * @type string $machine_type + * Immutable. The server type. + * [Available server + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * @type int $state + * Output only. The state of the server. + * @type bool $hyperthreading_enabled + * True if you enable hyperthreading for the server, otherwise false. + * The default value is false. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type array<\Google\Cloud\BareMetalSolution\V2\Lun>|\Google\Protobuf\Internal\RepeatedField $luns + * Immutable. List of LUNs associated with this server. + * @type array<\Google\Cloud\BareMetalSolution\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * Input only. List of Volumes to attach to this Instance on creation. + * This field won't be populated in Get/List responses. + * @type array<\Google\Cloud\BareMetalSolution\V2\Network>|\Google\Protobuf\Internal\RepeatedField $networks + * Output only. List of networks associated with this server. + * @type bool $interactive_serial_console_enabled + * Output only. True if the interactive serial console feature is enabled for + * the instance, false otherwise. The default value is false. + * @type string $os_image + * The OS image currently installed on the server. + * @type string $pod + * Immutable. Pod name. + * Pod is an independent part of infrastructure. + * Instance can be connected to the assets (networks, volumes) allocated + * in the same pod only. + * @type string $network_template + * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. + * Generally, the template name follows the syntax of + * "bond" or "nic". + * @type array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $logical_interfaces + * List of logical interfaces for the instance. The number of logical + * interfaces will be the same as number of hardware bond/nic on the chosen + * network template. For the non-multivlan configurations (for eg, existing + * servers) that use existing default network template (bondaa-bondaa), both + * the Instance.networks field and the Instance.logical_interfaces fields will + * be filled to ensure backward compatibility. For the others, only + * Instance.logical_interfaces will be filled. + * @type string $login_info + * Output only. Text field about info for logging in. + * @type int $workload_profile + * The workload profile for the instance. + * @type string $firmware_version + * Output only. The firmware version for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of this `Instance`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The resource name of this `Instance`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * + * 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; + } + + /** + * Output only. An identifier for the `Instance`, generated by the backend. + * + * Generated from protobuf field string id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. An identifier for the `Instance`, generated by the backend. + * + * Generated from protobuf field string id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Output only. Create a time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Create a time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Update a time stamp. + * + * 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. Update a time stamp. + * + * 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; + } + + /** + * Immutable. The server type. + * [Available server + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field string machine_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Immutable. The server type. + * [Available server + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field string machine_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Output only. The state of the server. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the server. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * True if you enable hyperthreading for the server, otherwise false. + * The default value is false. + * + * Generated from protobuf field bool hyperthreading_enabled = 6; + * @return bool + */ + public function getHyperthreadingEnabled() + { + return $this->hyperthreading_enabled; + } + + /** + * True if you enable hyperthreading for the server, otherwise false. + * The default value is false. + * + * Generated from protobuf field bool hyperthreading_enabled = 6; + * @param bool $var + * @return $this + */ + public function setHyperthreadingEnabled($var) + { + GPBUtil::checkBool($var); + $this->hyperthreading_enabled = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 7; + * @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; + } + + /** + * Immutable. List of LUNs associated with this server. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLuns() + { + return $this->luns; + } + + /** + * Immutable. List of LUNs associated with this server. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * @param array<\Google\Cloud\BareMetalSolution\V2\Lun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLuns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Lun::class); + $this->luns = $arr; + + return $this; + } + + /** + * Input only. List of Volumes to attach to this Instance on creation. + * This field won't be populated in Get/List responses. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * Input only. List of Volumes to attach to this Instance on creation. + * This field won't be populated in Get/List responses. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param array<\Google\Cloud\BareMetalSolution\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * Output only. List of networks associated with this server. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworks() + { + return $this->networks; + } + + /** + * Output only. List of networks associated with this server. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\BareMetalSolution\V2\Network>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Network::class); + $this->networks = $arr; + + return $this; + } + + /** + * Output only. True if the interactive serial console feature is enabled for + * the instance, false otherwise. The default value is false. + * + * Generated from protobuf field bool interactive_serial_console_enabled = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getInteractiveSerialConsoleEnabled() + { + return $this->interactive_serial_console_enabled; + } + + /** + * Output only. True if the interactive serial console feature is enabled for + * the instance, false otherwise. The default value is false. + * + * Generated from protobuf field bool interactive_serial_console_enabled = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setInteractiveSerialConsoleEnabled($var) + { + GPBUtil::checkBool($var); + $this->interactive_serial_console_enabled = $var; + + return $this; + } + + /** + * The OS image currently installed on the server. + * + * Generated from protobuf field string os_image = 12; + * @return string + */ + public function getOsImage() + { + return $this->os_image; + } + + /** + * The OS image currently installed on the server. + * + * Generated from protobuf field string os_image = 12; + * @param string $var + * @return $this + */ + public function setOsImage($var) + { + GPBUtil::checkString($var, True); + $this->os_image = $var; + + return $this; + } + + /** + * Immutable. Pod name. + * Pod is an independent part of infrastructure. + * Instance can be connected to the assets (networks, volumes) allocated + * in the same pod only. + * + * Generated from protobuf field string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getPod() + { + return $this->pod; + } + + /** + * Immutable. Pod name. + * Pod is an independent part of infrastructure. + * Instance can be connected to the assets (networks, volumes) allocated + * in the same pod only. + * + * Generated from protobuf field string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setPod($var) + { + GPBUtil::checkString($var, True); + $this->pod = $var; + + return $this; + } + + /** + * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. + * Generally, the template name follows the syntax of + * "bond" or "nic". + * + * Generated from protobuf field string network_template = 14 [(.google.api.resource_reference) = { + * @return string + */ + public function getNetworkTemplate() + { + return $this->network_template; + } + + /** + * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. + * Generally, the template name follows the syntax of + * "bond" or "nic". + * + * Generated from protobuf field string network_template = 14 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetworkTemplate($var) + { + GPBUtil::checkString($var, True); + $this->network_template = $var; + + return $this; + } + + /** + * List of logical interfaces for the instance. The number of logical + * interfaces will be the same as number of hardware bond/nic on the chosen + * network template. For the non-multivlan configurations (for eg, existing + * servers) that use existing default network template (bondaa-bondaa), both + * the Instance.networks field and the Instance.logical_interfaces fields will + * be filled to ensure backward compatibility. For the others, only + * Instance.logical_interfaces will be filled. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogicalInterfaces() + { + return $this->logical_interfaces; + } + + /** + * List of logical interfaces for the instance. The number of logical + * interfaces will be the same as number of hardware bond/nic on the chosen + * network template. For the non-multivlan configurations (for eg, existing + * servers) that use existing default network template (bondaa-bondaa), both + * the Instance.networks field and the Instance.logical_interfaces fields will + * be filled to ensure backward compatibility. For the others, only + * Instance.logical_interfaces will be filled. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * @param array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogicalInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\LogicalInterface::class); + $this->logical_interfaces = $arr; + + return $this; + } + + /** + * Output only. Text field about info for logging in. + * + * Generated from protobuf field string login_info = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLoginInfo() + { + return $this->login_info; + } + + /** + * Output only. Text field about info for logging in. + * + * Generated from protobuf field string login_info = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLoginInfo($var) + { + GPBUtil::checkString($var, True); + $this->login_info = $var; + + return $this; + } + + /** + * The workload profile for the instance. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18; + * @return int + */ + public function getWorkloadProfile() + { + return $this->workload_profile; + } + + /** + * The workload profile for the instance. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18; + * @param int $var + * @return $this + */ + public function setWorkloadProfile($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\WorkloadProfile::class); + $this->workload_profile = $var; + + return $this; + } + + /** + * Output only. The firmware version for the instance. + * + * Generated from protobuf field string firmware_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFirmwareVersion() + { + return $this->firmware_version; + } + + /** + * Output only. The firmware version for the instance. + * + * Generated from protobuf field string firmware_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFirmwareVersion($var) + { + GPBUtil::checkString($var, True); + $this->firmware_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance/State.php new file mode 100644 index 000000000000..9a746059a3d8 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance/State.php @@ -0,0 +1,99 @@ +google.cloud.baremetalsolution.v2.Instance.State + */ +class State +{ + /** + * The server is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The server is being provisioned. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The server is running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The server has been deleted. + * + * Generated from protobuf enum DELETED = 3; + */ + const DELETED = 3; + /** + * The server is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * The server is starting. + * + * Generated from protobuf enum STARTING = 5; + */ + const STARTING = 5; + /** + * The server is stopping. + * + * Generated from protobuf enum STOPPING = 6; + */ + const STOPPING = 6; + /** + * The server is shutdown. + * + * Generated from protobuf enum SHUTDOWN = 7; + */ + const SHUTDOWN = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::RUNNING => 'RUNNING', + self::DELETED => 'DELETED', + self::UPDATING => 'UPDATING', + self::STARTING => 'STARTING', + self::STOPPING => 'STOPPING', + self::SHUTDOWN => 'SHUTDOWN', + ]; + + 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\BareMetalSolution\V2\Instance_State::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig.php new file mode 100644 index 000000000000..1e77b13cf9bf --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig.php @@ -0,0 +1,549 @@ +google.cloud.baremetalsolution.v2.InstanceConfig + */ +class InstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the instance config. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * A transient unique identifier to idenfity an instance within an + * ProvisioningConfig request. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + /** + * Instance type. + * [Available + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field string instance_type = 3; + */ + protected $instance_type = ''; + /** + * Whether the instance should be provisioned with Hyperthreading enabled. + * + * Generated from protobuf field bool hyperthreading = 4; + */ + protected $hyperthreading = false; + /** + * OS image to initialize the instance. + * [Available + * images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field string os_image = 5; + */ + protected $os_image = ''; + /** + * Client network address. Filled if InstanceConfig.multivlan_config is false. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true]; + * @deprecated + */ + protected $client_network = null; + /** + * Private network address, if any. Filled if InstanceConfig.multivlan_config + * is false. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true]; + * @deprecated + */ + protected $private_network = null; + /** + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * + * Generated from protobuf field string user_note = 8; + */ + protected $user_note = ''; + /** + * If true networks can be from different projects of the same vendor account. + * + * Generated from protobuf field bool account_networks_enabled = 9; + */ + protected $account_networks_enabled = false; + /** + * The type of network configuration on the instance. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10; + */ + protected $network_config = 0; + /** + * Server network template name. Filled if InstanceConfig.multivlan_config is + * true. + * + * Generated from protobuf field string network_template = 11; + */ + protected $network_template = ''; + /** + * List of logical interfaces for the instance. The number of logical + * interfaces will be the same as number of hardware bond/nic on the chosen + * network template. Filled if InstanceConfig.multivlan_config is true. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12; + */ + private $logical_interfaces; + /** + * List of names of ssh keys used to provision the instance. + * + * Generated from protobuf field repeated string ssh_key_names = 13; + */ + private $ssh_key_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the instance config. + * @type string $id + * A transient unique identifier to idenfity an instance within an + * ProvisioningConfig request. + * @type string $instance_type + * Instance type. + * [Available + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * @type bool $hyperthreading + * Whether the instance should be provisioned with Hyperthreading enabled. + * @type string $os_image + * OS image to initialize the instance. + * [Available + * images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * @type \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress $client_network + * Client network address. Filled if InstanceConfig.multivlan_config is false. + * @type \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress $private_network + * Private network address, if any. Filled if InstanceConfig.multivlan_config + * is false. + * @type string $user_note + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * @type bool $account_networks_enabled + * If true networks can be from different projects of the same vendor account. + * @type int $network_config + * The type of network configuration on the instance. + * @type string $network_template + * Server network template name. Filled if InstanceConfig.multivlan_config is + * true. + * @type array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $logical_interfaces + * List of logical interfaces for the instance. The number of logical + * interfaces will be the same as number of hardware bond/nic on the chosen + * network template. Filled if InstanceConfig.multivlan_config is true. + * @type array|\Google\Protobuf\Internal\RepeatedField $ssh_key_names + * List of names of ssh keys used to provision the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the instance config. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the instance config. + * + * 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; + } + + /** + * A transient unique identifier to idenfity an instance within an + * ProvisioningConfig request. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * A transient unique identifier to idenfity an instance within an + * ProvisioningConfig request. + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Instance type. + * [Available + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field string instance_type = 3; + * @return string + */ + public function getInstanceType() + { + return $this->instance_type; + } + + /** + * Instance type. + * [Available + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field string instance_type = 3; + * @param string $var + * @return $this + */ + public function setInstanceType($var) + { + GPBUtil::checkString($var, True); + $this->instance_type = $var; + + return $this; + } + + /** + * Whether the instance should be provisioned with Hyperthreading enabled. + * + * Generated from protobuf field bool hyperthreading = 4; + * @return bool + */ + public function getHyperthreading() + { + return $this->hyperthreading; + } + + /** + * Whether the instance should be provisioned with Hyperthreading enabled. + * + * Generated from protobuf field bool hyperthreading = 4; + * @param bool $var + * @return $this + */ + public function setHyperthreading($var) + { + GPBUtil::checkBool($var); + $this->hyperthreading = $var; + + return $this; + } + + /** + * OS image to initialize the instance. + * [Available + * images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field string os_image = 5; + * @return string + */ + public function getOsImage() + { + return $this->os_image; + } + + /** + * OS image to initialize the instance. + * [Available + * images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field string os_image = 5; + * @param string $var + * @return $this + */ + public function setOsImage($var) + { + GPBUtil::checkString($var, True); + $this->os_image = $var; + + return $this; + } + + /** + * Client network address. Filled if InstanceConfig.multivlan_config is false. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true]; + * @return \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress|null + * @deprecated + */ + public function getClientNetwork() + { + @trigger_error('client_network is deprecated.', E_USER_DEPRECATED); + return $this->client_network; + } + + public function hasClientNetwork() + { + @trigger_error('client_network is deprecated.', E_USER_DEPRECATED); + return isset($this->client_network); + } + + public function clearClientNetwork() + { + @trigger_error('client_network is deprecated.', E_USER_DEPRECATED); + unset($this->client_network); + } + + /** + * Client network address. Filled if InstanceConfig.multivlan_config is false. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true]; + * @param \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress $var + * @return $this + * @deprecated + */ + public function setClientNetwork($var) + { + @trigger_error('client_network is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress::class); + $this->client_network = $var; + + return $this; + } + + /** + * Private network address, if any. Filled if InstanceConfig.multivlan_config + * is false. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true]; + * @return \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress|null + * @deprecated + */ + public function getPrivateNetwork() + { + @trigger_error('private_network is deprecated.', E_USER_DEPRECATED); + return $this->private_network; + } + + public function hasPrivateNetwork() + { + @trigger_error('private_network is deprecated.', E_USER_DEPRECATED); + return isset($this->private_network); + } + + public function clearPrivateNetwork() + { + @trigger_error('private_network is deprecated.', E_USER_DEPRECATED); + unset($this->private_network); + } + + /** + * Private network address, if any. Filled if InstanceConfig.multivlan_config + * is false. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true]; + * @param \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress $var + * @return $this + * @deprecated + */ + public function setPrivateNetwork($var) + { + @trigger_error('private_network is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress::class); + $this->private_network = $var; + + return $this; + } + + /** + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * + * Generated from protobuf field string user_note = 8; + * @return string + */ + public function getUserNote() + { + return $this->user_note; + } + + /** + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * + * Generated from protobuf field string user_note = 8; + * @param string $var + * @return $this + */ + public function setUserNote($var) + { + GPBUtil::checkString($var, True); + $this->user_note = $var; + + return $this; + } + + /** + * If true networks can be from different projects of the same vendor account. + * + * Generated from protobuf field bool account_networks_enabled = 9; + * @return bool + */ + public function getAccountNetworksEnabled() + { + return $this->account_networks_enabled; + } + + /** + * If true networks can be from different projects of the same vendor account. + * + * Generated from protobuf field bool account_networks_enabled = 9; + * @param bool $var + * @return $this + */ + public function setAccountNetworksEnabled($var) + { + GPBUtil::checkBool($var); + $this->account_networks_enabled = $var; + + return $this; + } + + /** + * The type of network configuration on the instance. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10; + * @return int + */ + public function getNetworkConfig() + { + return $this->network_config; + } + + /** + * The type of network configuration on the instance. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10; + * @param int $var + * @return $this + */ + public function setNetworkConfig($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkConfig::class); + $this->network_config = $var; + + return $this; + } + + /** + * Server network template name. Filled if InstanceConfig.multivlan_config is + * true. + * + * Generated from protobuf field string network_template = 11; + * @return string + */ + public function getNetworkTemplate() + { + return $this->network_template; + } + + /** + * Server network template name. Filled if InstanceConfig.multivlan_config is + * true. + * + * Generated from protobuf field string network_template = 11; + * @param string $var + * @return $this + */ + public function setNetworkTemplate($var) + { + GPBUtil::checkString($var, True); + $this->network_template = $var; + + return $this; + } + + /** + * List of logical interfaces for the instance. The number of logical + * interfaces will be the same as number of hardware bond/nic on the chosen + * network template. Filled if InstanceConfig.multivlan_config is true. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogicalInterfaces() + { + return $this->logical_interfaces; + } + + /** + * List of logical interfaces for the instance. The number of logical + * interfaces will be the same as number of hardware bond/nic on the chosen + * network template. Filled if InstanceConfig.multivlan_config is true. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12; + * @param array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogicalInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\LogicalInterface::class); + $this->logical_interfaces = $arr; + + return $this; + } + + /** + * List of names of ssh keys used to provision the instance. + * + * Generated from protobuf field repeated string ssh_key_names = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSshKeyNames() + { + return $this->ssh_key_names; + } + + /** + * List of names of ssh keys used to provision the instance. + * + * Generated from protobuf field repeated string ssh_key_names = 13; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSshKeyNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ssh_key_names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkAddress.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkAddress.php new file mode 100644 index 000000000000..7ab49c50498c --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkAddress.php @@ -0,0 +1,138 @@ +google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress + */ +class NetworkAddress extends \Google\Protobuf\Internal\Message +{ + /** + * Id of the network to use, within the same ProvisioningConfig request. + * + * Generated from protobuf field string network_id = 1; + */ + protected $network_id = ''; + /** + * IPv4 address to be assigned to the server. + * + * Generated from protobuf field string address = 2; + */ + protected $address = ''; + /** + * Name of the existing network to use. + * + * Generated from protobuf field string existing_network_id = 3; + */ + protected $existing_network_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_id + * Id of the network to use, within the same ProvisioningConfig request. + * @type string $address + * IPv4 address to be assigned to the server. + * @type string $existing_network_id + * Name of the existing network to use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Id of the network to use, within the same ProvisioningConfig request. + * + * Generated from protobuf field string network_id = 1; + * @return string + */ + public function getNetworkId() + { + return $this->network_id; + } + + /** + * Id of the network to use, within the same ProvisioningConfig request. + * + * Generated from protobuf field string network_id = 1; + * @param string $var + * @return $this + */ + public function setNetworkId($var) + { + GPBUtil::checkString($var, True); + $this->network_id = $var; + + return $this; + } + + /** + * IPv4 address to be assigned to the server. + * + * Generated from protobuf field string address = 2; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * IPv4 address to be assigned to the server. + * + * Generated from protobuf field string address = 2; + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * Name of the existing network to use. + * + * Generated from protobuf field string existing_network_id = 3; + * @return string + */ + public function getExistingNetworkId() + { + return $this->existing_network_id; + } + + /** + * Name of the existing network to use. + * + * Generated from protobuf field string existing_network_id = 3; + * @param string $var + * @return $this + */ + public function setExistingNetworkId($var) + { + GPBUtil::checkString($var, True); + $this->existing_network_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkAddress::class, \Google\Cloud\BareMetalSolution\V2\InstanceConfig_NetworkAddress::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkConfig.php new file mode 100644 index 000000000000..30f7aa107cdd --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkConfig.php @@ -0,0 +1,65 @@ +google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig + */ +class NetworkConfig +{ + /** + * The unspecified network configuration. + * + * Generated from protobuf enum NETWORKCONFIG_UNSPECIFIED = 0; + */ + const NETWORKCONFIG_UNSPECIFIED = 0; + /** + * Instance part of single client network and single private network. + * + * Generated from protobuf enum SINGLE_VLAN = 1; + */ + const SINGLE_VLAN = 1; + /** + * Instance part of multiple (or single) client networks and private + * networks. + * + * Generated from protobuf enum MULTI_VLAN = 2; + */ + const MULTI_VLAN = 2; + + private static $valueToName = [ + self::NETWORKCONFIG_UNSPECIFIED => 'NETWORKCONFIG_UNSPECIFIED', + self::SINGLE_VLAN => 'SINGLE_VLAN', + self::MULTI_VLAN => 'MULTI_VLAN', + ]; + + 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(NetworkConfig::class, \Google\Cloud\BareMetalSolution\V2\InstanceConfig_NetworkConfig::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceQuota.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceQuota.php new file mode 100644 index 000000000000..21db20745c70 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceQuota.php @@ -0,0 +1,216 @@ +google.cloud.baremetalsolution.v2.InstanceQuota + */ +class InstanceQuota extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the instance quota. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Instance type. + * Deprecated: use gcp_service. + * + * Generated from protobuf field string instance_type = 2 [deprecated = true]; + * @deprecated + */ + protected $instance_type = ''; + /** + * The gcp service of the provisioning quota. + * + * Generated from protobuf field string gcp_service = 5; + */ + protected $gcp_service = ''; + /** + * Location where the quota applies. + * + * Generated from protobuf field string location = 3; + */ + protected $location = ''; + /** + * Number of machines than can be created for the given location and + * instance_type. + * + * Generated from protobuf field int32 available_machine_count = 4; + */ + protected $available_machine_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the instance quota. + * @type string $instance_type + * Instance type. + * Deprecated: use gcp_service. + * @type string $gcp_service + * The gcp service of the provisioning quota. + * @type string $location + * Location where the quota applies. + * @type int $available_machine_count + * Number of machines than can be created for the given location and + * instance_type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the instance quota. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the instance quota. + * + * 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; + } + + /** + * Instance type. + * Deprecated: use gcp_service. + * + * Generated from protobuf field string instance_type = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getInstanceType() + { + @trigger_error('instance_type is deprecated.', E_USER_DEPRECATED); + return $this->instance_type; + } + + /** + * Instance type. + * Deprecated: use gcp_service. + * + * Generated from protobuf field string instance_type = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setInstanceType($var) + { + @trigger_error('instance_type is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->instance_type = $var; + + return $this; + } + + /** + * The gcp service of the provisioning quota. + * + * Generated from protobuf field string gcp_service = 5; + * @return string + */ + public function getGcpService() + { + return $this->gcp_service; + } + + /** + * The gcp service of the provisioning quota. + * + * Generated from protobuf field string gcp_service = 5; + * @param string $var + * @return $this + */ + public function setGcpService($var) + { + GPBUtil::checkString($var, True); + $this->gcp_service = $var; + + return $this; + } + + /** + * Location where the quota applies. + * + * Generated from protobuf field string location = 3; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location where the quota applies. + * + * Generated from protobuf field string location = 3; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Number of machines than can be created for the given location and + * instance_type. + * + * Generated from protobuf field int32 available_machine_count = 4; + * @return int + */ + public function getAvailableMachineCount() + { + return $this->available_machine_count; + } + + /** + * Number of machines than can be created for the given location and + * instance_type. + * + * Generated from protobuf field int32 available_machine_count = 4; + * @param int $var + * @return $this + */ + public function setAvailableMachineCount($var) + { + GPBUtil::checkInt32($var); + $this->available_machine_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesRequest.php new file mode 100644 index 000000000000..b8df2634e290 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesRequest.php @@ -0,0 +1,187 @@ +google.cloud.baremetalsolution.v2.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListInstancesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Parent value for ListInstancesRequest. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListInstancesRequest + * + * @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. Parent value for ListInstancesRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results from the server. + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListInstancesRequest. + * + * 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. Parent value for ListInstancesRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesResponse.php new file mode 100644 index 000000000000..7bc39330cdee --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesResponse.php @@ -0,0 +1,135 @@ +google.cloud.baremetalsolution.v2.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of servers. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Instance instances = 1; + */ + private $instances; + /** + * A token identifying a page of results from the server. + * + * 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\BareMetalSolution\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $instances + * The list of servers. + * @type string $next_page_token + * A token identifying a page of results from the server. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The list of servers. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Instance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * The list of servers. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Instance instances = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results from the server. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsRequest.php new file mode 100644 index 000000000000..46a9980f6ad5 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsRequest.php @@ -0,0 +1,153 @@ +google.cloud.baremetalsolution.v2.ListLunsRequest + */ +class ListLunsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListLunsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent value for ListLunsRequest. Please see + * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListLunsRequest + * + * @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. Parent value for ListLunsRequest. + * @type int $page_size + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results from the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListLunsRequest. + * + * 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. Parent value for ListLunsRequest. + * + * 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; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsResponse.php new file mode 100644 index 000000000000..c15be31a1acd --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsResponse.php @@ -0,0 +1,135 @@ +google.cloud.baremetalsolution.v2.ListLunsResponse + */ +class ListLunsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of luns. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 1; + */ + private $luns; + /** + * A token identifying a page of results from the server. + * + * 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\BareMetalSolution\V2\Lun>|\Google\Protobuf\Internal\RepeatedField $luns + * The list of luns. + * @type string $next_page_token + * A token identifying a page of results from the server. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); + parent::__construct($data); + } + + /** + * The list of luns. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLuns() + { + return $this->luns; + } + + /** + * The list of luns. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\Lun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLuns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Lun::class); + $this->luns = $arr; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results from the server. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageRequest.php new file mode 100644 index 000000000000..6c9b2360d478 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.ListNetworkUsageRequest + */ +class ListNetworkUsageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value (project and location). + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + + /** + * @param string $location Required. Parent value (project and location). Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListNetworkUsageRequest + * + * @experimental + */ + public static function build(string $location): self + { + return (new self()) + ->setLocation($location); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Required. Parent value (project and location). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value (project and location). + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. Parent value (project and location). + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageResponse.php new file mode 100644 index 000000000000..322b3281df57 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageResponse.php @@ -0,0 +1,67 @@ +google.cloud.baremetalsolution.v2.ListNetworkUsageResponse + */ +class ListNetworkUsageResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Networks with IPs. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + private $networks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkUsage>|\Google\Protobuf\Internal\RepeatedField $networks + * Networks with IPs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Networks with IPs. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworks() + { + return $this->networks; + } + + /** + * Networks with IPs. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkUsage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkUsage::class); + $this->networks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksRequest.php new file mode 100644 index 000000000000..83913f7e5766 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksRequest.php @@ -0,0 +1,187 @@ +google.cloud.baremetalsolution.v2.ListNetworksRequest + */ +class ListNetworksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListNetworksRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Parent value for ListNetworksRequest. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListNetworksRequest + * + * @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. Parent value for ListNetworksRequest. + * @type int $page_size + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results from the server. + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListNetworksRequest. + * + * 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. Parent value for ListNetworksRequest. + * + * 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; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksResponse.php new file mode 100644 index 000000000000..864d99abb0ef --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksResponse.php @@ -0,0 +1,135 @@ +google.cloud.baremetalsolution.v2.ListNetworksResponse + */ +class ListNetworksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of networks. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 1; + */ + private $networks; + /** + * A token identifying a page of results from the server. + * + * 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\BareMetalSolution\V2\Network>|\Google\Protobuf\Internal\RepeatedField $networks + * The list of networks. + * @type string $next_page_token + * A token identifying a page of results from the server. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * The list of networks. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworks() + { + return $this->networks; + } + + /** + * The list of networks. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\Network>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Network::class); + $this->networks = $arr; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results from the server. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesRequest.php new file mode 100644 index 000000000000..cc06bdec66a2 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesRequest.php @@ -0,0 +1,187 @@ +google.cloud.baremetalsolution.v2.ListNfsSharesRequest + */ +class ListNfsSharesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListNfsSharesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Parent value for ListNfsSharesRequest. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListNfsSharesRequest + * + * @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. Parent value for ListNfsSharesRequest. + * @type int $page_size + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results from the server. + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListNfsSharesRequest. + * + * 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. Parent value for ListNfsSharesRequest. + * + * 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; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesResponse.php new file mode 100644 index 000000000000..1af3d5e7c36c --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesResponse.php @@ -0,0 +1,135 @@ +google.cloud.baremetalsolution.v2.ListNfsSharesResponse + */ +class ListNfsSharesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of NFS shares. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; + */ + private $nfs_shares; + /** + * A token identifying a page of results from the server. + * + * 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\BareMetalSolution\V2\NfsShare>|\Google\Protobuf\Internal\RepeatedField $nfs_shares + * The list of NFS shares. + * @type string $next_page_token + * A token identifying a page of results from the server. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); + parent::__construct($data); + } + + /** + * The list of NFS shares. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNfsShares() + { + return $this->nfs_shares; + } + + /** + * The list of NFS shares. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\NfsShare>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNfsShares($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NfsShare::class); + $this->nfs_shares = $arr; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results from the server. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesRequest.php new file mode 100644 index 000000000000..195fef9c9222 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesRequest.php @@ -0,0 +1,161 @@ +google.cloud.baremetalsolution.v2.ListOSImagesRequest + */ +class ListOSImagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListProvisioningQuotasRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * Notice that page_size field is not supported and won't be respected in + * the API request for now, will be updated when pagination is supported. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent value for ListProvisioningQuotasRequest. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListOSImagesRequest + * + * @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. Parent value for ListProvisioningQuotasRequest. + * @type int $page_size + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * Notice that page_size field is not supported and won't be respected in + * the API request for now, will be updated when pagination is supported. + * @type string $page_token + * A token identifying a page of results from the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Osimage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListProvisioningQuotasRequest. + * + * 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. Parent value for ListProvisioningQuotasRequest. + * + * 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; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * Notice that page_size field is not supported and won't be respected in + * the API request for now, will be updated when pagination is supported. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * Notice that page_size field is not supported and won't be respected in + * the API request for now, will be updated when pagination is supported. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesResponse.php new file mode 100644 index 000000000000..92783d7acf49 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesResponse.php @@ -0,0 +1,105 @@ +google.cloud.baremetalsolution.v2.ListOSImagesResponse + */ +class ListOSImagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The OS images available. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.OSImage os_images = 1; + */ + private $os_images; + /** + * 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\BareMetalSolution\V2\OSImage>|\Google\Protobuf\Internal\RepeatedField $os_images + * The OS images available. + * @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\Baremetalsolution\V2\Osimage::initOnce(); + parent::__construct($data); + } + + /** + * The OS images available. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.OSImage os_images = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOsImages() + { + return $this->os_images; + } + + /** + * The OS images available. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.OSImage os_images = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\OSImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOsImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\OSImage::class); + $this->os_images = $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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasRequest.php new file mode 100644 index 000000000000..ef418f0024c7 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasRequest.php @@ -0,0 +1,161 @@ +google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest + */ +class ListProvisioningQuotasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListProvisioningQuotasRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * Notice that page_size field is not supported and won't be respected in + * the API request for now, will be updated when pagination is supported. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent value for ListProvisioningQuotasRequest. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListProvisioningQuotasRequest + * + * @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. Parent value for ListProvisioningQuotasRequest. + * @type int $page_size + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * Notice that page_size field is not supported and won't be respected in + * the API request for now, will be updated when pagination is supported. + * @type string $page_token + * A token identifying a page of results from the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListProvisioningQuotasRequest. + * + * 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. Parent value for ListProvisioningQuotasRequest. + * + * 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; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * Notice that page_size field is not supported and won't be respected in + * the API request for now, will be updated when pagination is supported. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * Notice that page_size field is not supported and won't be respected in + * the API request for now, will be updated when pagination is supported. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasResponse.php new file mode 100644 index 000000000000..a470f6384160 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasResponse.php @@ -0,0 +1,105 @@ +google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse + */ +class ListProvisioningQuotasResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The provisioning quotas registered in this project. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ProvisioningQuota provisioning_quotas = 1; + */ + private $provisioning_quotas; + /** + * 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\BareMetalSolution\V2\ProvisioningQuota>|\Google\Protobuf\Internal\RepeatedField $provisioning_quotas + * The provisioning quotas registered in this project. + * @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\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * The provisioning quotas registered in this project. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ProvisioningQuota provisioning_quotas = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProvisioningQuotas() + { + return $this->provisioning_quotas; + } + + /** + * The provisioning quotas registered in this project. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ProvisioningQuota provisioning_quotas = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\ProvisioningQuota>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProvisioningQuotas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\ProvisioningQuota::class); + $this->provisioning_quotas = $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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysRequest.php new file mode 100644 index 000000000000..9903fca07cad --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysRequest.php @@ -0,0 +1,154 @@ +google.cloud.baremetalsolution.v2.ListSSHKeysRequest + */ +class ListSSHKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent containing the SSH keys. + * Currently, the only valid value for the location is "global". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent containing the SSH keys. + * Currently, the only valid value for the location is "global". Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListSSHKeysRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent containing the SSH keys. + * Currently, the only valid value for the location is "global". + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\SshKey::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent containing the SSH keys. + * Currently, the only valid value for the location is "global". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent containing the SSH keys. + * Currently, the only valid value for the location is "global". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysResponse.php new file mode 100644 index 000000000000..149698e30a9c --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysResponse.php @@ -0,0 +1,105 @@ +google.cloud.baremetalsolution.v2.ListSSHKeysResponse + */ +class ListSSHKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The SSH keys registered in the project. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.SSHKey ssh_keys = 1; + */ + private $ssh_keys; + /** + * 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 = 90; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BareMetalSolution\V2\SSHKey>|\Google\Protobuf\Internal\RepeatedField $ssh_keys + * The SSH keys registered in the project. + * @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\Baremetalsolution\V2\SshKey::initOnce(); + parent::__construct($data); + } + + /** + * The SSH keys registered in the project. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.SSHKey ssh_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSshKeys() + { + return $this->ssh_keys; + } + + /** + * The SSH keys registered in the project. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.SSHKey ssh_keys = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\SSHKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSshKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\SSHKey::class); + $this->ssh_keys = $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 = 90; + * @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 = 90; + * @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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsRequest.php new file mode 100644 index 000000000000..a867334d12c0 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsRequest.php @@ -0,0 +1,153 @@ +google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest + */ +class ListVolumeSnapshotsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListVolumesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent value for ListVolumesRequest. Please see + * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListVolumeSnapshotsRequest + * + * @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. Parent value for ListVolumesRequest. + * @type int $page_size + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results from the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListVolumesRequest. + * + * 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. Parent value for ListVolumesRequest. + * + * 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; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsResponse.php new file mode 100644 index 000000000000..0905ddc4a4e7 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsResponse.php @@ -0,0 +1,135 @@ +google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse + */ +class ListVolumeSnapshotsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of snapshots. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + */ + private $volume_snapshots; + /** + * A token identifying a page of results from the server. + * + * 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\BareMetalSolution\V2\VolumeSnapshot>|\Google\Protobuf\Internal\RepeatedField $volume_snapshots + * The list of snapshots. + * @type string $next_page_token + * A token identifying a page of results from the server. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); + parent::__construct($data); + } + + /** + * The list of snapshots. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumeSnapshots() + { + return $this->volume_snapshots; + } + + /** + * The list of snapshots. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\VolumeSnapshot>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumeSnapshots($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot::class); + $this->volume_snapshots = $arr; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results from the server. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesRequest.php new file mode 100644 index 000000000000..cc4000006dcd --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesRequest.php @@ -0,0 +1,187 @@ +google.cloud.baremetalsolution.v2.ListVolumesRequest + */ +class ListVolumesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListVolumesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Parent value for ListVolumesRequest. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ListVolumesRequest + * + * @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. Parent value for ListVolumesRequest. + * @type int $page_size + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results from the server. + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListVolumesRequest. + * + * 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. Parent value for ListVolumesRequest. + * + * 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; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server might return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesResponse.php new file mode 100644 index 000000000000..c6df4005c656 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesResponse.php @@ -0,0 +1,135 @@ +google.cloud.baremetalsolution.v2.ListVolumesResponse + */ +class ListVolumesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of storage volumes. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 1; + */ + private $volumes; + /** + * A token identifying a page of results from the server. + * + * 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\BareMetalSolution\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * The list of storage volumes. + * @type string $next_page_token + * A token identifying a page of results from the server. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The list of storage volumes. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * The list of storage volumes. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * A token identifying a page of results from the server. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results from the server. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface.php new file mode 100644 index 000000000000..b5f309a88f6c --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface.php @@ -0,0 +1,151 @@ +google.cloud.baremetalsolution.v2.LogicalInterface + */ +class LogicalInterface extends \Google\Protobuf\Internal\Message +{ + /** + * List of logical network interfaces within a logical interface. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + */ + private $logical_network_interfaces; + /** + * Interface name. This is of syntax or and + * forms part of the network template name. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The index of the logical interface mapping to the index of the hardware + * bond or nic on the chosen network template. This field is deprecated. + * + * Generated from protobuf field int32 interface_index = 3 [deprecated = true]; + * @deprecated + */ + protected $interface_index = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface\LogicalNetworkInterface>|\Google\Protobuf\Internal\RepeatedField $logical_network_interfaces + * List of logical network interfaces within a logical interface. + * @type string $name + * Interface name. This is of syntax or and + * forms part of the network template name. + * @type int $interface_index + * The index of the logical interface mapping to the index of the hardware + * bond or nic on the chosen network template. This field is deprecated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * List of logical network interfaces within a logical interface. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogicalNetworkInterfaces() + { + return $this->logical_network_interfaces; + } + + /** + * List of logical network interfaces within a logical interface. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * @param array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface\LogicalNetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogicalNetworkInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\LogicalInterface\LogicalNetworkInterface::class); + $this->logical_network_interfaces = $arr; + + return $this; + } + + /** + * Interface name. This is of syntax or and + * forms part of the network template name. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Interface name. This is of syntax or and + * forms part of the network template name. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The index of the logical interface mapping to the index of the hardware + * bond or nic on the chosen network template. This field is deprecated. + * + * Generated from protobuf field int32 interface_index = 3 [deprecated = true]; + * @return int + * @deprecated + */ + public function getInterfaceIndex() + { + @trigger_error('interface_index is deprecated.', E_USER_DEPRECATED); + return $this->interface_index; + } + + /** + * The index of the logical interface mapping to the index of the hardware + * bond or nic on the chosen network template. This field is deprecated. + * + * Generated from protobuf field int32 interface_index = 3 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setInterfaceIndex($var) + { + @trigger_error('interface_index is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt32($var); + $this->interface_index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface/LogicalNetworkInterface.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface/LogicalNetworkInterface.php new file mode 100644 index 000000000000..f4de9eae30d7 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface/LogicalNetworkInterface.php @@ -0,0 +1,210 @@ +google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + */ +class LogicalNetworkInterface extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the network + * + * Generated from protobuf field string network = 1; + */ + protected $network = ''; + /** + * IP address in the network + * + * Generated from protobuf field string ip_address = 2; + */ + protected $ip_address = ''; + /** + * Whether this interface is the default gateway for the instance. Only + * one interface can be the default gateway for the instance. + * + * Generated from protobuf field bool default_gateway = 3; + */ + protected $default_gateway = false; + /** + * Type of network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + */ + protected $network_type = 0; + /** + * An identifier for the `Network`, generated by the backend. + * + * Generated from protobuf field string id = 5; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Name of the network + * @type string $ip_address + * IP address in the network + * @type bool $default_gateway + * Whether this interface is the default gateway for the instance. Only + * one interface can be the default gateway for the instance. + * @type int $network_type + * Type of network. + * @type string $id + * An identifier for the `Network`, generated by the backend. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Name of the network + * + * Generated from protobuf field string network = 1; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Name of the network + * + * Generated from protobuf field string network = 1; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * IP address in the network + * + * Generated from protobuf field string ip_address = 2; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address in the network + * + * Generated from protobuf field string ip_address = 2; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * Whether this interface is the default gateway for the instance. Only + * one interface can be the default gateway for the instance. + * + * Generated from protobuf field bool default_gateway = 3; + * @return bool + */ + public function getDefaultGateway() + { + return $this->default_gateway; + } + + /** + * Whether this interface is the default gateway for the instance. Only + * one interface can be the default gateway for the instance. + * + * Generated from protobuf field bool default_gateway = 3; + * @param bool $var + * @return $this + */ + public function setDefaultGateway($var) + { + GPBUtil::checkBool($var); + $this->default_gateway = $var; + + return $this; + } + + /** + * Type of network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * @return int + */ + public function getNetworkType() + { + return $this->network_type; + } + + /** + * Type of network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * @param int $var + * @return $this + */ + public function setNetworkType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Network\Type::class); + $this->network_type = $var; + + return $this; + } + + /** + * An identifier for the `Network`, generated by the backend. + * + * Generated from protobuf field string id = 5; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * An identifier for the `Network`, generated by the backend. + * + * Generated from protobuf field string id = 5; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LogicalNetworkInterface::class, \Google\Cloud\BareMetalSolution\V2\LogicalInterface_LogicalNetworkInterface::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun.php new file mode 100644 index 000000000000..d7d50ce6f8ba --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun.php @@ -0,0 +1,459 @@ +google.cloud.baremetalsolution.v2.Lun + */ +class Lun extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the LUN. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * An identifier for the LUN, generated by the backend. + * + * Generated from protobuf field string id = 10; + */ + protected $id = ''; + /** + * The state of this storage volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.State state = 2; + */ + protected $state = 0; + /** + * The size of this LUN, in gigabytes. + * + * Generated from protobuf field int64 size_gb = 3; + */ + protected $size_gb = 0; + /** + * The LUN multiprotocol type ensures the characteristics of the LUN are + * optimized for each operating system. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4; + */ + protected $multiprotocol_type = 0; + /** + * Display the storage volume for this LUN. + * + * Generated from protobuf field string storage_volume = 5 [(.google.api.resource_reference) = { + */ + protected $storage_volume = ''; + /** + * Display if this LUN can be shared between multiple physical servers. + * + * Generated from protobuf field bool shareable = 6; + */ + protected $shareable = false; + /** + * Display if this LUN is a boot LUN. + * + * Generated from protobuf field bool boot_lun = 7; + */ + protected $boot_lun = false; + /** + * The storage type for this LUN. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8; + */ + protected $storage_type = 0; + /** + * The WWID for this LUN. + * + * Generated from protobuf field string wwid = 9; + */ + protected $wwid = ''; + /** + * Output only. Time after which LUN will be fully deleted. + * It is filled only for LUNs in COOL_OFF state. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. Instances this Lun is attached to. + * + * Generated from protobuf field repeated string instances = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the LUN. + * @type string $id + * An identifier for the LUN, generated by the backend. + * @type int $state + * The state of this storage volume. + * @type int|string $size_gb + * The size of this LUN, in gigabytes. + * @type int $multiprotocol_type + * The LUN multiprotocol type ensures the characteristics of the LUN are + * optimized for each operating system. + * @type string $storage_volume + * Display the storage volume for this LUN. + * @type bool $shareable + * Display if this LUN can be shared between multiple physical servers. + * @type bool $boot_lun + * Display if this LUN is a boot LUN. + * @type int $storage_type + * The storage type for this LUN. + * @type string $wwid + * The WWID for this LUN. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. Time after which LUN will be fully deleted. + * It is filled only for LUNs in COOL_OFF state. + * @type array|\Google\Protobuf\Internal\RepeatedField $instances + * Output only. Instances this Lun is attached to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the LUN. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the LUN. + * + * 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; + } + + /** + * An identifier for the LUN, generated by the backend. + * + * Generated from protobuf field string id = 10; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * An identifier for the LUN, generated by the backend. + * + * Generated from protobuf field string id = 10; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The state of this storage volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of this storage volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Lun\State::class); + $this->state = $var; + + return $this; + } + + /** + * The size of this LUN, in gigabytes. + * + * Generated from protobuf field int64 size_gb = 3; + * @return int|string + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * The size of this LUN, in gigabytes. + * + * Generated from protobuf field int64 size_gb = 3; + * @param int|string $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->size_gb = $var; + + return $this; + } + + /** + * The LUN multiprotocol type ensures the characteristics of the LUN are + * optimized for each operating system. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4; + * @return int + */ + public function getMultiprotocolType() + { + return $this->multiprotocol_type; + } + + /** + * The LUN multiprotocol type ensures the characteristics of the LUN are + * optimized for each operating system. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4; + * @param int $var + * @return $this + */ + public function setMultiprotocolType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Lun\MultiprotocolType::class); + $this->multiprotocol_type = $var; + + return $this; + } + + /** + * Display the storage volume for this LUN. + * + * Generated from protobuf field string storage_volume = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getStorageVolume() + { + return $this->storage_volume; + } + + /** + * Display the storage volume for this LUN. + * + * Generated from protobuf field string storage_volume = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStorageVolume($var) + { + GPBUtil::checkString($var, True); + $this->storage_volume = $var; + + return $this; + } + + /** + * Display if this LUN can be shared between multiple physical servers. + * + * Generated from protobuf field bool shareable = 6; + * @return bool + */ + public function getShareable() + { + return $this->shareable; + } + + /** + * Display if this LUN can be shared between multiple physical servers. + * + * Generated from protobuf field bool shareable = 6; + * @param bool $var + * @return $this + */ + public function setShareable($var) + { + GPBUtil::checkBool($var); + $this->shareable = $var; + + return $this; + } + + /** + * Display if this LUN is a boot LUN. + * + * Generated from protobuf field bool boot_lun = 7; + * @return bool + */ + public function getBootLun() + { + return $this->boot_lun; + } + + /** + * Display if this LUN is a boot LUN. + * + * Generated from protobuf field bool boot_lun = 7; + * @param bool $var + * @return $this + */ + public function setBootLun($var) + { + GPBUtil::checkBool($var); + $this->boot_lun = $var; + + return $this; + } + + /** + * The storage type for this LUN. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8; + * @return int + */ + public function getStorageType() + { + return $this->storage_type; + } + + /** + * The storage type for this LUN. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8; + * @param int $var + * @return $this + */ + public function setStorageType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Lun\StorageType::class); + $this->storage_type = $var; + + return $this; + } + + /** + * The WWID for this LUN. + * + * Generated from protobuf field string wwid = 9; + * @return string + */ + public function getWwid() + { + return $this->wwid; + } + + /** + * The WWID for this LUN. + * + * Generated from protobuf field string wwid = 9; + * @param string $var + * @return $this + */ + public function setWwid($var) + { + GPBUtil::checkString($var, True); + $this->wwid = $var; + + return $this; + } + + /** + * Output only. Time after which LUN will be fully deleted. + * It is filled only for LUNs in COOL_OFF state. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. Time after which LUN will be fully deleted. + * It is filled only for LUNs in COOL_OFF state. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. Instances this Lun is attached to. + * + * Generated from protobuf field repeated string instances = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Output only. Instances this Lun is attached to. + * + * Generated from protobuf field repeated string instances = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instances = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/MultiprotocolType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/MultiprotocolType.php new file mode 100644 index 000000000000..c9390ce09906 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/MultiprotocolType.php @@ -0,0 +1,57 @@ +google.cloud.baremetalsolution.v2.Lun.MultiprotocolType + */ +class MultiprotocolType +{ + /** + * Server has no OS specified. + * + * Generated from protobuf enum MULTIPROTOCOL_TYPE_UNSPECIFIED = 0; + */ + const MULTIPROTOCOL_TYPE_UNSPECIFIED = 0; + /** + * Server with Linux OS. + * + * Generated from protobuf enum LINUX = 1; + */ + const LINUX = 1; + + private static $valueToName = [ + self::MULTIPROTOCOL_TYPE_UNSPECIFIED => 'MULTIPROTOCOL_TYPE_UNSPECIFIED', + self::LINUX => 'LINUX', + ]; + + 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(MultiprotocolType::class, \Google\Cloud\BareMetalSolution\V2\Lun_MultiprotocolType::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/State.php new file mode 100644 index 000000000000..0d226c388658 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/State.php @@ -0,0 +1,85 @@ +google.cloud.baremetalsolution.v2.Lun.State + */ +class State +{ + /** + * The LUN is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The LUN is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The LUN is being updated. + * + * Generated from protobuf enum UPDATING = 2; + */ + const UPDATING = 2; + /** + * The LUN is ready for use. + * + * Generated from protobuf enum READY = 3; + */ + const READY = 3; + /** + * The LUN has been requested to be deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The LUN is in cool off state. It will be deleted after `expire_time`. + * + * Generated from protobuf enum COOL_OFF = 5; + */ + const COOL_OFF = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::COOL_OFF => 'COOL_OFF', + ]; + + 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\BareMetalSolution\V2\Lun_State::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/StorageType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/StorageType.php new file mode 100644 index 000000000000..f6896f77e408 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/StorageType.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.Lun.StorageType + */ +class StorageType +{ + /** + * The storage type for this LUN is unknown. + * + * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; + */ + const STORAGE_TYPE_UNSPECIFIED = 0; + /** + * This storage type for this LUN is SSD. + * + * Generated from protobuf enum SSD = 1; + */ + const SSD = 1; + /** + * This storage type for this LUN is HDD. + * + * Generated from protobuf enum HDD = 2; + */ + const HDD = 2; + + private static $valueToName = [ + self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', + self::SSD => 'SSD', + self::HDD => 'HDD', + ]; + + 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(StorageType::class, \Google\Cloud\BareMetalSolution\V2\Lun_StorageType::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network.php new file mode 100644 index 000000000000..22f2706398da --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network.php @@ -0,0 +1,611 @@ +google.cloud.baremetalsolution.v2.Network + */ +class Network extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this `Network`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/networks/{network}` + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * An identifier for the `Network`, generated by the backend. + * + * Generated from protobuf field string id = 10; + */ + protected $id = ''; + /** + * The type of this network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type type = 2; + */ + protected $type = 0; + /** + * IP address configured. + * + * Generated from protobuf field string ip_address = 3; + */ + protected $ip_address = ''; + /** + * List of physical interfaces. + * + * Generated from protobuf field repeated string mac_address = 4; + */ + private $mac_address; + /** + * The Network state. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.State state = 6; + */ + protected $state = 0; + /** + * The vlan id of the Network. + * + * Generated from protobuf field string vlan_id = 7; + */ + protected $vlan_id = ''; + /** + * The cidr of the Network. + * + * Generated from protobuf field string cidr = 8; + */ + protected $cidr = ''; + /** + * The vrf for the Network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF vrf = 9; + */ + protected $vrf = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 11; + */ + private $labels; + /** + * IP range for reserved for services (e.g. NFS). + * + * Generated from protobuf field string services_cidr = 12; + */ + protected $services_cidr = ''; + /** + * List of IP address reservations in this network. + * When updating this field, an error will be generated if a reservation + * conflicts with an IP address already allocated to a physical server. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + */ + private $reservations; + /** + * Output only. Pod name. + * + * Generated from protobuf field string pod = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pod = ''; + /** + * Input only. List of mount points to attach the network to. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkMountPoint mount_points = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + private $mount_points; + /** + * Whether network uses standard frames or jumbo ones. + * + * Generated from protobuf field bool jumbo_frames_enabled = 16; + */ + protected $jumbo_frames_enabled = false; + /** + * Output only. Gateway ip address. + * + * Generated from protobuf field string gateway_ip = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $gateway_ip = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this `Network`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/networks/{network}` + * @type string $id + * An identifier for the `Network`, generated by the backend. + * @type int $type + * The type of this network. + * @type string $ip_address + * IP address configured. + * @type array|\Google\Protobuf\Internal\RepeatedField $mac_address + * List of physical interfaces. + * @type int $state + * The Network state. + * @type string $vlan_id + * The vlan id of the Network. + * @type string $cidr + * The cidr of the Network. + * @type \Google\Cloud\BareMetalSolution\V2\VRF $vrf + * The vrf for the Network. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type string $services_cidr + * IP range for reserved for services (e.g. NFS). + * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkAddressReservation>|\Google\Protobuf\Internal\RepeatedField $reservations + * List of IP address reservations in this network. + * When updating this field, an error will be generated if a reservation + * conflicts with an IP address already allocated to a physical server. + * @type string $pod + * Output only. Pod name. + * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkMountPoint>|\Google\Protobuf\Internal\RepeatedField $mount_points + * Input only. List of mount points to attach the network to. + * @type bool $jumbo_frames_enabled + * Whether network uses standard frames or jumbo ones. + * @type string $gateway_ip + * Output only. Gateway ip address. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this `Network`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/networks/{network}` + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of this `Network`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/networks/{network}` + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * An identifier for the `Network`, generated by the backend. + * + * Generated from protobuf field string id = 10; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * An identifier for the `Network`, generated by the backend. + * + * Generated from protobuf field string id = 10; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The type of this network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Network\Type::class); + $this->type = $var; + + return $this; + } + + /** + * IP address configured. + * + * Generated from protobuf field string ip_address = 3; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address configured. + * + * Generated from protobuf field string ip_address = 3; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * List of physical interfaces. + * + * Generated from protobuf field repeated string mac_address = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMacAddress() + { + return $this->mac_address; + } + + /** + * List of physical interfaces. + * + * Generated from protobuf field repeated string mac_address = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMacAddress($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->mac_address = $arr; + + return $this; + } + + /** + * The Network state. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.State state = 6; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The Network state. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.State state = 6; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Network\State::class); + $this->state = $var; + + return $this; + } + + /** + * The vlan id of the Network. + * + * Generated from protobuf field string vlan_id = 7; + * @return string + */ + public function getVlanId() + { + return $this->vlan_id; + } + + /** + * The vlan id of the Network. + * + * Generated from protobuf field string vlan_id = 7; + * @param string $var + * @return $this + */ + public function setVlanId($var) + { + GPBUtil::checkString($var, True); + $this->vlan_id = $var; + + return $this; + } + + /** + * The cidr of the Network. + * + * Generated from protobuf field string cidr = 8; + * @return string + */ + public function getCidr() + { + return $this->cidr; + } + + /** + * The cidr of the Network. + * + * Generated from protobuf field string cidr = 8; + * @param string $var + * @return $this + */ + public function setCidr($var) + { + GPBUtil::checkString($var, True); + $this->cidr = $var; + + return $this; + } + + /** + * The vrf for the Network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF vrf = 9; + * @return \Google\Cloud\BareMetalSolution\V2\VRF|null + */ + public function getVrf() + { + return $this->vrf; + } + + public function hasVrf() + { + return isset($this->vrf); + } + + public function clearVrf() + { + unset($this->vrf); + } + + /** + * The vrf for the Network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF vrf = 9; + * @param \Google\Cloud\BareMetalSolution\V2\VRF $var + * @return $this + */ + public function setVrf($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\VRF::class); + $this->vrf = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 11; + * @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; + } + + /** + * IP range for reserved for services (e.g. NFS). + * + * Generated from protobuf field string services_cidr = 12; + * @return string + */ + public function getServicesCidr() + { + return $this->services_cidr; + } + + /** + * IP range for reserved for services (e.g. NFS). + * + * Generated from protobuf field string services_cidr = 12; + * @param string $var + * @return $this + */ + public function setServicesCidr($var) + { + GPBUtil::checkString($var, True); + $this->services_cidr = $var; + + return $this; + } + + /** + * List of IP address reservations in this network. + * When updating this field, an error will be generated if a reservation + * conflicts with an IP address already allocated to a physical server. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReservations() + { + return $this->reservations; + } + + /** + * List of IP address reservations in this network. + * When updating this field, an error will be generated if a reservation + * conflicts with an IP address already allocated to a physical server. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkAddressReservation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReservations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkAddressReservation::class); + $this->reservations = $arr; + + return $this; + } + + /** + * Output only. Pod name. + * + * Generated from protobuf field string pod = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPod() + { + return $this->pod; + } + + /** + * Output only. Pod name. + * + * Generated from protobuf field string pod = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPod($var) + { + GPBUtil::checkString($var, True); + $this->pod = $var; + + return $this; + } + + /** + * Input only. List of mount points to attach the network to. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkMountPoint mount_points = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMountPoints() + { + return $this->mount_points; + } + + /** + * Input only. List of mount points to attach the network to. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkMountPoint mount_points = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkMountPoint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMountPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkMountPoint::class); + $this->mount_points = $arr; + + return $this; + } + + /** + * Whether network uses standard frames or jumbo ones. + * + * Generated from protobuf field bool jumbo_frames_enabled = 16; + * @return bool + */ + public function getJumboFramesEnabled() + { + return $this->jumbo_frames_enabled; + } + + /** + * Whether network uses standard frames or jumbo ones. + * + * Generated from protobuf field bool jumbo_frames_enabled = 16; + * @param bool $var + * @return $this + */ + public function setJumboFramesEnabled($var) + { + GPBUtil::checkBool($var); + $this->jumbo_frames_enabled = $var; + + return $this; + } + + /** + * Output only. Gateway ip address. + * + * Generated from protobuf field string gateway_ip = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGatewayIp() + { + return $this->gateway_ip; + } + + /** + * Output only. Gateway ip address. + * + * Generated from protobuf field string gateway_ip = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGatewayIp($var) + { + GPBUtil::checkString($var, True); + $this->gateway_ip = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/State.php new file mode 100644 index 000000000000..461eaa871ee6 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/State.php @@ -0,0 +1,78 @@ +google.cloud.baremetalsolution.v2.Network.State + */ +class State +{ + /** + * The Network is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The Network is provisioning. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The Network has been provisioned. + * + * Generated from protobuf enum PROVISIONED = 2; + */ + const PROVISIONED = 2; + /** + * The Network is being deprovisioned. + * + * Generated from protobuf enum DEPROVISIONING = 3; + */ + const DEPROVISIONING = 3; + /** + * The Network is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::PROVISIONED => 'PROVISIONED', + self::DEPROVISIONING => 'DEPROVISIONING', + self::UPDATING => 'UPDATING', + ]; + + 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\BareMetalSolution\V2\Network_State::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/Type.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/Type.php new file mode 100644 index 000000000000..5b7a71e8a639 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/Type.php @@ -0,0 +1,68 @@ +google.cloud.baremetalsolution.v2.Network.Type + */ +class Type +{ + /** + * Unspecified value. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Client network, a network peered to a Google Cloud VPC. + * + * Generated from protobuf enum CLIENT = 1; + */ + const CLIENT = 1; + /** + * Private network, a network local to the Bare Metal Solution environment. + * + * Generated from protobuf enum PRIVATE = 2; + */ + const PBPRIVATE = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::CLIENT => 'CLIENT', + self::PBPRIVATE => 'PRIVATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\BareMetalSolution\V2\Network_Type::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkAddressReservation.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkAddressReservation.php new file mode 100644 index 000000000000..e9164232774a --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkAddressReservation.php @@ -0,0 +1,151 @@ +google.cloud.baremetalsolution.v2.NetworkAddressReservation + */ +class NetworkAddressReservation extends \Google\Protobuf\Internal\Message +{ + /** + * The first address of this reservation block. + * Must be specified as a single IPv4 address, e.g. 10.1.2.2. + * + * Generated from protobuf field string start_address = 1; + */ + protected $start_address = ''; + /** + * The last address of this reservation block, inclusive. I.e., for cases when + * reservations are only single addresses, end_address and start_address will + * be the same. + * Must be specified as a single IPv4 address, e.g. 10.1.2.2. + * + * Generated from protobuf field string end_address = 2; + */ + protected $end_address = ''; + /** + * A note about this reservation, intended for human consumption. + * + * Generated from protobuf field string note = 3; + */ + protected $note = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_address + * The first address of this reservation block. + * Must be specified as a single IPv4 address, e.g. 10.1.2.2. + * @type string $end_address + * The last address of this reservation block, inclusive. I.e., for cases when + * reservations are only single addresses, end_address and start_address will + * be the same. + * Must be specified as a single IPv4 address, e.g. 10.1.2.2. + * @type string $note + * A note about this reservation, intended for human consumption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * The first address of this reservation block. + * Must be specified as a single IPv4 address, e.g. 10.1.2.2. + * + * Generated from protobuf field string start_address = 1; + * @return string + */ + public function getStartAddress() + { + return $this->start_address; + } + + /** + * The first address of this reservation block. + * Must be specified as a single IPv4 address, e.g. 10.1.2.2. + * + * Generated from protobuf field string start_address = 1; + * @param string $var + * @return $this + */ + public function setStartAddress($var) + { + GPBUtil::checkString($var, True); + $this->start_address = $var; + + return $this; + } + + /** + * The last address of this reservation block, inclusive. I.e., for cases when + * reservations are only single addresses, end_address and start_address will + * be the same. + * Must be specified as a single IPv4 address, e.g. 10.1.2.2. + * + * Generated from protobuf field string end_address = 2; + * @return string + */ + public function getEndAddress() + { + return $this->end_address; + } + + /** + * The last address of this reservation block, inclusive. I.e., for cases when + * reservations are only single addresses, end_address and start_address will + * be the same. + * Must be specified as a single IPv4 address, e.g. 10.1.2.2. + * + * Generated from protobuf field string end_address = 2; + * @param string $var + * @return $this + */ + public function setEndAddress($var) + { + GPBUtil::checkString($var, True); + $this->end_address = $var; + + return $this; + } + + /** + * A note about this reservation, intended for human consumption. + * + * Generated from protobuf field string note = 3; + * @return string + */ + public function getNote() + { + return $this->note; + } + + /** + * A note about this reservation, intended for human consumption. + * + * Generated from protobuf field string note = 3; + * @param string $var + * @return $this + */ + public function setNote($var) + { + GPBUtil::checkString($var, True); + $this->note = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig.php new file mode 100644 index 000000000000..85659bf9e249 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig.php @@ -0,0 +1,423 @@ +google.cloud.baremetalsolution.v2.NetworkConfig + */ +class NetworkConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the network config. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * A transient unique identifier to identify a volume within an + * ProvisioningConfig request. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + /** + * The type of this network, either Client or Private. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Type type = 3; + */ + protected $type = 0; + /** + * Interconnect bandwidth. Set only when type is CLIENT. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth bandwidth = 4; + */ + protected $bandwidth = 0; + /** + * List of VLAN attachments. As of now there are always 2 attachments, but it + * is going to change in the future (multi vlan). + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment vlan_attachments = 5; + */ + private $vlan_attachments; + /** + * CIDR range of the network. + * + * Generated from protobuf field string cidr = 6; + */ + protected $cidr = ''; + /** + * Service CIDR, if any. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr service_cidr = 7; + */ + protected $service_cidr = 0; + /** + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * + * Generated from protobuf field string user_note = 8; + */ + protected $user_note = ''; + /** + * The GCP service of the network. Available gcp_service are in + * https://cloud.google.com/bare-metal/docs/bms-planning. + * + * Generated from protobuf field string gcp_service = 9; + */ + protected $gcp_service = ''; + /** + * Whether the VLAN attachment pair is located in the same project. + * + * Generated from protobuf field bool vlan_same_project = 10; + */ + protected $vlan_same_project = false; + /** + * The JumboFramesEnabled option for customer to set. + * + * Generated from protobuf field bool jumbo_frames_enabled = 11; + */ + protected $jumbo_frames_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the network config. + * @type string $id + * A transient unique identifier to identify a volume within an + * ProvisioningConfig request. + * @type int $type + * The type of this network, either Client or Private. + * @type int $bandwidth + * Interconnect bandwidth. Set only when type is CLIENT. + * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkConfig\IntakeVlanAttachment>|\Google\Protobuf\Internal\RepeatedField $vlan_attachments + * List of VLAN attachments. As of now there are always 2 attachments, but it + * is going to change in the future (multi vlan). + * @type string $cidr + * CIDR range of the network. + * @type int $service_cidr + * Service CIDR, if any. + * @type string $user_note + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * @type string $gcp_service + * The GCP service of the network. Available gcp_service are in + * https://cloud.google.com/bare-metal/docs/bms-planning. + * @type bool $vlan_same_project + * Whether the VLAN attachment pair is located in the same project. + * @type bool $jumbo_frames_enabled + * The JumboFramesEnabled option for customer to set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the network config. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the network config. + * + * 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; + } + + /** + * A transient unique identifier to identify a volume within an + * ProvisioningConfig request. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * A transient unique identifier to identify a volume within an + * ProvisioningConfig request. + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The type of this network, either Client or Private. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Type type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this network, either Client or Private. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Type type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NetworkConfig\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Interconnect bandwidth. Set only when type is CLIENT. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth bandwidth = 4; + * @return int + */ + public function getBandwidth() + { + return $this->bandwidth; + } + + /** + * Interconnect bandwidth. Set only when type is CLIENT. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth bandwidth = 4; + * @param int $var + * @return $this + */ + public function setBandwidth($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NetworkConfig\Bandwidth::class); + $this->bandwidth = $var; + + return $this; + } + + /** + * List of VLAN attachments. As of now there are always 2 attachments, but it + * is going to change in the future (multi vlan). + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment vlan_attachments = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVlanAttachments() + { + return $this->vlan_attachments; + } + + /** + * List of VLAN attachments. As of now there are always 2 attachments, but it + * is going to change in the future (multi vlan). + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment vlan_attachments = 5; + * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkConfig\IntakeVlanAttachment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVlanAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkConfig\IntakeVlanAttachment::class); + $this->vlan_attachments = $arr; + + return $this; + } + + /** + * CIDR range of the network. + * + * Generated from protobuf field string cidr = 6; + * @return string + */ + public function getCidr() + { + return $this->cidr; + } + + /** + * CIDR range of the network. + * + * Generated from protobuf field string cidr = 6; + * @param string $var + * @return $this + */ + public function setCidr($var) + { + GPBUtil::checkString($var, True); + $this->cidr = $var; + + return $this; + } + + /** + * Service CIDR, if any. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr service_cidr = 7; + * @return int + */ + public function getServiceCidr() + { + return $this->service_cidr; + } + + /** + * Service CIDR, if any. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr service_cidr = 7; + * @param int $var + * @return $this + */ + public function setServiceCidr($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NetworkConfig\ServiceCidr::class); + $this->service_cidr = $var; + + return $this; + } + + /** + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * + * Generated from protobuf field string user_note = 8; + * @return string + */ + public function getUserNote() + { + return $this->user_note; + } + + /** + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * + * Generated from protobuf field string user_note = 8; + * @param string $var + * @return $this + */ + public function setUserNote($var) + { + GPBUtil::checkString($var, True); + $this->user_note = $var; + + return $this; + } + + /** + * The GCP service of the network. Available gcp_service are in + * https://cloud.google.com/bare-metal/docs/bms-planning. + * + * Generated from protobuf field string gcp_service = 9; + * @return string + */ + public function getGcpService() + { + return $this->gcp_service; + } + + /** + * The GCP service of the network. Available gcp_service are in + * https://cloud.google.com/bare-metal/docs/bms-planning. + * + * Generated from protobuf field string gcp_service = 9; + * @param string $var + * @return $this + */ + public function setGcpService($var) + { + GPBUtil::checkString($var, True); + $this->gcp_service = $var; + + return $this; + } + + /** + * Whether the VLAN attachment pair is located in the same project. + * + * Generated from protobuf field bool vlan_same_project = 10; + * @return bool + */ + public function getVlanSameProject() + { + return $this->vlan_same_project; + } + + /** + * Whether the VLAN attachment pair is located in the same project. + * + * Generated from protobuf field bool vlan_same_project = 10; + * @param bool $var + * @return $this + */ + public function setVlanSameProject($var) + { + GPBUtil::checkBool($var); + $this->vlan_same_project = $var; + + return $this; + } + + /** + * The JumboFramesEnabled option for customer to set. + * + * Generated from protobuf field bool jumbo_frames_enabled = 11; + * @return bool + */ + public function getJumboFramesEnabled() + { + return $this->jumbo_frames_enabled; + } + + /** + * The JumboFramesEnabled option for customer to set. + * + * Generated from protobuf field bool jumbo_frames_enabled = 11; + * @param bool $var + * @return $this + */ + public function setJumboFramesEnabled($var) + { + GPBUtil::checkBool($var); + $this->jumbo_frames_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Bandwidth.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Bandwidth.php new file mode 100644 index 000000000000..b1f187f83d13 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Bandwidth.php @@ -0,0 +1,78 @@ +google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth + */ +class Bandwidth +{ + /** + * Unspecified value. + * + * Generated from protobuf enum BANDWIDTH_UNSPECIFIED = 0; + */ + const BANDWIDTH_UNSPECIFIED = 0; + /** + * 1 Gbps. + * + * Generated from protobuf enum BW_1_GBPS = 1; + */ + const BW_1_GBPS = 1; + /** + * 2 Gbps. + * + * Generated from protobuf enum BW_2_GBPS = 2; + */ + const BW_2_GBPS = 2; + /** + * 5 Gbps. + * + * Generated from protobuf enum BW_5_GBPS = 3; + */ + const BW_5_GBPS = 3; + /** + * 10 Gbps. + * + * Generated from protobuf enum BW_10_GBPS = 4; + */ + const BW_10_GBPS = 4; + + private static $valueToName = [ + self::BANDWIDTH_UNSPECIFIED => 'BANDWIDTH_UNSPECIFIED', + self::BW_1_GBPS => 'BW_1_GBPS', + self::BW_2_GBPS => 'BW_2_GBPS', + self::BW_5_GBPS => 'BW_5_GBPS', + self::BW_10_GBPS => 'BW_10_GBPS', + ]; + + 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(Bandwidth::class, \Google\Cloud\BareMetalSolution\V2\NetworkConfig_Bandwidth::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/IntakeVlanAttachment.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/IntakeVlanAttachment.php new file mode 100644 index 000000000000..3b6c74ad0653 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/IntakeVlanAttachment.php @@ -0,0 +1,104 @@ +google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment + */ +class IntakeVlanAttachment extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier of the VLAN attachment. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Attachment pairing key. + * + * Generated from protobuf field string pairing_key = 2; + */ + protected $pairing_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Identifier of the VLAN attachment. + * @type string $pairing_key + * Attachment pairing key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Identifier of the VLAN attachment. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Identifier of the VLAN attachment. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Attachment pairing key. + * + * Generated from protobuf field string pairing_key = 2; + * @return string + */ + public function getPairingKey() + { + return $this->pairing_key; + } + + /** + * Attachment pairing key. + * + * Generated from protobuf field string pairing_key = 2; + * @param string $var + * @return $this + */ + public function setPairingKey($var) + { + GPBUtil::checkString($var, True); + $this->pairing_key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IntakeVlanAttachment::class, \Google\Cloud\BareMetalSolution\V2\NetworkConfig_IntakeVlanAttachment::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/ServiceCidr.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/ServiceCidr.php new file mode 100644 index 000000000000..fef9ef5310e5 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/ServiceCidr.php @@ -0,0 +1,78 @@ +google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr + */ +class ServiceCidr +{ + /** + * Unspecified value. + * + * Generated from protobuf enum SERVICE_CIDR_UNSPECIFIED = 0; + */ + const SERVICE_CIDR_UNSPECIFIED = 0; + /** + * Services are disabled for the given network. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Use the highest /26 block of the network to host services. + * + * Generated from protobuf enum HIGH_26 = 2; + */ + const HIGH_26 = 2; + /** + * Use the highest /27 block of the network to host services. + * + * Generated from protobuf enum HIGH_27 = 3; + */ + const HIGH_27 = 3; + /** + * Use the highest /28 block of the network to host services. + * + * Generated from protobuf enum HIGH_28 = 4; + */ + const HIGH_28 = 4; + + private static $valueToName = [ + self::SERVICE_CIDR_UNSPECIFIED => 'SERVICE_CIDR_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::HIGH_26 => 'HIGH_26', + self::HIGH_27 => 'HIGH_27', + self::HIGH_28 => 'HIGH_28', + ]; + + 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(ServiceCidr::class, \Google\Cloud\BareMetalSolution\V2\NetworkConfig_ServiceCidr::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Type.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Type.php new file mode 100644 index 000000000000..7ad2e6357a0f --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Type.php @@ -0,0 +1,68 @@ +google.cloud.baremetalsolution.v2.NetworkConfig.Type + */ +class Type +{ + /** + * Unspecified value. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Client network, that is a network peered to a GCP VPC. + * + * Generated from protobuf enum CLIENT = 1; + */ + const CLIENT = 1; + /** + * Private network, that is a network local to the BMS POD. + * + * Generated from protobuf enum PRIVATE = 2; + */ + const PBPRIVATE = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::CLIENT => 'CLIENT', + self::PBPRIVATE => 'PRIVATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\BareMetalSolution\V2\NetworkConfig_Type::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkMountPoint.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkMountPoint.php new file mode 100644 index 000000000000..a147b3f1fa57 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkMountPoint.php @@ -0,0 +1,169 @@ +google.cloud.baremetalsolution.v2.NetworkMountPoint + */ +class NetworkMountPoint extends \Google\Protobuf\Internal\Message +{ + /** + * Instance to attach network to. + * + * Generated from protobuf field string instance = 1 [(.google.api.resource_reference) = { + */ + protected $instance = ''; + /** + * Logical interface to detach from. + * + * Generated from protobuf field string logical_interface = 2; + */ + protected $logical_interface = ''; + /** + * Network should be a default gateway. + * + * Generated from protobuf field bool default_gateway = 3; + */ + protected $default_gateway = false; + /** + * Ip address of the server. + * + * Generated from protobuf field string ip_address = 4; + */ + protected $ip_address = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Instance to attach network to. + * @type string $logical_interface + * Logical interface to detach from. + * @type bool $default_gateway + * Network should be a default gateway. + * @type string $ip_address + * Ip address of the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Instance to attach network to. + * + * Generated from protobuf field string instance = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Instance to attach network to. + * + * Generated from protobuf field string instance = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Logical interface to detach from. + * + * Generated from protobuf field string logical_interface = 2; + * @return string + */ + public function getLogicalInterface() + { + return $this->logical_interface; + } + + /** + * Logical interface to detach from. + * + * Generated from protobuf field string logical_interface = 2; + * @param string $var + * @return $this + */ + public function setLogicalInterface($var) + { + GPBUtil::checkString($var, True); + $this->logical_interface = $var; + + return $this; + } + + /** + * Network should be a default gateway. + * + * Generated from protobuf field bool default_gateway = 3; + * @return bool + */ + public function getDefaultGateway() + { + return $this->default_gateway; + } + + /** + * Network should be a default gateway. + * + * Generated from protobuf field bool default_gateway = 3; + * @param bool $var + * @return $this + */ + public function setDefaultGateway($var) + { + GPBUtil::checkBool($var); + $this->default_gateway = $var; + + return $this; + } + + /** + * Ip address of the server. + * + * Generated from protobuf field string ip_address = 4; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * Ip address of the server. + * + * Generated from protobuf field string ip_address = 4; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkUsage.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkUsage.php new file mode 100644 index 000000000000..789ec3aa94c0 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkUsage.php @@ -0,0 +1,111 @@ +google.cloud.baremetalsolution.v2.NetworkUsage + */ +class NetworkUsage extends \Google\Protobuf\Internal\Message +{ + /** + * Network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1; + */ + protected $network = null; + /** + * All used IP addresses in this network. + * + * Generated from protobuf field repeated string used_ips = 2; + */ + private $used_ips; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BareMetalSolution\V2\Network $network + * Network. + * @type array|\Google\Protobuf\Internal\RepeatedField $used_ips + * All used IP addresses in this network. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1; + * @return \Google\Cloud\BareMetalSolution\V2\Network|null + */ + public function getNetwork() + { + return $this->network; + } + + public function hasNetwork() + { + return isset($this->network); + } + + public function clearNetwork() + { + unset($this->network); + } + + /** + * Network. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1; + * @param \Google\Cloud\BareMetalSolution\V2\Network $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Network::class); + $this->network = $var; + + return $this; + } + + /** + * All used IP addresses in this network. + * + * Generated from protobuf field repeated string used_ips = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUsedIps() + { + return $this->used_ips; + } + + /** + * All used IP addresses in this network. + * + * Generated from protobuf field repeated string used_ips = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUsedIps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->used_ips = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare.php new file mode 100644 index 000000000000..2362d9d26764 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare.php @@ -0,0 +1,351 @@ +google.cloud.baremetalsolution.v2.NfsShare + */ +class NfsShare extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The name of the NFS share. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. An identifier for the NFS share, generated by the backend. + * This field will be deprecated in the future, use `id` instead. + * + * Generated from protobuf field string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nfs_share_id = ''; + /** + * Output only. An identifier for the NFS share, generated by the backend. + * This is the same value as nfs_share_id and will replace it in the future. + * + * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * Output only. The state of the NFS share. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The underlying volume of the share. Created automatically + * during provisioning. + * + * Generated from protobuf field string volume = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $volume = ''; + /** + * List of allowed access points. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + */ + private $allowed_clients; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 6; + */ + private $labels; + /** + * The requested size, in GiB. + * + * Generated from protobuf field int64 requested_size_gib = 7; + */ + protected $requested_size_gib = 0; + /** + * Immutable. The storage type of the underlying volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.StorageType storage_type = 9 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $storage_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The name of the NFS share. + * @type string $nfs_share_id + * Output only. An identifier for the NFS share, generated by the backend. + * This field will be deprecated in the future, use `id` instead. + * @type string $id + * Output only. An identifier for the NFS share, generated by the backend. + * This is the same value as nfs_share_id and will replace it in the future. + * @type int $state + * Output only. The state of the NFS share. + * @type string $volume + * Output only. The underlying volume of the share. Created automatically + * during provisioning. + * @type array<\Google\Cloud\BareMetalSolution\V2\NfsShare\AllowedClient>|\Google\Protobuf\Internal\RepeatedField $allowed_clients + * List of allowed access points. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type int|string $requested_size_gib + * The requested size, in GiB. + * @type int $storage_type + * Immutable. The storage type of the underlying volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The name of the NFS share. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The name of the NFS share. + * + * 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; + } + + /** + * Output only. An identifier for the NFS share, generated by the backend. + * This field will be deprecated in the future, use `id` instead. + * + * Generated from protobuf field string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNfsShareId() + { + return $this->nfs_share_id; + } + + /** + * Output only. An identifier for the NFS share, generated by the backend. + * This field will be deprecated in the future, use `id` instead. + * + * Generated from protobuf field string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNfsShareId($var) + { + GPBUtil::checkString($var, True); + $this->nfs_share_id = $var; + + return $this; + } + + /** + * Output only. An identifier for the NFS share, generated by the backend. + * This is the same value as nfs_share_id and will replace it in the future. + * + * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. An identifier for the NFS share, generated by the backend. + * This is the same value as nfs_share_id and will replace it in the future. + * + * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Output only. The state of the NFS share. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the NFS share. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NfsShare\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The underlying volume of the share. Created automatically + * during provisioning. + * + * Generated from protobuf field string volume = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getVolume() + { + return $this->volume; + } + + /** + * Output only. The underlying volume of the share. Created automatically + * during provisioning. + * + * Generated from protobuf field string volume = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVolume($var) + { + GPBUtil::checkString($var, True); + $this->volume = $var; + + return $this; + } + + /** + * List of allowed access points. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedClients() + { + return $this->allowed_clients; + } + + /** + * List of allowed access points. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * @param array<\Google\Cloud\BareMetalSolution\V2\NfsShare\AllowedClient>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedClients($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NfsShare\AllowedClient::class); + $this->allowed_clients = $arr; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 6; + * @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; + } + + /** + * The requested size, in GiB. + * + * Generated from protobuf field int64 requested_size_gib = 7; + * @return int|string + */ + public function getRequestedSizeGib() + { + return $this->requested_size_gib; + } + + /** + * The requested size, in GiB. + * + * Generated from protobuf field int64 requested_size_gib = 7; + * @param int|string $var + * @return $this + */ + public function setRequestedSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->requested_size_gib = $var; + + return $this; + } + + /** + * Immutable. The storage type of the underlying volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.StorageType storage_type = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getStorageType() + { + return $this->storage_type; + } + + /** + * Immutable. The storage type of the underlying volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.StorageType storage_type = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setStorageType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NfsShare\StorageType::class); + $this->storage_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/AllowedClient.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/AllowedClient.php new file mode 100644 index 000000000000..392194acd694 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/AllowedClient.php @@ -0,0 +1,328 @@ +google.cloud.baremetalsolution.v2.NfsShare.AllowedClient + */ +class AllowedClient extends \Google\Protobuf\Internal\Message +{ + /** + * The network the access point sits on. + * + * Generated from protobuf field string network = 1 [(.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. The IP address of the share on this network. Assigned + * automatically during provisioning based on the network's services_cidr. + * + * Generated from protobuf field string share_ip = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $share_ip = ''; + /** + * The subnet of IP addresses permitted to access the share. + * + * Generated from protobuf field string allowed_clients_cidr = 3; + */ + protected $allowed_clients_cidr = ''; + /** + * Mount permissions. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + */ + protected $mount_permissions = 0; + /** + * Allow dev flag. Which controls whether to allow creation of devices. + * + * Generated from protobuf field bool allow_dev = 5; + */ + protected $allow_dev = false; + /** + * Allow the setuid flag. + * + * Generated from protobuf field bool allow_suid = 6; + */ + protected $allow_suid = false; + /** + * Disable root squashing, which is a feature of NFS. + * Root squash is a special mapping of the remote superuser (root) identity + * when using identity authentication. + * + * Generated from protobuf field bool no_root_squash = 7; + */ + protected $no_root_squash = false; + /** + * Output only. The path to access NFS, in format shareIP:/InstanceID + * InstanceID is the generated ID instead of customer provided name. + * example like "10.0.0.0:/g123456789-nfs001" + * + * Generated from protobuf field string nfs_path = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nfs_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * The network the access point sits on. + * @type string $share_ip + * Output only. The IP address of the share on this network. Assigned + * automatically during provisioning based on the network's services_cidr. + * @type string $allowed_clients_cidr + * The subnet of IP addresses permitted to access the share. + * @type int $mount_permissions + * Mount permissions. + * @type bool $allow_dev + * Allow dev flag. Which controls whether to allow creation of devices. + * @type bool $allow_suid + * Allow the setuid flag. + * @type bool $no_root_squash + * Disable root squashing, which is a feature of NFS. + * Root squash is a special mapping of the remote superuser (root) identity + * when using identity authentication. + * @type string $nfs_path + * Output only. The path to access NFS, in format shareIP:/InstanceID + * InstanceID is the generated ID instead of customer provided name. + * example like "10.0.0.0:/g123456789-nfs001" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); + parent::__construct($data); + } + + /** + * The network the access point sits on. + * + * Generated from protobuf field string network = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The network the access point sits on. + * + * Generated from protobuf field string network = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. The IP address of the share on this network. Assigned + * automatically during provisioning based on the network's services_cidr. + * + * Generated from protobuf field string share_ip = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getShareIp() + { + return $this->share_ip; + } + + /** + * Output only. The IP address of the share on this network. Assigned + * automatically during provisioning based on the network's services_cidr. + * + * Generated from protobuf field string share_ip = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setShareIp($var) + { + GPBUtil::checkString($var, True); + $this->share_ip = $var; + + return $this; + } + + /** + * The subnet of IP addresses permitted to access the share. + * + * Generated from protobuf field string allowed_clients_cidr = 3; + * @return string + */ + public function getAllowedClientsCidr() + { + return $this->allowed_clients_cidr; + } + + /** + * The subnet of IP addresses permitted to access the share. + * + * Generated from protobuf field string allowed_clients_cidr = 3; + * @param string $var + * @return $this + */ + public function setAllowedClientsCidr($var) + { + GPBUtil::checkString($var, True); + $this->allowed_clients_cidr = $var; + + return $this; + } + + /** + * Mount permissions. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * @return int + */ + public function getMountPermissions() + { + return $this->mount_permissions; + } + + /** + * Mount permissions. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * @param int $var + * @return $this + */ + public function setMountPermissions($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NfsShare\MountPermissions::class); + $this->mount_permissions = $var; + + return $this; + } + + /** + * Allow dev flag. Which controls whether to allow creation of devices. + * + * Generated from protobuf field bool allow_dev = 5; + * @return bool + */ + public function getAllowDev() + { + return $this->allow_dev; + } + + /** + * Allow dev flag. Which controls whether to allow creation of devices. + * + * Generated from protobuf field bool allow_dev = 5; + * @param bool $var + * @return $this + */ + public function setAllowDev($var) + { + GPBUtil::checkBool($var); + $this->allow_dev = $var; + + return $this; + } + + /** + * Allow the setuid flag. + * + * Generated from protobuf field bool allow_suid = 6; + * @return bool + */ + public function getAllowSuid() + { + return $this->allow_suid; + } + + /** + * Allow the setuid flag. + * + * Generated from protobuf field bool allow_suid = 6; + * @param bool $var + * @return $this + */ + public function setAllowSuid($var) + { + GPBUtil::checkBool($var); + $this->allow_suid = $var; + + return $this; + } + + /** + * Disable root squashing, which is a feature of NFS. + * Root squash is a special mapping of the remote superuser (root) identity + * when using identity authentication. + * + * Generated from protobuf field bool no_root_squash = 7; + * @return bool + */ + public function getNoRootSquash() + { + return $this->no_root_squash; + } + + /** + * Disable root squashing, which is a feature of NFS. + * Root squash is a special mapping of the remote superuser (root) identity + * when using identity authentication. + * + * Generated from protobuf field bool no_root_squash = 7; + * @param bool $var + * @return $this + */ + public function setNoRootSquash($var) + { + GPBUtil::checkBool($var); + $this->no_root_squash = $var; + + return $this; + } + + /** + * Output only. The path to access NFS, in format shareIP:/InstanceID + * InstanceID is the generated ID instead of customer provided name. + * example like "10.0.0.0:/g123456789-nfs001" + * + * Generated from protobuf field string nfs_path = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNfsPath() + { + return $this->nfs_path; + } + + /** + * Output only. The path to access NFS, in format shareIP:/InstanceID + * InstanceID is the generated ID instead of customer provided name. + * example like "10.0.0.0:/g123456789-nfs001" + * + * Generated from protobuf field string nfs_path = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNfsPath($var) + { + GPBUtil::checkString($var, True); + $this->nfs_path = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AllowedClient::class, \Google\Cloud\BareMetalSolution\V2\NfsShare_AllowedClient::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/MountPermissions.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/MountPermissions.php new file mode 100644 index 000000000000..dadf339aea7f --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/MountPermissions.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.NfsShare.MountPermissions + */ +class MountPermissions +{ + /** + * Permissions were not specified. + * + * Generated from protobuf enum MOUNT_PERMISSIONS_UNSPECIFIED = 0; + */ + const MOUNT_PERMISSIONS_UNSPECIFIED = 0; + /** + * NFS share can be mount with read-only permissions. + * + * Generated from protobuf enum READ = 1; + */ + const READ = 1; + /** + * NFS share can be mount with read-write permissions. + * + * Generated from protobuf enum READ_WRITE = 2; + */ + const READ_WRITE = 2; + + private static $valueToName = [ + self::MOUNT_PERMISSIONS_UNSPECIFIED => 'MOUNT_PERMISSIONS_UNSPECIFIED', + self::READ => 'READ', + self::READ_WRITE => 'READ_WRITE', + ]; + + 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(MountPermissions::class, \Google\Cloud\BareMetalSolution\V2\NfsShare_MountPermissions::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/State.php new file mode 100644 index 000000000000..33726a32ec7b --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/State.php @@ -0,0 +1,78 @@ +google.cloud.baremetalsolution.v2.NfsShare.State + */ +class State +{ + /** + * The share is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The share has been provisioned. + * + * Generated from protobuf enum PROVISIONED = 1; + */ + const PROVISIONED = 1; + /** + * The NFS Share is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The NFS Share is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The NFS Share has been requested to be deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONED => 'PROVISIONED', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + ]; + + 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\BareMetalSolution\V2\NfsShare_State::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/StorageType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/StorageType.php new file mode 100644 index 000000000000..3d002a9bee9f --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/StorageType.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.NfsShare.StorageType + */ +class StorageType +{ + /** + * The storage type for this volume is unknown. + * + * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; + */ + const STORAGE_TYPE_UNSPECIFIED = 0; + /** + * The storage type for this volume is SSD. + * + * Generated from protobuf enum SSD = 1; + */ + const SSD = 1; + /** + * This storage type for this volume is HDD. + * + * Generated from protobuf enum HDD = 2; + */ + const HDD = 2; + + private static $valueToName = [ + self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', + self::SSD => 'SSD', + self::HDD => 'HDD', + ]; + + 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(StorageType::class, \Google\Cloud\BareMetalSolution\V2\NfsShare_StorageType::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OSImage.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OSImage.php new file mode 100644 index 000000000000..46442969f67e --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OSImage.php @@ -0,0 +1,211 @@ +google.cloud.baremetalsolution.v2.OSImage + */ +class OSImage extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. OS Image's unique name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * OS Image code. + * + * Generated from protobuf field string code = 2; + */ + protected $code = ''; + /** + * OS Image description. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Instance types this image is applicable to. + * [Available + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field repeated string applicable_instance_types = 4; + */ + private $applicable_instance_types; + /** + * Network templates that can be used with this OS Image. + * + * Generated from protobuf field repeated string supported_network_templates = 5; + */ + private $supported_network_templates; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. OS Image's unique name. + * @type string $code + * OS Image code. + * @type string $description + * OS Image description. + * @type array|\Google\Protobuf\Internal\RepeatedField $applicable_instance_types + * Instance types this image is applicable to. + * [Available + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_network_templates + * Network templates that can be used with this OS Image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Osimage::initOnce(); + parent::__construct($data); + } + + /** + * Output only. OS Image's unique name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. OS Image's unique name. + * + * 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; + } + + /** + * OS Image code. + * + * Generated from protobuf field string code = 2; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * OS Image code. + * + * Generated from protobuf field string code = 2; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + + /** + * OS Image description. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * OS Image description. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Instance types this image is applicable to. + * [Available + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field repeated string applicable_instance_types = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getApplicableInstanceTypes() + { + return $this->applicable_instance_types; + } + + /** + * Instance types this image is applicable to. + * [Available + * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + * + * Generated from protobuf field repeated string applicable_instance_types = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setApplicableInstanceTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->applicable_instance_types = $arr; + + return $this; + } + + /** + * Network templates that can be used with this OS Image. + * + * Generated from protobuf field repeated string supported_network_templates = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedNetworkTemplates() + { + return $this->supported_network_templates; + } + + /** + * Network templates that can be used with this OS Image. + * + * Generated from protobuf field repeated string supported_network_templates = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedNetworkTemplates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->supported_network_templates = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OperationMetadata.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OperationMetadata.php new file mode 100644 index 000000000000..e6061c8bf259 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.baremetalsolution.v2.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 action 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 requested the cancellation + * of the operation. Operations that have been successfully 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 with 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 action 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 requested the cancellation + * of the operation. Operations that have been successfully 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 with the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Baremetalsolution::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 action 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 action 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 requested the cancellation + * of the operation. Operations that have been successfully 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 requested the cancellation + * of the operation. Operations that have been successfully 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 with 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 with 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig.php new file mode 100644 index 000000000000..9aedd8c65bfa --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig.php @@ -0,0 +1,540 @@ +google.cloud.baremetalsolution.v2.ProvisioningConfig + */ +class ProvisioningConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The system-generated name of the provisioning config. This + * follows the UUID format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Instances to be created. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.InstanceConfig instances = 2; + */ + private $instances; + /** + * Networks to be created. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig networks = 3; + */ + private $networks; + /** + * Volumes to be created. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig volumes = 4; + */ + private $volumes; + /** + * A generated ticket id to track provisioning request. + * + * Generated from protobuf field string ticket_id = 5; + */ + protected $ticket_id = ''; + /** + * A service account to enable customers to access instance credentials upon + * handover. + * + * Generated from protobuf field string handover_service_account = 6; + */ + protected $handover_service_account = ''; + /** + * Email provided to send a confirmation with provisioning config to. + * Deprecated in favour of email field in request messages. + * + * Generated from protobuf field string email = 7 [deprecated = true]; + * @deprecated + */ + protected $email = ''; + /** + * Output only. State of ProvisioningConfig. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Location name of this ProvisioningConfig. + * It is optional only for Intake UI transition period. + * + * Generated from protobuf field string location = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $location = ''; + /** + * Output only. Last update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. URI to Cloud Console UI view of this provisioning config. + * + * Generated from protobuf field string cloud_console_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cloud_console_uri = ''; + /** + * If true, VPC SC is enabled for the cluster. + * + * Generated from protobuf field bool vpc_sc_enabled = 12; + */ + protected $vpc_sc_enabled = false; + /** + * Optional status messages associated with the FAILED state. + * + * Generated from protobuf field string status_message = 13; + */ + protected $status_message = ''; + /** + * Optional. The user-defined identifier of the provisioning config. + * + * Generated from protobuf field string custom_id = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The system-generated name of the provisioning config. This + * follows the UUID format. + * @type array<\Google\Cloud\BareMetalSolution\V2\InstanceConfig>|\Google\Protobuf\Internal\RepeatedField $instances + * Instances to be created. + * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $networks + * Networks to be created. + * @type array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig>|\Google\Protobuf\Internal\RepeatedField $volumes + * Volumes to be created. + * @type string $ticket_id + * A generated ticket id to track provisioning request. + * @type string $handover_service_account + * A service account to enable customers to access instance credentials upon + * handover. + * @type string $email + * Email provided to send a confirmation with provisioning config to. + * Deprecated in favour of email field in request messages. + * @type int $state + * Output only. State of ProvisioningConfig. + * @type string $location + * Optional. Location name of this ProvisioningConfig. + * It is optional only for Intake UI transition period. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update timestamp. + * @type string $cloud_console_uri + * Output only. URI to Cloud Console UI view of this provisioning config. + * @type bool $vpc_sc_enabled + * If true, VPC SC is enabled for the cluster. + * @type string $status_message + * Optional status messages associated with the FAILED state. + * @type string $custom_id + * Optional. The user-defined identifier of the provisioning config. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The system-generated name of the provisioning config. This + * follows the UUID format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The system-generated name of the provisioning config. This + * follows the UUID format. + * + * 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; + } + + /** + * Instances to be created. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.InstanceConfig instances = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Instances to be created. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.InstanceConfig instances = 2; + * @param array<\Google\Cloud\BareMetalSolution\V2\InstanceConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\InstanceConfig::class); + $this->instances = $arr; + + return $this; + } + + /** + * Networks to be created. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig networks = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworks() + { + return $this->networks; + } + + /** + * Networks to be created. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig networks = 3; + * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkConfig::class); + $this->networks = $arr; + + return $this; + } + + /** + * Volumes to be created. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig volumes = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * Volumes to be created. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig volumes = 4; + * @param array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeConfig::class); + $this->volumes = $arr; + + return $this; + } + + /** + * A generated ticket id to track provisioning request. + * + * Generated from protobuf field string ticket_id = 5; + * @return string + */ + public function getTicketId() + { + return $this->ticket_id; + } + + /** + * A generated ticket id to track provisioning request. + * + * Generated from protobuf field string ticket_id = 5; + * @param string $var + * @return $this + */ + public function setTicketId($var) + { + GPBUtil::checkString($var, True); + $this->ticket_id = $var; + + return $this; + } + + /** + * A service account to enable customers to access instance credentials upon + * handover. + * + * Generated from protobuf field string handover_service_account = 6; + * @return string + */ + public function getHandoverServiceAccount() + { + return $this->handover_service_account; + } + + /** + * A service account to enable customers to access instance credentials upon + * handover. + * + * Generated from protobuf field string handover_service_account = 6; + * @param string $var + * @return $this + */ + public function setHandoverServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->handover_service_account = $var; + + return $this; + } + + /** + * Email provided to send a confirmation with provisioning config to. + * Deprecated in favour of email field in request messages. + * + * Generated from protobuf field string email = 7 [deprecated = true]; + * @return string + * @deprecated + */ + public function getEmail() + { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + return $this->email; + } + + /** + * Email provided to send a confirmation with provisioning config to. + * Deprecated in favour of email field in request messages. + * + * Generated from protobuf field string email = 7 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setEmail($var) + { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Output only. State of ProvisioningConfig. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of ProvisioningConfig. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Location name of this ProvisioningConfig. + * It is optional only for Intake UI transition period. + * + * Generated from protobuf field string location = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Optional. Location name of this ProvisioningConfig. + * It is optional only for Intake UI transition period. + * + * Generated from protobuf field string location = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. Last update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.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 timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.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. URI to Cloud Console UI view of this provisioning config. + * + * Generated from protobuf field string cloud_console_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCloudConsoleUri() + { + return $this->cloud_console_uri; + } + + /** + * Output only. URI to Cloud Console UI view of this provisioning config. + * + * Generated from protobuf field string cloud_console_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCloudConsoleUri($var) + { + GPBUtil::checkString($var, True); + $this->cloud_console_uri = $var; + + return $this; + } + + /** + * If true, VPC SC is enabled for the cluster. + * + * Generated from protobuf field bool vpc_sc_enabled = 12; + * @return bool + */ + public function getVpcScEnabled() + { + return $this->vpc_sc_enabled; + } + + /** + * If true, VPC SC is enabled for the cluster. + * + * Generated from protobuf field bool vpc_sc_enabled = 12; + * @param bool $var + * @return $this + */ + public function setVpcScEnabled($var) + { + GPBUtil::checkBool($var); + $this->vpc_sc_enabled = $var; + + return $this; + } + + /** + * Optional status messages associated with the FAILED state. + * + * Generated from protobuf field string status_message = 13; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Optional status messages associated with the FAILED state. + * + * Generated from protobuf field string status_message = 13; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Optional. The user-defined identifier of the provisioning config. + * + * Generated from protobuf field string custom_id = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCustomId() + { + return $this->custom_id; + } + + /** + * Optional. The user-defined identifier of the provisioning config. + * + * Generated from protobuf field string custom_id = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCustomId($var) + { + GPBUtil::checkString($var, True); + $this->custom_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig/State.php new file mode 100644 index 000000000000..227318e80823 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig/State.php @@ -0,0 +1,102 @@ +google.cloud.baremetalsolution.v2.ProvisioningConfig.State + */ +class State +{ + /** + * State wasn't specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * ProvisioningConfig is a draft and can be freely modified. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * ProvisioningConfig was already submitted and cannot be modified. + * + * Generated from protobuf enum SUBMITTED = 2; + */ + const SUBMITTED = 2; + /** + * ProvisioningConfig was in the provisioning state. Initially this state + * comes from the work order table in big query when SNOW is used. Later + * this field can be set by the work order API. + * + * Generated from protobuf enum PROVISIONING = 3; + */ + const PROVISIONING = 3; + /** + * ProvisioningConfig was provisioned, meaning the resources exist. + * + * Generated from protobuf enum PROVISIONED = 4; + */ + const PROVISIONED = 4; + /** + * ProvisioningConfig was validated. A validation tool will be run to + * set this state. + * + * Generated from protobuf enum VALIDATED = 5; + */ + const VALIDATED = 5; + /** + * ProvisioningConfig was canceled. + * + * Generated from protobuf enum CANCELLED = 6; + */ + const CANCELLED = 6; + /** + * The request is submitted for provisioning, with error return. + * + * Generated from protobuf enum FAILED = 7; + */ + const FAILED = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::SUBMITTED => 'SUBMITTED', + self::PROVISIONING => 'PROVISIONING', + self::PROVISIONED => 'PROVISIONED', + self::VALIDATED => 'VALIDATED', + self::CANCELLED => 'CANCELLED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig_State::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota.php new file mode 100644 index 000000000000..e93a6c0f70a2 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota.php @@ -0,0 +1,353 @@ +google.cloud.baremetalsolution.v2.ProvisioningQuota + */ +class ProvisioningQuota extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the provisioning quota. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The asset type of this provisioning quota. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2; + */ + protected $asset_type = 0; + /** + * The gcp service of the provisioning quota. + * + * Generated from protobuf field string gcp_service = 3; + */ + protected $gcp_service = ''; + /** + * The specific location of the provisioining quota. + * + * Generated from protobuf field string location = 4; + */ + protected $location = ''; + /** + * The available count of the provisioning quota. + * + * Generated from protobuf field int32 available_count = 5; + */ + protected $available_count = 0; + protected $quota; + protected $availability; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the provisioning quota. + * @type int $asset_type + * The asset type of this provisioning quota. + * @type string $gcp_service + * The gcp service of the provisioning quota. + * @type string $location + * The specific location of the provisioining quota. + * @type int $available_count + * The available count of the provisioning quota. + * @type \Google\Cloud\BareMetalSolution\V2\InstanceQuota $instance_quota + * Instance quota. + * @type int|string $server_count + * Server count. + * @type int|string $network_bandwidth + * Network bandwidth, Gbps + * @type int|string $storage_gib + * Storage size (GB). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the provisioning quota. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the provisioning quota. + * + * 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; + } + + /** + * The asset type of this provisioning quota. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2; + * @return int + */ + public function getAssetType() + { + return $this->asset_type; + } + + /** + * The asset type of this provisioning quota. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2; + * @param int $var + * @return $this + */ + public function setAssetType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningQuota\AssetType::class); + $this->asset_type = $var; + + return $this; + } + + /** + * The gcp service of the provisioning quota. + * + * Generated from protobuf field string gcp_service = 3; + * @return string + */ + public function getGcpService() + { + return $this->gcp_service; + } + + /** + * The gcp service of the provisioning quota. + * + * Generated from protobuf field string gcp_service = 3; + * @param string $var + * @return $this + */ + public function setGcpService($var) + { + GPBUtil::checkString($var, True); + $this->gcp_service = $var; + + return $this; + } + + /** + * The specific location of the provisioining quota. + * + * Generated from protobuf field string location = 4; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The specific location of the provisioining quota. + * + * Generated from protobuf field string location = 4; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The available count of the provisioning quota. + * + * Generated from protobuf field int32 available_count = 5; + * @return int + */ + public function getAvailableCount() + { + return $this->available_count; + } + + /** + * The available count of the provisioning quota. + * + * Generated from protobuf field int32 available_count = 5; + * @param int $var + * @return $this + */ + public function setAvailableCount($var) + { + GPBUtil::checkInt32($var); + $this->available_count = $var; + + return $this; + } + + /** + * Instance quota. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6; + * @return \Google\Cloud\BareMetalSolution\V2\InstanceQuota|null + */ + public function getInstanceQuota() + { + return $this->readOneof(6); + } + + public function hasInstanceQuota() + { + return $this->hasOneof(6); + } + + /** + * Instance quota. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6; + * @param \Google\Cloud\BareMetalSolution\V2\InstanceQuota $var + * @return $this + */ + public function setInstanceQuota($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\InstanceQuota::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Server count. + * + * Generated from protobuf field int64 server_count = 7; + * @return int|string + */ + public function getServerCount() + { + return $this->readOneof(7); + } + + public function hasServerCount() + { + return $this->hasOneof(7); + } + + /** + * Server count. + * + * Generated from protobuf field int64 server_count = 7; + * @param int|string $var + * @return $this + */ + public function setServerCount($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Network bandwidth, Gbps + * + * Generated from protobuf field int64 network_bandwidth = 8; + * @return int|string + */ + public function getNetworkBandwidth() + { + return $this->readOneof(8); + } + + public function hasNetworkBandwidth() + { + return $this->hasOneof(8); + } + + /** + * Network bandwidth, Gbps + * + * Generated from protobuf field int64 network_bandwidth = 8; + * @param int|string $var + * @return $this + */ + public function setNetworkBandwidth($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Storage size (GB). + * + * Generated from protobuf field int64 storage_gib = 9; + * @return int|string + */ + public function getStorageGib() + { + return $this->readOneof(9); + } + + public function hasStorageGib() + { + return $this->hasOneof(9); + } + + /** + * Storage size (GB). + * + * Generated from protobuf field int64 storage_gib = 9; + * @param int|string $var + * @return $this + */ + public function setStorageGib($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getQuota() + { + return $this->whichOneof("quota"); + } + + /** + * @return string + */ + public function getAvailability() + { + return $this->whichOneof("availability"); + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota/AssetType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota/AssetType.php new file mode 100644 index 000000000000..ed4619ec1e63 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota/AssetType.php @@ -0,0 +1,71 @@ +google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType + */ +class AssetType +{ + /** + * The unspecified type. + * + * Generated from protobuf enum ASSET_TYPE_UNSPECIFIED = 0; + */ + const ASSET_TYPE_UNSPECIFIED = 0; + /** + * The server asset type. + * + * Generated from protobuf enum ASSET_TYPE_SERVER = 1; + */ + const ASSET_TYPE_SERVER = 1; + /** + * The storage asset type. + * + * Generated from protobuf enum ASSET_TYPE_STORAGE = 2; + */ + const ASSET_TYPE_STORAGE = 2; + /** + * The network asset type. + * + * Generated from protobuf enum ASSET_TYPE_NETWORK = 3; + */ + const ASSET_TYPE_NETWORK = 3; + + private static $valueToName = [ + self::ASSET_TYPE_UNSPECIFIED => 'ASSET_TYPE_UNSPECIFIED', + self::ASSET_TYPE_SERVER => 'ASSET_TYPE_SERVER', + self::ASSET_TYPE_STORAGE => 'ASSET_TYPE_STORAGE', + self::ASSET_TYPE_NETWORK => 'ASSET_TYPE_NETWORK', + ]; + + 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(AssetType::class, \Google\Cloud\BareMetalSolution\V2\ProvisioningQuota_AssetType::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameInstanceRequest.php new file mode 100644 index 000000000000..168cff7da429 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameInstanceRequest.php @@ -0,0 +1,122 @@ +google.cloud.baremetalsolution.v2.RenameInstanceRequest + */ +class RenameInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `name` field is used to identify the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new `id` of the instance. + * + * Generated from protobuf field string new_instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $new_instance_id = ''; + + /** + * @param string $name Required. The `name` field is used to identify the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see BareMetalSolutionClient::instanceName()} for help formatting this field. + * @param string $newInstanceId Required. The new `id` of the instance. + * + * @return \Google\Cloud\BareMetalSolution\V2\RenameInstanceRequest + * + * @experimental + */ + public static function build(string $name, string $newInstanceId): self + { + return (new self()) + ->setName($name) + ->setNewInstanceId($newInstanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The `name` field is used to identify the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type string $new_instance_id + * Required. The new `id` of the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `name` field is used to identify the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The `name` field is used to identify the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new `id` of the instance. + * + * Generated from protobuf field string new_instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNewInstanceId() + { + return $this->new_instance_id; + } + + /** + * Required. The new `id` of the instance. + * + * Generated from protobuf field string new_instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNewInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->new_instance_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNetworkRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNetworkRequest.php new file mode 100644 index 000000000000..ee6b7a98640d --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNetworkRequest.php @@ -0,0 +1,122 @@ +google.cloud.baremetalsolution.v2.RenameNetworkRequest + */ +class RenameNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `name` field is used to identify the network. + * Format: projects/{project}/locations/{location}/networks/{network} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new `id` of the network. + * + * Generated from protobuf field string new_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $new_network_id = ''; + + /** + * @param string $name Required. The `name` field is used to identify the network. + * Format: projects/{project}/locations/{location}/networks/{network} + * Please see {@see BareMetalSolutionClient::networkName()} for help formatting this field. + * @param string $newNetworkId Required. The new `id` of the network. + * + * @return \Google\Cloud\BareMetalSolution\V2\RenameNetworkRequest + * + * @experimental + */ + public static function build(string $name, string $newNetworkId): self + { + return (new self()) + ->setName($name) + ->setNewNetworkId($newNetworkId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The `name` field is used to identify the network. + * Format: projects/{project}/locations/{location}/networks/{network} + * @type string $new_network_id + * Required. The new `id` of the network. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `name` field is used to identify the network. + * Format: projects/{project}/locations/{location}/networks/{network} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The `name` field is used to identify the network. + * Format: projects/{project}/locations/{location}/networks/{network} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new `id` of the network. + * + * Generated from protobuf field string new_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNewNetworkId() + { + return $this->new_network_id; + } + + /** + * Required. The new `id` of the network. + * + * Generated from protobuf field string new_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNewNetworkId($var) + { + GPBUtil::checkString($var, True); + $this->new_network_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNfsShareRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNfsShareRequest.php new file mode 100644 index 000000000000..32c07a6d6213 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNfsShareRequest.php @@ -0,0 +1,122 @@ +google.cloud.baremetalsolution.v2.RenameNfsShareRequest + */ +class RenameNfsShareRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `name` field is used to identify the nfsshare. + * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new `id` of the nfsshare. + * + * Generated from protobuf field string new_nfsshare_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $new_nfsshare_id = ''; + + /** + * @param string $name Required. The `name` field is used to identify the nfsshare. + * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} + * Please see {@see BareMetalSolutionClient::nFSShareName()} for help formatting this field. + * @param string $newNfsshareId Required. The new `id` of the nfsshare. + * + * @return \Google\Cloud\BareMetalSolution\V2\RenameNfsShareRequest + * + * @experimental + */ + public static function build(string $name, string $newNfsshareId): self + { + return (new self()) + ->setName($name) + ->setNewNfsshareId($newNfsshareId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The `name` field is used to identify the nfsshare. + * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} + * @type string $new_nfsshare_id + * Required. The new `id` of the nfsshare. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `name` field is used to identify the nfsshare. + * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The `name` field is used to identify the nfsshare. + * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new `id` of the nfsshare. + * + * Generated from protobuf field string new_nfsshare_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNewNfsshareId() + { + return $this->new_nfsshare_id; + } + + /** + * Required. The new `id` of the nfsshare. + * + * Generated from protobuf field string new_nfsshare_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNewNfsshareId($var) + { + GPBUtil::checkString($var, True); + $this->new_nfsshare_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameVolumeRequest.php new file mode 100644 index 000000000000..c74a86a8d25b --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameVolumeRequest.php @@ -0,0 +1,122 @@ +google.cloud.baremetalsolution.v2.RenameVolumeRequest + */ +class RenameVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `name` field is used to identify the volume. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new `id` of the volume. + * + * Generated from protobuf field string new_volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $new_volume_id = ''; + + /** + * @param string $name Required. The `name` field is used to identify the volume. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * Please see {@see BareMetalSolutionClient::volumeName()} for help formatting this field. + * @param string $newVolumeId Required. The new `id` of the volume. + * + * @return \Google\Cloud\BareMetalSolution\V2\RenameVolumeRequest + * + * @experimental + */ + public static function build(string $name, string $newVolumeId): self + { + return (new self()) + ->setName($name) + ->setNewVolumeId($newVolumeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The `name` field is used to identify the volume. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * @type string $new_volume_id + * Required. The new `id` of the volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `name` field is used to identify the volume. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The `name` field is used to identify the volume. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new `id` of the volume. + * + * Generated from protobuf field string new_volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNewVolumeId() + { + return $this->new_volume_id; + } + + /** + * Required. The new `id` of the volume. + * + * Generated from protobuf field string new_volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNewVolumeId($var) + { + GPBUtil::checkString($var, True); + $this->new_volume_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceRequest.php new file mode 100644 index 000000000000..fad5d2770386 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.ResetInstanceRequest + */ +class ResetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\ResetInstanceRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceResponse.php new file mode 100644 index 000000000000..013bd1cf5868 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceResponse.php @@ -0,0 +1,33 @@ +google.cloud.baremetalsolution.v2.ResetInstanceResponse + */ +class ResetInstanceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Baremetalsolution::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResizeVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResizeVolumeRequest.php new file mode 100644 index 000000000000..7cb2d386c502 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResizeVolumeRequest.php @@ -0,0 +1,117 @@ +google.cloud.baremetalsolution.v2.ResizeVolumeRequest + */ +class ResizeVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Volume to resize. + * + * Generated from protobuf field string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $volume = ''; + /** + * New Volume size, in GiB. + * + * Generated from protobuf field int64 size_gib = 2; + */ + protected $size_gib = 0; + + /** + * @param string $volume Required. Volume to resize. Please see + * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. + * @param int $sizeGib New Volume size, in GiB. + * + * @return \Google\Cloud\BareMetalSolution\V2\ResizeVolumeRequest + * + * @experimental + */ + public static function build(string $volume, int $sizeGib): self + { + return (new self()) + ->setVolume($volume) + ->setSizeGib($sizeGib); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $volume + * Required. Volume to resize. + * @type int|string $size_gib + * New Volume size, in GiB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Volume to resize. + * + * Generated from protobuf field string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getVolume() + { + return $this->volume; + } + + /** + * Required. Volume to resize. + * + * Generated from protobuf field string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVolume($var) + { + GPBUtil::checkString($var, True); + $this->volume = $var; + + return $this; + } + + /** + * New Volume size, in GiB. + * + * Generated from protobuf field int64 size_gib = 2; + * @return int|string + */ + public function getSizeGib() + { + return $this->size_gib; + } + + /** + * New Volume size, in GiB. + * + * Generated from protobuf field int64 size_gib = 2; + * @param int|string $var + * @return $this + */ + public function setSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->size_gib = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RestoreVolumeSnapshotRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RestoreVolumeSnapshotRequest.php new file mode 100644 index 000000000000..2f0b9e7c7fff --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RestoreVolumeSnapshotRequest.php @@ -0,0 +1,86 @@ +google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest + */ +class RestoreVolumeSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the snapshot which will be used to restore its parent + * volume. + * + * Generated from protobuf field string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $volume_snapshot = ''; + + /** + * @param string $volumeSnapshot Required. Name of the snapshot which will be used to restore its parent + * volume. Please see + * {@see BareMetalSolutionClient::volumeSnapshotName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\RestoreVolumeSnapshotRequest + * + * @experimental + */ + public static function build(string $volumeSnapshot): self + { + return (new self()) + ->setVolumeSnapshot($volumeSnapshot); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $volume_snapshot + * Required. Name of the snapshot which will be used to restore its parent + * volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the snapshot which will be used to restore its parent + * volume. + * + * Generated from protobuf field string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getVolumeSnapshot() + { + return $this->volume_snapshot; + } + + /** + * Required. Name of the snapshot which will be used to restore its parent + * volume. + * + * Generated from protobuf field string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVolumeSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->volume_snapshot = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SSHKey.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SSHKey.php new file mode 100644 index 000000000000..f219549b1c98 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SSHKey.php @@ -0,0 +1,105 @@ +google.cloud.baremetalsolution.v2.SSHKey + */ +class SSHKey extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of this SSH key. + * Currently, the only valid value for the location is "global". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The public SSH key. This must be in OpenSSH .authorized_keys format. + * + * Generated from protobuf field string public_key = 2; + */ + protected $public_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of this SSH key. + * Currently, the only valid value for the location is "global". + * @type string $public_key + * The public SSH key. This must be in OpenSSH .authorized_keys format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\SshKey::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of this SSH key. + * Currently, the only valid value for the location is "global". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of this SSH key. + * Currently, the only valid value for the location is "global". + * + * 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; + } + + /** + * The public SSH key. This must be in OpenSSH .authorized_keys format. + * + * Generated from protobuf field string public_key = 2; + * @return string + */ + public function getPublicKey() + { + return $this->public_key; + } + + /** + * The public SSH key. This must be in OpenSSH .authorized_keys format. + * + * Generated from protobuf field string public_key = 2; + * @param string $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkString($var, True); + $this->public_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate.php new file mode 100644 index 000000000000..9374bd6b1e69 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate.php @@ -0,0 +1,151 @@ +google.cloud.baremetalsolution.v2.ServerNetworkTemplate + */ +class ServerNetworkTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Template's unique name. The full resource name follows the + * pattern: + * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` + * Generally, the {server_network_template} follows the syntax of + * "bond" or "nic". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Instance types this template is applicable to. + * + * Generated from protobuf field repeated string applicable_instance_types = 2; + */ + private $applicable_instance_types; + /** + * Logical interfaces. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + */ + private $logical_interfaces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Template's unique name. The full resource name follows the + * pattern: + * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` + * Generally, the {server_network_template} follows the syntax of + * "bond" or "nic". + * @type array|\Google\Protobuf\Internal\RepeatedField $applicable_instance_types + * Instance types this template is applicable to. + * @type array<\Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $logical_interfaces + * Logical interfaces. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Template's unique name. The full resource name follows the + * pattern: + * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` + * Generally, the {server_network_template} follows the syntax of + * "bond" or "nic". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Template's unique name. The full resource name follows the + * pattern: + * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` + * Generally, the {server_network_template} follows the syntax of + * "bond" or "nic". + * + * 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; + } + + /** + * Instance types this template is applicable to. + * + * Generated from protobuf field repeated string applicable_instance_types = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getApplicableInstanceTypes() + { + return $this->applicable_instance_types; + } + + /** + * Instance types this template is applicable to. + * + * Generated from protobuf field repeated string applicable_instance_types = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setApplicableInstanceTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->applicable_instance_types = $arr; + + return $this; + } + + /** + * Logical interfaces. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogicalInterfaces() + { + return $this->logical_interfaces; + } + + /** + * Logical interfaces. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * @param array<\Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogicalInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate\LogicalInterface::class); + $this->logical_interfaces = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface.php new file mode 100644 index 000000000000..96085db3f668 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface.php @@ -0,0 +1,154 @@ +google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + */ +class LogicalInterface extends \Google\Protobuf\Internal\Message +{ + /** + * Interface name. + * This is not a globally unique identifier. + * Name is unique only inside the ServerNetworkTemplate. This is of syntax + * or + * and forms part of the network template name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Interface type. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + */ + protected $type = 0; + /** + * If true, interface must have network connected. + * + * Generated from protobuf field bool required = 3; + */ + protected $required = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Interface name. + * This is not a globally unique identifier. + * Name is unique only inside the ServerNetworkTemplate. This is of syntax + * or + * and forms part of the network template name. + * @type int $type + * Interface type. + * @type bool $required + * If true, interface must have network connected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Interface name. + * This is not a globally unique identifier. + * Name is unique only inside the ServerNetworkTemplate. This is of syntax + * or + * and forms part of the network template name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Interface name. + * This is not a globally unique identifier. + * Name is unique only inside the ServerNetworkTemplate. This is of syntax + * or + * and forms part of the network template name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Interface type. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Interface type. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate\LogicalInterface\InterfaceType::class); + $this->type = $var; + + return $this; + } + + /** + * If true, interface must have network connected. + * + * Generated from protobuf field bool required = 3; + * @return bool + */ + public function getRequired() + { + return $this->required; + } + + /** + * If true, interface must have network connected. + * + * Generated from protobuf field bool required = 3; + * @param bool $var + * @return $this + */ + public function setRequired($var) + { + GPBUtil::checkBool($var); + $this->required = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LogicalInterface::class, \Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate_LogicalInterface::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface/InterfaceType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface/InterfaceType.php new file mode 100644 index 000000000000..45e03a1e7723 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface/InterfaceType.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType + */ +class InterfaceType +{ + /** + * Unspecified value. + * + * Generated from protobuf enum INTERFACE_TYPE_UNSPECIFIED = 0; + */ + const INTERFACE_TYPE_UNSPECIFIED = 0; + /** + * Bond interface type. + * + * Generated from protobuf enum BOND = 1; + */ + const BOND = 1; + /** + * NIC interface type. + * + * Generated from protobuf enum NIC = 2; + */ + const NIC = 2; + + private static $valueToName = [ + self::INTERFACE_TYPE_UNSPECIFIED => 'INTERFACE_TYPE_UNSPECIFIED', + self::BOND => 'BOND', + self::NIC => 'NIC', + ]; + + 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(InterfaceType::class, \Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate_LogicalInterface_InterfaceType::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceRequest.php new file mode 100644 index 000000000000..11a471958fad --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.StartInstanceRequest + */ +class StartInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\StartInstanceRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceResponse.php new file mode 100644 index 000000000000..078df2aa2efa --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceResponse.php @@ -0,0 +1,33 @@ +google.cloud.baremetalsolution.v2.StartInstanceResponse + */ +class StartInstanceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceRequest.php new file mode 100644 index 000000000000..c838273d1284 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceRequest.php @@ -0,0 +1,81 @@ +google.cloud.baremetalsolution.v2.StopInstanceRequest + */ +class StopInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\BareMetalSolution\V2\StopInstanceRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceResponse.php new file mode 100644 index 000000000000..f481f45b43fe --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceResponse.php @@ -0,0 +1,33 @@ +google.cloud.baremetalsolution.v2.StopInstanceResponse + */ +class StopInstanceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigRequest.php new file mode 100644 index 000000000000..2def6642afc8 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigRequest.php @@ -0,0 +1,170 @@ +google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest + */ +class SubmitProvisioningConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent project and location containing the + * ProvisioningConfig. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ProvisioningConfig to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $provisioning_config = null; + /** + * Optional. Email provided to send a confirmation with provisioning config + * to. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $email = ''; + + /** + * @param string $parent Required. The parent project and location containing the + * ProvisioningConfig. Please see + * {@see BareMetalSolutionClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig Required. The ProvisioningConfig to create. + * + * @return \Google\Cloud\BareMetalSolution\V2\SubmitProvisioningConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig): self + { + return (new self()) + ->setParent($parent) + ->setProvisioningConfig($provisioningConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent project and location containing the + * ProvisioningConfig. + * @type \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioning_config + * Required. The ProvisioningConfig to create. + * @type string $email + * Optional. Email provided to send a confirmation with provisioning config + * to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent project and location containing the + * ProvisioningConfig. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent project and location containing the + * ProvisioningConfig. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ProvisioningConfig to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig|null + */ + public function getProvisioningConfig() + { + return $this->provisioning_config; + } + + public function hasProvisioningConfig() + { + return isset($this->provisioning_config); + } + + public function clearProvisioningConfig() + { + unset($this->provisioning_config); + } + + /** + * Required. The ProvisioningConfig to create. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $var + * @return $this + */ + public function setProvisioningConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig::class); + $this->provisioning_config = $var; + + return $this; + } + + /** + * Optional. Email provided to send a confirmation with provisioning config + * to. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Optional. Email provided to send a confirmation with provisioning config + * to. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigResponse.php new file mode 100644 index 000000000000..35a3c9651f5a --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigResponse.php @@ -0,0 +1,77 @@ +google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse + */ +class SubmitProvisioningConfigResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The submitted provisioning config. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1; + */ + protected $provisioning_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioning_config + * The submitted provisioning config. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * The submitted provisioning config. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1; + * @return \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig|null + */ + public function getProvisioningConfig() + { + return $this->provisioning_config; + } + + public function hasProvisioningConfig() + { + return isset($this->provisioning_config); + } + + public function clearProvisioningConfig() + { + unset($this->provisioning_config); + } + + /** + * The submitted provisioning config. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1; + * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $var + * @return $this + */ + public function setProvisioningConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig::class); + $this->provisioning_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateInstanceRequest.php new file mode 100644 index 000000000000..60546eef353a --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateInstanceRequest.php @@ -0,0 +1,167 @@ +google.cloud.baremetalsolution.v2.UpdateInstanceRequest + */ +class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The server to update. + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * The list of fields to update. + * The currently supported fields are: + * `labels` + * `hyperthreading_enabled` + * `os_image` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\BareMetalSolution\V2\Instance $instance Required. The server to update. + * + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. + * The currently supported fields are: + * `labels` + * `hyperthreading_enabled` + * `os_image` + * + * @return \Google\Cloud\BareMetalSolution\V2\UpdateInstanceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BareMetalSolution\V2\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BareMetalSolution\V2\Instance $instance + * Required. The server to update. + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to update. + * The currently supported fields are: + * `labels` + * `hyperthreading_enabled` + * `os_image` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. The server to update. + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The server to update. + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * The list of fields to update. + * The currently supported fields are: + * `labels` + * `hyperthreading_enabled` + * `os_image` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to update. + * The currently supported fields are: + * `labels` + * `hyperthreading_enabled` + * `os_image` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNetworkRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNetworkRequest.php new file mode 100644 index 000000000000..87eeb260f62b --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNetworkRequest.php @@ -0,0 +1,157 @@ +google.cloud.baremetalsolution.v2.UpdateNetworkRequest + */ +class UpdateNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The network to update. + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/networks/{network} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network = null; + /** + * The list of fields to update. + * The only currently supported fields are: + * `labels`, `reservations`, `vrf.vlan_attachments` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\BareMetalSolution\V2\Network $network Required. The network to update. + * + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/networks/{network} + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. + * The only currently supported fields are: + * `labels`, `reservations`, `vrf.vlan_attachments` + * + * @return \Google\Cloud\BareMetalSolution\V2\UpdateNetworkRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BareMetalSolution\V2\Network $network, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setNetwork($network) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BareMetalSolution\V2\Network $network + * Required. The network to update. + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/networks/{network} + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to update. + * The only currently supported fields are: + * `labels`, `reservations`, `vrf.vlan_attachments` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * Required. The network to update. + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/networks/{network} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\Network|null + */ + public function getNetwork() + { + return $this->network; + } + + public function hasNetwork() + { + return isset($this->network); + } + + public function clearNetwork() + { + unset($this->network); + } + + /** + * Required. The network to update. + * The `name` field is used to identify the instance to update. + * Format: projects/{project}/locations/{location}/networks/{network} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\Network $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Network::class); + $this->network = $var; + + return $this; + } + + /** + * The list of fields to update. + * The only currently supported fields are: + * `labels`, `reservations`, `vrf.vlan_attachments` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to update. + * The only currently supported fields are: + * `labels`, `reservations`, `vrf.vlan_attachments` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNfsShareRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNfsShareRequest.php new file mode 100644 index 000000000000..63a98b61ec2d --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNfsShareRequest.php @@ -0,0 +1,162 @@ +google.cloud.baremetalsolution.v2.UpdateNfsShareRequest + */ +class UpdateNfsShareRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The NFS share to update. + * The `name` field is used to identify the NFS share to update. + * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $nfs_share = null; + /** + * The list of fields to update. + * The only currently supported fields are: + * `labels` + * `allowed_clients` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\BareMetalSolution\V2\NfsShare $nfsShare Required. The NFS share to update. + * + * The `name` field is used to identify the NFS share to update. + * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. + * The only currently supported fields are: + * `labels` + * `allowed_clients` + * + * @return \Google\Cloud\BareMetalSolution\V2\UpdateNfsShareRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BareMetalSolution\V2\NfsShare $nfsShare, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setNfsShare($nfsShare) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BareMetalSolution\V2\NfsShare $nfs_share + * Required. The NFS share to update. + * The `name` field is used to identify the NFS share to update. + * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to update. + * The only currently supported fields are: + * `labels` + * `allowed_clients` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); + parent::__construct($data); + } + + /** + * Required. The NFS share to update. + * The `name` field is used to identify the NFS share to update. + * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\NfsShare|null + */ + public function getNfsShare() + { + return $this->nfs_share; + } + + public function hasNfsShare() + { + return isset($this->nfs_share); + } + + public function clearNfsShare() + { + unset($this->nfs_share); + } + + /** + * Required. The NFS share to update. + * The `name` field is used to identify the NFS share to update. + * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\NfsShare $var + * @return $this + */ + public function setNfsShare($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\NfsShare::class); + $this->nfs_share = $var; + + return $this; + } + + /** + * The list of fields to update. + * The only currently supported fields are: + * `labels` + * `allowed_clients` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to update. + * The only currently supported fields are: + * `labels` + * `allowed_clients` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateProvisioningConfigRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateProvisioningConfigRequest.php new file mode 100644 index 000000000000..d9f98f9de392 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateProvisioningConfigRequest.php @@ -0,0 +1,174 @@ +google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest + */ +class UpdateProvisioningConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ProvisioningConfig to update. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $provisioning_config = null; + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. Email provided to send a confirmation with provisioning config + * to. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $email = ''; + + /** + * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig Required. The ProvisioningConfig to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * + * @return \Google\Cloud\BareMetalSolution\V2\UpdateProvisioningConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setProvisioningConfig($provisioningConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioning_config + * Required. The ProvisioningConfig to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * @type string $email + * Optional. Email provided to send a confirmation with provisioning config + * to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ProvisioningConfig to update. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig|null + */ + public function getProvisioningConfig() + { + return $this->provisioning_config; + } + + public function hasProvisioningConfig() + { + return isset($this->provisioning_config); + } + + public function clearProvisioningConfig() + { + unset($this->provisioning_config); + } + + /** + * Required. The ProvisioningConfig to update. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $var + * @return $this + */ + public function setProvisioningConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig::class); + $this->provisioning_config = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. Email provided to send a confirmation with provisioning config + * to. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Optional. Email provided to send a confirmation with provisioning config + * to. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateVolumeRequest.php new file mode 100644 index 000000000000..d4fa695d3f0b --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateVolumeRequest.php @@ -0,0 +1,157 @@ +google.cloud.baremetalsolution.v2.UpdateVolumeRequest + */ +class UpdateVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The volume to update. + * The `name` field is used to identify the volume to update. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume volume = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $volume = null; + /** + * The list of fields to update. + * The only currently supported fields are: + * 'labels' + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\BareMetalSolution\V2\Volume $volume Required. The volume to update. + * + * The `name` field is used to identify the volume to update. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. + * The only currently supported fields are: + * 'labels' + * + * @return \Google\Cloud\BareMetalSolution\V2\UpdateVolumeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BareMetalSolution\V2\Volume $volume, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setVolume($volume) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BareMetalSolution\V2\Volume $volume + * Required. The volume to update. + * The `name` field is used to identify the volume to update. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to update. + * The only currently supported fields are: + * 'labels' + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. The volume to update. + * The `name` field is used to identify the volume to update. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume volume = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BareMetalSolution\V2\Volume|null + */ + public function getVolume() + { + return $this->volume; + } + + public function hasVolume() + { + return isset($this->volume); + } + + public function clearVolume() + { + unset($this->volume); + } + + /** + * Required. The volume to update. + * The `name` field is used to identify the volume to update. + * Format: projects/{project}/locations/{location}/volumes/{volume} + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume volume = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BareMetalSolution\V2\Volume $var + * @return $this + */ + public function setVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Volume::class); + $this->volume = $var; + + return $this; + } + + /** + * The list of fields to update. + * The only currently supported fields are: + * 'labels' + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to update. + * The only currently supported fields are: + * 'labels' + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF.php new file mode 100644 index 000000000000..217c29708d74 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF.php @@ -0,0 +1,191 @@ +google.cloud.baremetalsolution.v2.VRF + */ +class VRF extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the VRF. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The possible state of VRF. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.State state = 5; + */ + protected $state = 0; + /** + * The QOS policy applied to this VRF. + * The value is only meaningful when all the vlan attachments have the same + * QoS. This field should not be used for new integrations, use vlan + * attachment level qos instead. The field is left for backward-compatibility. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 6; + */ + protected $qos_policy = null; + /** + * The list of VLAN attachments for the VRF. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VRF.VlanAttachment vlan_attachments = 7; + */ + private $vlan_attachments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the VRF. + * @type int $state + * The possible state of VRF. + * @type \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy $qos_policy + * The QOS policy applied to this VRF. + * The value is only meaningful when all the vlan attachments have the same + * QoS. This field should not be used for new integrations, use vlan + * attachment level qos instead. The field is left for backward-compatibility. + * @type array<\Google\Cloud\BareMetalSolution\V2\VRF\VlanAttachment>|\Google\Protobuf\Internal\RepeatedField $vlan_attachments + * The list of VLAN attachments for the VRF. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * The name of the VRF. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the VRF. + * + * 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 possible state of VRF. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.State state = 5; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The possible state of VRF. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.State state = 5; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VRF\State::class); + $this->state = $var; + + return $this; + } + + /** + * The QOS policy applied to this VRF. + * The value is only meaningful when all the vlan attachments have the same + * QoS. This field should not be used for new integrations, use vlan + * attachment level qos instead. The field is left for backward-compatibility. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 6; + * @return \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy|null + */ + public function getQosPolicy() + { + return $this->qos_policy; + } + + public function hasQosPolicy() + { + return isset($this->qos_policy); + } + + public function clearQosPolicy() + { + unset($this->qos_policy); + } + + /** + * The QOS policy applied to this VRF. + * The value is only meaningful when all the vlan attachments have the same + * QoS. This field should not be used for new integrations, use vlan + * attachment level qos instead. The field is left for backward-compatibility. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 6; + * @param \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy $var + * @return $this + */ + public function setQosPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy::class); + $this->qos_policy = $var; + + return $this; + } + + /** + * The list of VLAN attachments for the VRF. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VRF.VlanAttachment vlan_attachments = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVlanAttachments() + { + return $this->vlan_attachments; + } + + /** + * The list of VLAN attachments for the VRF. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VRF.VlanAttachment vlan_attachments = 7; + * @param array<\Google\Cloud\BareMetalSolution\V2\VRF\VlanAttachment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVlanAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VRF\VlanAttachment::class); + $this->vlan_attachments = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/QosPolicy.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/QosPolicy.php new file mode 100644 index 000000000000..155de6cc6ac3 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/QosPolicy.php @@ -0,0 +1,70 @@ +google.cloud.baremetalsolution.v2.VRF.QosPolicy + */ +class QosPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The bandwidth permitted by the QOS policy, in gbps. + * + * Generated from protobuf field double bandwidth_gbps = 1; + */ + protected $bandwidth_gbps = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $bandwidth_gbps + * The bandwidth permitted by the QOS policy, in gbps. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * The bandwidth permitted by the QOS policy, in gbps. + * + * Generated from protobuf field double bandwidth_gbps = 1; + * @return float + */ + public function getBandwidthGbps() + { + return $this->bandwidth_gbps; + } + + /** + * The bandwidth permitted by the QOS policy, in gbps. + * + * Generated from protobuf field double bandwidth_gbps = 1; + * @param float $var + * @return $this + */ + public function setBandwidthGbps($var) + { + GPBUtil::checkDouble($var); + $this->bandwidth_gbps = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QosPolicy::class, \Google\Cloud\BareMetalSolution\V2\VRF_QosPolicy::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/State.php new file mode 100644 index 000000000000..77a76204cece --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/State.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.VRF.State + */ +class State +{ + /** + * The unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The vrf is provisioning. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The vrf is provisioned. + * + * Generated from protobuf enum PROVISIONED = 2; + */ + const PROVISIONED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::PROVISIONED => 'PROVISIONED', + ]; + + 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\BareMetalSolution\V2\VRF_State::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/VlanAttachment.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/VlanAttachment.php new file mode 100644 index 000000000000..e0c067b66dad --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/VlanAttachment.php @@ -0,0 +1,292 @@ +google.cloud.baremetalsolution.v2.VRF.VlanAttachment + */ +class VlanAttachment extends \Google\Protobuf\Internal\Message +{ + /** + * The peer vlan ID of the attachment. + * + * Generated from protobuf field int64 peer_vlan_id = 1; + */ + protected $peer_vlan_id = 0; + /** + * The peer IP of the attachment. + * + * Generated from protobuf field string peer_ip = 2; + */ + protected $peer_ip = ''; + /** + * The router IP of the attachment. + * + * Generated from protobuf field string router_ip = 3; + */ + protected $router_ip = ''; + /** + * Input only. Pairing key. + * + * Generated from protobuf field string pairing_key = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $pairing_key = ''; + /** + * The QOS policy applied to this VLAN attachment. + * This value should be preferred to using qos at vrf level. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 5; + */ + protected $qos_policy = null; + /** + * Immutable. The identifier of the attachment within vrf. + * + * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $id = ''; + /** + * Optional. The name of the vlan attachment within vrf. This is of the form + * projects/{project_number}/regions/{region}/interconnectAttachments/{interconnect_attachment} + * + * Generated from protobuf field string interconnect_attachment = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $interconnect_attachment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $peer_vlan_id + * The peer vlan ID of the attachment. + * @type string $peer_ip + * The peer IP of the attachment. + * @type string $router_ip + * The router IP of the attachment. + * @type string $pairing_key + * Input only. Pairing key. + * @type \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy $qos_policy + * The QOS policy applied to this VLAN attachment. + * This value should be preferred to using qos at vrf level. + * @type string $id + * Immutable. The identifier of the attachment within vrf. + * @type string $interconnect_attachment + * Optional. The name of the vlan attachment within vrf. This is of the form + * projects/{project_number}/regions/{region}/interconnectAttachments/{interconnect_attachment} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); + parent::__construct($data); + } + + /** + * The peer vlan ID of the attachment. + * + * Generated from protobuf field int64 peer_vlan_id = 1; + * @return int|string + */ + public function getPeerVlanId() + { + return $this->peer_vlan_id; + } + + /** + * The peer vlan ID of the attachment. + * + * Generated from protobuf field int64 peer_vlan_id = 1; + * @param int|string $var + * @return $this + */ + public function setPeerVlanId($var) + { + GPBUtil::checkInt64($var); + $this->peer_vlan_id = $var; + + return $this; + } + + /** + * The peer IP of the attachment. + * + * Generated from protobuf field string peer_ip = 2; + * @return string + */ + public function getPeerIp() + { + return $this->peer_ip; + } + + /** + * The peer IP of the attachment. + * + * Generated from protobuf field string peer_ip = 2; + * @param string $var + * @return $this + */ + public function setPeerIp($var) + { + GPBUtil::checkString($var, True); + $this->peer_ip = $var; + + return $this; + } + + /** + * The router IP of the attachment. + * + * Generated from protobuf field string router_ip = 3; + * @return string + */ + public function getRouterIp() + { + return $this->router_ip; + } + + /** + * The router IP of the attachment. + * + * Generated from protobuf field string router_ip = 3; + * @param string $var + * @return $this + */ + public function setRouterIp($var) + { + GPBUtil::checkString($var, True); + $this->router_ip = $var; + + return $this; + } + + /** + * Input only. Pairing key. + * + * Generated from protobuf field string pairing_key = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPairingKey() + { + return $this->pairing_key; + } + + /** + * Input only. Pairing key. + * + * Generated from protobuf field string pairing_key = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPairingKey($var) + { + GPBUtil::checkString($var, True); + $this->pairing_key = $var; + + return $this; + } + + /** + * The QOS policy applied to this VLAN attachment. + * This value should be preferred to using qos at vrf level. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 5; + * @return \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy|null + */ + public function getQosPolicy() + { + return $this->qos_policy; + } + + public function hasQosPolicy() + { + return isset($this->qos_policy); + } + + public function clearQosPolicy() + { + unset($this->qos_policy); + } + + /** + * The QOS policy applied to this VLAN attachment. + * This value should be preferred to using qos at vrf level. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 5; + * @param \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy $var + * @return $this + */ + public function setQosPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy::class); + $this->qos_policy = $var; + + return $this; + } + + /** + * Immutable. The identifier of the attachment within vrf. + * + * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Immutable. The identifier of the attachment within vrf. + * + * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Optional. The name of the vlan attachment within vrf. This is of the form + * projects/{project_number}/regions/{region}/interconnectAttachments/{interconnect_attachment} + * + * Generated from protobuf field string interconnect_attachment = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getInterconnectAttachment() + { + return $this->interconnect_attachment; + } + + /** + * Optional. The name of the vlan attachment within vrf. This is of the form + * projects/{project_number}/regions/{region}/interconnectAttachments/{interconnect_attachment} + * + * Generated from protobuf field string interconnect_attachment = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInterconnectAttachment($var) + { + GPBUtil::checkString($var, True); + $this->interconnect_attachment = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VlanAttachment::class, \Google\Cloud\BareMetalSolution\V2\VRF_VlanAttachment::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume.php new file mode 100644 index 000000000000..47b35834e0a2 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume.php @@ -0,0 +1,933 @@ +google.cloud.baremetalsolution.v2.Volume + */ +class Volume extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this `Volume`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/volumes/{volume}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * An identifier for the `Volume`, generated by the backend. + * + * Generated from protobuf field string id = 11; + */ + protected $id = ''; + /** + * The storage type for this volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; + */ + protected $storage_type = 0; + /** + * The state of this storage volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.State state = 3; + */ + protected $state = 0; + /** + * The requested size of this storage volume, in GiB. + * + * Generated from protobuf field int64 requested_size_gib = 4; + */ + protected $requested_size_gib = 0; + /** + * Originally requested size, in GiB. + * + * Generated from protobuf field int64 originally_requested_size_gib = 16; + */ + protected $originally_requested_size_gib = 0; + /** + * The current size of this storage volume, in GiB, including space reserved + * for snapshots. This size might be different than the requested size if the + * storage volume has been configured with auto grow or auto shrink. + * + * Generated from protobuf field int64 current_size_gib = 5; + */ + protected $current_size_gib = 0; + /** + * Additional emergency size that was requested for this Volume, in GiB. + * current_size_gib includes this value. + * + * Generated from protobuf field int64 emergency_size_gib = 14; + */ + protected $emergency_size_gib = 0; + /** + * Maximum size volume can be expanded to in case of evergency, in GiB. + * + * Generated from protobuf field int64 max_size_gib = 17; + */ + protected $max_size_gib = 0; + /** + * The size, in GiB, that this storage volume has expanded as a result of an + * auto grow policy. In the absence of auto-grow, the value is 0. + * + * Generated from protobuf field int64 auto_grown_size_gib = 6; + */ + protected $auto_grown_size_gib = 0; + /** + * The space remaining in the storage volume for new LUNs, in GiB, excluding + * space reserved for snapshots. + * + * Generated from protobuf field int64 remaining_space_gib = 7; + */ + protected $remaining_space_gib = 0; + /** + * Details about snapshot space reservation and usage on the storage volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; + */ + protected $snapshot_reservation_detail = null; + /** + * The behavior to use when snapshot reserved space is full. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; + */ + protected $snapshot_auto_delete_behavior = 0; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 12; + */ + private $labels; + /** + * Whether snapshots are enabled. + * + * Generated from protobuf field bool snapshot_enabled = 13; + */ + protected $snapshot_enabled = false; + /** + * Immutable. Pod name. + * + * Generated from protobuf field string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $pod = ''; + /** + * Output only. Storage protocol for the Volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $protocol = 0; + /** + * Output only. Whether this volume is a boot volume. A boot volume is one + * which contains a boot LUN. + * + * Generated from protobuf field bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $boot_volume = false; + /** + * Immutable. Performance tier of the Volume. + * Default is SHARED. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $performance_tier = 0; + /** + * Input only. User-specified notes for new Volume. + * Used to provision Volumes that require manual intervention. + * + * Generated from protobuf field string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $notes = ''; + /** + * The workload profile for the volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; + */ + protected $workload_profile = 0; + /** + * Output only. Time after which volume will be fully deleted. + * It is filled only for volumes in COOLOFF state. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. Instances this Volume is attached to. + * This field is set only in Get requests. + * + * Generated from protobuf field repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $instances; + /** + * Output only. Is the Volume attached at at least one instance. + * This field is a lightweight counterpart of `instances` field. + * It is filled in List responses as well. + * + * Generated from protobuf field bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $attached = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this `Volume`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/volumes/{volume}` + * @type string $id + * An identifier for the `Volume`, generated by the backend. + * @type int $storage_type + * The storage type for this volume. + * @type int $state + * The state of this storage volume. + * @type int|string $requested_size_gib + * The requested size of this storage volume, in GiB. + * @type int|string $originally_requested_size_gib + * Originally requested size, in GiB. + * @type int|string $current_size_gib + * The current size of this storage volume, in GiB, including space reserved + * for snapshots. This size might be different than the requested size if the + * storage volume has been configured with auto grow or auto shrink. + * @type int|string $emergency_size_gib + * Additional emergency size that was requested for this Volume, in GiB. + * current_size_gib includes this value. + * @type int|string $max_size_gib + * Maximum size volume can be expanded to in case of evergency, in GiB. + * @type int|string $auto_grown_size_gib + * The size, in GiB, that this storage volume has expanded as a result of an + * auto grow policy. In the absence of auto-grow, the value is 0. + * @type int|string $remaining_space_gib + * The space remaining in the storage volume for new LUNs, in GiB, excluding + * space reserved for snapshots. + * @type \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotReservationDetail $snapshot_reservation_detail + * Details about snapshot space reservation and usage on the storage volume. + * @type int $snapshot_auto_delete_behavior + * The behavior to use when snapshot reserved space is full. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type bool $snapshot_enabled + * Whether snapshots are enabled. + * @type string $pod + * Immutable. Pod name. + * @type int $protocol + * Output only. Storage protocol for the Volume. + * @type bool $boot_volume + * Output only. Whether this volume is a boot volume. A boot volume is one + * which contains a boot LUN. + * @type int $performance_tier + * Immutable. Performance tier of the Volume. + * Default is SHARED. + * @type string $notes + * Input only. User-specified notes for new Volume. + * Used to provision Volumes that require manual intervention. + * @type int $workload_profile + * The workload profile for the volume. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. Time after which volume will be fully deleted. + * It is filled only for volumes in COOLOFF state. + * @type array|\Google\Protobuf\Internal\RepeatedField $instances + * Output only. Instances this Volume is attached to. + * This field is set only in Get requests. + * @type bool $attached + * Output only. Is the Volume attached at at least one instance. + * This field is a lightweight counterpart of `instances` field. + * It is filled in List responses as well. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this `Volume`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/volumes/{volume}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of this `Volume`. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * Format: + * `projects/{project}/locations/{location}/volumes/{volume}` + * + * 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; + } + + /** + * An identifier for the `Volume`, generated by the backend. + * + * Generated from protobuf field string id = 11; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * An identifier for the `Volume`, generated by the backend. + * + * Generated from protobuf field string id = 11; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The storage type for this volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; + * @return int + */ + public function getStorageType() + { + return $this->storage_type; + } + + /** + * The storage type for this volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; + * @param int $var + * @return $this + */ + public function setStorageType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\StorageType::class); + $this->storage_type = $var; + + return $this; + } + + /** + * The state of this storage volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.State state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of this storage volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.State state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\State::class); + $this->state = $var; + + return $this; + } + + /** + * The requested size of this storage volume, in GiB. + * + * Generated from protobuf field int64 requested_size_gib = 4; + * @return int|string + */ + public function getRequestedSizeGib() + { + return $this->requested_size_gib; + } + + /** + * The requested size of this storage volume, in GiB. + * + * Generated from protobuf field int64 requested_size_gib = 4; + * @param int|string $var + * @return $this + */ + public function setRequestedSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->requested_size_gib = $var; + + return $this; + } + + /** + * Originally requested size, in GiB. + * + * Generated from protobuf field int64 originally_requested_size_gib = 16; + * @return int|string + */ + public function getOriginallyRequestedSizeGib() + { + return $this->originally_requested_size_gib; + } + + /** + * Originally requested size, in GiB. + * + * Generated from protobuf field int64 originally_requested_size_gib = 16; + * @param int|string $var + * @return $this + */ + public function setOriginallyRequestedSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->originally_requested_size_gib = $var; + + return $this; + } + + /** + * The current size of this storage volume, in GiB, including space reserved + * for snapshots. This size might be different than the requested size if the + * storage volume has been configured with auto grow or auto shrink. + * + * Generated from protobuf field int64 current_size_gib = 5; + * @return int|string + */ + public function getCurrentSizeGib() + { + return $this->current_size_gib; + } + + /** + * The current size of this storage volume, in GiB, including space reserved + * for snapshots. This size might be different than the requested size if the + * storage volume has been configured with auto grow or auto shrink. + * + * Generated from protobuf field int64 current_size_gib = 5; + * @param int|string $var + * @return $this + */ + public function setCurrentSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->current_size_gib = $var; + + return $this; + } + + /** + * Additional emergency size that was requested for this Volume, in GiB. + * current_size_gib includes this value. + * + * Generated from protobuf field int64 emergency_size_gib = 14; + * @return int|string + */ + public function getEmergencySizeGib() + { + return $this->emergency_size_gib; + } + + /** + * Additional emergency size that was requested for this Volume, in GiB. + * current_size_gib includes this value. + * + * Generated from protobuf field int64 emergency_size_gib = 14; + * @param int|string $var + * @return $this + */ + public function setEmergencySizeGib($var) + { + GPBUtil::checkInt64($var); + $this->emergency_size_gib = $var; + + return $this; + } + + /** + * Maximum size volume can be expanded to in case of evergency, in GiB. + * + * Generated from protobuf field int64 max_size_gib = 17; + * @return int|string + */ + public function getMaxSizeGib() + { + return $this->max_size_gib; + } + + /** + * Maximum size volume can be expanded to in case of evergency, in GiB. + * + * Generated from protobuf field int64 max_size_gib = 17; + * @param int|string $var + * @return $this + */ + public function setMaxSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->max_size_gib = $var; + + return $this; + } + + /** + * The size, in GiB, that this storage volume has expanded as a result of an + * auto grow policy. In the absence of auto-grow, the value is 0. + * + * Generated from protobuf field int64 auto_grown_size_gib = 6; + * @return int|string + */ + public function getAutoGrownSizeGib() + { + return $this->auto_grown_size_gib; + } + + /** + * The size, in GiB, that this storage volume has expanded as a result of an + * auto grow policy. In the absence of auto-grow, the value is 0. + * + * Generated from protobuf field int64 auto_grown_size_gib = 6; + * @param int|string $var + * @return $this + */ + public function setAutoGrownSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->auto_grown_size_gib = $var; + + return $this; + } + + /** + * The space remaining in the storage volume for new LUNs, in GiB, excluding + * space reserved for snapshots. + * + * Generated from protobuf field int64 remaining_space_gib = 7; + * @return int|string + */ + public function getRemainingSpaceGib() + { + return $this->remaining_space_gib; + } + + /** + * The space remaining in the storage volume for new LUNs, in GiB, excluding + * space reserved for snapshots. + * + * Generated from protobuf field int64 remaining_space_gib = 7; + * @param int|string $var + * @return $this + */ + public function setRemainingSpaceGib($var) + { + GPBUtil::checkInt64($var); + $this->remaining_space_gib = $var; + + return $this; + } + + /** + * Details about snapshot space reservation and usage on the storage volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; + * @return \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotReservationDetail|null + */ + public function getSnapshotReservationDetail() + { + return $this->snapshot_reservation_detail; + } + + public function hasSnapshotReservationDetail() + { + return isset($this->snapshot_reservation_detail); + } + + public function clearSnapshotReservationDetail() + { + unset($this->snapshot_reservation_detail); + } + + /** + * Details about snapshot space reservation and usage on the storage volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; + * @param \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotReservationDetail $var + * @return $this + */ + public function setSnapshotReservationDetail($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotReservationDetail::class); + $this->snapshot_reservation_detail = $var; + + return $this; + } + + /** + * The behavior to use when snapshot reserved space is full. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; + * @return int + */ + public function getSnapshotAutoDeleteBehavior() + { + return $this->snapshot_auto_delete_behavior; + } + + /** + * The behavior to use when snapshot reserved space is full. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; + * @param int $var + * @return $this + */ + public function setSnapshotAutoDeleteBehavior($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotAutoDeleteBehavior::class); + $this->snapshot_auto_delete_behavior = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 12; + * @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; + } + + /** + * Whether snapshots are enabled. + * + * Generated from protobuf field bool snapshot_enabled = 13; + * @return bool + */ + public function getSnapshotEnabled() + { + return $this->snapshot_enabled; + } + + /** + * Whether snapshots are enabled. + * + * Generated from protobuf field bool snapshot_enabled = 13; + * @param bool $var + * @return $this + */ + public function setSnapshotEnabled($var) + { + GPBUtil::checkBool($var); + $this->snapshot_enabled = $var; + + return $this; + } + + /** + * Immutable. Pod name. + * + * Generated from protobuf field string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getPod() + { + return $this->pod; + } + + /** + * Immutable. Pod name. + * + * Generated from protobuf field string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setPod($var) + { + GPBUtil::checkString($var, True); + $this->pod = $var; + + return $this; + } + + /** + * Output only. Storage protocol for the Volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Output only. Storage protocol for the Volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\Protocol::class); + $this->protocol = $var; + + return $this; + } + + /** + * Output only. Whether this volume is a boot volume. A boot volume is one + * which contains a boot LUN. + * + * Generated from protobuf field bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getBootVolume() + { + return $this->boot_volume; + } + + /** + * Output only. Whether this volume is a boot volume. A boot volume is one + * which contains a boot LUN. + * + * Generated from protobuf field bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setBootVolume($var) + { + GPBUtil::checkBool($var); + $this->boot_volume = $var; + + return $this; + } + + /** + * Immutable. Performance tier of the Volume. + * Default is SHARED. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getPerformanceTier() + { + return $this->performance_tier; + } + + /** + * Immutable. Performance tier of the Volume. + * Default is SHARED. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setPerformanceTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumePerformanceTier::class); + $this->performance_tier = $var; + + return $this; + } + + /** + * Input only. User-specified notes for new Volume. + * Used to provision Volumes that require manual intervention. + * + * Generated from protobuf field string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getNotes() + { + return $this->notes; + } + + /** + * Input only. User-specified notes for new Volume. + * Used to provision Volumes that require manual intervention. + * + * Generated from protobuf field string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNotes($var) + { + GPBUtil::checkString($var, True); + $this->notes = $var; + + return $this; + } + + /** + * The workload profile for the volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; + * @return int + */ + public function getWorkloadProfile() + { + return $this->workload_profile; + } + + /** + * The workload profile for the volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; + * @param int $var + * @return $this + */ + public function setWorkloadProfile($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\WorkloadProfile::class); + $this->workload_profile = $var; + + return $this; + } + + /** + * Output only. Time after which volume will be fully deleted. + * It is filled only for volumes in COOLOFF state. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. Time after which volume will be fully deleted. + * It is filled only for volumes in COOLOFF state. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. Instances this Volume is attached to. + * This field is set only in Get requests. + * + * Generated from protobuf field repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Output only. Instances this Volume is attached to. + * This field is set only in Get requests. + * + * Generated from protobuf field repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instances = $arr; + + return $this; + } + + /** + * Output only. Is the Volume attached at at least one instance. + * This field is a lightweight counterpart of `instances` field. + * It is filled in List responses as well. + * + * Generated from protobuf field bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAttached() + { + return $this->attached; + } + + /** + * Output only. Is the Volume attached at at least one instance. + * This field is a lightweight counterpart of `instances` field. + * It is filled in List responses as well. + * + * Generated from protobuf field bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAttached($var) + { + GPBUtil::checkBool($var); + $this->attached = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/Protocol.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/Protocol.php new file mode 100644 index 000000000000..4fa04cff8958 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/Protocol.php @@ -0,0 +1,65 @@ +google.cloud.baremetalsolution.v2.Volume.Protocol + */ +class Protocol +{ + /** + * Value is not specified. + * + * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; + */ + const PROTOCOL_UNSPECIFIED = 0; + /** + * Fibre Channel protocol. + * + * Generated from protobuf enum FIBRE_CHANNEL = 1; + */ + const FIBRE_CHANNEL = 1; + /** + * NFS protocol means Volume is a NFS Share volume. + * Such volumes cannot be manipulated via Volumes API. + * + * Generated from protobuf enum NFS = 2; + */ + const NFS = 2; + + private static $valueToName = [ + self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', + self::FIBRE_CHANNEL => 'FIBRE_CHANNEL', + self::NFS => 'NFS', + ]; + + 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(Protocol::class, \Google\Cloud\BareMetalSolution\V2\Volume_Protocol::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotAutoDeleteBehavior.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotAutoDeleteBehavior.php new file mode 100644 index 000000000000..c00ae75623da --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotAutoDeleteBehavior.php @@ -0,0 +1,73 @@ +google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior + */ +class SnapshotAutoDeleteBehavior +{ + /** + * The unspecified behavior. + * + * Generated from protobuf enum SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0; + */ + const SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0; + /** + * Don't delete any snapshots. This disables new snapshot creation, as + * long as the snapshot reserved space is full. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Delete the oldest snapshots first. + * + * Generated from protobuf enum OLDEST_FIRST = 2; + */ + const OLDEST_FIRST = 2; + /** + * Delete the newest snapshots first. + * + * Generated from protobuf enum NEWEST_FIRST = 3; + */ + const NEWEST_FIRST = 3; + + private static $valueToName = [ + self::SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED => 'SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::OLDEST_FIRST => 'OLDEST_FIRST', + self::NEWEST_FIRST => 'NEWEST_FIRST', + ]; + + 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(SnapshotAutoDeleteBehavior::class, \Google\Cloud\BareMetalSolution\V2\Volume_SnapshotAutoDeleteBehavior::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotReservationDetail.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotReservationDetail.php new file mode 100644 index 000000000000..16739fe08920 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotReservationDetail.php @@ -0,0 +1,204 @@ +google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail + */ +class SnapshotReservationDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The space on this storage volume reserved for snapshots, shown in GiB. + * + * Generated from protobuf field int64 reserved_space_gib = 1; + */ + protected $reserved_space_gib = 0; + /** + * The percent of snapshot space on this storage volume actually being used + * by the snapshot copies. This value might be higher than 100% if the + * snapshot copies have overflowed into the data portion of the storage + * volume. + * + * Generated from protobuf field int32 reserved_space_used_percent = 2; + */ + protected $reserved_space_used_percent = 0; + /** + * The amount, in GiB, of available space in this storage volume's reserved + * snapshot space. + * + * Generated from protobuf field int64 reserved_space_remaining_gib = 3; + */ + protected $reserved_space_remaining_gib = 0; + /** + * Percent of the total Volume size reserved for snapshot copies. + * Enabling snapshots requires reserving 20% or more of + * the storage volume space for snapshots. Maximum reserved space for + * snapshots is 40%. + * Setting this field will effectively set snapshot_enabled to true. + * + * Generated from protobuf field int32 reserved_space_percent = 4; + */ + protected $reserved_space_percent = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $reserved_space_gib + * The space on this storage volume reserved for snapshots, shown in GiB. + * @type int $reserved_space_used_percent + * The percent of snapshot space on this storage volume actually being used + * by the snapshot copies. This value might be higher than 100% if the + * snapshot copies have overflowed into the data portion of the storage + * volume. + * @type int|string $reserved_space_remaining_gib + * The amount, in GiB, of available space in this storage volume's reserved + * snapshot space. + * @type int $reserved_space_percent + * Percent of the total Volume size reserved for snapshot copies. + * Enabling snapshots requires reserving 20% or more of + * the storage volume space for snapshots. Maximum reserved space for + * snapshots is 40%. + * Setting this field will effectively set snapshot_enabled to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The space on this storage volume reserved for snapshots, shown in GiB. + * + * Generated from protobuf field int64 reserved_space_gib = 1; + * @return int|string + */ + public function getReservedSpaceGib() + { + return $this->reserved_space_gib; + } + + /** + * The space on this storage volume reserved for snapshots, shown in GiB. + * + * Generated from protobuf field int64 reserved_space_gib = 1; + * @param int|string $var + * @return $this + */ + public function setReservedSpaceGib($var) + { + GPBUtil::checkInt64($var); + $this->reserved_space_gib = $var; + + return $this; + } + + /** + * The percent of snapshot space on this storage volume actually being used + * by the snapshot copies. This value might be higher than 100% if the + * snapshot copies have overflowed into the data portion of the storage + * volume. + * + * Generated from protobuf field int32 reserved_space_used_percent = 2; + * @return int + */ + public function getReservedSpaceUsedPercent() + { + return $this->reserved_space_used_percent; + } + + /** + * The percent of snapshot space on this storage volume actually being used + * by the snapshot copies. This value might be higher than 100% if the + * snapshot copies have overflowed into the data portion of the storage + * volume. + * + * Generated from protobuf field int32 reserved_space_used_percent = 2; + * @param int $var + * @return $this + */ + public function setReservedSpaceUsedPercent($var) + { + GPBUtil::checkInt32($var); + $this->reserved_space_used_percent = $var; + + return $this; + } + + /** + * The amount, in GiB, of available space in this storage volume's reserved + * snapshot space. + * + * Generated from protobuf field int64 reserved_space_remaining_gib = 3; + * @return int|string + */ + public function getReservedSpaceRemainingGib() + { + return $this->reserved_space_remaining_gib; + } + + /** + * The amount, in GiB, of available space in this storage volume's reserved + * snapshot space. + * + * Generated from protobuf field int64 reserved_space_remaining_gib = 3; + * @param int|string $var + * @return $this + */ + public function setReservedSpaceRemainingGib($var) + { + GPBUtil::checkInt64($var); + $this->reserved_space_remaining_gib = $var; + + return $this; + } + + /** + * Percent of the total Volume size reserved for snapshot copies. + * Enabling snapshots requires reserving 20% or more of + * the storage volume space for snapshots. Maximum reserved space for + * snapshots is 40%. + * Setting this field will effectively set snapshot_enabled to true. + * + * Generated from protobuf field int32 reserved_space_percent = 4; + * @return int + */ + public function getReservedSpacePercent() + { + return $this->reserved_space_percent; + } + + /** + * Percent of the total Volume size reserved for snapshot copies. + * Enabling snapshots requires reserving 20% or more of + * the storage volume space for snapshots. Maximum reserved space for + * snapshots is 40%. + * Setting this field will effectively set snapshot_enabled to true. + * + * Generated from protobuf field int32 reserved_space_percent = 4; + * @param int $var + * @return $this + */ + public function setReservedSpacePercent($var) + { + GPBUtil::checkInt32($var); + $this->reserved_space_percent = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SnapshotReservationDetail::class, \Google\Cloud\BareMetalSolution\V2\Volume_SnapshotReservationDetail::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/State.php new file mode 100644 index 000000000000..6f0294162c29 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/State.php @@ -0,0 +1,86 @@ +google.cloud.baremetalsolution.v2.Volume.State + */ +class State +{ + /** + * The storage volume is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The storage volume is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The storage volume is ready for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The storage volume has been requested to be deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The storage volume is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * The storage volume is in cool off state. It will be deleted after + * `expire_time`. + * + * Generated from protobuf enum COOL_OFF = 5; + */ + const COOL_OFF = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::COOL_OFF => 'COOL_OFF', + ]; + + 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\BareMetalSolution\V2\Volume_State::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/StorageType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/StorageType.php new file mode 100644 index 000000000000..2ccb93087f78 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/StorageType.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.Volume.StorageType + */ +class StorageType +{ + /** + * The storage type for this volume is unknown. + * + * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; + */ + const STORAGE_TYPE_UNSPECIFIED = 0; + /** + * The storage type for this volume is SSD. + * + * Generated from protobuf enum SSD = 1; + */ + const SSD = 1; + /** + * This storage type for this volume is HDD. + * + * Generated from protobuf enum HDD = 2; + */ + const HDD = 2; + + private static $valueToName = [ + self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', + self::SSD => 'SSD', + self::HDD => 'HDD', + ]; + + 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(StorageType::class, \Google\Cloud\BareMetalSolution\V2\Volume_StorageType::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/WorkloadProfile.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/WorkloadProfile.php new file mode 100644 index 000000000000..dc4e299c0d91 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/WorkloadProfile.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.Volume.WorkloadProfile + */ +class WorkloadProfile +{ + /** + * The workload profile is in an unknown state. + * + * Generated from protobuf enum WORKLOAD_PROFILE_UNSPECIFIED = 0; + */ + const WORKLOAD_PROFILE_UNSPECIFIED = 0; + /** + * The workload profile is generic. + * + * Generated from protobuf enum GENERIC = 1; + */ + const GENERIC = 1; + /** + * The workload profile is hana. + * + * Generated from protobuf enum HANA = 2; + */ + const HANA = 2; + + private static $valueToName = [ + self::WORKLOAD_PROFILE_UNSPECIFIED => 'WORKLOAD_PROFILE_UNSPECIFIED', + self::GENERIC => 'GENERIC', + self::HANA => 'HANA', + ]; + + 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(WorkloadProfile::class, \Google\Cloud\BareMetalSolution\V2\Volume_WorkloadProfile::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig.php new file mode 100644 index 000000000000..7778d4373a6d --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig.php @@ -0,0 +1,461 @@ +google.cloud.baremetalsolution.v2.VolumeConfig + */ +class VolumeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the volume config. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * A transient unique identifier to identify a volume within an + * ProvisioningConfig request. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + /** + * Whether snapshots should be enabled. + * + * Generated from protobuf field bool snapshots_enabled = 3; + */ + protected $snapshots_enabled = false; + /** + * The type of this Volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; + */ + protected $type = 0; + /** + * Volume protocol. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; + */ + protected $protocol = 0; + /** + * The requested size of this volume, in GB. + * + * Generated from protobuf field int32 size_gb = 6; + */ + protected $size_gb = 0; + /** + * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; + */ + private $lun_ranges; + /** + * Machine ids connected to this volume. Set only when protocol is + * PROTOCOL_FC. + * + * Generated from protobuf field repeated string machine_ids = 8; + */ + private $machine_ids; + /** + * NFS exports. Set only when protocol is PROTOCOL_NFS. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; + */ + private $nfs_exports; + /** + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * + * Generated from protobuf field string user_note = 10; + */ + protected $user_note = ''; + /** + * The GCP service of the storage volume. Available gcp_service are in + * https://cloud.google.com/bare-metal/docs/bms-planning. + * + * Generated from protobuf field string gcp_service = 11; + */ + protected $gcp_service = ''; + /** + * Performance tier of the Volume. + * Default is SHARED. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; + */ + protected $performance_tier = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the volume config. + * @type string $id + * A transient unique identifier to identify a volume within an + * ProvisioningConfig request. + * @type bool $snapshots_enabled + * Whether snapshots should be enabled. + * @type int $type + * The type of this Volume. + * @type int $protocol + * Volume protocol. + * @type int $size_gb + * The requested size of this volume, in GB. + * @type array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange>|\Google\Protobuf\Internal\RepeatedField $lun_ranges + * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. + * @type array|\Google\Protobuf\Internal\RepeatedField $machine_ids + * Machine ids connected to this volume. Set only when protocol is + * PROTOCOL_FC. + * @type array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport>|\Google\Protobuf\Internal\RepeatedField $nfs_exports + * NFS exports. Set only when protocol is PROTOCOL_NFS. + * @type string $user_note + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * @type string $gcp_service + * The GCP service of the storage volume. Available gcp_service are in + * https://cloud.google.com/bare-metal/docs/bms-planning. + * @type int $performance_tier + * Performance tier of the Volume. + * Default is SHARED. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the volume config. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the volume config. + * + * 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; + } + + /** + * A transient unique identifier to identify a volume within an + * ProvisioningConfig request. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * A transient unique identifier to identify a volume within an + * ProvisioningConfig request. + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Whether snapshots should be enabled. + * + * Generated from protobuf field bool snapshots_enabled = 3; + * @return bool + */ + public function getSnapshotsEnabled() + { + return $this->snapshots_enabled; + } + + /** + * Whether snapshots should be enabled. + * + * Generated from protobuf field bool snapshots_enabled = 3; + * @param bool $var + * @return $this + */ + public function setSnapshotsEnabled($var) + { + GPBUtil::checkBool($var); + $this->snapshots_enabled = $var; + + return $this; + } + + /** + * The type of this Volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this Volume. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Volume protocol. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; + * @return int + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Volume protocol. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; + * @param int $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\Protocol::class); + $this->protocol = $var; + + return $this; + } + + /** + * The requested size of this volume, in GB. + * + * Generated from protobuf field int32 size_gb = 6; + * @return int + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * The requested size of this volume, in GB. + * + * Generated from protobuf field int32 size_gb = 6; + * @param int $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->size_gb = $var; + + return $this; + } + + /** + * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLunRanges() + { + return $this->lun_ranges; + } + + /** + * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; + * @param array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLunRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange::class); + $this->lun_ranges = $arr; + + return $this; + } + + /** + * Machine ids connected to this volume. Set only when protocol is + * PROTOCOL_FC. + * + * Generated from protobuf field repeated string machine_ids = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMachineIds() + { + return $this->machine_ids; + } + + /** + * Machine ids connected to this volume. Set only when protocol is + * PROTOCOL_FC. + * + * Generated from protobuf field repeated string machine_ids = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMachineIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->machine_ids = $arr; + + return $this; + } + + /** + * NFS exports. Set only when protocol is PROTOCOL_NFS. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNfsExports() + { + return $this->nfs_exports; + } + + /** + * NFS exports. Set only when protocol is PROTOCOL_NFS. + * + * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; + * @param array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNfsExports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport::class); + $this->nfs_exports = $arr; + + return $this; + } + + /** + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * + * Generated from protobuf field string user_note = 10; + * @return string + */ + public function getUserNote() + { + return $this->user_note; + } + + /** + * User note field, it can be used by customers to add additional information + * for the BMS Ops team . + * + * Generated from protobuf field string user_note = 10; + * @param string $var + * @return $this + */ + public function setUserNote($var) + { + GPBUtil::checkString($var, True); + $this->user_note = $var; + + return $this; + } + + /** + * The GCP service of the storage volume. Available gcp_service are in + * https://cloud.google.com/bare-metal/docs/bms-planning. + * + * Generated from protobuf field string gcp_service = 11; + * @return string + */ + public function getGcpService() + { + return $this->gcp_service; + } + + /** + * The GCP service of the storage volume. Available gcp_service are in + * https://cloud.google.com/bare-metal/docs/bms-planning. + * + * Generated from protobuf field string gcp_service = 11; + * @param string $var + * @return $this + */ + public function setGcpService($var) + { + GPBUtil::checkString($var, True); + $this->gcp_service = $var; + + return $this; + } + + /** + * Performance tier of the Volume. + * Default is SHARED. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; + * @return int + */ + public function getPerformanceTier() + { + return $this->performance_tier; + } + + /** + * Performance tier of the Volume. + * Default is SHARED. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; + * @param int $var + * @return $this + */ + public function setPerformanceTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumePerformanceTier::class); + $this->performance_tier = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/LunRange.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/LunRange.php new file mode 100644 index 000000000000..eb66277f0448 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/LunRange.php @@ -0,0 +1,104 @@ +google.cloud.baremetalsolution.v2.VolumeConfig.LunRange + */ +class LunRange extends \Google\Protobuf\Internal\Message +{ + /** + * Number of LUNs to create. + * + * Generated from protobuf field int32 quantity = 1; + */ + protected $quantity = 0; + /** + * The requested size of each LUN, in GB. + * + * Generated from protobuf field int32 size_gb = 2; + */ + protected $size_gb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $quantity + * Number of LUNs to create. + * @type int $size_gb + * The requested size of each LUN, in GB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Number of LUNs to create. + * + * Generated from protobuf field int32 quantity = 1; + * @return int + */ + public function getQuantity() + { + return $this->quantity; + } + + /** + * Number of LUNs to create. + * + * Generated from protobuf field int32 quantity = 1; + * @param int $var + * @return $this + */ + public function setQuantity($var) + { + GPBUtil::checkInt32($var); + $this->quantity = $var; + + return $this; + } + + /** + * The requested size of each LUN, in GB. + * + * Generated from protobuf field int32 size_gb = 2; + * @return int + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * The requested size of each LUN, in GB. + * + * Generated from protobuf field int32 size_gb = 2; + * @param int $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->size_gb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LunRange::class, \Google\Cloud\BareMetalSolution\V2\VolumeConfig_LunRange::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport.php new file mode 100644 index 000000000000..532d11d7a61f --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport.php @@ -0,0 +1,292 @@ +google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport + */ +class NfsExport extends \Google\Protobuf\Internal\Message +{ + /** + * Network to use to publish the export. + * + * Generated from protobuf field string network_id = 1; + */ + protected $network_id = ''; + /** + * Export permissions. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; + */ + protected $permissions = 0; + /** + * Disable root squashing, which is a feature of NFS. + * Root squash is a special mapping of the remote superuser (root) identity + * when using identity authentication. + * + * Generated from protobuf field bool no_root_squash = 5; + */ + protected $no_root_squash = false; + /** + * Allow the setuid flag. + * + * Generated from protobuf field bool allow_suid = 6; + */ + protected $allow_suid = false; + /** + * Allow dev flag in NfsShare AllowedClientsRequest. + * + * Generated from protobuf field bool allow_dev = 7; + */ + protected $allow_dev = false; + protected $client; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_id + * Network to use to publish the export. + * @type string $machine_id + * Either a single machine, identified by an ID, or a comma-separated + * list of machine IDs. + * @type string $cidr + * A CIDR range. + * @type int $permissions + * Export permissions. + * @type bool $no_root_squash + * Disable root squashing, which is a feature of NFS. + * Root squash is a special mapping of the remote superuser (root) identity + * when using identity authentication. + * @type bool $allow_suid + * Allow the setuid flag. + * @type bool $allow_dev + * Allow dev flag in NfsShare AllowedClientsRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); + parent::__construct($data); + } + + /** + * Network to use to publish the export. + * + * Generated from protobuf field string network_id = 1; + * @return string + */ + public function getNetworkId() + { + return $this->network_id; + } + + /** + * Network to use to publish the export. + * + * Generated from protobuf field string network_id = 1; + * @param string $var + * @return $this + */ + public function setNetworkId($var) + { + GPBUtil::checkString($var, True); + $this->network_id = $var; + + return $this; + } + + /** + * Either a single machine, identified by an ID, or a comma-separated + * list of machine IDs. + * + * Generated from protobuf field string machine_id = 2; + * @return string + */ + public function getMachineId() + { + return $this->readOneof(2); + } + + public function hasMachineId() + { + return $this->hasOneof(2); + } + + /** + * Either a single machine, identified by an ID, or a comma-separated + * list of machine IDs. + * + * Generated from protobuf field string machine_id = 2; + * @param string $var + * @return $this + */ + public function setMachineId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A CIDR range. + * + * Generated from protobuf field string cidr = 3; + * @return string + */ + public function getCidr() + { + return $this->readOneof(3); + } + + public function hasCidr() + { + return $this->hasOneof(3); + } + + /** + * A CIDR range. + * + * Generated from protobuf field string cidr = 3; + * @param string $var + * @return $this + */ + public function setCidr($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Export permissions. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; + * @return int + */ + public function getPermissions() + { + return $this->permissions; + } + + /** + * Export permissions. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; + * @param int $var + * @return $this + */ + public function setPermissions($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport\Permissions::class); + $this->permissions = $var; + + return $this; + } + + /** + * Disable root squashing, which is a feature of NFS. + * Root squash is a special mapping of the remote superuser (root) identity + * when using identity authentication. + * + * Generated from protobuf field bool no_root_squash = 5; + * @return bool + */ + public function getNoRootSquash() + { + return $this->no_root_squash; + } + + /** + * Disable root squashing, which is a feature of NFS. + * Root squash is a special mapping of the remote superuser (root) identity + * when using identity authentication. + * + * Generated from protobuf field bool no_root_squash = 5; + * @param bool $var + * @return $this + */ + public function setNoRootSquash($var) + { + GPBUtil::checkBool($var); + $this->no_root_squash = $var; + + return $this; + } + + /** + * Allow the setuid flag. + * + * Generated from protobuf field bool allow_suid = 6; + * @return bool + */ + public function getAllowSuid() + { + return $this->allow_suid; + } + + /** + * Allow the setuid flag. + * + * Generated from protobuf field bool allow_suid = 6; + * @param bool $var + * @return $this + */ + public function setAllowSuid($var) + { + GPBUtil::checkBool($var); + $this->allow_suid = $var; + + return $this; + } + + /** + * Allow dev flag in NfsShare AllowedClientsRequest. + * + * Generated from protobuf field bool allow_dev = 7; + * @return bool + */ + public function getAllowDev() + { + return $this->allow_dev; + } + + /** + * Allow dev flag in NfsShare AllowedClientsRequest. + * + * Generated from protobuf field bool allow_dev = 7; + * @param bool $var + * @return $this + */ + public function setAllowDev($var) + { + GPBUtil::checkBool($var); + $this->allow_dev = $var; + + return $this; + } + + /** + * @return string + */ + public function getClient() + { + return $this->whichOneof("client"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NfsExport::class, \Google\Cloud\BareMetalSolution\V2\VolumeConfig_NfsExport::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport/Permissions.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport/Permissions.php new file mode 100644 index 000000000000..3df23bfc1717 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport/Permissions.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions + */ +class Permissions +{ + /** + * Unspecified value. + * + * Generated from protobuf enum PERMISSIONS_UNSPECIFIED = 0; + */ + const PERMISSIONS_UNSPECIFIED = 0; + /** + * Read-only permission. + * + * Generated from protobuf enum READ_ONLY = 1; + */ + const READ_ONLY = 1; + /** + * Read-write permission. + * + * Generated from protobuf enum READ_WRITE = 2; + */ + const READ_WRITE = 2; + + private static $valueToName = [ + self::PERMISSIONS_UNSPECIFIED => 'PERMISSIONS_UNSPECIFIED', + self::READ_ONLY => 'READ_ONLY', + self::READ_WRITE => 'READ_WRITE', + ]; + + 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(Permissions::class, \Google\Cloud\BareMetalSolution\V2\VolumeConfig_NfsExport_Permissions::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Protocol.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Protocol.php new file mode 100644 index 000000000000..65bef81f7778 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Protocol.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.VolumeConfig.Protocol + */ +class Protocol +{ + /** + * Unspecified value. + * + * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; + */ + const PROTOCOL_UNSPECIFIED = 0; + /** + * Fibre channel. + * + * Generated from protobuf enum PROTOCOL_FC = 1; + */ + const PROTOCOL_FC = 1; + /** + * Network file system. + * + * Generated from protobuf enum PROTOCOL_NFS = 2; + */ + const PROTOCOL_NFS = 2; + + private static $valueToName = [ + self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', + self::PROTOCOL_FC => 'PROTOCOL_FC', + self::PROTOCOL_NFS => 'PROTOCOL_NFS', + ]; + + 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(Protocol::class, \Google\Cloud\BareMetalSolution\V2\VolumeConfig_Protocol::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Type.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Type.php new file mode 100644 index 000000000000..625c45b1595a --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Type.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.VolumeConfig.Type + */ +class Type +{ + /** + * The unspecified type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * This Volume is on flash. + * + * Generated from protobuf enum FLASH = 1; + */ + const FLASH = 1; + /** + * This Volume is on disk. + * + * Generated from protobuf enum DISK = 2; + */ + const DISK = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::FLASH => 'FLASH', + self::DISK => 'DISK', + ]; + + 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\BareMetalSolution\V2\VolumeConfig_Type::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumePerformanceTier.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumePerformanceTier.php new file mode 100644 index 000000000000..7297104a7429 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumePerformanceTier.php @@ -0,0 +1,68 @@ +google.cloud.baremetalsolution.v2.VolumePerformanceTier + */ +class VolumePerformanceTier +{ + /** + * Value is not specified. + * + * Generated from protobuf enum VOLUME_PERFORMANCE_TIER_UNSPECIFIED = 0; + */ + const VOLUME_PERFORMANCE_TIER_UNSPECIFIED = 0; + /** + * Regular volumes, shared aggregates. + * + * Generated from protobuf enum VOLUME_PERFORMANCE_TIER_SHARED = 1; + */ + const VOLUME_PERFORMANCE_TIER_SHARED = 1; + /** + * Assigned aggregates. + * + * Generated from protobuf enum VOLUME_PERFORMANCE_TIER_ASSIGNED = 2; + */ + const VOLUME_PERFORMANCE_TIER_ASSIGNED = 2; + /** + * High throughput aggregates. + * + * Generated from protobuf enum VOLUME_PERFORMANCE_TIER_HT = 3; + */ + const VOLUME_PERFORMANCE_TIER_HT = 3; + + private static $valueToName = [ + self::VOLUME_PERFORMANCE_TIER_UNSPECIFIED => 'VOLUME_PERFORMANCE_TIER_UNSPECIFIED', + self::VOLUME_PERFORMANCE_TIER_SHARED => 'VOLUME_PERFORMANCE_TIER_SHARED', + self::VOLUME_PERFORMANCE_TIER_ASSIGNED => 'VOLUME_PERFORMANCE_TIER_ASSIGNED', + self::VOLUME_PERFORMANCE_TIER_HT => 'VOLUME_PERFORMANCE_TIER_HT', + ]; + + 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot.php new file mode 100644 index 000000000000..0f373073648f --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot.php @@ -0,0 +1,251 @@ +google.cloud.baremetalsolution.v2.VolumeSnapshot + */ +class VolumeSnapshot extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the snapshot. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. An identifier for the snapshot, generated by the backend. + * + * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * The description of the snapshot. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. The creation time of the snapshot. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The name of the volume which this snapshot belongs to. + * + * Generated from protobuf field string storage_volume = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $storage_volume = ''; + /** + * Output only. The type of the snapshot which indicates whether it was + * scheduled or manual/ad-hoc. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the snapshot. + * @type string $id + * Output only. An identifier for the snapshot, generated by the backend. + * @type string $description + * The description of the snapshot. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of the snapshot. + * @type string $storage_volume + * Output only. The name of the volume which this snapshot belongs to. + * @type int $type + * Output only. The type of the snapshot which indicates whether it was + * scheduled or manual/ad-hoc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); + parent::__construct($data); + } + + /** + * The name of the snapshot. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the snapshot. + * + * 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; + } + + /** + * Output only. An identifier for the snapshot, generated by the backend. + * + * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. An identifier for the snapshot, generated by the backend. + * + * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The description of the snapshot. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the snapshot. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The creation time of the snapshot. + * + * 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 creation time of the snapshot. + * + * 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 name of the volume which this snapshot belongs to. + * + * Generated from protobuf field string storage_volume = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getStorageVolume() + { + return $this->storage_volume; + } + + /** + * Output only. The name of the volume which this snapshot belongs to. + * + * Generated from protobuf field string storage_volume = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStorageVolume($var) + { + GPBUtil::checkString($var, True); + $this->storage_volume = $var; + + return $this; + } + + /** + * Output only. The type of the snapshot which indicates whether it was + * scheduled or manual/ad-hoc. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of the snapshot which indicates whether it was + * scheduled or manual/ad-hoc. + * + * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot\SnapshotType::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot/SnapshotType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot/SnapshotType.php new file mode 100644 index 000000000000..cb33991c9af7 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot/SnapshotType.php @@ -0,0 +1,64 @@ +google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType + */ +class SnapshotType +{ + /** + * Type is not specified. + * + * Generated from protobuf enum SNAPSHOT_TYPE_UNSPECIFIED = 0; + */ + const SNAPSHOT_TYPE_UNSPECIFIED = 0; + /** + * Snapshot was taken manually by user. + * + * Generated from protobuf enum AD_HOC = 1; + */ + const AD_HOC = 1; + /** + * Snapshot was taken automatically as a part of a snapshot schedule. + * + * Generated from protobuf enum SCHEDULED = 2; + */ + const SCHEDULED = 2; + + private static $valueToName = [ + self::SNAPSHOT_TYPE_UNSPECIFIED => 'SNAPSHOT_TYPE_UNSPECIFIED', + self::AD_HOC => 'AD_HOC', + self::SCHEDULED => 'SCHEDULED', + ]; + + 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(SnapshotType::class, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot_SnapshotType::class); + diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/WorkloadProfile.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/WorkloadProfile.php new file mode 100644 index 000000000000..fc772fed0a51 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/WorkloadProfile.php @@ -0,0 +1,61 @@ +google.cloud.baremetalsolution.v2.WorkloadProfile + */ +class WorkloadProfile +{ + /** + * The workload profile is in an unknown state. + * + * Generated from protobuf enum WORKLOAD_PROFILE_UNSPECIFIED = 0; + */ + const WORKLOAD_PROFILE_UNSPECIFIED = 0; + /** + * The workload profile is generic. + * + * Generated from protobuf enum WORKLOAD_PROFILE_GENERIC = 1; + */ + const WORKLOAD_PROFILE_GENERIC = 1; + /** + * The workload profile is hana. + * + * Generated from protobuf enum WORKLOAD_PROFILE_HANA = 2; + */ + const WORKLOAD_PROFILE_HANA = 2; + + private static $valueToName = [ + self::WORKLOAD_PROFILE_UNSPECIFIED => 'WORKLOAD_PROFILE_UNSPECIFIED', + self::WORKLOAD_PROFILE_GENERIC => 'WORKLOAD_PROFILE_GENERIC', + self::WORKLOAD_PROFILE_HANA => 'WORKLOAD_PROFILE_HANA', + ]; + + 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/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_nfs_share.php new file mode 100644 index 000000000000..ed4d0a74f15e --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_nfs_share.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setNfsShare($nfsShare); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->createNfsShare($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NfsShare $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + create_nfs_share_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_provisioning_config.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_provisioning_config.php new file mode 100644 index 000000000000..9bc3a6586138 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_provisioning_config.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setProvisioningConfig($provisioningConfig); + + // Call the API and handle any network failures. + try { + /** @var ProvisioningConfig $response */ + $response = $bareMetalSolutionClient->createProvisioningConfig($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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + create_provisioning_config_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_ssh_key.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_ssh_key.php new file mode 100644 index 000000000000..41135bb514d1 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_ssh_key.php @@ -0,0 +1,81 @@ +setParent($formattedParent) + ->setSshKey($sshKey) + ->setSshKeyId($sshKeyId); + + // Call the API and handle any network failures. + try { + /** @var SSHKey $response */ + $response = $bareMetalSolutionClient->createSSHKey($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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + $sshKeyId = '[SSH_KEY_ID]'; + + create_ssh_key_sample($formattedParent, $sshKeyId); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_volume_snapshot.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_volume_snapshot.php new file mode 100644 index 000000000000..28173c28bd82 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_volume_snapshot.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setVolumeSnapshot($volumeSnapshot); + + // Call the API and handle any network failures. + try { + /** @var VolumeSnapshot $response */ + $response = $bareMetalSolutionClient->createVolumeSnapshot($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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + create_volume_snapshot_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_nfs_share.php new file mode 100644 index 000000000000..e2dce3818dce --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_nfs_share.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->deleteNfsShare($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 = BareMetalSolutionClient::nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); + + delete_nfs_share_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_ssh_key.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_ssh_key.php new file mode 100644 index 000000000000..6f0600e1afa2 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_ssh_key.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $bareMetalSolutionClient->deleteSSHKey($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 = BareMetalSolutionClient::sshKeyName('[PROJECT]', '[LOCATION]', '[SSH_KEY]'); + + delete_ssh_key_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php new file mode 100644 index 000000000000..a2efad4389bd --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $bareMetalSolutionClient->deleteVolumeSnapshot($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 = BareMetalSolutionClient::volumeSnapshotName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[SNAPSHOT]' + ); + + delete_volume_snapshot_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/detach_lun.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/detach_lun.php new file mode 100644 index 000000000000..b9eaca3c7003 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/detach_lun.php @@ -0,0 +1,87 @@ +setInstance($formattedInstance) + ->setLun($formattedLun); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->detachLun($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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 +{ + $formattedInstance = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $formattedLun = BareMetalSolutionClient::lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); + + detach_lun_sample($formattedInstance, $formattedLun); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php new file mode 100644 index 000000000000..179a72f1910e --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->disableInteractiveSerialConsole($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DisableInteractiveSerialConsoleResponse $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 +{ + $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + disable_interactive_serial_console_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php new file mode 100644 index 000000000000..9861ffcaddea --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->enableInteractiveSerialConsole($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var EnableInteractiveSerialConsoleResponse $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 +{ + $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + enable_interactive_serial_console_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_lun.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_lun.php new file mode 100644 index 000000000000..05f1470156bf --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_lun.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->evictLun($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 = BareMetalSolutionClient::lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); + + evict_lun_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_volume.php new file mode 100644 index 000000000000..0d7f59bd5e2d --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_volume.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->evictVolume($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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + evict_volume_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_instance.php new file mode 100644 index 000000000000..7816e83709e2 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_instance.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $bareMetalSolutionClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_location.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_location.php new file mode 100644 index 000000000000..baadc6bed0c9 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/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 baremetalsolution_v2_generated_BareMetalSolution_GetLocation_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_lun.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_lun.php new file mode 100644 index 000000000000..d249f64d398f --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_lun.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Lun $response */ + $response = $bareMetalSolutionClient->getLun($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 = BareMetalSolutionClient::lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); + + get_lun_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_network.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_network.php new file mode 100644 index 000000000000..6f1fb0c3f793 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_network.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Network $response */ + $response = $bareMetalSolutionClient->getNetwork($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 = BareMetalSolutionClient::networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); + + get_network_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_nfs_share.php new file mode 100644 index 000000000000..88188b923791 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_nfs_share.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NfsShare $response */ + $response = $bareMetalSolutionClient->getNfsShare($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 = BareMetalSolutionClient::nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); + + get_nfs_share_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_provisioning_config.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_provisioning_config.php new file mode 100644 index 000000000000..59411c40cdf4 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_provisioning_config.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ProvisioningConfig $response */ + $response = $bareMetalSolutionClient->getProvisioningConfig($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 = BareMetalSolutionClient::provisioningConfigName( + '[PROJECT]', + '[LOCATION]', + '[PROVISIONING_CONFIG]' + ); + + get_provisioning_config_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume.php new file mode 100644 index 000000000000..185a81d1cc7c --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Volume $response */ + $response = $bareMetalSolutionClient->getVolume($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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + get_volume_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume_snapshot.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume_snapshot.php new file mode 100644 index 000000000000..0ff4ff5ca193 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume_snapshot.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VolumeSnapshot $response */ + $response = $bareMetalSolutionClient->getVolumeSnapshot($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 = BareMetalSolutionClient::volumeSnapshotName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[SNAPSHOT]' + ); + + get_volume_snapshot_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_instances.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_instances.php new file mode 100644 index 000000000000..ebbe9c0fb0d4 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_instances.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bareMetalSolutionClient->listInstances($request); + + /** @var Instance $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_locations.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_locations.php new file mode 100644 index 000000000000..c0182ac269c0 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/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 baremetalsolution_v2_generated_BareMetalSolution_ListLocations_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_luns.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_luns.php new file mode 100644 index 000000000000..04c6ec4f4e83 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_luns.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bareMetalSolutionClient->listLuns($request); + + /** @var Lun $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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + list_luns_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_network_usage.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_network_usage.php new file mode 100644 index 000000000000..50c7b4987643 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_network_usage.php @@ -0,0 +1,72 @@ +setLocation($formattedLocation); + + // Call the API and handle any network failures. + try { + /** @var ListNetworkUsageResponse $response */ + $response = $bareMetalSolutionClient->listNetworkUsage($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 +{ + $formattedLocation = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + list_network_usage_sample($formattedLocation); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_networks.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_networks.php new file mode 100644 index 000000000000..b08ac94895c3 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_networks.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bareMetalSolutionClient->listNetworks($request); + + /** @var Network $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + list_networks_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_nfs_shares.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_nfs_shares.php new file mode 100644 index 000000000000..58724afd9e66 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_nfs_shares.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bareMetalSolutionClient->listNfsShares($request); + + /** @var NfsShare $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + list_nfs_shares_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_os_images.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_os_images.php new file mode 100644 index 000000000000..73a9f72ba49c --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_os_images.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bareMetalSolutionClient->listOSImages($request); + + /** @var OSImage $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + list_os_images_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php new file mode 100644 index 000000000000..d20ebcac0d81 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bareMetalSolutionClient->listProvisioningQuotas($request); + + /** @var ProvisioningQuota $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + list_provisioning_quotas_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_ssh_keys.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_ssh_keys.php new file mode 100644 index 000000000000..05d9976d2d4a --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_ssh_keys.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bareMetalSolutionClient->listSSHKeys($request); + + /** @var SSHKey $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + list_ssh_keys_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volume_snapshots.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volume_snapshots.php new file mode 100644 index 000000000000..ec6187beb2d3 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volume_snapshots.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bareMetalSolutionClient->listVolumeSnapshots($request); + + /** @var VolumeSnapshot $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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + list_volume_snapshots_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volumes.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volumes.php new file mode 100644 index 000000000000..d5ee384a4368 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volumes.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bareMetalSolutionClient->listVolumes($request); + + /** @var Volume $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + list_volumes_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_instance.php new file mode 100644 index 000000000000..e3626707d59e --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_instance.php @@ -0,0 +1,76 @@ +setName($formattedName) + ->setNewInstanceId($newInstanceId); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $bareMetalSolutionClient->renameInstance($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 = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $newInstanceId = '[NEW_INSTANCE_ID]'; + + rename_instance_sample($formattedName, $newInstanceId); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_network.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_network.php new file mode 100644 index 000000000000..b57757e6efd4 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_network.php @@ -0,0 +1,76 @@ +setName($formattedName) + ->setNewNetworkId($newNetworkId); + + // Call the API and handle any network failures. + try { + /** @var Network $response */ + $response = $bareMetalSolutionClient->renameNetwork($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 = BareMetalSolutionClient::networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); + $newNetworkId = '[NEW_NETWORK_ID]'; + + rename_network_sample($formattedName, $newNetworkId); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_nfs_share.php new file mode 100644 index 000000000000..1dd1547c1a6b --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_nfs_share.php @@ -0,0 +1,76 @@ +setName($formattedName) + ->setNewNfsshareId($newNfsshareId); + + // Call the API and handle any network failures. + try { + /** @var NfsShare $response */ + $response = $bareMetalSolutionClient->renameNfsShare($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 = BareMetalSolutionClient::nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); + $newNfsshareId = '[NEW_NFSSHARE_ID]'; + + rename_nfs_share_sample($formattedName, $newNfsshareId); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_volume.php new file mode 100644 index 000000000000..22257d66071e --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_volume.php @@ -0,0 +1,76 @@ +setName($formattedName) + ->setNewVolumeId($newVolumeId); + + // Call the API and handle any network failures. + try { + /** @var Volume $response */ + $response = $bareMetalSolutionClient->renameVolume($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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $newVolumeId = '[NEW_VOLUME_ID]'; + + rename_volume_sample($formattedName, $newVolumeId); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/reset_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/reset_instance.php new file mode 100644 index 000000000000..0757737dd1bb --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/reset_instance.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->resetInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ResetInstanceResponse $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 +{ + $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + reset_instance_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/resize_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/resize_volume.php new file mode 100644 index 000000000000..e71be72e3fab --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/resize_volume.php @@ -0,0 +1,83 @@ +setVolume($formattedVolume); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->resizeVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Volume $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 +{ + $formattedVolume = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + resize_volume_sample($formattedVolume); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php new file mode 100644 index 000000000000..0c6dba96a751 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php @@ -0,0 +1,90 @@ +setVolumeSnapshot($formattedVolumeSnapshot); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->restoreVolumeSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var VolumeSnapshot $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 +{ + $formattedVolumeSnapshot = BareMetalSolutionClient::volumeSnapshotName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[SNAPSHOT]' + ); + + restore_volume_snapshot_sample($formattedVolumeSnapshot); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/start_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/start_instance.php new file mode 100644 index 000000000000..e1edfde7a964 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/start_instance.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->startInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StartInstanceResponse $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 +{ + $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + start_instance_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/stop_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/stop_instance.php new file mode 100644 index 000000000000..56e08ba240bd --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/stop_instance.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->stopInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StopInstanceResponse $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 +{ + $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + stop_instance_sample($formattedName); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/submit_provisioning_config.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/submit_provisioning_config.php new file mode 100644 index 000000000000..4fc592a83cc5 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/submit_provisioning_config.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setProvisioningConfig($provisioningConfig); + + // Call the API and handle any network failures. + try { + /** @var SubmitProvisioningConfigResponse $response */ + $response = $bareMetalSolutionClient->submitProvisioningConfig($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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); + + submit_provisioning_config_sample($formattedParent); +} +// [END baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_instance.php new file mode 100644 index 000000000000..75a782c8fb99 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_instance.php @@ -0,0 +1,71 @@ +setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->updateInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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 baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_network.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_network.php new file mode 100644 index 000000000000..bd16181fe008 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_network.php @@ -0,0 +1,71 @@ +setNetwork($network); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->updateNetwork($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Network $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 baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_nfs_share.php new file mode 100644 index 000000000000..8d56c47b34ca --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_nfs_share.php @@ -0,0 +1,71 @@ +setNfsShare($nfsShare); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->updateNfsShare($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NfsShare $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 baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_provisioning_config.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_provisioning_config.php new file mode 100644 index 000000000000..3d07d4d712d2 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_provisioning_config.php @@ -0,0 +1,62 @@ +setProvisioningConfig($provisioningConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var ProvisioningConfig $response */ + $response = $bareMetalSolutionClient->updateProvisioningConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_volume.php new file mode 100644 index 000000000000..705fcc7c9cdd --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_volume.php @@ -0,0 +1,71 @@ +setVolume($volume); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bareMetalSolutionClient->updateVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Volume $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 baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/src/V2/Client/BareMetalSolutionClient.php b/owl-bot-staging/BareMetalSolution/v2/src/V2/Client/BareMetalSolutionClient.php new file mode 100644 index 000000000000..d21ed1cd65b2 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/src/V2/Client/BareMetalSolutionClient.php @@ -0,0 +1,1856 @@ + createNfsShareAsync(CreateNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface createProvisioningConfigAsync(CreateProvisioningConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSSHKeyAsync(CreateSSHKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVolumeSnapshotAsync(CreateVolumeSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNfsShareAsync(DeleteNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSSHKeyAsync(DeleteSSHKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteVolumeSnapshotAsync(DeleteVolumeSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface detachLunAsync(DetachLunRequest $request, array $optionalArgs = []) + * @method PromiseInterface disableInteractiveSerialConsoleAsync(DisableInteractiveSerialConsoleRequest $request, array $optionalArgs = []) + * @method PromiseInterface enableInteractiveSerialConsoleAsync(EnableInteractiveSerialConsoleRequest $request, array $optionalArgs = []) + * @method PromiseInterface evictLunAsync(EvictLunRequest $request, array $optionalArgs = []) + * @method PromiseInterface evictVolumeAsync(EvictVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLunAsync(GetLunRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNetworkAsync(GetNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNfsShareAsync(GetNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProvisioningConfigAsync(GetProvisioningConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVolumeAsync(GetVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVolumeSnapshotAsync(GetVolumeSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLunsAsync(ListLunsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNetworkUsageAsync(ListNetworkUsageRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNetworksAsync(ListNetworksRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNfsSharesAsync(ListNfsSharesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOSImagesAsync(ListOSImagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProvisioningQuotasAsync(ListProvisioningQuotasRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSSHKeysAsync(ListSSHKeysRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVolumeSnapshotsAsync(ListVolumeSnapshotsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVolumesAsync(ListVolumesRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameInstanceAsync(RenameInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameNetworkAsync(RenameNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameNfsShareAsync(RenameNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameVolumeAsync(RenameVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetInstanceAsync(ResetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface resizeVolumeAsync(ResizeVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreVolumeSnapshotAsync(RestoreVolumeSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface startInstanceAsync(StartInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopInstanceAsync(StopInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface submitProvisioningConfigAsync(SubmitProvisioningConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNetworkAsync(UpdateNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNfsShareAsync(UpdateNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProvisioningConfigAsync(UpdateProvisioningConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateVolumeAsync(UpdateVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class BareMetalSolutionClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.baremetalsolution.v2.BareMetalSolution'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'baremetalsolution.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'baremetalsolution.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/bare_metal_solution_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/bare_metal_solution_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/bare_metal_solution_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/bare_metal_solution_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * instance_config resource. + * + * @param string $project + * @param string $location + * @param string $instanceConfig + * + * @return string The formatted instance_config resource. + */ + public static function instanceConfigName(string $project, string $location, string $instanceConfig): string + { + return self::getPathTemplate('instanceConfig')->render([ + 'project' => $project, + 'location' => $location, + 'instance_config' => $instanceConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * interconnect_attachment resource. + * + * @param string $project + * @param string $region + * @param string $interconnectAttachment + * + * @return string The formatted interconnect_attachment resource. + */ + public static function interconnectAttachmentName(string $project, string $region, string $interconnectAttachment): string + { + return self::getPathTemplate('interconnectAttachment')->render([ + 'project' => $project, + 'region' => $region, + 'interconnect_attachment' => $interconnectAttachment, + ]); + } + + /** + * 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 lun + * resource. + * + * @param string $project + * @param string $location + * @param string $volume + * @param string $lun + * + * @return string The formatted lun resource. + */ + public static function lunName(string $project, string $location, string $volume, string $lun): string + { + return self::getPathTemplate('lun')->render([ + 'project' => $project, + 'location' => $location, + 'volume' => $volume, + 'lun' => $lun, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a nfs_share + * resource. + * + * @param string $project + * @param string $location + * @param string $nfsShare + * + * @return string The formatted nfs_share resource. + */ + public static function nFSShareName(string $project, string $location, string $nfsShare): string + { + return self::getPathTemplate('nFSShare')->render([ + 'project' => $project, + 'location' => $location, + 'nfs_share' => $nfsShare, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $location + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $location, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'location' => $location, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * network_config resource. + * + * @param string $project + * @param string $location + * @param string $networkConfig + * + * @return string The formatted network_config resource. + */ + public static function networkConfigName(string $project, string $location, string $networkConfig): string + { + return self::getPathTemplate('networkConfig')->render([ + 'project' => $project, + 'location' => $location, + 'network_config' => $networkConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * provisioning_config resource. + * + * @param string $project + * @param string $location + * @param string $provisioningConfig + * + * @return string The formatted provisioning_config resource. + */ + public static function provisioningConfigName(string $project, string $location, string $provisioningConfig): string + { + return self::getPathTemplate('provisioningConfig')->render([ + 'project' => $project, + 'location' => $location, + 'provisioning_config' => $provisioningConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * server_network_template resource. + * + * @param string $project + * @param string $location + * @param string $serverNetworkTemplate + * + * @return string The formatted server_network_template resource. + */ + public static function serverNetworkTemplateName(string $project, string $location, string $serverNetworkTemplate): string + { + return self::getPathTemplate('serverNetworkTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'server_network_template' => $serverNetworkTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a ssh_key + * resource. + * + * @param string $project + * @param string $location + * @param string $sshKey + * + * @return string The formatted ssh_key resource. + */ + public static function sshKeyName(string $project, string $location, string $sshKey): string + { + return self::getPathTemplate('sshKey')->render([ + 'project' => $project, + 'location' => $location, + 'ssh_key' => $sshKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a volume + * resource. + * + * @param string $project + * @param string $location + * @param string $volume + * + * @return string The formatted volume resource. + */ + public static function volumeName(string $project, string $location, string $volume): string + { + return self::getPathTemplate('volume')->render([ + 'project' => $project, + 'location' => $location, + 'volume' => $volume, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * volume_config resource. + * + * @param string $project + * @param string $location + * @param string $volumeConfig + * + * @return string The formatted volume_config resource. + */ + public static function volumeConfigName(string $project, string $location, string $volumeConfig): string + { + return self::getPathTemplate('volumeConfig')->render([ + 'project' => $project, + 'location' => $location, + 'volume_config' => $volumeConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * volume_snapshot resource. + * + * @param string $project + * @param string $location + * @param string $volume + * @param string $snapshot + * + * @return string The formatted volume_snapshot resource. + */ + public static function volumeSnapshotName(string $project, string $location, string $volume, string $snapshot): string + { + return self::getPathTemplate('volumeSnapshot')->render([ + 'project' => $project, + 'location' => $location, + 'volume' => $volume, + 'snapshot' => $snapshot, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - instanceConfig: projects/{project}/locations/{location}/instanceConfigs/{instance_config} + * - interconnectAttachment: projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment} + * - location: projects/{project}/locations/{location} + * - lun: projects/{project}/locations/{location}/volumes/{volume}/luns/{lun} + * - nFSShare: projects/{project}/locations/{location}/nfsShares/{nfs_share} + * - network: projects/{project}/locations/{location}/networks/{network} + * - networkConfig: projects/{project}/locations/{location}/networkConfigs/{network_config} + * - provisioningConfig: projects/{project}/locations/{location}/provisioningConfigs/{provisioning_config} + * - serverNetworkTemplate: projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template} + * - sshKey: projects/{project}/locations/{location}/sshKeys/{ssh_key} + * - volume: projects/{project}/locations/{location}/volumes/{volume} + * - volumeConfig: projects/{project}/locations/{location}/volumeConfigs/{volume_config} + * - volumeSnapshot: projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + * + * 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 'baremetalsolution.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 an NFS share. + * + * The async variant is {@see BareMetalSolutionClient::createNfsShareAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/create_nfs_share.php + * + * @param CreateNfsShareRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createNfsShare(CreateNfsShareRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateNfsShare', $request, $callOptions)->wait(); + } + + /** + * Create new ProvisioningConfig. + * + * The async variant is + * {@see BareMetalSolutionClient::createProvisioningConfigAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/create_provisioning_config.php + * + * @param CreateProvisioningConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProvisioningConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function createProvisioningConfig(CreateProvisioningConfigRequest $request, array $callOptions = []): ProvisioningConfig + { + return $this->startApiCall('CreateProvisioningConfig', $request, $callOptions)->wait(); + } + + /** + * Register a public SSH key in the specified project for use with the + * interactive serial console feature. + * + * The async variant is {@see BareMetalSolutionClient::createSSHKeyAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/create_ssh_key.php + * + * @param CreateSSHKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SSHKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSSHKey(CreateSSHKeyRequest $request, array $callOptions = []): SSHKey + { + return $this->startApiCall('CreateSSHKey', $request, $callOptions)->wait(); + } + + /** + * Takes a snapshot of a boot volume. + * Returns INVALID_ARGUMENT if called for a non-boot volume. + * + * The async variant is {@see BareMetalSolutionClient::createVolumeSnapshotAsync()} + * . + * + * @example samples/V2/BareMetalSolutionClient/create_volume_snapshot.php + * + * @param CreateVolumeSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VolumeSnapshot + * + * @throws ApiException Thrown if the API call fails. + */ + public function createVolumeSnapshot(CreateVolumeSnapshotRequest $request, array $callOptions = []): VolumeSnapshot + { + return $this->startApiCall('CreateVolumeSnapshot', $request, $callOptions)->wait(); + } + + /** + * Delete an NFS share. The underlying volume is automatically deleted. + * + * The async variant is {@see BareMetalSolutionClient::deleteNfsShareAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/delete_nfs_share.php + * + * @param DeleteNfsShareRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteNfsShare(DeleteNfsShareRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteNfsShare', $request, $callOptions)->wait(); + } + + /** + * Deletes a public SSH key registered in the specified project. + * + * The async variant is {@see BareMetalSolutionClient::deleteSSHKeyAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/delete_ssh_key.php + * + * @param DeleteSSHKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteSSHKey(DeleteSSHKeyRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSSHKey', $request, $callOptions)->wait(); + } + + /** + * Deletes a volume snapshot. + * Returns INVALID_ARGUMENT if called for a non-boot volume. + * + * The async variant is {@see BareMetalSolutionClient::deleteVolumeSnapshotAsync()} + * . + * + * @example samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php + * + * @param DeleteVolumeSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteVolumeSnapshot(DeleteVolumeSnapshotRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteVolumeSnapshot', $request, $callOptions)->wait(); + } + + /** + * Detach LUN from Instance. + * + * The async variant is {@see BareMetalSolutionClient::detachLunAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/detach_lun.php + * + * @param DetachLunRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 detachLun(DetachLunRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DetachLun', $request, $callOptions)->wait(); + } + + /** + * Disable the interactive serial console feature on an instance. + * + * The async variant is + * {@see BareMetalSolutionClient::disableInteractiveSerialConsoleAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php + * + * @param DisableInteractiveSerialConsoleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 disableInteractiveSerialConsole(DisableInteractiveSerialConsoleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DisableInteractiveSerialConsole', $request, $callOptions)->wait(); + } + + /** + * Enable the interactive serial console feature on an instance. + * + * The async variant is + * {@see BareMetalSolutionClient::enableInteractiveSerialConsoleAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php + * + * @param EnableInteractiveSerialConsoleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 enableInteractiveSerialConsole(EnableInteractiveSerialConsoleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('EnableInteractiveSerialConsole', $request, $callOptions)->wait(); + } + + /** + * Skips lun's cooloff and deletes it now. + * Lun must be in cooloff state. + * + * The async variant is {@see BareMetalSolutionClient::evictLunAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/evict_lun.php + * + * @param EvictLunRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 evictLun(EvictLunRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('EvictLun', $request, $callOptions)->wait(); + } + + /** + * Skips volume's cooloff and deletes it now. + * Volume must be in cooloff state. + * + * The async variant is {@see BareMetalSolutionClient::evictVolumeAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/evict_volume.php + * + * @param EvictVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 evictVolume(EvictVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('EvictVolume', $request, $callOptions)->wait(); + } + + /** + * Get details about a single server. + * + * The async variant is {@see BareMetalSolutionClient::getInstanceAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/get_instance.php + * + * @param GetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Get details of a single storage logical unit number(LUN). + * + * The async variant is {@see BareMetalSolutionClient::getLunAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/get_lun.php + * + * @param GetLunRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Lun + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLun(GetLunRequest $request, array $callOptions = []): Lun + { + return $this->startApiCall('GetLun', $request, $callOptions)->wait(); + } + + /** + * Get details of a single network. + * + * The async variant is {@see BareMetalSolutionClient::getNetworkAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/get_network.php + * + * @param GetNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Network + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNetwork(GetNetworkRequest $request, array $callOptions = []): Network + { + return $this->startApiCall('GetNetwork', $request, $callOptions)->wait(); + } + + /** + * Get details of a single NFS share. + * + * The async variant is {@see BareMetalSolutionClient::getNfsShareAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/get_nfs_share.php + * + * @param GetNfsShareRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NfsShare + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNfsShare(GetNfsShareRequest $request, array $callOptions = []): NfsShare + { + return $this->startApiCall('GetNfsShare', $request, $callOptions)->wait(); + } + + /** + * Get ProvisioningConfig by name. + * + * The async variant is + * {@see BareMetalSolutionClient::getProvisioningConfigAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/get_provisioning_config.php + * + * @param GetProvisioningConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProvisioningConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProvisioningConfig(GetProvisioningConfigRequest $request, array $callOptions = []): ProvisioningConfig + { + return $this->startApiCall('GetProvisioningConfig', $request, $callOptions)->wait(); + } + + /** + * Get details of a single storage volume. + * + * The async variant is {@see BareMetalSolutionClient::getVolumeAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/get_volume.php + * + * @param GetVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Volume + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVolume(GetVolumeRequest $request, array $callOptions = []): Volume + { + return $this->startApiCall('GetVolume', $request, $callOptions)->wait(); + } + + /** + * Returns the specified snapshot resource. + * Returns INVALID_ARGUMENT if called for a non-boot volume. + * + * The async variant is {@see BareMetalSolutionClient::getVolumeSnapshotAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/get_volume_snapshot.php + * + * @param GetVolumeSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VolumeSnapshot + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVolumeSnapshot(GetVolumeSnapshotRequest $request, array $callOptions = []): VolumeSnapshot + { + return $this->startApiCall('GetVolumeSnapshot', $request, $callOptions)->wait(); + } + + /** + * List servers in a given project and location. + * + * The async variant is {@see BareMetalSolutionClient::listInstancesAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/list_instances.php + * + * @param ListInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * List storage volume luns for given storage volume. + * + * The async variant is {@see BareMetalSolutionClient::listLunsAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/list_luns.php + * + * @param ListLunsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listLuns(ListLunsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLuns', $request, $callOptions); + } + + /** + * List all Networks (and used IPs for each Network) in the vendor account + * associated with the specified project. + * + * The async variant is {@see BareMetalSolutionClient::listNetworkUsageAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/list_network_usage.php + * + * @param ListNetworkUsageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListNetworkUsageResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listNetworkUsage(ListNetworkUsageRequest $request, array $callOptions = []): ListNetworkUsageResponse + { + return $this->startApiCall('ListNetworkUsage', $request, $callOptions)->wait(); + } + + /** + * List network in a given project and location. + * + * The async variant is {@see BareMetalSolutionClient::listNetworksAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/list_networks.php + * + * @param ListNetworksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listNetworks(ListNetworksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNetworks', $request, $callOptions); + } + + /** + * List NFS shares. + * + * The async variant is {@see BareMetalSolutionClient::listNfsSharesAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/list_nfs_shares.php + * + * @param ListNfsSharesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listNfsShares(ListNfsSharesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNfsShares', $request, $callOptions); + } + + /** + * Retrieves the list of OS images which are currently approved. + * + * The async variant is {@see BareMetalSolutionClient::listOSImagesAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/list_os_images.php + * + * @param ListOSImagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listOSImages(ListOSImagesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOSImages', $request, $callOptions); + } + + /** + * List the budget details to provision resources on a given project. + * + * The async variant is + * {@see BareMetalSolutionClient::listProvisioningQuotasAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php + * + * @param ListProvisioningQuotasRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listProvisioningQuotas(ListProvisioningQuotasRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProvisioningQuotas', $request, $callOptions); + } + + /** + * Lists the public SSH keys registered for the specified project. + * These SSH keys are used only for the interactive serial console feature. + * + * The async variant is {@see BareMetalSolutionClient::listSSHKeysAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/list_ssh_keys.php + * + * @param ListSSHKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSSHKeys(ListSSHKeysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSSHKeys', $request, $callOptions); + } + + /** + * Retrieves the list of snapshots for the specified volume. + * Returns a response with an empty list of snapshots if called + * for a non-boot volume. + * + * The async variant is {@see BareMetalSolutionClient::listVolumeSnapshotsAsync()} + * . + * + * @example samples/V2/BareMetalSolutionClient/list_volume_snapshots.php + * + * @param ListVolumeSnapshotsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listVolumeSnapshots(ListVolumeSnapshotsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVolumeSnapshots', $request, $callOptions); + } + + /** + * List storage volumes in a given project and location. + * + * The async variant is {@see BareMetalSolutionClient::listVolumesAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/list_volumes.php + * + * @param ListVolumesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listVolumes(ListVolumesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVolumes', $request, $callOptions); + } + + /** + * RenameInstance sets a new name for an instance. + * Use with caution, previous names become immediately invalidated. + * + * The async variant is {@see BareMetalSolutionClient::renameInstanceAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/rename_instance.php + * + * @param RenameInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function renameInstance(RenameInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('RenameInstance', $request, $callOptions)->wait(); + } + + /** + * RenameNetwork sets a new name for a network. + * Use with caution, previous names become immediately invalidated. + * + * The async variant is {@see BareMetalSolutionClient::renameNetworkAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/rename_network.php + * + * @param RenameNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Network + * + * @throws ApiException Thrown if the API call fails. + */ + public function renameNetwork(RenameNetworkRequest $request, array $callOptions = []): Network + { + return $this->startApiCall('RenameNetwork', $request, $callOptions)->wait(); + } + + /** + * RenameNfsShare sets a new name for an nfsshare. + * Use with caution, previous names become immediately invalidated. + * + * The async variant is {@see BareMetalSolutionClient::renameNfsShareAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/rename_nfs_share.php + * + * @param RenameNfsShareRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NfsShare + * + * @throws ApiException Thrown if the API call fails. + */ + public function renameNfsShare(RenameNfsShareRequest $request, array $callOptions = []): NfsShare + { + return $this->startApiCall('RenameNfsShare', $request, $callOptions)->wait(); + } + + /** + * RenameVolume sets a new name for a volume. + * Use with caution, previous names become immediately invalidated. + * + * The async variant is {@see BareMetalSolutionClient::renameVolumeAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/rename_volume.php + * + * @param RenameVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Volume + * + * @throws ApiException Thrown if the API call fails. + */ + public function renameVolume(RenameVolumeRequest $request, array $callOptions = []): Volume + { + return $this->startApiCall('RenameVolume', $request, $callOptions)->wait(); + } + + /** + * Perform an ungraceful, hard reset on a server. Equivalent to shutting the + * power off and then turning it back on. + * + * The async variant is {@see BareMetalSolutionClient::resetInstanceAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/reset_instance.php + * + * @param ResetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 resetInstance(ResetInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResetInstance', $request, $callOptions)->wait(); + } + + /** + * Emergency Volume resize. + * + * The async variant is {@see BareMetalSolutionClient::resizeVolumeAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/resize_volume.php + * + * @param ResizeVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 resizeVolume(ResizeVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResizeVolume', $request, $callOptions)->wait(); + } + + /** + * Uses the specified snapshot to restore its parent volume. + * Returns INVALID_ARGUMENT if called for a non-boot volume. + * + * The async variant is + * {@see BareMetalSolutionClient::restoreVolumeSnapshotAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php + * + * @param RestoreVolumeSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 restoreVolumeSnapshot(RestoreVolumeSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RestoreVolumeSnapshot', $request, $callOptions)->wait(); + } + + /** + * Starts a server that was shutdown. + * + * The async variant is {@see BareMetalSolutionClient::startInstanceAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/start_instance.php + * + * @param StartInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 startInstance(StartInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartInstance', $request, $callOptions)->wait(); + } + + /** + * Stop a running server. + * + * The async variant is {@see BareMetalSolutionClient::stopInstanceAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/stop_instance.php + * + * @param StopInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 stopInstance(StopInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopInstance', $request, $callOptions)->wait(); + } + + /** + * Submit a provisiong configuration for a given project. + * + * The async variant is + * {@see BareMetalSolutionClient::submitProvisioningConfigAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/submit_provisioning_config.php + * + * @param SubmitProvisioningConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SubmitProvisioningConfigResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function submitProvisioningConfig(SubmitProvisioningConfigRequest $request, array $callOptions = []): SubmitProvisioningConfigResponse + { + return $this->startApiCall('SubmitProvisioningConfig', $request, $callOptions)->wait(); + } + + /** + * Update details of a single server. + * + * The async variant is {@see BareMetalSolutionClient::updateInstanceAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/update_instance.php + * + * @param UpdateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); + } + + /** + * Update details of a single network. + * + * The async variant is {@see BareMetalSolutionClient::updateNetworkAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/update_network.php + * + * @param UpdateNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateNetwork(UpdateNetworkRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateNetwork', $request, $callOptions)->wait(); + } + + /** + * Update details of a single NFS share. + * + * The async variant is {@see BareMetalSolutionClient::updateNfsShareAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/update_nfs_share.php + * + * @param UpdateNfsShareRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateNfsShare(UpdateNfsShareRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateNfsShare', $request, $callOptions)->wait(); + } + + /** + * Update existing ProvisioningConfig. + * + * The async variant is + * {@see BareMetalSolutionClient::updateProvisioningConfigAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/update_provisioning_config.php + * + * @param UpdateProvisioningConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProvisioningConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateProvisioningConfig(UpdateProvisioningConfigRequest $request, array $callOptions = []): ProvisioningConfig + { + return $this->startApiCall('UpdateProvisioningConfig', $request, $callOptions)->wait(); + } + + /** + * Update details of a single storage volume. + * + * The async variant is {@see BareMetalSolutionClient::updateVolumeAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/update_volume.php + * + * @param UpdateVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateVolume(UpdateVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateVolume', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see BareMetalSolutionClient::getLocationAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/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 BareMetalSolutionClient::listLocationsAsync()} . + * + * @example samples/V2/BareMetalSolutionClient/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/BareMetalSolution/v2/src/V2/gapic_metadata.json b/owl-bot-staging/BareMetalSolution/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..330d34ae54a4 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/src/V2/gapic_metadata.json @@ -0,0 +1,248 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.baremetalsolution.v2", + "libraryPackage": "Google\\Cloud\\BareMetalSolution\\V2", + "services": { + "BareMetalSolution": { + "clients": { + "grpc": { + "libraryClient": "BareMetalSolutionGapicClient", + "rpcs": { + "CreateNfsShare": { + "methods": [ + "createNfsShare" + ] + }, + "CreateProvisioningConfig": { + "methods": [ + "createProvisioningConfig" + ] + }, + "CreateSSHKey": { + "methods": [ + "createSSHKey" + ] + }, + "CreateVolumeSnapshot": { + "methods": [ + "createVolumeSnapshot" + ] + }, + "DeleteNfsShare": { + "methods": [ + "deleteNfsShare" + ] + }, + "DeleteSSHKey": { + "methods": [ + "deleteSSHKey" + ] + }, + "DeleteVolumeSnapshot": { + "methods": [ + "deleteVolumeSnapshot" + ] + }, + "DetachLun": { + "methods": [ + "detachLun" + ] + }, + "DisableInteractiveSerialConsole": { + "methods": [ + "disableInteractiveSerialConsole" + ] + }, + "EnableInteractiveSerialConsole": { + "methods": [ + "enableInteractiveSerialConsole" + ] + }, + "EvictLun": { + "methods": [ + "evictLun" + ] + }, + "EvictVolume": { + "methods": [ + "evictVolume" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "GetLun": { + "methods": [ + "getLun" + ] + }, + "GetNetwork": { + "methods": [ + "getNetwork" + ] + }, + "GetNfsShare": { + "methods": [ + "getNfsShare" + ] + }, + "GetProvisioningConfig": { + "methods": [ + "getProvisioningConfig" + ] + }, + "GetVolume": { + "methods": [ + "getVolume" + ] + }, + "GetVolumeSnapshot": { + "methods": [ + "getVolumeSnapshot" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "ListLuns": { + "methods": [ + "listLuns" + ] + }, + "ListNetworkUsage": { + "methods": [ + "listNetworkUsage" + ] + }, + "ListNetworks": { + "methods": [ + "listNetworks" + ] + }, + "ListNfsShares": { + "methods": [ + "listNfsShares" + ] + }, + "ListOSImages": { + "methods": [ + "listOSImages" + ] + }, + "ListProvisioningQuotas": { + "methods": [ + "listProvisioningQuotas" + ] + }, + "ListSSHKeys": { + "methods": [ + "listSSHKeys" + ] + }, + "ListVolumeSnapshots": { + "methods": [ + "listVolumeSnapshots" + ] + }, + "ListVolumes": { + "methods": [ + "listVolumes" + ] + }, + "RenameInstance": { + "methods": [ + "renameInstance" + ] + }, + "RenameNetwork": { + "methods": [ + "renameNetwork" + ] + }, + "RenameNfsShare": { + "methods": [ + "renameNfsShare" + ] + }, + "RenameVolume": { + "methods": [ + "renameVolume" + ] + }, + "ResetInstance": { + "methods": [ + "resetInstance" + ] + }, + "ResizeVolume": { + "methods": [ + "resizeVolume" + ] + }, + "RestoreVolumeSnapshot": { + "methods": [ + "restoreVolumeSnapshot" + ] + }, + "StartInstance": { + "methods": [ + "startInstance" + ] + }, + "StopInstance": { + "methods": [ + "stopInstance" + ] + }, + "SubmitProvisioningConfig": { + "methods": [ + "submitProvisioningConfig" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "UpdateNetwork": { + "methods": [ + "updateNetwork" + ] + }, + "UpdateNfsShare": { + "methods": [ + "updateNfsShare" + ] + }, + "UpdateProvisioningConfig": { + "methods": [ + "updateProvisioningConfig" + ] + }, + "UpdateVolume": { + "methods": [ + "updateVolume" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_client_config.json b/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_client_config.json new file mode 100644 index 000000000000..65c1fe7f2687 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_client_config.json @@ -0,0 +1,262 @@ +{ + "interfaces": { + "google.cloud.baremetalsolution.v2.BareMetalSolution": { + "retry_codes": { + "no_retry_codes": [], + "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 + }, + "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": { + "CreateNfsShare": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateProvisioningConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSSHKey": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateVolumeSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteNfsShare": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteSSHKey": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteVolumeSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DetachLun": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DisableInteractiveSerialConsole": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EnableInteractiveSerialConsole": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EvictLun": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EvictVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLun": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetNetwork": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetNfsShare": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetProvisioningConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetVolumeSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLuns": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListNetworkUsage": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListNetworks": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListNfsShares": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListOSImages": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListProvisioningQuotas": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListSSHKeys": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListVolumeSnapshots": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListVolumes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RenameInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RenameNetwork": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RenameNfsShare": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RenameVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResizeVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RestoreVolumeSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SubmitProvisioningConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateNetwork": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateNfsShare": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateProvisioningConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_descriptor_config.php b/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_descriptor_config.php new file mode 100644 index 000000000000..343411549094 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_descriptor_config.php @@ -0,0 +1,795 @@ + [ + 'google.cloud.baremetalsolution.v2.BareMetalSolution' => [ + 'CreateNfsShare' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\NfsShare', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNfsShare' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DetachLun' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'DisableInteractiveSerialConsole' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\DisableInteractiveSerialConsoleResponse', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EnableInteractiveSerialConsole' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\EnableInteractiveSerialConsoleResponse', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EvictLun' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EvictVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResetInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\ResetInstanceResponse', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResizeVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Volume', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'volume', + 'fieldAccessors' => [ + 'getVolume', + ], + ], + ], + ], + 'RestoreVolumeSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\VolumeSnapshot', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'volume_snapshot', + 'fieldAccessors' => [ + 'getVolumeSnapshot', + ], + ], + ], + ], + 'StartInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\StartInstanceResponse', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\StopInstanceResponse', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance.name', + 'fieldAccessors' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + 'UpdateNetwork' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Network', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'network.name', + 'fieldAccessors' => [ + 'getNetwork', + 'getName', + ], + ], + ], + ], + 'UpdateNfsShare' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\NfsShare', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'nfs_share.name', + 'fieldAccessors' => [ + 'getNfsShare', + 'getName', + ], + ], + ], + ], + 'UpdateVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Volume', + 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'volume.name', + 'fieldAccessors' => [ + 'getVolume', + 'getName', + ], + ], + ], + ], + 'CreateProvisioningConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ProvisioningConfig', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSSHKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\SSHKey', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateVolumeSnapshot' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\VolumeSnapshot', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSSHKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVolumeSnapshot' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLun' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Lun', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNetwork' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Network', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNfsShare' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\NfsShare', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProvisioningConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ProvisioningConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVolume' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Volume', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVolumeSnapshot' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\VolumeSnapshot', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLuns' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLuns', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListLunsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNetworkUsage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListNetworkUsageResponse', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getLocation', + ], + ], + ], + ], + 'ListNetworks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNetworks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListNetworksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNfsShares' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNfsShares', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListNfsSharesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOSImages' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOsImages', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListOSImagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProvisioningQuotas' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProvisioningQuotas', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListProvisioningQuotasResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSSHKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSshKeys', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListSSHKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumeSnapshots' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVolumeSnapshots', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListVolumeSnapshotsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVolumes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListVolumesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RenameInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RenameNetwork' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Network', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RenameNfsShare' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\NfsShare', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RenameVolume' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Volume', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SubmitProvisioningConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\SubmitProvisioningConfigResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateProvisioningConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ProvisioningConfig', + 'headerParams' => [ + [ + 'keyName' => 'provisioning_config.name', + 'fieldAccessors' => [ + 'getProvisioningConfig', + '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' => [ + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'instanceConfig' => 'projects/{project}/locations/{location}/instanceConfigs/{instance_config}', + 'interconnectAttachment' => 'projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}', + 'location' => 'projects/{project}/locations/{location}', + 'lun' => 'projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}', + 'nFSShare' => 'projects/{project}/locations/{location}/nfsShares/{nfs_share}', + 'network' => 'projects/{project}/locations/{location}/networks/{network}', + 'networkConfig' => 'projects/{project}/locations/{location}/networkConfigs/{network_config}', + 'provisioningConfig' => 'projects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}', + 'serverNetworkTemplate' => 'projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}', + 'sshKey' => 'projects/{project}/locations/{location}/sshKeys/{ssh_key}', + 'volume' => 'projects/{project}/locations/{location}/volumes/{volume}', + 'volumeConfig' => 'projects/{project}/locations/{location}/volumeConfigs/{volume_config}', + 'volumeSnapshot' => 'projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_rest_client_config.php b/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_rest_client_config.php new file mode 100644 index 000000000000..38b7716b99b6 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_rest_client_config.php @@ -0,0 +1,572 @@ + [ + 'google.cloud.baremetalsolution.v2.BareMetalSolution' => [ + 'CreateNfsShare' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/nfsShares', + 'body' => 'nfs_share', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateProvisioningConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/provisioningConfigs', + 'body' => 'provisioning_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSSHKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/sshKeys', + 'body' => 'ssh_key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'ssh_key_id', + ], + ], + 'CreateVolumeSnapshot' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/volumes/*}/snapshots', + 'body' => 'volume_snapshot', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNfsShare' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/nfsShares/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSSHKey' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/sshKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVolumeSnapshot' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DetachLun' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{instance=projects/*/locations/*/instances/*}:detachLun', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + ], + ], + 'DisableInteractiveSerialConsole' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:disableInteractiveSerialConsole', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EnableInteractiveSerialConsole' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:enableInteractiveSerialConsole', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EvictLun' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*/luns/*}:evict', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EvictVolume' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*}:evict', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLun' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*/luns/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNetwork' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/networks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNfsShare' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/nfsShares/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProvisioningConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/provisioningConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVolume' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVolumeSnapshot' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLuns' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/volumes/*}/luns', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNetworkUsage' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{location=projects/*/locations/*}/networks:listNetworkUsage', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'ListNetworks' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/networks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNfsShares' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/nfsShares', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOSImages' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/osImages', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProvisioningQuotas' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/provisioningQuotas', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSSHKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/sshKeys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumeSnapshots' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/volumes/*}/snapshots', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumes' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/volumes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RenameInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:rename', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RenameNetwork' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/networks/*}:rename', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RenameNfsShare' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/nfsShares/*}:rename', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RenameVolume' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*}:rename', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResetInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:reset', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResizeVolume' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{volume=projects/*/locations/*/volumes/*}:resize', + 'body' => '*', + 'placeholders' => [ + 'volume' => [ + 'getters' => [ + 'getVolume', + ], + ], + ], + ], + 'RestoreVolumeSnapshot' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{volume_snapshot=projects/*/locations/*/volumes/*/snapshots/*}:restoreVolumeSnapshot', + 'body' => '*', + 'placeholders' => [ + 'volume_snapshot' => [ + 'getters' => [ + 'getVolumeSnapshot', + ], + ], + ], + ], + 'StartInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SubmitProvisioningConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/provisioningConfigs:submit', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{instance.name=projects/*/locations/*/instances/*}', + 'body' => 'instance', + 'placeholders' => [ + 'instance.name' => [ + 'getters' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + 'UpdateNetwork' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{network.name=projects/*/locations/*/networks/*}', + 'body' => 'network', + 'placeholders' => [ + 'network.name' => [ + 'getters' => [ + 'getNetwork', + 'getName', + ], + ], + ], + ], + 'UpdateNfsShare' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{nfs_share.name=projects/*/locations/*/nfsShares/*}', + 'body' => 'nfs_share', + 'placeholders' => [ + 'nfs_share.name' => [ + 'getters' => [ + 'getNfsShare', + 'getName', + ], + ], + ], + ], + 'UpdateProvisioningConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{provisioning_config.name=projects/*/locations/*/provisioningConfigs/*}', + 'body' => 'provisioning_config', + 'placeholders' => [ + 'provisioning_config.name' => [ + 'getters' => [ + 'getProvisioningConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateVolume' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{volume.name=projects/*/locations/*/volumes/*}', + 'body' => 'volume', + 'placeholders' => [ + 'volume.name' => [ + 'getters' => [ + 'getVolume', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/BareMetalSolution/v2/tests/Unit/V2/Client/BareMetalSolutionClientTest.php b/owl-bot-staging/BareMetalSolution/v2/tests/Unit/V2/Client/BareMetalSolutionClientTest.php new file mode 100644 index 000000000000..a662316a7970 --- /dev/null +++ b/owl-bot-staging/BareMetalSolution/v2/tests/Unit/V2/Client/BareMetalSolutionClientTest.php @@ -0,0 +1,4556 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BareMetalSolutionClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BareMetalSolutionClient($options); + } + + /** @test */ + public function createNfsShareTest() + { + $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/createNfsShareTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $nfsShareId = 'nfsShareId931294079'; + $id = 'id3355'; + $volume = 'volume-810883302'; + $requestedSizeGib = 525454387; + $expectedResponse = new NfsShare(); + $expectedResponse->setName($name); + $expectedResponse->setNfsShareId($nfsShareId); + $expectedResponse->setId($id); + $expectedResponse->setVolume($volume); + $expectedResponse->setRequestedSizeGib($requestedSizeGib); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNfsShareTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $nfsShare = new NfsShare(); + $request = (new CreateNfsShareRequest()) + ->setParent($formattedParent) + ->setNfsShare($nfsShare); + $response = $gapicClient->createNfsShare($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.baremetalsolution.v2.BareMetalSolution/CreateNfsShare', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNfsShare(); + $this->assertProtobufEquals($nfsShare, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNfsShareTest'); + $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 createNfsShareExceptionTest() + { + $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/createNfsShareTest'); + $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]'); + $nfsShare = new NfsShare(); + $request = (new CreateNfsShareRequest()) + ->setParent($formattedParent) + ->setNfsShare($nfsShare); + $response = $gapicClient->createNfsShare($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNfsShareTest'); + 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 createProvisioningConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $ticketId = 'ticketId-71132370'; + $handoverServiceAccount = 'handoverServiceAccount747638823'; + $email2 = 'email2-1638014897'; + $location = 'location1901043637'; + $cloudConsoleUri = 'cloudConsoleUri529066874'; + $vpcScEnabled = true; + $statusMessage = 'statusMessage-239442758'; + $customId = 'customId1611556009'; + $expectedResponse = new ProvisioningConfig(); + $expectedResponse->setName($name); + $expectedResponse->setTicketId($ticketId); + $expectedResponse->setHandoverServiceAccount($handoverServiceAccount); + $expectedResponse->setEmail($email2); + $expectedResponse->setLocation($location); + $expectedResponse->setCloudConsoleUri($cloudConsoleUri); + $expectedResponse->setVpcScEnabled($vpcScEnabled); + $expectedResponse->setStatusMessage($statusMessage); + $expectedResponse->setCustomId($customId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $provisioningConfig = new ProvisioningConfig(); + $request = (new CreateProvisioningConfigRequest()) + ->setParent($formattedParent) + ->setProvisioningConfig($provisioningConfig); + $response = $gapicClient->createProvisioningConfig($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.baremetalsolution.v2.BareMetalSolution/CreateProvisioningConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProvisioningConfig(); + $this->assertProtobufEquals($provisioningConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProvisioningConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $provisioningConfig = new ProvisioningConfig(); + $request = (new CreateProvisioningConfigRequest()) + ->setParent($formattedParent) + ->setProvisioningConfig($provisioningConfig); + try { + $gapicClient->createProvisioningConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSSHKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $publicKey = 'publicKey1904812937'; + $expectedResponse = new SSHKey(); + $expectedResponse->setName($name); + $expectedResponse->setPublicKey($publicKey); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sshKey = new SSHKey(); + $sshKeyId = 'sshKeyId-385603310'; + $request = (new CreateSSHKeyRequest()) + ->setParent($formattedParent) + ->setSshKey($sshKey) + ->setSshKeyId($sshKeyId); + $response = $gapicClient->createSSHKey($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.baremetalsolution.v2.BareMetalSolution/CreateSSHKey', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSshKey(); + $this->assertProtobufEquals($sshKey, $actualValue); + $actualValue = $actualRequestObject->getSshKeyId(); + $this->assertProtobufEquals($sshKeyId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSSHKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $sshKey = new SSHKey(); + $sshKeyId = 'sshKeyId-385603310'; + $request = (new CreateSSHKeyRequest()) + ->setParent($formattedParent) + ->setSshKey($sshKey) + ->setSshKeyId($sshKeyId); + try { + $gapicClient->createSSHKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createVolumeSnapshotTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $id = 'id3355'; + $description = 'description-1724546052'; + $storageVolume = 'storageVolume-768806562'; + $expectedResponse = new VolumeSnapshot(); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setDescription($description); + $expectedResponse->setStorageVolume($storageVolume); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $volumeSnapshot = new VolumeSnapshot(); + $request = (new CreateVolumeSnapshotRequest()) + ->setParent($formattedParent) + ->setVolumeSnapshot($volumeSnapshot); + $response = $gapicClient->createVolumeSnapshot($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.baremetalsolution.v2.BareMetalSolution/CreateVolumeSnapshot', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getVolumeSnapshot(); + $this->assertProtobufEquals($volumeSnapshot, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createVolumeSnapshotExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $volumeSnapshot = new VolumeSnapshot(); + $request = (new CreateVolumeSnapshotRequest()) + ->setParent($formattedParent) + ->setVolumeSnapshot($volumeSnapshot); + try { + $gapicClient->createVolumeSnapshot($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNfsShareTest() + { + $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/deleteNfsShareTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNfsShareTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); + $request = (new DeleteNfsShareRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNfsShare($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.baremetalsolution.v2.BareMetalSolution/DeleteNfsShare', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNfsShareTest'); + $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 deleteNfsShareExceptionTest() + { + $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/deleteNfsShareTest'); + $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->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); + $request = (new DeleteNfsShareRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNfsShare($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNfsShareTest'); + 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 deleteSSHKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sshKeyName('[PROJECT]', '[LOCATION]', '[SSH_KEY]'); + $request = (new DeleteSSHKeyRequest()) + ->setName($formattedName); + $gapicClient->deleteSSHKey($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/DeleteSSHKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSSHKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sshKeyName('[PROJECT]', '[LOCATION]', '[SSH_KEY]'); + $request = (new DeleteSSHKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSSHKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteVolumeSnapshotTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new DeleteVolumeSnapshotRequest()) + ->setName($formattedName); + $gapicClient->deleteVolumeSnapshot($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/DeleteVolumeSnapshot', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteVolumeSnapshotExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new DeleteVolumeSnapshotRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteVolumeSnapshot($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function detachLunTest() + { + $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/detachLunTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $id = 'id3355'; + $machineType = 'machineType1838323762'; + $hyperthreadingEnabled = true; + $interactiveSerialConsoleEnabled = false; + $osImage = 'osImage1982209856'; + $pod = 'pod111173'; + $networkTemplate = 'networkTemplate215365483'; + $loginInfo = 'loginInfo-1747949628'; + $firmwareVersion = 'firmwareVersion-987819436'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setHyperthreadingEnabled($hyperthreadingEnabled); + $expectedResponse->setInteractiveSerialConsoleEnabled($interactiveSerialConsoleEnabled); + $expectedResponse->setOsImage($osImage); + $expectedResponse->setPod($pod); + $expectedResponse->setNetworkTemplate($networkTemplate); + $expectedResponse->setLoginInfo($loginInfo); + $expectedResponse->setFirmwareVersion($firmwareVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/detachLunTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedInstance = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $formattedLun = $gapicClient->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); + $request = (new DetachLunRequest()) + ->setInstance($formattedInstance) + ->setLun($formattedLun); + $response = $gapicClient->detachLun($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.baremetalsolution.v2.BareMetalSolution/DetachLun', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($formattedInstance, $actualValue); + $actualValue = $actualApiRequestObject->getLun(); + $this->assertProtobufEquals($formattedLun, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/detachLunTest'); + $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 detachLunExceptionTest() + { + $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/detachLunTest'); + $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 + $formattedInstance = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $formattedLun = $gapicClient->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); + $request = (new DetachLunRequest()) + ->setInstance($formattedInstance) + ->setLun($formattedLun); + $response = $gapicClient->detachLun($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/detachLunTest'); + 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 disableInteractiveSerialConsoleTest() + { + $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/disableInteractiveSerialConsoleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new DisableInteractiveSerialConsoleResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/disableInteractiveSerialConsoleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DisableInteractiveSerialConsoleRequest()) + ->setName($formattedName); + $response = $gapicClient->disableInteractiveSerialConsole($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.baremetalsolution.v2.BareMetalSolution/DisableInteractiveSerialConsole', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/disableInteractiveSerialConsoleTest'); + $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 disableInteractiveSerialConsoleExceptionTest() + { + $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/disableInteractiveSerialConsoleTest'); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DisableInteractiveSerialConsoleRequest()) + ->setName($formattedName); + $response = $gapicClient->disableInteractiveSerialConsole($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/disableInteractiveSerialConsoleTest'); + 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 enableInteractiveSerialConsoleTest() + { + $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/enableInteractiveSerialConsoleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new EnableInteractiveSerialConsoleResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/enableInteractiveSerialConsoleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new EnableInteractiveSerialConsoleRequest()) + ->setName($formattedName); + $response = $gapicClient->enableInteractiveSerialConsole($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.baremetalsolution.v2.BareMetalSolution/EnableInteractiveSerialConsole', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/enableInteractiveSerialConsoleTest'); + $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 enableInteractiveSerialConsoleExceptionTest() + { + $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/enableInteractiveSerialConsoleTest'); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new EnableInteractiveSerialConsoleRequest()) + ->setName($formattedName); + $response = $gapicClient->enableInteractiveSerialConsole($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/enableInteractiveSerialConsoleTest'); + 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 evictLunTest() + { + $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/evictLunTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/evictLunTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); + $request = (new EvictLunRequest()) + ->setName($formattedName); + $response = $gapicClient->evictLun($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.baremetalsolution.v2.BareMetalSolution/EvictLun', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/evictLunTest'); + $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 evictLunExceptionTest() + { + $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/evictLunTest'); + $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->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); + $request = (new EvictLunRequest()) + ->setName($formattedName); + $response = $gapicClient->evictLun($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/evictLunTest'); + 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 evictVolumeTest() + { + $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/evictVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/evictVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new EvictVolumeRequest()) + ->setName($formattedName); + $response = $gapicClient->evictVolume($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.baremetalsolution.v2.BareMetalSolution/EvictVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/evictVolumeTest'); + $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 evictVolumeExceptionTest() + { + $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/evictVolumeTest'); + $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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new EvictVolumeRequest()) + ->setName($formattedName); + $response = $gapicClient->evictVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/evictVolumeTest'); + 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 getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $machineType = 'machineType1838323762'; + $hyperthreadingEnabled = true; + $interactiveSerialConsoleEnabled = false; + $osImage = 'osImage1982209856'; + $pod = 'pod111173'; + $networkTemplate = 'networkTemplate215365483'; + $loginInfo = 'loginInfo-1747949628'; + $firmwareVersion = 'firmwareVersion-987819436'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setHyperthreadingEnabled($hyperthreadingEnabled); + $expectedResponse->setInteractiveSerialConsoleEnabled($interactiveSerialConsoleEnabled); + $expectedResponse->setOsImage($osImage); + $expectedResponse->setPod($pod); + $expectedResponse->setNetworkTemplate($networkTemplate); + $expectedResponse->setLoginInfo($loginInfo); + $expectedResponse->setFirmwareVersion($firmwareVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLunTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $sizeGb = 2105542105; + $storageVolume = 'storageVolume-768806562'; + $shareable = false; + $bootLun = true; + $wwid = 'wwid3662843'; + $expectedResponse = new Lun(); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setSizeGb($sizeGb); + $expectedResponse->setStorageVolume($storageVolume); + $expectedResponse->setShareable($shareable); + $expectedResponse->setBootLun($bootLun); + $expectedResponse->setWwid($wwid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); + $request = (new GetLunRequest()) + ->setName($formattedName); + $response = $gapicClient->getLun($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.baremetalsolution.v2.BareMetalSolution/GetLun', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLunExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); + $request = (new GetLunRequest()) + ->setName($formattedName); + try { + $gapicClient->getLun($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $ipAddress = 'ipAddress1480014044'; + $vlanId = 'vlanId536153463'; + $cidr = 'cidr3053428'; + $servicesCidr = 'servicesCidr-1169831243'; + $pod = 'pod111173'; + $jumboFramesEnabled = true; + $gatewayIp = 'gatewayIp955798786'; + $expectedResponse = new Network(); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setIpAddress($ipAddress); + $expectedResponse->setVlanId($vlanId); + $expectedResponse->setCidr($cidr); + $expectedResponse->setServicesCidr($servicesCidr); + $expectedResponse->setPod($pod); + $expectedResponse->setJumboFramesEnabled($jumboFramesEnabled); + $expectedResponse->setGatewayIp($gatewayIp); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); + $request = (new GetNetworkRequest()) + ->setName($formattedName); + $response = $gapicClient->getNetwork($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.baremetalsolution.v2.BareMetalSolution/GetNetwork', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); + $request = (new GetNetworkRequest()) + ->setName($formattedName); + try { + $gapicClient->getNetwork($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNfsShareTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $nfsShareId = 'nfsShareId931294079'; + $id = 'id3355'; + $volume = 'volume-810883302'; + $requestedSizeGib = 525454387; + $expectedResponse = new NfsShare(); + $expectedResponse->setName($name2); + $expectedResponse->setNfsShareId($nfsShareId); + $expectedResponse->setId($id); + $expectedResponse->setVolume($volume); + $expectedResponse->setRequestedSizeGib($requestedSizeGib); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); + $request = (new GetNfsShareRequest()) + ->setName($formattedName); + $response = $gapicClient->getNfsShare($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.baremetalsolution.v2.BareMetalSolution/GetNfsShare', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNfsShareExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); + $request = (new GetNfsShareRequest()) + ->setName($formattedName); + try { + $gapicClient->getNfsShare($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProvisioningConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $ticketId = 'ticketId-71132370'; + $handoverServiceAccount = 'handoverServiceAccount747638823'; + $email = 'email96619420'; + $location = 'location1901043637'; + $cloudConsoleUri = 'cloudConsoleUri529066874'; + $vpcScEnabled = true; + $statusMessage = 'statusMessage-239442758'; + $customId = 'customId1611556009'; + $expectedResponse = new ProvisioningConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setTicketId($ticketId); + $expectedResponse->setHandoverServiceAccount($handoverServiceAccount); + $expectedResponse->setEmail($email); + $expectedResponse->setLocation($location); + $expectedResponse->setCloudConsoleUri($cloudConsoleUri); + $expectedResponse->setVpcScEnabled($vpcScEnabled); + $expectedResponse->setStatusMessage($statusMessage); + $expectedResponse->setCustomId($customId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->provisioningConfigName('[PROJECT]', '[LOCATION]', '[PROVISIONING_CONFIG]'); + $request = (new GetProvisioningConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getProvisioningConfig($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.baremetalsolution.v2.BareMetalSolution/GetProvisioningConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProvisioningConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->provisioningConfigName('[PROJECT]', '[LOCATION]', '[PROVISIONING_CONFIG]'); + $request = (new GetProvisioningConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getProvisioningConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $requestedSizeGib = 525454387; + $originallyRequestedSizeGib = 44854004; + $currentSizeGib = 72696456; + $emergencySizeGib = 1936971120; + $maxSizeGib = 1805521661; + $autoGrownSizeGib = 1245638678; + $remainingSpaceGib = 1423108606; + $snapshotEnabled = true; + $pod = 'pod111173'; + $bootVolume = false; + $notes = 'notes105008833'; + $attached = true; + $expectedResponse = new Volume(); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setRequestedSizeGib($requestedSizeGib); + $expectedResponse->setOriginallyRequestedSizeGib($originallyRequestedSizeGib); + $expectedResponse->setCurrentSizeGib($currentSizeGib); + $expectedResponse->setEmergencySizeGib($emergencySizeGib); + $expectedResponse->setMaxSizeGib($maxSizeGib); + $expectedResponse->setAutoGrownSizeGib($autoGrownSizeGib); + $expectedResponse->setRemainingSpaceGib($remainingSpaceGib); + $expectedResponse->setSnapshotEnabled($snapshotEnabled); + $expectedResponse->setPod($pod); + $expectedResponse->setBootVolume($bootVolume); + $expectedResponse->setNotes($notes); + $expectedResponse->setAttached($attached); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new GetVolumeRequest()) + ->setName($formattedName); + $response = $gapicClient->getVolume($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.baremetalsolution.v2.BareMetalSolution/GetVolume', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new GetVolumeRequest()) + ->setName($formattedName); + try { + $gapicClient->getVolume($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeSnapshotTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $description = 'description-1724546052'; + $storageVolume = 'storageVolume-768806562'; + $expectedResponse = new VolumeSnapshot(); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setDescription($description); + $expectedResponse->setStorageVolume($storageVolume); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new GetVolumeSnapshotRequest()) + ->setName($formattedName); + $response = $gapicClient->getVolumeSnapshot($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.baremetalsolution.v2.BareMetalSolution/GetVolumeSnapshot', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeSnapshotExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new GetVolumeSnapshotRequest()) + ->setName($formattedName); + try { + $gapicClient->getVolumeSnapshot($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLunsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $lunsElement = new Lun(); + $luns = [ + $lunsElement, + ]; + $expectedResponse = new ListLunsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLuns($luns); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListLunsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLuns($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLuns()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListLuns', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLunsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListLunsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLuns($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkUsageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListNetworkUsageResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNetworkUsageRequest()) + ->setLocation($formattedLocation); + $response = $gapicClient->listNetworkUsage($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.baremetalsolution.v2.BareMetalSolution/ListNetworkUsage', $actualFuncCall); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkUsageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNetworkUsageRequest()) + ->setLocation($formattedLocation); + try { + $gapicClient->listNetworkUsage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $networksElement = new Network(); + $networks = [ + $networksElement, + ]; + $expectedResponse = new ListNetworksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNetworks($networks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNetworksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNetworks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNetworks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListNetworks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListNetworksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNetworks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNfsSharesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $nfsSharesElement = new NfsShare(); + $nfsShares = [ + $nfsSharesElement, + ]; + $expectedResponse = new ListNfsSharesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNfsShares($nfsShares); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNfsSharesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNfsShares($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNfsShares()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListNfsShares', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNfsSharesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListNfsSharesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNfsShares($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOSImagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $osImagesElement = new OSImage(); + $osImages = [ + $osImagesElement, + ]; + $expectedResponse = new ListOSImagesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOsImages($osImages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListOSImagesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listOSImages($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOsImages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListOSImages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOSImagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListOSImagesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listOSImages($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProvisioningQuotasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $provisioningQuotasElement = new ProvisioningQuota(); + $provisioningQuotas = [ + $provisioningQuotasElement, + ]; + $expectedResponse = new ListProvisioningQuotasResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProvisioningQuotas($provisioningQuotas); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProvisioningQuotasRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProvisioningQuotas($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProvisioningQuotas()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListProvisioningQuotas', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProvisioningQuotasExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListProvisioningQuotasRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProvisioningQuotas($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSSHKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sshKeysElement = new SSHKey(); + $sshKeys = [ + $sshKeysElement, + ]; + $expectedResponse = new ListSSHKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSshKeys($sshKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSSHKeysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSSHKeys($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSshKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListSSHKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSSHKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListSSHKeysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSSHKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumeSnapshotsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $volumeSnapshotsElement = new VolumeSnapshot(); + $volumeSnapshots = [ + $volumeSnapshotsElement, + ]; + $expectedResponse = new ListVolumeSnapshotsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVolumeSnapshots($volumeSnapshots); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListVolumeSnapshotsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVolumeSnapshots($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVolumeSnapshots()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListVolumeSnapshots', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumeSnapshotsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListVolumeSnapshotsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVolumeSnapshots($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $volumesElement = new Volume(); + $volumes = [ + $volumesElement, + ]; + $expectedResponse = new ListVolumesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVolumes($volumes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListVolumesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVolumes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVolumes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListVolumes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListVolumesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVolumes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $machineType = 'machineType1838323762'; + $hyperthreadingEnabled = true; + $interactiveSerialConsoleEnabled = false; + $osImage = 'osImage1982209856'; + $pod = 'pod111173'; + $networkTemplate = 'networkTemplate215365483'; + $loginInfo = 'loginInfo-1747949628'; + $firmwareVersion = 'firmwareVersion-987819436'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setHyperthreadingEnabled($hyperthreadingEnabled); + $expectedResponse->setInteractiveSerialConsoleEnabled($interactiveSerialConsoleEnabled); + $expectedResponse->setOsImage($osImage); + $expectedResponse->setPod($pod); + $expectedResponse->setNetworkTemplate($networkTemplate); + $expectedResponse->setLoginInfo($loginInfo); + $expectedResponse->setFirmwareVersion($firmwareVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $newInstanceId = 'newInstanceId-179130138'; + $request = (new RenameInstanceRequest()) + ->setName($formattedName) + ->setNewInstanceId($newInstanceId); + $response = $gapicClient->renameInstance($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.baremetalsolution.v2.BareMetalSolution/RenameInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNewInstanceId(); + $this->assertProtobufEquals($newInstanceId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $newInstanceId = 'newInstanceId-179130138'; + $request = (new RenameInstanceRequest()) + ->setName($formattedName) + ->setNewInstanceId($newInstanceId); + try { + $gapicClient->renameInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameNetworkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $ipAddress = 'ipAddress1480014044'; + $vlanId = 'vlanId536153463'; + $cidr = 'cidr3053428'; + $servicesCidr = 'servicesCidr-1169831243'; + $pod = 'pod111173'; + $jumboFramesEnabled = true; + $gatewayIp = 'gatewayIp955798786'; + $expectedResponse = new Network(); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setIpAddress($ipAddress); + $expectedResponse->setVlanId($vlanId); + $expectedResponse->setCidr($cidr); + $expectedResponse->setServicesCidr($servicesCidr); + $expectedResponse->setPod($pod); + $expectedResponse->setJumboFramesEnabled($jumboFramesEnabled); + $expectedResponse->setGatewayIp($gatewayIp); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); + $newNetworkId = 'newNetworkId-554751797'; + $request = (new RenameNetworkRequest()) + ->setName($formattedName) + ->setNewNetworkId($newNetworkId); + $response = $gapicClient->renameNetwork($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.baremetalsolution.v2.BareMetalSolution/RenameNetwork', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNewNetworkId(); + $this->assertProtobufEquals($newNetworkId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameNetworkExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); + $newNetworkId = 'newNetworkId-554751797'; + $request = (new RenameNetworkRequest()) + ->setName($formattedName) + ->setNewNetworkId($newNetworkId); + try { + $gapicClient->renameNetwork($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameNfsShareTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $nfsShareId = 'nfsShareId931294079'; + $id = 'id3355'; + $volume = 'volume-810883302'; + $requestedSizeGib = 525454387; + $expectedResponse = new NfsShare(); + $expectedResponse->setName($name2); + $expectedResponse->setNfsShareId($nfsShareId); + $expectedResponse->setId($id); + $expectedResponse->setVolume($volume); + $expectedResponse->setRequestedSizeGib($requestedSizeGib); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); + $newNfsshareId = 'newNfsshareId814577687'; + $request = (new RenameNfsShareRequest()) + ->setName($formattedName) + ->setNewNfsshareId($newNfsshareId); + $response = $gapicClient->renameNfsShare($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.baremetalsolution.v2.BareMetalSolution/RenameNfsShare', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNewNfsshareId(); + $this->assertProtobufEquals($newNfsshareId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameNfsShareExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); + $newNfsshareId = 'newNfsshareId814577687'; + $request = (new RenameNfsShareRequest()) + ->setName($formattedName) + ->setNewNfsshareId($newNfsshareId); + try { + $gapicClient->renameNfsShare($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameVolumeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $requestedSizeGib = 525454387; + $originallyRequestedSizeGib = 44854004; + $currentSizeGib = 72696456; + $emergencySizeGib = 1936971120; + $maxSizeGib = 1805521661; + $autoGrownSizeGib = 1245638678; + $remainingSpaceGib = 1423108606; + $snapshotEnabled = true; + $pod = 'pod111173'; + $bootVolume = false; + $notes = 'notes105008833'; + $attached = true; + $expectedResponse = new Volume(); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setRequestedSizeGib($requestedSizeGib); + $expectedResponse->setOriginallyRequestedSizeGib($originallyRequestedSizeGib); + $expectedResponse->setCurrentSizeGib($currentSizeGib); + $expectedResponse->setEmergencySizeGib($emergencySizeGib); + $expectedResponse->setMaxSizeGib($maxSizeGib); + $expectedResponse->setAutoGrownSizeGib($autoGrownSizeGib); + $expectedResponse->setRemainingSpaceGib($remainingSpaceGib); + $expectedResponse->setSnapshotEnabled($snapshotEnabled); + $expectedResponse->setPod($pod); + $expectedResponse->setBootVolume($bootVolume); + $expectedResponse->setNotes($notes); + $expectedResponse->setAttached($attached); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $newVolumeId = 'newVolumeId-468182911'; + $request = (new RenameVolumeRequest()) + ->setName($formattedName) + ->setNewVolumeId($newVolumeId); + $response = $gapicClient->renameVolume($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.baremetalsolution.v2.BareMetalSolution/RenameVolume', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNewVolumeId(); + $this->assertProtobufEquals($newVolumeId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameVolumeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $newVolumeId = 'newVolumeId-468182911'; + $request = (new RenameVolumeRequest()) + ->setName($formattedName) + ->setNewVolumeId($newVolumeId); + try { + $gapicClient->renameVolume($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetInstanceTest() + { + $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/resetInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ResetInstanceResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ResetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->resetInstance($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.baremetalsolution.v2.BareMetalSolution/ResetInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); + $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 resetInstanceExceptionTest() + { + $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/resetInstanceTest'); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ResetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->resetInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); + 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 resizeVolumeTest() + { + $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/resizeVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $id = 'id3355'; + $requestedSizeGib = 525454387; + $originallyRequestedSizeGib = 44854004; + $currentSizeGib = 72696456; + $emergencySizeGib = 1936971120; + $maxSizeGib = 1805521661; + $autoGrownSizeGib = 1245638678; + $remainingSpaceGib = 1423108606; + $snapshotEnabled = true; + $pod = 'pod111173'; + $bootVolume = false; + $notes = 'notes105008833'; + $attached = true; + $expectedResponse = new Volume(); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setRequestedSizeGib($requestedSizeGib); + $expectedResponse->setOriginallyRequestedSizeGib($originallyRequestedSizeGib); + $expectedResponse->setCurrentSizeGib($currentSizeGib); + $expectedResponse->setEmergencySizeGib($emergencySizeGib); + $expectedResponse->setMaxSizeGib($maxSizeGib); + $expectedResponse->setAutoGrownSizeGib($autoGrownSizeGib); + $expectedResponse->setRemainingSpaceGib($remainingSpaceGib); + $expectedResponse->setSnapshotEnabled($snapshotEnabled); + $expectedResponse->setPod($pod); + $expectedResponse->setBootVolume($bootVolume); + $expectedResponse->setNotes($notes); + $expectedResponse->setAttached($attached); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resizeVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedVolume = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ResizeVolumeRequest()) + ->setVolume($formattedVolume); + $response = $gapicClient->resizeVolume($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.baremetalsolution.v2.BareMetalSolution/ResizeVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getVolume(); + $this->assertProtobufEquals($formattedVolume, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resizeVolumeTest'); + $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 resizeVolumeExceptionTest() + { + $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/resizeVolumeTest'); + $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 + $formattedVolume = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ResizeVolumeRequest()) + ->setVolume($formattedVolume); + $response = $gapicClient->resizeVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resizeVolumeTest'); + 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 restoreVolumeSnapshotTest() + { + $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/restoreVolumeSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $id = 'id3355'; + $description = 'description-1724546052'; + $storageVolume = 'storageVolume-768806562'; + $expectedResponse = new VolumeSnapshot(); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setDescription($description); + $expectedResponse->setStorageVolume($storageVolume); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/restoreVolumeSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedVolumeSnapshot = $gapicClient->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new RestoreVolumeSnapshotRequest()) + ->setVolumeSnapshot($formattedVolumeSnapshot); + $response = $gapicClient->restoreVolumeSnapshot($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.baremetalsolution.v2.BareMetalSolution/RestoreVolumeSnapshot', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getVolumeSnapshot(); + $this->assertProtobufEquals($formattedVolumeSnapshot, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreVolumeSnapshotTest'); + $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 restoreVolumeSnapshotExceptionTest() + { + $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/restoreVolumeSnapshotTest'); + $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 + $formattedVolumeSnapshot = $gapicClient->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new RestoreVolumeSnapshotRequest()) + ->setVolumeSnapshot($formattedVolumeSnapshot); + $response = $gapicClient->restoreVolumeSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreVolumeSnapshotTest'); + 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 startInstanceTest() + { + $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/startInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new StartInstanceResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new StartInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->startInstance($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.baremetalsolution.v2.BareMetalSolution/StartInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startInstanceTest'); + $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 startInstanceExceptionTest() + { + $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/startInstanceTest'); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new StartInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->startInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startInstanceTest'); + 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 stopInstanceTest() + { + $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/stopInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new StopInstanceResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new StopInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->stopInstance($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.baremetalsolution.v2.BareMetalSolution/StopInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); + $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 stopInstanceExceptionTest() + { + $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/stopInstanceTest'); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new StopInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->stopInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); + 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 submitProvisioningConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SubmitProvisioningConfigResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $provisioningConfig = new ProvisioningConfig(); + $request = (new SubmitProvisioningConfigRequest()) + ->setParent($formattedParent) + ->setProvisioningConfig($provisioningConfig); + $response = $gapicClient->submitProvisioningConfig($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.baremetalsolution.v2.BareMetalSolution/SubmitProvisioningConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProvisioningConfig(); + $this->assertProtobufEquals($provisioningConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function submitProvisioningConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $provisioningConfig = new ProvisioningConfig(); + $request = (new SubmitProvisioningConfigRequest()) + ->setParent($formattedParent) + ->setProvisioningConfig($provisioningConfig); + try { + $gapicClient->submitProvisioningConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateInstanceTest() + { + $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/updateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $id = 'id3355'; + $machineType = 'machineType1838323762'; + $hyperthreadingEnabled = true; + $interactiveSerialConsoleEnabled = false; + $osImage = 'osImage1982209856'; + $pod = 'pod111173'; + $networkTemplate = 'networkTemplate215365483'; + $loginInfo = 'loginInfo-1747949628'; + $firmwareVersion = 'firmwareVersion-987819436'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setHyperthreadingEnabled($hyperthreadingEnabled); + $expectedResponse->setInteractiveSerialConsoleEnabled($interactiveSerialConsoleEnabled); + $expectedResponse->setOsImage($osImage); + $expectedResponse->setPod($pod); + $expectedResponse->setNetworkTemplate($networkTemplate); + $expectedResponse->setLoginInfo($loginInfo); + $expectedResponse->setFirmwareVersion($firmwareVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instance = new Instance(); + $request = (new UpdateInstanceRequest()) + ->setInstance($instance); + $response = $gapicClient->updateInstance($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.baremetalsolution.v2.BareMetalSolution/UpdateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + $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 updateInstanceExceptionTest() + { + $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/updateInstanceTest'); + $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 + $instance = new Instance(); + $request = (new UpdateInstanceRequest()) + ->setInstance($instance); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + 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 updateNetworkTest() + { + $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/updateNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $id = 'id3355'; + $ipAddress = 'ipAddress1480014044'; + $vlanId = 'vlanId536153463'; + $cidr = 'cidr3053428'; + $servicesCidr = 'servicesCidr-1169831243'; + $pod = 'pod111173'; + $jumboFramesEnabled = true; + $gatewayIp = 'gatewayIp955798786'; + $expectedResponse = new Network(); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setIpAddress($ipAddress); + $expectedResponse->setVlanId($vlanId); + $expectedResponse->setCidr($cidr); + $expectedResponse->setServicesCidr($servicesCidr); + $expectedResponse->setPod($pod); + $expectedResponse->setJumboFramesEnabled($jumboFramesEnabled); + $expectedResponse->setGatewayIp($gatewayIp); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $network = new Network(); + $request = (new UpdateNetworkRequest()) + ->setNetwork($network); + $response = $gapicClient->updateNetwork($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.baremetalsolution.v2.BareMetalSolution/UpdateNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNetwork(); + $this->assertProtobufEquals($network, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkTest'); + $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 updateNetworkExceptionTest() + { + $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/updateNetworkTest'); + $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 + $network = new Network(); + $request = (new UpdateNetworkRequest()) + ->setNetwork($network); + $response = $gapicClient->updateNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkTest'); + 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 updateNfsShareTest() + { + $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/updateNfsShareTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $nfsShareId = 'nfsShareId931294079'; + $id = 'id3355'; + $volume = 'volume-810883302'; + $requestedSizeGib = 525454387; + $expectedResponse = new NfsShare(); + $expectedResponse->setName($name); + $expectedResponse->setNfsShareId($nfsShareId); + $expectedResponse->setId($id); + $expectedResponse->setVolume($volume); + $expectedResponse->setRequestedSizeGib($requestedSizeGib); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateNfsShareTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $nfsShare = new NfsShare(); + $request = (new UpdateNfsShareRequest()) + ->setNfsShare($nfsShare); + $response = $gapicClient->updateNfsShare($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.baremetalsolution.v2.BareMetalSolution/UpdateNfsShare', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNfsShare(); + $this->assertProtobufEquals($nfsShare, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNfsShareTest'); + $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 updateNfsShareExceptionTest() + { + $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/updateNfsShareTest'); + $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 + $nfsShare = new NfsShare(); + $request = (new UpdateNfsShareRequest()) + ->setNfsShare($nfsShare); + $response = $gapicClient->updateNfsShare($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNfsShareTest'); + 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 updateProvisioningConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $ticketId = 'ticketId-71132370'; + $handoverServiceAccount = 'handoverServiceAccount747638823'; + $email2 = 'email2-1638014897'; + $location = 'location1901043637'; + $cloudConsoleUri = 'cloudConsoleUri529066874'; + $vpcScEnabled = true; + $statusMessage = 'statusMessage-239442758'; + $customId = 'customId1611556009'; + $expectedResponse = new ProvisioningConfig(); + $expectedResponse->setName($name); + $expectedResponse->setTicketId($ticketId); + $expectedResponse->setHandoverServiceAccount($handoverServiceAccount); + $expectedResponse->setEmail($email2); + $expectedResponse->setLocation($location); + $expectedResponse->setCloudConsoleUri($cloudConsoleUri); + $expectedResponse->setVpcScEnabled($vpcScEnabled); + $expectedResponse->setStatusMessage($statusMessage); + $expectedResponse->setCustomId($customId); + $transport->addResponse($expectedResponse); + // Mock request + $provisioningConfig = new ProvisioningConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateProvisioningConfigRequest()) + ->setProvisioningConfig($provisioningConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateProvisioningConfig($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.baremetalsolution.v2.BareMetalSolution/UpdateProvisioningConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getProvisioningConfig(); + $this->assertProtobufEquals($provisioningConfig, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProvisioningConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $provisioningConfig = new ProvisioningConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateProvisioningConfigRequest()) + ->setProvisioningConfig($provisioningConfig) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateProvisioningConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateVolumeTest() + { + $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/updateVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $id = 'id3355'; + $requestedSizeGib = 525454387; + $originallyRequestedSizeGib = 44854004; + $currentSizeGib = 72696456; + $emergencySizeGib = 1936971120; + $maxSizeGib = 1805521661; + $autoGrownSizeGib = 1245638678; + $remainingSpaceGib = 1423108606; + $snapshotEnabled = true; + $pod = 'pod111173'; + $bootVolume = false; + $notes = 'notes105008833'; + $attached = true; + $expectedResponse = new Volume(); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setRequestedSizeGib($requestedSizeGib); + $expectedResponse->setOriginallyRequestedSizeGib($originallyRequestedSizeGib); + $expectedResponse->setCurrentSizeGib($currentSizeGib); + $expectedResponse->setEmergencySizeGib($emergencySizeGib); + $expectedResponse->setMaxSizeGib($maxSizeGib); + $expectedResponse->setAutoGrownSizeGib($autoGrownSizeGib); + $expectedResponse->setRemainingSpaceGib($remainingSpaceGib); + $expectedResponse->setSnapshotEnabled($snapshotEnabled); + $expectedResponse->setPod($pod); + $expectedResponse->setBootVolume($bootVolume); + $expectedResponse->setNotes($notes); + $expectedResponse->setAttached($attached); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $volume = new Volume(); + $request = (new UpdateVolumeRequest()) + ->setVolume($volume); + $response = $gapicClient->updateVolume($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.baremetalsolution.v2.BareMetalSolution/UpdateVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getVolume(); + $this->assertProtobufEquals($volume, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); + $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 updateVolumeExceptionTest() + { + $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/updateVolumeTest'); + $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 + $volume = new Volume(); + $request = (new UpdateVolumeRequest()) + ->setVolume($volume); + $response = $gapicClient->updateVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); + 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 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 createNfsShareAsyncTest() + { + $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/createNfsShareTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $nfsShareId = 'nfsShareId931294079'; + $id = 'id3355'; + $volume = 'volume-810883302'; + $requestedSizeGib = 525454387; + $expectedResponse = new NfsShare(); + $expectedResponse->setName($name); + $expectedResponse->setNfsShareId($nfsShareId); + $expectedResponse->setId($id); + $expectedResponse->setVolume($volume); + $expectedResponse->setRequestedSizeGib($requestedSizeGib); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNfsShareTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $nfsShare = new NfsShare(); + $request = (new CreateNfsShareRequest()) + ->setParent($formattedParent) + ->setNfsShare($nfsShare); + $response = $gapicClient->createNfsShareAsync($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.baremetalsolution.v2.BareMetalSolution/CreateNfsShare', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNfsShare(); + $this->assertProtobufEquals($nfsShare, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNfsShareTest'); + $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/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php new file mode 100644 index 000000000000..7f21496cde09 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php @@ -0,0 +1,93 @@ +internalAddGeneratedFile( + ' +† +!google/cloud/batch/v1/batch.protogoogle.cloud.batch.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.protogoogle/cloud/batch/v1/job.proto google/cloud/batch/v1/task.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"› +CreateJobRequest0 +parent ( B àAúAbatch.googleapis.com/Job +job_id ( , +job ( 2.google.cloud.batch.v1.JobBàA + +request_id ( BàA"? + GetJobRequest. +name ( B àAúA +batch.googleapis.com/Job"N +DeleteJobRequest +name (  +reason ( BàA + +request_id ( BàA"o +ListJobsRequest +parent (  +filter (  +order_by ( BàA + page_size ( + +page_token ( "j +ListJobsResponse( +jobs ( 2.google.cloud.batch.v1.Job +next_page_token (  + unreachable ( " +ListTasksRequest6 +parent ( B&àAúA +batch.googleapis.com/TaskGroup +filter (  + page_size ( + +page_token ( "m +ListTasksResponse* +tasks ( 2.google.cloud.batch.v1.Task +next_page_token (  + unreachable ( "A +GetTaskRequest/ +name ( B!àAúA +batch.googleapis.com/Task"€ +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àA2¶ + BatchService› + CreateJob\'.google.cloud.batch.v1.CreateJobRequest.google.cloud.batch.v1.Job"IÚAparent,job,job_id‚Óä“/"(/v1/{parent=projects/*/locations/*}/jobs:jobƒ +GetJob$.google.cloud.batch.v1.GetJobRequest.google.cloud.batch.v1.Job"7ÚAname‚Óä“*(/v1/{name=projects/*/locations/*/jobs/*}Ï + DeleteJob\'.google.cloud.batch.v1.DeleteJobRequest.google.longrunning.Operation"zÊA@ +google.protobuf.Empty\'google.cloud.batch.v1.OperationMetadataÚAname‚Óä“**(/v1/{name=projects/*/locations/*/jobs/*}– +ListJobs&.google.cloud.batch.v1.ListJobsRequest\'.google.cloud.batch.v1.ListJobsResponse"9ÚAparent‚Óä“*(/v1/{parent=projects/*/locations/*}/jobs› +GetTask%.google.cloud.batch.v1.GetTaskRequest.google.cloud.batch.v1.Task"LÚAname‚Óä“?=/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}® + ListTasks\'.google.cloud.batch.v1.ListTasksRequest(.google.cloud.batch.v1.ListTasksResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasksHÊAbatch.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB« +com.google.cloud.batch.v1B +BatchProtoPZ/cloud.google.com/go/batch/apiv1/batchpb;batchpb¢GCBªGoogle.Cloud.Batch.V1ÊGoogle\\Cloud\\Batch\\V1êGoogle::Cloud::Batch::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php new file mode 100644 index 0000000000000000000000000000000000000000..ab493fe0fa4edd57072179c4de5d4b25f24750c7 GIT binary patch literal 6031 zcmbtYTX!1Q6%L>aY$SxnH;h|*jMG|Ki6J71li)ZGHz6Duh(OLt7i&$2;Rua2%uMDC zvQ;mw)%LMZ{SAF#8?|~6Fmv`k=j{FMZ(qK8;vTqg zPpuJ~c)CyeYVTO}4~Xh|j_(+brS?Yq`@~ZXXXu(1@v^E~X{wE8N3B-sox3PXosnmd zf;w=VfkkqL<&65dp6(k5xueb83#XUmx&Ul_NT{nDM6I<-&xo)0bzkq+xLCK$#JVLW z)_uPD2*9v(O4X-M4_6^M`{svF|Sl!nxN>J|n+WnDj z_@-m4OrU8SWa9%>=wxf(cOAUtV>LKPi(MQq-L2a`@oe4dRtPmb)Ab#%g-Z*C0rAJ? zVox?cklQkK=DxZi&R8g%JLF^4_eNxLcUAR>Kl1EH{M<~z$@p9M0y7m|v%6&yt6w4q z`jP2)g~I8rPL<3O-6hgnb4#7|OShxb!}+%y+p;o3aG?wS2hom+sPXlod$BBc--EAB z>8xVEKlaTQ;&o$eO=jEs@Y4p|c?VFHYhpo`BRR{FoITo1-;{E?Yvw#@M*;2h4D9=8 zEV<&g6y~9T=*sn_MdbV7P~-Q0aBZ<5^T$PqU@$1_u)yLd6;eYRu~Ot;#fXxG$jI!c z!jn&;u7}_-{o_;wA4ik|#Mx=If#-}|np#jJ8}YoFz3`@4=Hwb%$n=Mm60GZ%tdHVCC!>Tw|$`i>xH2R_2p>2yx39(7-aQ zTWyNj-fU=ljdrVAu5Z<=mE?PPzt!?ibFZT9G;6hbqm~RQQCMgdJKM={ z=C{ib8{-&}zsQg;LOqdxOTY-=XW0i)zJygKHli9iBDPP_iY(SMGwdW}t8A%Ky@(_} zo*_6s=qX)L5wba0@kX{5FkEVp2gJ=l&p7ykq>%n+2oiN0PmQ@*oJY9|D?{BlFl`LQ zV^`9hvIh!EADI;W&yX;5`o!WeN#wr_^iKucG!tc86B?c|1q^iD%~+cpO1^vov7Y1j zTHmCH$d-)jKALxf3d*E^3c=c#N9CnXsz95ZMWKPCzmq+3Bwwif0Ae!7P0uGqn_qFu4zb$eFDo^m{5HnNH(6& z&Nlv}y6iI{mHul8mgRR0+J!O96ZsG4)YQSqP*@frFSQp=PotbJSRF7wT|9vV6X*CB z@~mJ;%+Bl#)WTbWa5CS*0zb%ANOpc`O?wNS__SHlgd@w_#YT-g?m8%)V*A^v=i$un z)*v|@vC1|?gZ#sdAJ0FWVWDYJOt&Jr%9Pulj2Tggd^4}AAasPPrq>}u*J3#R8rCTB zj!c7Sy1@fn)+)c4p}H+r7sXqa@DXPntm|O!V3x15H ze}o0brOFyCnnM<7jEG~~?ENL;8I0Zy?IzgUL$lT`CXY!EV4Rd1bN^ zXCTz@LLFaRVf7M+4X@}~+{H=&QC;qzK7cr4gkaaLWA!n0LoD$G)|k48atE&PY+za1 zz#VCQ&paX?<=HG+3a3KKEi?dssIeEUfa2B^rO@vqrx{o}Z#o0>QzLUGho-F=xCI0M zzT*w~9or9U{D1%py+N^&CDGlllD84)1!E>OXhS8)J28^iqK()m{oe7 zi_^0zeA9kNiy58g7XxNl6uLX-r>#!y+GTuD> zJtQRw)r06{0UYodZ*?)|0aI}BOrY^LT(=#Kyb^;N&2%-r-$(08+@}ewo@KWVC{n{I z5d_uP7xU7bR5?Ct`YTwQrap{q9G(S)CQAk$Qm+^Z@KRSW(dWT=~# z42uMgcnrrSqKk=@{v3jvIF`8B&!s4q=NJIK(+d4c44cObag;G|y{6=HG(nT{(@G<7k{mzX_*=NTI-G3I#4yC_LZn kEupP^=ac*6N#jRi$~!R>W`(tBTrd#kE5+FM1Wo|{3wiKVT>t<8 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php new file mode 100644 index 0000000000000000000000000000000000000000..8bac0e2979dfcdf792061b2ffe0587f0a437420b GIT binary patch literal 3962 zcmbVP&2k$>5RN2Uwp#wnKoVJ1kc|k$0kXnMRRRi0kYvTElE}i6%}=RnYqT2Mi&wkL z?yM6*`31P}1{^r%4Y+aU!UJ&OoFjLt=$YA-Wntlf57zE%e>45_b@%kg54{5q-qJRi z!+gqFU+WDue!w)(ce!i2w$=;x_L#4k?!dEb=Iffav86S)I$C|B(Yc1uzzuzqm9>4> z-M3lMwB4{@>``tW6pz-6oCb%w+zh~>0~UDHWZGt{`jm0nr<`^-C9Yc&xNcS8y1VQ5 z08E<(f!0Ahd98z<02Im{T7Or%lnLv941!QZbrw7 z?W{d*P3c%J|3k_98uvpse!8aljEBB+PwFi;I37K9&+t>lv$~HgX7{V?fF4<{UoM|m zb+XAc=r)Vu^~$Kzf$8qLb~s?Ke(1=X8zB-5gYZ9~9Se!W>A*W1D+74zffa?T((jL= z^9VV+Hu9(N?hW`k2j`NNTvBw_C7pFiXZ>hBzZ$WedREboT&d`tFPxnKN77%B%$t#n zObDb{u^%}l`hIotJC7|_0);JDu3;vIoW+487a?PMp)s&*+sY-h#9E3FfB_r0{t#Dt zxujgX1dBb_^7UAjU}j0Q zNGX<^MdVVcd*ffA${Jn#utEVAPj83bV$UsZm~Nj*du9uNCIEzx0+Ks0tIiU>{10c5 zk6=*%!@!X43D7kuG_x>8S9P59df^+G6|an3f{X1=rBgR{n(bD-)_ByYZ>(G(S(t0p zn;VVh=1KxXG+$}A8=Fo1loX$~cbZM{DTQ%QKdLmI;D;Hq2$}XytyZsZ;Oi_|0@!KR zzo^%CI{2P0{FsLM?a*;(&t~KSa>#W!wXh3FuVhO%r>Grc^jZw~^aA-1(yBs6ba>}H za9h?>M3!N$M}6PIbJLO)Q)4?ixT@q4yb23QXV0cXL-ZERYb0$o^+zQ^@<6P8$MqS~ z4#TYiBUwE!(xXSs!+qZkoxUWaT%-0gIt&aybR^B@$z8}Y=g9J1XMl9i%}M>Hg|mJl zN#2DyksEHvbMq3k8v7$od_As)$nUgGd&~}U8A+G-V$q4L7@7Y>O4l9k5A(kzATx@C zs07x4?lU9wRVB!f6`04)J)lls(J>>8M`Qe<=VHB#(tH`_RGA9U$Q0&1F1VgZ)j%4M zA#cLvp6!|z z(Shac=N7~sGH&_XkXGD4!p?YDj||L zlfMPoF?V6Eqz>6IDr1WS4f9vOVjdWvbNubl>vP&C~3rj(`JU};$_NWG3};l^dttfg#3^^hJ~@52ry}dE7qsDB6goXmK}kl zZZ(-pU?(}nyKL!=Df_5P$7Di^be~>d$Bsl+T^xH=8l1<5!uLs7o;3eHq^Z10N)j!V zZcR~m0;g9bh_qlu!7(mQA1|-i3`Kj+mhSwgjWFjGI{!8-tG!1{GQ;B*7oeW0wb{Z$ zNJlDM22!bY8e7eY7K8m^yWZLU(&$v$kFm>O`w*=}y(SC4Bw$8F^K^odbu9d{=S5~* zn_|XEe=R?IS>dp%ZdB^hfS0L2$4n{813t$Z`86|nQ2Z`>Ixb@Ak#|R2iyx1RU%Neg z$N$H2%Gktm?%@I#cMVb7J+&S!9T$E`L3WGqH&@fb|sjWLqPDK5Woz^z zN-~x|)hcCu6!$yR@(!49oRrr52e34u&^dK8e+OPa(~xs;)fWj^#kiksQ8gpz&=SK~ zEAf?@D@T$@mVGyxGLb$wXi7qPy?fE`Ps!9~t@qG zMuR6#o-dO*1u2&$rd*bwa(Q>XmzM4O_Knd%@xB`8#-=}!4VHPvN7e0B`S0Dl80 CUcli1 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php new file mode 100644 index 0000000000000000000000000000000000000000..fa8ca8061c1c73d2e747bfcc335cfc3d120737af GIT binary patch literal 1026 zcmaiz-Hy^g6vqXW$Pm52kkq|8;wB45OIYuUXk>A5FI-66aABH|VK~4fZKs(|N!0K% zUT%C6U&O?xa6Yfp5*D99Z4go^lwcx)MZQ|0 z1SaB?M<{)O(FD#X7w~R$cJV}8Gm%S%0jz~sN7!YN$d}y(RczDU_PSdUq^r_mm!LeDyYt6rvNd_8)2mMD}7jlvOT zO!8C-In~l2Sfkosnu)YKMOl-Mub}OE41ya?4nWBquU7|BskXjC9R1ukugn_{2z?q`t&0XE-+~cvWqw>2QOPSmcSCr&MjcyC$lo4_r*7 zW^b8y4=U~2@II+J;#$v0Mb~dU)B%)Rl(yGe;}NM#jD_CrZy#}3clTj|n3g^{zV})Ych{nzou*s^Z|^c)^o#RbSr;B&mYWW8-$L$N$o*OG z$5lKm=r8cs{QoL@&JqOH69m>21hd|vYJaDfNBiABcSv0$@UQe)r2}n8c7*%}XQevv literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php new file mode 100644 index 000000000000..f438a67a782e --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php @@ -0,0 +1,400 @@ +google.cloud.batch.v1.AllocationPolicy + */ +class AllocationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Location where compute resources should be allocated for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; + */ + protected $location = null; + /** + * Describe instances that can be created by this AllocationPolicy. + * Only instances[0] is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; + */ + private $instances; + /** + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) + * + * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; + */ + protected $service_account = null; + /** + * Labels applied to all VM instances and other resources + * created by AllocationPolicy. + * Labels could be user provided or system generated. + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 6; + */ + private $labels; + /** + * The network policy. + * If you define an instance template in the `InstancePolicyOrTemplate` field, + * Batch will use the network settings in the instance template instead of + * this field. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; + */ + protected $network = null; + /** + * The placement policy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; + */ + protected $placement = null; + /** + * Optional. Tags applied to the VM instances. + * The tags identify valid sources or targets for network firewalls. + * Each tag must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy $location + * Location where compute resources should be allocated for the Job. + * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate>|\Google\Protobuf\Internal\RepeatedField $instances + * Describe instances that can be created by this AllocationPolicy. + * Only instances[0] is supported now. + * @type \Google\Cloud\Batch\V1\ServiceAccount $service_account + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels applied to all VM instances and other resources + * created by AllocationPolicy. + * Labels could be user provided or system generated. + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * @type \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy $network + * The network policy. + * If you define an instance template in the `InstancePolicyOrTemplate` field, + * Batch will use the network settings in the instance template instead of + * this field. + * @type \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy $placement + * The placement policy. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. Tags applied to the VM instances. + * The tags identify valid sources or targets for network firewalls. + * Each tag must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Location where compute resources should be allocated for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy|null + */ + public function getLocation() + { + return $this->location; + } + + public function hasLocation() + { + return isset($this->location); + } + + public function clearLocation() + { + unset($this->location); + } + + /** + * Location where compute resources should be allocated for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy::class); + $this->location = $var; + + return $this; + } + + /** + * Describe instances that can be created by this AllocationPolicy. + * Only instances[0] is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Describe instances that can be created by this AllocationPolicy. + * Only instances[0] is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; + * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate::class); + $this->instances = $arr; + + return $this; + } + + /** + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) + * + * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; + * @return \Google\Cloud\Batch\V1\ServiceAccount|null + */ + public function getServiceAccount() + { + return $this->service_account; + } + + public function hasServiceAccount() + { + return isset($this->service_account); + } + + public function clearServiceAccount() + { + unset($this->service_account); + } + + /** + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) + * + * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; + * @param \Google\Cloud\Batch\V1\ServiceAccount $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\ServiceAccount::class); + $this->service_account = $var; + + return $this; + } + + /** + * Labels applied to all VM instances and other resources + * created by AllocationPolicy. + * Labels could be user provided or system generated. + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels applied to all VM instances and other resources + * created by AllocationPolicy. + * Labels could be user provided or system generated. + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 6; + * @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; + } + + /** + * The network policy. + * If you define an instance template in the `InstancePolicyOrTemplate` field, + * Batch will use the network settings in the instance template instead of + * this field. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy|null + */ + public function getNetwork() + { + return $this->network; + } + + public function hasNetwork() + { + return isset($this->network); + } + + public function clearNetwork() + { + unset($this->network); + } + + /** + * The network policy. + * If you define an instance template in the `InstancePolicyOrTemplate` field, + * Batch will use the network settings in the instance template instead of + * this field. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy::class); + $this->network = $var; + + return $this; + } + + /** + * The placement policy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy|null + */ + public function getPlacement() + { + return $this->placement; + } + + public function hasPlacement() + { + return isset($this->placement); + } + + public function clearPlacement() + { + unset($this->placement); + } + + /** + * The placement policy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy $var + * @return $this + */ + public function setPlacement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy::class); + $this->placement = $var; + + return $this; + } + + /** + * Optional. Tags applied to the VM instances. + * The tags identify valid sources or targets for network firewalls. + * Each tag must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Tags applied to the VM instances. + * The tags identify valid sources or targets for network firewalls. + * Each tag must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php new file mode 100644 index 000000000000..a035df7f534c --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php @@ -0,0 +1,201 @@ +google.cloud.batch.v1.AllocationPolicy.Accelerator + */ +class Accelerator extends \Google\Protobuf\Internal\Message +{ + /** + * The accelerator type. For example, "nvidia-tesla-t4". + * See `gcloud compute accelerator-types list`. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * The number of accelerators of this type. + * + * Generated from protobuf field int64 count = 2; + */ + protected $count = 0; + /** + * Deprecated: please use instances[0].install_gpu_drivers instead. + * + * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; + * @deprecated + */ + protected $install_gpu_drivers = false; + /** + * Optional. The NVIDIA GPU driver version that should be installed for this + * type. + * You can define the specific driver version such as "470.103.01", + * following the driver version requirements in + * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + * Batch will install the specific accelerator driver if qualified. + * + * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $driver_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * The accelerator type. For example, "nvidia-tesla-t4". + * See `gcloud compute accelerator-types list`. + * @type int|string $count + * The number of accelerators of this type. + * @type bool $install_gpu_drivers + * Deprecated: please use instances[0].install_gpu_drivers instead. + * @type string $driver_version + * Optional. The NVIDIA GPU driver version that should be installed for this + * type. + * You can define the specific driver version such as "470.103.01", + * following the driver version requirements in + * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + * Batch will install the specific accelerator driver if qualified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The accelerator type. For example, "nvidia-tesla-t4". + * See `gcloud compute accelerator-types list`. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The accelerator type. For example, "nvidia-tesla-t4". + * See `gcloud compute accelerator-types list`. + * + * 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; + } + + /** + * The number of accelerators of this type. + * + * Generated from protobuf field int64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * The number of accelerators of this type. + * + * 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; + } + + /** + * Deprecated: please use instances[0].install_gpu_drivers instead. + * + * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getInstallGpuDrivers() + { + @trigger_error('install_gpu_drivers is deprecated.', E_USER_DEPRECATED); + return $this->install_gpu_drivers; + } + + /** + * Deprecated: please use instances[0].install_gpu_drivers instead. + * + * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setInstallGpuDrivers($var) + { + @trigger_error('install_gpu_drivers is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->install_gpu_drivers = $var; + + return $this; + } + + /** + * Optional. The NVIDIA GPU driver version that should be installed for this + * type. + * You can define the specific driver version such as "470.103.01", + * following the driver version requirements in + * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + * Batch will install the specific accelerator driver if qualified. + * + * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDriverVersion() + { + return $this->driver_version; + } + + /** + * Optional. The NVIDIA GPU driver version that should be installed for this + * type. + * You can define the specific driver version such as "470.103.01", + * following the driver version requirements in + * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + * Batch will install the specific accelerator driver if qualified. + * + * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDriverVersion($var) + { + GPBUtil::checkString($var, True); + $this->driver_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Accelerator::class, \Google\Cloud\Batch\V1\AllocationPolicy_Accelerator::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php new file mode 100644 index 000000000000..d57b97912d09 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php @@ -0,0 +1,153 @@ +google.cloud.batch.v1.AllocationPolicy.AttachedDisk + */ +class AttachedDisk extends \Google\Protobuf\Internal\Message +{ + /** + * Device name that the guest operating system will see. + * It is used by Runnable.volumes field to mount disks. So please specify + * the device_name if you want Batch to help mount the disk, and it should + * match the device_name field in volumes. + * + * Generated from protobuf field string device_name = 3; + */ + protected $device_name = ''; + protected $attached; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $new_disk + * @type string $existing_disk + * Name of an existing PD. + * @type string $device_name + * Device name that the guest operating system will see. + * It is used by Runnable.volumes field to mount disks. So please specify + * the device_name if you want Batch to help mount the disk, and it should + * match the device_name field in volumes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null + */ + public function getNewDisk() + { + return $this->readOneof(1); + } + + public function hasNewDisk() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var + * @return $this + */ + public function setNewDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Name of an existing PD. + * + * Generated from protobuf field string existing_disk = 2; + * @return string + */ + public function getExistingDisk() + { + return $this->readOneof(2); + } + + public function hasExistingDisk() + { + return $this->hasOneof(2); + } + + /** + * Name of an existing PD. + * + * Generated from protobuf field string existing_disk = 2; + * @param string $var + * @return $this + */ + public function setExistingDisk($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Device name that the guest operating system will see. + * It is used by Runnable.volumes field to mount disks. So please specify + * the device_name if you want Batch to help mount the disk, and it should + * match the device_name field in volumes. + * + * Generated from protobuf field string device_name = 3; + * @return string + */ + public function getDeviceName() + { + return $this->device_name; + } + + /** + * Device name that the guest operating system will see. + * It is used by Runnable.volumes field to mount disks. So please specify + * the device_name if you want Batch to help mount the disk, and it should + * match the device_name field in volumes. + * + * Generated from protobuf field string device_name = 3; + * @param string $var + * @return $this + */ + public function setDeviceName($var) + { + GPBUtil::checkString($var, True); + $this->device_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getAttached() + { + return $this->whichOneof("attached"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AttachedDisk::class, \Google\Cloud\Batch\V1\AllocationPolicy_AttachedDisk::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php new file mode 100644 index 000000000000..339c61b43588 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php @@ -0,0 +1,349 @@ +google.cloud.batch.v1.AllocationPolicy.Disk + */ +class Disk extends \Google\Protobuf\Internal\Message +{ + /** + * Disk type as shown in `gcloud compute disk-types list`. + * For example, local SSD uses type "local-ssd". + * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + * or "pd-standard". If not specified, "pd-standard" will be used as the + * default type for non-boot disks, "pd-balanced" will be used as the + * default type for boot disks. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Disk size in GB. + * **Non-Boot Disk**: + * If the `type` specifies a persistent disk, this field + * is ignored if `data_source` is set as `image` or `snapshot`. + * If the `type` specifies a local SSD, this field should be a multiple of + * 375 GB, otherwise, the final size will be the next greater multiple of + * 375 GB. + * **Boot Disk**: + * Batch will calculate the boot disk size based on source + * image and task requirements if you do not speicify the size. + * If both this field and the `boot_disk_mib` field in task spec's + * `compute_resource` are defined, Batch will only honor this field. + * Also, this field should be no smaller than the source disk's + * size when the `data_source` is set as `snapshot` or `image`. + * For example, if you set an image as the `data_source` field and the + * image's default disk size 30 GB, you can only use this field to make the + * disk larger or equal to 30 GB. + * + * Generated from protobuf field int64 size_gb = 2; + */ + protected $size_gb = 0; + /** + * Local SSDs are available through both "SCSI" and "NVMe" interfaces. + * If not indicated, "NVMe" will be the default one for local ssds. + * This field is ignored for persistent disks as the interface is chosen + * automatically. See + * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + * + * Generated from protobuf field string disk_interface = 6; + */ + protected $disk_interface = ''; + protected $data_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image + * URL for a VM image to use as the data source for this disk. + * For example, the following are all valid URLs: + * * Specify the image by its family name: + * projects/{project}/global/images/family/{image_family} + * * Specify the image version: + * projects/{project}/global/images/{image_version} + * You can also use Batch customized image in short names. + * The following image values are supported for a boot disk: + * * `batch-debian`: use Batch Debian images. + * * `batch-cos`: use Batch Container-Optimized images. + * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + * @type string $snapshot + * Name of a snapshot used as the data source. + * Snapshot is not supported as boot disk now. + * @type string $type + * Disk type as shown in `gcloud compute disk-types list`. + * For example, local SSD uses type "local-ssd". + * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + * or "pd-standard". If not specified, "pd-standard" will be used as the + * default type for non-boot disks, "pd-balanced" will be used as the + * default type for boot disks. + * @type int|string $size_gb + * Disk size in GB. + * **Non-Boot Disk**: + * If the `type` specifies a persistent disk, this field + * is ignored if `data_source` is set as `image` or `snapshot`. + * If the `type` specifies a local SSD, this field should be a multiple of + * 375 GB, otherwise, the final size will be the next greater multiple of + * 375 GB. + * **Boot Disk**: + * Batch will calculate the boot disk size based on source + * image and task requirements if you do not speicify the size. + * If both this field and the `boot_disk_mib` field in task spec's + * `compute_resource` are defined, Batch will only honor this field. + * Also, this field should be no smaller than the source disk's + * size when the `data_source` is set as `snapshot` or `image`. + * For example, if you set an image as the `data_source` field and the + * image's default disk size 30 GB, you can only use this field to make the + * disk larger or equal to 30 GB. + * @type string $disk_interface + * Local SSDs are available through both "SCSI" and "NVMe" interfaces. + * If not indicated, "NVMe" will be the default one for local ssds. + * This field is ignored for persistent disks as the interface is chosen + * automatically. See + * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * URL for a VM image to use as the data source for this disk. + * For example, the following are all valid URLs: + * * Specify the image by its family name: + * projects/{project}/global/images/family/{image_family} + * * Specify the image version: + * projects/{project}/global/images/{image_version} + * You can also use Batch customized image in short names. + * The following image values are supported for a boot disk: + * * `batch-debian`: use Batch Debian images. + * * `batch-cos`: use Batch Container-Optimized images. + * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + * + * Generated from protobuf field string image = 4; + * @return string + */ + public function getImage() + { + return $this->readOneof(4); + } + + public function hasImage() + { + return $this->hasOneof(4); + } + + /** + * URL for a VM image to use as the data source for this disk. + * For example, the following are all valid URLs: + * * Specify the image by its family name: + * projects/{project}/global/images/family/{image_family} + * * Specify the image version: + * projects/{project}/global/images/{image_version} + * You can also use Batch customized image in short names. + * The following image values are supported for a boot disk: + * * `batch-debian`: use Batch Debian images. + * * `batch-cos`: use Batch Container-Optimized images. + * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + * + * Generated from protobuf field string image = 4; + * @param string $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Name of a snapshot used as the data source. + * Snapshot is not supported as boot disk now. + * + * Generated from protobuf field string snapshot = 5; + * @return string + */ + public function getSnapshot() + { + return $this->readOneof(5); + } + + public function hasSnapshot() + { + return $this->hasOneof(5); + } + + /** + * Name of a snapshot used as the data source. + * Snapshot is not supported as boot disk now. + * + * Generated from protobuf field string snapshot = 5; + * @param string $var + * @return $this + */ + public function setSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Disk type as shown in `gcloud compute disk-types list`. + * For example, local SSD uses type "local-ssd". + * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + * or "pd-standard". If not specified, "pd-standard" will be used as the + * default type for non-boot disks, "pd-balanced" will be used as the + * default type for boot disks. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Disk type as shown in `gcloud compute disk-types list`. + * For example, local SSD uses type "local-ssd". + * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + * or "pd-standard". If not specified, "pd-standard" will be used as the + * default type for non-boot disks, "pd-balanced" will be used as the + * default type for boot disks. + * + * 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; + } + + /** + * Disk size in GB. + * **Non-Boot Disk**: + * If the `type` specifies a persistent disk, this field + * is ignored if `data_source` is set as `image` or `snapshot`. + * If the `type` specifies a local SSD, this field should be a multiple of + * 375 GB, otherwise, the final size will be the next greater multiple of + * 375 GB. + * **Boot Disk**: + * Batch will calculate the boot disk size based on source + * image and task requirements if you do not speicify the size. + * If both this field and the `boot_disk_mib` field in task spec's + * `compute_resource` are defined, Batch will only honor this field. + * Also, this field should be no smaller than the source disk's + * size when the `data_source` is set as `snapshot` or `image`. + * For example, if you set an image as the `data_source` field and the + * image's default disk size 30 GB, you can only use this field to make the + * disk larger or equal to 30 GB. + * + * Generated from protobuf field int64 size_gb = 2; + * @return int|string + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * Disk size in GB. + * **Non-Boot Disk**: + * If the `type` specifies a persistent disk, this field + * is ignored if `data_source` is set as `image` or `snapshot`. + * If the `type` specifies a local SSD, this field should be a multiple of + * 375 GB, otherwise, the final size will be the next greater multiple of + * 375 GB. + * **Boot Disk**: + * Batch will calculate the boot disk size based on source + * image and task requirements if you do not speicify the size. + * If both this field and the `boot_disk_mib` field in task spec's + * `compute_resource` are defined, Batch will only honor this field. + * Also, this field should be no smaller than the source disk's + * size when the `data_source` is set as `snapshot` or `image`. + * For example, if you set an image as the `data_source` field and the + * image's default disk size 30 GB, you can only use this field to make the + * disk larger or equal to 30 GB. + * + * Generated from protobuf field int64 size_gb = 2; + * @param int|string $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->size_gb = $var; + + return $this; + } + + /** + * Local SSDs are available through both "SCSI" and "NVMe" interfaces. + * If not indicated, "NVMe" will be the default one for local ssds. + * This field is ignored for persistent disks as the interface is chosen + * automatically. See + * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + * + * Generated from protobuf field string disk_interface = 6; + * @return string + */ + public function getDiskInterface() + { + return $this->disk_interface; + } + + /** + * Local SSDs are available through both "SCSI" and "NVMe" interfaces. + * If not indicated, "NVMe" will be the default one for local ssds. + * This field is ignored for persistent disks as the interface is chosen + * automatically. See + * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + * + * Generated from protobuf field string disk_interface = 6; + * @param string $var + * @return $this + */ + public function setDiskInterface($var) + { + GPBUtil::checkString($var, True); + $this->disk_interface = $var; + + return $this; + } + + /** + * @return string + */ + public function getDataSource() + { + return $this->whichOneof("data_source"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Disk::class, \Google\Cloud\Batch\V1\AllocationPolicy_Disk::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php new file mode 100644 index 000000000000..23e02e3a0f2f --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php @@ -0,0 +1,321 @@ +google.cloud.batch.v1.AllocationPolicy.InstancePolicy + */ +class InstancePolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 2; + */ + protected $machine_type = ''; + /** + * The minimum CPU platform. + * See + * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + * + * Generated from protobuf field string min_cpu_platform = 3; + */ + protected $min_cpu_platform = ''; + /** + * The provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; + */ + protected $provisioning_model = 0; + /** + * The accelerators attached to each VM instance. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; + */ + private $accelerators; + /** + * Boot disk to be created and attached to each VM by this InstancePolicy. + * Boot disk will be deleted when the VM is deleted. + * Batch API now only supports booting from image. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; + */ + protected $boot_disk = null; + /** + * Non-boot disks to be attached for each VM created by this InstancePolicy. + * New disks will be deleted when the VM is deleted. + * A non-boot disk is a disk that can be of a device with a + * file system or a raw storage drive that is not ready for data + * storage and accessing. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; + */ + private $disks; + /** + * Optional. If specified, VMs will consume only the specified reservation. + * If not specified (default), VMs will consume any applicable reservation. + * + * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reservation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type + * The Compute Engine machine type. + * @type string $min_cpu_platform + * The minimum CPU platform. + * See + * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + * @type int $provisioning_model + * The provisioning model. + * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>|\Google\Protobuf\Internal\RepeatedField $accelerators + * The accelerators attached to each VM instance. + * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $boot_disk + * Boot disk to be created and attached to each VM by this InstancePolicy. + * Boot disk will be deleted when the VM is deleted. + * Batch API now only supports booting from image. + * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $disks + * Non-boot disks to be attached for each VM created by this InstancePolicy. + * New disks will be deleted when the VM is deleted. + * A non-boot disk is a disk that can be of a device with a + * file system or a raw storage drive that is not ready for data + * storage and accessing. + * @type string $reservation + * Optional. If specified, VMs will consume only the specified reservation. + * If not specified (default), VMs will consume any applicable reservation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 2; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 2; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * The minimum CPU platform. + * See + * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + * + * Generated from protobuf field string min_cpu_platform = 3; + * @return string + */ + public function getMinCpuPlatform() + { + return $this->min_cpu_platform; + } + + /** + * The minimum CPU platform. + * See + * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + * + * Generated from protobuf field string min_cpu_platform = 3; + * @param string $var + * @return $this + */ + public function setMinCpuPlatform($var) + { + GPBUtil::checkString($var, True); + $this->min_cpu_platform = $var; + + return $this; + } + + /** + * The provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; + * @return int + */ + public function getProvisioningModel() + { + return $this->provisioning_model; + } + + /** + * The provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; + * @param int $var + * @return $this + */ + public function setProvisioningModel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\AllocationPolicy\ProvisioningModel::class); + $this->provisioning_model = $var; + + return $this; + } + + /** + * The accelerators attached to each VM instance. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAccelerators() + { + return $this->accelerators; + } + + /** + * The accelerators attached to each VM instance. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; + * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAccelerators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\Accelerator::class); + $this->accelerators = $arr; + + return $this; + } + + /** + * Boot disk to be created and attached to each VM by this InstancePolicy. + * Boot disk will be deleted when the VM is deleted. + * Batch API now only supports booting from image. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null + */ + public function getBootDisk() + { + return $this->boot_disk; + } + + public function hasBootDisk() + { + return isset($this->boot_disk); + } + + public function clearBootDisk() + { + unset($this->boot_disk); + } + + /** + * Boot disk to be created and attached to each VM by this InstancePolicy. + * Boot disk will be deleted when the VM is deleted. + * Batch API now only supports booting from image. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var + * @return $this + */ + public function setBootDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); + $this->boot_disk = $var; + + return $this; + } + + /** + * Non-boot disks to be attached for each VM created by this InstancePolicy. + * New disks will be deleted when the VM is deleted. + * A non-boot disk is a disk that can be of a device with a + * file system or a raw storage drive that is not ready for data + * storage and accessing. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * Non-boot disks to be attached for each VM created by this InstancePolicy. + * New disks will be deleted when the VM is deleted. + * A non-boot disk is a disk that can be of a device with a + * file system or a raw storage drive that is not ready for data + * storage and accessing. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; + * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk::class); + $this->disks = $arr; + + return $this; + } + + /** + * Optional. If specified, VMs will consume only the specified reservation. + * If not specified (default), VMs will consume any applicable reservation. + * + * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReservation() + { + return $this->reservation; + } + + /** + * Optional. If specified, VMs will consume only the specified reservation. + * If not specified (default), VMs will consume any applicable reservation. + * + * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReservation($var) + { + GPBUtil::checkString($var, True); + $this->reservation = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstancePolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_InstancePolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php new file mode 100644 index 000000000000..65118bef501c --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php @@ -0,0 +1,316 @@ +google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate + */ +class InstancePolicyOrTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Set this field true if you want Batch to help fetch drivers from a third + * party location and install them for GPUs specified in + * `policy.accelerators` or `instance_template` on your behalf. Default is + * false. + * For Container-Optimized Image cases, Batch will install the + * accelerator driver following milestones of + * https://cloud.google.com/container-optimized-os/docs/release-notes. For + * non Container-Optimized Image cases, following + * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + * + * Generated from protobuf field bool install_gpu_drivers = 3; + */ + protected $install_gpu_drivers = false; + /** + * Optional. Set this field true if you want Batch to install Ops Agent on + * your behalf. Default is false. + * + * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $install_ops_agent = false; + /** + * Optional. Set this field to `true` if you want Batch to block + * project-level SSH keys from accessing this job's VMs. Alternatively, you + * can configure the job to specify a VM instance template that blocks + * project-level SSH keys. In either case, Batch blocks project-level SSH + * keys while creating the VMs for this job. + * Batch allows project-level SSH keys for a job's VMs only if all + * the following are true: + * + This field is undefined or set to `false`. + * + The job's VM instance template (if any) doesn't block project-level + * SSH keys. + * Notably, you can override this behavior by manually updating a VM to + * block or allow project-level SSH keys. For more information about + * blocking project-level SSH keys, see the Compute Engine documentation: + * https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys + * + * Generated from protobuf field bool block_project_ssh_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $block_project_ssh_keys = false; + protected $policy_template; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy $policy + * InstancePolicy. + * @type string $instance_template + * Name of an instance template used to create VMs. + * Named the field as 'instance_template' instead of 'template' to avoid + * C++ keyword conflict. + * Batch only supports global instance templates. + * You can specify the global instance template as a full or partial URL. + * @type bool $install_gpu_drivers + * Set this field true if you want Batch to help fetch drivers from a third + * party location and install them for GPUs specified in + * `policy.accelerators` or `instance_template` on your behalf. Default is + * false. + * For Container-Optimized Image cases, Batch will install the + * accelerator driver following milestones of + * https://cloud.google.com/container-optimized-os/docs/release-notes. For + * non Container-Optimized Image cases, following + * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + * @type bool $install_ops_agent + * Optional. Set this field true if you want Batch to install Ops Agent on + * your behalf. Default is false. + * @type bool $block_project_ssh_keys + * Optional. Set this field to `true` if you want Batch to block + * project-level SSH keys from accessing this job's VMs. Alternatively, you + * can configure the job to specify a VM instance template that blocks + * project-level SSH keys. In either case, Batch blocks project-level SSH + * keys while creating the VMs for this job. + * Batch allows project-level SSH keys for a job's VMs only if all + * the following are true: + * + This field is undefined or set to `false`. + * + The job's VM instance template (if any) doesn't block project-level + * SSH keys. + * Notably, you can override this behavior by manually updating a VM to + * block or allow project-level SSH keys. For more information about + * blocking project-level SSH keys, see the Compute Engine documentation: + * https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * InstancePolicy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy|null + */ + public function getPolicy() + { + return $this->readOneof(1); + } + + public function hasPolicy() + { + return $this->hasOneof(1); + } + + /** + * InstancePolicy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Name of an instance template used to create VMs. + * Named the field as 'instance_template' instead of 'template' to avoid + * C++ keyword conflict. + * Batch only supports global instance templates. + * You can specify the global instance template as a full or partial URL. + * + * Generated from protobuf field string instance_template = 2; + * @return string + */ + public function getInstanceTemplate() + { + return $this->readOneof(2); + } + + public function hasInstanceTemplate() + { + return $this->hasOneof(2); + } + + /** + * Name of an instance template used to create VMs. + * Named the field as 'instance_template' instead of 'template' to avoid + * C++ keyword conflict. + * Batch only supports global instance templates. + * You can specify the global instance template as a full or partial URL. + * + * Generated from protobuf field string instance_template = 2; + * @param string $var + * @return $this + */ + public function setInstanceTemplate($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Set this field true if you want Batch to help fetch drivers from a third + * party location and install them for GPUs specified in + * `policy.accelerators` or `instance_template` on your behalf. Default is + * false. + * For Container-Optimized Image cases, Batch will install the + * accelerator driver following milestones of + * https://cloud.google.com/container-optimized-os/docs/release-notes. For + * non Container-Optimized Image cases, following + * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + * + * Generated from protobuf field bool install_gpu_drivers = 3; + * @return bool + */ + public function getInstallGpuDrivers() + { + return $this->install_gpu_drivers; + } + + /** + * Set this field true if you want Batch to help fetch drivers from a third + * party location and install them for GPUs specified in + * `policy.accelerators` or `instance_template` on your behalf. Default is + * false. + * For Container-Optimized Image cases, Batch will install the + * accelerator driver following milestones of + * https://cloud.google.com/container-optimized-os/docs/release-notes. For + * non Container-Optimized Image cases, following + * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + * + * Generated from protobuf field bool install_gpu_drivers = 3; + * @param bool $var + * @return $this + */ + public function setInstallGpuDrivers($var) + { + GPBUtil::checkBool($var); + $this->install_gpu_drivers = $var; + + return $this; + } + + /** + * Optional. Set this field true if you want Batch to install Ops Agent on + * your behalf. Default is false. + * + * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getInstallOpsAgent() + { + return $this->install_ops_agent; + } + + /** + * Optional. Set this field true if you want Batch to install Ops Agent on + * your behalf. Default is false. + * + * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setInstallOpsAgent($var) + { + GPBUtil::checkBool($var); + $this->install_ops_agent = $var; + + return $this; + } + + /** + * Optional. Set this field to `true` if you want Batch to block + * project-level SSH keys from accessing this job's VMs. Alternatively, you + * can configure the job to specify a VM instance template that blocks + * project-level SSH keys. In either case, Batch blocks project-level SSH + * keys while creating the VMs for this job. + * Batch allows project-level SSH keys for a job's VMs only if all + * the following are true: + * + This field is undefined or set to `false`. + * + The job's VM instance template (if any) doesn't block project-level + * SSH keys. + * Notably, you can override this behavior by manually updating a VM to + * block or allow project-level SSH keys. For more information about + * blocking project-level SSH keys, see the Compute Engine documentation: + * https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys + * + * Generated from protobuf field bool block_project_ssh_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getBlockProjectSshKeys() + { + return $this->block_project_ssh_keys; + } + + /** + * Optional. Set this field to `true` if you want Batch to block + * project-level SSH keys from accessing this job's VMs. Alternatively, you + * can configure the job to specify a VM instance template that blocks + * project-level SSH keys. In either case, Batch blocks project-level SSH + * keys while creating the VMs for this job. + * Batch allows project-level SSH keys for a job's VMs only if all + * the following are true: + * + This field is undefined or set to `false`. + * + The job's VM instance template (if any) doesn't block project-level + * SSH keys. + * Notably, you can override this behavior by manually updating a VM to + * block or allow project-level SSH keys. For more information about + * blocking project-level SSH keys, see the Compute Engine documentation: + * https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys + * + * Generated from protobuf field bool block_project_ssh_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setBlockProjectSshKeys($var) + { + GPBUtil::checkBool($var); + $this->block_project_ssh_keys = $var; + + return $this; + } + + /** + * @return string + */ + public function getPolicyTemplate() + { + return $this->whichOneof("policy_template"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstancePolicyOrTemplate::class, \Google\Cloud\Batch\V1\AllocationPolicy_InstancePolicyOrTemplate::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php new file mode 100644 index 000000000000..cb5fbeb79a66 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php @@ -0,0 +1,112 @@ +google.cloud.batch.v1.AllocationPolicy.LocationPolicy + */ +class LocationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * A list of allowed location names represented by internal URLs. + * Each location can be a region or a zone. + * Only one region or multiple zones in one region is supported now. + * For example, + * ["regions/us-central1"] allow VMs in any zones in region us-central1. + * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + * in zones us-central1-a and us-central1-c. + * Mixing locations from different regions would cause errors. + * For example, + * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. + * + * Generated from protobuf field repeated string allowed_locations = 1; + */ + private $allowed_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_locations + * A list of allowed location names represented by internal URLs. + * Each location can be a region or a zone. + * Only one region or multiple zones in one region is supported now. + * For example, + * ["regions/us-central1"] allow VMs in any zones in region us-central1. + * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + * in zones us-central1-a and us-central1-c. + * Mixing locations from different regions would cause errors. + * For example, + * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * A list of allowed location names represented by internal URLs. + * Each location can be a region or a zone. + * Only one region or multiple zones in one region is supported now. + * For example, + * ["regions/us-central1"] allow VMs in any zones in region us-central1. + * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + * in zones us-central1-a and us-central1-c. + * Mixing locations from different regions would cause errors. + * For example, + * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. + * + * Generated from protobuf field repeated string allowed_locations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedLocations() + { + return $this->allowed_locations; + } + + /** + * A list of allowed location names represented by internal URLs. + * Each location can be a region or a zone. + * Only one region or multiple zones in one region is supported now. + * For example, + * ["regions/us-central1"] allow VMs in any zones in region us-central1. + * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + * in zones us-central1-a and us-central1-c. + * Mixing locations from different regions would cause errors. + * For example, + * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. + * + * Generated from protobuf field repeated string allowed_locations = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_locations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LocationPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_LocationPolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php new file mode 100644 index 000000000000..1c4b064ed7e0 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php @@ -0,0 +1,202 @@ +google.cloud.batch.v1.AllocationPolicy.NetworkInterface + */ +class NetworkInterface extends \Google\Protobuf\Internal\Message +{ + /** + * The URL of an existing network resource. + * You can specify the network as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + * * projects/{project}/global/networks/{network} + * * global/networks/{network} + * + * Generated from protobuf field string network = 1; + */ + protected $network = ''; + /** + * The URL of an existing subnetwork resource in the network. + * You can specify the subnetwork as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * regions/{region}/subnetworks/{subnetwork} + * + * Generated from protobuf field string subnetwork = 2; + */ + protected $subnetwork = ''; + /** + * Default is false (with an external IP address). Required if + * no external public IP address is attached to the VM. If no external + * public IP address, additional configuration is required to allow the VM + * to access Google Services. See + * https://cloud.google.com/vpc/docs/configure-private-google-access and + * https://cloud.google.com/nat/docs/gce-example#create-nat for more + * information. + * + * Generated from protobuf field bool no_external_ip_address = 3; + */ + protected $no_external_ip_address = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * The URL of an existing network resource. + * You can specify the network as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + * * projects/{project}/global/networks/{network} + * * global/networks/{network} + * @type string $subnetwork + * The URL of an existing subnetwork resource in the network. + * You can specify the subnetwork as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * regions/{region}/subnetworks/{subnetwork} + * @type bool $no_external_ip_address + * Default is false (with an external IP address). Required if + * no external public IP address is attached to the VM. If no external + * public IP address, additional configuration is required to allow the VM + * to access Google Services. See + * https://cloud.google.com/vpc/docs/configure-private-google-access and + * https://cloud.google.com/nat/docs/gce-example#create-nat for more + * information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The URL of an existing network resource. + * You can specify the network as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + * * projects/{project}/global/networks/{network} + * * global/networks/{network} + * + * Generated from protobuf field string network = 1; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The URL of an existing network resource. + * You can specify the network as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + * * projects/{project}/global/networks/{network} + * * global/networks/{network} + * + * Generated from protobuf field string network = 1; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The URL of an existing subnetwork resource in the network. + * You can specify the subnetwork as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * regions/{region}/subnetworks/{subnetwork} + * + * Generated from protobuf field string subnetwork = 2; + * @return string + */ + public function getSubnetwork() + { + return $this->subnetwork; + } + + /** + * The URL of an existing subnetwork resource in the network. + * You can specify the subnetwork as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * regions/{region}/subnetworks/{subnetwork} + * + * Generated from protobuf field string subnetwork = 2; + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + + /** + * Default is false (with an external IP address). Required if + * no external public IP address is attached to the VM. If no external + * public IP address, additional configuration is required to allow the VM + * to access Google Services. See + * https://cloud.google.com/vpc/docs/configure-private-google-access and + * https://cloud.google.com/nat/docs/gce-example#create-nat for more + * information. + * + * Generated from protobuf field bool no_external_ip_address = 3; + * @return bool + */ + public function getNoExternalIpAddress() + { + return $this->no_external_ip_address; + } + + /** + * Default is false (with an external IP address). Required if + * no external public IP address is attached to the VM. If no external + * public IP address, additional configuration is required to allow the VM + * to access Google Services. See + * https://cloud.google.com/vpc/docs/configure-private-google-access and + * https://cloud.google.com/nat/docs/gce-example#create-nat for more + * information. + * + * Generated from protobuf field bool no_external_ip_address = 3; + * @param bool $var + * @return $this + */ + public function setNoExternalIpAddress($var) + { + GPBUtil::checkBool($var); + $this->no_external_ip_address = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkInterface::class, \Google\Cloud\Batch\V1\AllocationPolicy_NetworkInterface::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php new file mode 100644 index 000000000000..f402f3e8e3d2 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php @@ -0,0 +1,70 @@ +google.cloud.batch.v1.AllocationPolicy.NetworkPolicy + */ +class NetworkPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Network configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; + */ + private $network_interfaces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * Network configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Network configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * Network configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; + * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface::class); + $this->network_interfaces = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_NetworkPolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php new file mode 100644 index 000000000000..2b9777719d46 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php @@ -0,0 +1,133 @@ +google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + */ +class PlacementPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + * want VMs to be located close to each other for low network latency + * between the VMs. No placement policy will be generated when collocation + * is UNSPECIFIED. + * + * Generated from protobuf field string collocation = 1; + */ + protected $collocation = ''; + /** + * When specified, causes the job to fail if more than max_distance logical + * switches are required between VMs. Batch uses the most compact possible + * placement of VMs even when max_distance is not specified. An explicit + * max_distance makes that level of compactness a strict requirement. + * Not yet implemented + * + * Generated from protobuf field int64 max_distance = 2; + */ + protected $max_distance = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $collocation + * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + * want VMs to be located close to each other for low network latency + * between the VMs. No placement policy will be generated when collocation + * is UNSPECIFIED. + * @type int|string $max_distance + * When specified, causes the job to fail if more than max_distance logical + * switches are required between VMs. Batch uses the most compact possible + * placement of VMs even when max_distance is not specified. An explicit + * max_distance makes that level of compactness a strict requirement. + * Not yet implemented + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + * want VMs to be located close to each other for low network latency + * between the VMs. No placement policy will be generated when collocation + * is UNSPECIFIED. + * + * Generated from protobuf field string collocation = 1; + * @return string + */ + public function getCollocation() + { + return $this->collocation; + } + + /** + * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + * want VMs to be located close to each other for low network latency + * between the VMs. No placement policy will be generated when collocation + * is UNSPECIFIED. + * + * Generated from protobuf field string collocation = 1; + * @param string $var + * @return $this + */ + public function setCollocation($var) + { + GPBUtil::checkString($var, True); + $this->collocation = $var; + + return $this; + } + + /** + * When specified, causes the job to fail if more than max_distance logical + * switches are required between VMs. Batch uses the most compact possible + * placement of VMs even when max_distance is not specified. An explicit + * max_distance makes that level of compactness a strict requirement. + * Not yet implemented + * + * Generated from protobuf field int64 max_distance = 2; + * @return int|string + */ + public function getMaxDistance() + { + return $this->max_distance; + } + + /** + * When specified, causes the job to fail if more than max_distance logical + * switches are required between VMs. Batch uses the most compact possible + * placement of VMs even when max_distance is not specified. An explicit + * max_distance makes that level of compactness a strict requirement. + * Not yet implemented + * + * Generated from protobuf field int64 max_distance = 2; + * @param int|string $var + * @return $this + */ + public function setMaxDistance($var) + { + GPBUtil::checkInt64($var); + $this->max_distance = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PlacementPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_PlacementPolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php new file mode 100644 index 000000000000..62a6191c61cb --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php @@ -0,0 +1,75 @@ +google.cloud.batch.v1.AllocationPolicy.ProvisioningModel + */ +class ProvisioningModel +{ + /** + * Unspecified. + * + * Generated from protobuf enum PROVISIONING_MODEL_UNSPECIFIED = 0; + */ + const PROVISIONING_MODEL_UNSPECIFIED = 0; + /** + * Standard VM. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * SPOT VM. + * + * Generated from protobuf enum SPOT = 2; + */ + const SPOT = 2; + /** + * Preemptible VM (PVM). + * Above SPOT VM is the preferable model for preemptible VM instances: the + * old preemptible VM model (indicated by this field) is the older model, + * and has been migrated to use the SPOT model as the underlying technology. + * This old model will still be supported. + * + * Generated from protobuf enum PREEMPTIBLE = 3; + */ + const PREEMPTIBLE = 3; + + private static $valueToName = [ + self::PROVISIONING_MODEL_UNSPECIFIED => 'PROVISIONING_MODEL_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::SPOT => 'SPOT', + self::PREEMPTIBLE => 'PREEMPTIBLE', + ]; + + 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(ProvisioningModel::class, \Google\Cloud\Batch\V1\AllocationPolicy_ProvisioningModel::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php new file mode 100644 index 000000000000..71cfcd4d50f6 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php @@ -0,0 +1,248 @@ +google.cloud.batch.v1.ComputeResource + */ +class ComputeResource extends \Google\Protobuf\Internal\Message +{ + /** + * The milliCPU count. + * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + * For example, `1000` corresponds to 1 vCPU per task. If undefined, the + * default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the CPU resources for both fields are compatible with each + * other and with how many tasks you want to allow to run on the same VM at + * the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 2 + * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + * you are recommended to run two tasks on the same VM if you set `cpuMilli` + * to `1000` or less. + * + * Generated from protobuf field int64 cpu_milli = 1; + */ + protected $cpu_milli = 0; + /** + * Memory in MiB. + * `memoryMib` defines the amount of memory per task in MiB units. + * If undefined, the default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the memory resources for both fields are compatible with + * each other and with how many tasks you want to allow to run on the same VM + * at the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 8 + * GiB each, you are recommended to set `memoryMib` to no more than `8192`, + * or you are recommended to run two tasks on the same VM if you set + * `memoryMib` to `4096` or less. + * + * Generated from protobuf field int64 memory_mib = 2; + */ + protected $memory_mib = 0; + /** + * Extra boot disk size in MiB for each task. + * + * Generated from protobuf field int64 boot_disk_mib = 4; + */ + protected $boot_disk_mib = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $cpu_milli + * The milliCPU count. + * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + * For example, `1000` corresponds to 1 vCPU per task. If undefined, the + * default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the CPU resources for both fields are compatible with each + * other and with how many tasks you want to allow to run on the same VM at + * the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 2 + * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + * you are recommended to run two tasks on the same VM if you set `cpuMilli` + * to `1000` or less. + * @type int|string $memory_mib + * Memory in MiB. + * `memoryMib` defines the amount of memory per task in MiB units. + * If undefined, the default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the memory resources for both fields are compatible with + * each other and with how many tasks you want to allow to run on the same VM + * at the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 8 + * GiB each, you are recommended to set `memoryMib` to no more than `8192`, + * or you are recommended to run two tasks on the same VM if you set + * `memoryMib` to `4096` or less. + * @type int|string $boot_disk_mib + * Extra boot disk size in MiB for each task. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * The milliCPU count. + * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + * For example, `1000` corresponds to 1 vCPU per task. If undefined, the + * default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the CPU resources for both fields are compatible with each + * other and with how many tasks you want to allow to run on the same VM at + * the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 2 + * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + * you are recommended to run two tasks on the same VM if you set `cpuMilli` + * to `1000` or less. + * + * Generated from protobuf field int64 cpu_milli = 1; + * @return int|string + */ + public function getCpuMilli() + { + return $this->cpu_milli; + } + + /** + * The milliCPU count. + * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + * For example, `1000` corresponds to 1 vCPU per task. If undefined, the + * default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the CPU resources for both fields are compatible with each + * other and with how many tasks you want to allow to run on the same VM at + * the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 2 + * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + * you are recommended to run two tasks on the same VM if you set `cpuMilli` + * to `1000` or less. + * + * Generated from protobuf field int64 cpu_milli = 1; + * @param int|string $var + * @return $this + */ + public function setCpuMilli($var) + { + GPBUtil::checkInt64($var); + $this->cpu_milli = $var; + + return $this; + } + + /** + * Memory in MiB. + * `memoryMib` defines the amount of memory per task in MiB units. + * If undefined, the default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the memory resources for both fields are compatible with + * each other and with how many tasks you want to allow to run on the same VM + * at the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 8 + * GiB each, you are recommended to set `memoryMib` to no more than `8192`, + * or you are recommended to run two tasks on the same VM if you set + * `memoryMib` to `4096` or less. + * + * Generated from protobuf field int64 memory_mib = 2; + * @return int|string + */ + public function getMemoryMib() + { + return $this->memory_mib; + } + + /** + * Memory in MiB. + * `memoryMib` defines the amount of memory per task in MiB units. + * If undefined, the default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the memory resources for both fields are compatible with + * each other and with how many tasks you want to allow to run on the same VM + * at the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 8 + * GiB each, you are recommended to set `memoryMib` to no more than `8192`, + * or you are recommended to run two tasks on the same VM if you set + * `memoryMib` to `4096` or less. + * + * Generated from protobuf field int64 memory_mib = 2; + * @param int|string $var + * @return $this + */ + public function setMemoryMib($var) + { + GPBUtil::checkInt64($var); + $this->memory_mib = $var; + + return $this; + } + + /** + * Extra boot disk size in MiB for each task. + * + * Generated from protobuf field int64 boot_disk_mib = 4; + * @return int|string + */ + public function getBootDiskMib() + { + return $this->boot_disk_mib; + } + + /** + * Extra boot disk size in MiB for each task. + * + * Generated from protobuf field int64 boot_disk_mib = 4; + * @param int|string $var + * @return $this + */ + public function setBootDiskMib($var) + { + GPBUtil::checkInt64($var); + $this->boot_disk_mib = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php new file mode 100644 index 000000000000..fdec8fae5402 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php @@ -0,0 +1,278 @@ +google.cloud.batch.v1.CreateJobRequest + */ +class CreateJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * + * Generated from protobuf field string job_id = 2; + */ + protected $job_id = ''; + /** + * Required. The Job to create. + * + * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * Please see {@see BatchServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Batch\V1\Job $job Required. The Job to create. + * @param string $jobId ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * + * @return \Google\Cloud\Batch\V1\CreateJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Batch\V1\Job $job, string $jobId): self + { + return (new self()) + ->setParent($parent) + ->setJob($job) + ->setJobId($jobId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * @type string $job_id + * ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * @type \Google\Cloud\Batch\V1\Job $job + * Required. The Job to create. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * + * 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; + } + + /** + * ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * + * Generated from protobuf field string job_id = 2; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * + * 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; + } + + /** + * Required. The Job to create. + * + * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Batch\V1\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Required. The Job to create. + * + * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Batch\V1\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Job::class); + $this->job = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php new file mode 100644 index 000000000000..0acc2dfbbac6 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php @@ -0,0 +1,188 @@ +google.cloud.batch.v1.DeleteJobRequest + */ +class DeleteJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Job name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. Reason for this deletion. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reason = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Job name. + * + * @return \Google\Cloud\Batch\V1\DeleteJobRequest + * + * @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 + * Job name. + * @type string $reason + * Optional. Reason for this deletion. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Job name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Job name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Reason for this deletion. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Optional. Reason for this deletion. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php new file mode 100644 index 000000000000..058a8d4ccc90 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php @@ -0,0 +1,158 @@ +google.cloud.batch.v1.Environment + */ +class Environment extends \Google\Protobuf\Internal\Message +{ + /** + * A map of environment variable names to values. + * + * Generated from protobuf field map variables = 1; + */ + private $variables; + /** + * A map of environment variable names to Secret Manager secret names. + * The VM will access the named secrets to set the value of each environment + * variable. + * + * Generated from protobuf field map secret_variables = 2; + */ + private $secret_variables; + /** + * An encrypted JSON dictionary where the key/value pairs correspond to + * environment variable names and their values. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; + */ + protected $encrypted_variables = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $variables + * A map of environment variable names to values. + * @type array|\Google\Protobuf\Internal\MapField $secret_variables + * A map of environment variable names to Secret Manager secret names. + * The VM will access the named secrets to set the value of each environment + * variable. + * @type \Google\Cloud\Batch\V1\Environment\KMSEnvMap $encrypted_variables + * An encrypted JSON dictionary where the key/value pairs correspond to + * environment variable names and their values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * A map of environment variable names to values. + * + * Generated from protobuf field map variables = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getVariables() + { + return $this->variables; + } + + /** + * A map of environment variable names to values. + * + * Generated from protobuf field map variables = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->variables = $arr; + + return $this; + } + + /** + * A map of environment variable names to Secret Manager secret names. + * The VM will access the named secrets to set the value of each environment + * variable. + * + * Generated from protobuf field map secret_variables = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSecretVariables() + { + return $this->secret_variables; + } + + /** + * A map of environment variable names to Secret Manager secret names. + * The VM will access the named secrets to set the value of each environment + * variable. + * + * Generated from protobuf field map secret_variables = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSecretVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->secret_variables = $arr; + + return $this; + } + + /** + * An encrypted JSON dictionary where the key/value pairs correspond to + * environment variable names and their values. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; + * @return \Google\Cloud\Batch\V1\Environment\KMSEnvMap|null + */ + public function getEncryptedVariables() + { + return $this->encrypted_variables; + } + + public function hasEncryptedVariables() + { + return isset($this->encrypted_variables); + } + + public function clearEncryptedVariables() + { + unset($this->encrypted_variables); + } + + /** + * An encrypted JSON dictionary where the key/value pairs correspond to + * environment variable names and their values. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; + * @param \Google\Cloud\Batch\V1\Environment\KMSEnvMap $var + * @return $this + */ + public function setEncryptedVariables($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment\KMSEnvMap::class); + $this->encrypted_variables = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php new file mode 100644 index 000000000000..91b995831e11 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php @@ -0,0 +1,102 @@ +google.cloud.batch.v1.Environment.KMSEnvMap + */ +class KMSEnvMap extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the KMS key that will be used to decrypt the cipher text. + * + * Generated from protobuf field string key_name = 1; + */ + protected $key_name = ''; + /** + * The value of the cipherText response from the `encrypt` method. + * + * Generated from protobuf field string cipher_text = 2; + */ + protected $cipher_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_name + * The name of the KMS key that will be used to decrypt the cipher text. + * @type string $cipher_text + * The value of the cipherText response from the `encrypt` method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * The name of the KMS key that will be used to decrypt the cipher text. + * + * Generated from protobuf field string key_name = 1; + * @return string + */ + public function getKeyName() + { + return $this->key_name; + } + + /** + * The name of the KMS key that will be used to decrypt the cipher text. + * + * Generated from protobuf field string key_name = 1; + * @param string $var + * @return $this + */ + public function setKeyName($var) + { + GPBUtil::checkString($var, True); + $this->key_name = $var; + + return $this; + } + + /** + * The value of the cipherText response from the `encrypt` method. + * + * Generated from protobuf field string cipher_text = 2; + * @return string + */ + public function getCipherText() + { + return $this->cipher_text; + } + + /** + * The value of the cipherText response from the `encrypt` method. + * + * Generated from protobuf field string cipher_text = 2; + * @param string $var + * @return $this + */ + public function setCipherText($var) + { + GPBUtil::checkString($var, True); + $this->cipher_text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KMSEnvMap::class, \Google\Cloud\Batch\V1\Environment_KMSEnvMap::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php new file mode 100644 index 000000000000..af7bffd938ba --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php @@ -0,0 +1,71 @@ +google.cloud.batch.v1.GCS + */ +class GCS extends \Google\Protobuf\Internal\Message +{ + /** + * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + * bucket_name, bucket_name/subdirectory/ + * + * Generated from protobuf field string remote_path = 1; + */ + protected $remote_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $remote_path + * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + * bucket_name, bucket_name/subdirectory/ + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + * bucket_name, bucket_name/subdirectory/ + * + * Generated from protobuf field string remote_path = 1; + * @return string + */ + public function getRemotePath() + { + return $this->remote_path; + } + + /** + * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + * bucket_name, bucket_name/subdirectory/ + * + * Generated from protobuf field string remote_path = 1; + * @param string $var + * @return $this + */ + public function setRemotePath($var) + { + GPBUtil::checkString($var, True); + $this->remote_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php new file mode 100644 index 000000000000..ae27090d4139 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.batch.v1.GetJobRequest + */ +class GetJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Job name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Job name. Please see + * {@see BatchServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Batch\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. Job name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Required. Job name. + * + * 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. Job name. + * + * 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php new file mode 100644 index 000000000000..6271a4460bce --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php @@ -0,0 +1,81 @@ +google.cloud.batch.v1.GetTaskRequest + */ +class GetTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Task name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Task name. Please see + * {@see BatchServiceClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Batch\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. Task name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Required. Task name. + * + * 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. Task name. + * + * 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php new file mode 100644 index 000000000000..6c7254f33660 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php @@ -0,0 +1,513 @@ +google.cloud.batch.v1.Job + */ +class Job extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Job name. + * For example: "projects/123456/locations/us-central1/jobs/job01". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. A system generated unique ID for the Job. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Priority of the Job. + * The valid value range is [0, 100). Default value is 0. + * Higher value indicates higher priority. + * A job with higher priority value is more likely to run earlier if all other + * requirements are satisfied. + * + * Generated from protobuf field int64 priority = 3; + */ + protected $priority = 0; + /** + * Required. TaskGroups in the Job. Only one TaskGroup is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $task_groups; + /** + * Compute resource allocation for all TaskGroups in the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; + */ + protected $allocation_policy = null; + /** + * Labels for the Job. Labels could be user provided or system generated. + * For example, + * "labels": { + * "department": "finance", + * "environment": "test" + * } + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 8; + */ + private $labels; + /** + * Output only. Job status. It is read only for users. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * Output only. When the Job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last time the Job was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Log preservation policy for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; + */ + protected $logs_policy = null; + /** + * Notification configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; + */ + private $notifications; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Job name. + * For example: "projects/123456/locations/us-central1/jobs/job01". + * @type string $uid + * Output only. A system generated unique ID for the Job. + * @type int|string $priority + * Priority of the Job. + * The valid value range is [0, 100). Default value is 0. + * Higher value indicates higher priority. + * A job with higher priority value is more likely to run earlier if all other + * requirements are satisfied. + * @type array<\Google\Cloud\Batch\V1\TaskGroup>|\Google\Protobuf\Internal\RepeatedField $task_groups + * Required. TaskGroups in the Job. Only one TaskGroup is supported now. + * @type \Google\Cloud\Batch\V1\AllocationPolicy $allocation_policy + * Compute resource allocation for all TaskGroups in the Job. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels for the Job. Labels could be user provided or system generated. + * For example, + * "labels": { + * "department": "finance", + * "environment": "test" + * } + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * @type \Google\Cloud\Batch\V1\JobStatus $status + * Output only. Job status. It is read only for users. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the Job was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time the Job was updated. + * @type \Google\Cloud\Batch\V1\LogsPolicy $logs_policy + * Log preservation policy for the Job. + * @type array<\Google\Cloud\Batch\V1\JobNotification>|\Google\Protobuf\Internal\RepeatedField $notifications + * Notification configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Job name. + * For example: "projects/123456/locations/us-central1/jobs/job01". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Job name. + * For example: "projects/123456/locations/us-central1/jobs/job01". + * + * 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. A system generated 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. A system generated 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; + } + + /** + * Priority of the Job. + * The valid value range is [0, 100). Default value is 0. + * Higher value indicates higher priority. + * A job with higher priority value is more likely to run earlier if all other + * requirements are satisfied. + * + * Generated from protobuf field int64 priority = 3; + * @return int|string + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Priority of the Job. + * The valid value range is [0, 100). Default value is 0. + * Higher value indicates higher priority. + * A job with higher priority value is more likely to run earlier if all other + * requirements are satisfied. + * + * Generated from protobuf field int64 priority = 3; + * @param int|string $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt64($var); + $this->priority = $var; + + return $this; + } + + /** + * Required. TaskGroups in the Job. Only one TaskGroup is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaskGroups() + { + return $this->task_groups; + } + + /** + * Required. TaskGroups in the Job. Only one TaskGroup is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Batch\V1\TaskGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaskGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\TaskGroup::class); + $this->task_groups = $arr; + + return $this; + } + + /** + * Compute resource allocation for all TaskGroups in the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; + * @return \Google\Cloud\Batch\V1\AllocationPolicy|null + */ + public function getAllocationPolicy() + { + return $this->allocation_policy; + } + + public function hasAllocationPolicy() + { + return isset($this->allocation_policy); + } + + public function clearAllocationPolicy() + { + unset($this->allocation_policy); + } + + /** + * Compute resource allocation for all TaskGroups in the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; + * @param \Google\Cloud\Batch\V1\AllocationPolicy $var + * @return $this + */ + public function setAllocationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy::class); + $this->allocation_policy = $var; + + return $this; + } + + /** + * Labels for the Job. Labels could be user provided or system generated. + * For example, + * "labels": { + * "department": "finance", + * "environment": "test" + * } + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels for the Job. Labels could be user provided or system generated. + * For example, + * "labels": { + * "department": "finance", + * "environment": "test" + * } + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 8; + * @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 status. It is read only for users. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Batch\V1\JobStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. Job status. It is read only for users. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Batch\V1\JobStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\JobStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. When the Job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. When the Job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 last time the Job was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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 last time the Job was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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; + } + + /** + * Log preservation policy for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; + * @return \Google\Cloud\Batch\V1\LogsPolicy|null + */ + public function getLogsPolicy() + { + return $this->logs_policy; + } + + public function hasLogsPolicy() + { + return isset($this->logs_policy); + } + + public function clearLogsPolicy() + { + unset($this->logs_policy); + } + + /** + * Log preservation policy for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; + * @param \Google\Cloud\Batch\V1\LogsPolicy $var + * @return $this + */ + public function setLogsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LogsPolicy::class); + $this->logs_policy = $var; + + return $this; + } + + /** + * Notification configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotifications() + { + return $this->notifications; + } + + /** + * Notification configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; + * @param array<\Google\Cloud\Batch\V1\JobNotification>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobNotification::class); + $this->notifications = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php new file mode 100644 index 000000000000..a84bc5653ad3 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php @@ -0,0 +1,155 @@ +google.cloud.batch.v1.JobNotification + */ +class JobNotification extends \Google\Protobuf\Internal\Message +{ + /** + * The Pub/Sub topic where notifications for the job, like state + * changes, will be published. If undefined, no Pub/Sub notifications + * are sent for this job. + * Specify the topic using the following format: + * `projects/{project}/topics/{topic}`. + * Notably, if you want to specify a Pub/Sub topic that is in a + * different project than the job, your administrator must grant your + * project's Batch service agent permission to publish to that topic. + * For more information about configuring Pub/Sub notifications for + * a job, see + * https://cloud.google.com/batch/docs/enable-notifications. + * + * Generated from protobuf field string pubsub_topic = 1; + */ + protected $pubsub_topic = ''; + /** + * The attribute requirements of messages to be sent to this Pub/Sub topic. + * Without this field, no message will be sent. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; + */ + protected $message = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pubsub_topic + * The Pub/Sub topic where notifications for the job, like state + * changes, will be published. If undefined, no Pub/Sub notifications + * are sent for this job. + * Specify the topic using the following format: + * `projects/{project}/topics/{topic}`. + * Notably, if you want to specify a Pub/Sub topic that is in a + * different project than the job, your administrator must grant your + * project's Batch service agent permission to publish to that topic. + * For more information about configuring Pub/Sub notifications for + * a job, see + * https://cloud.google.com/batch/docs/enable-notifications. + * @type \Google\Cloud\Batch\V1\JobNotification\Message $message + * The attribute requirements of messages to be sent to this Pub/Sub topic. + * Without this field, no message will be sent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The Pub/Sub topic where notifications for the job, like state + * changes, will be published. If undefined, no Pub/Sub notifications + * are sent for this job. + * Specify the topic using the following format: + * `projects/{project}/topics/{topic}`. + * Notably, if you want to specify a Pub/Sub topic that is in a + * different project than the job, your administrator must grant your + * project's Batch service agent permission to publish to that topic. + * For more information about configuring Pub/Sub notifications for + * a job, see + * https://cloud.google.com/batch/docs/enable-notifications. + * + * Generated from protobuf field string pubsub_topic = 1; + * @return string + */ + public function getPubsubTopic() + { + return $this->pubsub_topic; + } + + /** + * The Pub/Sub topic where notifications for the job, like state + * changes, will be published. If undefined, no Pub/Sub notifications + * are sent for this job. + * Specify the topic using the following format: + * `projects/{project}/topics/{topic}`. + * Notably, if you want to specify a Pub/Sub topic that is in a + * different project than the job, your administrator must grant your + * project's Batch service agent permission to publish to that topic. + * For more information about configuring Pub/Sub notifications for + * a job, see + * https://cloud.google.com/batch/docs/enable-notifications. + * + * Generated from protobuf field string pubsub_topic = 1; + * @param string $var + * @return $this + */ + public function setPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic = $var; + + return $this; + } + + /** + * The attribute requirements of messages to be sent to this Pub/Sub topic. + * Without this field, no message will be sent. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; + * @return \Google\Cloud\Batch\V1\JobNotification\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * The attribute requirements of messages to be sent to this Pub/Sub topic. + * Without this field, no message will be sent. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; + * @param \Google\Cloud\Batch\V1\JobNotification\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\JobNotification\Message::class); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php new file mode 100644 index 000000000000..2dc572817132 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php @@ -0,0 +1,144 @@ +google.cloud.batch.v1.JobNotification.Message + */ +class Message extends \Google\Protobuf\Internal\Message +{ + /** + * The message type. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; + */ + protected $type = 0; + /** + * The new job state. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; + */ + protected $new_job_state = 0; + /** + * The new task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; + */ + protected $new_task_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The message type. + * @type int $new_job_state + * The new job state. + * @type int $new_task_state + * The new task state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The message type. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The message type. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobNotification\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The new job state. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; + * @return int + */ + public function getNewJobState() + { + return $this->new_job_state; + } + + /** + * The new job state. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; + * @param int $var + * @return $this + */ + public function setNewJobState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobStatus\State::class); + $this->new_job_state = $var; + + return $this; + } + + /** + * The new task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; + * @return int + */ + public function getNewTaskState() + { + return $this->new_task_state; + } + + /** + * The new task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; + * @param int $var + * @return $this + */ + public function setNewTaskState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); + $this->new_task_state = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Message::class, \Google\Cloud\Batch\V1\JobNotification_Message::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php new file mode 100644 index 000000000000..28ccf868f4c0 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php @@ -0,0 +1,64 @@ +google.cloud.batch.v1.JobNotification.Type + */ +class Type +{ + /** + * Unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Notify users that the job state has changed. + * + * Generated from protobuf enum JOB_STATE_CHANGED = 1; + */ + const JOB_STATE_CHANGED = 1; + /** + * Notify users that the task state has changed. + * + * Generated from protobuf enum TASK_STATE_CHANGED = 2; + */ + const TASK_STATE_CHANGED = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::JOB_STATE_CHANGED => 'JOB_STATE_CHANGED', + self::TASK_STATE_CHANGED => 'TASK_STATE_CHANGED', + ]; + + 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\Batch\V1\JobNotification_Type::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php new file mode 100644 index 000000000000..44e61d9713b6 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php @@ -0,0 +1,183 @@ +google.cloud.batch.v1.JobStatus + */ +class JobStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Job state + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; + */ + protected $state = 0; + /** + * Job status events + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + */ + private $status_events; + /** + * Aggregated task status for each TaskGroup in the Job. + * The map key is TaskGroup ID. + * + * Generated from protobuf field map task_groups = 4; + */ + private $task_groups; + /** + * The duration of time that the Job spent in status RUNNING. + * + * Generated from protobuf field .google.protobuf.Duration run_duration = 5; + */ + protected $run_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Job state + * @type array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $status_events + * Job status events + * @type array|\Google\Protobuf\Internal\MapField $task_groups + * Aggregated task status for each TaskGroup in the Job. + * The map key is TaskGroup ID. + * @type \Google\Protobuf\Duration $run_duration + * The duration of time that the Job spent in status RUNNING. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Job state + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Job state + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Job status events + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatusEvents() + { + return $this->status_events; + } + + /** + * Job status events + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + * @param array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatusEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\StatusEvent::class); + $this->status_events = $arr; + + return $this; + } + + /** + * Aggregated task status for each TaskGroup in the Job. + * The map key is TaskGroup ID. + * + * Generated from protobuf field map task_groups = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTaskGroups() + { + return $this->task_groups; + } + + /** + * Aggregated task status for each TaskGroup in the Job. + * The map key is TaskGroup ID. + * + * Generated from protobuf field map task_groups = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTaskGroups($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobStatus\TaskGroupStatus::class); + $this->task_groups = $arr; + + return $this; + } + + /** + * The duration of time that the Job spent in status RUNNING. + * + * Generated from protobuf field .google.protobuf.Duration run_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getRunDuration() + { + return $this->run_duration; + } + + public function hasRunDuration() + { + return isset($this->run_duration); + } + + public function clearRunDuration() + { + unset($this->run_duration); + } + + /** + * The duration of time that the Job spent in status RUNNING. + * + * Generated from protobuf field .google.protobuf.Duration run_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRunDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->run_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php new file mode 100644 index 000000000000..4073a44ab3bc --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php @@ -0,0 +1,182 @@ +google.cloud.batch.v1.JobStatus.InstanceStatus + */ +class InstanceStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 1; + */ + protected $machine_type = ''; + /** + * The VM instance provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; + */ + protected $provisioning_model = 0; + /** + * The max number of tasks can be assigned to this instance type. + * + * Generated from protobuf field int64 task_pack = 3; + */ + protected $task_pack = 0; + /** + * The VM boot disk. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; + */ + protected $boot_disk = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type + * The Compute Engine machine type. + * @type int $provisioning_model + * The VM instance provisioning model. + * @type int|string $task_pack + * The max number of tasks can be assigned to this instance type. + * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $boot_disk + * The VM boot disk. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 1; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 1; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * The VM instance provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; + * @return int + */ + public function getProvisioningModel() + { + return $this->provisioning_model; + } + + /** + * The VM instance provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; + * @param int $var + * @return $this + */ + public function setProvisioningModel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\AllocationPolicy\ProvisioningModel::class); + $this->provisioning_model = $var; + + return $this; + } + + /** + * The max number of tasks can be assigned to this instance type. + * + * Generated from protobuf field int64 task_pack = 3; + * @return int|string + */ + public function getTaskPack() + { + return $this->task_pack; + } + + /** + * The max number of tasks can be assigned to this instance type. + * + * Generated from protobuf field int64 task_pack = 3; + * @param int|string $var + * @return $this + */ + public function setTaskPack($var) + { + GPBUtil::checkInt64($var); + $this->task_pack = $var; + + return $this; + } + + /** + * The VM boot disk. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null + */ + public function getBootDisk() + { + return $this->boot_disk; + } + + public function hasBootDisk() + { + return isset($this->boot_disk); + } + + public function clearBootDisk() + { + unset($this->boot_disk); + } + + /** + * The VM boot disk. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var + * @return $this + */ + public function setBootDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); + $this->boot_disk = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstanceStatus::class, \Google\Cloud\Batch\V1\JobStatus_InstanceStatus::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php new file mode 100644 index 000000000000..88b1b714c63f --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php @@ -0,0 +1,96 @@ +google.cloud.batch.v1.JobStatus.State + */ +class State +{ + /** + * Job state unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Job is admitted (validated and persisted) and waiting for resources. + * + * Generated from protobuf enum QUEUED = 1; + */ + const QUEUED = 1; + /** + * Job is scheduled to run as soon as resource allocation is ready. + * The resource allocation may happen at a later time but with a high + * chance to succeed. + * + * Generated from protobuf enum SCHEDULED = 2; + */ + const SCHEDULED = 2; + /** + * Resource allocation has been successful. At least one Task in the Job is + * RUNNING. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * All Tasks in the Job have finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * At least one Task in the Job has failed. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * The Job will be deleted, but has not been deleted yet. Typically this is + * because resources used by the Job are still being cleaned up. + * + * Generated from protobuf enum DELETION_IN_PROGRESS = 6; + */ + const DELETION_IN_PROGRESS = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::QUEUED => 'QUEUED', + self::SCHEDULED => 'SCHEDULED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::DELETION_IN_PROGRESS => 'DELETION_IN_PROGRESS', + ]; + + 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\Batch\V1\JobStatus_State::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php new file mode 100644 index 000000000000..54e870456e18 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php @@ -0,0 +1,108 @@ +google.cloud.batch.v1.JobStatus.TaskGroupStatus + */ +class TaskGroupStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Count of task in each state in the TaskGroup. + * The map key is task state name. + * + * Generated from protobuf field map counts = 1; + */ + private $counts; + /** + * Status of instances allocated for the TaskGroup. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $counts + * Count of task in each state in the TaskGroup. + * The map key is task state name. + * @type array<\Google\Cloud\Batch\V1\JobStatus\InstanceStatus>|\Google\Protobuf\Internal\RepeatedField $instances + * Status of instances allocated for the TaskGroup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Count of task in each state in the TaskGroup. + * The map key is task state name. + * + * Generated from protobuf field map counts = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCounts() + { + return $this->counts; + } + + /** + * Count of task in each state in the TaskGroup. + * The map key is task state name. + * + * Generated from protobuf field map counts = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCounts($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); + $this->counts = $arr; + + return $this; + } + + /** + * Status of instances allocated for the TaskGroup. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Status of instances allocated for the TaskGroup. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; + * @param array<\Google\Cloud\Batch\V1\JobStatus\InstanceStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobStatus\InstanceStatus::class); + $this->instances = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TaskGroupStatus::class, \Google\Cloud\Batch\V1\JobStatus_TaskGroupStatus::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php new file mode 100644 index 000000000000..50bf332faf2d --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php @@ -0,0 +1,128 @@ +google.cloud.batch.v1.LifecyclePolicy + */ +class LifecyclePolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Action to execute when ActionCondition is true. + * When RETRY_TASK is specified, we will retry failed tasks + * if we notice any exit code match and fail tasks if no match is found. + * Likewise, when FAIL_TASK is specified, we will fail tasks + * if we notice any exit code match and retry tasks if no match is found. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; + */ + protected $action = 0; + /** + * Conditions that decide why a task failure is dealt with a specific action. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; + */ + protected $action_condition = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $action + * Action to execute when ActionCondition is true. + * When RETRY_TASK is specified, we will retry failed tasks + * if we notice any exit code match and fail tasks if no match is found. + * Likewise, when FAIL_TASK is specified, we will fail tasks + * if we notice any exit code match and retry tasks if no match is found. + * @type \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $action_condition + * Conditions that decide why a task failure is dealt with a specific action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Action to execute when ActionCondition is true. + * When RETRY_TASK is specified, we will retry failed tasks + * if we notice any exit code match and fail tasks if no match is found. + * Likewise, when FAIL_TASK is specified, we will fail tasks + * if we notice any exit code match and retry tasks if no match is found. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Action to execute when ActionCondition is true. + * When RETRY_TASK is specified, we will retry failed tasks + * if we notice any exit code match and fail tasks if no match is found. + * Likewise, when FAIL_TASK is specified, we will fail tasks + * if we notice any exit code match and retry tasks if no match is found. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LifecyclePolicy\Action::class); + $this->action = $var; + + return $this; + } + + /** + * Conditions that decide why a task failure is dealt with a specific action. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; + * @return \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition|null + */ + public function getActionCondition() + { + return $this->action_condition; + } + + public function hasActionCondition() + { + return isset($this->action_condition); + } + + public function clearActionCondition() + { + unset($this->action_condition); + } + + /** + * Conditions that decide why a task failure is dealt with a specific action. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; + * @param \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $var + * @return $this + */ + public function setActionCondition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition::class); + $this->action_condition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php new file mode 100644 index 000000000000..08419071bb67 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php @@ -0,0 +1,64 @@ +google.cloud.batch.v1.LifecyclePolicy.Action + */ +class Action +{ + /** + * Action unspecified. + * + * Generated from protobuf enum ACTION_UNSPECIFIED = 0; + */ + const ACTION_UNSPECIFIED = 0; + /** + * Action that tasks in the group will be scheduled to re-execute. + * + * Generated from protobuf enum RETRY_TASK = 1; + */ + const RETRY_TASK = 1; + /** + * Action that tasks in the group will be stopped immediately. + * + * Generated from protobuf enum FAIL_TASK = 2; + */ + const FAIL_TASK = 2; + + private static $valueToName = [ + self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', + self::RETRY_TASK => 'RETRY_TASK', + self::FAIL_TASK => 'FAIL_TASK', + ]; + + 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(Action::class, \Google\Cloud\Batch\V1\LifecyclePolicy_Action::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php new file mode 100644 index 000000000000..acffa97a9300 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php @@ -0,0 +1,82 @@ +google.cloud.batch.v1.LifecyclePolicy.ActionCondition + */ +class ActionCondition extends \Google\Protobuf\Internal\Message +{ + /** + * Exit codes of a task execution. + * If there are more than 1 exit codes, + * when task executes with any of the exit code in the list, + * the condition is met and the action will be executed. + * + * Generated from protobuf field repeated int32 exit_codes = 1; + */ + private $exit_codes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $exit_codes + * Exit codes of a task execution. + * If there are more than 1 exit codes, + * when task executes with any of the exit code in the list, + * the condition is met and the action will be executed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Exit codes of a task execution. + * If there are more than 1 exit codes, + * when task executes with any of the exit code in the list, + * the condition is met and the action will be executed. + * + * Generated from protobuf field repeated int32 exit_codes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExitCodes() + { + return $this->exit_codes; + } + + /** + * Exit codes of a task execution. + * If there are more than 1 exit codes, + * when task executes with any of the exit code in the list, + * the condition is met and the action will be executed. + * + * Generated from protobuf field repeated int32 exit_codes = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExitCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->exit_codes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ActionCondition::class, \Google\Cloud\Batch\V1\LifecyclePolicy_ActionCondition::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php new file mode 100644 index 000000000000..172ee92ea293 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php @@ -0,0 +1,220 @@ +google.cloud.batch.v1.ListJobsRequest + */ +class ListJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Parent path. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Optional. Sort results. Supported are "name", "name desc", "create_time", + * and "create_time desc". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Parent path. + * + * @return \Google\Cloud\Batch\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 + * Parent path. + * @type string $filter + * List filter. + * @type string $order_by + * Optional. Sort results. Supported are "name", "name desc", "create_time", + * and "create_time desc". + * @type int $page_size + * Page size. + * @type string $page_token + * Page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Parent path. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Parent path. + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort results. Supported are "name", "name desc", "create_time", + * and "create_time desc". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort results. Supported are "name", "name desc", "create_time", + * and "create_time desc". + * + * 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; + } + + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php new file mode 100644 index 000000000000..9874dbeed530 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php @@ -0,0 +1,135 @@ +google.cloud.batch.v1.ListJobsResponse + */ +class ListJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Jobs. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; + */ + private $jobs; + /** + * Next page token. + * + * 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\Batch\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * Jobs. + * @type string $next_page_token + * Next page token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Jobs. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * Jobs. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; + * @param array<\Google\Cloud\Batch\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Job::class); + $this->jobs = $arr; + + return $this; + } + + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Next page token. + * + * 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php new file mode 100644 index 000000000000..bd42658dcae9 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php @@ -0,0 +1,201 @@ +google.cloud.batch.v1.ListTasksRequest + */ +class ListTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Task filter, null filter matches all Tasks. + * Filter string should be of the format State=TaskStatus.State e.g. + * State=RUNNING + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Page token. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * Please see {@see BatchServiceClient::taskGroupName()} for help formatting this field. + * + * @return \Google\Cloud\Batch\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. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * @type string $filter + * Task filter, null filter matches all Tasks. + * Filter string should be of the format State=TaskStatus.State e.g. + * State=RUNNING + * @type int $page_size + * Page size. + * @type string $page_token + * Page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * + * 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; + } + + /** + * Task filter, null filter matches all Tasks. + * Filter string should be of the format State=TaskStatus.State e.g. + * State=RUNNING + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Task filter, null filter matches all Tasks. + * Filter string should be of the format State=TaskStatus.State e.g. + * State=RUNNING + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token. + * + * Generated from protobuf field string page_token = 4; + * @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/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php new file mode 100644 index 000000000000..7209c2e30a9f --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php @@ -0,0 +1,135 @@ +google.cloud.batch.v1.ListTasksResponse + */ +class ListTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Tasks. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; + */ + private $tasks; + /** + * Next page token. + * + * 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\Batch\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * Tasks. + * @type string $next_page_token + * Next page token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Tasks. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * Tasks. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; + * @param array<\Google\Cloud\Batch\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Task::class); + $this->tasks = $arr; + + return $this; + } + + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Next page token. + * + * 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php new file mode 100644 index 000000000000..3815935a8403 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php @@ -0,0 +1,158 @@ +google.cloud.batch.v1.LogsPolicy + */ +class LogsPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Where logs should be saved. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; + */ + protected $destination = 0; + /** + * The path to which logs are saved when the destination = PATH. This can be a + * local file path on the VM, or under the mount point of a Persistent Disk or + * Filestore, or a Cloud Storage path. + * + * Generated from protobuf field string logs_path = 2; + */ + protected $logs_path = ''; + /** + * Optional. Additional settings for Cloud Logging. It will only take effect + * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cloud_logging_option = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $destination + * Where logs should be saved. + * @type string $logs_path + * The path to which logs are saved when the destination = PATH. This can be a + * local file path on the VM, or under the mount point of a Persistent Disk or + * Filestore, or a Cloud Storage path. + * @type \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption $cloud_logging_option + * Optional. Additional settings for Cloud Logging. It will only take effect + * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Where logs should be saved. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; + * @return int + */ + public function getDestination() + { + return $this->destination; + } + + /** + * Where logs should be saved. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; + * @param int $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LogsPolicy\Destination::class); + $this->destination = $var; + + return $this; + } + + /** + * The path to which logs are saved when the destination = PATH. This can be a + * local file path on the VM, or under the mount point of a Persistent Disk or + * Filestore, or a Cloud Storage path. + * + * Generated from protobuf field string logs_path = 2; + * @return string + */ + public function getLogsPath() + { + return $this->logs_path; + } + + /** + * The path to which logs are saved when the destination = PATH. This can be a + * local file path on the VM, or under the mount point of a Persistent Disk or + * Filestore, or a Cloud Storage path. + * + * Generated from protobuf field string logs_path = 2; + * @param string $var + * @return $this + */ + public function setLogsPath($var) + { + GPBUtil::checkString($var, True); + $this->logs_path = $var; + + return $this; + } + + /** + * Optional. Additional settings for Cloud Logging. It will only take effect + * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption|null + */ + public function getCloudLoggingOption() + { + return $this->cloud_logging_option; + } + + public function hasCloudLoggingOption() + { + return isset($this->cloud_logging_option); + } + + public function clearCloudLoggingOption() + { + unset($this->cloud_logging_option); + } + + /** + * Optional. Additional settings for Cloud Logging. It will only take effect + * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption $var + * @return $this + */ + public function setCloudLoggingOption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption::class); + $this->cloud_logging_option = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php new file mode 100644 index 000000000000..6004643bec5a --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php @@ -0,0 +1,99 @@ +google.cloud.batch.v1.LogsPolicy.CloudLoggingOption + */ +class CloudLoggingOption extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Set this flag to true to change the [monitored resource + * type](https://cloud.google.com/monitoring/api/resources) for + * Cloud Logging logs generated by this Batch job from + * the + * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + * type to the formerly used + * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + * type. + * + * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_generic_task_monitored_resource = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_generic_task_monitored_resource + * Optional. Set this flag to true to change the [monitored resource + * type](https://cloud.google.com/monitoring/api/resources) for + * Cloud Logging logs generated by this Batch job from + * the + * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + * type to the formerly used + * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + * type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Set this flag to true to change the [monitored resource + * type](https://cloud.google.com/monitoring/api/resources) for + * Cloud Logging logs generated by this Batch job from + * the + * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + * type to the formerly used + * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + * type. + * + * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseGenericTaskMonitoredResource() + { + return $this->use_generic_task_monitored_resource; + } + + /** + * Optional. Set this flag to true to change the [monitored resource + * type](https://cloud.google.com/monitoring/api/resources) for + * Cloud Logging logs generated by this Batch job from + * the + * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + * type to the formerly used + * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + * type. + * + * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseGenericTaskMonitoredResource($var) + { + GPBUtil::checkBool($var); + $this->use_generic_task_monitored_resource = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudLoggingOption::class, \Google\Cloud\Batch\V1\LogsPolicy_CloudLoggingOption::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php new file mode 100644 index 000000000000..1f87d09d632d --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php @@ -0,0 +1,64 @@ +google.cloud.batch.v1.LogsPolicy.Destination + */ +class Destination +{ + /** + * Logs are not preserved. + * + * Generated from protobuf enum DESTINATION_UNSPECIFIED = 0; + */ + const DESTINATION_UNSPECIFIED = 0; + /** + * Logs are streamed to Cloud Logging. + * + * Generated from protobuf enum CLOUD_LOGGING = 1; + */ + const CLOUD_LOGGING = 1; + /** + * Logs are saved to a file path. + * + * Generated from protobuf enum PATH = 2; + */ + const PATH = 2; + + private static $valueToName = [ + self::DESTINATION_UNSPECIFIED => 'DESTINATION_UNSPECIFIED', + self::CLOUD_LOGGING => 'CLOUD_LOGGING', + self::PATH => 'PATH', + ]; + + 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(Destination::class, \Google\Cloud\Batch\V1\LogsPolicy_Destination::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php new file mode 100644 index 000000000000..b4c6e4bb1506 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php @@ -0,0 +1,101 @@ +google.cloud.batch.v1.NFS + */ +class NFS extends \Google\Protobuf\Internal\Message +{ + /** + * The IP address of the NFS. + * + * Generated from protobuf field string server = 1; + */ + protected $server = ''; + /** + * Remote source path exported from the NFS, e.g., "/share". + * + * Generated from protobuf field string remote_path = 2; + */ + protected $remote_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $server + * The IP address of the NFS. + * @type string $remote_path + * Remote source path exported from the NFS, e.g., "/share". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The IP address of the NFS. + * + * Generated from protobuf field string server = 1; + * @return string + */ + public function getServer() + { + return $this->server; + } + + /** + * The IP address of the NFS. + * + * Generated from protobuf field string server = 1; + * @param string $var + * @return $this + */ + public function setServer($var) + { + GPBUtil::checkString($var, True); + $this->server = $var; + + return $this; + } + + /** + * Remote source path exported from the NFS, e.g., "/share". + * + * Generated from protobuf field string remote_path = 2; + * @return string + */ + public function getRemotePath() + { + return $this->remote_path; + } + + /** + * Remote source path exported from the NFS, e.g., "/share". + * + * Generated from protobuf field string remote_path = 2; + * @param string $var + * @return $this + */ + public function setRemotePath($var) + { + GPBUtil::checkString($var, True); + $this->remote_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php new file mode 100644 index 000000000000..6a98d039d45c --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.batch.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\Batch\V1\Batch::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/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php new file mode 100644 index 000000000000..f04d7966d7b3 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php @@ -0,0 +1,492 @@ +google.cloud.batch.v1.Runnable + */ +class Runnable extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. DisplayName is an optional field that can be provided by the + * caller. If provided, it will be used in logs and other outputs to identify + * the script, making it easier for users to understand the logs. If not + * provided the index of the runnable will be used for outputs. + * + * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Normally, a runnable that returns a non-zero exit status fails and causes + * the task to fail. However, you can set this field to `true` to allow the + * task to continue executing its other runnables even if this runnable + * fails. + * + * Generated from protobuf field bool ignore_exit_status = 3; + */ + protected $ignore_exit_status = false; + /** + * Normally, a runnable that doesn't exit causes its task to fail. However, + * you can set this field to `true` to configure a background runnable. + * Background runnables are allowed continue running in the background while + * the task executes subsequent runnables. For example, background runnables + * are useful for providing services to other runnables or providing + * debugging-support tools like SSH servers. + * Specifically, background runnables are killed automatically (if they have + * not already exited) a short time after all foreground runnables have + * completed. Even though this is likely to result in a non-zero exit status + * for the background runnable, these automatic kills are not treated as task + * failures. + * + * Generated from protobuf field bool background = 4; + */ + protected $background = false; + /** + * By default, after a Runnable fails, no further Runnable are executed. This + * flag indicates that this Runnable must be run even if the Task has already + * failed. This is useful for Runnables that copy output files off of the VM + * or for debugging. + * The always_run flag does not override the Task's overall max_run_duration. + * If the max_run_duration has expired then no further Runnables will execute, + * not even always_run Runnables. + * + * Generated from protobuf field bool always_run = 5; + */ + protected $always_run = false; + /** + * Environment variables for this Runnable (overrides variables set for the + * whole Task or TaskGroup). + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; + */ + protected $environment = null; + /** + * Timeout for this Runnable. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + */ + protected $timeout = null; + /** + * Labels for this Runnable. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + protected $executable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\Runnable\Container $container + * Container runnable. + * @type \Google\Cloud\Batch\V1\Runnable\Script $script + * Script runnable. + * @type \Google\Cloud\Batch\V1\Runnable\Barrier $barrier + * Barrier runnable. + * @type string $display_name + * Optional. DisplayName is an optional field that can be provided by the + * caller. If provided, it will be used in logs and other outputs to identify + * the script, making it easier for users to understand the logs. If not + * provided the index of the runnable will be used for outputs. + * @type bool $ignore_exit_status + * Normally, a runnable that returns a non-zero exit status fails and causes + * the task to fail. However, you can set this field to `true` to allow the + * task to continue executing its other runnables even if this runnable + * fails. + * @type bool $background + * Normally, a runnable that doesn't exit causes its task to fail. However, + * you can set this field to `true` to configure a background runnable. + * Background runnables are allowed continue running in the background while + * the task executes subsequent runnables. For example, background runnables + * are useful for providing services to other runnables or providing + * debugging-support tools like SSH servers. + * Specifically, background runnables are killed automatically (if they have + * not already exited) a short time after all foreground runnables have + * completed. Even though this is likely to result in a non-zero exit status + * for the background runnable, these automatic kills are not treated as task + * failures. + * @type bool $always_run + * By default, after a Runnable fails, no further Runnable are executed. This + * flag indicates that this Runnable must be run even if the Task has already + * failed. This is useful for Runnables that copy output files off of the VM + * or for debugging. + * The always_run flag does not override the Task's overall max_run_duration. + * If the max_run_duration has expired then no further Runnables will execute, + * not even always_run Runnables. + * @type \Google\Cloud\Batch\V1\Environment $environment + * Environment variables for this Runnable (overrides variables set for the + * whole Task or TaskGroup). + * @type \Google\Protobuf\Duration $timeout + * Timeout for this Runnable. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels for this Runnable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Container runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1; + * @return \Google\Cloud\Batch\V1\Runnable\Container|null + */ + public function getContainer() + { + return $this->readOneof(1); + } + + public function hasContainer() + { + return $this->hasOneof(1); + } + + /** + * Container runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1; + * @param \Google\Cloud\Batch\V1\Runnable\Container $var + * @return $this + */ + public function setContainer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Container::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Script runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2; + * @return \Google\Cloud\Batch\V1\Runnable\Script|null + */ + public function getScript() + { + return $this->readOneof(2); + } + + public function hasScript() + { + return $this->hasOneof(2); + } + + /** + * Script runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2; + * @param \Google\Cloud\Batch\V1\Runnable\Script $var + * @return $this + */ + public function setScript($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Script::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Barrier runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6; + * @return \Google\Cloud\Batch\V1\Runnable\Barrier|null + */ + public function getBarrier() + { + return $this->readOneof(6); + } + + public function hasBarrier() + { + return $this->hasOneof(6); + } + + /** + * Barrier runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6; + * @param \Google\Cloud\Batch\V1\Runnable\Barrier $var + * @return $this + */ + public function setBarrier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Barrier::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. DisplayName is an optional field that can be provided by the + * caller. If provided, it will be used in logs and other outputs to identify + * the script, making it easier for users to understand the logs. If not + * provided the index of the runnable will be used for outputs. + * + * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. DisplayName is an optional field that can be provided by the + * caller. If provided, it will be used in logs and other outputs to identify + * the script, making it easier for users to understand the logs. If not + * provided the index of the runnable will be used for outputs. + * + * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Normally, a runnable that returns a non-zero exit status fails and causes + * the task to fail. However, you can set this field to `true` to allow the + * task to continue executing its other runnables even if this runnable + * fails. + * + * Generated from protobuf field bool ignore_exit_status = 3; + * @return bool + */ + public function getIgnoreExitStatus() + { + return $this->ignore_exit_status; + } + + /** + * Normally, a runnable that returns a non-zero exit status fails and causes + * the task to fail. However, you can set this field to `true` to allow the + * task to continue executing its other runnables even if this runnable + * fails. + * + * Generated from protobuf field bool ignore_exit_status = 3; + * @param bool $var + * @return $this + */ + public function setIgnoreExitStatus($var) + { + GPBUtil::checkBool($var); + $this->ignore_exit_status = $var; + + return $this; + } + + /** + * Normally, a runnable that doesn't exit causes its task to fail. However, + * you can set this field to `true` to configure a background runnable. + * Background runnables are allowed continue running in the background while + * the task executes subsequent runnables. For example, background runnables + * are useful for providing services to other runnables or providing + * debugging-support tools like SSH servers. + * Specifically, background runnables are killed automatically (if they have + * not already exited) a short time after all foreground runnables have + * completed. Even though this is likely to result in a non-zero exit status + * for the background runnable, these automatic kills are not treated as task + * failures. + * + * Generated from protobuf field bool background = 4; + * @return bool + */ + public function getBackground() + { + return $this->background; + } + + /** + * Normally, a runnable that doesn't exit causes its task to fail. However, + * you can set this field to `true` to configure a background runnable. + * Background runnables are allowed continue running in the background while + * the task executes subsequent runnables. For example, background runnables + * are useful for providing services to other runnables or providing + * debugging-support tools like SSH servers. + * Specifically, background runnables are killed automatically (if they have + * not already exited) a short time after all foreground runnables have + * completed. Even though this is likely to result in a non-zero exit status + * for the background runnable, these automatic kills are not treated as task + * failures. + * + * Generated from protobuf field bool background = 4; + * @param bool $var + * @return $this + */ + public function setBackground($var) + { + GPBUtil::checkBool($var); + $this->background = $var; + + return $this; + } + + /** + * By default, after a Runnable fails, no further Runnable are executed. This + * flag indicates that this Runnable must be run even if the Task has already + * failed. This is useful for Runnables that copy output files off of the VM + * or for debugging. + * The always_run flag does not override the Task's overall max_run_duration. + * If the max_run_duration has expired then no further Runnables will execute, + * not even always_run Runnables. + * + * Generated from protobuf field bool always_run = 5; + * @return bool + */ + public function getAlwaysRun() + { + return $this->always_run; + } + + /** + * By default, after a Runnable fails, no further Runnable are executed. This + * flag indicates that this Runnable must be run even if the Task has already + * failed. This is useful for Runnables that copy output files off of the VM + * or for debugging. + * The always_run flag does not override the Task's overall max_run_duration. + * If the max_run_duration has expired then no further Runnables will execute, + * not even always_run Runnables. + * + * Generated from protobuf field bool always_run = 5; + * @param bool $var + * @return $this + */ + public function setAlwaysRun($var) + { + GPBUtil::checkBool($var); + $this->always_run = $var; + + return $this; + } + + /** + * Environment variables for this Runnable (overrides variables set for the + * whole Task or TaskGroup). + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; + * @return \Google\Cloud\Batch\V1\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Environment variables for this Runnable (overrides variables set for the + * whole Task or TaskGroup). + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; + * @param \Google\Cloud\Batch\V1\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment::class); + $this->environment = $var; + + return $this; + } + + /** + * Timeout for this Runnable. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Timeout for this Runnable. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Labels for this Runnable. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels for this Runnable. + * + * Generated from protobuf field map labels = 9; + * @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; + } + + /** + * @return string + */ + public function getExecutable() + { + return $this->whichOneof("executable"); + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php new file mode 100644 index 000000000000..4e85102178ac --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php @@ -0,0 +1,75 @@ +google.cloud.batch.v1.Runnable.Barrier + */ +class Barrier extends \Google\Protobuf\Internal\Message +{ + /** + * Barriers are identified by their index in runnable list. + * Names are not required, but if present should be an identifier. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Barriers are identified by their index in runnable list. + * Names are not required, but if present should be an identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Barriers are identified by their index in runnable list. + * Names are not required, but if present should be an identifier. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Barriers are identified by their index in runnable list. + * Names are not required, but if present should be an identifier. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Barrier::class, \Google\Cloud\Batch\V1\Runnable_Barrier::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php new file mode 100644 index 000000000000..614fdd5d3e5c --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php @@ -0,0 +1,562 @@ +google.cloud.batch.v1.Runnable.Container + */ +class Container extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The URI to pull the container image from. + * + * Generated from protobuf field string image_uri = 1; + */ + protected $image_uri = ''; + /** + * Required for some container images. Overrides the `CMD` specified in the + * container. If there is an `ENTRYPOINT` (either in the container image or + * with the `entrypoint` field below) then these commands are appended as + * arguments to the `ENTRYPOINT`. + * + * Generated from protobuf field repeated string commands = 2; + */ + private $commands; + /** + * Required for some container images. Overrides the `ENTRYPOINT` specified + * in the container. + * + * Generated from protobuf field string entrypoint = 3; + */ + protected $entrypoint = ''; + /** + * Volumes to mount (bind mount) from the host machine files or directories + * into the container, formatted to match `--volume` option for the + * `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. + * If the `TaskSpec.Volumes` field is specified but this field is not, Batch + * will mount each volume from the host machine to the container with the + * same mount path by default. In this case, the default mount option for + * containers will be read-only (`ro`) for existing persistent disks and + * read-write (`rw`) for other volume types, regardless of the original + * mount options specified in `TaskSpec.Volumes`. If you need different + * mount settings, you can explicitly configure them in this field. + * + * Generated from protobuf field repeated string volumes = 7; + */ + private $volumes; + /** + * Required for some container images. Arbitrary additional options to + * include in the `docker run` command when running this container—for + * example, `--network host`. For the `--volume` option, use the `volumes` + * field for the container. + * + * Generated from protobuf field string options = 8; + */ + protected $options = ''; + /** + * If set to true, external network access to and from container will be + * blocked, containers that are with block_external_network as true can + * still communicate with each other, network cannot be specified in the + * `container.options` field. + * + * Generated from protobuf field bool block_external_network = 9; + */ + protected $block_external_network = false; + /** + * Required if the container image is from a private Docker registry. The + * username to login to the Docker registry that contains the image. + * You can either specify the username directly by using plain text or + * specify an encrypted username by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. However, using a secret is + * recommended for enhanced security. + * Caution: If you specify the username using plain text, you risk the + * username being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the username instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string username = 10; + */ + protected $username = ''; + /** + * Required if the container image is from a private Docker registry. The + * password to login to the Docker registry that contains the image. + * For security, it is strongly recommended to specify an + * encrypted password by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. + * Warning: If you specify the password using plain text, you risk the + * password being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the password instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string password = 11; + */ + protected $password = ''; + /** + * Optional. If set to true, this container runnable uses Image streaming. + * Use Image streaming to allow the runnable to initialize without + * waiting for the entire container image to download, which can + * significantly reduce startup time for large container images. + * When `enableImageStreaming` is set to true, the container + * runtime is [containerd](https://containerd.io/) instead of Docker. + * Additionally, this container runnable only supports the following + * `container` subfields: `imageUri`, + * `commands[]`, `entrypoint`, and + * `volumes[]`; any other `container` subfields are ignored. + * For more information about the requirements and limitations for using + * Image streaming with Batch, see the [`image-streaming` + * sample on + * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + * + * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_image_streaming = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_uri + * Required. The URI to pull the container image from. + * @type array|\Google\Protobuf\Internal\RepeatedField $commands + * Required for some container images. Overrides the `CMD` specified in the + * container. If there is an `ENTRYPOINT` (either in the container image or + * with the `entrypoint` field below) then these commands are appended as + * arguments to the `ENTRYPOINT`. + * @type string $entrypoint + * Required for some container images. Overrides the `ENTRYPOINT` specified + * in the container. + * @type array|\Google\Protobuf\Internal\RepeatedField $volumes + * Volumes to mount (bind mount) from the host machine files or directories + * into the container, formatted to match `--volume` option for the + * `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. + * If the `TaskSpec.Volumes` field is specified but this field is not, Batch + * will mount each volume from the host machine to the container with the + * same mount path by default. In this case, the default mount option for + * containers will be read-only (`ro`) for existing persistent disks and + * read-write (`rw`) for other volume types, regardless of the original + * mount options specified in `TaskSpec.Volumes`. If you need different + * mount settings, you can explicitly configure them in this field. + * @type string $options + * Required for some container images. Arbitrary additional options to + * include in the `docker run` command when running this container—for + * example, `--network host`. For the `--volume` option, use the `volumes` + * field for the container. + * @type bool $block_external_network + * If set to true, external network access to and from container will be + * blocked, containers that are with block_external_network as true can + * still communicate with each other, network cannot be specified in the + * `container.options` field. + * @type string $username + * Required if the container image is from a private Docker registry. The + * username to login to the Docker registry that contains the image. + * You can either specify the username directly by using plain text or + * specify an encrypted username by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. However, using a secret is + * recommended for enhanced security. + * Caution: If you specify the username using plain text, you risk the + * username being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the username instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * @type string $password + * Required if the container image is from a private Docker registry. The + * password to login to the Docker registry that contains the image. + * For security, it is strongly recommended to specify an + * encrypted password by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. + * Warning: If you specify the password using plain text, you risk the + * password being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the password instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * @type bool $enable_image_streaming + * Optional. If set to true, this container runnable uses Image streaming. + * Use Image streaming to allow the runnable to initialize without + * waiting for the entire container image to download, which can + * significantly reduce startup time for large container images. + * When `enableImageStreaming` is set to true, the container + * runtime is [containerd](https://containerd.io/) instead of Docker. + * Additionally, this container runnable only supports the following + * `container` subfields: `imageUri`, + * `commands[]`, `entrypoint`, and + * `volumes[]`; any other `container` subfields are ignored. + * For more information about the requirements and limitations for using + * Image streaming with Batch, see the [`image-streaming` + * sample on + * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Required. The URI to pull the container image from. + * + * Generated from protobuf field string image_uri = 1; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * Required. The URI to pull the container image from. + * + * Generated from protobuf field string image_uri = 1; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + + /** + * Required for some container images. Overrides the `CMD` specified in the + * container. If there is an `ENTRYPOINT` (either in the container image or + * with the `entrypoint` field below) then these commands are appended as + * arguments to the `ENTRYPOINT`. + * + * Generated from protobuf field repeated string commands = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCommands() + { + return $this->commands; + } + + /** + * Required for some container images. Overrides the `CMD` specified in the + * container. If there is an `ENTRYPOINT` (either in the container image or + * with the `entrypoint` field below) then these commands are appended as + * arguments to the `ENTRYPOINT`. + * + * Generated from protobuf field repeated string commands = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCommands($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->commands = $arr; + + return $this; + } + + /** + * Required for some container images. Overrides the `ENTRYPOINT` specified + * in the container. + * + * Generated from protobuf field string entrypoint = 3; + * @return string + */ + public function getEntrypoint() + { + return $this->entrypoint; + } + + /** + * Required for some container images. Overrides the `ENTRYPOINT` specified + * in the container. + * + * Generated from protobuf field string entrypoint = 3; + * @param string $var + * @return $this + */ + public function setEntrypoint($var) + { + GPBUtil::checkString($var, True); + $this->entrypoint = $var; + + return $this; + } + + /** + * Volumes to mount (bind mount) from the host machine files or directories + * into the container, formatted to match `--volume` option for the + * `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. + * If the `TaskSpec.Volumes` field is specified but this field is not, Batch + * will mount each volume from the host machine to the container with the + * same mount path by default. In this case, the default mount option for + * containers will be read-only (`ro`) for existing persistent disks and + * read-write (`rw`) for other volume types, regardless of the original + * mount options specified in `TaskSpec.Volumes`. If you need different + * mount settings, you can explicitly configure them in this field. + * + * Generated from protobuf field repeated string volumes = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * Volumes to mount (bind mount) from the host machine files or directories + * into the container, formatted to match `--volume` option for the + * `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. + * If the `TaskSpec.Volumes` field is specified but this field is not, Batch + * will mount each volume from the host machine to the container with the + * same mount path by default. In this case, the default mount option for + * containers will be read-only (`ro`) for existing persistent disks and + * read-write (`rw`) for other volume types, regardless of the original + * mount options specified in `TaskSpec.Volumes`. If you need different + * mount settings, you can explicitly configure them in this field. + * + * Generated from protobuf field repeated string volumes = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->volumes = $arr; + + return $this; + } + + /** + * Required for some container images. Arbitrary additional options to + * include in the `docker run` command when running this container—for + * example, `--network host`. For the `--volume` option, use the `volumes` + * field for the container. + * + * Generated from protobuf field string options = 8; + * @return string + */ + public function getOptions() + { + return $this->options; + } + + /** + * Required for some container images. Arbitrary additional options to + * include in the `docker run` command when running this container—for + * example, `--network host`. For the `--volume` option, use the `volumes` + * field for the container. + * + * Generated from protobuf field string options = 8; + * @param string $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkString($var, True); + $this->options = $var; + + return $this; + } + + /** + * If set to true, external network access to and from container will be + * blocked, containers that are with block_external_network as true can + * still communicate with each other, network cannot be specified in the + * `container.options` field. + * + * Generated from protobuf field bool block_external_network = 9; + * @return bool + */ + public function getBlockExternalNetwork() + { + return $this->block_external_network; + } + + /** + * If set to true, external network access to and from container will be + * blocked, containers that are with block_external_network as true can + * still communicate with each other, network cannot be specified in the + * `container.options` field. + * + * Generated from protobuf field bool block_external_network = 9; + * @param bool $var + * @return $this + */ + public function setBlockExternalNetwork($var) + { + GPBUtil::checkBool($var); + $this->block_external_network = $var; + + return $this; + } + + /** + * Required if the container image is from a private Docker registry. The + * username to login to the Docker registry that contains the image. + * You can either specify the username directly by using plain text or + * specify an encrypted username by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. However, using a secret is + * recommended for enhanced security. + * Caution: If you specify the username using plain text, you risk the + * username being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the username instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string username = 10; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required if the container image is from a private Docker registry. The + * username to login to the Docker registry that contains the image. + * You can either specify the username directly by using plain text or + * specify an encrypted username by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. However, using a secret is + * recommended for enhanced security. + * Caution: If you specify the username using plain text, you risk the + * username being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the username instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string username = 10; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Required if the container image is from a private Docker registry. The + * password to login to the Docker registry that contains the image. + * For security, it is strongly recommended to specify an + * encrypted password by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. + * Warning: If you specify the password using plain text, you risk the + * password being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the password instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string password = 11; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required if the container image is from a private Docker registry. The + * password to login to the Docker registry that contains the image. + * For security, it is strongly recommended to specify an + * encrypted password by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. + * Warning: If you specify the password using plain text, you risk the + * password being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the password instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string password = 11; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Optional. If set to true, this container runnable uses Image streaming. + * Use Image streaming to allow the runnable to initialize without + * waiting for the entire container image to download, which can + * significantly reduce startup time for large container images. + * When `enableImageStreaming` is set to true, the container + * runtime is [containerd](https://containerd.io/) instead of Docker. + * Additionally, this container runnable only supports the following + * `container` subfields: `imageUri`, + * `commands[]`, `entrypoint`, and + * `volumes[]`; any other `container` subfields are ignored. + * For more information about the requirements and limitations for using + * Image streaming with Batch, see the [`image-streaming` + * sample on + * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + * + * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableImageStreaming() + { + return $this->enable_image_streaming; + } + + /** + * Optional. If set to true, this container runnable uses Image streaming. + * Use Image streaming to allow the runnable to initialize without + * waiting for the entire container image to download, which can + * significantly reduce startup time for large container images. + * When `enableImageStreaming` is set to true, the container + * runtime is [containerd](https://containerd.io/) instead of Docker. + * Additionally, this container runnable only supports the following + * `container` subfields: `imageUri`, + * `commands[]`, `entrypoint`, and + * `volumes[]`; any other `container` subfields are ignored. + * For more information about the requirements and limitations for using + * Image streaming with Batch, see the [`image-streaming` + * sample on + * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + * + * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableImageStreaming($var) + { + GPBUtil::checkBool($var); + $this->enable_image_streaming = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Container::class, \Google\Cloud\Batch\V1\Runnable_Container::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php new file mode 100644 index 000000000000..1abdb64dd330 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php @@ -0,0 +1,153 @@ +google.cloud.batch.v1.Runnable.Script + */ +class Script extends \Google\Protobuf\Internal\Message +{ + protected $command; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * The path to a script file that is accessible from the host VM(s). + * Unless the script file supports the default `#!/bin/sh` shell + * interpreter, you must specify an interpreter by including a + * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the + * first line of the file. For example, to execute the script using bash, + * include `#!/bin/bash` as the first line of the file. Alternatively, + * to execute the script using Python3, include `#!/usr/bin/env python3` + * as the first line of the file. + * @type string $text + * The text for a script. + * Unless the script text supports the default `#!/bin/sh` shell + * interpreter, you must specify an interpreter by including a + * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the + * beginning of the text. For example, to execute the script using bash, + * include `#!/bin/bash\n` at the beginning of the text. Alternatively, + * to execute the script using Python3, include `#!/usr/bin/env python3\n` + * at the beginning of the text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * The path to a script file that is accessible from the host VM(s). + * Unless the script file supports the default `#!/bin/sh` shell + * interpreter, you must specify an interpreter by including a + * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the + * first line of the file. For example, to execute the script using bash, + * include `#!/bin/bash` as the first line of the file. Alternatively, + * to execute the script using Python3, include `#!/usr/bin/env python3` + * as the first line of the file. + * + * Generated from protobuf field string path = 1; + * @return string + */ + public function getPath() + { + return $this->readOneof(1); + } + + public function hasPath() + { + return $this->hasOneof(1); + } + + /** + * The path to a script file that is accessible from the host VM(s). + * Unless the script file supports the default `#!/bin/sh` shell + * interpreter, you must specify an interpreter by including a + * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the + * first line of the file. For example, to execute the script using bash, + * include `#!/bin/bash` as the first line of the file. Alternatively, + * to execute the script using Python3, include `#!/usr/bin/env python3` + * as the first line of the file. + * + * Generated from protobuf field string path = 1; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The text for a script. + * Unless the script text supports the default `#!/bin/sh` shell + * interpreter, you must specify an interpreter by including a + * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the + * beginning of the text. For example, to execute the script using bash, + * include `#!/bin/bash\n` at the beginning of the text. Alternatively, + * to execute the script using Python3, include `#!/usr/bin/env python3\n` + * at the beginning of the text. + * + * Generated from protobuf field string text = 2; + * @return string + */ + public function getText() + { + return $this->readOneof(2); + } + + public function hasText() + { + return $this->hasOneof(2); + } + + /** + * The text for a script. + * Unless the script text supports the default `#!/bin/sh` shell + * interpreter, you must specify an interpreter by including a + * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the + * beginning of the text. For example, to execute the script using bash, + * include `#!/bin/bash\n` at the beginning of the text. Alternatively, + * to execute the script using Python3, include `#!/usr/bin/env python3\n` + * at the beginning of the text. + * + * Generated from protobuf field string text = 2; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getCommand() + { + return $this->whichOneof("command"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Script::class, \Google\Cloud\Batch\V1\Runnable_Script::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php new file mode 100644 index 000000000000..2a315346b647 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php @@ -0,0 +1,101 @@ +google.cloud.batch.v1.ServiceAccount + */ +class ServiceAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Email address of the service account. + * + * Generated from protobuf field string email = 1; + */ + protected $email = ''; + /** + * List of scopes to be enabled for this service account. + * + * Generated from protobuf field repeated string scopes = 2; + */ + private $scopes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * Email address of the service account. + * @type array|\Google\Protobuf\Internal\RepeatedField $scopes + * List of scopes to be enabled for this service account. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Email address of the service account. + * + * Generated from protobuf field string email = 1; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Email address of the service account. + * + * Generated from protobuf field string email = 1; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * List of scopes to be enabled for this service account. + * + * Generated from protobuf field repeated string scopes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * List of scopes to be enabled for this service account. + * + * Generated from protobuf field repeated string scopes = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scopes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php new file mode 100644 index 000000000000..1a199e88f2ff --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php @@ -0,0 +1,235 @@ +google.cloud.batch.v1.StatusEvent + */ +class StatusEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the event. + * + * Generated from protobuf field string type = 3; + */ + protected $type = ''; + /** + * Description of the event. + * + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + /** + * The time this event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; + */ + protected $event_time = null; + /** + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; + */ + protected $task_execution = null; + /** + * Task State. + * This field is only defined for task-level status events. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; + */ + protected $task_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * Type of the event. + * @type string $description + * Description of the event. + * @type \Google\Protobuf\Timestamp $event_time + * The time this event occurred. + * @type \Google\Cloud\Batch\V1\TaskExecution $task_execution + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. + * @type int $task_state + * Task State. + * This field is only defined for task-level status events. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Type of the event. + * + * Generated from protobuf field string type = 3; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the event. + * + * Generated from protobuf field string type = 3; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Description of the event. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the event. + * + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The time this event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * The time this event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; + * @return \Google\Cloud\Batch\V1\TaskExecution|null + */ + public function getTaskExecution() + { + return $this->task_execution; + } + + public function hasTaskExecution() + { + return isset($this->task_execution); + } + + public function clearTaskExecution() + { + unset($this->task_execution); + } + + /** + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; + * @param \Google\Cloud\Batch\V1\TaskExecution $var + * @return $this + */ + public function setTaskExecution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskExecution::class); + $this->task_execution = $var; + + return $this; + } + + /** + * Task State. + * This field is only defined for task-level status events. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; + * @return int + */ + public function getTaskState() + { + return $this->task_state; + } + + /** + * Task State. + * This field is only defined for task-level status events. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; + * @param int $var + * @return $this + */ + public function setTaskState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); + $this->task_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php new file mode 100644 index 000000000000..c034a667462e --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php @@ -0,0 +1,123 @@ +google.cloud.batch.v1.Task + */ +class Task extends \Google\Protobuf\Internal\Message +{ + /** + * Task name. + * The name is generated from the parent TaskGroup name and 'id' field. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Task Status. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Task name. + * The name is generated from the parent TaskGroup name and 'id' field. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + * @type \Google\Cloud\Batch\V1\TaskStatus $status + * Task Status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Task name. + * The name is generated from the parent TaskGroup name and 'id' field. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Task name. + * The name is generated from the parent TaskGroup name and 'id' field. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + * + * 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; + } + + /** + * Task Status. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; + * @return \Google\Cloud\Batch\V1\TaskStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Task Status. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; + * @param \Google\Cloud\Batch\V1\TaskStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php new file mode 100644 index 000000000000..3a06c25ccab4 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php @@ -0,0 +1,100 @@ +google.cloud.batch.v1.TaskExecution + */ +class TaskExecution extends \Google\Protobuf\Internal\Message +{ + /** + * The exit code of a finished task. + * If the task succeeded, the exit code will be 0. If the task failed but not + * due to the following reasons, the exit code will be 50000. + * Otherwise, it can be from different sources: + * * Batch known failures: + * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. + * + * Generated from protobuf field int32 exit_code = 1; + */ + protected $exit_code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $exit_code + * The exit code of a finished task. + * If the task succeeded, the exit code will be 0. If the task failed but not + * due to the following reasons, the exit code will be 50000. + * Otherwise, it can be from different sources: + * * Batch known failures: + * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * The exit code of a finished task. + * If the task succeeded, the exit code will be 0. If the task failed but not + * due to the following reasons, the exit code will be 50000. + * Otherwise, it can be from different sources: + * * Batch known failures: + * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. + * + * Generated from protobuf field int32 exit_code = 1; + * @return int + */ + public function getExitCode() + { + return $this->exit_code; + } + + /** + * The exit code of a finished task. + * If the task succeeded, the exit code will be 0. If the task failed but not + * due to the following reasons, the exit code will be 50000. + * Otherwise, it can be from different sources: + * * Batch known failures: + * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. + * + * Generated from protobuf field int32 exit_code = 1; + * @param int $var + * @return $this + */ + public function setExitCode($var) + { + GPBUtil::checkInt32($var); + $this->exit_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php new file mode 100644 index 000000000000..9a71f100436d --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php @@ -0,0 +1,479 @@ +google.cloud.batch.v1.TaskGroup + */ +class TaskGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. TaskGroup name. + * The system generates this field based on parent Job name. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Tasks in the group share the same task spec. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task_spec = null; + /** + * Number of Tasks in the TaskGroup. + * Default is 1. + * + * Generated from protobuf field int64 task_count = 4; + */ + protected $task_count = 0; + /** + * Max number of tasks that can run in parallel. + * Default to min(task_count, parallel tasks per job limit). + * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + * + * Generated from protobuf field int64 parallelism = 5; + */ + protected $parallelism = 0; + /** + * Scheduling policy for Tasks in the TaskGroup. + * The default value is AS_SOON_AS_POSSIBLE. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; + */ + protected $scheduling_policy = 0; + /** + * An array of environment variable mappings, which are passed to Tasks with + * matching indices. If task_environments is used then task_count should + * not be specified in the request (and will be ignored). Task count will be + * the length of task_environments. + * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + * addition to any environment variables set in task_environments, specifying + * the number of Tasks in the Task's parent TaskGroup, and the specific Task's + * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; + */ + private $task_environments; + /** + * Max number of tasks that can be run on a VM at the same time. + * If not specified, the system will decide a value based on available + * compute resources on a VM and task requirements. + * + * Generated from protobuf field int64 task_count_per_node = 10; + */ + protected $task_count_per_node = 0; + /** + * When true, Batch will populate a file with a list of all VMs assigned to + * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + * of that file. Defaults to false. The host file supports up to 1000 VMs. + * + * Generated from protobuf field bool require_hosts_file = 11; + */ + protected $require_hosts_file = false; + /** + * When true, Batch will configure SSH to allow passwordless login between + * VMs running the Batch tasks in the same TaskGroup. + * + * Generated from protobuf field bool permissive_ssh = 12; + */ + protected $permissive_ssh = false; + /** + * Optional. If not set or set to false, Batch uses the root user to execute + * runnables. If set to true, Batch runs the runnables using a non-root user. + * Currently, the non-root user Batch used is generated by OS Login. For more + * information, see [About OS + * Login](https://cloud.google.com/compute/docs/oslogin). + * + * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $run_as_non_root = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. TaskGroup name. + * The system generates this field based on parent Job name. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + * @type \Google\Cloud\Batch\V1\TaskSpec $task_spec + * Required. Tasks in the group share the same task spec. + * @type int|string $task_count + * Number of Tasks in the TaskGroup. + * Default is 1. + * @type int|string $parallelism + * Max number of tasks that can run in parallel. + * Default to min(task_count, parallel tasks per job limit). + * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + * @type int $scheduling_policy + * Scheduling policy for Tasks in the TaskGroup. + * The default value is AS_SOON_AS_POSSIBLE. + * @type array<\Google\Cloud\Batch\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $task_environments + * An array of environment variable mappings, which are passed to Tasks with + * matching indices. If task_environments is used then task_count should + * not be specified in the request (and will be ignored). Task count will be + * the length of task_environments. + * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + * addition to any environment variables set in task_environments, specifying + * the number of Tasks in the Task's parent TaskGroup, and the specific Task's + * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + * @type int|string $task_count_per_node + * Max number of tasks that can be run on a VM at the same time. + * If not specified, the system will decide a value based on available + * compute resources on a VM and task requirements. + * @type bool $require_hosts_file + * When true, Batch will populate a file with a list of all VMs assigned to + * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + * of that file. Defaults to false. The host file supports up to 1000 VMs. + * @type bool $permissive_ssh + * When true, Batch will configure SSH to allow passwordless login between + * VMs running the Batch tasks in the same TaskGroup. + * @type bool $run_as_non_root + * Optional. If not set or set to false, Batch uses the root user to execute + * runnables. If set to true, Batch runs the runnables using a non-root user. + * Currently, the non-root user Batch used is generated by OS Login. For more + * information, see [About OS + * Login](https://cloud.google.com/compute/docs/oslogin). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Output only. TaskGroup name. + * The system generates this field based on parent Job name. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. TaskGroup name. + * The system generates this field based on parent Job name. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Tasks in the group share the same task spec. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Batch\V1\TaskSpec|null + */ + public function getTaskSpec() + { + return $this->task_spec; + } + + public function hasTaskSpec() + { + return isset($this->task_spec); + } + + public function clearTaskSpec() + { + unset($this->task_spec); + } + + /** + * Required. Tasks in the group share the same task spec. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Batch\V1\TaskSpec $var + * @return $this + */ + public function setTaskSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskSpec::class); + $this->task_spec = $var; + + return $this; + } + + /** + * Number of Tasks in the TaskGroup. + * Default is 1. + * + * Generated from protobuf field int64 task_count = 4; + * @return int|string + */ + public function getTaskCount() + { + return $this->task_count; + } + + /** + * Number of Tasks in the TaskGroup. + * Default is 1. + * + * Generated from protobuf field int64 task_count = 4; + * @param int|string $var + * @return $this + */ + public function setTaskCount($var) + { + GPBUtil::checkInt64($var); + $this->task_count = $var; + + return $this; + } + + /** + * Max number of tasks that can run in parallel. + * Default to min(task_count, parallel tasks per job limit). + * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + * + * Generated from protobuf field int64 parallelism = 5; + * @return int|string + */ + public function getParallelism() + { + return $this->parallelism; + } + + /** + * Max number of tasks that can run in parallel. + * Default to min(task_count, parallel tasks per job limit). + * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + * + * Generated from protobuf field int64 parallelism = 5; + * @param int|string $var + * @return $this + */ + public function setParallelism($var) + { + GPBUtil::checkInt64($var); + $this->parallelism = $var; + + return $this; + } + + /** + * Scheduling policy for Tasks in the TaskGroup. + * The default value is AS_SOON_AS_POSSIBLE. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; + * @return int + */ + public function getSchedulingPolicy() + { + return $this->scheduling_policy; + } + + /** + * Scheduling policy for Tasks in the TaskGroup. + * The default value is AS_SOON_AS_POSSIBLE. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; + * @param int $var + * @return $this + */ + public function setSchedulingPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskGroup\SchedulingPolicy::class); + $this->scheduling_policy = $var; + + return $this; + } + + /** + * An array of environment variable mappings, which are passed to Tasks with + * matching indices. If task_environments is used then task_count should + * not be specified in the request (and will be ignored). Task count will be + * the length of task_environments. + * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + * addition to any environment variables set in task_environments, specifying + * the number of Tasks in the Task's parent TaskGroup, and the specific Task's + * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaskEnvironments() + { + return $this->task_environments; + } + + /** + * An array of environment variable mappings, which are passed to Tasks with + * matching indices. If task_environments is used then task_count should + * not be specified in the request (and will be ignored). Task count will be + * the length of task_environments. + * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + * addition to any environment variables set in task_environments, specifying + * the number of Tasks in the Task's parent TaskGroup, and the specific Task's + * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; + * @param array<\Google\Cloud\Batch\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaskEnvironments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Environment::class); + $this->task_environments = $arr; + + return $this; + } + + /** + * Max number of tasks that can be run on a VM at the same time. + * If not specified, the system will decide a value based on available + * compute resources on a VM and task requirements. + * + * Generated from protobuf field int64 task_count_per_node = 10; + * @return int|string + */ + public function getTaskCountPerNode() + { + return $this->task_count_per_node; + } + + /** + * Max number of tasks that can be run on a VM at the same time. + * If not specified, the system will decide a value based on available + * compute resources on a VM and task requirements. + * + * Generated from protobuf field int64 task_count_per_node = 10; + * @param int|string $var + * @return $this + */ + public function setTaskCountPerNode($var) + { + GPBUtil::checkInt64($var); + $this->task_count_per_node = $var; + + return $this; + } + + /** + * When true, Batch will populate a file with a list of all VMs assigned to + * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + * of that file. Defaults to false. The host file supports up to 1000 VMs. + * + * Generated from protobuf field bool require_hosts_file = 11; + * @return bool + */ + public function getRequireHostsFile() + { + return $this->require_hosts_file; + } + + /** + * When true, Batch will populate a file with a list of all VMs assigned to + * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + * of that file. Defaults to false. The host file supports up to 1000 VMs. + * + * Generated from protobuf field bool require_hosts_file = 11; + * @param bool $var + * @return $this + */ + public function setRequireHostsFile($var) + { + GPBUtil::checkBool($var); + $this->require_hosts_file = $var; + + return $this; + } + + /** + * When true, Batch will configure SSH to allow passwordless login between + * VMs running the Batch tasks in the same TaskGroup. + * + * Generated from protobuf field bool permissive_ssh = 12; + * @return bool + */ + public function getPermissiveSsh() + { + return $this->permissive_ssh; + } + + /** + * When true, Batch will configure SSH to allow passwordless login between + * VMs running the Batch tasks in the same TaskGroup. + * + * Generated from protobuf field bool permissive_ssh = 12; + * @param bool $var + * @return $this + */ + public function setPermissiveSsh($var) + { + GPBUtil::checkBool($var); + $this->permissive_ssh = $var; + + return $this; + } + + /** + * Optional. If not set or set to false, Batch uses the root user to execute + * runnables. If set to true, Batch runs the runnables using a non-root user. + * Currently, the non-root user Batch used is generated by OS Login. For more + * information, see [About OS + * Login](https://cloud.google.com/compute/docs/oslogin). + * + * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRunAsNonRoot() + { + return $this->run_as_non_root; + } + + /** + * Optional. If not set or set to false, Batch uses the root user to execute + * runnables. If set to true, Batch runs the runnables using a non-root user. + * Currently, the non-root user Batch used is generated by OS Login. For more + * information, see [About OS + * Login](https://cloud.google.com/compute/docs/oslogin). + * + * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRunAsNonRoot($var) + { + GPBUtil::checkBool($var); + $this->run_as_non_root = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php new file mode 100644 index 000000000000..df18ec4557bc --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php @@ -0,0 +1,66 @@ +google.cloud.batch.v1.TaskGroup.SchedulingPolicy + */ +class SchedulingPolicy +{ + /** + * Unspecified. + * + * Generated from protobuf enum SCHEDULING_POLICY_UNSPECIFIED = 0; + */ + const SCHEDULING_POLICY_UNSPECIFIED = 0; + /** + * Run Tasks as soon as resources are available. + * Tasks might be executed in parallel depending on parallelism and + * task_count values. + * + * Generated from protobuf enum AS_SOON_AS_POSSIBLE = 1; + */ + const AS_SOON_AS_POSSIBLE = 1; + /** + * Run Tasks sequentially with increased task index. + * + * Generated from protobuf enum IN_ORDER = 2; + */ + const IN_ORDER = 2; + + private static $valueToName = [ + self::SCHEDULING_POLICY_UNSPECIFIED => 'SCHEDULING_POLICY_UNSPECIFIED', + self::AS_SOON_AS_POSSIBLE => 'AS_SOON_AS_POSSIBLE', + self::IN_ORDER => 'IN_ORDER', + ]; + + 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(SchedulingPolicy::class, \Google\Cloud\Batch\V1\TaskGroup_SchedulingPolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php new file mode 100644 index 000000000000..e690af593b2f --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php @@ -0,0 +1,440 @@ +google.cloud.batch.v1.TaskSpec + */ +class TaskSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The sequence of one or more runnables (executable scripts, + * executable containers, and/or barriers) for each task in this task group to + * run. Each task runs this list of runnables in order. For a task to succeed, + * all of its script and container runnables each must meet at least one of + * the following conditions: + * + The runnable exited with a zero status. + * + The runnable didn't finish, but you enabled its `background` subfield. + * + The runnable exited with a non-zero status, but you enabled its + * `ignore_exit_status` subfield. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; + */ + private $runnables; + /** + * ComputeResource requirements. + * + * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; + */ + protected $compute_resource = null; + /** + * Maximum duration the task should run before being automatically retried + * (if enabled) or automatically failed. Format the value of this field + * as a time limit in seconds followed by `s`—for example, `3600s` + * for 1 hour. The field accepts any value between 0 and the maximum listed + * for the `Duration` field type at + * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + * the actual maximum run time for a job will be limited to the maximum run + * time for a job listed at + * https://cloud.google.com/batch/quotas#max-job-duration. + * + * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; + */ + protected $max_run_duration = null; + /** + * Maximum number of retries on failures. + * The default, 0, which means never retry. + * The valid value range is [0, 10]. + * + * Generated from protobuf field int32 max_retry_count = 5; + */ + protected $max_retry_count = 0; + /** + * Lifecycle management schema when any task in a task group is failed. + * Currently we only support one lifecycle policy. + * When the lifecycle policy condition is met, + * the action in the policy will execute. + * If task execution result does not meet with the defined lifecycle + * policy, we consider it as the default policy. + * Default policy means if the exit code is 0, exit task. + * If task ends with non-zero exit code, retry the task with max_retry_count. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; + */ + private $lifecycle_policies; + /** + * Deprecated: please use environment(non-plural) instead. + * + * Generated from protobuf field map environments = 6 [deprecated = true]; + * @deprecated + */ + private $environments; + /** + * Volumes to mount before running Tasks using this TaskSpec. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; + */ + private $volumes; + /** + * Environment variables to set before running the Task. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; + */ + protected $environment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Batch\V1\Runnable>|\Google\Protobuf\Internal\RepeatedField $runnables + * Required. The sequence of one or more runnables (executable scripts, + * executable containers, and/or barriers) for each task in this task group to + * run. Each task runs this list of runnables in order. For a task to succeed, + * all of its script and container runnables each must meet at least one of + * the following conditions: + * + The runnable exited with a zero status. + * + The runnable didn't finish, but you enabled its `background` subfield. + * + The runnable exited with a non-zero status, but you enabled its + * `ignore_exit_status` subfield. + * @type \Google\Cloud\Batch\V1\ComputeResource $compute_resource + * ComputeResource requirements. + * @type \Google\Protobuf\Duration $max_run_duration + * Maximum duration the task should run before being automatically retried + * (if enabled) or automatically failed. Format the value of this field + * as a time limit in seconds followed by `s`—for example, `3600s` + * for 1 hour. The field accepts any value between 0 and the maximum listed + * for the `Duration` field type at + * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + * the actual maximum run time for a job will be limited to the maximum run + * time for a job listed at + * https://cloud.google.com/batch/quotas#max-job-duration. + * @type int $max_retry_count + * Maximum number of retries on failures. + * The default, 0, which means never retry. + * The valid value range is [0, 10]. + * @type array<\Google\Cloud\Batch\V1\LifecyclePolicy>|\Google\Protobuf\Internal\RepeatedField $lifecycle_policies + * Lifecycle management schema when any task in a task group is failed. + * Currently we only support one lifecycle policy. + * When the lifecycle policy condition is met, + * the action in the policy will execute. + * If task execution result does not meet with the defined lifecycle + * policy, we consider it as the default policy. + * Default policy means if the exit code is 0, exit task. + * If task ends with non-zero exit code, retry the task with max_retry_count. + * @type array|\Google\Protobuf\Internal\MapField $environments + * Deprecated: please use environment(non-plural) instead. + * @type array<\Google\Cloud\Batch\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * Volumes to mount before running Tasks using this TaskSpec. + * @type \Google\Cloud\Batch\V1\Environment $environment + * Environment variables to set before running the Task. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Required. The sequence of one or more runnables (executable scripts, + * executable containers, and/or barriers) for each task in this task group to + * run. Each task runs this list of runnables in order. For a task to succeed, + * all of its script and container runnables each must meet at least one of + * the following conditions: + * + The runnable exited with a zero status. + * + The runnable didn't finish, but you enabled its `background` subfield. + * + The runnable exited with a non-zero status, but you enabled its + * `ignore_exit_status` subfield. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRunnables() + { + return $this->runnables; + } + + /** + * Required. The sequence of one or more runnables (executable scripts, + * executable containers, and/or barriers) for each task in this task group to + * run. Each task runs this list of runnables in order. For a task to succeed, + * all of its script and container runnables each must meet at least one of + * the following conditions: + * + The runnable exited with a zero status. + * + The runnable didn't finish, but you enabled its `background` subfield. + * + The runnable exited with a non-zero status, but you enabled its + * `ignore_exit_status` subfield. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; + * @param array<\Google\Cloud\Batch\V1\Runnable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRunnables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Runnable::class); + $this->runnables = $arr; + + return $this; + } + + /** + * ComputeResource requirements. + * + * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; + * @return \Google\Cloud\Batch\V1\ComputeResource|null + */ + public function getComputeResource() + { + return $this->compute_resource; + } + + public function hasComputeResource() + { + return isset($this->compute_resource); + } + + public function clearComputeResource() + { + unset($this->compute_resource); + } + + /** + * ComputeResource requirements. + * + * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; + * @param \Google\Cloud\Batch\V1\ComputeResource $var + * @return $this + */ + public function setComputeResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\ComputeResource::class); + $this->compute_resource = $var; + + return $this; + } + + /** + * Maximum duration the task should run before being automatically retried + * (if enabled) or automatically failed. Format the value of this field + * as a time limit in seconds followed by `s`—for example, `3600s` + * for 1 hour. The field accepts any value between 0 and the maximum listed + * for the `Duration` field type at + * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + * the actual maximum run time for a job will be limited to the maximum run + * time for a job listed at + * https://cloud.google.com/batch/quotas#max-job-duration. + * + * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxRunDuration() + { + return $this->max_run_duration; + } + + public function hasMaxRunDuration() + { + return isset($this->max_run_duration); + } + + public function clearMaxRunDuration() + { + unset($this->max_run_duration); + } + + /** + * Maximum duration the task should run before being automatically retried + * (if enabled) or automatically failed. Format the value of this field + * as a time limit in seconds followed by `s`—for example, `3600s` + * for 1 hour. The field accepts any value between 0 and the maximum listed + * for the `Duration` field type at + * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + * the actual maximum run time for a job will be limited to the maximum run + * time for a job listed at + * https://cloud.google.com/batch/quotas#max-job-duration. + * + * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxRunDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_run_duration = $var; + + return $this; + } + + /** + * Maximum number of retries on failures. + * The default, 0, which means never retry. + * The valid value range is [0, 10]. + * + * Generated from protobuf field int32 max_retry_count = 5; + * @return int + */ + public function getMaxRetryCount() + { + return $this->max_retry_count; + } + + /** + * Maximum number of retries on failures. + * The default, 0, which means never retry. + * The valid value range is [0, 10]. + * + * Generated from protobuf field int32 max_retry_count = 5; + * @param int $var + * @return $this + */ + public function setMaxRetryCount($var) + { + GPBUtil::checkInt32($var); + $this->max_retry_count = $var; + + return $this; + } + + /** + * Lifecycle management schema when any task in a task group is failed. + * Currently we only support one lifecycle policy. + * When the lifecycle policy condition is met, + * the action in the policy will execute. + * If task execution result does not meet with the defined lifecycle + * policy, we consider it as the default policy. + * Default policy means if the exit code is 0, exit task. + * If task ends with non-zero exit code, retry the task with max_retry_count. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLifecyclePolicies() + { + return $this->lifecycle_policies; + } + + /** + * Lifecycle management schema when any task in a task group is failed. + * Currently we only support one lifecycle policy. + * When the lifecycle policy condition is met, + * the action in the policy will execute. + * If task execution result does not meet with the defined lifecycle + * policy, we consider it as the default policy. + * Default policy means if the exit code is 0, exit task. + * If task ends with non-zero exit code, retry the task with max_retry_count. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; + * @param array<\Google\Cloud\Batch\V1\LifecyclePolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLifecyclePolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\LifecyclePolicy::class); + $this->lifecycle_policies = $arr; + + return $this; + } + + /** + * Deprecated: please use environment(non-plural) instead. + * + * Generated from protobuf field map environments = 6 [deprecated = true]; + * @return \Google\Protobuf\Internal\MapField + * @deprecated + */ + public function getEnvironments() + { + @trigger_error('environments is deprecated.', E_USER_DEPRECATED); + return $this->environments; + } + + /** + * Deprecated: please use environment(non-plural) instead. + * + * Generated from protobuf field map environments = 6 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + * @deprecated + */ + public function setEnvironments($var) + { + @trigger_error('environments is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->environments = $arr; + + return $this; + } + + /** + * Volumes to mount before running Tasks using this TaskSpec. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * Volumes to mount before running Tasks using this TaskSpec. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; + * @param array<\Google\Cloud\Batch\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * Environment variables to set before running the Task. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; + * @return \Google\Cloud\Batch\V1\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Environment variables to set before running the Task. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; + * @param \Google\Cloud\Batch\V1\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment::class); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php new file mode 100644 index 000000000000..8caeb3d3d49d --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php @@ -0,0 +1,101 @@ +google.cloud.batch.v1.TaskStatus + */ +class TaskStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; + */ + protected $state = 0; + /** + * Detailed info about why the state is reached. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + */ + private $status_events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Task state. + * @type array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $status_events + * Detailed info about why the state is reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Detailed info about why the state is reached. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatusEvents() + { + return $this->status_events; + } + + /** + * Detailed info about why the state is reached. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + * @param array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatusEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\StatusEvent::class); + $this->status_events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php new file mode 100644 index 000000000000..d74433bd3301 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php @@ -0,0 +1,92 @@ +google.cloud.batch.v1.TaskStatus.State + */ +class State +{ + /** + * Unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The Task is created and waiting for resources. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The Task is assigned to at least one VM. + * + * Generated from protobuf enum ASSIGNED = 2; + */ + const ASSIGNED = 2; + /** + * The Task is running. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * The Task has failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The Task has succeeded. + * + * Generated from protobuf enum SUCCEEDED = 5; + */ + const SUCCEEDED = 5; + /** + * The Task has not been executed when the Job finishes. + * + * Generated from protobuf enum UNEXECUTED = 6; + */ + const UNEXECUTED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::ASSIGNED => 'ASSIGNED', + self::RUNNING => 'RUNNING', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + self::UNEXECUTED => 'UNEXECUTED', + ]; + + 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\Batch\V1\TaskStatus_State::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php new file mode 100644 index 000000000000..c13f144d732c --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php @@ -0,0 +1,268 @@ +google.cloud.batch.v1.Volume + */ +class Volume extends \Google\Protobuf\Internal\Message +{ + /** + * The mount path for the volume, e.g. /mnt/disks/share. + * + * Generated from protobuf field string mount_path = 4; + */ + protected $mount_path = ''; + /** + * Mount options vary based on the type of storage volume: + * * For a Cloud Storage bucket, all the mount options provided + * by + * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + * are supported. + * * For an existing persistent disk, all mount options provided by the + * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + * except writing are supported. This is due to restrictions of + * [multi-writer + * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + * * For any other disk or a Network File System (NFS), all the + * mount options provided by the `mount` command are supported. + * + * Generated from protobuf field repeated string mount_options = 5; + */ + private $mount_options; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\NFS $nfs + * A Network File System (NFS) volume. For example, a + * Filestore file share. + * @type \Google\Cloud\Batch\V1\GCS $gcs + * A Google Cloud Storage (GCS) volume. + * @type string $device_name + * Device name of an attached disk volume, which should align with a + * device_name specified by + * job.allocation_policy.instances[0].policy.disks[i].device_name or + * defined by the given instance template in + * job.allocation_policy.instances[0].instance_template. + * @type string $mount_path + * The mount path for the volume, e.g. /mnt/disks/share. + * @type array|\Google\Protobuf\Internal\RepeatedField $mount_options + * Mount options vary based on the type of storage volume: + * * For a Cloud Storage bucket, all the mount options provided + * by + * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + * are supported. + * * For an existing persistent disk, all mount options provided by the + * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + * except writing are supported. This is due to restrictions of + * [multi-writer + * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + * * For any other disk or a Network File System (NFS), all the + * mount options provided by the `mount` command are supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * A Network File System (NFS) volume. For example, a + * Filestore file share. + * + * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1; + * @return \Google\Cloud\Batch\V1\NFS|null + */ + public function getNfs() + { + return $this->readOneof(1); + } + + public function hasNfs() + { + return $this->hasOneof(1); + } + + /** + * A Network File System (NFS) volume. For example, a + * Filestore file share. + * + * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1; + * @param \Google\Cloud\Batch\V1\NFS $var + * @return $this + */ + public function setNfs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\NFS::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A Google Cloud Storage (GCS) volume. + * + * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3; + * @return \Google\Cloud\Batch\V1\GCS|null + */ + public function getGcs() + { + return $this->readOneof(3); + } + + public function hasGcs() + { + return $this->hasOneof(3); + } + + /** + * A Google Cloud Storage (GCS) volume. + * + * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3; + * @param \Google\Cloud\Batch\V1\GCS $var + * @return $this + */ + public function setGcs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\GCS::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Device name of an attached disk volume, which should align with a + * device_name specified by + * job.allocation_policy.instances[0].policy.disks[i].device_name or + * defined by the given instance template in + * job.allocation_policy.instances[0].instance_template. + * + * Generated from protobuf field string device_name = 6; + * @return string + */ + public function getDeviceName() + { + return $this->readOneof(6); + } + + public function hasDeviceName() + { + return $this->hasOneof(6); + } + + /** + * Device name of an attached disk volume, which should align with a + * device_name specified by + * job.allocation_policy.instances[0].policy.disks[i].device_name or + * defined by the given instance template in + * job.allocation_policy.instances[0].instance_template. + * + * Generated from protobuf field string device_name = 6; + * @param string $var + * @return $this + */ + public function setDeviceName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The mount path for the volume, e.g. /mnt/disks/share. + * + * Generated from protobuf field string mount_path = 4; + * @return string + */ + public function getMountPath() + { + return $this->mount_path; + } + + /** + * The mount path for the volume, e.g. /mnt/disks/share. + * + * Generated from protobuf field string mount_path = 4; + * @param string $var + * @return $this + */ + public function setMountPath($var) + { + GPBUtil::checkString($var, True); + $this->mount_path = $var; + + return $this; + } + + /** + * Mount options vary based on the type of storage volume: + * * For a Cloud Storage bucket, all the mount options provided + * by + * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + * are supported. + * * For an existing persistent disk, all mount options provided by the + * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + * except writing are supported. This is due to restrictions of + * [multi-writer + * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + * * For any other disk or a Network File System (NFS), all the + * mount options provided by the `mount` command are supported. + * + * Generated from protobuf field repeated string mount_options = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMountOptions() + { + return $this->mount_options; + } + + /** + * Mount options vary based on the type of storage volume: + * * For a Cloud Storage bucket, all the mount options provided + * by + * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + * are supported. + * * For an existing persistent disk, all mount options provided by the + * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + * except writing are supported. This is due to restrictions of + * [multi-writer + * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + * * For any other disk or a Network File System (NFS), all the + * mount options provided by the `mount` command are supported. + * + * Generated from protobuf field repeated string mount_options = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMountOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->mount_options = $arr; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php new file mode 100644 index 000000000000..78181b5873de --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php @@ -0,0 +1,81 @@ +setTaskSpec($jobTaskGroupsTaskSpec); + $jobTaskGroups = [$taskGroup,]; + $job = (new Job()) + ->setTaskGroups($jobTaskGroups); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $batchServiceClient->createJob($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 = BatchServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_job_sample($formattedParent); +} +// [END batch_v1_generated_BatchService_CreateJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php new file mode 100644 index 000000000000..2f18d5dabdf6 --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php @@ -0,0 +1,66 @@ +deleteJob($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()); + } +} +// [END batch_v1_generated_BatchService_DeleteJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php new file mode 100644 index 000000000000..df59d0831359 --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $batchServiceClient->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 = BatchServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + get_job_sample($formattedName); +} +// [END batch_v1_generated_BatchService_GetJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php new file mode 100644 index 000000000000..7a7ba7f1f70b --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/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 batch_v1_generated_BatchService_GetLocation_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php new file mode 100644 index 000000000000..757f3239fecb --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $batchServiceClient->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 = BatchServiceClient::taskName( + '[PROJECT]', + '[LOCATION]', + '[JOB]', + '[TASK_GROUP]', + '[TASK]' + ); + + get_task_sample($formattedName); +} +// [END batch_v1_generated_BatchService_GetTask_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php new file mode 100644 index 000000000000..98fb7d71673e --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php @@ -0,0 +1,62 @@ +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()); + } +} +// [END batch_v1_generated_BatchService_ListJobs_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php new file mode 100644 index 000000000000..044396d5d16e --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/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 batch_v1_generated_BatchService_ListLocations_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php new file mode 100644 index 000000000000..68b45472d029 --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $batchServiceClient->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 = BatchServiceClient::taskGroupName( + '[PROJECT]', + '[LOCATION]', + '[JOB]', + '[TASK_GROUP]' + ); + + list_tasks_sample($formattedParent); +} +// [END batch_v1_generated_BatchService_ListTasks_sync] diff --git a/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php b/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php new file mode 100644 index 000000000000..fd2211a52f22 --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php @@ -0,0 +1,558 @@ + createJobAsync(CreateJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class BatchServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.batch.v1.BatchService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'batch.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'batch.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/batch_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/batch_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/batch_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/batch_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a job + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * + * @return string The formatted job resource. + */ + public static function jobName(string $project, string $location, string $job): string + { + return self::getPathTemplate('job')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + ]); + } + + /** + * 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 $job + * @param string $taskGroup + * @param string $task + * + * @return string The formatted task resource. + */ + public static function taskName(string $project, string $location, string $job, string $taskGroup, string $task): string + { + return self::getPathTemplate('task')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'task_group' => $taskGroup, + 'task' => $task, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task_group + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * @param string $taskGroup + * + * @return string The formatted task_group resource. + */ + public static function taskGroupName(string $project, string $location, string $job, string $taskGroup): string + { + return self::getPathTemplate('taskGroup')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'task_group' => $taskGroup, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - job: projects/{project}/locations/{location}/jobs/{job} + * - location: projects/{project}/locations/{location} + * - task: projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task} + * - taskGroup: projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group} + * + * 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 'batch.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 Job. + * + * The async variant is {@see BatchServiceClient::createJobAsync()} . + * + * @example samples/V1/BatchServiceClient/create_job.php + * + * @param CreateJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createJob(CreateJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); + } + + /** + * Delete a Job. + * + * The async variant is {@see BatchServiceClient::deleteJobAsync()} . + * + * @example samples/V1/BatchServiceClient/delete_job.php + * + * @param DeleteJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteJob(DeleteJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); + } + + /** + * Get a Job specified by its resource name. + * + * The async variant is {@see BatchServiceClient::getJobAsync()} . + * + * @example samples/V1/BatchServiceClient/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(); + } + + /** + * Return a single Task. + * + * The async variant is {@see BatchServiceClient::getTaskAsync()} . + * + * @example samples/V1/BatchServiceClient/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(); + } + + /** + * List all Jobs for a project within a region. + * + * The async variant is {@see BatchServiceClient::listJobsAsync()} . + * + * @example samples/V1/BatchServiceClient/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); + } + + /** + * List Tasks associated with a job. + * + * The async variant is {@see BatchServiceClient::listTasksAsync()} . + * + * @example samples/V1/BatchServiceClient/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); + } + + /** + * Gets information about a location. + * + * The async variant is {@see BatchServiceClient::getLocationAsync()} . + * + * @example samples/V1/BatchServiceClient/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 BatchServiceClient::listLocationsAsync()} . + * + * @example samples/V1/BatchServiceClient/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/Batch/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..eae7f15d2f08 --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.batch.v1", + "libraryPackage": "Google\\Cloud\\Batch\\V1", + "services": { + "BatchService": { + "clients": { + "grpc": { + "libraryClient": "BatchServiceGapicClient", + "rpcs": { + "CreateJob": { + "methods": [ + "createJob" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "ListJobs": { + "methods": [ + "listJobs" + ] + }, + "ListTasks": { + "methods": [ + "listTasks" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json new file mode 100644 index 000000000000..4fae7bea9f19 --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "google.cloud.batch.v1.BatchService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 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": { + "CreateJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetJob": { + "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" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTasks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_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/Batch/v1/src/V1/resources/batch_service_descriptor_config.php b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php new file mode 100644 index 000000000000..8618662401e1 --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php @@ -0,0 +1,163 @@ + [ + 'google.cloud.batch.v1.BatchService' => [ + 'DeleteJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Batch\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Batch\V1\Job', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Batch\V1\Job', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Batch\V1\Task', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Batch\V1\ListJobsResponse', + '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\Batch\V1\ListTasksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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' => [ + 'job' => 'projects/{project}/locations/{location}/jobs/{job}', + 'location' => 'projects/{project}/locations/{location}', + 'task' => 'projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}', + 'taskGroup' => 'projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php new file mode 100644 index 000000000000..53dc86dfd5dc --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php @@ -0,0 +1,167 @@ + [ + 'google.cloud.batch.v1.BatchService' => [ + 'CreateJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', + 'body' => 'job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + '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.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/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php b/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php new file mode 100644 index 000000000000..524f1fafb188 --- /dev/null +++ b/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php @@ -0,0 +1,701 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BatchServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BatchServiceClient($options); + } + + /** @test */ + public function createJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uid = 'uid115792'; + $priority = 1165461084; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setPriority($priority); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $jobTaskGroups = []; + $job->setTaskGroups($jobTaskGroups); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + $response = $gapicClient->createJob($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.batch.v1.BatchService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $job = new Job(); + $jobTaskGroups = []; + $job->setTaskGroups($jobTaskGroups); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + try { + $gapicClient->createJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTest() + { + $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/deleteJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new DeleteJobRequest(); + $response = $gapicClient->deleteJob($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.batch.v1.BatchService/DeleteJob', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteJobTest'); + $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 deleteJobExceptionTest() + { + $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/deleteJobTest'); + $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); + $request = new DeleteJobRequest(); + $response = $gapicClient->deleteJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteJobTest'); + 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 getJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $priority = 1165461084; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setPriority($priority); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[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.batch.v1.BatchService/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]', '[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 getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]', '[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.batch.v1.BatchService/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]', '[JOB]', '[TASK_GROUP]', '[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 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); + $request = new ListJobsRequest(); + $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.batch.v1.BatchService/ListJobs', $actualFuncCall); + $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); + $request = new ListJobsRequest(); + 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 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->taskGroupName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]'); + $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.batch.v1.BatchService/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->taskGroupName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]'); + $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 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 createJobAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uid = 'uid115792'; + $priority = 1165461084; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setPriority($priority); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $jobTaskGroups = []; + $job->setTaskGroups($jobTaskGroups); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + $response = $gapicClient->createJobAsync($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.batch.v1.BatchService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnections/V1/AppConnectionsService.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnections/V1/AppConnectionsService.php new file mode 100644 index 0000000000000000000000000000000000000000..2f156c3df8dcfccafbb66474247118a245702fe9 GIT binary patch literal 6753 zcmb_h&2QVt6|W@QvB!zm8OMpDcDJk&Z0t0qV0VEonDuU{k7$iLwrb01Qm7y(YAmy% zNtUGSs)m4~m!bs<6zHjk-ipPd|3UwSTng;oa>`-RL;isld+M7ReoAyA*~ul=aOTbX z_`Tn}H}lD7_K}V52z6o-NA*ZYX!iy0hzPc0d6s4wLc4c(NE|`4j&0o_jwlG#U14Xp zDb%W4%^$#0*XlVMk%X>gbq!L|46D~EwMpMHJDTO#CDpby%QT7R>6Yo1PS)v&5*t!n z;+*Ij5!s#ynd&idZB-*ey-|KlJhh{GYOBt~w<=V8s~n1N$qDhTC+iOp(hSvg1^7~l zHs0r(pfe=EKfBj9bWLzQ)r0@;>aL=jx~Hp#{#)?Drf{elE&)lSa}RqavqYc^c1?|} ztO{HvoqN}|z-OC6pl*Y@5nR~XGCks$s?n+vS95gRvz!J@m8355Lg&+wl~sRRDo#HX zR=AFmG@|6D;5j`K-(3(K;`JQ!A=8@*7=(YdQk*Hk%;paRt%k( z-ehYY>BQ)i$&q@ZTh3%l_lOU)v6bAm%&yZjP2KFac5Mpp$&3tR$FzQ|y3fbgI9%J* z0nDCyY^Sefcv<^Y_t7DDIw2SyLAtGk;iJL4hh9BE^>>tKc$EthS;C4@!ivd+6;IX+ zxBNX-TZjCnVduG8_ITq3 zekvMVMzfaFA&%1S=cmKr;@>l7V-^)E zu%AZ~3I^gYAGiWq&dHtefHGlRK&exndzAV>`{Br>kasDU)n@7TZ?@J9@! z#&ZKPd{Yg>I#rH!*9FFAN#Gm*7cjm`404X~mjv2SKp5CL07mqsw)i@|%%JblBgr^P zM#O!0`1~9##_(r35j;gkQY+}gaX89yk`zUaNTsL7~?7Q5Mx}Fmd0UCL1CK1QS!4@G`?f3dWL2U zwM`&kQ|!d3P7tt!A>uX@Q!_oM&-3Osy4ulQ+fe%oI{~8e3@@Tw4_I#obYv`>!wod$ z^=*>B0z(TMn-|ui2|_rnS?C5p6Uuv5@F~RX*cKF6`B~Yqw(gB*hAB_dMA0rjQjM$TklgTRAvr8L07u)<5cbE=b1r2xvtqXm$f7I0H2l;LC?(Q`joM|k6QjUV@Hl!@O64#h4bBQE zEM0}EL@A7MTMo-;9#EhJzTy~sz=-ohboY(K>046VKvQ&cd;={upEYXA!Oni8R@r*A zRjV$3hmO`O4P~!Z-`d@gx0T0R^~FqK4b8{$0nek{bJFKE5Wa?{;ehY)#GaF~A7_d` zeB&0^&|DL?XzcAieYTh>DrlMk0WYKL`%SqytkG38TiL70&8;2K1h&4yeu1)C44)1f zRsJbQe^qPSH8yby&!Va7?$37?r={L&*%`k=!*wVueg%EKTRQXq8k7u+ryYz1e-3EF zAM3Lth0|0jd+Xg`1_A@9-Ue#ugpBv;d<@Y0}Ic`5rn)$hOl z=C9e0@CLo~Ipb~CW{8>lF|6Dl#t8m81L-x?S>W;nWHP)sF!I8kQBi&=vyLWV6+Ph2 zv1u6g_XqeNS+tbW)8I)wpRzu%?ft+%v7TBCbE)`6=7n4uE<@gucrWGFJs!CS$*djv z3B@V%OSO1`XiGzl7XAYKl+x}@2G_`eynoZ30ydXNSe z?>*S%P~r2-3-USfr%6uy1WS{1q6Bpg?KcaLU&y!5EnvQq#UszNU8z($Jw5de2(PZx zo_EBr=+~e=_YN)RxcsLnvvVsK5(DvO{#mC+jbQxh?;_z<)5Hvs?7VAgVOn z7Cafe&aQFUlEj2dQY2lHlJg}A=F8UDy>~4<@Ww8Zpo>Vgoogle.cloud.beyondcorp.appconnections.v1.AppConnection + */ +class AppConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Unique resource name of the AppConnection. + * The name is ignored when creating a AppConnection. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when the resource was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. An arbitrary user-provided name for the AppConnection. Cannot + * exceed 64 characters. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. A unique identifier for the instance generated by the + * system. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Required. The type of network connectivity used by the AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. Address of the remote application endpoint for the BeyondCorp + * AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint application_endpoint = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $application_endpoint = null; + /** + * Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are + * authorised to be associated with this AppConnection. + * + * Generated from protobuf field repeated string connectors = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $connectors; + /** + * Output only. The current state of the AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Gateway used by the AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway gateway = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gateway = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Unique resource name of the AppConnection. + * The name is ignored when creating a AppConnection. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when the resource was last modified. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Resource labels to represent user provided metadata. + * @type string $display_name + * Optional. An arbitrary user-provided name for the AppConnection. Cannot + * exceed 64 characters. + * @type string $uid + * Output only. A unique identifier for the instance generated by the + * system. + * @type int $type + * Required. The type of network connectivity used by the AppConnection. + * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\ApplicationEndpoint $application_endpoint + * Required. Address of the remote application endpoint for the BeyondCorp + * AppConnection. + * @type array|\Google\Protobuf\Internal\RepeatedField $connectors + * Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are + * authorised to be associated with this AppConnection. + * @type int $state + * Output only. The current state of the AppConnection. + * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway $gateway + * Optional. Gateway used by the AppConnection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Unique resource name of the AppConnection. + * The name is ignored when creating a AppConnection. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Unique resource name of the AppConnection. + * The name is ignored when creating a AppConnection. + * + * 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; + } + + /** + * Output only. Timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was last modified. + * + * 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. Timestamp when the resource was last modified. + * + * 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; + } + + /** + * Optional. Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 4 [(.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. An arbitrary user-provided name for the AppConnection. Cannot + * exceed 64 characters. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. An arbitrary user-provided name for the AppConnection. Cannot + * exceed 64 characters. + * + * Generated from protobuf field string display_name = 5 [(.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. A unique identifier for the instance generated by the + * system. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A unique identifier for the instance generated by the + * system. + * + * Generated from protobuf field string uid = 6 [(.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 type of network connectivity used by the AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of network connectivity used by the AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Address of the remote application endpoint for the BeyondCorp + * AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint application_endpoint = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\ApplicationEndpoint|null + */ + public function getApplicationEndpoint() + { + return $this->application_endpoint; + } + + public function hasApplicationEndpoint() + { + return isset($this->application_endpoint); + } + + public function clearApplicationEndpoint() + { + unset($this->application_endpoint); + } + + /** + * Required. Address of the remote application endpoint for the BeyondCorp + * AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint application_endpoint = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\ApplicationEndpoint $var + * @return $this + */ + public function setApplicationEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\ApplicationEndpoint::class); + $this->application_endpoint = $var; + + return $this; + } + + /** + * Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are + * authorised to be associated with this AppConnection. + * + * Generated from protobuf field repeated string connectors = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectors() + { + return $this->connectors; + } + + /** + * Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are + * authorised to be associated with this AppConnection. + * + * Generated from protobuf field repeated string connectors = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->connectors = $arr; + + return $this; + } + + /** + * Output only. The current state of the AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Gateway used by the AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway gateway = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway|null + */ + public function getGateway() + { + return $this->gateway; + } + + public function hasGateway() + { + return isset($this->gateway); + } + + public function clearGateway() + { + unset($this->gateway); + } + + /** + * Optional. Gateway used by the AppConnection. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway gateway = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway $var + * @return $this + */ + public function setGateway($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway::class); + $this->gateway = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/ApplicationEndpoint.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/ApplicationEndpoint.php new file mode 100644 index 000000000000..cc68ac49a44e --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/ApplicationEndpoint.php @@ -0,0 +1,104 @@ +google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint + */ +class ApplicationEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Hostname or IP address of the remote application endpoint. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $host = ''; + /** + * Required. Port of the remote application endpoint. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $port = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host + * Required. Hostname or IP address of the remote application endpoint. + * @type int $port + * Required. Port of the remote application endpoint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Hostname or IP address of the remote application endpoint. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Required. Hostname or IP address of the remote application endpoint. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Required. Port of the remote application endpoint. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Required. Port of the remote application endpoint. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ApplicationEndpoint::class, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection_ApplicationEndpoint::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway.php new file mode 100644 index 000000000000..6af8ac8c19f7 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway.php @@ -0,0 +1,181 @@ +google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway + */ +class Gateway extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of hosting used by the gateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Output only. Server-defined URI for this resource. + * + * Generated from protobuf field string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri = ''; + /** + * Output only. Ingress port reserved on the gateways for this + * AppConnection, if not specified or zero, the default port is 19443. + * + * Generated from protobuf field int32 ingress_port = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ingress_port = 0; + /** + * Required. AppGateway name in following format: + * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` + * + * Generated from protobuf field string app_gateway = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $app_gateway = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. The type of hosting used by the gateway. + * @type string $uri + * Output only. Server-defined URI for this resource. + * @type int $ingress_port + * Output only. Ingress port reserved on the gateways for this + * AppConnection, if not specified or zero, the default port is 19443. + * @type string $app_gateway + * Required. AppGateway name in following format: + * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of hosting used by the gateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of hosting used by the gateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Server-defined URI for this resource. + * + * Generated from protobuf field string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Output only. Server-defined URI for this resource. + * + * Generated from protobuf field string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Output only. Ingress port reserved on the gateways for this + * AppConnection, if not specified or zero, the default port is 19443. + * + * Generated from protobuf field int32 ingress_port = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getIngressPort() + { + return $this->ingress_port; + } + + /** + * Output only. Ingress port reserved on the gateways for this + * AppConnection, if not specified or zero, the default port is 19443. + * + * Generated from protobuf field int32 ingress_port = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setIngressPort($var) + { + GPBUtil::checkInt32($var); + $this->ingress_port = $var; + + return $this; + } + + /** + * Required. AppGateway name in following format: + * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` + * + * Generated from protobuf field string app_gateway = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAppGateway() + { + return $this->app_gateway; + } + + /** + * Required. AppGateway name in following format: + * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` + * + * Generated from protobuf field string app_gateway = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAppGateway($var) + { + GPBUtil::checkString($var, True); + $this->app_gateway = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Gateway::class, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection_Gateway::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway/Type.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway/Type.php new file mode 100644 index 000000000000..9f600d8afa1b --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway/Type.php @@ -0,0 +1,57 @@ +google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type + */ +class Type +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Gateway hosted in a GCP regional managed instance group. + * + * Generated from protobuf enum GCP_REGIONAL_MIG = 1; + */ + const GCP_REGIONAL_MIG = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::GCP_REGIONAL_MIG => 'GCP_REGIONAL_MIG', + ]; + + 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\BeyondCorp\AppConnections\V1\AppConnection_Gateway_Type::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/State.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/State.php new file mode 100644 index 000000000000..28c1781608b2 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/State.php @@ -0,0 +1,86 @@ +google.cloud.beyondcorp.appconnections.v1.AppConnection.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * AppConnection is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * AppConnection has been created. + * + * Generated from protobuf enum CREATED = 2; + */ + const CREATED = 2; + /** + * AppConnection's configuration is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * AppConnection is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * AppConnection is down and may be restored in the future. + * This happens when CCFE sends ProjectState = OFF. + * + * Generated from protobuf enum DOWN = 5; + */ + const DOWN = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::CREATED => 'CREATED', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::DOWN => 'DOWN', + ]; + + 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\BeyondCorp\AppConnections\V1\AppConnection_State::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Type.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Type.php new file mode 100644 index 000000000000..d3a6ffd1e4e5 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Type.php @@ -0,0 +1,59 @@ +google.cloud.beyondcorp.appconnections.v1.AppConnection.Type + */ +class Type +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * TCP Proxy based BeyondCorp AppConnection. API will default to this if + * unset. + * + * Generated from protobuf enum TCP_PROXY = 1; + */ + const TCP_PROXY = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::TCP_PROXY => 'TCP_PROXY', + ]; + + 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\BeyondCorp\AppConnections\V1\AppConnection_Type::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnectionOperationMetadata.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnectionOperationMetadata.php new file mode 100644 index 000000000000..e2ee3aedca33 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnectionOperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.beyondcorp.appconnections.v1.AppConnectionOperationMetadata + */ +class AppConnectionOperationMetadata 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\Beyondcorp\Appconnections\V1\AppConnectionsService::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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/CreateAppConnectionRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/CreateAppConnectionRequest.php new file mode 100644 index 000000000000..ef54860b1978 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/CreateAppConnectionRequest.php @@ -0,0 +1,295 @@ +google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest + */ +class CreateAppConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource project name of the AppConnection location using the + * form: `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. User-settable AppConnection resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string app_connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $app_connection_id = ''; + /** + * Required. A BeyondCorp AppConnection resource. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $app_connection = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource project name of the AppConnection location using the + * form: `projects/{project_id}/locations/{location_id}` + * Please see {@see AppConnectionsServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $appConnection Required. A BeyondCorp AppConnection resource. + * @param string $appConnectionId Optional. User-settable AppConnection resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\CreateAppConnectionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $appConnection, string $appConnectionId): self + { + return (new self()) + ->setParent($parent) + ->setAppConnection($appConnection) + ->setAppConnectionId($appConnectionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource project name of the AppConnection location using the + * form: `projects/{project_id}/locations/{location_id}` + * @type string $app_connection_id + * Optional. User-settable AppConnection resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $app_connection + * Required. A BeyondCorp AppConnection resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource project name of the AppConnection location using the + * form: `projects/{project_id}/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 project name of the AppConnection location using the + * form: `projects/{project_id}/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. User-settable AppConnection resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string app_connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAppConnectionId() + { + return $this->app_connection_id; + } + + /** + * Optional. User-settable AppConnection resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string app_connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAppConnectionId($var) + { + GPBUtil::checkString($var, True); + $this->app_connection_id = $var; + + return $this; + } + + /** + * Required. A BeyondCorp AppConnection resource. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection|null + */ + public function getAppConnection() + { + return $this->app_connection; + } + + public function hasAppConnection() + { + return isset($this->app_connection); + } + + public function clearAppConnection() + { + unset($this->app_connection); + } + + /** + * Required. A BeyondCorp AppConnection resource. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $var + * @return $this + */ + public function setAppConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection::class); + $this->app_connection = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/DeleteAppConnectionRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/DeleteAppConnectionRequest.php new file mode 100644 index 000000000000..33d06fe0c0a5 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/DeleteAppConnectionRequest.php @@ -0,0 +1,198 @@ +google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest + */ +class DeleteAppConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $name Required. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + * Please see {@see AppConnectionsServiceClient::appConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\DeleteAppConnectionRequest + * + * @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. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_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. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * 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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/GetAppConnectionRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/GetAppConnectionRequest.php new file mode 100644 index 000000000000..cbda1a28657b --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/GetAppConnectionRequest.php @@ -0,0 +1,86 @@ +google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest + */ +class GetAppConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. BeyondCorp AppConnection name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. BeyondCorp AppConnection name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + * Please see {@see AppConnectionsServiceClient::appConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\GetAppConnectionRequest + * + * @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. BeyondCorp AppConnection name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. BeyondCorp AppConnection name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_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. BeyondCorp AppConnection name using the form: + * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsRequest.php new file mode 100644 index 000000000000..f2beaa7375a7 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsRequest.php @@ -0,0 +1,258 @@ +google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest + */ +class ListAppConnectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the AppConnection location using the form: + * `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to + * determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous + * ListAppConnectionsRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A filter specifying constraints of a list operation. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * 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 AppConnection location using the form: + * `projects/{project_id}/locations/{location_id}` + * Please see {@see AppConnectionsServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\ListAppConnectionsRequest + * + * @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 AppConnection location using the form: + * `projects/{project_id}/locations/{location_id}` + * @type int $page_size + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to + * determine if there are more instances left to be queried. + * @type string $page_token + * Optional. The next_page_token value returned from a previous + * ListAppConnectionsRequest, if any. + * @type string $filter + * Optional. A filter specifying constraints of a list operation. + * @type string $order_by + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the AppConnection location using the form: + * `projects/{project_id}/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 AppConnection location using the form: + * `projects/{project_id}/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. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to + * determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to + * determine if there are more instances left to be queried. + * + * 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. The next_page_token value returned from a previous + * ListAppConnectionsRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous + * ListAppConnectionsRequest, if any. + * + * 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. A filter specifying constraints of a list operation. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter specifying constraints of a list operation. + * + * 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. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * 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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsResponse.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsResponse.php new file mode 100644 index 000000000000..31f3294ce77d --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsResponse.php @@ -0,0 +1,139 @@ +google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse + */ +class ListAppConnectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of BeyondCorp AppConnections in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connections = 1; + */ + private $app_connections; + /** + * A 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 = ''; + /** + * A list of 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\BeyondCorp\AppConnections\V1\AppConnection>|\Google\Protobuf\Internal\RepeatedField $app_connections + * A list of BeyondCorp AppConnections in the project. + * @type string $next_page_token + * A 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 + * A list of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * A list of BeyondCorp AppConnections in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connections = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppConnections() + { + return $this->app_connections; + } + + /** + * A list of BeyondCorp AppConnections in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connections = 1; + * @param array<\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection::class); + $this->app_connections = $arr; + + return $this; + } + + /** + * A 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; + } + + /** + * A 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; + } + + /** + * A list of 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; + } + + /** + * A list of 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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsRequest.php new file mode 100644 index 000000000000..d35e11b22f80 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsRequest.php @@ -0,0 +1,220 @@ +google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest + */ +class ResolveAppConnectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the AppConnection location using the form: + * `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. BeyondCorp Connector name of the connector associated with those + * AppConnections using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * + * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $app_connector_id = ''; + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous + * ResolveAppConnectionsResponse, if any. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the AppConnection location using the form: + * `projects/{project_id}/locations/{location_id}` + * Please see {@see AppConnectionsServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsRequest + * + * @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 AppConnection location using the form: + * `projects/{project_id}/locations/{location_id}` + * @type string $app_connector_id + * Required. BeyondCorp Connector name of the connector associated with those + * AppConnections using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * @type int $page_size + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * Optional. The next_page_token value returned from a previous + * ResolveAppConnectionsResponse, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the AppConnection location using the form: + * `projects/{project_id}/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 AppConnection location using the form: + * `projects/{project_id}/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. BeyondCorp Connector name of the connector associated with those + * AppConnections using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * + * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAppConnectorId() + { + return $this->app_connector_id; + } + + /** + * Required. BeyondCorp Connector name of the connector associated with those + * AppConnections using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * + * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAppConnectorId($var) + { + GPBUtil::checkString($var, True); + $this->app_connector_id = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * 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. The next_page_token value returned from a previous + * ResolveAppConnectionsResponse, if any. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous + * ResolveAppConnectionsResponse, if any. + * + * 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; + } + +} + diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse.php new file mode 100644 index 000000000000..9c3bf3d32526 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse.php @@ -0,0 +1,139 @@ +google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse + */ +class ResolveAppConnectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of BeyondCorp AppConnections with details in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails app_connection_details = 1; + */ + private $app_connection_details; + /** + * A 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 = ''; + /** + * A list of 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\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse\AppConnectionDetails>|\Google\Protobuf\Internal\RepeatedField $app_connection_details + * A list of BeyondCorp AppConnections with details in the project. + * @type string $next_page_token + * A 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 + * A list of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * A list of BeyondCorp AppConnections with details in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails app_connection_details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppConnectionDetails() + { + return $this->app_connection_details; + } + + /** + * A list of BeyondCorp AppConnections with details in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails app_connection_details = 1; + * @param array<\Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse\AppConnectionDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppConnectionDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse\AppConnectionDetails::class); + $this->app_connection_details = $arr; + + return $this; + } + + /** + * A 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; + } + + /** + * A 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; + } + + /** + * A list of 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; + } + + /** + * A list of 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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse/AppConnectionDetails.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse/AppConnectionDetails.php new file mode 100644 index 000000000000..9ca817de9125 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse/AppConnectionDetails.php @@ -0,0 +1,118 @@ +google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails + */ +class AppConnectionDetails extends \Google\Protobuf\Internal\Message +{ + /** + * A BeyondCorp AppConnection in the project. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 1; + */ + protected $app_connection = null; + /** + * If type=GCP_REGIONAL_MIG, contains most recent VM instances, like + * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. + * + * Generated from protobuf field repeated string recent_mig_vms = 2; + */ + private $recent_mig_vms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $app_connection + * A BeyondCorp AppConnection in the project. + * @type array|\Google\Protobuf\Internal\RepeatedField $recent_mig_vms + * If type=GCP_REGIONAL_MIG, contains most recent VM instances, like + * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * A BeyondCorp AppConnection in the project. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 1; + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection|null + */ + public function getAppConnection() + { + return $this->app_connection; + } + + public function hasAppConnection() + { + return isset($this->app_connection); + } + + public function clearAppConnection() + { + unset($this->app_connection); + } + + /** + * A BeyondCorp AppConnection in the project. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 1; + * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $var + * @return $this + */ + public function setAppConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection::class); + $this->app_connection = $var; + + return $this; + } + + /** + * If type=GCP_REGIONAL_MIG, contains most recent VM instances, like + * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. + * + * Generated from protobuf field repeated string recent_mig_vms = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecentMigVms() + { + return $this->recent_mig_vms; + } + + /** + * If type=GCP_REGIONAL_MIG, contains most recent VM instances, like + * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. + * + * Generated from protobuf field repeated string recent_mig_vms = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecentMigVms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->recent_mig_vms = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AppConnectionDetails::class, \Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse_AppConnectionDetails::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/UpdateAppConnectionRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/UpdateAppConnectionRequest.php new file mode 100644 index 000000000000..84b98cfce15c --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/UpdateAppConnectionRequest.php @@ -0,0 +1,317 @@ +google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest + */ +class UpdateAppConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnection]: + * * `labels` + * * `display_name` + * * `application_endpoint` + * * `connectors` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. AppConnection message with updated fields. Only supported fields + * specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $app_connection = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. If set as true, will create the resource if it is not found. + * + * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $appConnection Required. AppConnection message with updated fields. Only supported fields + * specified in update_mask are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnection]: + * * `labels` + * * `display_name` + * * `application_endpoint` + * * `connectors` + * + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\UpdateAppConnectionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $appConnection, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAppConnection($appConnection) + ->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. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnection]: + * * `labels` + * * `display_name` + * * `application_endpoint` + * * `connectors` + * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $app_connection + * Required. AppConnection message with updated fields. Only supported fields + * specified in update_mask are updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * @type bool $allow_missing + * Optional. If set as true, will create the resource if it is not found. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnection]: + * * `labels` + * * `display_name` + * * `application_endpoint` + * * `connectors` + * + * 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. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnection]: + * * `labels` + * * `display_name` + * * `application_endpoint` + * * `connectors` + * + * 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. AppConnection message with updated fields. Only supported fields + * specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection|null + */ + public function getAppConnection() + { + return $this->app_connection; + } + + public function hasAppConnection() + { + return isset($this->app_connection); + } + + public function clearAppConnection() + { + unset($this->app_connection); + } + + /** + * Required. AppConnection message with updated fields. Only supported fields + * specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $var + * @return $this + */ + public function setAppConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection::class); + $this->app_connection = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * 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; + } + + /** + * Optional. If set as true, will create the resource if it is not found. + * + * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. If set as true, will create the resource if it is not found. + * + * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/create_app_connection.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/create_app_connection.php new file mode 100644 index 000000000000..84acfb20a8fb --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/create_app_connection.php @@ -0,0 +1,114 @@ +setHost($appConnectionApplicationEndpointHost) + ->setPort($appConnectionApplicationEndpointPort); + $appConnection = (new AppConnection()) + ->setName($appConnectionName) + ->setType($appConnectionType) + ->setApplicationEndpoint($appConnectionApplicationEndpoint); + $request = (new CreateAppConnectionRequest()) + ->setParent($formattedParent) + ->setAppConnection($appConnection); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appConnectionsServiceClient->createAppConnection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AppConnection $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 = AppConnectionsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $appConnectionName = '[NAME]'; + $appConnectionType = Type::TYPE_UNSPECIFIED; + $appConnectionApplicationEndpointHost = '[HOST]'; + $appConnectionApplicationEndpointPort = 0; + + create_app_connection_sample( + $formattedParent, + $appConnectionName, + $appConnectionType, + $appConnectionApplicationEndpointHost, + $appConnectionApplicationEndpointPort + ); +} +// [END beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/delete_app_connection.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/delete_app_connection.php new file mode 100644 index 000000000000..8c7725f0d034 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/delete_app_connection.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appConnectionsServiceClient->deleteAppConnection($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 = AppConnectionsServiceClient::appConnectionName( + '[PROJECT]', + '[LOCATION]', + '[APP_CONNECTION]' + ); + + delete_app_connection_sample($formattedName); +} +// [END beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_app_connection.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_app_connection.php new file mode 100644 index 000000000000..0482a7e89fc6 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_app_connection.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AppConnection $response */ + $response = $appConnectionsServiceClient->getAppConnection($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 = AppConnectionsServiceClient::appConnectionName( + '[PROJECT]', + '[LOCATION]', + '[APP_CONNECTION]' + ); + + get_app_connection_sample($formattedName); +} +// [END beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..b5bc9e67f380 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $appConnectionsServiceClient->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 beyondcorp_v1_generated_AppConnectionsService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_location.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_location.php new file mode 100644 index 000000000000..71164e34a912 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/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 beyondcorp_v1_generated_AppConnectionsService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_app_connections.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_app_connections.php new file mode 100644 index 000000000000..2e52e3057db4 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_app_connections.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $appConnectionsServiceClient->listAppConnections($request); + + /** @var AppConnection $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 = AppConnectionsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_app_connections_sample($formattedParent); +} +// [END beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_locations.php new file mode 100644 index 000000000000..632c9a180f99 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/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 beyondcorp_v1_generated_AppConnectionsService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/resolve_app_connections.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/resolve_app_connections.php new file mode 100644 index 000000000000..2f6042c74432 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/resolve_app_connections.php @@ -0,0 +1,91 @@ +setParent($formattedParent) + ->setAppConnectorId($formattedAppConnectorId); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $appConnectionsServiceClient->resolveAppConnections($request); + + /** @var AppConnectionDetails $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 = AppConnectionsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedAppConnectorId = AppConnectionsServiceClient::appConnectorName( + '[PROJECT]', + '[LOCATION]', + '[APP_CONNECTOR]' + ); + + resolve_app_connections_sample($formattedParent, $formattedAppConnectorId); +} +// [END beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..a0839d476b56 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/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 = $appConnectionsServiceClient->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 beyondcorp_v1_generated_AppConnectionsService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..d58bf6839467 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/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 = $appConnectionsServiceClient->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 beyondcorp_v1_generated_AppConnectionsService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/update_app_connection.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/update_app_connection.php new file mode 100644 index 000000000000..82b501555371 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/update_app_connection.php @@ -0,0 +1,110 @@ +setHost($appConnectionApplicationEndpointHost) + ->setPort($appConnectionApplicationEndpointPort); + $appConnection = (new AppConnection()) + ->setName($appConnectionName) + ->setType($appConnectionType) + ->setApplicationEndpoint($appConnectionApplicationEndpoint); + $request = (new UpdateAppConnectionRequest()) + ->setUpdateMask($updateMask) + ->setAppConnection($appConnection); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appConnectionsServiceClient->updateAppConnection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AppConnection $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 +{ + $appConnectionName = '[NAME]'; + $appConnectionType = Type::TYPE_UNSPECIFIED; + $appConnectionApplicationEndpointHost = '[HOST]'; + $appConnectionApplicationEndpointPort = 0; + + update_app_connection_sample( + $appConnectionName, + $appConnectionType, + $appConnectionApplicationEndpointHost, + $appConnectionApplicationEndpointPort + ); +} +// [END beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/Client/AppConnectionsServiceClient.php b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/Client/AppConnectionsServiceClient.php new file mode 100644 index 000000000000..10e4c80aa2e1 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/Client/AppConnectionsServiceClient.php @@ -0,0 +1,668 @@ + createAppConnectionAsync(CreateAppConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAppConnectionAsync(DeleteAppConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAppConnectionAsync(GetAppConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAppConnectionsAsync(ListAppConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface resolveAppConnectionsAsync(ResolveAppConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAppConnectionAsync(UpdateAppConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class AppConnectionsServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/app_connections_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/app_connections_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/app_connections_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/app_connections_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * app_connection resource. + * + * @param string $project + * @param string $location + * @param string $appConnection + * + * @return string The formatted app_connection resource. + */ + public static function appConnectionName(string $project, string $location, string $appConnection): string + { + return self::getPathTemplate('appConnection')->render([ + 'project' => $project, + 'location' => $location, + 'app_connection' => $appConnection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * app_connector resource. + * + * @param string $project + * @param string $location + * @param string $appConnector + * + * @return string The formatted app_connector resource. + */ + public static function appConnectorName(string $project, string $location, string $appConnector): string + { + return self::getPathTemplate('appConnector')->render([ + 'project' => $project, + 'location' => $location, + 'app_connector' => $appConnector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a app_gateway + * resource. + * + * @param string $project + * @param string $location + * @param string $appGateway + * + * @return string The formatted app_gateway resource. + */ + public static function appGatewayName(string $project, string $location, string $appGateway): string + { + return self::getPathTemplate('appGateway')->render([ + 'project' => $project, + 'location' => $location, + 'app_gateway' => $appGateway, + ]); + } + + /** + * 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 + * - appConnection: projects/{project}/locations/{location}/appConnections/{app_connection} + * - appConnector: projects/{project}/locations/{location}/appConnectors/{app_connector} + * - appGateway: projects/{project}/locations/{location}/appGateways/{app_gateway} + * - 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 'beyondcorp.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 new AppConnection in a given project and location. + * + * The async variant is + * {@see AppConnectionsServiceClient::createAppConnectionAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/create_app_connection.php + * + * @param CreateAppConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createAppConnection(CreateAppConnectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAppConnection', $request, $callOptions)->wait(); + } + + /** + * Deletes a single AppConnection. + * + * The async variant is + * {@see AppConnectionsServiceClient::deleteAppConnectionAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/delete_app_connection.php + * + * @param DeleteAppConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteAppConnection(DeleteAppConnectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAppConnection', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single AppConnection. + * + * The async variant is {@see AppConnectionsServiceClient::getAppConnectionAsync()} + * . + * + * @example samples/V1/AppConnectionsServiceClient/get_app_connection.php + * + * @param GetAppConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AppConnection + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAppConnection(GetAppConnectionRequest $request, array $callOptions = []): AppConnection + { + return $this->startApiCall('GetAppConnection', $request, $callOptions)->wait(); + } + + /** + * Lists AppConnections in a given project and location. + * + * The async variant is + * {@see AppConnectionsServiceClient::listAppConnectionsAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/list_app_connections.php + * + * @param ListAppConnectionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAppConnections(ListAppConnectionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAppConnections', $request, $callOptions); + } + + /** + * Resolves AppConnections details for a given AppConnector. + * An internal method called by a connector to find AppConnections to connect + * to. + * + * The async variant is + * {@see AppConnectionsServiceClient::resolveAppConnectionsAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/resolve_app_connections.php + * + * @param ResolveAppConnectionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 resolveAppConnections(ResolveAppConnectionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ResolveAppConnections', $request, $callOptions); + } + + /** + * Updates the parameters of a single AppConnection. + * + * The async variant is + * {@see AppConnectionsServiceClient::updateAppConnectionAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/update_app_connection.php + * + * @param UpdateAppConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateAppConnection(UpdateAppConnectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAppConnection', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AppConnectionsServiceClient::getLocationAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/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 AppConnectionsServiceClient::listLocationsAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/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); + } + + /** + * 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 AppConnectionsServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/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 AppConnectionsServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/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 AppConnectionsServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/AppConnectionsServiceClient/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(); + } +} diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..68ef8018f5ae --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.beyondcorp.appconnections.v1", + "libraryPackage": "Google\\Cloud\\BeyondCorp\\AppConnections\\V1", + "services": { + "AppConnectionsService": { + "clients": { + "grpc": { + "libraryClient": "AppConnectionsServiceGapicClient", + "rpcs": { + "CreateAppConnection": { + "methods": [ + "createAppConnection" + ] + }, + "DeleteAppConnection": { + "methods": [ + "deleteAppConnection" + ] + }, + "GetAppConnection": { + "methods": [ + "getAppConnection" + ] + }, + "ListAppConnections": { + "methods": [ + "listAppConnections" + ] + }, + "ResolveAppConnections": { + "methods": [ + "resolveAppConnections" + ] + }, + "UpdateAppConnection": { + "methods": [ + "updateAppConnection" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_client_config.json b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_client_config.json new file mode 100644 index 000000000000..96222a9ebc4f --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_client_config.json @@ -0,0 +1,77 @@ +{ + "interfaces": { + "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService": { + "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": { + "CreateAppConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteAppConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetAppConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAppConnections": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ResolveAppConnections": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateAppConnection": { + "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" + }, + "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" + } + } + } + } +} diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_descriptor_config.php b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_descriptor_config.php new file mode 100644 index 000000000000..2362b01c1024 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_descriptor_config.php @@ -0,0 +1,217 @@ + [ + 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService' => [ + 'CreateAppConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnectionOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAppConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnectionOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAppConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnectionOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'app_connection.name', + 'fieldAccessors' => [ + 'getAppConnection', + 'getName', + ], + ], + ], + ], + 'GetAppConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAppConnections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAppConnections', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\AppConnections\V1\ListAppConnectionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ResolveAppConnections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAppConnectionDetails', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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', + ], + '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', + ], + 'templateMap' => [ + 'appConnection' => 'projects/{project}/locations/{location}/appConnections/{app_connection}', + 'appConnector' => 'projects/{project}/locations/{location}/appConnectors/{app_connector}', + 'appGateway' => 'projects/{project}/locations/{location}/appGateways/{app_gateway}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_rest_client_config.php b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_rest_client_config.php new file mode 100644 index 000000000000..ddb0a23de5ad --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_rest_client_config.php @@ -0,0 +1,271 @@ + [ + 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService' => [ + 'CreateAppConnection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnections', + 'body' => 'app_connection', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAppConnection' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/appConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAppConnection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/appConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAppConnections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResolveAppConnections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnections:resolve', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAppConnection' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{app_connection.name=projects/*/locations/*/appConnections/*}', + 'body' => 'app_connection', + 'placeholders' => [ + 'app_connection.name' => [ + 'getters' => [ + 'getAppConnection', + '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/*/appConnections/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpAppConnections/v1/tests/Unit/V1/Client/AppConnectionsServiceClientTest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/tests/Unit/V1/Client/AppConnectionsServiceClientTest.php new file mode 100644 index 000000000000..0ee8d7ec041c --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnections/v1/tests/Unit/V1/Client/AppConnectionsServiceClientTest.php @@ -0,0 +1,1146 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AppConnectionsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AppConnectionsServiceClient($options); + } + + /** @test */ + public function createAppConnectionTest() + { + $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/createAppConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new AppConnection(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAppConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $appConnection = new AppConnection(); + $appConnectionName = 'appConnectionName-1608104182'; + $appConnection->setName($appConnectionName); + $appConnectionType = Type::TYPE_UNSPECIFIED; + $appConnection->setType($appConnectionType); + $appConnectionApplicationEndpoint = new ApplicationEndpoint(); + $applicationEndpointHost = 'applicationEndpointHost1976079949'; + $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); + $applicationEndpointPort = 1976318246; + $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); + $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); + $request = (new CreateAppConnectionRequest()) + ->setParent($formattedParent) + ->setAppConnection($appConnection); + $response = $gapicClient->createAppConnection($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.beyondcorp.appconnections.v1.AppConnectionsService/CreateAppConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAppConnection(); + $this->assertProtobufEquals($appConnection, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAppConnectionTest'); + $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 createAppConnectionExceptionTest() + { + $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/createAppConnectionTest'); + $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]'); + $appConnection = new AppConnection(); + $appConnectionName = 'appConnectionName-1608104182'; + $appConnection->setName($appConnectionName); + $appConnectionType = Type::TYPE_UNSPECIFIED; + $appConnection->setType($appConnectionType); + $appConnectionApplicationEndpoint = new ApplicationEndpoint(); + $applicationEndpointHost = 'applicationEndpointHost1976079949'; + $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); + $applicationEndpointPort = 1976318246; + $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); + $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); + $request = (new CreateAppConnectionRequest()) + ->setParent($formattedParent) + ->setAppConnection($appConnection); + $response = $gapicClient->createAppConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAppConnectionTest'); + 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 deleteAppConnectionTest() + { + $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/deleteAppConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAppConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->appConnectionName('[PROJECT]', '[LOCATION]', '[APP_CONNECTION]'); + $request = (new DeleteAppConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAppConnection($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.beyondcorp.appconnections.v1.AppConnectionsService/DeleteAppConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAppConnectionTest'); + $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 deleteAppConnectionExceptionTest() + { + $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/deleteAppConnectionTest'); + $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->appConnectionName('[PROJECT]', '[LOCATION]', '[APP_CONNECTION]'); + $request = (new DeleteAppConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAppConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAppConnectionTest'); + 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 getAppConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new AppConnection(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->appConnectionName('[PROJECT]', '[LOCATION]', '[APP_CONNECTION]'); + $request = (new GetAppConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->getAppConnection($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.beyondcorp.appconnections.v1.AppConnectionsService/GetAppConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAppConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->appConnectionName('[PROJECT]', '[LOCATION]', '[APP_CONNECTION]'); + $request = (new GetAppConnectionRequest()) + ->setName($formattedName); + try { + $gapicClient->getAppConnection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAppConnectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $appConnectionsElement = new AppConnection(); + $appConnections = [ + $appConnectionsElement, + ]; + $expectedResponse = new ListAppConnectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAppConnections($appConnections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAppConnectionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAppConnections($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAppConnections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.beyondcorp.appconnections.v1.AppConnectionsService/ListAppConnections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAppConnectionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListAppConnectionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAppConnections($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resolveAppConnectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $appConnectionDetailsElement = new AppConnectionDetails(); + $appConnectionDetails = [ + $appConnectionDetailsElement, + ]; + $expectedResponse = new ResolveAppConnectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAppConnectionDetails($appConnectionDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedAppConnectorId = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); + $request = (new ResolveAppConnectionsRequest()) + ->setParent($formattedParent) + ->setAppConnectorId($formattedAppConnectorId); + $response = $gapicClient->resolveAppConnections($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAppConnectionDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.beyondcorp.appconnections.v1.AppConnectionsService/ResolveAppConnections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAppConnectorId(); + $this->assertProtobufEquals($formattedAppConnectorId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resolveAppConnectionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $formattedAppConnectorId = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); + $request = (new ResolveAppConnectionsRequest()) + ->setParent($formattedParent) + ->setAppConnectorId($formattedAppConnectorId); + try { + $gapicClient->resolveAppConnections($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAppConnectionTest() + { + $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/updateAppConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new AppConnection(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAppConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $appConnection = new AppConnection(); + $appConnectionName = 'appConnectionName-1608104182'; + $appConnection->setName($appConnectionName); + $appConnectionType = Type::TYPE_UNSPECIFIED; + $appConnection->setType($appConnectionType); + $appConnectionApplicationEndpoint = new ApplicationEndpoint(); + $applicationEndpointHost = 'applicationEndpointHost1976079949'; + $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); + $applicationEndpointPort = 1976318246; + $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); + $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); + $request = (new UpdateAppConnectionRequest()) + ->setUpdateMask($updateMask) + ->setAppConnection($appConnection); + $response = $gapicClient->updateAppConnection($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.beyondcorp.appconnections.v1.AppConnectionsService/UpdateAppConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getAppConnection(); + $this->assertProtobufEquals($appConnection, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAppConnectionTest'); + $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 updateAppConnectionExceptionTest() + { + $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/updateAppConnectionTest'); + $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(); + $appConnection = new AppConnection(); + $appConnectionName = 'appConnectionName-1608104182'; + $appConnection->setName($appConnectionName); + $appConnectionType = Type::TYPE_UNSPECIFIED; + $appConnection->setType($appConnectionType); + $appConnectionApplicationEndpoint = new ApplicationEndpoint(); + $applicationEndpointHost = 'applicationEndpointHost1976079949'; + $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); + $applicationEndpointPort = 1976318246; + $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); + $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); + $request = (new UpdateAppConnectionRequest()) + ->setUpdateMask($updateMask) + ->setAppConnection($appConnection); + $response = $gapicClient->updateAppConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAppConnectionTest'); + 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 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 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 createAppConnectionAsyncTest() + { + $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/createAppConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new AppConnection(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAppConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $appConnection = new AppConnection(); + $appConnectionName = 'appConnectionName-1608104182'; + $appConnection->setName($appConnectionName); + $appConnectionType = Type::TYPE_UNSPECIFIED; + $appConnection->setType($appConnectionType); + $appConnectionApplicationEndpoint = new ApplicationEndpoint(); + $applicationEndpointHost = 'applicationEndpointHost1976079949'; + $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); + $applicationEndpointPort = 1976318246; + $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); + $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); + $request = (new CreateAppConnectionRequest()) + ->setParent($formattedParent) + ->setAppConnection($appConnection); + $response = $gapicClient->createAppConnectionAsync($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.beyondcorp.appconnections.v1.AppConnectionsService/CreateAppConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAppConnection(); + $this->assertProtobufEquals($appConnection, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAppConnectionTest'); + $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/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorInstanceConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorInstanceConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..b82fc926871c931d6c7fabc36850f5f3cbcc0c4d GIT binary patch literal 1743 zcmb_c-A)rh6t=~n3?w8A7Zo**NJ2?qn_|3h0Zj{18x<+1Y8CWIHqN&XQEa zL--mziZ9@;*WURC&d+vRY^z+zP087FzVDnf-}!c5igN*;zy@I?Mv{au=tFre+I(JQQwY)tzXt|~Lsdni%nIthok$*rE98;mT(o(6O z*CjH41sy4GWV9NNc3|1|=y_vJ?m-!+WRxAkn8-9{JEm_9aGC$-PgrP8Q2&sUD6Ern zbU}ISdBdrOAd^b-!D_5Oxyr0!>jljQuZ3Yg=b@5RIqyvOxek8a0dN1OmYlLhbB!|H zp)%cT%5*QPEB7*9qe1mp6~y{hkgH#dU}d_PoCjbrA)ivBh0M}kK;lvX7RodAnIE;H zvjrCaka?-7zRqtiyIF4oMptdo`3RO6m$XB%5+!HZWt3)2$?l-!pX0bkBOq4v&Ks~m zd#F3Ow$g2b`RwMHO!t7&y`|RdaV-`W(!U4C*X{1&LyHpl!1}o35kkB!h@# zQT?QI^{XP-RAzbOG3$?}%gWqVt8n(-zV$%IyjSV+=@yFwwJxiM$!u2yJJ-Z6f~#V= zVa(L-)U{^1uMFEA?I&?htKSBxerCLx^Xg<@Td$Hs#^WpR{aM_!$ew53!t;jMo_8(X g^G>V5tkM3{_1p$Ft(}dy-&E%_nbw~!!6g8{0gEM6{{R30 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorsService.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorsService.php new file mode 100644 index 0000000000000000000000000000000000000000..f9d70472c21985498eaaaaca4257aba3c2a21f78 GIT binary patch literal 6117 zcmb_g&2JM&6vuWFl1T_*DBu_&wuXXMn6@RU^W3t@MC+YE$*p`Z5z2mdbXuA-Z|r>lnk3E00Rv{b_-AgF(Bt8HqYZkYnzux@Ika82Mc z>DtS-1$Zq9fwDCUA;4E(F+Jj#s!^{HS95e5fT+PzN!lh}2s|ArT=S2m;`EkK;5tfD zpOQ<0=d?-mbU|>4*LKWXOm8Y+Km1i60Hti}b=fp6ih^ajlGL@SE8v#D=5Q_wna41Hpt?_zpB?Vq(jgE%b=Mxem$Ci&9o^@)+-!zaz7L6_5R#8l z@hbZH3aY-541o(=jK~s=*iAGd$8e6()CVN}El>jlwJd-4C4aZkKMcfDxLxEti7HV_2gL1VV+0JzzdkSa`+#20e< zU%7yTu8s!G>8~2WnRcBd=4Qt?paTWnawcSY~nN; zYv~50)a*!i@C+KaoF;LUMkhNO4(Gp4q1geNyEddeg4fVAkS1~&feD$y?skwsX-I?G@5Li4pFrowP6r2CR3QmKSF1hNet5f(%Wc+UW0K!Q9?lT zpQX`k84mMERJlO*>$>X#nu%ei=uPIe3GTHGbRss*9Cu_ysmwHGg2Ty14~sZGhfeIl zwG9;lQ7qHoo*!q5pj z=6%Ld!+qnv0OKmeAcKv2E&BAJ&G^e*+oup!)>r876gs^@Y|HUBp`d7o$)VayhggnC zN@)zh$MPRz+)%(rFXBP0N(lU~$I(=jPxw?UR2f}?TN(>Lh2~LT)qZY;_bXK=gS(7m zyQn^c7}>MyF&Z<}1~FU+3!1q~0fi5}9b=hGTxCM4rss6HvuDv%Q+I7c?IwGII=1q4DxYRo+@zTb@aQwBzgxrqXokVXeZaGW4rbU9GZ( zBX}H*RMsD_&5TOUOW8`C52}!%KZF;hTYTpK+AkWG#_Qzbv*71GeQSnQJ}i!1P5b%J z)96Apn!{QoRFS6&96N7FRa z+O7iCxeIkux7x|zOX#eBQIe*j(HD(jFicpmvQ(YHSu_cSm;!=bcvY~FX zWiCRIxgKiZ-%{vgPc??`C0DLzYhd0G$s`JV{@#JiD!`aMG!MVRnjW6d?c;CK2=^C( zcnG}vcL!Eo2yltKJH#+{^53PN%h!9Z$^Q?t1Nj~9toc}g#=oHUV{nx6!@F0C7p3@H zK&QVr90r~K-3ih8{s`#I#$kz6t_+dd;$24g*eY=ty7c1nPYU7w`f?b2`gbS9r}JFC ziO%@%udooW?%G}lAI73c%*=6;3$e6{WE@MiFJs3N_V zV^y`#(U4*9+BO+1#m{c ze@YjYS*KYn(@wL#6SA4YaJXl)yyV8DJnl7%#x{Gcd8q+V+^IWndG0~FL rl`TmzGbQQKLSu|k|Hjp@jW*9azL5qotpjvzKy#R_Xk7)~Xo{a=al$QjuR88zjGLqvN+2cw9 zbtkNV4X_7R!8eOQjP2M-`Vg=DIJVC{bMC#z=jaWeaPS1yi9=j0hy{l;C?*7QmkDMv z8xH-^h`7*XQ%-H-Y7kahu-WRtYNgS8BuhQ!yCy+!%-Gl_1=D7}RTz>Pb1aj&yns13 znd1;sFxM-b6$>tjN=~UWVp@0*01loKk7JX-db{+F2y9`2je5vwlmkwqlyDmQGN&;p z9s*$6*z;g#&fSpI;1huI$NiyAP3Q?M@!o`egZZ2wft4*EtMz2L$KIKjVrK>YN%iN^Gk{Cisjp7okO03zDl! zlg4ys_77D(DmN?elwVyNj`787Iv<*DS;>rQ(r{|hRnX%u___{`{>N#G8dYndPql?l zwH2RgXT_cE`8lCOcG-){U67_$J_S?iW-0SsPb)RB z9<1B<@@e_-&cQ3~PlahG1lwZL4Xc%BU?cvZ@)^mrb#OmsiiK-(af%Ao0+IQ(5VLa$ zldMT8gN)}7^EY8elKq9O<$j-2kX@1a0BoOB^|!r~({4}i^}DD2X184}H)@S)C3i#F z0=J^q?{g{THrVVprU(#wl3@|MWFf9tOvJ6E{23R=> zMQu?07DJ7B*v-=}02@KvEzpL{yC3QOh#8@f8leR@LMw2D2F2leXoZ)%$;Y%G11GD?VZa1OvPVgoogle.cloud.beyondcorp.appconnectors.v1.AppConnector + */ +class AppConnector extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Unique resource name of the AppConnector. + * The name is ignored when creating a AppConnector. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when the resource was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. An arbitrary user-provided name for the AppConnector. Cannot + * exceed 64 characters. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. A unique identifier for the instance generated by the + * system. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The current state of the AppConnector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Principal information about the Identity of the AppConnector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo principal_info = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $principal_info = null; + /** + * Optional. Resource info of the connector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Unique resource name of the AppConnector. + * The name is ignored when creating a AppConnector. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when the resource was last modified. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Resource labels to represent user provided metadata. + * @type string $display_name + * Optional. An arbitrary user-provided name for the AppConnector. Cannot + * exceed 64 characters. + * @type string $uid + * Output only. A unique identifier for the instance generated by the + * system. + * @type int $state + * Output only. The current state of the AppConnector. + * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo $principal_info + * Required. Principal information about the Identity of the AppConnector. + * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $resource_info + * Optional. Resource info of the connector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Unique resource name of the AppConnector. + * The name is ignored when creating a AppConnector. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Unique resource name of the AppConnector. + * The name is ignored when creating a AppConnector. + * + * 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; + } + + /** + * Output only. Timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was last modified. + * + * 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. Timestamp when the resource was last modified. + * + * 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; + } + + /** + * Optional. Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 4 [(.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. An arbitrary user-provided name for the AppConnector. Cannot + * exceed 64 characters. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. An arbitrary user-provided name for the AppConnector. Cannot + * exceed 64 characters. + * + * Generated from protobuf field string display_name = 5 [(.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. A unique identifier for the instance generated by the + * system. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A unique identifier for the instance generated by the + * system. + * + * Generated from protobuf field string uid = 6 [(.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 current state of the AppConnector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the AppConnector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Principal information about the Identity of the AppConnector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo principal_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo|null + */ + public function getPrincipalInfo() + { + return $this->principal_info; + } + + public function hasPrincipalInfo() + { + return isset($this->principal_info); + } + + public function clearPrincipalInfo() + { + unset($this->principal_info); + } + + /** + * Required. Principal information about the Identity of the AppConnector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo principal_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo $var + * @return $this + */ + public function setPrincipalInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo::class); + $this->principal_info = $var; + + return $this; + } + + /** + * Optional. Resource info of the connector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo|null + */ + public function getResourceInfo() + { + return $this->resource_info; + } + + public function hasResourceInfo() + { + return isset($this->resource_info); + } + + public function clearResourceInfo() + { + unset($this->resource_info); + } + + /** + * Optional. Resource info of the connector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $var + * @return $this + */ + public function setResourceInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo::class); + $this->resource_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo.php new file mode 100644 index 000000000000..00c58b75f4af --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo.php @@ -0,0 +1,78 @@ +google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo + */ +class PrincipalInfo extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo\ServiceAccount $service_account + * A GCP service account. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * A GCP service account. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount service_account = 1; + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo\ServiceAccount|null + */ + public function getServiceAccount() + { + return $this->readOneof(1); + } + + public function hasServiceAccount() + { + return $this->hasOneof(1); + } + + /** + * A GCP service account. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount service_account = 1; + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo\ServiceAccount $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo\ServiceAccount::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PrincipalInfo::class, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector_PrincipalInfo::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo/ServiceAccount.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo/ServiceAccount.php new file mode 100644 index 000000000000..9219e3d17fe8 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo/ServiceAccount.php @@ -0,0 +1,70 @@ +google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount + */ +class ServiceAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Email address of the service account. + * + * Generated from protobuf field string email = 1; + */ + protected $email = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * Email address of the service account. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * Email address of the service account. + * + * Generated from protobuf field string email = 1; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Email address of the service account. + * + * Generated from protobuf field string email = 1; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAccount::class, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector_PrincipalInfo_ServiceAccount::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/State.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/State.php new file mode 100644 index 000000000000..05d642b76b6d --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/State.php @@ -0,0 +1,86 @@ +google.cloud.beyondcorp.appconnectors.v1.AppConnector.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * AppConnector is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * AppConnector has been created. + * + * Generated from protobuf enum CREATED = 2; + */ + const CREATED = 2; + /** + * AppConnector's configuration is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * AppConnector is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * AppConnector is down and may be restored in the future. + * This happens when CCFE sends ProjectState = OFF. + * + * Generated from protobuf enum DOWN = 5; + */ + const DOWN = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::CREATED => 'CREATED', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::DOWN => 'DOWN', + ]; + + 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\BeyondCorp\AppConnectors\V1\AppConnector_State::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorInstanceConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorInstanceConfig.php new file mode 100644 index 000000000000..59a44797fb90 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorInstanceConfig.php @@ -0,0 +1,215 @@ +google.cloud.beyondcorp.appconnectors.v1.AppConnectorInstanceConfig + */ +class AppConnectorInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A monotonically increasing number generated and maintained + * by the API provider. Every time a config changes in the backend, the + * sequenceNumber should be bumped up to reflect the change. + * + * Generated from protobuf field int64 sequence_number = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sequence_number = 0; + /** + * The SLM instance agent configuration. + * + * Generated from protobuf field .google.protobuf.Any instance_config = 2; + */ + protected $instance_config = null; + /** + * NotificationConfig defines the notification mechanism that the remote + * instance should subscribe to in order to receive notification. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig notification_config = 3; + */ + protected $notification_config = null; + /** + * ImageConfig defines the GCR images to run for the remote agent's control + * plane. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ImageConfig image_config = 4; + */ + protected $image_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $sequence_number + * Required. A monotonically increasing number generated and maintained + * by the API provider. Every time a config changes in the backend, the + * sequenceNumber should be bumped up to reflect the change. + * @type \Google\Protobuf\Any $instance_config + * The SLM instance agent configuration. + * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig $notification_config + * NotificationConfig defines the notification mechanism that the remote + * instance should subscribe to in order to receive notification. + * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\ImageConfig $image_config + * ImageConfig defines the GCR images to run for the remote agent's control + * plane. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorInstanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A monotonically increasing number generated and maintained + * by the API provider. Every time a config changes in the backend, the + * sequenceNumber should be bumped up to reflect the change. + * + * Generated from protobuf field int64 sequence_number = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getSequenceNumber() + { + return $this->sequence_number; + } + + /** + * Required. A monotonically increasing number generated and maintained + * by the API provider. Every time a config changes in the backend, the + * sequenceNumber should be bumped up to reflect the change. + * + * Generated from protobuf field int64 sequence_number = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setSequenceNumber($var) + { + GPBUtil::checkInt64($var); + $this->sequence_number = $var; + + return $this; + } + + /** + * The SLM instance agent configuration. + * + * Generated from protobuf field .google.protobuf.Any instance_config = 2; + * @return \Google\Protobuf\Any|null + */ + public function getInstanceConfig() + { + return $this->instance_config; + } + + public function hasInstanceConfig() + { + return isset($this->instance_config); + } + + public function clearInstanceConfig() + { + unset($this->instance_config); + } + + /** + * The SLM instance agent configuration. + * + * Generated from protobuf field .google.protobuf.Any instance_config = 2; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setInstanceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->instance_config = $var; + + return $this; + } + + /** + * NotificationConfig defines the notification mechanism that the remote + * instance should subscribe to in order to receive notification. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig notification_config = 3; + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig|null + */ + public function getNotificationConfig() + { + return $this->notification_config; + } + + public function hasNotificationConfig() + { + return isset($this->notification_config); + } + + public function clearNotificationConfig() + { + unset($this->notification_config); + } + + /** + * NotificationConfig defines the notification mechanism that the remote + * instance should subscribe to in order to receive notification. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig notification_config = 3; + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig $var + * @return $this + */ + public function setNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig::class); + $this->notification_config = $var; + + return $this; + } + + /** + * ImageConfig defines the GCR images to run for the remote agent's control + * plane. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ImageConfig image_config = 4; + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ImageConfig|null + */ + public function getImageConfig() + { + return $this->image_config; + } + + public function hasImageConfig() + { + return isset($this->image_config); + } + + public function clearImageConfig() + { + unset($this->image_config); + } + + /** + * ImageConfig defines the GCR images to run for the remote agent's control + * plane. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ImageConfig image_config = 4; + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\ImageConfig $var + * @return $this + */ + public function setImageConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\ImageConfig::class); + $this->image_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorOperationMetadata.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorOperationMetadata.php new file mode 100644 index 000000000000..28e101a224c3 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorOperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.beyondcorp.appconnectors.v1.AppConnectorOperationMetadata + */ +class AppConnectorOperationMetadata 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\Beyondcorp\Appconnectors\V1\AppConnectorsService::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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/CreateAppConnectorRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/CreateAppConnectorRequest.php new file mode 100644 index 000000000000..971d96884ddc --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/CreateAppConnectorRequest.php @@ -0,0 +1,296 @@ +google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest + */ +class CreateAppConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource project name of the AppConnector location using the + * form: `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. User-settable AppConnector resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $app_connector_id = ''; + /** + * Required. A BeyondCorp AppConnector resource. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $app_connector = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource project name of the AppConnector location using the + * form: `projects/{project_id}/locations/{location_id}` + * Please see {@see AppConnectorsServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $appConnector Required. A BeyondCorp AppConnector resource. + * @param string $appConnectorId Optional. User-settable AppConnector resource ID. + * + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\CreateAppConnectorRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $appConnector, string $appConnectorId): self + { + return (new self()) + ->setParent($parent) + ->setAppConnector($appConnector) + ->setAppConnectorId($appConnectorId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource project name of the AppConnector location using the + * form: `projects/{project_id}/locations/{location_id}` + * @type string $app_connector_id + * Optional. User-settable AppConnector resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $app_connector + * Required. A BeyondCorp AppConnector resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource project name of the AppConnector location using the + * form: `projects/{project_id}/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 project name of the AppConnector location using the + * form: `projects/{project_id}/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. User-settable AppConnector resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAppConnectorId() + { + return $this->app_connector_id; + } + + /** + * Optional. User-settable AppConnector resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAppConnectorId($var) + { + GPBUtil::checkString($var, True); + $this->app_connector_id = $var; + + return $this; + } + + /** + * Required. A BeyondCorp AppConnector resource. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector|null + */ + public function getAppConnector() + { + return $this->app_connector; + } + + public function hasAppConnector() + { + return isset($this->app_connector); + } + + public function clearAppConnector() + { + unset($this->app_connector); + } + + /** + * Required. A BeyondCorp AppConnector resource. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $var + * @return $this + */ + public function setAppConnector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector::class); + $this->app_connector = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/DeleteAppConnectorRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/DeleteAppConnectorRequest.php new file mode 100644 index 000000000000..a9ac702ffd42 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/DeleteAppConnectorRequest.php @@ -0,0 +1,198 @@ +google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest + */ +class DeleteAppConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $name Required. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * Please see {@see AppConnectorsServiceClient::appConnectorName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\DeleteAppConnectorRequest + * + * @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. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/GetAppConnectorRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/GetAppConnectorRequest.php new file mode 100644 index 000000000000..977e4560e303 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/GetAppConnectorRequest.php @@ -0,0 +1,86 @@ +google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest + */ +class GetAppConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * Please see {@see AppConnectorsServiceClient::appConnectorName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\GetAppConnectorRequest + * + * @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. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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. BeyondCorp AppConnector name using the form: + * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/HealthStatus.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/HealthStatus.php new file mode 100644 index 000000000000..4c2c7b1895f9 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/HealthStatus.php @@ -0,0 +1,75 @@ +google.cloud.beyondcorp.appconnectors.v1.HealthStatus + */ +class HealthStatus +{ + /** + * Health status is unknown: not initialized or failed to retrieve. + * + * Generated from protobuf enum HEALTH_STATUS_UNSPECIFIED = 0; + */ + const HEALTH_STATUS_UNSPECIFIED = 0; + /** + * The resource is healthy. + * + * Generated from protobuf enum HEALTHY = 1; + */ + const HEALTHY = 1; + /** + * The resource is unhealthy. + * + * Generated from protobuf enum UNHEALTHY = 2; + */ + const UNHEALTHY = 2; + /** + * The resource is unresponsive. + * + * Generated from protobuf enum UNRESPONSIVE = 3; + */ + const UNRESPONSIVE = 3; + /** + * Some sub-resources are UNHEALTHY. + * + * Generated from protobuf enum DEGRADED = 4; + */ + const DEGRADED = 4; + + private static $valueToName = [ + self::HEALTH_STATUS_UNSPECIFIED => 'HEALTH_STATUS_UNSPECIFIED', + self::HEALTHY => 'HEALTHY', + self::UNHEALTHY => 'UNHEALTHY', + self::UNRESPONSIVE => 'UNRESPONSIVE', + self::DEGRADED => 'DEGRADED', + ]; + + 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ImageConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ImageConfig.php new file mode 100644 index 000000000000..f31d9006cf66 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ImageConfig.php @@ -0,0 +1,109 @@ +google.cloud.beyondcorp.appconnectors.v1.ImageConfig + */ +class ImageConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The initial image the remote agent will attempt to run for the control + * plane. + * + * Generated from protobuf field string target_image = 1; + */ + protected $target_image = ''; + /** + * The stable image that the remote agent will fallback to if the target image + * fails. + * + * Generated from protobuf field string stable_image = 2; + */ + protected $stable_image = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target_image + * The initial image the remote agent will attempt to run for the control + * plane. + * @type string $stable_image + * The stable image that the remote agent will fallback to if the target image + * fails. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorInstanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * The initial image the remote agent will attempt to run for the control + * plane. + * + * Generated from protobuf field string target_image = 1; + * @return string + */ + public function getTargetImage() + { + return $this->target_image; + } + + /** + * The initial image the remote agent will attempt to run for the control + * plane. + * + * Generated from protobuf field string target_image = 1; + * @param string $var + * @return $this + */ + public function setTargetImage($var) + { + GPBUtil::checkString($var, True); + $this->target_image = $var; + + return $this; + } + + /** + * The stable image that the remote agent will fallback to if the target image + * fails. + * + * Generated from protobuf field string stable_image = 2; + * @return string + */ + public function getStableImage() + { + return $this->stable_image; + } + + /** + * The stable image that the remote agent will fallback to if the target image + * fails. + * + * Generated from protobuf field string stable_image = 2; + * @param string $var + * @return $this + */ + public function setStableImage($var) + { + GPBUtil::checkString($var, True); + $this->stable_image = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsRequest.php new file mode 100644 index 000000000000..eb6639769249 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsRequest.php @@ -0,0 +1,258 @@ +google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest + */ +class ListAppConnectorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the AppConnector location using the form: + * `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to + * determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous + * ListAppConnectorsRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A filter specifying constraints of a list operation. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * 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 AppConnector location using the form: + * `projects/{project_id}/locations/{location_id}` + * Please see {@see AppConnectorsServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ListAppConnectorsRequest + * + * @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 AppConnector location using the form: + * `projects/{project_id}/locations/{location_id}` + * @type int $page_size + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to + * determine if there are more instances left to be queried. + * @type string $page_token + * Optional. The next_page_token value returned from a previous + * ListAppConnectorsRequest, if any. + * @type string $filter + * Optional. A filter specifying constraints of a list operation. + * @type string $order_by + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the AppConnector location using the form: + * `projects/{project_id}/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 AppConnector location using the form: + * `projects/{project_id}/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. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to + * determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to + * determine if there are more instances left to be queried. + * + * 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. The next_page_token value returned from a previous + * ListAppConnectorsRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous + * ListAppConnectorsRequest, if any. + * + * 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. A filter specifying constraints of a list operation. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter specifying constraints of a list operation. + * + * 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. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsResponse.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsResponse.php new file mode 100644 index 000000000000..4dd5d6387e1b --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsResponse.php @@ -0,0 +1,139 @@ +google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse + */ +class ListAppConnectorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of BeyondCorp AppConnectors in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connectors = 1; + */ + private $app_connectors; + /** + * A 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 = ''; + /** + * A list of 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\BeyondCorp\AppConnectors\V1\AppConnector>|\Google\Protobuf\Internal\RepeatedField $app_connectors + * A list of BeyondCorp AppConnectors in the project. + * @type string $next_page_token + * A 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 + * A list of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * A list of BeyondCorp AppConnectors in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connectors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppConnectors() + { + return $this->app_connectors; + } + + /** + * A list of BeyondCorp AppConnectors in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connectors = 1; + * @param array<\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppConnectors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector::class); + $this->app_connectors = $arr; + + return $this; + } + + /** + * A 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; + } + + /** + * A 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; + } + + /** + * A list of 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; + } + + /** + * A list of 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig.php new file mode 100644 index 000000000000..0ab5679cdf95 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig.php @@ -0,0 +1,75 @@ +google.cloud.beyondcorp.appconnectors.v1.NotificationConfig + */ +class NotificationConfig extends \Google\Protobuf\Internal\Message +{ + protected $config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig\CloudPubSubNotificationConfig $pubsub_notification + * Cloud Pub/Sub Configuration to receive notifications. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorInstanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Pub/Sub Configuration to receive notifications. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig pubsub_notification = 1; + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig\CloudPubSubNotificationConfig|null + */ + public function getPubsubNotification() + { + return $this->readOneof(1); + } + + public function hasPubsubNotification() + { + return $this->hasOneof(1); + } + + /** + * Cloud Pub/Sub Configuration to receive notifications. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig pubsub_notification = 1; + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig\CloudPubSubNotificationConfig $var + * @return $this + */ + public function setPubsubNotification($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig\CloudPubSubNotificationConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getConfig() + { + return $this->whichOneof("config"); + } + +} + diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig/CloudPubSubNotificationConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig/CloudPubSubNotificationConfig.php new file mode 100644 index 000000000000..b4a622dabefe --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig/CloudPubSubNotificationConfig.php @@ -0,0 +1,70 @@ +google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig + */ +class CloudPubSubNotificationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The Pub/Sub subscription the AppConnector uses to receive notifications. + * + * Generated from protobuf field string pubsub_subscription = 1; + */ + protected $pubsub_subscription = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pubsub_subscription + * The Pub/Sub subscription the AppConnector uses to receive notifications. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorInstanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * The Pub/Sub subscription the AppConnector uses to receive notifications. + * + * Generated from protobuf field string pubsub_subscription = 1; + * @return string + */ + public function getPubsubSubscription() + { + return $this->pubsub_subscription; + } + + /** + * The Pub/Sub subscription the AppConnector uses to receive notifications. + * + * Generated from protobuf field string pubsub_subscription = 1; + * @param string $var + * @return $this + */ + public function setPubsubSubscription($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_subscription = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudPubSubNotificationConfig::class, \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig_CloudPubSubNotificationConfig::class); + diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ReportStatusRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ReportStatusRequest.php new file mode 100644 index 000000000000..15a4889b3bc3 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ReportStatusRequest.php @@ -0,0 +1,244 @@ +google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest + */ +class ReportStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/connectors/{connector}` + * + * Generated from protobuf field string app_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $app_connector = ''; + /** + * Required. Resource info of the connector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource_info = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $appConnector Required. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/connectors/{connector}` + * Please see {@see AppConnectorsServiceClient::appConnectorName()} for help formatting this field. + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $resourceInfo Required. Resource info of the connector. + * + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ReportStatusRequest + * + * @experimental + */ + public static function build(string $appConnector, \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $resourceInfo): self + { + return (new self()) + ->setAppConnector($appConnector) + ->setResourceInfo($resourceInfo); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $app_connector + * Required. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/connectors/{connector}` + * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $resource_info + * Required. Resource info of the connector. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/connectors/{connector}` + * + * Generated from protobuf field string app_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAppConnector() + { + return $this->app_connector; + } + + /** + * Required. BeyondCorp Connector name using the form: + * `projects/{project_id}/locations/{location_id}/connectors/{connector}` + * + * Generated from protobuf field string app_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAppConnector($var) + { + GPBUtil::checkString($var, True); + $this->app_connector = $var; + + return $this; + } + + /** + * Required. Resource info of the connector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo|null + */ + public function getResourceInfo() + { + return $this->resource_info; + } + + public function hasResourceInfo() + { + return isset($this->resource_info); + } + + public function clearResourceInfo() + { + unset($this->resource_info); + } + + /** + * Required. Resource info of the connector. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $var + * @return $this + */ + public function setResourceInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo::class); + $this->resource_info = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ResourceInfo.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ResourceInfo.php new file mode 100644 index 000000000000..e2ea6c977df7 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ResourceInfo.php @@ -0,0 +1,240 @@ +google.cloud.beyondcorp.appconnectors.v1.ResourceInfo + */ +class ResourceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Unique Id for the resource. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * Overall health status. Overall status is derived based on the status of + * each sub level resources. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.HealthStatus status = 2; + */ + protected $status = 0; + /** + * Specific details for the resource. This is for internal use only. + * + * Generated from protobuf field .google.protobuf.Any resource = 3; + */ + protected $resource = null; + /** + * The timestamp to collect the info. It is suggested to be set by + * the topmost level resource only. + * + * Generated from protobuf field .google.protobuf.Timestamp time = 4; + */ + protected $time = null; + /** + * List of Info for the sub level resources. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo sub = 5; + */ + private $sub; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. Unique Id for the resource. + * @type int $status + * Overall health status. Overall status is derived based on the status of + * each sub level resources. + * @type \Google\Protobuf\Any $resource + * Specific details for the resource. This is for internal use only. + * @type \Google\Protobuf\Timestamp $time + * The timestamp to collect the info. It is suggested to be set by + * the topmost level resource only. + * @type array<\Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo>|\Google\Protobuf\Internal\RepeatedField $sub + * List of Info for the sub level resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\ResourceInfo::initOnce(); + parent::__construct($data); + } + + /** + * Required. Unique Id for the resource. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. Unique Id for the resource. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Overall health status. Overall status is derived based on the status of + * each sub level resources. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.HealthStatus status = 2; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Overall health status. Overall status is derived based on the status of + * each sub level resources. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.HealthStatus status = 2; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\HealthStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Specific details for the resource. This is for internal use only. + * + * Generated from protobuf field .google.protobuf.Any resource = 3; + * @return \Google\Protobuf\Any|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Specific details for the resource. This is for internal use only. + * + * Generated from protobuf field .google.protobuf.Any resource = 3; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->resource = $var; + + return $this; + } + + /** + * The timestamp to collect the info. It is suggested to be set by + * the topmost level resource only. + * + * Generated from protobuf field .google.protobuf.Timestamp time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTime() + { + return $this->time; + } + + public function hasTime() + { + return isset($this->time); + } + + public function clearTime() + { + unset($this->time); + } + + /** + * The timestamp to collect the info. It is suggested to be set by + * the topmost level resource only. + * + * Generated from protobuf field .google.protobuf.Timestamp time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time = $var; + + return $this; + } + + /** + * List of Info for the sub level resources. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo sub = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSub() + { + return $this->sub; + } + + /** + * List of Info for the sub level resources. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo sub = 5; + * @param array<\Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSub($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo::class); + $this->sub = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/UpdateAppConnectorRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/UpdateAppConnectorRequest.php new file mode 100644 index 000000000000..eb3293b86e4f --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/UpdateAppConnectorRequest.php @@ -0,0 +1,273 @@ +google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest + */ +class UpdateAppConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnector]: + * * `labels` + * * `display_name` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. AppConnector message with updated fields. Only supported fields + * specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $app_connector = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $appConnector Required. AppConnector message with updated fields. Only supported fields + * specified in update_mask are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnector]: + * * `labels` + * * `display_name` + * + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\UpdateAppConnectorRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $appConnector, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAppConnector($appConnector) + ->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. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnector]: + * * `labels` + * * `display_name` + * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $app_connector + * Required. AppConnector message with updated fields. Only supported fields + * specified in update_mask are updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnector]: + * * `labels` + * * `display_name` + * + * 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. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [BeyondCorp.AppConnector]: + * * `labels` + * * `display_name` + * + * 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. AppConnector message with updated fields. Only supported fields + * specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector|null + */ + public function getAppConnector() + { + return $this->app_connector; + } + + public function hasAppConnector() + { + return isset($this->app_connector); + } + + public function clearAppConnector() + { + unset($this->app_connector); + } + + /** + * Required. AppConnector message with updated fields. Only supported fields + * specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $var + * @return $this + */ + public function setAppConnector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector::class); + $this->app_connector = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * 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/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/create_app_connector.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/create_app_connector.php new file mode 100644 index 000000000000..afcd71875d67 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/create_app_connector.php @@ -0,0 +1,93 @@ +setName($appConnectorName) + ->setPrincipalInfo($appConnectorPrincipalInfo); + $request = (new CreateAppConnectorRequest()) + ->setParent($formattedParent) + ->setAppConnector($appConnector); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appConnectorsServiceClient->createAppConnector($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AppConnector $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 = AppConnectorsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $appConnectorName = '[NAME]'; + + create_app_connector_sample($formattedParent, $appConnectorName); +} +// [END beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/delete_app_connector.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/delete_app_connector.php new file mode 100644 index 000000000000..578ff6e18307 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/delete_app_connector.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appConnectorsServiceClient->deleteAppConnector($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 = AppConnectorsServiceClient::appConnectorName( + '[PROJECT]', + '[LOCATION]', + '[APP_CONNECTOR]' + ); + + delete_app_connector_sample($formattedName); +} +// [END beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_app_connector.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_app_connector.php new file mode 100644 index 000000000000..82dbca68241d --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_app_connector.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AppConnector $response */ + $response = $appConnectorsServiceClient->getAppConnector($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 = AppConnectorsServiceClient::appConnectorName( + '[PROJECT]', + '[LOCATION]', + '[APP_CONNECTOR]' + ); + + get_app_connector_sample($formattedName); +} +// [END beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..2d9971aefff9 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $appConnectorsServiceClient->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 beyondcorp_v1_generated_AppConnectorsService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_location.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_location.php new file mode 100644 index 000000000000..fcce3ca9f51e --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/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 beyondcorp_v1_generated_AppConnectorsService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_app_connectors.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_app_connectors.php new file mode 100644 index 000000000000..56398737f929 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_app_connectors.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $appConnectorsServiceClient->listAppConnectors($request); + + /** @var AppConnector $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 = AppConnectorsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_app_connectors_sample($formattedParent); +} +// [END beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_locations.php new file mode 100644 index 000000000000..17965a132c46 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/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 beyondcorp_v1_generated_AppConnectorsService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/report_status.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/report_status.php new file mode 100644 index 000000000000..39edd3236cae --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/report_status.php @@ -0,0 +1,94 @@ +setId($resourceInfoId); + $request = (new ReportStatusRequest()) + ->setAppConnector($formattedAppConnector) + ->setResourceInfo($resourceInfo); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appConnectorsServiceClient->reportStatus($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AppConnector $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 +{ + $formattedAppConnector = AppConnectorsServiceClient::appConnectorName( + '[PROJECT]', + '[LOCATION]', + '[APP_CONNECTOR]' + ); + $resourceInfoId = '[ID]'; + + report_status_sample($formattedAppConnector, $resourceInfoId); +} +// [END beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..8ad3b35214b3 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/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 = $appConnectorsServiceClient->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 beyondcorp_v1_generated_AppConnectorsService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..b4d27f651a4a --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/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 = $appConnectorsServiceClient->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 beyondcorp_v1_generated_AppConnectorsService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/update_app_connector.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/update_app_connector.php new file mode 100644 index 000000000000..bb76d70d3a8e --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/update_app_connector.php @@ -0,0 +1,91 @@ +setName($appConnectorName) + ->setPrincipalInfo($appConnectorPrincipalInfo); + $request = (new UpdateAppConnectorRequest()) + ->setUpdateMask($updateMask) + ->setAppConnector($appConnector); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appConnectorsServiceClient->updateAppConnector($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AppConnector $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 +{ + $appConnectorName = '[NAME]'; + + update_app_connector_sample($appConnectorName); +} +// [END beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/Client/AppConnectorsServiceClient.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/Client/AppConnectorsServiceClient.php new file mode 100644 index 000000000000..c3a83d8a7e27 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/Client/AppConnectorsServiceClient.php @@ -0,0 +1,624 @@ + createAppConnectorAsync(CreateAppConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAppConnectorAsync(DeleteAppConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAppConnectorAsync(GetAppConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAppConnectorsAsync(ListAppConnectorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface reportStatusAsync(ReportStatusRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAppConnectorAsync(UpdateAppConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class AppConnectorsServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/app_connectors_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/app_connectors_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/app_connectors_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/app_connectors_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * app_connector resource. + * + * @param string $project + * @param string $location + * @param string $appConnector + * + * @return string The formatted app_connector resource. + */ + public static function appConnectorName(string $project, string $location, string $appConnector): string + { + return self::getPathTemplate('appConnector')->render([ + 'project' => $project, + 'location' => $location, + 'app_connector' => $appConnector, + ]); + } + + /** + * 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 + * - appConnector: projects/{project}/locations/{location}/appConnectors/{app_connector} + * - 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 'beyondcorp.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 new AppConnector in a given project and location. + * + * The async variant is + * {@see AppConnectorsServiceClient::createAppConnectorAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/create_app_connector.php + * + * @param CreateAppConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createAppConnector(CreateAppConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAppConnector', $request, $callOptions)->wait(); + } + + /** + * Deletes a single AppConnector. + * + * The async variant is + * {@see AppConnectorsServiceClient::deleteAppConnectorAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/delete_app_connector.php + * + * @param DeleteAppConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteAppConnector(DeleteAppConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAppConnector', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single AppConnector. + * + * The async variant is {@see AppConnectorsServiceClient::getAppConnectorAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/get_app_connector.php + * + * @param GetAppConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AppConnector + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAppConnector(GetAppConnectorRequest $request, array $callOptions = []): AppConnector + { + return $this->startApiCall('GetAppConnector', $request, $callOptions)->wait(); + } + + /** + * Lists AppConnectors in a given project and location. + * + * The async variant is {@see AppConnectorsServiceClient::listAppConnectorsAsync()} + * . + * + * @example samples/V1/AppConnectorsServiceClient/list_app_connectors.php + * + * @param ListAppConnectorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAppConnectors(ListAppConnectorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAppConnectors', $request, $callOptions); + } + + /** + * Report status for a given connector. + * + * The async variant is {@see AppConnectorsServiceClient::reportStatusAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/report_status.php + * + * @param ReportStatusRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 reportStatus(ReportStatusRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ReportStatus', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single AppConnector. + * + * The async variant is + * {@see AppConnectorsServiceClient::updateAppConnectorAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/update_app_connector.php + * + * @param UpdateAppConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateAppConnector(UpdateAppConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAppConnector', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AppConnectorsServiceClient::getLocationAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/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 AppConnectorsServiceClient::listLocationsAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/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); + } + + /** + * 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 AppConnectorsServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/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 AppConnectorsServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/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 AppConnectorsServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/AppConnectorsServiceClient/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(); + } +} diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..45b46c7018ad --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.beyondcorp.appconnectors.v1", + "libraryPackage": "Google\\Cloud\\BeyondCorp\\AppConnectors\\V1", + "services": { + "AppConnectorsService": { + "clients": { + "grpc": { + "libraryClient": "AppConnectorsServiceGapicClient", + "rpcs": { + "CreateAppConnector": { + "methods": [ + "createAppConnector" + ] + }, + "DeleteAppConnector": { + "methods": [ + "deleteAppConnector" + ] + }, + "GetAppConnector": { + "methods": [ + "getAppConnector" + ] + }, + "ListAppConnectors": { + "methods": [ + "listAppConnectors" + ] + }, + "ReportStatus": { + "methods": [ + "reportStatus" + ] + }, + "UpdateAppConnector": { + "methods": [ + "updateAppConnector" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_client_config.json b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_client_config.json new file mode 100644 index 000000000000..6a2292abae69 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_client_config.json @@ -0,0 +1,77 @@ +{ + "interfaces": { + "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService": { + "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": { + "CreateAppConnector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteAppConnector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetAppConnector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAppConnectors": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ReportStatus": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateAppConnector": { + "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" + }, + "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" + } + } + } + } +} diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_descriptor_config.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_descriptor_config.php new file mode 100644 index 000000000000..6de05317288a --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_descriptor_config.php @@ -0,0 +1,214 @@ + [ + 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService' => [ + 'CreateAppConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnectorOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAppConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnectorOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ReportStatus' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnectorOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'app_connector', + 'fieldAccessors' => [ + 'getAppConnector', + ], + ], + ], + ], + 'UpdateAppConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnectorOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'app_connector.name', + 'fieldAccessors' => [ + 'getAppConnector', + 'getName', + ], + ], + ], + ], + 'GetAppConnector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAppConnectors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAppConnectors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\AppConnectors\V1\ListAppConnectorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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', + ], + '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', + ], + 'templateMap' => [ + 'appConnector' => 'projects/{project}/locations/{location}/appConnectors/{app_connector}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_rest_client_config.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_rest_client_config.php new file mode 100644 index 000000000000..4eb4516f5c91 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_rest_client_config.php @@ -0,0 +1,272 @@ + [ + 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService' => [ + 'CreateAppConnector' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnectors', + 'body' => 'app_connector', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAppConnector' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/appConnectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAppConnector' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/appConnectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAppConnectors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnectors', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ReportStatus' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{app_connector=projects/*/locations/*/appConnectors/*}:reportStatus', + 'body' => '*', + 'placeholders' => [ + 'app_connector' => [ + 'getters' => [ + 'getAppConnector', + ], + ], + ], + ], + 'UpdateAppConnector' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{app_connector.name=projects/*/locations/*/appConnectors/*}', + 'body' => 'app_connector', + 'placeholders' => [ + 'app_connector.name' => [ + 'getters' => [ + 'getAppConnector', + '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/*/appConnections/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpAppConnectors/v1/tests/Unit/V1/Client/AppConnectorsServiceClientTest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/tests/Unit/V1/Client/AppConnectorsServiceClientTest.php new file mode 100644 index 000000000000..a8d24ec734d7 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppConnectors/v1/tests/Unit/V1/Client/AppConnectorsServiceClientTest.php @@ -0,0 +1,1173 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AppConnectorsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AppConnectorsServiceClient($options); + } + + /** @test */ + public function createAppConnectorTest() + { + $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/createAppConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new AppConnector(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAppConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $appConnector = new AppConnector(); + $appConnectorName = 'appConnectorName-1263736873'; + $appConnector->setName($appConnectorName); + $appConnectorPrincipalInfo = new PrincipalInfo(); + $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); + $request = (new CreateAppConnectorRequest()) + ->setParent($formattedParent) + ->setAppConnector($appConnector); + $response = $gapicClient->createAppConnector($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.beyondcorp.appconnectors.v1.AppConnectorsService/CreateAppConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAppConnector(); + $this->assertProtobufEquals($appConnector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAppConnectorTest'); + $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 createAppConnectorExceptionTest() + { + $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/createAppConnectorTest'); + $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]'); + $appConnector = new AppConnector(); + $appConnectorName = 'appConnectorName-1263736873'; + $appConnector->setName($appConnectorName); + $appConnectorPrincipalInfo = new PrincipalInfo(); + $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); + $request = (new CreateAppConnectorRequest()) + ->setParent($formattedParent) + ->setAppConnector($appConnector); + $response = $gapicClient->createAppConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAppConnectorTest'); + 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 deleteAppConnectorTest() + { + $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/deleteAppConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAppConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); + $request = (new DeleteAppConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAppConnector($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.beyondcorp.appconnectors.v1.AppConnectorsService/DeleteAppConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAppConnectorTest'); + $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 deleteAppConnectorExceptionTest() + { + $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/deleteAppConnectorTest'); + $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->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); + $request = (new DeleteAppConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAppConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAppConnectorTest'); + 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 getAppConnectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new AppConnector(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); + $request = (new GetAppConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->getAppConnector($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.beyondcorp.appconnectors.v1.AppConnectorsService/GetAppConnector', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAppConnectorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); + $request = (new GetAppConnectorRequest()) + ->setName($formattedName); + try { + $gapicClient->getAppConnector($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAppConnectorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $appConnectorsElement = new AppConnector(); + $appConnectors = [ + $appConnectorsElement, + ]; + $expectedResponse = new ListAppConnectorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAppConnectors($appConnectors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAppConnectorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAppConnectors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAppConnectors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService/ListAppConnectors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAppConnectorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListAppConnectorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAppConnectors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reportStatusTest() + { + $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/reportStatusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new AppConnector(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reportStatusTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedAppConnector = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); + $resourceInfo = new ResourceInfo(); + $resourceInfoId = 'resourceInfoId-332404713'; + $resourceInfo->setId($resourceInfoId); + $request = (new ReportStatusRequest()) + ->setAppConnector($formattedAppConnector) + ->setResourceInfo($resourceInfo); + $response = $gapicClient->reportStatus($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.beyondcorp.appconnectors.v1.AppConnectorsService/ReportStatus', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAppConnector(); + $this->assertProtobufEquals($formattedAppConnector, $actualValue); + $actualValue = $actualApiRequestObject->getResourceInfo(); + $this->assertProtobufEquals($resourceInfo, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reportStatusTest'); + $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 reportStatusExceptionTest() + { + $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/reportStatusTest'); + $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 + $formattedAppConnector = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); + $resourceInfo = new ResourceInfo(); + $resourceInfoId = 'resourceInfoId-332404713'; + $resourceInfo->setId($resourceInfoId); + $request = (new ReportStatusRequest()) + ->setAppConnector($formattedAppConnector) + ->setResourceInfo($resourceInfo); + $response = $gapicClient->reportStatus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reportStatusTest'); + 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 updateAppConnectorTest() + { + $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/updateAppConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new AppConnector(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAppConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $appConnector = new AppConnector(); + $appConnectorName = 'appConnectorName-1263736873'; + $appConnector->setName($appConnectorName); + $appConnectorPrincipalInfo = new PrincipalInfo(); + $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); + $request = (new UpdateAppConnectorRequest()) + ->setUpdateMask($updateMask) + ->setAppConnector($appConnector); + $response = $gapicClient->updateAppConnector($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.beyondcorp.appconnectors.v1.AppConnectorsService/UpdateAppConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getAppConnector(); + $this->assertProtobufEquals($appConnector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAppConnectorTest'); + $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 updateAppConnectorExceptionTest() + { + $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/updateAppConnectorTest'); + $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(); + $appConnector = new AppConnector(); + $appConnectorName = 'appConnectorName-1263736873'; + $appConnector->setName($appConnectorName); + $appConnectorPrincipalInfo = new PrincipalInfo(); + $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); + $request = (new UpdateAppConnectorRequest()) + ->setUpdateMask($updateMask) + ->setAppConnector($appConnector); + $response = $gapicClient->updateAppConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAppConnectorTest'); + 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 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 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 createAppConnectorAsyncTest() + { + $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/createAppConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new AppConnector(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAppConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $appConnector = new AppConnector(); + $appConnectorName = 'appConnectorName-1263736873'; + $appConnector->setName($appConnectorName); + $appConnectorPrincipalInfo = new PrincipalInfo(); + $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); + $request = (new CreateAppConnectorRequest()) + ->setParent($formattedParent) + ->setAppConnector($appConnector); + $response = $gapicClient->createAppConnectorAsync($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.beyondcorp.appconnectors.v1.AppConnectorsService/CreateAppConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAppConnector(); + $this->assertProtobufEquals($appConnector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAppConnectorTest'); + $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/BeyondCorpAppGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appgateways/V1/AppGatewaysService.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appgateways/V1/AppGatewaysService.php new file mode 100644 index 0000000000000000000000000000000000000000..2dd093d5d5bb50785742b236dfb4f10a11d772db GIT binary patch literal 4655 zcmbtY&2JM&6tC@k*kdSWAjC1Px)=l@g|(6*6>Ui9#&%396I+R)rLweIugA{9W_P>0 zPU=Rv^j2^HEzAu;L4@7#uX5?jh>|t zf$JJZS0e>QGkWbpi}Ve>tr(VBkWI4-ns?>CUD%nYkCOi^*~HpW6~Z%X2d_wJ;Lq%}G*#hj zM|R-fHPx0>U3FAhQ@@9}m$;6s*#y)a-rMQvilZ7jM+IuSLS}Dru1>o5nrQ$|OPud$ zok9n&HP>{9Sh}n=OT<gl?wcbhenru4~z47h8kkcy7HZ6570M<;~+X11gP$shh z1(c8*=)aGU_}=w_ue&OER$_cuVtk~;_?`LOv}Z~-RVYWwm|I}EPa+E)N{iI;c=0yO zL^fC+_}#vIAz>&Q;M32 zkefqicc9tBnL;E(*Ib5^%!T}Oh`dBJa#ZB+f#{Gkj7~S^L(b6D^qhH_L?|QxpC4e9 z#drs$6~>c93yfizUdZ`5=T{#eG%;#3fkCQgvhbM{wK#&*CYsRX7SU|LlBV{uZ{{6s zD3aQIl_@Cej@5U=pFwBZs%>g=Ut-xB78}l>L=T9Y@XIfOzeHnB-z3>dc=h4J=clmW z0C8$Kj;m;#9|`2G>SgKC`ewac zTw7f$moguKK&nx!OZAP~*H1FByoAOX33v*f-)xAD;q7Novba$e8*A&8Obkpy@RUu^-nB!lR@jCU7>)v3fjwJ-3Co5v zJ3MI<_$s>OHE&uzGK|`q#%4Iy4_JRp;4D2aR0$N@fD>yA>?BDn{5^>P(*P=O{>OjB z(7B=W8;{(^h6KIyFn52{N;@R)4i5P*UWwko^TY3d{v4mj1^Rik=gvS&L1N5B5@K#3 z5%8}ubar3{!1qRVYCy~n=@dgte)*Ni=8b_EXiGmPf`Lq)+s8k~QD%7Lz$0TjEa^w` zv5!M!TIGY<$iIjkh&Kn$*teC?EAfg;%B@J@MSsJb!NOn8pOiu&I{4tfVkk2_gp7{G zu;hqX^bW*3Xv&*bgUO-1Z90AYc2pv~&$)q*&U^0RfjD#QVE>!QZ#j->3x&e&?ykpW zF!jqlXUn~2xD5k@(=n{=l^1a|2VVp}?e7>(R;CX(i8}piugAWry0ZTG4qq8v&U=5!VfDr+Y21 IkMgoogle.cloud.beyondcorp.appgateways.v1.AppGateway + */ +class AppGateway extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Unique resource name of the AppGateway. + * The name is ignored when creating an AppGateway. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when the resource was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed + * 64 characters. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. A unique identifier for the instance generated by the + * system. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Required. The type of network connectivity used by the AppGateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Output only. The current state of the AppGateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Server-defined URI for this resource. + * + * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri = ''; + /** + * Output only. A list of connections allocated for the Gateway + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection allocated_connections = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $allocated_connections; + /** + * Required. The type of hosting used by the AppGateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType host_type = 11 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $host_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Unique resource name of the AppGateway. + * The name is ignored when creating an AppGateway. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when the resource was last modified. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Resource labels to represent user provided metadata. + * @type string $display_name + * Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed + * 64 characters. + * @type string $uid + * Output only. A unique identifier for the instance generated by the + * system. + * @type int $type + * Required. The type of network connectivity used by the AppGateway. + * @type int $state + * Output only. The current state of the AppGateway. + * @type string $uri + * Output only. Server-defined URI for this resource. + * @type array<\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\AllocatedConnection>|\Google\Protobuf\Internal\RepeatedField $allocated_connections + * Output only. A list of connections allocated for the Gateway + * @type int $host_type + * Required. The type of hosting used by the AppGateway. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Unique resource name of the AppGateway. + * The name is ignored when creating an AppGateway. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Unique resource name of the AppGateway. + * The name is ignored when creating an AppGateway. + * + * 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; + } + + /** + * Output only. Timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was last modified. + * + * 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. Timestamp when the resource was last modified. + * + * 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; + } + + /** + * Optional. Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 4 [(.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. An arbitrary user-provided name for the AppGateway. Cannot exceed + * 64 characters. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed + * 64 characters. + * + * Generated from protobuf field string display_name = 5 [(.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. A unique identifier for the instance generated by the + * system. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A unique identifier for the instance generated by the + * system. + * + * Generated from protobuf field string uid = 6 [(.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 type of network connectivity used by the AppGateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of network connectivity used by the AppGateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. The current state of the AppGateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the AppGateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Server-defined URI for this resource. + * + * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Output only. Server-defined URI for this resource. + * + * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Output only. A list of connections allocated for the Gateway + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection allocated_connections = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllocatedConnections() + { + return $this->allocated_connections; + } + + /** + * Output only. A list of connections allocated for the Gateway + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection allocated_connections = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\AllocatedConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllocatedConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\AllocatedConnection::class); + $this->allocated_connections = $arr; + + return $this; + } + + /** + * Required. The type of hosting used by the AppGateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType host_type = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getHostType() + { + return $this->host_type; + } + + /** + * Required. The type of hosting used by the AppGateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType host_type = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setHostType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\HostType::class); + $this->host_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/AllocatedConnection.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/AllocatedConnection.php new file mode 100644 index 000000000000..ae86af600c62 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/AllocatedConnection.php @@ -0,0 +1,104 @@ +google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection + */ +class AllocatedConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The PSC uri of an allocated connection + * + * Generated from protobuf field string psc_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $psc_uri = ''; + /** + * Required. The ingress port of an allocated connection + * + * Generated from protobuf field int32 ingress_port = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ingress_port = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $psc_uri + * Required. The PSC uri of an allocated connection + * @type int $ingress_port + * Required. The ingress port of an allocated connection + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The PSC uri of an allocated connection + * + * Generated from protobuf field string psc_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPscUri() + { + return $this->psc_uri; + } + + /** + * Required. The PSC uri of an allocated connection + * + * Generated from protobuf field string psc_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPscUri($var) + { + GPBUtil::checkString($var, True); + $this->psc_uri = $var; + + return $this; + } + + /** + * Required. The ingress port of an allocated connection + * + * Generated from protobuf field int32 ingress_port = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getIngressPort() + { + return $this->ingress_port; + } + + /** + * Required. The ingress port of an allocated connection + * + * Generated from protobuf field int32 ingress_port = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setIngressPort($var) + { + GPBUtil::checkInt32($var); + $this->ingress_port = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AllocatedConnection::class, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway_AllocatedConnection::class); + diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/HostType.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/HostType.php new file mode 100644 index 000000000000..0be7ad2a31c9 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/HostType.php @@ -0,0 +1,58 @@ +google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType + */ +class HostType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum HOST_TYPE_UNSPECIFIED = 0; + */ + const HOST_TYPE_UNSPECIFIED = 0; + /** + * AppGateway hosted in a GCP regional managed instance group. + * + * Generated from protobuf enum GCP_REGIONAL_MIG = 1; + */ + const GCP_REGIONAL_MIG = 1; + + private static $valueToName = [ + self::HOST_TYPE_UNSPECIFIED => 'HOST_TYPE_UNSPECIFIED', + self::GCP_REGIONAL_MIG => 'GCP_REGIONAL_MIG', + ]; + + 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(HostType::class, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway_HostType::class); + diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/State.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/State.php new file mode 100644 index 000000000000..ab280c73a846 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/State.php @@ -0,0 +1,86 @@ +google.cloud.beyondcorp.appgateways.v1.AppGateway.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * AppGateway is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * AppGateway has been created. + * + * Generated from protobuf enum CREATED = 2; + */ + const CREATED = 2; + /** + * AppGateway's configuration is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * AppGateway is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * AppGateway is down and may be restored in the future. + * This happens when CCFE sends ProjectState = OFF. + * + * Generated from protobuf enum DOWN = 5; + */ + const DOWN = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::CREATED => 'CREATED', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::DOWN => 'DOWN', + ]; + + 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\BeyondCorp\AppGateways\V1\AppGateway_State::class); + diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/Type.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/Type.php new file mode 100644 index 000000000000..237bf4a3fd35 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/Type.php @@ -0,0 +1,58 @@ +google.cloud.beyondcorp.appgateways.v1.AppGateway.Type + */ +class Type +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * TCP Proxy based BeyondCorp Connection. API will default to this if unset. + * + * Generated from protobuf enum TCP_PROXY = 1; + */ + const TCP_PROXY = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::TCP_PROXY => 'TCP_PROXY', + ]; + + 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\BeyondCorp\AppGateways\V1\AppGateway_Type::class); + diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGatewayOperationMetadata.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGatewayOperationMetadata.php new file mode 100644 index 000000000000..cc45976fe154 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGatewayOperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.beyondcorp.appgateways.v1.AppGatewayOperationMetadata + */ +class AppGatewayOperationMetadata 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\Beyondcorp\Appgateways\V1\AppGatewaysService::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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/CreateAppGatewayRequest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/CreateAppGatewayRequest.php new file mode 100644 index 000000000000..1462f6d587f3 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/CreateAppGatewayRequest.php @@ -0,0 +1,295 @@ +google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest + */ +class CreateAppGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource project name of the AppGateway location using the + * form: `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. User-settable AppGateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string app_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $app_gateway_id = ''; + /** + * Required. A BeyondCorp AppGateway resource. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $app_gateway = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource project name of the AppGateway location using the + * form: `projects/{project_id}/locations/{location_id}` + * Please see {@see AppGatewaysServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway $appGateway Required. A BeyondCorp AppGateway resource. + * @param string $appGatewayId Optional. User-settable AppGateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * @return \Google\Cloud\BeyondCorp\AppGateways\V1\CreateAppGatewayRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway $appGateway, string $appGatewayId): self + { + return (new self()) + ->setParent($parent) + ->setAppGateway($appGateway) + ->setAppGatewayId($appGatewayId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource project name of the AppGateway location using the + * form: `projects/{project_id}/locations/{location_id}` + * @type string $app_gateway_id + * Optional. User-settable AppGateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * @type \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway $app_gateway + * Required. A BeyondCorp AppGateway resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource project name of the AppGateway location using the + * form: `projects/{project_id}/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 project name of the AppGateway location using the + * form: `projects/{project_id}/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. User-settable AppGateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string app_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAppGatewayId() + { + return $this->app_gateway_id; + } + + /** + * Optional. User-settable AppGateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string app_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAppGatewayId($var) + { + GPBUtil::checkString($var, True); + $this->app_gateway_id = $var; + + return $this; + } + + /** + * Required. A BeyondCorp AppGateway resource. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway|null + */ + public function getAppGateway() + { + return $this->app_gateway; + } + + public function hasAppGateway() + { + return isset($this->app_gateway); + } + + public function clearAppGateway() + { + unset($this->app_gateway); + } + + /** + * Required. A BeyondCorp AppGateway resource. + * + * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway $var + * @return $this + */ + public function setAppGateway($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway::class); + $this->app_gateway = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/DeleteAppGatewayRequest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/DeleteAppGatewayRequest.php new file mode 100644 index 000000000000..0dd9bed3f1c3 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/DeleteAppGatewayRequest.php @@ -0,0 +1,198 @@ +google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest + */ +class DeleteAppGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $name Required. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + * Please see {@see AppGatewaysServiceClient::appGatewayName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppGateways\V1\DeleteAppGatewayRequest + * + * @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. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_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. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * 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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/GetAppGatewayRequest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/GetAppGatewayRequest.php new file mode 100644 index 000000000000..f19a8b563b82 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/GetAppGatewayRequest.php @@ -0,0 +1,86 @@ +google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest + */ +class GetAppGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + * Please see {@see AppGatewaysServiceClient::appGatewayName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppGateways\V1\GetAppGatewayRequest + * + * @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. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_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. BeyondCorp AppGateway name using the form: + * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysRequest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysRequest.php new file mode 100644 index 000000000000..7fde412ec54b --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysRequest.php @@ -0,0 +1,258 @@ +google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest + */ +class ListAppGatewaysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the AppGateway location using the form: + * `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to + * determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous + * ListAppGatewaysRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A filter specifying constraints of a list operation. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * 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 AppGateway location using the form: + * `projects/{project_id}/locations/{location_id}` + * Please see {@see AppGatewaysServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\AppGateways\V1\ListAppGatewaysRequest + * + * @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 AppGateway location using the form: + * `projects/{project_id}/locations/{location_id}` + * @type int $page_size + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to + * determine if there are more instances left to be queried. + * @type string $page_token + * Optional. The next_page_token value returned from a previous + * ListAppGatewaysRequest, if any. + * @type string $filter + * Optional. A filter specifying constraints of a list operation. + * @type string $order_by + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the AppGateway location using the form: + * `projects/{project_id}/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 AppGateway location using the form: + * `projects/{project_id}/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. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to + * determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to + * determine if there are more instances left to be queried. + * + * 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. The next_page_token value returned from a previous + * ListAppGatewaysRequest, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous + * ListAppGatewaysRequest, if any. + * + * 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. A filter specifying constraints of a list operation. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter specifying constraints of a list operation. + * + * 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. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * 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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysResponse.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysResponse.php new file mode 100644 index 000000000000..757bac5b484a --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysResponse.php @@ -0,0 +1,139 @@ +google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse + */ +class ListAppGatewaysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of BeyondCorp AppGateways in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateways = 1; + */ + private $app_gateways; + /** + * A 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 = ''; + /** + * A list of 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\BeyondCorp\AppGateways\V1\AppGateway>|\Google\Protobuf\Internal\RepeatedField $app_gateways + * A list of BeyondCorp AppGateways in the project. + * @type string $next_page_token + * A 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 + * A list of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * A list of BeyondCorp AppGateways in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateways = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppGateways() + { + return $this->app_gateways; + } + + /** + * A list of BeyondCorp AppGateways in the project. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateways = 1; + * @param array<\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppGateways($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway::class); + $this->app_gateways = $arr; + + return $this; + } + + /** + * A 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; + } + + /** + * A 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; + } + + /** + * A list of 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; + } + + /** + * A list of 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/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/create_app_gateway.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/create_app_gateway.php new file mode 100644 index 000000000000..cc4f12844f92 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/create_app_gateway.php @@ -0,0 +1,102 @@ +setName($appGatewayName) + ->setType($appGatewayType) + ->setHostType($appGatewayHostType); + $request = (new CreateAppGatewayRequest()) + ->setParent($formattedParent) + ->setAppGateway($appGateway); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appGatewaysServiceClient->createAppGateway($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AppGateway $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 = AppGatewaysServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $appGatewayName = '[NAME]'; + $appGatewayType = Type::TYPE_UNSPECIFIED; + $appGatewayHostType = HostType::HOST_TYPE_UNSPECIFIED; + + create_app_gateway_sample($formattedParent, $appGatewayName, $appGatewayType, $appGatewayHostType); +} +// [END beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/delete_app_gateway.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/delete_app_gateway.php new file mode 100644 index 000000000000..cbe88510a8d9 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/delete_app_gateway.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appGatewaysServiceClient->deleteAppGateway($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 = AppGatewaysServiceClient::appGatewayName( + '[PROJECT]', + '[LOCATION]', + '[APP_GATEWAY]' + ); + + delete_app_gateway_sample($formattedName); +} +// [END beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_app_gateway.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_app_gateway.php new file mode 100644 index 000000000000..70f628baa129 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_app_gateway.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AppGateway $response */ + $response = $appGatewaysServiceClient->getAppGateway($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 = AppGatewaysServiceClient::appGatewayName( + '[PROJECT]', + '[LOCATION]', + '[APP_GATEWAY]' + ); + + get_app_gateway_sample($formattedName); +} +// [END beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..996fa9d50caf --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $appGatewaysServiceClient->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 beyondcorp_v1_generated_AppGatewaysService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_location.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_location.php new file mode 100644 index 000000000000..cb466ac0f4c5 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/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 beyondcorp_v1_generated_AppGatewaysService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_app_gateways.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_app_gateways.php new file mode 100644 index 000000000000..a1838da39d45 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_app_gateways.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $appGatewaysServiceClient->listAppGateways($request); + + /** @var AppGateway $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 = AppGatewaysServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_app_gateways_sample($formattedParent); +} +// [END beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_locations.php new file mode 100644 index 000000000000..2bff3d26f2b9 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/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 beyondcorp_v1_generated_AppGatewaysService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..083c84078eee --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/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 = $appGatewaysServiceClient->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 beyondcorp_v1_generated_AppGatewaysService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..d1dcf2c86d2a --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/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 = $appGatewaysServiceClient->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 beyondcorp_v1_generated_AppGatewaysService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/Client/AppGatewaysServiceClient.php b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/Client/AppGatewaysServiceClient.php new file mode 100644 index 000000000000..8f003674c6da --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/Client/AppGatewaysServiceClient.php @@ -0,0 +1,564 @@ + createAppGatewayAsync(CreateAppGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAppGatewayAsync(DeleteAppGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAppGatewayAsync(GetAppGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAppGatewaysAsync(ListAppGatewaysRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class AppGatewaysServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/app_gateways_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/app_gateways_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/app_gateways_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/app_gateways_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a app_gateway + * resource. + * + * @param string $project + * @param string $location + * @param string $appGateway + * + * @return string The formatted app_gateway resource. + */ + public static function appGatewayName(string $project, string $location, string $appGateway): string + { + return self::getPathTemplate('appGateway')->render([ + 'project' => $project, + 'location' => $location, + 'app_gateway' => $appGateway, + ]); + } + + /** + * 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 + * - appGateway: projects/{project}/locations/{location}/appGateways/{app_gateway} + * - 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 'beyondcorp.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 new AppGateway in a given project and location. + * + * The async variant is {@see AppGatewaysServiceClient::createAppGatewayAsync()} . + * + * @example samples/V1/AppGatewaysServiceClient/create_app_gateway.php + * + * @param CreateAppGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createAppGateway(CreateAppGatewayRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAppGateway', $request, $callOptions)->wait(); + } + + /** + * Deletes a single AppGateway. + * + * The async variant is {@see AppGatewaysServiceClient::deleteAppGatewayAsync()} . + * + * @example samples/V1/AppGatewaysServiceClient/delete_app_gateway.php + * + * @param DeleteAppGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteAppGateway(DeleteAppGatewayRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAppGateway', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single AppGateway. + * + * The async variant is {@see AppGatewaysServiceClient::getAppGatewayAsync()} . + * + * @example samples/V1/AppGatewaysServiceClient/get_app_gateway.php + * + * @param GetAppGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AppGateway + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAppGateway(GetAppGatewayRequest $request, array $callOptions = []): AppGateway + { + return $this->startApiCall('GetAppGateway', $request, $callOptions)->wait(); + } + + /** + * Lists AppGateways in a given project and location. + * + * The async variant is {@see AppGatewaysServiceClient::listAppGatewaysAsync()} . + * + * @example samples/V1/AppGatewaysServiceClient/list_app_gateways.php + * + * @param ListAppGatewaysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAppGateways(ListAppGatewaysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAppGateways', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AppGatewaysServiceClient::getLocationAsync()} . + * + * @example samples/V1/AppGatewaysServiceClient/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 AppGatewaysServiceClient::listLocationsAsync()} . + * + * @example samples/V1/AppGatewaysServiceClient/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); + } + + /** + * 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 AppGatewaysServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/AppGatewaysServiceClient/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 AppGatewaysServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/AppGatewaysServiceClient/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 AppGatewaysServiceClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/AppGatewaysServiceClient/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(); + } +} diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..7a4405a3cc86 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.beyondcorp.appgateways.v1", + "libraryPackage": "Google\\Cloud\\BeyondCorp\\AppGateways\\V1", + "services": { + "AppGatewaysService": { + "clients": { + "grpc": { + "libraryClient": "AppGatewaysServiceGapicClient", + "rpcs": { + "CreateAppGateway": { + "methods": [ + "createAppGateway" + ] + }, + "DeleteAppGateway": { + "methods": [ + "deleteAppGateway" + ] + }, + "GetAppGateway": { + "methods": [ + "getAppGateway" + ] + }, + "ListAppGateways": { + "methods": [ + "listAppGateways" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_client_config.json b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_client_config.json new file mode 100644 index 000000000000..17dd44bd7ca4 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_client_config.json @@ -0,0 +1,67 @@ +{ + "interfaces": { + "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService": { + "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": { + "CreateAppGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteAppGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetAppGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAppGateways": { + "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" + }, + "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" + } + } + } + } +} diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_descriptor_config.php b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_descriptor_config.php new file mode 100644 index 000000000000..8100e79b67a2 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_descriptor_config.php @@ -0,0 +1,175 @@ + [ + 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService' => [ + 'CreateAppGateway' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppGateways\V1\AppGatewayOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAppGateway' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppGateways\V1\AppGatewayOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAppGateway' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAppGateways' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAppGateways', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\AppGateways\V1\ListAppGatewaysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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', + ], + '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', + ], + 'templateMap' => [ + 'appGateway' => 'projects/{project}/locations/{location}/appGateways/{app_gateway}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_rest_client_config.php b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_rest_client_config.php new file mode 100644 index 000000000000..b1d9ab39bc31 --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_rest_client_config.php @@ -0,0 +1,244 @@ + [ + 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService' => [ + 'CreateAppGateway' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appGateways', + 'body' => 'app_gateway', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAppGateway' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/appGateways/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAppGateway' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/appGateways/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAppGateways' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appGateways', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + '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/*/appConnections/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpAppGateways/v1/tests/Unit/V1/Client/AppGatewaysServiceClientTest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/tests/Unit/V1/Client/AppGatewaysServiceClientTest.php new file mode 100644 index 000000000000..70fdb804f5ce --- /dev/null +++ b/owl-bot-staging/BeyondCorpAppGateways/v1/tests/Unit/V1/Client/AppGatewaysServiceClientTest.php @@ -0,0 +1,904 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AppGatewaysServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AppGatewaysServiceClient($options); + } + + /** @test */ + public function createAppGatewayTest() + { + $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/createAppGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $uri = 'uri116076'; + $expectedResponse = new AppGateway(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAppGatewayTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $appGateway = new AppGateway(); + $appGatewayName = 'appGatewayName-1786203634'; + $appGateway->setName($appGatewayName); + $appGatewayType = Type::TYPE_UNSPECIFIED; + $appGateway->setType($appGatewayType); + $appGatewayHostType = HostType::HOST_TYPE_UNSPECIFIED; + $appGateway->setHostType($appGatewayHostType); + $request = (new CreateAppGatewayRequest()) + ->setParent($formattedParent) + ->setAppGateway($appGateway); + $response = $gapicClient->createAppGateway($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.beyondcorp.appgateways.v1.AppGatewaysService/CreateAppGateway', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAppGateway(); + $this->assertProtobufEquals($appGateway, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAppGatewayTest'); + $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 createAppGatewayExceptionTest() + { + $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/createAppGatewayTest'); + $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]'); + $appGateway = new AppGateway(); + $appGatewayName = 'appGatewayName-1786203634'; + $appGateway->setName($appGatewayName); + $appGatewayType = Type::TYPE_UNSPECIFIED; + $appGateway->setType($appGatewayType); + $appGatewayHostType = HostType::HOST_TYPE_UNSPECIFIED; + $appGateway->setHostType($appGatewayHostType); + $request = (new CreateAppGatewayRequest()) + ->setParent($formattedParent) + ->setAppGateway($appGateway); + $response = $gapicClient->createAppGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAppGatewayTest'); + 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 deleteAppGatewayTest() + { + $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/deleteAppGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAppGatewayTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->appGatewayName('[PROJECT]', '[LOCATION]', '[APP_GATEWAY]'); + $request = (new DeleteAppGatewayRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAppGateway($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.beyondcorp.appgateways.v1.AppGatewaysService/DeleteAppGateway', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAppGatewayTest'); + $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 deleteAppGatewayExceptionTest() + { + $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/deleteAppGatewayTest'); + $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->appGatewayName('[PROJECT]', '[LOCATION]', '[APP_GATEWAY]'); + $request = (new DeleteAppGatewayRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAppGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAppGatewayTest'); + 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 getAppGatewayTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $uri = 'uri116076'; + $expectedResponse = new AppGateway(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->appGatewayName('[PROJECT]', '[LOCATION]', '[APP_GATEWAY]'); + $request = (new GetAppGatewayRequest()) + ->setName($formattedName); + $response = $gapicClient->getAppGateway($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.beyondcorp.appgateways.v1.AppGatewaysService/GetAppGateway', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAppGatewayExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->appGatewayName('[PROJECT]', '[LOCATION]', '[APP_GATEWAY]'); + $request = (new GetAppGatewayRequest()) + ->setName($formattedName); + try { + $gapicClient->getAppGateway($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAppGatewaysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $appGatewaysElement = new AppGateway(); + $appGateways = [ + $appGatewaysElement, + ]; + $expectedResponse = new ListAppGatewaysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAppGateways($appGateways); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAppGatewaysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAppGateways($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAppGateways()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.beyondcorp.appgateways.v1.AppGatewaysService/ListAppGateways', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAppGatewaysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListAppGatewaysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAppGateways($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 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 createAppGatewayAsyncTest() + { + $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/createAppGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $uri = 'uri116076'; + $expectedResponse = new AppGateway(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAppGatewayTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $appGateway = new AppGateway(); + $appGatewayName = 'appGatewayName-1786203634'; + $appGateway->setName($appGatewayName); + $appGatewayType = Type::TYPE_UNSPECIFIED; + $appGateway->setType($appGatewayType); + $appGatewayHostType = HostType::HOST_TYPE_UNSPECIFIED; + $appGateway->setHostType($appGatewayHostType); + $request = (new CreateAppGatewayRequest()) + ->setParent($formattedParent) + ->setAppGateway($appGateway); + $response = $gapicClient->createAppGatewayAsync($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.beyondcorp.appgateways.v1.AppGatewaysService/CreateAppGateway', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAppGateway(); + $this->assertProtobufEquals($appGateway, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAppGatewayTest'); + $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/BeyondCorpClientConnectorServices/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientconnectorservices/V1/ClientConnectorServicesService.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientconnectorservices/V1/ClientConnectorServicesService.php new file mode 100644 index 0000000000000000000000000000000000000000..6282c792c478acc175fcb4581b7fc86cd64e134e GIT binary patch literal 6575 zcmcIpO>Em#94ASewy!X{2ODX|he?N41~@bzgi;DPZB~l9CS+MBMkLE|URtlNZEUBd zRK0LRd`Td2LPFxefje9{!ExN+HX#8Lr=2;Vo%p{GJ6UT-P04y`{6794zyIfZ@0Hh_ zO$W_L%fuqC=98Ax+>`uGA~~+@+q!K^%}%>bTuHaL9m6E9EJ;fhX{}P1%1bNtCt<5+ zcU+wmr48HOFiBoF?M^G-Bzv~i(rwp)0fSh+Zd(@7ecSbjyJP6Y%kRvIDK(r^gUR5B z%)~&*(zc1`XgZOWtEJ1t*IJsdHI^C2#vN7uGHmhKz2CD9EPODD5W zOPnTMd)~1D*aaz2ph~d@oEs~aPh3kg8%xB~UBdyms<5^+cBvxYu?uJB@Xx24RCK? z+jgS&GJkpQRYQ1((rSgya0y~^HZ&hK<^}ZeGwAxg3r1Yvv}G3PayQUnATsRaow@8I zLLSXAM9}ld&OXsI(WZ7+o5Jv7!F108S6Ej}&4?+pYr?!8noukX(h^G~5Mz1HWg852 zNQ7{OA6SDg$o)Qv&PL}8d>W0=)Raj`iP?!#>Q5z!Uqq9-OCXi1lujlIGn0j^%w^>i zK@2%GIo*|_yE+aeHL)voyj|1i{+8i6rnaXtF-8J05_l7hflC8oUM9_m)dCR)u$vsM zw!FeAbA{U|O*o@5#^|jfGAc8|oKFjl(kw?Zgplh2 zPnMW~Who6F{iiaDKLUwbkfIEWZU55P68^UPq^osETvw@p?^JyHc&x>T0!CsaF;&tLjx4C@-#D zS}8A0-G|3es=ipAN|dJ1DTBuVZC=2D*&h-p&Ak=Bi;zQzOIqrVqYKx0XNVYaHgc8m zSa)=Ao~O`6_=z)U5|rMx-K|gnu6PNfsa`Akdk)FnK%>n4@fmdbN?oa!59xeA8egoH zmHNus@>BxD*VXD0|4P!YrSfW-&86@p8mnDhTcZm{@HiS-s$5%}8pRW6v|OuIYE$Xr z=ZV|OrwR0YPto9c5$b{`LyMV@PB{2F1i=kxAHDp(_;rvsZJihE{C@EBKol21I$4qIUxv`QqZIJq%A7?LjCHX=R)M-6lI0)JuI+YnlYKPR&k$ zPr`vD#vp+`F5Ojng*66ut=vyZG_%MGcC-To{Dx=$S#&NAdevxk6IB8-NhWS3^N*q0 zh*w!~LYI3ym8Hkuvgm;wIQg(1#kNfDbmPo(b6*37S6TbgAH!~!!%{L$)KR@r*h+Je z`k}zvt08)76be0|cmxHC5Jv&SoMxK#uDWe_9+U?bmI9$~AS{=NNqo{Dp&@xS%_Ti% zWTD1PMTNZEj8r)x!ePpTJkw2!DLjMD3Ot}J>l&QMO_Nm*)*UnbQ?zhGAyR>` z2Zz86ZD&~qP8EK906iWJj3-JA{wj&i^+~*V{Uq764?&Tave$-Amsg0~>Mcc7ybpf+ z`-|iPo~Ktf`@9G)ga!FxPa(b-TY&M0Ni-ds({cSIO2m>2pc!IX$h~<>VMo2Yu%L&o z7$jmlk&6fT-z0jpU&+BIvS~kx0V0nDIQN{H~8 z=~qSG^nJ%G=JUI|yCSB;GnCfxHzEDNrTBAjHRQK#cf0gY61@cHt04RbxC1K9^e=qu zuArK@?r@p{L3)google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + */ +class ClientConnectorService extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of resource. The name is ignored during creation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. [Output only] Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Update time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User-provided name. + * The display name should follow certain format. + * * Must be 6 to 30 characters in length. + * * Can only contain lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Required. The details of the ingress settings. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ingress = null; + /** + * Required. The details of the egress settings. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $egress = null; + /** + * Output only. The operational state of the ClientConnectorService. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of resource. The name is ignored during creation. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create time stamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update time stamp. + * @type string $display_name + * Optional. User-provided name. + * The display name should follow certain format. + * * Must be 6 to 30 characters in length. + * * Can only contain lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress $ingress + * Required. The details of the ingress settings. + * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress $egress + * Required. The details of the egress settings. + * @type int $state + * Output only. The operational state of the ClientConnectorService. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of resource. The name is ignored during creation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of resource. The name is ignored during creation. + * + * 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; + } + + /** + * Output only. [Output only] Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Update time stamp. + * + * 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. [Output only] Update time stamp. + * + * 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; + } + + /** + * Optional. User-provided name. + * The display name should follow certain format. + * * Must be 6 to 30 characters in length. + * * Can only contain lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User-provided name. + * The display name should follow certain format. + * * Must be 6 to 30 characters in length. + * * Can only contain lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * + * 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; + } + + /** + * Required. The details of the ingress settings. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress|null + */ + public function getIngress() + { + return $this->ingress; + } + + public function hasIngress() + { + return isset($this->ingress); + } + + public function clearIngress() + { + unset($this->ingress); + } + + /** + * Required. The details of the ingress settings. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress $var + * @return $this + */ + public function setIngress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress::class); + $this->ingress = $var; + + return $this; + } + + /** + * Required. The details of the egress settings. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress|null + */ + public function getEgress() + { + return $this->egress; + } + + public function hasEgress() + { + return isset($this->egress); + } + + public function clearEgress() + { + unset($this->egress); + } + + /** + * Required. The details of the egress settings. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress $var + * @return $this + */ + public function setEgress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress::class); + $this->egress = $var; + + return $this; + } + + /** + * Output only. The operational state of the ClientConnectorService. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The operational state of the ClientConnectorService. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress.php new file mode 100644 index 000000000000..44f15504298f --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress.php @@ -0,0 +1,78 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + */ +class Egress extends \Google\Protobuf\Internal\Message +{ + protected $destination_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress\PeeredVpc $peered_vpc + * A VPC from the consumer project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * A VPC from the consumer project. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress\PeeredVpc|null + */ + public function getPeeredVpc() + { + return $this->readOneof(1); + } + + public function hasPeeredVpc() + { + return $this->hasOneof(1); + } + + /** + * A VPC from the consumer project. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress\PeeredVpc $var + * @return $this + */ + public function setPeeredVpc($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress\PeeredVpc::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestinationType() + { + return $this->whichOneof("destination_type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Egress::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Egress::class); + diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress/PeeredVpc.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress/PeeredVpc.php new file mode 100644 index 000000000000..cb600f930cf7 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress/PeeredVpc.php @@ -0,0 +1,70 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc + */ +class PeeredVpc extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the peered VPC owned by the consumer project. + * + * Generated from protobuf field string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_vpc = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_vpc + * Required. The name of the peered VPC owned by the consumer project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the peered VPC owned by the consumer project. + * + * Generated from protobuf field string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkVpc() + { + return $this->network_vpc; + } + + /** + * Required. The name of the peered VPC owned by the consumer project. + * + * Generated from protobuf field string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkVpc($var) + { + GPBUtil::checkString($var, True); + $this->network_vpc = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PeeredVpc::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Egress_PeeredVpc::class); + diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress.php new file mode 100644 index 000000000000..3d5145bd439d --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress.php @@ -0,0 +1,79 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + */ +class Ingress extends \Google\Protobuf\Internal\Message +{ + protected $ingress_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config $config + * The basic ingress config for ClientGateways. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * The basic ingress config for ClientGateways. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config|null + */ + public function getConfig() + { + return $this->readOneof(1); + } + + public function hasConfig() + { + return $this->hasOneof(1); + } + + /** + * The basic ingress config for ClientGateways. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getIngressConfig() + { + return $this->whichOneof("ingress_config"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Ingress::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Ingress::class); + diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config.php new file mode 100644 index 000000000000..ed18102df8ba --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config.php @@ -0,0 +1,108 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config + */ +class Config extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. The transport protocol used between the client and + * the server. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $transport_protocol = 0; + /** + * Required. The settings used to configure basic ClientGateways. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $destination_routes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $transport_protocol + * Required. Immutable. The transport protocol used between the client and + * the server. + * @type array<\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config\DestinationRoute>|\Google\Protobuf\Internal\RepeatedField $destination_routes + * Required. The settings used to configure basic ClientGateways. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. The transport protocol used between the client and + * the server. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getTransportProtocol() + { + return $this->transport_protocol; + } + + /** + * Required. Immutable. The transport protocol used between the client and + * the server. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setTransportProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config\TransportProtocol::class); + $this->transport_protocol = $var; + + return $this; + } + + /** + * Required. The settings used to configure basic ClientGateways. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinationRoutes() + { + return $this->destination_routes; + } + + /** + * Required. The settings used to configure basic ClientGateways. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config\DestinationRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinationRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config\DestinationRoute::class); + $this->destination_routes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Config::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Ingress_Config::class); + diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/DestinationRoute.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/DestinationRoute.php new file mode 100644 index 000000000000..42f139cc3904 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/DestinationRoute.php @@ -0,0 +1,114 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute + */ +class DestinationRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The network address of the subnet + * for which the packet is routed to the ClientGateway. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $address = ''; + /** + * Required. The network mask of the subnet + * for which the packet is routed to the ClientGateway. + * + * Generated from protobuf field string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $netmask = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address + * Required. The network address of the subnet + * for which the packet is routed to the ClientGateway. + * @type string $netmask + * Required. The network mask of the subnet + * for which the packet is routed to the ClientGateway. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The network address of the subnet + * for which the packet is routed to the ClientGateway. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Required. The network address of the subnet + * for which the packet is routed to the ClientGateway. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * Required. The network mask of the subnet + * for which the packet is routed to the ClientGateway. + * + * Generated from protobuf field string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetmask() + { + return $this->netmask; + } + + /** + * Required. The network mask of the subnet + * for which the packet is routed to the ClientGateway. + * + * Generated from protobuf field string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetmask($var) + { + GPBUtil::checkString($var, True); + $this->netmask = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DestinationRoute::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Ingress_Config_DestinationRoute::class); + diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/TransportProtocol.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/TransportProtocol.php new file mode 100644 index 000000000000..988fe0a16327 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/TransportProtocol.php @@ -0,0 +1,57 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol + */ +class TransportProtocol +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TRANSPORT_PROTOCOL_UNSPECIFIED = 0; + */ + const TRANSPORT_PROTOCOL_UNSPECIFIED = 0; + /** + * TCP protocol. + * + * Generated from protobuf enum TCP = 1; + */ + const TCP = 1; + + private static $valueToName = [ + self::TRANSPORT_PROTOCOL_UNSPECIFIED => 'TRANSPORT_PROTOCOL_UNSPECIFIED', + self::TCP => 'TCP', + ]; + + 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(TransportProtocol::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Ingress_Config_TransportProtocol::class); + diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/State.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/State.php new file mode 100644 index 000000000000..effe28bb052a --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/State.php @@ -0,0 +1,94 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * ClientConnectorService is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * ClientConnectorService is being updated. + * + * Generated from protobuf enum UPDATING = 2; + */ + const UPDATING = 2; + /** + * ClientConnectorService is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * ClientConnectorService is running. + * + * Generated from protobuf enum RUNNING = 4; + */ + const RUNNING = 4; + /** + * ClientConnectorService is down and may be restored in the future. + * This happens when CCFE sends ProjectState = OFF. + * + * Generated from protobuf enum DOWN = 5; + */ + const DOWN = 5; + /** + * ClientConnectorService encountered an error and is in an indeterministic + * state. + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::RUNNING => 'RUNNING', + self::DOWN => 'DOWN', + 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\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_State::class); + diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorServiceOperationMetadata.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorServiceOperationMetadata.php new file mode 100644 index 000000000000..844551d17009 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorServiceOperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata + */ +class ClientConnectorServiceOperationMetadata 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\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/CreateClientConnectorServiceRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/CreateClientConnectorServiceRequest.php new file mode 100644 index 000000000000..0a95214649da --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/CreateClientConnectorServiceRequest.php @@ -0,0 +1,301 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + */ +class CreateClientConnectorServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. User-settable client connector service resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * A random system generated name will be assigned + * if not specified by the user. + * + * Generated from protobuf field string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client_connector_service_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_connector_service = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see ClientConnectorServicesServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $clientConnectorService Required. The resource being created. + * @param string $clientConnectorServiceId Optional. User-settable client connector service resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * A random system generated name will be assigned + * if not specified by the user. + * + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\CreateClientConnectorServiceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $clientConnectorService, string $clientConnectorServiceId): self + { + return (new self()) + ->setParent($parent) + ->setClientConnectorService($clientConnectorService) + ->setClientConnectorServiceId($clientConnectorServiceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $client_connector_service_id + * Optional. User-settable client connector service resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * A random system generated name will be assigned + * if not specified by the user. + * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $client_connector_service + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. User-settable client connector service resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * A random system generated name will be assigned + * if not specified by the user. + * + * Generated from protobuf field string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClientConnectorServiceId() + { + return $this->client_connector_service_id; + } + + /** + * Optional. User-settable client connector service resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * A random system generated name will be assigned + * if not specified by the user. + * + * Generated from protobuf field string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClientConnectorServiceId($var) + { + GPBUtil::checkString($var, True); + $this->client_connector_service_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService|null + */ + public function getClientConnectorService() + { + return $this->client_connector_service; + } + + public function hasClientConnectorService() + { + return isset($this->client_connector_service); + } + + public function clearClientConnectorService() + { + unset($this->client_connector_service); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $var + * @return $this + */ + public function setClientConnectorService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService::class); + $this->client_connector_service = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/DeleteClientConnectorServiceRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/DeleteClientConnectorServiceRequest.php new file mode 100644 index 000000000000..191baa3fdc0e --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/DeleteClientConnectorServiceRequest.php @@ -0,0 +1,193 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + */ +class DeleteClientConnectorServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see ClientConnectorServicesServiceClient::clientConnectorServiceName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\DeleteClientConnectorServiceRequest + * + * @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. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * 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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/GetClientConnectorServiceRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/GetClientConnectorServiceRequest.php new file mode 100644 index 000000000000..375cdd935d62 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/GetClientConnectorServiceRequest.php @@ -0,0 +1,81 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + */ +class GetClientConnectorServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see ClientConnectorServicesServiceClient::clientConnectorServiceName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\GetClientConnectorServiceRequest + * + * @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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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. Name of the resource. + * + * 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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesRequest.php new file mode 100644 index 000000000000..5f92bfb0a749 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesRequest.php @@ -0,0 +1,221 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + */ +class ListClientConnectorServicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListClientConnectorServicesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListClientConnectorServicesRequest. Please see + * {@see ClientConnectorServicesServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ListClientConnectorServicesRequest + * + * @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. Parent value for ListClientConnectorServicesRequest. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filtering results. + * @type string $order_by + * Optional. Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListClientConnectorServicesRequest. + * + * 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. Parent value for ListClientConnectorServicesRequest. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * 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. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results. + * + * 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. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results. + * + * 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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesResponse.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesResponse.php new file mode 100644 index 000000000000..606e1598f06e --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesResponse.php @@ -0,0 +1,135 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse + */ +class ListClientConnectorServicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of ClientConnectorService. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + */ + private $client_connector_services; + /** + * A token identifying a page of results the server should return. + * + * 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\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService>|\Google\Protobuf\Internal\RepeatedField $client_connector_services + * The list of ClientConnectorService. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * The list of ClientConnectorService. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClientConnectorServices() + { + return $this->client_connector_services; + } + + /** + * The list of ClientConnectorService. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * @param array<\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClientConnectorServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService::class); + $this->client_connector_services = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/UpdateClientConnectorServiceRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/UpdateClientConnectorServiceRequest.php new file mode 100644 index 000000000000..d972d609914e --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/UpdateClientConnectorServiceRequest.php @@ -0,0 +1,308 @@ +google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + */ +class UpdateClientConnectorServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * ClientConnectorService resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * Mutable fields: display_name. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_connector_service = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. If set as true, will create the resource if it is not found. + * + * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $clientConnectorService Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * ClientConnectorService resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Mutable fields: display_name. + * + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\UpdateClientConnectorServiceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $clientConnectorService, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setClientConnectorService($clientConnectorService) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * ClientConnectorService resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * Mutable fields: display_name. + * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $client_connector_service + * Required. The resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * @type bool $allow_missing + * Optional. If set as true, will create the resource if it is not found. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * ClientConnectorService resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * Mutable fields: display_name. + * + * 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. Field mask is used to specify the fields to be overwritten in the + * ClientConnectorService resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * Mutable fields: display_name. + * + * 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. The resource being updated. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService|null + */ + public function getClientConnectorService() + { + return $this->client_connector_service; + } + + public function hasClientConnectorService() + { + return isset($this->client_connector_service); + } + + public function clearClientConnectorService() + { + unset($this->client_connector_service); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $var + * @return $this + */ + public function setClientConnectorService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService::class); + $this->client_connector_service = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * 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; + } + + /** + * Optional. If set as true, will create the resource if it is not found. + * + * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. If set as true, will create the resource if it is not found. + * + * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php new file mode 100644 index 000000000000..470f65418ff7 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php @@ -0,0 +1,96 @@ +setName($clientConnectorServiceName) + ->setIngress($clientConnectorServiceIngress) + ->setEgress($clientConnectorServiceEgress); + $request = (new CreateClientConnectorServiceRequest()) + ->setParent($formattedParent) + ->setClientConnectorService($clientConnectorService); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clientConnectorServicesServiceClient->createClientConnectorService($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ClientConnectorService $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 = ClientConnectorServicesServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $clientConnectorServiceName = '[NAME]'; + + create_client_connector_service_sample($formattedParent, $clientConnectorServiceName); +} +// [END beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php new file mode 100644 index 000000000000..32795152c60a --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clientConnectorServicesServiceClient->deleteClientConnectorService($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 = ClientConnectorServicesServiceClient::clientConnectorServiceName( + '[PROJECT]', + '[LOCATION]', + '[CLIENT_CONNECTOR_SERVICE]' + ); + + delete_client_connector_service_sample($formattedName); +} +// [END beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php new file mode 100644 index 000000000000..df0d1d1beb4f --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ClientConnectorService $response */ + $response = $clientConnectorServicesServiceClient->getClientConnectorService($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 = ClientConnectorServicesServiceClient::clientConnectorServiceName( + '[PROJECT]', + '[LOCATION]', + '[CLIENT_CONNECTOR_SERVICE]' + ); + + get_client_connector_service_sample($formattedName); +} +// [END beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..b341bdb728ed --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $clientConnectorServicesServiceClient->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 beyondcorp_v1_generated_ClientConnectorServicesService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_location.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_location.php new file mode 100644 index 000000000000..a6d52b4a274a --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/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 beyondcorp_v1_generated_ClientConnectorServicesService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php new file mode 100644 index 000000000000..7ef63bc8ddb1 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $clientConnectorServicesServiceClient->listClientConnectorServices($request); + + /** @var ClientConnectorService $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 = ClientConnectorServicesServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_client_connector_services_sample($formattedParent); +} +// [END beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_locations.php new file mode 100644 index 000000000000..f4b343381f1b --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/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 beyondcorp_v1_generated_ClientConnectorServicesService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..f9dbbecda9bb --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/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 = $clientConnectorServicesServiceClient->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 beyondcorp_v1_generated_ClientConnectorServicesService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..59dd05dccdb7 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/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 = $clientConnectorServicesServiceClient->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 beyondcorp_v1_generated_ClientConnectorServicesService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php new file mode 100644 index 000000000000..270ef0c9aaef --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php @@ -0,0 +1,93 @@ +setName($clientConnectorServiceName) + ->setIngress($clientConnectorServiceIngress) + ->setEgress($clientConnectorServiceEgress); + $request = (new UpdateClientConnectorServiceRequest()) + ->setUpdateMask($updateMask) + ->setClientConnectorService($clientConnectorService); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clientConnectorServicesServiceClient->updateClientConnectorService($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ClientConnectorService $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 +{ + $clientConnectorServiceName = '[NAME]'; + + update_client_connector_service_sample($clientConnectorServiceName); +} +// [END beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/Client/ClientConnectorServicesServiceClient.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/Client/ClientConnectorServicesServiceClient.php new file mode 100644 index 000000000000..fd0b2fca9dbf --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/Client/ClientConnectorServicesServiceClient.php @@ -0,0 +1,602 @@ + createClientConnectorServiceAsync(CreateClientConnectorServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClientConnectorServiceAsync(DeleteClientConnectorServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClientConnectorServiceAsync(GetClientConnectorServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClientConnectorServicesAsync(ListClientConnectorServicesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClientConnectorServiceAsync(UpdateClientConnectorServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class ClientConnectorServicesServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/client_connector_services_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/client_connector_services_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/client_connector_services_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/client_connector_services_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * client_connector_service resource. + * + * @param string $project + * @param string $location + * @param string $clientConnectorService + * + * @return string The formatted client_connector_service resource. + */ + public static function clientConnectorServiceName(string $project, string $location, string $clientConnectorService): string + { + return self::getPathTemplate('clientConnectorService')->render([ + 'project' => $project, + 'location' => $location, + 'client_connector_service' => $clientConnectorService, + ]); + } + + /** + * 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 + * - clientConnectorService: projects/{project}/locations/{location}/clientConnectorServices/{client_connector_service} + * - 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 'beyondcorp.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 new ClientConnectorService in a given project and location. + * + * The async variant is + * {@see ClientConnectorServicesServiceClient::createClientConnectorServiceAsync()} + * . + * + * @example samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php + * + * @param CreateClientConnectorServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createClientConnectorService(CreateClientConnectorServiceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateClientConnectorService', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ClientConnectorService. + * + * The async variant is + * {@see ClientConnectorServicesServiceClient::deleteClientConnectorServiceAsync()} + * . + * + * @example samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php + * + * @param DeleteClientConnectorServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteClientConnectorService(DeleteClientConnectorServiceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteClientConnectorService', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ClientConnectorService. + * + * The async variant is + * {@see ClientConnectorServicesServiceClient::getClientConnectorServiceAsync()} . + * + * @example samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php + * + * @param GetClientConnectorServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ClientConnectorService + * + * @throws ApiException Thrown if the API call fails. + */ + public function getClientConnectorService(GetClientConnectorServiceRequest $request, array $callOptions = []): ClientConnectorService + { + return $this->startApiCall('GetClientConnectorService', $request, $callOptions)->wait(); + } + + /** + * Lists ClientConnectorServices in a given project and location. + * + * The async variant is + * {@see ClientConnectorServicesServiceClient::listClientConnectorServicesAsync()} + * . + * + * @example samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php + * + * @param ListClientConnectorServicesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listClientConnectorServices(ListClientConnectorServicesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListClientConnectorServices', $request, $callOptions); + } + + /** + * Updates the parameters of a single ClientConnectorService. + * + * The async variant is + * {@see ClientConnectorServicesServiceClient::updateClientConnectorServiceAsync()} + * . + * + * @example samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php + * + * @param UpdateClientConnectorServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateClientConnectorService(UpdateClientConnectorServiceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateClientConnectorService', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is + * {@see ClientConnectorServicesServiceClient::getLocationAsync()} . + * + * @example samples/V1/ClientConnectorServicesServiceClient/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 ClientConnectorServicesServiceClient::listLocationsAsync()} . + * + * @example samples/V1/ClientConnectorServicesServiceClient/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); + } + + /** + * 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 ClientConnectorServicesServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/ClientConnectorServicesServiceClient/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 ClientConnectorServicesServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/ClientConnectorServicesServiceClient/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 ClientConnectorServicesServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/ClientConnectorServicesServiceClient/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(); + } +} diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..720b69b26a56 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.beyondcorp.clientconnectorservices.v1", + "libraryPackage": "Google\\Cloud\\BeyondCorp\\ClientConnectorServices\\V1", + "services": { + "ClientConnectorServicesService": { + "clients": { + "grpc": { + "libraryClient": "ClientConnectorServicesServiceGapicClient", + "rpcs": { + "CreateClientConnectorService": { + "methods": [ + "createClientConnectorService" + ] + }, + "DeleteClientConnectorService": { + "methods": [ + "deleteClientConnectorService" + ] + }, + "GetClientConnectorService": { + "methods": [ + "getClientConnectorService" + ] + }, + "ListClientConnectorServices": { + "methods": [ + "listClientConnectorServices" + ] + }, + "UpdateClientConnectorService": { + "methods": [ + "updateClientConnectorService" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_client_config.json b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_client_config.json new file mode 100644 index 000000000000..28b8380f1ff7 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_client_config.json @@ -0,0 +1,72 @@ +{ + "interfaces": { + "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService": { + "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": { + "CreateClientConnectorService": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteClientConnectorService": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetClientConnectorService": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListClientConnectorServices": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateClientConnectorService": { + "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" + }, + "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" + } + } + } + } +} diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_descriptor_config.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_descriptor_config.php new file mode 100644 index 000000000000..0dbda905ab14 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_descriptor_config.php @@ -0,0 +1,195 @@ + [ + 'google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService' => [ + 'CreateClientConnectorService' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorServiceOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteClientConnectorService' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorServiceOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateClientConnectorService' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorServiceOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'client_connector_service.name', + 'fieldAccessors' => [ + 'getClientConnectorService', + 'getName', + ], + ], + ], + ], + 'GetClientConnectorService' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListClientConnectorServices' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getClientConnectorServices', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ListClientConnectorServicesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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', + ], + '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', + ], + 'templateMap' => [ + 'clientConnectorService' => 'projects/{project}/locations/{location}/clientConnectorServices/{client_connector_service}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_rest_client_config.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_rest_client_config.php new file mode 100644 index 000000000000..ae310fcb8790 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_rest_client_config.php @@ -0,0 +1,260 @@ + [ + 'google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService' => [ + 'CreateClientConnectorService' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientConnectorServices', + 'body' => 'client_connector_service', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteClientConnectorService' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientConnectorServices/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetClientConnectorService' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientConnectorServices/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListClientConnectorServices' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientConnectorServices', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateClientConnectorService' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{client_connector_service.name=projects/*/locations/*/clientConnectorServices/*}', + 'body' => 'client_connector_service', + 'placeholders' => [ + 'client_connector_service.name' => [ + 'getters' => [ + 'getClientConnectorService', + '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/*/appConnections/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpClientConnectorServices/v1/tests/Unit/V1/Client/ClientConnectorServicesServiceClientTest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/tests/Unit/V1/Client/ClientConnectorServicesServiceClientTest.php new file mode 100644 index 000000000000..df045ae7b20d --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/tests/Unit/V1/Client/ClientConnectorServicesServiceClientTest.php @@ -0,0 +1,1037 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ClientConnectorServicesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ClientConnectorServicesServiceClient($options); + } + + /** @test */ + public function createClientConnectorServiceTest() + { + $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/createClientConnectorServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ClientConnectorService(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClientConnectorServiceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientConnectorService = new ClientConnectorService(); + $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; + $clientConnectorService->setName($clientConnectorServiceName); + $clientConnectorServiceIngress = new Ingress(); + $clientConnectorService->setIngress($clientConnectorServiceIngress); + $clientConnectorServiceEgress = new Egress(); + $clientConnectorService->setEgress($clientConnectorServiceEgress); + $request = (new CreateClientConnectorServiceRequest()) + ->setParent($formattedParent) + ->setClientConnectorService($clientConnectorService); + $response = $gapicClient->createClientConnectorService($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/CreateClientConnectorService', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClientConnectorService(); + $this->assertProtobufEquals($clientConnectorService, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientConnectorServiceTest'); + $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 createClientConnectorServiceExceptionTest() + { + $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/createClientConnectorServiceTest'); + $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]'); + $clientConnectorService = new ClientConnectorService(); + $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; + $clientConnectorService->setName($clientConnectorServiceName); + $clientConnectorServiceIngress = new Ingress(); + $clientConnectorService->setIngress($clientConnectorServiceIngress); + $clientConnectorServiceEgress = new Egress(); + $clientConnectorService->setEgress($clientConnectorServiceEgress); + $request = (new CreateClientConnectorServiceRequest()) + ->setParent($formattedParent) + ->setClientConnectorService($clientConnectorService); + $response = $gapicClient->createClientConnectorService($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientConnectorServiceTest'); + 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 deleteClientConnectorServiceTest() + { + $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/deleteClientConnectorServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClientConnectorServiceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clientConnectorServiceName('[PROJECT]', '[LOCATION]', '[CLIENT_CONNECTOR_SERVICE]'); + $request = (new DeleteClientConnectorServiceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClientConnectorService($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/DeleteClientConnectorService', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientConnectorServiceTest'); + $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 deleteClientConnectorServiceExceptionTest() + { + $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/deleteClientConnectorServiceTest'); + $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->clientConnectorServiceName('[PROJECT]', '[LOCATION]', '[CLIENT_CONNECTOR_SERVICE]'); + $request = (new DeleteClientConnectorServiceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClientConnectorService($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientConnectorServiceTest'); + 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 getClientConnectorServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ClientConnectorService(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clientConnectorServiceName('[PROJECT]', '[LOCATION]', '[CLIENT_CONNECTOR_SERVICE]'); + $request = (new GetClientConnectorServiceRequest()) + ->setName($formattedName); + $response = $gapicClient->getClientConnectorService($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/GetClientConnectorService', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClientConnectorServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->clientConnectorServiceName('[PROJECT]', '[LOCATION]', '[CLIENT_CONNECTOR_SERVICE]'); + $request = (new GetClientConnectorServiceRequest()) + ->setName($formattedName); + try { + $gapicClient->getClientConnectorService($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClientConnectorServicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clientConnectorServicesElement = new ClientConnectorService(); + $clientConnectorServices = [ + $clientConnectorServicesElement, + ]; + $expectedResponse = new ListClientConnectorServicesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClientConnectorServices($clientConnectorServices); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClientConnectorServicesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClientConnectorServices($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClientConnectorServices()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/ListClientConnectorServices', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClientConnectorServicesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListClientConnectorServicesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listClientConnectorServices($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateClientConnectorServiceTest() + { + $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/updateClientConnectorServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ClientConnectorService(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateClientConnectorServiceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $clientConnectorService = new ClientConnectorService(); + $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; + $clientConnectorService->setName($clientConnectorServiceName); + $clientConnectorServiceIngress = new Ingress(); + $clientConnectorService->setIngress($clientConnectorServiceIngress); + $clientConnectorServiceEgress = new Egress(); + $clientConnectorService->setEgress($clientConnectorServiceEgress); + $request = (new UpdateClientConnectorServiceRequest()) + ->setUpdateMask($updateMask) + ->setClientConnectorService($clientConnectorService); + $response = $gapicClient->updateClientConnectorService($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/UpdateClientConnectorService', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getClientConnectorService(); + $this->assertProtobufEquals($clientConnectorService, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClientConnectorServiceTest'); + $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 updateClientConnectorServiceExceptionTest() + { + $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/updateClientConnectorServiceTest'); + $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(); + $clientConnectorService = new ClientConnectorService(); + $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; + $clientConnectorService->setName($clientConnectorServiceName); + $clientConnectorServiceIngress = new Ingress(); + $clientConnectorService->setIngress($clientConnectorServiceIngress); + $clientConnectorServiceEgress = new Egress(); + $clientConnectorService->setEgress($clientConnectorServiceEgress); + $request = (new UpdateClientConnectorServiceRequest()) + ->setUpdateMask($updateMask) + ->setClientConnectorService($clientConnectorService); + $response = $gapicClient->updateClientConnectorService($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClientConnectorServiceTest'); + 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 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 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 createClientConnectorServiceAsyncTest() + { + $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/createClientConnectorServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ClientConnectorService(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClientConnectorServiceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientConnectorService = new ClientConnectorService(); + $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; + $clientConnectorService->setName($clientConnectorServiceName); + $clientConnectorServiceIngress = new Ingress(); + $clientConnectorService->setIngress($clientConnectorServiceIngress); + $clientConnectorServiceEgress = new Egress(); + $clientConnectorService->setEgress($clientConnectorServiceEgress); + $request = (new CreateClientConnectorServiceRequest()) + ->setParent($formattedParent) + ->setClientConnectorService($clientConnectorService); + $response = $gapicClient->createClientConnectorServiceAsync($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/CreateClientConnectorService', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClientConnectorService(); + $this->assertProtobufEquals($clientConnectorService, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientConnectorServiceTest'); + $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/BeyondCorpClientGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientgateways/V1/ClientGatewaysService.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientgateways/V1/ClientGatewaysService.php new file mode 100644 index 0000000000000000000000000000000000000000..64586f6a1acbc37bc95213293e8ec6afcdb13f13 GIT binary patch literal 4281 zcmb_f&2Jk;6vuXwCKKAEQ>Ar`D2rQ^4>h|=s07-QR_l*ik=n#KNkPccYP}viTQ$WMhf=-9Hf^P3ShDlse5Gq^3=GKl-t!(VP z4WgbMxH^%Au5EWsBI%|bw51j~vaPmmyACWE#PYkK{7^gcq=QwyqDD)qN8AHLCt`Rf zLYB5qJV(=sP^*_76JKjYHV%zFCUZ!$MMh^U3NxgmhE$Jb~@h_{H1o5_F6N z_;Z4mY3PFIYd-wDZFs6-8NQ*J#utFWy3o-~kASArXFGwV`-W`^RA9@}$>Ng0bkei8 z9UCxP7b0`(6h?rsxncRlwKTI?A)f9Uj&HklI4a9s;>Y0AmBl4~Emdc9ghghfET1xR zUGUw2BySf4m-vBe-3#re3VQLc<`6Iy$7m{+Wm6Pv%ai54Pkj|H6J+p?CiBoBX1hf8 zv;)I-M-y!jo@nPb@{w(I-N3R8tJ~aiXnK$4WE{I40}|5L_MPDthcREdZ}12!?RFf{ zhfp$$aR_KY7SNybsP;eA3SMH0#IWeZe$l}~vMR)b)xr&ar{);E09m~i-b!qAXnfQb z4-h{vpE%(1DDbUYe9P=ZE!i>D0~dtl4YeTo5uWTo@t+*JoGMm)6^&6A$Y+Gi;#4X3 zo07$M(X{RoC}x$4=d-Xgy;cyJ0Zb9-7UNh^sT`FG9N-Twl{=qQ1C7(FBl$5ne`W1{ zbj#T=izz?EZK{P?GJ~>4J3k&dl*8|!Jd2X5+m=OiV1$SX^Aqv0;!`vpYQb~p>h_MZ zQ&o32x9ipN#>0(jW%f1vI+`pus>;sBW^Fb@zjo^t_LZeymFlBvxR=Az=u%^MbCVt% z!;@&Nvh~sC>^Po6W-|KP6V4CP$cT8GH>*bPN+1JInySIEN-}w@qBN zb<~ezrubb36^0q_IY6lde~4z%?t0)x4s!SXSIsIgd&VN4`)a~=S`JfS_HY_3t~NB zQv!oiHqkuhHhrB%H&fQc?_ktd4e}~w+;i~iDw-r#dn77`n({Rl+MRx(KKYuBT zUvBM}Ni>(j!{cos{v(6%=_|MM@yXj*_ zj_WZQFDFQNd60bZvkaOYdViBE&?$#M^WpGDV( zFcBUF`62R=Z*NBUBpMwtuBGA+nG;1C>|xF*yyr@Dfkp04n!*M?fq_C?D#cfbwmd+O z_^%AQHiV=`!fA;7IdM8ZQQkvygDqQi-|>&|nQ$diWSK!RQi>EFpD6P$?QDKk#6914 zJXw+s4-a{?google.cloud.beyondcorp.clientgateways.v1.ClientGateway + */ +class ClientGateway extends \Google\Protobuf\Internal\Message +{ + /** + * Required. name of resource. The name is ignored during creation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. [Output only] Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Update time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The operational state of the gateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. A unique identifier for the instance generated by the system. + * + * Generated from protobuf field string id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * Output only. The client connector service name that the client gateway is + * associated to. Client Connector Services, named as follows: + * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. + * + * Generated from protobuf field string client_connector_service = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $client_connector_service = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. name of resource. The name is ignored during creation. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create time stamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update time stamp. + * @type int $state + * Output only. The operational state of the gateway. + * @type string $id + * Output only. A unique identifier for the instance generated by the system. + * @type string $client_connector_service + * Output only. The client connector service name that the client gateway is + * associated to. Client Connector Services, named as follows: + * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. name of resource. The name is ignored during creation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. name of resource. The name is ignored during creation. + * + * 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; + } + + /** + * Output only. [Output only] Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Update time stamp. + * + * 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. [Output only] Update time stamp. + * + * 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. The operational state of the gateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The operational state of the gateway. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. A unique identifier for the instance generated by the system. + * + * Generated from protobuf field string id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. A unique identifier for the instance generated by the system. + * + * Generated from protobuf field string id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Output only. The client connector service name that the client gateway is + * associated to. Client Connector Services, named as follows: + * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. + * + * Generated from protobuf field string client_connector_service = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getClientConnectorService() + { + return $this->client_connector_service; + } + + /** + * Output only. The client connector service name that the client gateway is + * associated to. Client Connector Services, named as follows: + * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. + * + * Generated from protobuf field string client_connector_service = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setClientConnectorService($var) + { + GPBUtil::checkString($var, True); + $this->client_connector_service = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway/State.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway/State.php new file mode 100644 index 000000000000..f22273017c96 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway/State.php @@ -0,0 +1,93 @@ +google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Gateway is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Gateway is being updated. + * + * Generated from protobuf enum UPDATING = 2; + */ + const UPDATING = 2; + /** + * Gateway is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Gateway is running. + * + * Generated from protobuf enum RUNNING = 4; + */ + const RUNNING = 4; + /** + * Gateway is down and may be restored in the future. + * This happens when CCFE sends ProjectState = OFF. + * + * Generated from protobuf enum DOWN = 5; + */ + const DOWN = 5; + /** + * ClientGateway encountered an error and is in indeterministic state. + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::RUNNING => 'RUNNING', + self::DOWN => 'DOWN', + 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\BeyondCorp\ClientGateways\V1\ClientGateway_State::class); + diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGatewayOperationMetadata.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGatewayOperationMetadata.php new file mode 100644 index 000000000000..eebce8959553 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGatewayOperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.beyondcorp.clientgateways.v1.ClientGatewayOperationMetadata + */ +class ClientGatewayOperationMetadata 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 been cancelled successfully + * 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 been cancelled successfully + * 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\Beyondcorp\Clientgateways\V1\ClientGatewaysService::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 been cancelled successfully + * 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 been cancelled successfully + * 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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/CreateClientGatewayRequest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/CreateClientGatewayRequest.php new file mode 100644 index 000000000000..09b409646d7a --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/CreateClientGatewayRequest.php @@ -0,0 +1,290 @@ +google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest + */ +class CreateClientGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. User-settable client gateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string client_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client_gateway_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_gateway = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see ClientGatewaysServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway $clientGateway Required. The resource being created. + * @param string $clientGatewayId Optional. User-settable client gateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\CreateClientGatewayRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway $clientGateway, string $clientGatewayId): self + { + return (new self()) + ->setParent($parent) + ->setClientGateway($clientGateway) + ->setClientGatewayId($clientGatewayId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $client_gateway_id + * Optional. User-settable client gateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * @type \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway $client_gateway + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. User-settable client gateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string client_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClientGatewayId() + { + return $this->client_gateway_id; + } + + /** + * Optional. User-settable client gateway resource ID. + * * Must start with a letter. + * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + * * Must end with a number or a letter. + * + * Generated from protobuf field string client_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClientGatewayId($var) + { + GPBUtil::checkString($var, True); + $this->client_gateway_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway|null + */ + public function getClientGateway() + { + return $this->client_gateway; + } + + public function hasClientGateway() + { + return isset($this->client_gateway); + } + + public function clearClientGateway() + { + unset($this->client_gateway); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway $var + * @return $this + */ + public function setClientGateway($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway::class); + $this->client_gateway = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/DeleteClientGatewayRequest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/DeleteClientGatewayRequest.php new file mode 100644 index 000000000000..4ebd3346210c --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/DeleteClientGatewayRequest.php @@ -0,0 +1,193 @@ +google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest + */ +class DeleteClientGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $name Required. Name of the resource + * Please see {@see ClientGatewaysServiceClient::clientGatewayName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\DeleteClientGatewayRequest + * + * @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. Name of the resource + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * 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. Name of the resource + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validates request by executing a dry-run which would not + * alter the resource in any way. + * + * 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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/GetClientGatewayRequest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/GetClientGatewayRequest.php new file mode 100644 index 000000000000..34aa28bf8694 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/GetClientGatewayRequest.php @@ -0,0 +1,81 @@ +google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest + */ +class GetClientGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see ClientGatewaysServiceClient::clientGatewayName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\GetClientGatewayRequest + * + * @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. Name of the resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * 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. Name of the resource + * + * 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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysRequest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysRequest.php new file mode 100644 index 000000000000..4c7efdb4e0d1 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysRequest.php @@ -0,0 +1,221 @@ +google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest + */ +class ListClientGatewaysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListClientGatewaysRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListClientGatewaysRequest. Please see + * {@see ClientGatewaysServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\ListClientGatewaysRequest + * + * @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. Parent value for ListClientGatewaysRequest. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filtering results. + * @type string $order_by + * Optional. Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListClientGatewaysRequest. + * + * 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. Parent value for ListClientGatewaysRequest. + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * 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. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results. + * + * 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. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results. + * + * 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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysResponse.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysResponse.php new file mode 100644 index 000000000000..41559467cdc4 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysResponse.php @@ -0,0 +1,135 @@ +google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse + */ +class ListClientGatewaysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of ClientGateway. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateways = 1; + */ + private $client_gateways; + /** + * A token identifying a page of results the server should return. + * + * 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\BeyondCorp\ClientGateways\V1\ClientGateway>|\Google\Protobuf\Internal\RepeatedField $client_gateways + * The list of ClientGateway. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); + parent::__construct($data); + } + + /** + * The list of ClientGateway. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateways = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClientGateways() + { + return $this->client_gateways; + } + + /** + * The list of ClientGateway. + * + * Generated from protobuf field repeated .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateways = 1; + * @param array<\Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClientGateways($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway::class); + $this->client_gateways = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/create_client_gateway.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/create_client_gateway.php new file mode 100644 index 000000000000..97a045e3ce95 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/create_client_gateway.php @@ -0,0 +1,88 @@ +setName($clientGatewayName); + $request = (new CreateClientGatewayRequest()) + ->setParent($formattedParent) + ->setClientGateway($clientGateway); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clientGatewaysServiceClient->createClientGateway($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ClientGateway $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 = ClientGatewaysServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $clientGatewayName = '[NAME]'; + + create_client_gateway_sample($formattedParent, $clientGatewayName); +} +// [END beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php new file mode 100644 index 000000000000..7ff430162461 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clientGatewaysServiceClient->deleteClientGateway($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 = ClientGatewaysServiceClient::clientGatewayName( + '[PROJECT]', + '[LOCATION]', + '[CLIENT_GATEWAY]' + ); + + delete_client_gateway_sample($formattedName); +} +// [END beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_client_gateway.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_client_gateway.php new file mode 100644 index 000000000000..1e113cbd841f --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_client_gateway.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ClientGateway $response */ + $response = $clientGatewaysServiceClient->getClientGateway($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 = ClientGatewaysServiceClient::clientGatewayName( + '[PROJECT]', + '[LOCATION]', + '[CLIENT_GATEWAY]' + ); + + get_client_gateway_sample($formattedName); +} +// [END beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..eb57c1d037ba --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $clientGatewaysServiceClient->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 beyondcorp_v1_generated_ClientGatewaysService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_location.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_location.php new file mode 100644 index 000000000000..1596f24d637c --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/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 beyondcorp_v1_generated_ClientGatewaysService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_client_gateways.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_client_gateways.php new file mode 100644 index 000000000000..668f730cde0b --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_client_gateways.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $clientGatewaysServiceClient->listClientGateways($request); + + /** @var ClientGateway $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 = ClientGatewaysServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_client_gateways_sample($formattedParent); +} +// [END beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_locations.php new file mode 100644 index 000000000000..621532f73343 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/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 beyondcorp_v1_generated_ClientGatewaysService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..f9bbc4cb80d6 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/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 = $clientGatewaysServiceClient->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 beyondcorp_v1_generated_ClientGatewaysService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..15cad423794d --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/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 = $clientGatewaysServiceClient->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 beyondcorp_v1_generated_ClientGatewaysService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/Client/ClientGatewaysServiceClient.php b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/Client/ClientGatewaysServiceClient.php new file mode 100644 index 000000000000..e2d7bbf546db --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/Client/ClientGatewaysServiceClient.php @@ -0,0 +1,565 @@ + createClientGatewayAsync(CreateClientGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClientGatewayAsync(DeleteClientGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClientGatewayAsync(GetClientGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClientGatewaysAsync(ListClientGatewaysRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class ClientGatewaysServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/client_gateways_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/client_gateways_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/client_gateways_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/client_gateways_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * client_gateway resource. + * + * @param string $project + * @param string $location + * @param string $clientGateway + * + * @return string The formatted client_gateway resource. + */ + public static function clientGatewayName(string $project, string $location, string $clientGateway): string + { + return self::getPathTemplate('clientGateway')->render([ + 'project' => $project, + 'location' => $location, + 'client_gateway' => $clientGateway, + ]); + } + + /** + * 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 + * - clientGateway: projects/{project}/locations/{location}/clientGateways/{client_gateway} + * - 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 'beyondcorp.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 new ClientGateway in a given project and location. + * + * The async variant is + * {@see ClientGatewaysServiceClient::createClientGatewayAsync()} . + * + * @example samples/V1/ClientGatewaysServiceClient/create_client_gateway.php + * + * @param CreateClientGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createClientGateway(CreateClientGatewayRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateClientGateway', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ClientGateway. + * + * The async variant is + * {@see ClientGatewaysServiceClient::deleteClientGatewayAsync()} . + * + * @example samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php + * + * @param DeleteClientGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteClientGateway(DeleteClientGatewayRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteClientGateway', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ClientGateway. + * + * The async variant is {@see ClientGatewaysServiceClient::getClientGatewayAsync()} + * . + * + * @example samples/V1/ClientGatewaysServiceClient/get_client_gateway.php + * + * @param GetClientGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ClientGateway + * + * @throws ApiException Thrown if the API call fails. + */ + public function getClientGateway(GetClientGatewayRequest $request, array $callOptions = []): ClientGateway + { + return $this->startApiCall('GetClientGateway', $request, $callOptions)->wait(); + } + + /** + * Lists ClientGateways in a given project and location. + * + * The async variant is + * {@see ClientGatewaysServiceClient::listClientGatewaysAsync()} . + * + * @example samples/V1/ClientGatewaysServiceClient/list_client_gateways.php + * + * @param ListClientGatewaysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listClientGateways(ListClientGatewaysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListClientGateways', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ClientGatewaysServiceClient::getLocationAsync()} . + * + * @example samples/V1/ClientGatewaysServiceClient/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 ClientGatewaysServiceClient::listLocationsAsync()} . + * + * @example samples/V1/ClientGatewaysServiceClient/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); + } + + /** + * 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 ClientGatewaysServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/ClientGatewaysServiceClient/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 ClientGatewaysServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/ClientGatewaysServiceClient/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 ClientGatewaysServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/ClientGatewaysServiceClient/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(); + } +} diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..cb3b63e30fc4 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.beyondcorp.clientgateways.v1", + "libraryPackage": "Google\\Cloud\\BeyondCorp\\ClientGateways\\V1", + "services": { + "ClientGatewaysService": { + "clients": { + "grpc": { + "libraryClient": "ClientGatewaysServiceGapicClient", + "rpcs": { + "CreateClientGateway": { + "methods": [ + "createClientGateway" + ] + }, + "DeleteClientGateway": { + "methods": [ + "deleteClientGateway" + ] + }, + "GetClientGateway": { + "methods": [ + "getClientGateway" + ] + }, + "ListClientGateways": { + "methods": [ + "listClientGateways" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_client_config.json b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_client_config.json new file mode 100644 index 000000000000..582868412a6b --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_client_config.json @@ -0,0 +1,67 @@ +{ + "interfaces": { + "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService": { + "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": { + "CreateClientGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteClientGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetClientGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListClientGateways": { + "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" + }, + "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" + } + } + } + } +} diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_descriptor_config.php b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_descriptor_config.php new file mode 100644 index 000000000000..feae5f92322d --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_descriptor_config.php @@ -0,0 +1,175 @@ + [ + 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService' => [ + 'CreateClientGateway' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGatewayOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteClientGateway' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGatewayOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetClientGateway' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListClientGateways' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getClientGateways', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BeyondCorp\ClientGateways\V1\ListClientGatewaysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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', + ], + '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', + ], + 'templateMap' => [ + 'clientGateway' => 'projects/{project}/locations/{location}/clientGateways/{client_gateway}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_rest_client_config.php b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_rest_client_config.php new file mode 100644 index 000000000000..903cf45ad886 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_rest_client_config.php @@ -0,0 +1,244 @@ + [ + 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService' => [ + 'CreateClientGateway' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientGateways', + 'body' => 'client_gateway', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteClientGateway' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientGateways/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetClientGateway' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientGateways/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListClientGateways' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientGateways', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + '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/*/appConnections/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpClientGateways/v1/tests/Unit/V1/Client/ClientGatewaysServiceClientTest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/tests/Unit/V1/Client/ClientGatewaysServiceClientTest.php new file mode 100644 index 000000000000..10b4c88e9557 --- /dev/null +++ b/owl-bot-staging/BeyondCorpClientGateways/v1/tests/Unit/V1/Client/ClientGatewaysServiceClientTest.php @@ -0,0 +1,884 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ClientGatewaysServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ClientGatewaysServiceClient($options); + } + + /** @test */ + public function createClientGatewayTest() + { + $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/createClientGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $id = 'id3355'; + $clientConnectorService = 'clientConnectorService-1152817841'; + $expectedResponse = new ClientGateway(); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setClientConnectorService($clientConnectorService); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClientGatewayTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientGateway = new ClientGateway(); + $clientGatewayName = 'clientGatewayName-1795593692'; + $clientGateway->setName($clientGatewayName); + $request = (new CreateClientGatewayRequest()) + ->setParent($formattedParent) + ->setClientGateway($clientGateway); + $response = $gapicClient->createClientGateway($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.beyondcorp.clientgateways.v1.ClientGatewaysService/CreateClientGateway', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClientGateway(); + $this->assertProtobufEquals($clientGateway, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientGatewayTest'); + $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 createClientGatewayExceptionTest() + { + $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/createClientGatewayTest'); + $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]'); + $clientGateway = new ClientGateway(); + $clientGatewayName = 'clientGatewayName-1795593692'; + $clientGateway->setName($clientGatewayName); + $request = (new CreateClientGatewayRequest()) + ->setParent($formattedParent) + ->setClientGateway($clientGateway); + $response = $gapicClient->createClientGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientGatewayTest'); + 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 deleteClientGatewayTest() + { + $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/deleteClientGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClientGatewayTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clientGatewayName('[PROJECT]', '[LOCATION]', '[CLIENT_GATEWAY]'); + $request = (new DeleteClientGatewayRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClientGateway($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.beyondcorp.clientgateways.v1.ClientGatewaysService/DeleteClientGateway', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientGatewayTest'); + $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 deleteClientGatewayExceptionTest() + { + $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/deleteClientGatewayTest'); + $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->clientGatewayName('[PROJECT]', '[LOCATION]', '[CLIENT_GATEWAY]'); + $request = (new DeleteClientGatewayRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClientGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientGatewayTest'); + 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 getClientGatewayTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $id = 'id3355'; + $clientConnectorService = 'clientConnectorService-1152817841'; + $expectedResponse = new ClientGateway(); + $expectedResponse->setName($name2); + $expectedResponse->setId($id); + $expectedResponse->setClientConnectorService($clientConnectorService); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clientGatewayName('[PROJECT]', '[LOCATION]', '[CLIENT_GATEWAY]'); + $request = (new GetClientGatewayRequest()) + ->setName($formattedName); + $response = $gapicClient->getClientGateway($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.beyondcorp.clientgateways.v1.ClientGatewaysService/GetClientGateway', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClientGatewayExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->clientGatewayName('[PROJECT]', '[LOCATION]', '[CLIENT_GATEWAY]'); + $request = (new GetClientGatewayRequest()) + ->setName($formattedName); + try { + $gapicClient->getClientGateway($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClientGatewaysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clientGatewaysElement = new ClientGateway(); + $clientGateways = [ + $clientGatewaysElement, + ]; + $expectedResponse = new ListClientGatewaysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClientGateways($clientGateways); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClientGatewaysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClientGateways($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClientGateways()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService/ListClientGateways', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClientGatewaysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListClientGatewaysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listClientGateways($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 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 createClientGatewayAsyncTest() + { + $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/createClientGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $id = 'id3355'; + $clientConnectorService = 'clientConnectorService-1152817841'; + $expectedResponse = new ClientGateway(); + $expectedResponse->setName($name); + $expectedResponse->setId($id); + $expectedResponse->setClientConnectorService($clientConnectorService); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClientGatewayTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientGateway = new ClientGateway(); + $clientGatewayName = 'clientGatewayName-1795593692'; + $clientGateway->setName($clientGatewayName); + $request = (new CreateClientGatewayRequest()) + ->setParent($formattedParent) + ->setClientGateway($clientGateway); + $response = $gapicClient->createClientGatewayAsync($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.beyondcorp.clientgateways.v1.ClientGatewaysService/CreateClientGateway', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClientGateway(); + $this->assertProtobufEquals($clientGateway, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientGatewayTest'); + $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/BigQueryAnalyticsHub/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Analyticshub/V1/Analyticshub.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Analyticshub/V1/Analyticshub.php new file mode 100644 index 0000000000000000000000000000000000000000..91016b17f55154d23fe898c649a98ff6727550b0 GIT binary patch literal 16329 zcmc&*O>i4Y72c5(Cu!M^+>R4RNr-lm>?S5FZM+L)l}$DyX=01DEUl!N-C$6Sq_I64 zS<=poyfG>B6F5*5C*Z^ZC@xfSpy0H3I8c=;4nV=d#epi80|9PSQMDI%{WqE!$<|28 z!d7K%PxpKM-s{(2zxTTP^*7p^ZFC{Fs5f;}v-Ntcx)ZZE^;p|%*{xcu5vz9A*L5>i zYi+fShHl1Vu}nU;k}t>9Ot$a`mP z)f$>*#oXV~LllGm+MQ~{sKqQ>gYjb*4Xa`_4cpKf#+N|Po3VARVd=o2x9@tVS+k8+ zGe!vV&6YZQ8mC@~vfbt7aN)yJZ%jYcjc^+m3WM4xe0?^=eM;!_EXvh7_HeNR%kV? zWU{MMm&JaB>4u>$*?_fXYg_FRXg_Ca zZBTh1AEL|RrCSDH1WLW``1~C}j?0dh5}$n$J=#XsM}-W0iBZNW*u(|c#NA*M-@X<- z#Rt&Z2H+BLWd=FX^R9+<;;)q|cUa!xw5x;3y^=S5f;So376CN)QE5}(w+*w^BwWd$>&C|1QRo<6cq7itJiv$ICB{hY z@<~%RY@}5*1$L;lwqdWU*gI`~?ig^NT6i@e_lzJe11)8_^xQWkDQQ1Z-b0r?{>;P$ zSGMA?87Dk5q{3XjtJiER@sR(vn`pFZ44e`V#jm>wva^bLh0f&9iq7YGH#LopSG?-T z-#din_A>!~fKJu*b*Ty<+JNm>IoZ5jav2z6l>})1Z+CU0X+~ zLsJL9pF$TneZy$p2Wm1^mTp%7Eh@E!t~Je8Yio`u%*iD1n^Xe5R2gR6)C=gMAUJ5C z)FcYKmXiDigNTCJ+BWLC*$WYUSG$7}lKeV4Rv_`2wK)oP9-V<03-Ew?I9Uo{nxYPY zst(Z_K827lmr?J+R){q4^-+NaN1TxS?JaV=OW-Wcja9ADVMu{L-HWt==*Hz9JGG2pJVgpSdajX=U&m?HVh0U0__!el#xrc533Ps^@owVG~Oa}&Uh zhAt9rpg94&0IT|gcFS}^gGoAS(DfkHD8fJl$Mw2Oxg8uJOu-nzXSYv)K!85_??Y&| zuRp`iafD+QN4|?6DbJ(xVhwSNdg2HGPrQwA&rW5*k|Y2TbQ>22=_^>g#5Y1Pm$ULD z{7C9IA1rF7!DD#g^8vl!;NktV#4M@k>F_L?E|rzCTDiMYDyZq~ovfOPJckh)SJLI|sv42x4-TQD0%IUAIgy6$ zi}~U^K9U)9+-b>|m(*e@BH>MEhaiobb$VsgTz;{r6qd5-Qsgi`iLle8 zrt>TL9Qi)({hqlCeX{wL$Pw&TLS0ddi|<5^dOF|9t|%+%tg;+A=IOksk3E2VT+T>-5pFh)~O&m0s8mB=KHqLa?I z!rjzzHeD&H>2kgpnexa{RLe?sIda_du~f(x%cV#JKab8iT=;m@o<+5!D#i3tWEvdp zlGCMJRKP2MmYRq5T+T0MOJ!n2jL)Mp?yjrqGVM~%-z{cKxyVfNk@Q6Q3c7Gm0>;q> zzYXj4>2t3{gM~Ygl=0toQ%BJ_N6J2l**A`$iBhM^3XPCx!(1QXl-(*94#r2y5L|gdp3AqTWT=mlADh zZKxiQ9Wgr!?`4|F@#r(BwVkke3>*?$Y%;4PzvI;rQcGaEMPEl#j2yNTy0_qSXv!;I zH_?G;qsJ1NX6{^+ahOTq1D`hBHBzDW8WnE$k*9y8qlw9Y>R}Tha-jg)jN*5WWy3 zAhRlJ23C;;pZGQ!Z)=c}+I(tWhJ5cMWgZ7F>`X&UtZhIM0nRMwIy?-vK=hN{y07!{ zn*22ho$e!r)rN|{j^BhL6^Z=?0$3mpapGZuf1w-f633hR1E@m~v6u`rkCrRw3=tu3 zZuGSUR1DpVxa+JTNLKWCJ_<^?uf<=lb+=PSoC|*J~gpmAW(C2O&hU}})t0>%|jTKV7rvA`x zr*IBCD9>IYS=2kake^4VGmx0{m+@(5^vh_5cr5t`rJF&x5ZqOQE}8ex3GeuPrQC)p z4VQ^yK|J7w##PxL23F8CEDzpI`0i_-mGMamgO>t@SMmoE#O-uZ_;~KK9)>U?R0Fvc zd@CW-4W(EBGo*Ex`+o-{XYTKld^FE@3B`PVB%$6yCz!kYWO|Aj`lWhzGa@3gA!`6mmFQ z8c)c7fIZ9^ryt5cCE~!jgIg_DQcYc<3+@7XUX*4nzS^BC&@w+PA_sdOU7avI1c_X~ z7?n)rG5K9|ZXdOty$#paP!wwD5QlBLZ7Z;51Pi*^$eZX)U+&Ld5f(|f2Y*&Ne3wV1 zZr+1-pM#@PHzz!W#@CGoTy|mp<=u^lL-?aq>P7Nbd6eqr1yXUteiltyu6%abAl1!u z|J?};^8#7kzL_Gw~ohy)njxSjUj0sUqa`MX06ew>yl8X8^WE^f&Ju7cLOV)EQbEdEC1ZW?}&|eLq zY3CY`xO#?RgQgV_NN`9IgPmpf7Dj#bk89{CoZ<~tGMPc+wr0ZhFdA#~G6tO9z;%ME zy8;3S8suoGV^!exjs=;QtHgsZppzy`IKd}s8XSN&8nlc;D?Pll3b!%<>?^?7BDXTg zWeGOi{5qQS95UcfplBvrO6Q^G`A(($PQhPcg@T^1y->`qLV**ircluIx6zVcB($(M zk7k@(dP|*ZNjJ9*IIP`+^K;_+?%mMBL9b`@P;#e?-X0>L^$aZlNlxu4Jbi!k`wzbx zdIeu2_kA9+jQ*xmPMCMyw3zqZu)zO<7?6nQ&x&!-M=EtZpyq zQ>kn2DW^SpUUgLrsLq9jH>jg}dc}vCVZQ}_4i@Mw2n4o3FR8G=N#Xy_`5wLh>GRQf zHiyG#fd43=34#;kA1O27q!?;I<=agp#Jn*QE#IqiUdR+Mav)^(tU2c>1pi7xs9Q|H z*8_^yB@s#unJUX~x^Y8jF~poWDkK0x{v@GEPXz-9wXuh4R9(Kfr%Z9oXfOw%D`!z= z5I^GFB*kG9{u`+0DRTr?&qFn;diVE~8Ln3kI^-8J6dic`Fu35J!LF{q09`%hlfb%q zsD!TjL4w!)=GjDz>VE%};Btenw1IC0TuOdIA$id7te2i6#oO)`_NIJ?&eMo0CM}^} z5>hh=>1Ul`-O&IJ8ZY&w7Mh`mw0^wmKf zX$1EYT!XXMTjo~kXJhCJyb2SxJvhEgO}p!`1@gY6Al=I`BJnB?o|tX49C_WVuQb-WZ@r;fyavyF zpMgoogle.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest + */ +class CreateDataExchangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the data exchange. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_exchange_id = ''; + /** + * Required. The data exchange to create. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_exchange = null; + + /** + * @param string $parent Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. Please see + * {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $dataExchange Required. The data exchange to create. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\CreateDataExchangeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $dataExchange): self + { + return (new self()) + ->setParent($parent) + ->setDataExchange($dataExchange); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. + * @type string $data_exchange_id + * Required. The ID of the data exchange. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $data_exchange + * Required. The data exchange to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the data exchange. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataExchangeId() + { + return $this->data_exchange_id; + } + + /** + * Required. The ID of the data exchange. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataExchangeId($var) + { + GPBUtil::checkString($var, True); + $this->data_exchange_id = $var; + + return $this; + } + + /** + * Required. The data exchange to create. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange|null + */ + public function getDataExchange() + { + return $this->data_exchange; + } + + public function hasDataExchange() + { + return isset($this->data_exchange); + } + + public function clearDataExchange() + { + unset($this->data_exchange); + } + + /** + * Required. The data exchange to create. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $var + * @return $this + */ + public function setDataExchange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange::class); + $this->data_exchange = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateListingRequest.php new file mode 100644 index 000000000000..e7fe7aa5bd6c --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateListingRequest.php @@ -0,0 +1,182 @@ +google.cloud.bigquery.analyticshub.v1.CreateListingRequest + */ +class CreateListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the listing to create. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $listing_id = ''; + /** + * Required. The listing to create. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $listing = null; + + /** + * @param string $parent Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see + * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing Required. The listing to create. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\CreateListingRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing): self + { + return (new self()) + ->setParent($parent) + ->setListing($listing); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @type string $listing_id + * Required. The ID of the listing to create. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing + * Required. The listing to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the listing to create. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getListingId() + { + return $this->listing_id; + } + + /** + * Required. The ID of the listing to create. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setListingId($var) + { + GPBUtil::checkString($var, True); + $this->listing_id = $var; + + return $this; + } + + /** + * Required. The listing to create. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing|null + */ + public function getListing() + { + return $this->listing; + } + + public function hasListing() + { + return isset($this->listing); + } + + public function clearListing() + { + unset($this->listing); + } + + /** + * Required. The listing to create. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $var + * @return $this + */ + public function setListing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing::class); + $this->listing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataExchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataExchange.php new file mode 100644 index 000000000000..c8eefaa39b1f --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataExchange.php @@ -0,0 +1,421 @@ +google.cloud.bigquery.analyticshub.v1.DataExchange + */ +class DataExchange extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Human-readable display name of the data exchange. The display + * name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), ampersands (&) and must not start or end with + * spaces. Default value is an empty string. Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Description of the data exchange. The description must not + * contain Unicode non-characters as well as C0 and C1 control codes except + * tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Email or URL of the primary point of contact of the data + * exchange. Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_contact = ''; + /** + * Optional. Documentation describing the data exchange. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $documentation = ''; + /** + * Output only. Number of listings contained in the data exchange. + * + * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $listing_count = 0; + /** + * Optional. Base64 encoded image representing the data exchange. Max + * Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API + * only performs validation on size of the encoded data. Note: For byte + * fields, the content of the fields are base64-encoded (which increases the + * size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $icon = ''; + /** + * Optional. Configurable data sharing environment option for a data exchange. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig sharing_environment_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sharing_environment_config = null; + /** + * Optional. Type of discovery on the discovery page for all the listings + * under this exchange. Updating this field also updates (overwrites) the + * discovery_type field for all the listings under this exchange. + * + * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $discovery_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @type string $display_name + * Required. Human-readable display name of the data exchange. The display + * name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), ampersands (&) and must not start or end with + * spaces. Default value is an empty string. Max length: 63 bytes. + * @type string $description + * Optional. Description of the data exchange. The description must not + * contain Unicode non-characters as well as C0 and C1 control codes except + * tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * @type string $primary_contact + * Optional. Email or URL of the primary point of contact of the data + * exchange. Max Length: 1000 bytes. + * @type string $documentation + * Optional. Documentation describing the data exchange. + * @type int $listing_count + * Output only. Number of listings contained in the data exchange. + * @type string $icon + * Optional. Base64 encoded image representing the data exchange. Max + * Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API + * only performs validation on size of the encoded data. Note: For byte + * fields, the content of the fields are base64-encoded (which increases the + * size of the data by 33-36%) when using JSON on the wire. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig $sharing_environment_config + * Optional. Configurable data sharing environment option for a data exchange. + * @type int $discovery_type + * Optional. Type of discovery on the discovery page for all the listings + * under this exchange. Updating this field also updates (overwrites) the + * discovery_type field for all the listings under this exchange. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Human-readable display name of the data exchange. The display + * name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), ampersands (&) and must not start or end with + * spaces. Default value is an empty string. Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Human-readable display name of the data exchange. The display + * name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), ampersands (&) and must not start or end with + * spaces. Default value is an empty string. Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Description of the data exchange. The description must not + * contain Unicode non-characters as well as C0 and C1 control codes except + * tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the data exchange. The description must not + * contain Unicode non-characters as well as C0 and C1 control codes except + * tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * + * 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. Email or URL of the primary point of contact of the data + * exchange. Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrimaryContact() + { + return $this->primary_contact; + } + + /** + * Optional. Email or URL of the primary point of contact of the data + * exchange. Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrimaryContact($var) + { + GPBUtil::checkString($var, True); + $this->primary_contact = $var; + + return $this; + } + + /** + * Optional. Documentation describing the data exchange. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDocumentation() + { + return $this->documentation; + } + + /** + * Optional. Documentation describing the data exchange. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDocumentation($var) + { + GPBUtil::checkString($var, True); + $this->documentation = $var; + + return $this; + } + + /** + * Output only. Number of listings contained in the data exchange. + * + * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getListingCount() + { + return $this->listing_count; + } + + /** + * Output only. Number of listings contained in the data exchange. + * + * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setListingCount($var) + { + GPBUtil::checkInt32($var); + $this->listing_count = $var; + + return $this; + } + + /** + * Optional. Base64 encoded image representing the data exchange. Max + * Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API + * only performs validation on size of the encoded data. Note: For byte + * fields, the content of the fields are base64-encoded (which increases the + * size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Optional. Base64 encoded image representing the data exchange. Max + * Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API + * only performs validation on size of the encoded data. Note: For byte + * fields, the content of the fields are base64-encoded (which increases the + * size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkString($var, False); + $this->icon = $var; + + return $this; + } + + /** + * Optional. Configurable data sharing environment option for a data exchange. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig sharing_environment_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig|null + */ + public function getSharingEnvironmentConfig() + { + return $this->sharing_environment_config; + } + + public function hasSharingEnvironmentConfig() + { + return isset($this->sharing_environment_config); + } + + public function clearSharingEnvironmentConfig() + { + unset($this->sharing_environment_config); + } + + /** + * Optional. Configurable data sharing environment option for a data exchange. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig sharing_environment_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig $var + * @return $this + */ + public function setSharingEnvironmentConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig::class); + $this->sharing_environment_config = $var; + + return $this; + } + + /** + * Optional. Type of discovery on the discovery page for all the listings + * under this exchange. Updating this field also updates (overwrites) the + * discovery_type field for all the listings under this exchange. + * + * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiscoveryType() + { + return isset($this->discovery_type) ? $this->discovery_type : 0; + } + + public function hasDiscoveryType() + { + return isset($this->discovery_type); + } + + public function clearDiscoveryType() + { + unset($this->discovery_type); + } + + /** + * Optional. Type of discovery on the discovery page for all the listings + * under this exchange. Updating this field also updates (overwrites) the + * discovery_type field for all the listings under this exchange. + * + * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiscoveryType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DiscoveryType::class); + $this->discovery_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataProvider.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataProvider.php new file mode 100644 index 000000000000..ae0efbfc4a0e --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataProvider.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.analyticshub.v1.DataProvider + */ +class DataProvider extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the data provider. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Optional. Email or URL of the data provider. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_contact = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. Name of the data provider. + * @type string $primary_contact + * Optional. Email or URL of the data provider. + * Max Length: 1000 bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the data provider. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Name of the data provider. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Email or URL of the data provider. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrimaryContact() + { + return $this->primary_contact; + } + + /** + * Optional. Email or URL of the data provider. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrimaryContact($var) + { + GPBUtil::checkString($var, True); + $this->primary_contact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteDataExchangeRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteDataExchangeRequest.php new file mode 100644 index 000000000000..714ba25e08f4 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteDataExchangeRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest + */ +class DeleteDataExchangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the data exchange resource that you want to + * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of the data exchange resource that you want to + * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. Please see + * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DeleteDataExchangeRequest + * + * @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 full name of the data exchange resource that you want to + * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the data exchange resource that you want to + * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the data exchange resource that you want to + * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteListingRequest.php new file mode 100644 index 000000000000..630e70a33f4e --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteListingRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.analyticshub.v1.DeleteListingRequest + */ +class DeleteListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see + * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DeleteListingRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteSubscriptionRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteSubscriptionRequest.php new file mode 100644 index 000000000000..7bfd5a0f13f4 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteSubscriptionRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest + */ +class DeleteSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the subscription to delete. + * e.g. projects/123/locations/US/subscriptions/456 + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the subscription to delete. + * e.g. projects/123/locations/US/subscriptions/456 + * Please see {@see AnalyticsHubServiceClient::subscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DeleteSubscriptionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the subscription to delete. + * e.g. projects/123/locations/US/subscriptions/456 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the subscription to delete. + * e.g. projects/123/locations/US/subscriptions/456 + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the subscription to delete. + * e.g. projects/123/locations/US/subscriptions/456 + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDataset.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDataset.php new file mode 100644 index 000000000000..05c16ab5c7e9 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDataset.php @@ -0,0 +1,311 @@ +google.cloud.bigquery.analyticshub.v1.DestinationDataset + */ +class DestinationDataset extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A reference that identifies the destination dataset. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset_reference = null; + /** + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $friendly_name = null; + /** + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = null; + /** + * Optional. The labels associated with this dataset. You can use these + * to organize and group your datasets. + * You can set this property when inserting or updating a dataset. + * See https://cloud.google.com/resource-manager/docs/creating-managing-labels + * for more information. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDatasetReference $dataset_reference + * Required. A reference that identifies the destination dataset. + * @type \Google\Protobuf\StringValue $friendly_name + * Optional. A descriptive name for the dataset. + * @type \Google\Protobuf\StringValue $description + * Optional. A user-friendly description of the dataset. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels associated with this dataset. You can use these + * to organize and group your datasets. + * You can set this property when inserting or updating a dataset. + * See https://cloud.google.com/resource-manager/docs/creating-managing-labels + * for more information. + * @type string $location + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. A reference that identifies the destination dataset. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDatasetReference|null + */ + public function getDatasetReference() + { + return $this->dataset_reference; + } + + public function hasDatasetReference() + { + return isset($this->dataset_reference); + } + + public function clearDatasetReference() + { + unset($this->dataset_reference); + } + + /** + * Required. A reference that identifies the destination dataset. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDatasetReference $var + * @return $this + */ + public function setDatasetReference($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDatasetReference::class); + $this->dataset_reference = $var; + + return $this; + } + + /** + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\StringValue|null + */ + public function getFriendlyName() + { + return $this->friendly_name; + } + + public function hasFriendlyName() + { + return isset($this->friendly_name); + } + + public function clearFriendlyName() + { + unset($this->friendly_name); + } + + /** + * Returns the unboxed value from getFriendlyName() + + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string|null + */ + public function getFriendlyNameUnwrapped() + { + return $this->readWrapperValue("friendly_name"); + } + + /** + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setFriendlyName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->friendly_name = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string|null $var + * @return $this + */ + public function setFriendlyNameUnwrapped($var) + { + $this->writeWrapperValue("friendly_name", $var); + return $this;} + + /** + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\StringValue|null + */ + public function getDescription() + { + return $this->description; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Returns the unboxed value from getDescription() + + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string|null + */ + public function getDescriptionUnwrapped() + { + return $this->readWrapperValue("description"); + } + + /** + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string|null $var + * @return $this + */ + public function setDescriptionUnwrapped($var) + { + $this->writeWrapperValue("description", $var); + return $this;} + + /** + * Optional. The labels associated with this dataset. You can use these + * to organize and group your datasets. + * You can set this property when inserting or updating a dataset. + * See https://cloud.google.com/resource-manager/docs/creating-managing-labels + * for more information. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels associated with this dataset. You can use these + * to organize and group your datasets. + * You can set this property when inserting or updating a dataset. + * See https://cloud.google.com/resource-manager/docs/creating-managing-labels + * for more information. + * + * Generated from protobuf field map labels = 4 [(.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. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDatasetReference.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDatasetReference.php new file mode 100644 index 000000000000..0158d1b6c937 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDatasetReference.php @@ -0,0 +1,109 @@ +google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference + */ +class DestinationDatasetReference extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A unique ID for this dataset, without the project name. The ID + * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + * The maximum length is 1,024 characters. + * + * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset_id = ''; + /** + * Required. The ID of the project containing this dataset. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset_id + * Required. A unique ID for this dataset, without the project name. The ID + * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + * The maximum length is 1,024 characters. + * @type string $project_id + * Required. The ID of the project containing this dataset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. A unique ID for this dataset, without the project name. The ID + * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + * The maximum length is 1,024 characters. + * + * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatasetId() + { + return $this->dataset_id; + } + + /** + * Required. A unique ID for this dataset, without the project name. The ID + * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + * The maximum length is 1,024 characters. + * + * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->dataset_id = $var; + + return $this; + } + + /** + * Required. The ID of the project containing this dataset. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The ID of the project containing this dataset. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DiscoveryType.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DiscoveryType.php new file mode 100644 index 000000000000..2726ed751e8a --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DiscoveryType.php @@ -0,0 +1,65 @@ +google.cloud.bigquery.analyticshub.v1.DiscoveryType + */ +class DiscoveryType +{ + /** + * Unspecified. Defaults to DISCOVERY_TYPE_PRIVATE. + * + * Generated from protobuf enum DISCOVERY_TYPE_UNSPECIFIED = 0; + */ + const DISCOVERY_TYPE_UNSPECIFIED = 0; + /** + * The Data exchange/listing can be discovered in the 'Private' results + * list. + * + * Generated from protobuf enum DISCOVERY_TYPE_PRIVATE = 1; + */ + const DISCOVERY_TYPE_PRIVATE = 1; + /** + * The Data exchange/listing can be discovered in the 'Public' results + * list. + * + * Generated from protobuf enum DISCOVERY_TYPE_PUBLIC = 2; + */ + const DISCOVERY_TYPE_PUBLIC = 2; + + private static $valueToName = [ + self::DISCOVERY_TYPE_UNSPECIFIED => 'DISCOVERY_TYPE_UNSPECIFIED', + self::DISCOVERY_TYPE_PRIVATE => 'DISCOVERY_TYPE_PRIVATE', + self::DISCOVERY_TYPE_PUBLIC => 'DISCOVERY_TYPE_PUBLIC', + ]; + + 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetDataExchangeRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetDataExchangeRequest.php new file mode 100644 index 000000000000..ac579385d217 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetDataExchangeRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest + */ +class GetDataExchangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see + * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\GetDataExchangeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetListingRequest.php new file mode 100644 index 000000000000..a8e2c2523961 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetListingRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.analyticshub.v1.GetListingRequest + */ +class GetListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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 listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see + * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\GetListingRequest + * + * @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 listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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 listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetSubscriptionRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetSubscriptionRequest.php new file mode 100644 index 000000000000..8978d37ca8e6 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetSubscriptionRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest + */ +class GetSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the subscription. + * e.g. projects/123/locations/US/subscriptions/456 + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the subscription. + * e.g. projects/123/locations/US/subscriptions/456 + * Please see {@see AnalyticsHubServiceClient::subscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\GetSubscriptionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the subscription. + * e.g. projects/123/locations/US/subscriptions/456 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the subscription. + * e.g. projects/123/locations/US/subscriptions/456 + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the subscription. + * e.g. projects/123/locations/US/subscriptions/456 + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesRequest.php new file mode 100644 index 000000000000..fe9ae5f2f822 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesRequest.php @@ -0,0 +1,162 @@ +google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest + */ +class ListDataExchangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. Please see + * {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListDataExchangesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. + * @type int $page_size + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * @type string $page_token + * Page token, returned by a previous call, to request the next page of + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesResponse.php new file mode 100644 index 000000000000..fb8bbdccd266 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesResponse.php @@ -0,0 +1,101 @@ +google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse + */ +class ListDataExchangesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; + */ + private $data_exchanges; + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges + * The list of data exchanges. + * @type string $next_page_token + * A token to request the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataExchanges() + { + return $this->data_exchanges; + } + + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; + * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataExchanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange::class); + $this->data_exchanges = $arr; + + return $this; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsRequest.php new file mode 100644 index 000000000000..acff05320794 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsRequest.php @@ -0,0 +1,162 @@ +google.cloud.bigquery.analyticshub.v1.ListListingsRequest + */ +class ListListingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see + * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListListingsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @type int $page_size + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * @type string $page_token + * Page token, returned by a previous call, to request the next page of + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsResponse.php new file mode 100644 index 000000000000..2a35739b95ea --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsResponse.php @@ -0,0 +1,101 @@ +google.cloud.bigquery.analyticshub.v1.ListListingsResponse + */ +class ListListingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Listing. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; + */ + private $listings; + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing>|\Google\Protobuf\Internal\RepeatedField $listings + * The list of Listing. + * @type string $next_page_token + * A token to request the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * The list of Listing. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getListings() + { + return $this->listings; + } + + /** + * The list of Listing. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; + * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setListings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing::class); + $this->listings = $arr; + + return $this; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesRequest.php new file mode 100644 index 000000000000..71eca67a2bd9 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesRequest.php @@ -0,0 +1,162 @@ +google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest + */ +class ListOrgDataExchangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The organization resource path of the projects containing + * DataExchanges. e.g. `organizations/myorg/locations/US`. + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $organization = ''; + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $organization Required. The organization resource path of the projects containing + * DataExchanges. e.g. `organizations/myorg/locations/US`. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListOrgDataExchangesRequest + * + * @experimental + */ + public static function build(string $organization): self + { + return (new self()) + ->setOrganization($organization); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $organization + * Required. The organization resource path of the projects containing + * DataExchanges. e.g. `organizations/myorg/locations/US`. + * @type int $page_size + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * @type string $page_token + * Page token, returned by a previous call, to request the next page of + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The organization resource path of the projects containing + * DataExchanges. e.g. `organizations/myorg/locations/US`. + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOrganization() + { + return $this->organization; + } + + /** + * Required. The organization resource path of the projects containing + * DataExchanges. e.g. `organizations/myorg/locations/US`. + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOrganization($var) + { + GPBUtil::checkString($var, True); + $this->organization = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesResponse.php new file mode 100644 index 000000000000..d33782786693 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesResponse.php @@ -0,0 +1,102 @@ +google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse + */ +class ListOrgDataExchangesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; + */ + private $data_exchanges; + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges + * The list of data exchanges. + * @type string $next_page_token + * A token to request the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataExchanges() + { + return $this->data_exchanges; + } + + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; + * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataExchanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange::class); + $this->data_exchanges = $arr; + + return $this; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsRequest.php new file mode 100644 index 000000000000..7868a7a49226 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsRequest.php @@ -0,0 +1,201 @@ +google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest + */ +class ListSharedResourceSubscriptionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the requested target. This resource may be + * either a Listing or a DataExchange. e.g. + * projects/123/locations/US/dataExchanges/456 OR e.g. + * projects/123/locations/US/dataExchanges/456/listings/789 + * + * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $resource = ''; + /** + * If selected, includes deleted subscriptions in the response + * (up to 63 days after deletion). + * + * Generated from protobuf field bool include_deleted_subscriptions = 2; + */ + protected $include_deleted_subscriptions = false; + /** + * The maximum number of results to return in a single response page. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Page token, returned by a previous call. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $resource Required. Resource name of the requested target. This resource may be + * either a Listing or a DataExchange. e.g. + * projects/123/locations/US/dataExchanges/456 OR e.g. + * projects/123/locations/US/dataExchanges/456/listings/789 + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListSharedResourceSubscriptionsRequest + * + * @experimental + */ + public static function build(string $resource): self + { + return (new self()) + ->setResource($resource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource + * Required. Resource name of the requested target. This resource may be + * either a Listing or a DataExchange. e.g. + * projects/123/locations/US/dataExchanges/456 OR e.g. + * projects/123/locations/US/dataExchanges/456/listings/789 + * @type bool $include_deleted_subscriptions + * If selected, includes deleted subscriptions in the response + * (up to 63 days after deletion). + * @type int $page_size + * The maximum number of results to return in a single response page. + * @type string $page_token + * Page token, returned by a previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the requested target. This resource may be + * either a Listing or a DataExchange. e.g. + * projects/123/locations/US/dataExchanges/456 OR e.g. + * projects/123/locations/US/dataExchanges/456/listings/789 + * + * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Required. Resource name of the requested target. This resource may be + * either a Listing or a DataExchange. e.g. + * projects/123/locations/US/dataExchanges/456 OR e.g. + * projects/123/locations/US/dataExchanges/456/listings/789 + * + * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * If selected, includes deleted subscriptions in the response + * (up to 63 days after deletion). + * + * Generated from protobuf field bool include_deleted_subscriptions = 2; + * @return bool + */ + public function getIncludeDeletedSubscriptions() + { + return $this->include_deleted_subscriptions; + } + + /** + * If selected, includes deleted subscriptions in the response + * (up to 63 days after deletion). + * + * Generated from protobuf field bool include_deleted_subscriptions = 2; + * @param bool $var + * @return $this + */ + public function setIncludeDeletedSubscriptions($var) + { + GPBUtil::checkBool($var); + $this->include_deleted_subscriptions = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response page. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response page. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token, returned by a previous call. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token, returned by a previous call. + * + * Generated from protobuf field string page_token = 4; + * @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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsResponse.php new file mode 100644 index 000000000000..6dd58edfff9a --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsResponse.php @@ -0,0 +1,101 @@ +google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse + */ +class ListSharedResourceSubscriptionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of subscriptions. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription shared_resource_subscriptions = 1; + */ + private $shared_resource_subscriptions; + /** + * Next page token. + * + * 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\BigQuery\AnalyticsHub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $shared_resource_subscriptions + * The list of subscriptions. + * @type string $next_page_token + * Next page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * The list of subscriptions. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription shared_resource_subscriptions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSharedResourceSubscriptions() + { + return $this->shared_resource_subscriptions; + } + + /** + * The list of subscriptions. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription shared_resource_subscriptions = 1; + * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSharedResourceSubscriptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); + $this->shared_resource_subscriptions = $arr; + + return $this; + } + + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Next page token. + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsRequest.php new file mode 100644 index 000000000000..eb2bf9d45198 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsRequest.php @@ -0,0 +1,228 @@ +google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest + */ +class ListSubscriptionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource path of the subscription. + * e.g. projects/myproject/locations/US + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * An expression for filtering the results of the request. Eligible + * fields for filtering are: + * * `listing` + * * `data_exchange` + * Alternatively, a literal wrapped in double quotes may be provided. + * This will be checked for an exact match against both fields above. + * In all cases, the full Data Exchange or Listing resource name must + * be provided. Some example of using filters: + * * data_exchange="projects/myproject/locations/us/dataExchanges/123" + * * listing="projects/123/locations/us/dataExchanges/456/listings/789" + * * "projects/myproject/locations/us/dataExchanges/123" + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The maximum number of results to return in a single response page. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Page token, returned by a previous call. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource path of the subscription. + * e.g. projects/myproject/locations/US + * Please see {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListSubscriptionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource path of the subscription. + * e.g. projects/myproject/locations/US + * @type string $filter + * An expression for filtering the results of the request. Eligible + * fields for filtering are: + * * `listing` + * * `data_exchange` + * Alternatively, a literal wrapped in double quotes may be provided. + * This will be checked for an exact match against both fields above. + * In all cases, the full Data Exchange or Listing resource name must + * be provided. Some example of using filters: + * * data_exchange="projects/myproject/locations/us/dataExchanges/123" + * * listing="projects/123/locations/us/dataExchanges/456/listings/789" + * * "projects/myproject/locations/us/dataExchanges/123" + * @type int $page_size + * The maximum number of results to return in a single response page. + * @type string $page_token + * Page token, returned by a previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource path of the subscription. + * e.g. projects/myproject/locations/US + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource path of the subscription. + * e.g. projects/myproject/locations/US + * + * 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; + } + + /** + * An expression for filtering the results of the request. Eligible + * fields for filtering are: + * * `listing` + * * `data_exchange` + * Alternatively, a literal wrapped in double quotes may be provided. + * This will be checked for an exact match against both fields above. + * In all cases, the full Data Exchange or Listing resource name must + * be provided. Some example of using filters: + * * data_exchange="projects/myproject/locations/us/dataExchanges/123" + * * listing="projects/123/locations/us/dataExchanges/456/listings/789" + * * "projects/myproject/locations/us/dataExchanges/123" + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression for filtering the results of the request. Eligible + * fields for filtering are: + * * `listing` + * * `data_exchange` + * Alternatively, a literal wrapped in double quotes may be provided. + * This will be checked for an exact match against both fields above. + * In all cases, the full Data Exchange or Listing resource name must + * be provided. Some example of using filters: + * * data_exchange="projects/myproject/locations/us/dataExchanges/123" + * * listing="projects/123/locations/us/dataExchanges/456/listings/789" + * * "projects/myproject/locations/us/dataExchanges/123" + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response page. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response page. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token, returned by a previous call. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token, returned by a previous call. + * + * Generated from protobuf field string page_token = 4; + * @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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsResponse.php new file mode 100644 index 000000000000..6e5f3062d8a2 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsResponse.php @@ -0,0 +1,101 @@ +google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse + */ +class ListSubscriptionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of subscriptions. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription subscriptions = 1; + */ + private $subscriptions; + /** + * Next page token. + * + * 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\BigQuery\AnalyticsHub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $subscriptions + * The list of subscriptions. + * @type string $next_page_token + * Next page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * The list of subscriptions. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription subscriptions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubscriptions() + { + return $this->subscriptions; + } + + /** + * The list of subscriptions. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription subscriptions = 1; + * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubscriptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); + $this->subscriptions = $arr; + + return $this; + } + + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Next page token. + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing.php new file mode 100644 index 000000000000..6119711f11d3 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing.php @@ -0,0 +1,624 @@ +google.cloud.bigquery.analyticshub.v1.Listing + */ +class Listing extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Human-readable display name of the listing. The display name must + * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + * spaces ( ), ampersands (&) and can't start or end with spaces. Default + * value is an empty string. Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Short description of the listing. The description must not + * contain Unicode non-characters and C0 and C1 control codes except tabs + * (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default + * value is an empty string. Max length: 2000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Email or URL of the primary point of contact of the listing. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_contact = ''; + /** + * Optional. Documentation describing the listing. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $documentation = ''; + /** + * Output only. Current state of the listing. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the contents of the field are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $icon = ''; + /** + * Optional. Details of the data provider who owns the source data. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_provider = null; + /** + * Optional. Categories of the listing. Up to two categories are allowed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $categories; + /** + * Optional. Details of the publisher who owns the listing and who can share + * the source data. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $publisher = null; + /** + * Optional. Email or URL of the request access of the listing. + * Subscribers can use this reference to request access. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_access = ''; + /** + * Optional. If set, restricted export configuration will be propagated and + * enforced on the linked dataset. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig restricted_export_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $restricted_export_config = null; + /** + * Optional. Type of discovery of the listing on the discovery page. + * + * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $discovery_type = null; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource $bigquery_dataset + * Required. Shared dataset i.e. BigQuery dataset source. + * @type string $name + * Output only. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + * @type string $display_name + * Required. Human-readable display name of the listing. The display name must + * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + * spaces ( ), ampersands (&) and can't start or end with spaces. Default + * value is an empty string. Max length: 63 bytes. + * @type string $description + * Optional. Short description of the listing. The description must not + * contain Unicode non-characters and C0 and C1 control codes except tabs + * (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default + * value is an empty string. Max length: 2000 bytes. + * @type string $primary_contact + * Optional. Email or URL of the primary point of contact of the listing. + * Max Length: 1000 bytes. + * @type string $documentation + * Optional. Documentation describing the listing. + * @type int $state + * Output only. Current state of the listing. + * @type string $icon + * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the contents of the field are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\DataProvider $data_provider + * Optional. Details of the data provider who owns the source data. + * @type array|\Google\Protobuf\Internal\RepeatedField $categories + * Optional. Categories of the listing. Up to two categories are allowed. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Publisher $publisher + * Optional. Details of the publisher who owns the listing and who can share + * the source data. + * @type string $request_access + * Optional. Email or URL of the request access of the listing. + * Subscribers can use this reference to request access. + * Max Length: 1000 bytes. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\RestrictedExportConfig $restricted_export_config + * Optional. If set, restricted export configuration will be propagated and + * enforced on the linked dataset. + * @type int $discovery_type + * Optional. Type of discovery of the listing on the discovery page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Shared dataset i.e. BigQuery dataset source. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource|null + */ + public function getBigqueryDataset() + { + return $this->readOneof(6); + } + + public function hasBigqueryDataset() + { + return $this->hasOneof(6); + } + + /** + * Required. Shared dataset i.e. BigQuery dataset source. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource $var + * @return $this + */ + public function setBigqueryDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Human-readable display name of the listing. The display name must + * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + * spaces ( ), ampersands (&) and can't start or end with spaces. Default + * value is an empty string. Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Human-readable display name of the listing. The display name must + * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + * spaces ( ), ampersands (&) and can't start or end with spaces. Default + * value is an empty string. Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Short description of the listing. The description must not + * contain Unicode non-characters and C0 and C1 control codes except tabs + * (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default + * value is an empty string. Max length: 2000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Short description of the listing. The description must not + * contain Unicode non-characters and C0 and C1 control codes except tabs + * (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default + * value is an empty string. Max length: 2000 bytes. + * + * 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. Email or URL of the primary point of contact of the listing. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrimaryContact() + { + return $this->primary_contact; + } + + /** + * Optional. Email or URL of the primary point of contact of the listing. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrimaryContact($var) + { + GPBUtil::checkString($var, True); + $this->primary_contact = $var; + + return $this; + } + + /** + * Optional. Documentation describing the listing. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDocumentation() + { + return $this->documentation; + } + + /** + * Optional. Documentation describing the listing. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDocumentation($var) + { + GPBUtil::checkString($var, True); + $this->documentation = $var; + + return $this; + } + + /** + * Output only. Current state of the listing. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the listing. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the contents of the field are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the contents of the field are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkString($var, False); + $this->icon = $var; + + return $this; + } + + /** + * Optional. Details of the data provider who owns the source data. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DataProvider|null + */ + public function getDataProvider() + { + return $this->data_provider; + } + + public function hasDataProvider() + { + return isset($this->data_provider); + } + + public function clearDataProvider() + { + unset($this->data_provider); + } + + /** + * Optional. Details of the data provider who owns the source data. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataProvider $var + * @return $this + */ + public function setDataProvider($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataProvider::class); + $this->data_provider = $var; + + return $this; + } + + /** + * Optional. Categories of the listing. Up to two categories are allowed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * Optional. Categories of the listing. Up to two categories are allowed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\Category::class); + $this->categories = $arr; + + return $this; + } + + /** + * Optional. Details of the publisher who owns the listing and who can share + * the source data. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Publisher|null + */ + public function getPublisher() + { + return $this->publisher; + } + + public function hasPublisher() + { + return isset($this->publisher); + } + + public function clearPublisher() + { + unset($this->publisher); + } + + /** + * Optional. Details of the publisher who owns the listing and who can share + * the source data. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Publisher $var + * @return $this + */ + public function setPublisher($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Publisher::class); + $this->publisher = $var; + + return $this; + } + + /** + * Optional. Email or URL of the request access of the listing. + * Subscribers can use this reference to request access. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestAccess() + { + return $this->request_access; + } + + /** + * Optional. Email or URL of the request access of the listing. + * Subscribers can use this reference to request access. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestAccess($var) + { + GPBUtil::checkString($var, True); + $this->request_access = $var; + + return $this; + } + + /** + * Optional. If set, restricted export configuration will be propagated and + * enforced on the linked dataset. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig restricted_export_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\RestrictedExportConfig|null + */ + public function getRestrictedExportConfig() + { + return $this->restricted_export_config; + } + + public function hasRestrictedExportConfig() + { + return isset($this->restricted_export_config); + } + + public function clearRestrictedExportConfig() + { + unset($this->restricted_export_config); + } + + /** + * Optional. If set, restricted export configuration will be propagated and + * enforced on the linked dataset. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig restricted_export_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\RestrictedExportConfig $var + * @return $this + */ + public function setRestrictedExportConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\RestrictedExportConfig::class); + $this->restricted_export_config = $var; + + return $this; + } + + /** + * Optional. Type of discovery of the listing on the discovery page. + * + * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiscoveryType() + { + return isset($this->discovery_type) ? $this->discovery_type : 0; + } + + public function hasDiscoveryType() + { + return isset($this->discovery_type); + } + + public function clearDiscoveryType() + { + unset($this->discovery_type); + } + + /** + * Optional. Type of discovery of the listing on the discovery page. + * + * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiscoveryType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DiscoveryType::class); + $this->discovery_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource.php new file mode 100644 index 000000000000..22bcb6dd0ed8 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource.php @@ -0,0 +1,170 @@ +google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource + */ +class BigQueryDatasetSource extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the dataset source for this listing. + * e.g. `projects/myproject/datasets/123` + * + * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { + */ + protected $dataset = ''; + /** + * Optional. Resources in this dataset that are selectively shared. + * If this field is empty, then the entire dataset (all resources) are + * shared. This field is only valid for data clean room exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource selected_resources = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $selected_resources; + /** + * Optional. If set, restricted export policy will be propagated and + * enforced on the linked dataset. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy restricted_export_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $restricted_export_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset + * Resource name of the dataset source for this listing. + * e.g. `projects/myproject/datasets/123` + * @type array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\SelectedResource>|\Google\Protobuf\Internal\RepeatedField $selected_resources + * Optional. Resources in this dataset that are selectively shared. + * If this field is empty, then the entire dataset (all resources) are + * shared. This field is only valid for data clean room exchanges. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\RestrictedExportPolicy $restricted_export_policy + * Optional. If set, restricted export policy will be propagated and + * enforced on the linked dataset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the dataset source for this listing. + * e.g. `projects/myproject/datasets/123` + * + * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * Resource name of the dataset source for this listing. + * e.g. `projects/myproject/datasets/123` + * + * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + + /** + * Optional. Resources in this dataset that are selectively shared. + * If this field is empty, then the entire dataset (all resources) are + * shared. This field is only valid for data clean room exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource selected_resources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSelectedResources() + { + return $this->selected_resources; + } + + /** + * Optional. Resources in this dataset that are selectively shared. + * If this field is empty, then the entire dataset (all resources) are + * shared. This field is only valid for data clean room exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource selected_resources = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\SelectedResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSelectedResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\SelectedResource::class); + $this->selected_resources = $arr; + + return $this; + } + + /** + * Optional. If set, restricted export policy will be propagated and + * enforced on the linked dataset. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy restricted_export_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\RestrictedExportPolicy|null + */ + public function getRestrictedExportPolicy() + { + return $this->restricted_export_policy; + } + + public function hasRestrictedExportPolicy() + { + return isset($this->restricted_export_policy); + } + + public function clearRestrictedExportPolicy() + { + unset($this->restricted_export_policy); + } + + /** + * Optional. If set, restricted export policy will be propagated and + * enforced on the linked dataset. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy restricted_export_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\RestrictedExportPolicy $var + * @return $this + */ + public function setRestrictedExportPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\RestrictedExportPolicy::class); + $this->restricted_export_policy = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigQueryDatasetSource::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing_BigQueryDatasetSource::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/RestrictedExportPolicy.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/RestrictedExportPolicy.php new file mode 100644 index 000000000000..b3b09c13eff2 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/RestrictedExportPolicy.php @@ -0,0 +1,262 @@ +google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + */ +class RestrictedExportPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If true, enable restricted export. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enabled = null; + /** + * Optional. If true, restrict direct table access (read + * api/tabledata.list) on linked table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $restrict_direct_table_access = null; + /** + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $restrict_query_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $enabled + * Optional. If true, enable restricted export. + * @type \Google\Protobuf\BoolValue $restrict_direct_table_access + * Optional. If true, restrict direct table access (read + * api/tabledata.list) on linked table. + * @type \Google\Protobuf\BoolValue $restrict_query_result + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If true, enable restricted export. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnabled() + { + return $this->enabled; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * Returns the unboxed value from getEnabled() + + * Optional. If true, enable restricted export. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getEnabledUnwrapped() + { + return $this->readWrapperValue("enabled"); + } + + /** + * Optional. If true, enable restricted export. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. If true, enable restricted export. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setEnabledUnwrapped($var) + { + $this->writeWrapperValue("enabled", $var); + return $this;} + + /** + * Optional. If true, restrict direct table access (read + * api/tabledata.list) on linked table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRestrictDirectTableAccess() + { + return $this->restrict_direct_table_access; + } + + public function hasRestrictDirectTableAccess() + { + return isset($this->restrict_direct_table_access); + } + + public function clearRestrictDirectTableAccess() + { + unset($this->restrict_direct_table_access); + } + + /** + * Returns the unboxed value from getRestrictDirectTableAccess() + + * Optional. If true, restrict direct table access (read + * api/tabledata.list) on linked table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getRestrictDirectTableAccessUnwrapped() + { + return $this->readWrapperValue("restrict_direct_table_access"); + } + + /** + * Optional. If true, restrict direct table access (read + * api/tabledata.list) on linked table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRestrictDirectTableAccess($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->restrict_direct_table_access = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. If true, restrict direct table access (read + * api/tabledata.list) on linked table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setRestrictDirectTableAccessUnwrapped($var) + { + $this->writeWrapperValue("restrict_direct_table_access", $var); + return $this;} + + /** + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRestrictQueryResult() + { + return $this->restrict_query_result; + } + + public function hasRestrictQueryResult() + { + return isset($this->restrict_query_result); + } + + public function clearRestrictQueryResult() + { + unset($this->restrict_query_result); + } + + /** + * Returns the unboxed value from getRestrictQueryResult() + + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getRestrictQueryResultUnwrapped() + { + return $this->readWrapperValue("restrict_query_result"); + } + + /** + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRestrictQueryResult($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->restrict_query_result = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * + * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setRestrictQueryResultUnwrapped($var) + { + $this->writeWrapperValue("restrict_query_result", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RestrictedExportPolicy::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing_BigQueryDatasetSource_RestrictedExportPolicy::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/SelectedResource.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/SelectedResource.php new file mode 100644 index 000000000000..babf97164a3b --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/SelectedResource.php @@ -0,0 +1,87 @@ +google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource + */ +class SelectedResource extends \Google\Protobuf\Internal\Message +{ + protected $resource; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * Optional. Format: + * For table: + * `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Example:"projects/test_project/datasets/test_dataset/tables/test_table" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Format: + * For table: + * `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Example:"projects/test_project/datasets/test_dataset/tables/test_table" + * + * Generated from protobuf field string table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTable() + { + return $this->readOneof(1); + } + + public function hasTable() + { + return $this->hasOneof(1); + } + + /** + * Optional. Format: + * For table: + * `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Example:"projects/test_project/datasets/test_dataset/tables/test_table" + * + * Generated from protobuf field string table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getResource() + { + return $this->whichOneof("resource"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SelectedResource::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing_BigQueryDatasetSource_SelectedResource::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/Category.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/Category.php new file mode 100644 index 000000000000..c16d7e7d770d --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/Category.php @@ -0,0 +1,143 @@ +google.cloud.bigquery.analyticshub.v1.Listing.Category + */ +class Category +{ + /** + * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; + */ + const CATEGORY_UNSPECIFIED = 0; + /** + * Generated from protobuf enum CATEGORY_OTHERS = 1; + */ + const CATEGORY_OTHERS = 1; + /** + * Generated from protobuf enum CATEGORY_ADVERTISING_AND_MARKETING = 2; + */ + const CATEGORY_ADVERTISING_AND_MARKETING = 2; + /** + * Generated from protobuf enum CATEGORY_COMMERCE = 3; + */ + const CATEGORY_COMMERCE = 3; + /** + * Generated from protobuf enum CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; + */ + const CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; + /** + * Generated from protobuf enum CATEGORY_DEMOGRAPHICS = 5; + */ + const CATEGORY_DEMOGRAPHICS = 5; + /** + * Generated from protobuf enum CATEGORY_ECONOMICS = 6; + */ + const CATEGORY_ECONOMICS = 6; + /** + * Generated from protobuf enum CATEGORY_EDUCATION = 7; + */ + const CATEGORY_EDUCATION = 7; + /** + * Generated from protobuf enum CATEGORY_ENERGY = 8; + */ + const CATEGORY_ENERGY = 8; + /** + * Generated from protobuf enum CATEGORY_FINANCIAL = 9; + */ + const CATEGORY_FINANCIAL = 9; + /** + * Generated from protobuf enum CATEGORY_GAMING = 10; + */ + const CATEGORY_GAMING = 10; + /** + * Generated from protobuf enum CATEGORY_GEOSPATIAL = 11; + */ + const CATEGORY_GEOSPATIAL = 11; + /** + * Generated from protobuf enum CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; + */ + const CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; + /** + * Generated from protobuf enum CATEGORY_MEDIA = 13; + */ + const CATEGORY_MEDIA = 13; + /** + * Generated from protobuf enum CATEGORY_PUBLIC_SECTOR = 14; + */ + const CATEGORY_PUBLIC_SECTOR = 14; + /** + * Generated from protobuf enum CATEGORY_RETAIL = 15; + */ + const CATEGORY_RETAIL = 15; + /** + * Generated from protobuf enum CATEGORY_SPORTS = 16; + */ + const CATEGORY_SPORTS = 16; + /** + * Generated from protobuf enum CATEGORY_SCIENCE_AND_RESEARCH = 17; + */ + const CATEGORY_SCIENCE_AND_RESEARCH = 17; + /** + * Generated from protobuf enum CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; + */ + const CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; + /** + * Generated from protobuf enum CATEGORY_TRAVEL_AND_TOURISM = 19; + */ + const CATEGORY_TRAVEL_AND_TOURISM = 19; + + private static $valueToName = [ + self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', + self::CATEGORY_OTHERS => 'CATEGORY_OTHERS', + self::CATEGORY_ADVERTISING_AND_MARKETING => 'CATEGORY_ADVERTISING_AND_MARKETING', + self::CATEGORY_COMMERCE => 'CATEGORY_COMMERCE', + self::CATEGORY_CLIMATE_AND_ENVIRONMENT => 'CATEGORY_CLIMATE_AND_ENVIRONMENT', + self::CATEGORY_DEMOGRAPHICS => 'CATEGORY_DEMOGRAPHICS', + self::CATEGORY_ECONOMICS => 'CATEGORY_ECONOMICS', + self::CATEGORY_EDUCATION => 'CATEGORY_EDUCATION', + self::CATEGORY_ENERGY => 'CATEGORY_ENERGY', + self::CATEGORY_FINANCIAL => 'CATEGORY_FINANCIAL', + self::CATEGORY_GAMING => 'CATEGORY_GAMING', + self::CATEGORY_GEOSPATIAL => 'CATEGORY_GEOSPATIAL', + self::CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE => 'CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE', + self::CATEGORY_MEDIA => 'CATEGORY_MEDIA', + self::CATEGORY_PUBLIC_SECTOR => 'CATEGORY_PUBLIC_SECTOR', + self::CATEGORY_RETAIL => 'CATEGORY_RETAIL', + self::CATEGORY_SPORTS => 'CATEGORY_SPORTS', + self::CATEGORY_SCIENCE_AND_RESEARCH => 'CATEGORY_SCIENCE_AND_RESEARCH', + self::CATEGORY_TRANSPORTATION_AND_LOGISTICS => 'CATEGORY_TRANSPORTATION_AND_LOGISTICS', + self::CATEGORY_TRAVEL_AND_TOURISM => 'CATEGORY_TRAVEL_AND_TOURISM', + ]; + + 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\BigQuery\AnalyticsHub\V1\Listing_Category::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/RestrictedExportConfig.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/RestrictedExportConfig.php new file mode 100644 index 000000000000..28343b512b3b --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/RestrictedExportConfig.php @@ -0,0 +1,147 @@ +google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig + */ +class RestrictedExportConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If true, enable restricted export. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enabled = false; + /** + * Output only. If true, restrict direct table access(read + * api/tabledata.list) on linked table. + * + * Generated from protobuf field bool restrict_direct_table_access = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $restrict_direct_table_access = false; + /** + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * + * Generated from protobuf field bool restrict_query_result = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $restrict_query_result = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Optional. If true, enable restricted export. + * @type bool $restrict_direct_table_access + * Output only. If true, restrict direct table access(read + * api/tabledata.list) on linked table. + * @type bool $restrict_query_result + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If true, enable restricted export. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. If true, enable restricted export. + * + * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Output only. If true, restrict direct table access(read + * api/tabledata.list) on linked table. + * + * Generated from protobuf field bool restrict_direct_table_access = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRestrictDirectTableAccess() + { + return $this->restrict_direct_table_access; + } + + /** + * Output only. If true, restrict direct table access(read + * api/tabledata.list) on linked table. + * + * Generated from protobuf field bool restrict_direct_table_access = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRestrictDirectTableAccess($var) + { + GPBUtil::checkBool($var); + $this->restrict_direct_table_access = $var; + + return $this; + } + + /** + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * + * Generated from protobuf field bool restrict_query_result = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRestrictQueryResult() + { + return $this->restrict_query_result; + } + + /** + * Optional. If true, restrict export of query result derived from + * restricted linked dataset table. + * + * Generated from protobuf field bool restrict_query_result = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRestrictQueryResult($var) + { + GPBUtil::checkBool($var); + $this->restrict_query_result = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RestrictedExportConfig::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing_RestrictedExportConfig::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/State.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/State.php new file mode 100644 index 000000000000..67c97bcd62f1 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/State.php @@ -0,0 +1,58 @@ +google.cloud.bigquery.analyticshub.v1.Listing.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Subscribable state. Users with dataexchange.listings.subscribe permission + * can subscribe to this listing. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + ]; + + 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\BigQuery\AnalyticsHub\V1\Listing_State::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/OperationMetadata.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/OperationMetadata.php new file mode 100644 index 000000000000..8f1689b049e3 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.bigquery.analyticshub.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\Bigquery\Analyticshub\V1\Analyticshub::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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Publisher.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Publisher.php new file mode 100644 index 000000000000..7ee643e5a79f --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Publisher.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.analyticshub.v1.Publisher + */ +class Publisher extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the listing publisher. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Optional. Email or URL of the listing publisher. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_contact = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. Name of the listing publisher. + * @type string $primary_contact + * Optional. Email or URL of the listing publisher. + * Max Length: 1000 bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the listing publisher. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Name of the listing publisher. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Email or URL of the listing publisher. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrimaryContact() + { + return $this->primary_contact; + } + + /** + * Optional. Email or URL of the listing publisher. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrimaryContact($var) + { + GPBUtil::checkString($var, True); + $this->primary_contact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionRequest.php new file mode 100644 index 000000000000..f9822739ea36 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest + */ +class RefreshSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the Subscription to refresh. + * e.g. `projects/subscriberproject/locations/US/subscriptions/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the Subscription to refresh. + * e.g. `projects/subscriberproject/locations/US/subscriptions/123` + * Please see {@see AnalyticsHubServiceClient::subscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\RefreshSubscriptionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the Subscription to refresh. + * e.g. `projects/subscriberproject/locations/US/subscriptions/123` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the Subscription to refresh. + * e.g. `projects/subscriberproject/locations/US/subscriptions/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the Subscription to refresh. + * e.g. `projects/subscriberproject/locations/US/subscriptions/123` + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionResponse.php new file mode 100644 index 000000000000..baa3de8019f6 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionResponse.php @@ -0,0 +1,77 @@ +google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionResponse + */ +class RefreshSubscriptionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The refreshed subscription resource. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; + */ + protected $subscription = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $subscription + * The refreshed subscription resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * The refreshed subscription resource. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription|null + */ + public function getSubscription() + { + return $this->subscription; + } + + public function hasSubscription() + { + return isset($this->subscription); + } + + public function clearSubscription() + { + unset($this->subscription); + } + + /** + * The refreshed subscription resource. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $var + * @return $this + */ + public function setSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); + $this->subscription = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionRequest.php new file mode 100644 index 000000000000..1cc4e2365c1e --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest + */ +class RevokeSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the subscription to revoke. + * e.g. projects/123/locations/US/subscriptions/456 + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the subscription to revoke. + * e.g. projects/123/locations/US/subscriptions/456 + * Please see {@see AnalyticsHubServiceClient::subscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\RevokeSubscriptionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the subscription to revoke. + * e.g. projects/123/locations/US/subscriptions/456 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the subscription to revoke. + * e.g. projects/123/locations/US/subscriptions/456 + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the subscription to revoke. + * e.g. projects/123/locations/US/subscriptions/456 + * + * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionResponse.php new file mode 100644 index 000000000000..948f06a270ed --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionResponse.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse + */ +class RevokeSubscriptionResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig.php new file mode 100644 index 000000000000..2596b44bb334 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig.php @@ -0,0 +1,109 @@ +google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig + */ +class SharingEnvironmentConfig extends \Google\Protobuf\Internal\Message +{ + protected $environment; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DefaultExchangeConfig $default_exchange_config + * Default Analytics Hub data exchange, used for secured data sharing. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DcrExchangeConfig $dcr_exchange_config + * Data Clean Room (DCR), used for privacy-safe and secured data sharing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Default Analytics Hub data exchange, used for secured data sharing. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig default_exchange_config = 1; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DefaultExchangeConfig|null + */ + public function getDefaultExchangeConfig() + { + return $this->readOneof(1); + } + + public function hasDefaultExchangeConfig() + { + return $this->hasOneof(1); + } + + /** + * Default Analytics Hub data exchange, used for secured data sharing. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig default_exchange_config = 1; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DefaultExchangeConfig $var + * @return $this + */ + public function setDefaultExchangeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DefaultExchangeConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Data Clean Room (DCR), used for privacy-safe and secured data sharing. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig dcr_exchange_config = 2; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DcrExchangeConfig|null + */ + public function getDcrExchangeConfig() + { + return $this->readOneof(2); + } + + public function hasDcrExchangeConfig() + { + return $this->hasOneof(2); + } + + /** + * Data Clean Room (DCR), used for privacy-safe and secured data sharing. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig dcr_exchange_config = 2; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DcrExchangeConfig $var + * @return $this + */ + public function setDcrExchangeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DcrExchangeConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getEnvironment() + { + return $this->whichOneof("environment"); + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DcrExchangeConfig.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DcrExchangeConfig.php new file mode 100644 index 000000000000..e5dcfa6b2daa --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DcrExchangeConfig.php @@ -0,0 +1,160 @@ +google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig + */ +class DcrExchangeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. If True, this DCR restricts the contributors to sharing + * only a single resource in a Listing. And no two resources should have the + * same IDs. So if a contributor adds a view with a conflicting name, the + * CreateListing API will reject the request. if False, the data contributor + * can publish an entire dataset (as before). This is not configurable, and + * by default, all new DCRs will have the restriction set to True. + * + * Generated from protobuf field optional bool single_selected_resource_sharing_restriction = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $single_selected_resource_sharing_restriction = null; + /** + * Output only. If True, when subscribing to this DCR, it will create only + * one linked dataset containing all resources shared within the + * cleanroom. If False, when subscribing to this DCR, it will + * create 1 linked dataset per listing. This is not configurable, and by + * default, all new DCRs will have the restriction set to True. + * + * Generated from protobuf field optional bool single_linked_dataset_per_cleanroom = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $single_linked_dataset_per_cleanroom = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $single_selected_resource_sharing_restriction + * Output only. If True, this DCR restricts the contributors to sharing + * only a single resource in a Listing. And no two resources should have the + * same IDs. So if a contributor adds a view with a conflicting name, the + * CreateListing API will reject the request. if False, the data contributor + * can publish an entire dataset (as before). This is not configurable, and + * by default, all new DCRs will have the restriction set to True. + * @type bool $single_linked_dataset_per_cleanroom + * Output only. If True, when subscribing to this DCR, it will create only + * one linked dataset containing all resources shared within the + * cleanroom. If False, when subscribing to this DCR, it will + * create 1 linked dataset per listing. This is not configurable, and by + * default, all new DCRs will have the restriction set to True. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Output only. If True, this DCR restricts the contributors to sharing + * only a single resource in a Listing. And no two resources should have the + * same IDs. So if a contributor adds a view with a conflicting name, the + * CreateListing API will reject the request. if False, the data contributor + * can publish an entire dataset (as before). This is not configurable, and + * by default, all new DCRs will have the restriction set to True. + * + * Generated from protobuf field optional bool single_selected_resource_sharing_restriction = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSingleSelectedResourceSharingRestriction() + { + return isset($this->single_selected_resource_sharing_restriction) ? $this->single_selected_resource_sharing_restriction : false; + } + + public function hasSingleSelectedResourceSharingRestriction() + { + return isset($this->single_selected_resource_sharing_restriction); + } + + public function clearSingleSelectedResourceSharingRestriction() + { + unset($this->single_selected_resource_sharing_restriction); + } + + /** + * Output only. If True, this DCR restricts the contributors to sharing + * only a single resource in a Listing. And no two resources should have the + * same IDs. So if a contributor adds a view with a conflicting name, the + * CreateListing API will reject the request. if False, the data contributor + * can publish an entire dataset (as before). This is not configurable, and + * by default, all new DCRs will have the restriction set to True. + * + * Generated from protobuf field optional bool single_selected_resource_sharing_restriction = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSingleSelectedResourceSharingRestriction($var) + { + GPBUtil::checkBool($var); + $this->single_selected_resource_sharing_restriction = $var; + + return $this; + } + + /** + * Output only. If True, when subscribing to this DCR, it will create only + * one linked dataset containing all resources shared within the + * cleanroom. If False, when subscribing to this DCR, it will + * create 1 linked dataset per listing. This is not configurable, and by + * default, all new DCRs will have the restriction set to True. + * + * Generated from protobuf field optional bool single_linked_dataset_per_cleanroom = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSingleLinkedDatasetPerCleanroom() + { + return isset($this->single_linked_dataset_per_cleanroom) ? $this->single_linked_dataset_per_cleanroom : false; + } + + public function hasSingleLinkedDatasetPerCleanroom() + { + return isset($this->single_linked_dataset_per_cleanroom); + } + + public function clearSingleLinkedDatasetPerCleanroom() + { + unset($this->single_linked_dataset_per_cleanroom); + } + + /** + * Output only. If True, when subscribing to this DCR, it will create only + * one linked dataset containing all resources shared within the + * cleanroom. If False, when subscribing to this DCR, it will + * create 1 linked dataset per listing. This is not configurable, and by + * default, all new DCRs will have the restriction set to True. + * + * Generated from protobuf field optional bool single_linked_dataset_per_cleanroom = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSingleLinkedDatasetPerCleanroom($var) + { + GPBUtil::checkBool($var); + $this->single_linked_dataset_per_cleanroom = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DcrExchangeConfig::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig_DcrExchangeConfig::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DefaultExchangeConfig.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DefaultExchangeConfig.php new file mode 100644 index 000000000000..8382587d4c61 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DefaultExchangeConfig.php @@ -0,0 +1,36 @@ +google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig + */ +class DefaultExchangeConfig extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DefaultExchangeConfig::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig_DefaultExchangeConfig::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeRequest.php new file mode 100644 index 000000000000..3647f2fefce4 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeRequest.php @@ -0,0 +1,196 @@ +google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest + */ +class SubscribeDataExchangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the Data Exchange. + * e.g. `projects/publisherproject/locations/US/dataExchanges/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The parent resource path of the Subscription. + * e.g. `projects/subscriberproject/locations/US` + * + * Generated from protobuf field string destination = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $destination = ''; + /** + * Required. Name of the subscription to create. + * e.g. `subscription1` + * + * Generated from protobuf field string subscription = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subscription = ''; + /** + * Email of the subscriber. + * + * Generated from protobuf field string subscriber_contact = 3; + */ + protected $subscriber_contact = ''; + + /** + * @param string $name Required. Resource name of the Data Exchange. + * e.g. `projects/publisherproject/locations/US/dataExchanges/123` + * Please see {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SubscribeDataExchangeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the Data Exchange. + * e.g. `projects/publisherproject/locations/US/dataExchanges/123` + * @type string $destination + * Required. The parent resource path of the Subscription. + * e.g. `projects/subscriberproject/locations/US` + * @type string $subscription + * Required. Name of the subscription to create. + * e.g. `subscription1` + * @type string $subscriber_contact + * Email of the subscriber. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the Data Exchange. + * e.g. `projects/publisherproject/locations/US/dataExchanges/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the Data Exchange. + * e.g. `projects/publisherproject/locations/US/dataExchanges/123` + * + * 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 parent resource path of the Subscription. + * e.g. `projects/subscriberproject/locations/US` + * + * Generated from protobuf field string destination = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDestination() + { + return $this->destination; + } + + /** + * Required. The parent resource path of the Subscription. + * e.g. `projects/subscriberproject/locations/US` + * + * Generated from protobuf field string destination = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkString($var, True); + $this->destination = $var; + + return $this; + } + + /** + * Required. Name of the subscription to create. + * e.g. `subscription1` + * + * Generated from protobuf field string subscription = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubscription() + { + return $this->subscription; + } + + /** + * Required. Name of the subscription to create. + * e.g. `subscription1` + * + * Generated from protobuf field string subscription = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubscription($var) + { + GPBUtil::checkString($var, True); + $this->subscription = $var; + + return $this; + } + + /** + * Email of the subscriber. + * + * Generated from protobuf field string subscriber_contact = 3; + * @return string + */ + public function getSubscriberContact() + { + return $this->subscriber_contact; + } + + /** + * Email of the subscriber. + * + * Generated from protobuf field string subscriber_contact = 3; + * @param string $var + * @return $this + */ + public function setSubscriberContact($var) + { + GPBUtil::checkString($var, True); + $this->subscriber_contact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeResponse.php new file mode 100644 index 000000000000..f9c149b11580 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeResponse.php @@ -0,0 +1,77 @@ +google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeResponse + */ +class SubscribeDataExchangeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Subscription object created from this subscribe action. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; + */ + protected $subscription = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $subscription + * Subscription object created from this subscribe action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Subscription object created from this subscribe action. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription|null + */ + public function getSubscription() + { + return $this->subscription; + } + + public function hasSubscription() + { + return isset($this->subscription); + } + + public function clearSubscription() + { + unset($this->subscription); + } + + /** + * Subscription object created from this subscribe action. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $var + * @return $this + */ + public function setSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); + $this->subscription = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingRequest.php new file mode 100644 index 000000000000..bc95350a135c --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingRequest.php @@ -0,0 +1,128 @@ +google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest + */ +class SubscribeListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + protected $destination; + + /** + * @param string $name Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see + * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SubscribeListingRequest + * + * @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 \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDataset $destination_dataset + * Input only. BigQuery destination dataset to create for the subscriber. + * @type string $name + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Input only. BigQuery destination dataset to create for the subscriber. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDataset|null + */ + public function getDestinationDataset() + { + return $this->readOneof(3); + } + + public function hasDestinationDataset() + { + return $this->hasOneof(3); + } + + /** + * Input only. BigQuery destination dataset to create for the subscriber. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDataset $var + * @return $this + */ + public function setDestinationDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDataset::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingResponse.php new file mode 100644 index 000000000000..25398a642d6b --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingResponse.php @@ -0,0 +1,77 @@ +google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse + */ +class SubscribeListingResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Subscription object created from this subscribe action. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; + */ + protected $subscription = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $subscription + * Subscription object created from this subscribe action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Subscription object created from this subscribe action. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription|null + */ + public function getSubscription() + { + return $this->subscription; + } + + public function hasSubscription() + { + return isset($this->subscription); + } + + public function clearSubscription() + { + unset($this->subscription); + } + + /** + * Subscription object created from this subscribe action. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $var + * @return $this + */ + public function setSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); + $this->subscription = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription.php new file mode 100644 index 000000000000..773d68ea160a --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription.php @@ -0,0 +1,432 @@ +google.cloud.bigquery.analyticshub.v1.Subscription + */ +class Subscription extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the subscription. + * e.g. `projects/myproject/locations/US/subscriptions/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Timestamp when the subscription was created. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creation_time = null; + /** + * Output only. Timestamp when the subscription was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp last_modify_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_modify_time = null; + /** + * Output only. Organization of the project this subscription belongs to. + * + * Generated from protobuf field string organization_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $organization_id = ''; + /** + * Output only. Display name of the project of this subscription. + * + * Generated from protobuf field string organization_display_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $organization_display_name = ''; + /** + * Output only. Current state of the subscription. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Map of listing resource names to associated linked resource, + * e.g. projects/123/locations/US/dataExchanges/456/listings/789 + * -> + * projects/123/datasets/my_dataset + * For listing-level subscriptions, this is a map of size 1. + * Only contains values if state == STATE_ACTIVE. + * + * Generated from protobuf field map linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $linked_dataset_map; + /** + * Output only. Email of the subscriber. + * + * Generated from protobuf field string subscriber_contact = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $subscriber_contact = ''; + protected $resource_name; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $listing + * Output only. Resource name of the source Listing. + * e.g. projects/123/locations/US/dataExchanges/456/listings/789 + * @type string $data_exchange + * Output only. Resource name of the source Data Exchange. + * e.g. projects/123/locations/US/dataExchanges/456 + * @type string $name + * Output only. The resource name of the subscription. + * e.g. `projects/myproject/locations/US/subscriptions/123`. + * @type \Google\Protobuf\Timestamp $creation_time + * Output only. Timestamp when the subscription was created. + * @type \Google\Protobuf\Timestamp $last_modify_time + * Output only. Timestamp when the subscription was last modified. + * @type string $organization_id + * Output only. Organization of the project this subscription belongs to. + * @type string $organization_display_name + * Output only. Display name of the project of this subscription. + * @type int $state + * Output only. Current state of the subscription. + * @type array|\Google\Protobuf\Internal\MapField $linked_dataset_map + * Output only. Map of listing resource names to associated linked resource, + * e.g. projects/123/locations/US/dataExchanges/456/listings/789 + * -> + * projects/123/datasets/my_dataset + * For listing-level subscriptions, this is a map of size 1. + * Only contains values if state == STATE_ACTIVE. + * @type string $subscriber_contact + * Output only. Email of the subscriber. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of the source Listing. + * e.g. projects/123/locations/US/dataExchanges/456/listings/789 + * + * Generated from protobuf field string listing = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getListing() + { + return $this->readOneof(5); + } + + public function hasListing() + { + return $this->hasOneof(5); + } + + /** + * Output only. Resource name of the source Listing. + * e.g. projects/123/locations/US/dataExchanges/456/listings/789 + * + * Generated from protobuf field string listing = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setListing($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. Resource name of the source Data Exchange. + * e.g. projects/123/locations/US/dataExchanges/456 + * + * Generated from protobuf field string data_exchange = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDataExchange() + { + return $this->readOneof(6); + } + + public function hasDataExchange() + { + return $this->hasOneof(6); + } + + /** + * Output only. Resource name of the source Data Exchange. + * e.g. projects/123/locations/US/dataExchanges/456 + * + * Generated from protobuf field string data_exchange = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDataExchange($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. The resource name of the subscription. + * e.g. `projects/myproject/locations/US/subscriptions/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the subscription. + * e.g. `projects/myproject/locations/US/subscriptions/123`. + * + * 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. Timestamp when the subscription was created. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreationTime() + { + return $this->creation_time; + } + + public function hasCreationTime() + { + return isset($this->creation_time); + } + + public function clearCreationTime() + { + unset($this->creation_time); + } + + /** + * Output only. Timestamp when the subscription was created. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->creation_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when the subscription was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp last_modify_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastModifyTime() + { + return $this->last_modify_time; + } + + public function hasLastModifyTime() + { + return isset($this->last_modify_time); + } + + public function clearLastModifyTime() + { + unset($this->last_modify_time); + } + + /** + * Output only. Timestamp when the subscription was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp last_modify_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastModifyTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_modify_time = $var; + + return $this; + } + + /** + * Output only. Organization of the project this subscription belongs to. + * + * Generated from protobuf field string organization_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOrganizationId() + { + return $this->organization_id; + } + + /** + * Output only. Organization of the project this subscription belongs to. + * + * Generated from protobuf field string organization_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOrganizationId($var) + { + GPBUtil::checkString($var, True); + $this->organization_id = $var; + + return $this; + } + + /** + * Output only. Display name of the project of this subscription. + * + * Generated from protobuf field string organization_display_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOrganizationDisplayName() + { + return $this->organization_display_name; + } + + /** + * Output only. Display name of the project of this subscription. + * + * Generated from protobuf field string organization_display_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOrganizationDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->organization_display_name = $var; + + return $this; + } + + /** + * Output only. Current state of the subscription. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the subscription. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Map of listing resource names to associated linked resource, + * e.g. projects/123/locations/US/dataExchanges/456/listings/789 + * -> + * projects/123/datasets/my_dataset + * For listing-level subscriptions, this is a map of size 1. + * Only contains values if state == STATE_ACTIVE. + * + * Generated from protobuf field map linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLinkedDatasetMap() + { + return $this->linked_dataset_map; + } + + /** + * Output only. Map of listing resource names to associated linked resource, + * e.g. projects/123/locations/US/dataExchanges/456/listings/789 + * -> + * projects/123/datasets/my_dataset + * For listing-level subscriptions, this is a map of size 1. + * Only contains values if state == STATE_ACTIVE. + * + * Generated from protobuf field map linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLinkedDatasetMap($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription\LinkedResource::class); + $this->linked_dataset_map = $arr; + + return $this; + } + + /** + * Output only. Email of the subscriber. + * + * Generated from protobuf field string subscriber_contact = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSubscriberContact() + { + return $this->subscriber_contact; + } + + /** + * Output only. Email of the subscriber. + * + * Generated from protobuf field string subscriber_contact = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSubscriberContact($var) + { + GPBUtil::checkString($var, True); + $this->subscriber_contact = $var; + + return $this; + } + + /** + * @return string + */ + public function getResourceName() + { + return $this->whichOneof("resource_name"); + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/LinkedResource.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/LinkedResource.php new file mode 100644 index 000000000000..997433f4fc84 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/LinkedResource.php @@ -0,0 +1,81 @@ +google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource + */ +class LinkedResource extends \Google\Protobuf\Internal\Message +{ + protected $reference; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $linked_dataset + * Output only. Name of the linked dataset, e.g. + * projects/subscriberproject/datasets/linked_dataset + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the linked dataset, e.g. + * projects/subscriberproject/datasets/linked_dataset + * + * Generated from protobuf field string linked_dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLinkedDataset() + { + return $this->readOneof(1); + } + + public function hasLinkedDataset() + { + return $this->hasOneof(1); + } + + /** + * Output only. Name of the linked dataset, e.g. + * projects/subscriberproject/datasets/linked_dataset + * + * Generated from protobuf field string linked_dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLinkedDataset($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getReference() + { + return $this->whichOneof("reference"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LinkedResource::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription_LinkedResource::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/State.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/State.php new file mode 100644 index 000000000000..8f5368d32784 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/State.php @@ -0,0 +1,73 @@ +google.cloud.bigquery.analyticshub.v1.Subscription.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * This subscription is active and the data is accessible. + * + * Generated from protobuf enum STATE_ACTIVE = 1; + */ + const STATE_ACTIVE = 1; + /** + * The data referenced by this subscription is out of date and should be + * refreshed. This can happen when a data provider adds or removes datasets. + * + * Generated from protobuf enum STATE_STALE = 2; + */ + const STATE_STALE = 2; + /** + * This subscription has been cancelled or revoked and the data is no longer + * accessible. + * + * Generated from protobuf enum STATE_INACTIVE = 3; + */ + const STATE_INACTIVE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STATE_ACTIVE => 'STATE_ACTIVE', + self::STATE_STALE => 'STATE_STALE', + self::STATE_INACTIVE => 'STATE_INACTIVE', + ]; + + 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\BigQuery\AnalyticsHub\V1\Subscription_State::class); + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateDataExchangeRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateDataExchangeRequest.php new file mode 100644 index 000000000000..a39b0308867c --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateDataExchangeRequest.php @@ -0,0 +1,146 @@ +google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest + */ +class UpdateDataExchangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The data exchange to update. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_exchange = null; + + /** + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $dataExchange Required. The data exchange to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\UpdateDataExchangeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $dataExchange, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataExchange($dataExchange) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $data_exchange + * Required. The data exchange to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * + * 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. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * + * 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. The data exchange to update. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange|null + */ + public function getDataExchange() + { + return $this->data_exchange; + } + + public function hasDataExchange() + { + return isset($this->data_exchange); + } + + public function clearDataExchange() + { + unset($this->data_exchange); + } + + /** + * Required. The data exchange to update. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $var + * @return $this + */ + public function setDataExchange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange::class); + $this->data_exchange = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateListingRequest.php new file mode 100644 index 000000000000..d890cb88debf --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateListingRequest.php @@ -0,0 +1,146 @@ +google.cloud.bigquery.analyticshub.v1.UpdateListingRequest + */ +class UpdateListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask specifies the fields to update in the listing + * resource. The fields specified in the `updateMask` are relative to the + * resource and are not a full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The listing to update. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $listing = null; + + /** + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing Required. The listing to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask specifies the fields to update in the listing + * resource. The fields specified in the `updateMask` are relative to the + * resource and are not a full request. + * + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\UpdateListingRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setListing($listing) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask specifies the fields to update in the listing + * resource. The fields specified in the `updateMask` are relative to the + * resource and are not a full request. + * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing + * Required. The listing to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask specifies the fields to update in the listing + * resource. The fields specified in the `updateMask` are relative to the + * resource and are not a full request. + * + * 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. Field mask specifies the fields to update in the listing + * resource. The fields specified in the `updateMask` are relative to the + * resource and are not a full request. + * + * 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. The listing to update. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing|null + */ + public function getListing() + { + return $this->listing; + } + + public function hasListing() + { + return isset($this->listing); + } + + public function clearListing() + { + unset($this->listing); + } + + /** + * Required. The listing to update. + * + * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $var + * @return $this + */ + public function setListing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing::class); + $this->listing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_data_exchange.php new file mode 100644 index 000000000000..7deb15f08eec --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_data_exchange.php @@ -0,0 +1,90 @@ +setDisplayName($dataExchangeDisplayName); + $request = (new CreateDataExchangeRequest()) + ->setParent($formattedParent) + ->setDataExchangeId($dataExchangeId) + ->setDataExchange($dataExchange); + + // Call the API and handle any network failures. + try { + /** @var DataExchange $response */ + $response = $analyticsHubServiceClient->createDataExchange($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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $dataExchangeId = '[DATA_EXCHANGE_ID]'; + $dataExchangeDisplayName = '[DISPLAY_NAME]'; + + create_data_exchange_sample($formattedParent, $dataExchangeId, $dataExchangeDisplayName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_listing.php new file mode 100644 index 000000000000..9c3d7fb5bdf8 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_listing.php @@ -0,0 +1,97 @@ +setBigqueryDataset($listingBigqueryDataset) + ->setDisplayName($listingDisplayName); + $request = (new CreateListingRequest()) + ->setParent($formattedParent) + ->setListingId($listingId) + ->setListing($listing); + + // Call the API and handle any network failures. + try { + /** @var Listing $response */ + $response = $analyticsHubServiceClient->createListing($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 = AnalyticsHubServiceClient::dataExchangeName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]' + ); + $listingId = '[LISTING_ID]'; + $listingDisplayName = '[DISPLAY_NAME]'; + + create_listing_sample($formattedParent, $listingId, $listingDisplayName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php new file mode 100644 index 000000000000..b2c81eac8fb4 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $analyticsHubServiceClient->deleteDataExchange($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 = AnalyticsHubServiceClient::dataExchangeName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]' + ); + + delete_data_exchange_sample($formattedName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_listing.php new file mode 100644 index 000000000000..154911e4d768 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_listing.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $analyticsHubServiceClient->deleteListing($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 = AnalyticsHubServiceClient::listingName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]', + '[LISTING]' + ); + + delete_listing_sample($formattedName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_subscription.php new file mode 100644 index 000000000000..58c61238ed1f --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_subscription.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $analyticsHubServiceClient->deleteSubscription($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 = AnalyticsHubServiceClient::subscriptionName( + '[PROJECT]', + '[LOCATION]', + '[SUBSCRIPTION]' + ); + + delete_subscription_sample($formattedName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_data_exchange.php new file mode 100644 index 000000000000..8168270e7bcc --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_data_exchange.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataExchange $response */ + $response = $analyticsHubServiceClient->getDataExchange($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 = AnalyticsHubServiceClient::dataExchangeName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]' + ); + + get_data_exchange_sample($formattedName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_iam_policy.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..7b6395957e37 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_iam_policy.php @@ -0,0 +1,71 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $analyticsHubServiceClient->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 analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_listing.php new file mode 100644 index 000000000000..37c635b4cec1 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_listing.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Listing $response */ + $response = $analyticsHubServiceClient->getListing($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 = AnalyticsHubServiceClient::listingName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]', + '[LISTING]' + ); + + get_listing_sample($formattedName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_subscription.php new file mode 100644 index 000000000000..6df7c988d8a8 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Subscription $response */ + $response = $analyticsHubServiceClient->getSubscription($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 = AnalyticsHubServiceClient::subscriptionName( + '[PROJECT]', + '[LOCATION]', + '[SUBSCRIPTION]' + ); + + get_subscription_sample($formattedName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php new file mode 100644 index 000000000000..e1ce230bfb00 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $analyticsHubServiceClient->listDataExchanges($request); + + /** @var DataExchange $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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_data_exchanges_sample($formattedParent); +} +// [END analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_listings.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_listings.php new file mode 100644 index 000000000000..8497431fbf05 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_listings.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $analyticsHubServiceClient->listListings($request); + + /** @var Listing $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 = AnalyticsHubServiceClient::dataExchangeName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]' + ); + + list_listings_sample($formattedParent); +} +// [END analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php new file mode 100644 index 000000000000..909cafafe605 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php @@ -0,0 +1,77 @@ +setOrganization($organization); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $analyticsHubServiceClient->listOrgDataExchanges($request); + + /** @var DataExchange $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 +{ + $organization = '[ORGANIZATION]'; + + list_org_data_exchanges_sample($organization); +} +// [END analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php new file mode 100644 index 000000000000..420411fd03cb --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php @@ -0,0 +1,78 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $analyticsHubServiceClient->listSharedResourceSubscriptions($request); + + /** @var Subscription $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 +{ + $resource = '[RESOURCE]'; + + list_shared_resource_subscriptions_sample($resource); +} +// [END analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_subscriptions.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_subscriptions.php new file mode 100644 index 000000000000..67d681debe88 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_subscriptions.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $analyticsHubServiceClient->listSubscriptions($request); + + /** @var Subscription $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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_subscriptions_sample($formattedParent); +} +// [END analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/refresh_subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/refresh_subscription.php new file mode 100644 index 000000000000..acc145b1ed29 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/refresh_subscription.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $analyticsHubServiceClient->refreshSubscription($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RefreshSubscriptionResponse $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 +{ + $formattedName = AnalyticsHubServiceClient::subscriptionName( + '[PROJECT]', + '[LOCATION]', + '[SUBSCRIPTION]' + ); + + refresh_subscription_sample($formattedName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/revoke_subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/revoke_subscription.php new file mode 100644 index 000000000000..a748b2c44de2 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/revoke_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RevokeSubscriptionResponse $response */ + $response = $analyticsHubServiceClient->revokeSubscription($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 = AnalyticsHubServiceClient::subscriptionName( + '[PROJECT]', + '[LOCATION]', + '[SUBSCRIPTION]' + ); + + revoke_subscription_sample($formattedName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/set_iam_policy.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..20444c0319b2 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/set_iam_policy.php @@ -0,0 +1,73 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $analyticsHubServiceClient->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 analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php new file mode 100644 index 000000000000..732adf0edd73 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php @@ -0,0 +1,101 @@ +setName($formattedName) + ->setDestination($formattedDestination) + ->setSubscription($subscription); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $analyticsHubServiceClient->subscribeDataExchange($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SubscribeDataExchangeResponse $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 +{ + $formattedName = AnalyticsHubServiceClient::dataExchangeName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]' + ); + $formattedDestination = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $subscription = '[SUBSCRIPTION]'; + + subscribe_data_exchange_sample($formattedName, $formattedDestination, $subscription); +} +// [END analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_listing.php new file mode 100644 index 000000000000..29db76caf325 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_listing.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SubscribeListingResponse $response */ + $response = $analyticsHubServiceClient->subscribeListing($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 = AnalyticsHubServiceClient::listingName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]', + '[LISTING]' + ); + + subscribe_listing_sample($formattedName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/test_iam_permissions.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..c471d83cf94e --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/test_iam_permissions.php @@ -0,0 +1,78 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $analyticsHubServiceClient->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 analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_data_exchange.php new file mode 100644 index 000000000000..1c51faad82cd --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_data_exchange.php @@ -0,0 +1,78 @@ +setDisplayName($dataExchangeDisplayName); + $request = (new UpdateDataExchangeRequest()) + ->setUpdateMask($updateMask) + ->setDataExchange($dataExchange); + + // Call the API and handle any network failures. + try { + /** @var DataExchange $response */ + $response = $analyticsHubServiceClient->updateDataExchange($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 +{ + $dataExchangeDisplayName = '[DISPLAY_NAME]'; + + update_data_exchange_sample($dataExchangeDisplayName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_listing.php new file mode 100644 index 000000000000..7cafc4893e22 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_listing.php @@ -0,0 +1,81 @@ +setBigqueryDataset($listingBigqueryDataset) + ->setDisplayName($listingDisplayName); + $request = (new UpdateListingRequest()) + ->setUpdateMask($updateMask) + ->setListing($listing); + + // Call the API and handle any network failures. + try { + /** @var Listing $response */ + $response = $analyticsHubServiceClient->updateListing($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 +{ + $listingDisplayName = '[DISPLAY_NAME]'; + + update_listing_sample($listingDisplayName); +} +// [END analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/Client/AnalyticsHubServiceClient.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/Client/AnalyticsHubServiceClient.php new file mode 100644 index 000000000000..d84c587270fc --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/Client/AnalyticsHubServiceClient.php @@ -0,0 +1,1009 @@ + createDataExchangeAsync(CreateDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface createListingAsync(CreateListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataExchangeAsync(DeleteDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteListingAsync(DeleteListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSubscriptionAsync(DeleteSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataExchangeAsync(GetDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getListingAsync(GetListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSubscriptionAsync(GetSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataExchangesAsync(ListDataExchangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listListingsAsync(ListListingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrgDataExchangesAsync(ListOrgDataExchangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSharedResourceSubscriptionsAsync(ListSharedResourceSubscriptionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSubscriptionsAsync(ListSubscriptionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface refreshSubscriptionAsync(RefreshSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface revokeSubscriptionAsync(RevokeSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface subscribeDataExchangeAsync(SubscribeDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface subscribeListingAsync(SubscribeListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataExchangeAsync(UpdateDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateListingAsync(UpdateListingRequest $request, array $optionalArgs = []) + */ +final class AnalyticsHubServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'analyticshub.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'analyticshub.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/analytics_hub_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/analytics_hub_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/analytics_hub_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/analytics_hub_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_exchange resource. + * + * @param string $project + * @param string $location + * @param string $dataExchange + * + * @return string The formatted data_exchange resource. + */ + public static function dataExchangeName(string $project, string $location, string $dataExchange): string + { + return self::getPathTemplate('dataExchange')->render([ + 'project' => $project, + 'location' => $location, + 'data_exchange' => $dataExchange, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a dataset + * resource. + * + * @param string $project + * @param string $dataset + * + * @return string The formatted dataset resource. + */ + public static function datasetName(string $project, string $dataset): string + { + return self::getPathTemplate('dataset')->render([ + 'project' => $project, + 'dataset' => $dataset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a listing + * resource. + * + * @param string $project + * @param string $location + * @param string $dataExchange + * @param string $listing + * + * @return string The formatted listing resource. + */ + public static function listingName(string $project, string $location, string $dataExchange, string $listing): string + { + return self::getPathTemplate('listing')->render([ + 'project' => $project, + 'location' => $location, + 'data_exchange' => $dataExchange, + 'listing' => $listing, + ]); + } + + /** + * 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 subscription + * resource. + * + * @param string $project + * @param string $location + * @param string $subscription + * + * @return string The formatted subscription resource. + */ + public static function subscriptionName(string $project, string $location, string $subscription): string + { + return self::getPathTemplate('subscription')->render([ + 'project' => $project, + 'location' => $location, + 'subscription' => $subscription, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a table + * resource. + * + * @param string $project + * @param string $dataset + * @param string $table + * + * @return string The formatted table resource. + */ + public static function tableName(string $project, string $dataset, string $table): string + { + return self::getPathTemplate('table')->render([ + 'project' => $project, + 'dataset' => $dataset, + 'table' => $table, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataExchange: projects/{project}/locations/{location}/dataExchanges/{data_exchange} + * - dataset: projects/{project}/datasets/{dataset} + * - listing: projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing} + * - location: projects/{project}/locations/{location} + * - subscription: projects/{project}/locations/{location}/subscriptions/{subscription} + * - table: projects/{project}/datasets/{dataset}/tables/{table} + * + * 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 'analyticshub.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 new data exchange. + * + * The async variant is {@see AnalyticsHubServiceClient::createDataExchangeAsync()} + * . + * + * @example samples/V1/AnalyticsHubServiceClient/create_data_exchange.php + * + * @param CreateDataExchangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataExchange + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDataExchange(CreateDataExchangeRequest $request, array $callOptions = []): DataExchange + { + return $this->startApiCall('CreateDataExchange', $request, $callOptions)->wait(); + } + + /** + * Creates a new listing. + * + * The async variant is {@see AnalyticsHubServiceClient::createListingAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/create_listing.php + * + * @param CreateListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Listing + * + * @throws ApiException Thrown if the API call fails. + */ + public function createListing(CreateListingRequest $request, array $callOptions = []): Listing + { + return $this->startApiCall('CreateListing', $request, $callOptions)->wait(); + } + + /** + * Deletes an existing data exchange. + * + * The async variant is {@see AnalyticsHubServiceClient::deleteDataExchangeAsync()} + * . + * + * @example samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php + * + * @param DeleteDataExchangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteDataExchange(DeleteDataExchangeRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDataExchange', $request, $callOptions)->wait(); + } + + /** + * Deletes a listing. + * + * The async variant is {@see AnalyticsHubServiceClient::deleteListingAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/delete_listing.php + * + * @param DeleteListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteListing(DeleteListingRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteListing', $request, $callOptions)->wait(); + } + + /** + * Deletes a subscription. + * + * The async variant is {@see AnalyticsHubServiceClient::deleteSubscriptionAsync()} + * . + * + * @example samples/V1/AnalyticsHubServiceClient/delete_subscription.php + * + * @param DeleteSubscriptionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteSubscription(DeleteSubscriptionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSubscription', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a data exchange. + * + * The async variant is {@see AnalyticsHubServiceClient::getDataExchangeAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/get_data_exchange.php + * + * @param GetDataExchangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataExchange + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataExchange(GetDataExchangeRequest $request, array $callOptions = []): DataExchange + { + return $this->startApiCall('GetDataExchange', $request, $callOptions)->wait(); + } + + /** + * Gets the IAM policy. + * + * The async variant is {@see AnalyticsHubServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/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(); + } + + /** + * Gets the details of a listing. + * + * The async variant is {@see AnalyticsHubServiceClient::getListingAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/get_listing.php + * + * @param GetListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Listing + * + * @throws ApiException Thrown if the API call fails. + */ + public function getListing(GetListingRequest $request, array $callOptions = []): Listing + { + return $this->startApiCall('GetListing', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a Subscription. + * + * The async variant is {@see AnalyticsHubServiceClient::getSubscriptionAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/get_subscription.php + * + * @param GetSubscriptionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Subscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSubscription(GetSubscriptionRequest $request, array $callOptions = []): Subscription + { + return $this->startApiCall('GetSubscription', $request, $callOptions)->wait(); + } + + /** + * Lists all data exchanges in a given project and location. + * + * The async variant is {@see AnalyticsHubServiceClient::listDataExchangesAsync()} + * . + * + * @example samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php + * + * @param ListDataExchangesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDataExchanges(ListDataExchangesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataExchanges', $request, $callOptions); + } + + /** + * Lists all listings in a given project and location. + * + * The async variant is {@see AnalyticsHubServiceClient::listListingsAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/list_listings.php + * + * @param ListListingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listListings(ListListingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListListings', $request, $callOptions); + } + + /** + * Lists all data exchanges from projects in a given organization and + * location. + * + * The async variant is + * {@see AnalyticsHubServiceClient::listOrgDataExchangesAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php + * + * @param ListOrgDataExchangesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listOrgDataExchanges(ListOrgDataExchangesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOrgDataExchanges', $request, $callOptions); + } + + /** + * Lists all subscriptions on a given Data Exchange or Listing. + * + * The async variant is + * {@see AnalyticsHubServiceClient::listSharedResourceSubscriptionsAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php + * + * @param ListSharedResourceSubscriptionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSharedResourceSubscriptions(ListSharedResourceSubscriptionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSharedResourceSubscriptions', $request, $callOptions); + } + + /** + * Lists all subscriptions in a given project and location. + * + * The async variant is {@see AnalyticsHubServiceClient::listSubscriptionsAsync()} + * . + * + * @example samples/V1/AnalyticsHubServiceClient/list_subscriptions.php + * + * @param ListSubscriptionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSubscriptions(ListSubscriptionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSubscriptions', $request, $callOptions); + } + + /** + * Refreshes a Subscription to a Data Exchange. A Data Exchange can become + * stale when a publisher adds or removes data. This is a long-running + * operation as it may create many linked datasets. + * + * The async variant is + * {@see AnalyticsHubServiceClient::refreshSubscriptionAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/refresh_subscription.php + * + * @param RefreshSubscriptionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 refreshSubscription(RefreshSubscriptionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RefreshSubscription', $request, $callOptions)->wait(); + } + + /** + * Revokes a given subscription. + * + * The async variant is {@see AnalyticsHubServiceClient::revokeSubscriptionAsync()} + * . + * + * @example samples/V1/AnalyticsHubServiceClient/revoke_subscription.php + * + * @param RevokeSubscriptionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RevokeSubscriptionResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function revokeSubscription(RevokeSubscriptionRequest $request, array $callOptions = []): RevokeSubscriptionResponse + { + return $this->startApiCall('RevokeSubscription', $request, $callOptions)->wait(); + } + + /** + * Sets the IAM policy. + * + * The async variant is {@see AnalyticsHubServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/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(); + } + + /** + * Creates a Subscription to a Data Exchange. This is a long-running operation + * as it will create one or more linked datasets. + * + * The async variant is + * {@see AnalyticsHubServiceClient::subscribeDataExchangeAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php + * + * @param SubscribeDataExchangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 subscribeDataExchange(SubscribeDataExchangeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SubscribeDataExchange', $request, $callOptions)->wait(); + } + + /** + * Subscribes to a listing. + * + * Currently, with Analytics Hub, you can create listings that + * reference only BigQuery datasets. + * Upon subscription to a listing for a BigQuery dataset, Analytics Hub + * creates a linked dataset in the subscriber's project. + * + * The async variant is {@see AnalyticsHubServiceClient::subscribeListingAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/subscribe_listing.php + * + * @param SubscribeListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SubscribeListingResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function subscribeListing(SubscribeListingRequest $request, array $callOptions = []): SubscribeListingResponse + { + return $this->startApiCall('SubscribeListing', $request, $callOptions)->wait(); + } + + /** + * Returns the permissions that a caller has. + * + * The async variant is {@see AnalyticsHubServiceClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/AnalyticsHubServiceClient/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(); + } + + /** + * Updates an existing data exchange. + * + * The async variant is {@see AnalyticsHubServiceClient::updateDataExchangeAsync()} + * . + * + * @example samples/V1/AnalyticsHubServiceClient/update_data_exchange.php + * + * @param UpdateDataExchangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataExchange + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDataExchange(UpdateDataExchangeRequest $request, array $callOptions = []): DataExchange + { + return $this->startApiCall('UpdateDataExchange', $request, $callOptions)->wait(); + } + + /** + * Updates an existing listing. + * + * The async variant is {@see AnalyticsHubServiceClient::updateListingAsync()} . + * + * @example samples/V1/AnalyticsHubServiceClient/update_listing.php + * + * @param UpdateListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Listing + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateListing(UpdateListingRequest $request, array $callOptions = []): Listing + { + return $this->startApiCall('UpdateListing', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..29a21346b492 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/gapic_metadata.json @@ -0,0 +1,128 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.analyticshub.v1", + "libraryPackage": "Google\\Cloud\\BigQuery\\AnalyticsHub\\V1", + "services": { + "AnalyticsHubService": { + "clients": { + "grpc": { + "libraryClient": "AnalyticsHubServiceGapicClient", + "rpcs": { + "CreateDataExchange": { + "methods": [ + "createDataExchange" + ] + }, + "CreateListing": { + "methods": [ + "createListing" + ] + }, + "DeleteDataExchange": { + "methods": [ + "deleteDataExchange" + ] + }, + "DeleteListing": { + "methods": [ + "deleteListing" + ] + }, + "DeleteSubscription": { + "methods": [ + "deleteSubscription" + ] + }, + "GetDataExchange": { + "methods": [ + "getDataExchange" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetListing": { + "methods": [ + "getListing" + ] + }, + "GetSubscription": { + "methods": [ + "getSubscription" + ] + }, + "ListDataExchanges": { + "methods": [ + "listDataExchanges" + ] + }, + "ListListings": { + "methods": [ + "listListings" + ] + }, + "ListOrgDataExchanges": { + "methods": [ + "listOrgDataExchanges" + ] + }, + "ListSharedResourceSubscriptions": { + "methods": [ + "listSharedResourceSubscriptions" + ] + }, + "ListSubscriptions": { + "methods": [ + "listSubscriptions" + ] + }, + "RefreshSubscription": { + "methods": [ + "refreshSubscription" + ] + }, + "RevokeSubscription": { + "methods": [ + "revokeSubscription" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "SubscribeDataExchange": { + "methods": [ + "subscribeDataExchange" + ] + }, + "SubscribeListing": { + "methods": [ + "subscribeListing" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateDataExchange": { + "methods": [ + "updateDataExchange" + ] + }, + "UpdateListing": { + "methods": [ + "updateListing" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_client_config.json b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_client_config.json new file mode 100644 index 000000000000..8847f98d2f28 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_client_config.json @@ -0,0 +1,145 @@ +{ + "interfaces": { + "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateDataExchange": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDataExchange": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDataExchange": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDataExchanges": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListListings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListOrgDataExchanges": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSharedResourceSubscriptions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSubscriptions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RefreshSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RevokeSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SubscribeDataExchange": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SubscribeListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDataExchange": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_descriptor_config.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_descriptor_config.php new file mode 100644 index 000000000000..efefd6b59a97 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_descriptor_config.php @@ -0,0 +1,363 @@ + [ + 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService' => [ + 'DeleteSubscription' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RefreshSubscription' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\RefreshSubscriptionResponse', + 'metadataReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SubscribeDataExchange' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\SubscribeDataExchangeResponse', + 'metadataReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateDataExchange' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\Listing', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataExchange' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataExchange' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\Listing', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDataExchanges' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataExchanges', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListDataExchangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListListings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getListings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListListingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrgDataExchanges' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataExchanges', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListOrgDataExchangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'organization', + 'fieldAccessors' => [ + 'getOrganization', + ], + ], + ], + ], + 'ListSharedResourceSubscriptions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSharedResourceSubscriptions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListSharedResourceSubscriptionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'ListSubscriptions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSubscriptions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListSubscriptionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RevokeSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\RevokeSubscriptionResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'SubscribeListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\SubscribeListingResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateDataExchange' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange', + 'headerParams' => [ + [ + 'keyName' => 'data_exchange.name', + 'fieldAccessors' => [ + 'getDataExchange', + 'getName', + ], + ], + ], + ], + 'UpdateListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\Listing', + 'headerParams' => [ + [ + 'keyName' => 'listing.name', + 'fieldAccessors' => [ + 'getListing', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'dataExchange' => 'projects/{project}/locations/{location}/dataExchanges/{data_exchange}', + 'dataset' => 'projects/{project}/datasets/{dataset}', + 'listing' => 'projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}', + 'location' => 'projects/{project}/locations/{location}', + 'subscription' => 'projects/{project}/locations/{location}/subscriptions/{subscription}', + 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_rest_client_config.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_rest_client_config.php new file mode 100644 index 000000000000..8dba38a5eee3 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_rest_client_config.php @@ -0,0 +1,332 @@ + [ + 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService' => [ + 'CreateDataExchange' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataExchanges', + 'body' => 'data_exchange', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_exchange_id', + ], + ], + 'CreateListing' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataExchanges/*}/listings', + 'body' => 'listing', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'listing_id', + ], + ], + 'DeleteDataExchange' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteListing' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSubscription' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/subscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataExchange' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/subscriptions/*}:getIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetListing' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSubscription' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/subscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDataExchanges' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataExchanges', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListListings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataExchanges/*}/listings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrgDataExchanges' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{organization=organizations/*/locations/*}/dataExchanges', + 'placeholders' => [ + 'organization' => [ + 'getters' => [ + 'getOrganization', + ], + ], + ], + ], + 'ListSharedResourceSubscriptions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*}:listSubscriptions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:listSubscriptions', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'ListSubscriptions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/subscriptions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RefreshSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/subscriptions/*}:refresh', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RevokeSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/subscriptions/*}:revoke', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/subscriptions/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SubscribeDataExchange' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*}:subscribe', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SubscribeListing' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateDataExchange' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_exchange.name=projects/*/locations/*/dataExchanges/*}', + 'body' => 'data_exchange', + 'placeholders' => [ + 'data_exchange.name' => [ + 'getters' => [ + 'getDataExchange', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateListing' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{listing.name=projects/*/locations/*/dataExchanges/*/listings/*}', + 'body' => 'listing', + 'placeholders' => [ + 'listing.name' => [ + 'getters' => [ + 'getListing', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/tests/Unit/V1/Client/AnalyticsHubServiceClientTest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/tests/Unit/V1/Client/AnalyticsHubServiceClientTest.php new file mode 100644 index 000000000000..6d51510c3d35 --- /dev/null +++ b/owl-bot-staging/BigQueryAnalyticsHub/v1/tests/Unit/V1/Client/AnalyticsHubServiceClientTest.php @@ -0,0 +1,1929 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AnalyticsHubServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AnalyticsHubServiceClient($options); + } + + /** @test */ + public function createDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataExchangeId = 'dataExchangeId1402219426'; + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new CreateDataExchangeRequest()) + ->setParent($formattedParent) + ->setDataExchangeId($dataExchangeId) + ->setDataExchange($dataExchange); + $response = $gapicClient->createDataExchange($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.bigquery.analyticshub.v1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataExchangeId(); + $this->assertProtobufEquals($dataExchangeId, $actualValue); + $actualValue = $actualRequestObject->getDataExchange(); + $this->assertProtobufEquals($dataExchange, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $dataExchangeId = 'dataExchangeId1402219426'; + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new CreateDataExchangeRequest()) + ->setParent($formattedParent) + ->setDataExchangeId($dataExchangeId) + ->setDataExchange($dataExchange); + try { + $gapicClient->createDataExchange($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $icon = '121'; + $requestAccess = 'requestAccess2059178260'; + $expectedResponse = new Listing(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setIcon($icon); + $expectedResponse->setRequestAccess($requestAccess); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $listingId = 'listingId988969142'; + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $request = (new CreateListingRequest()) + ->setParent($formattedParent) + ->setListingId($listingId) + ->setListing($listing); + $response = $gapicClient->createListing($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.bigquery.analyticshub.v1.AnalyticsHubService/CreateListing', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getListingId(); + $this->assertProtobufEquals($listingId, $actualValue); + $actualValue = $actualRequestObject->getListing(); + $this->assertProtobufEquals($listing, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $listingId = 'listingId988969142'; + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $request = (new CreateListingRequest()) + ->setParent($formattedParent) + ->setListingId($listingId) + ->setListing($listing); + try { + $gapicClient->createListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new DeleteDataExchangeRequest()) + ->setName($formattedName); + $gapicClient->deleteDataExchange($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new DeleteDataExchangeRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDataExchange($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new DeleteListingRequest()) + ->setName($formattedName); + $gapicClient->deleteListing($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteListing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new DeleteListingRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSubscriptionTest() + { + $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/deleteSubscriptionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSubscriptionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); + $request = (new DeleteSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSubscription($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.bigquery.analyticshub.v1.AnalyticsHubService/DeleteSubscription', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSubscriptionTest'); + $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 deleteSubscriptionExceptionTest() + { + $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/deleteSubscriptionTest'); + $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->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); + $request = (new DeleteSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSubscription($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSubscriptionTest'); + 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 getDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new GetDataExchangeRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataExchange($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.bigquery.analyticshub.v1.AnalyticsHubService/GetDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new GetDataExchangeRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataExchange($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.analyticshub.v1.AnalyticsHubService/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 getListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $icon = '121'; + $requestAccess = 'requestAccess2059178260'; + $expectedResponse = new Listing(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setIcon($icon); + $expectedResponse->setRequestAccess($requestAccess); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new GetListingRequest()) + ->setName($formattedName); + $response = $gapicClient->getListing($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.bigquery.analyticshub.v1.AnalyticsHubService/GetListing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new GetListingRequest()) + ->setName($formattedName); + try { + $gapicClient->getListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $listing = 'listing181975684'; + $name2 = 'name2-1052831874'; + $organizationId = 'organizationId1326486439'; + $organizationDisplayName = 'organizationDisplayName1039600500'; + $subscriberContact = 'subscriberContact-975982775'; + $expectedResponse = new Subscription(); + $expectedResponse->setListing($listing); + $expectedResponse->setName($name2); + $expectedResponse->setOrganizationId($organizationId); + $expectedResponse->setOrganizationDisplayName($organizationDisplayName); + $expectedResponse->setSubscriberContact($subscriberContact); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); + $request = (new GetSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->getSubscription($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.bigquery.analyticshub.v1.AnalyticsHubService/GetSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSubscriptionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); + $request = (new GetSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->getSubscription($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataExchangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataExchangesElement = new DataExchange(); + $dataExchanges = [ + $dataExchangesElement, + ]; + $expectedResponse = new ListDataExchangesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataExchanges($dataExchanges); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDataExchangesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataExchanges($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListDataExchanges', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataExchangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListDataExchangesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataExchanges($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listListingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $listingsElement = new Listing(); + $listings = [ + $listingsElement, + ]; + $expectedResponse = new ListListingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setListings($listings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new ListListingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listListings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getListings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListListings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listListingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new ListListingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listListings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrgDataExchangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataExchangesElement = new DataExchange(); + $dataExchanges = [ + $dataExchangesElement, + ]; + $expectedResponse = new ListOrgDataExchangesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataExchanges($dataExchanges); + $transport->addResponse($expectedResponse); + // Mock request + $organization = 'organization1178922291'; + $request = (new ListOrgDataExchangesRequest()) + ->setOrganization($organization); + $response = $gapicClient->listOrgDataExchanges($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListOrgDataExchanges', $actualFuncCall); + $actualValue = $actualRequestObject->getOrganization(); + $this->assertProtobufEquals($organization, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrgDataExchangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $organization = 'organization1178922291'; + $request = (new ListOrgDataExchangesRequest()) + ->setOrganization($organization); + try { + $gapicClient->listOrgDataExchanges($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSharedResourceSubscriptionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sharedResourceSubscriptionsElement = new Subscription(); + $sharedResourceSubscriptions = [ + $sharedResourceSubscriptionsElement, + ]; + $expectedResponse = new ListSharedResourceSubscriptionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSharedResourceSubscriptions($sharedResourceSubscriptions); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new ListSharedResourceSubscriptionsRequest()) + ->setResource($resource); + $response = $gapicClient->listSharedResourceSubscriptions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSharedResourceSubscriptions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListSharedResourceSubscriptions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSharedResourceSubscriptionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListSharedResourceSubscriptionsRequest()) + ->setResource($resource); + try { + $gapicClient->listSharedResourceSubscriptions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSubscriptionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $subscriptionsElement = new Subscription(); + $subscriptions = [ + $subscriptionsElement, + ]; + $expectedResponse = new ListSubscriptionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSubscriptions($subscriptions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSubscriptionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSubscriptions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSubscriptions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListSubscriptions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSubscriptionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListSubscriptionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSubscriptions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function refreshSubscriptionTest() + { + $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/refreshSubscriptionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RefreshSubscriptionResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/refreshSubscriptionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); + $request = (new RefreshSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->refreshSubscription($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.bigquery.analyticshub.v1.AnalyticsHubService/RefreshSubscription', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/refreshSubscriptionTest'); + $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 refreshSubscriptionExceptionTest() + { + $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/refreshSubscriptionTest'); + $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->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); + $request = (new RefreshSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->refreshSubscription($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/refreshSubscriptionTest'); + 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 revokeSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RevokeSubscriptionResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); + $request = (new RevokeSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->revokeSubscription($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.bigquery.analyticshub.v1.AnalyticsHubService/RevokeSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function revokeSubscriptionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); + $request = (new RevokeSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->revokeSubscription($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.analyticshub.v1.AnalyticsHubService/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 subscribeDataExchangeTest() + { + $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/subscribeDataExchangeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new SubscribeDataExchangeResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/subscribeDataExchangeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $formattedDestination = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $subscription = 'subscription341203229'; + $request = (new SubscribeDataExchangeRequest()) + ->setName($formattedName) + ->setDestination($formattedDestination) + ->setSubscription($subscription); + $response = $gapicClient->subscribeDataExchange($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.bigquery.analyticshub.v1.AnalyticsHubService/SubscribeDataExchange', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getDestination(); + $this->assertProtobufEquals($formattedDestination, $actualValue); + $actualValue = $actualApiRequestObject->getSubscription(); + $this->assertProtobufEquals($subscription, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/subscribeDataExchangeTest'); + $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 subscribeDataExchangeExceptionTest() + { + $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/subscribeDataExchangeTest'); + $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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $formattedDestination = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $subscription = 'subscription341203229'; + $request = (new SubscribeDataExchangeRequest()) + ->setName($formattedName) + ->setDestination($formattedDestination) + ->setSubscription($subscription); + $response = $gapicClient->subscribeDataExchange($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/subscribeDataExchangeTest'); + 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 subscribeListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SubscribeListingResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new SubscribeListingRequest()) + ->setName($formattedName); + $response = $gapicClient->subscribeListing($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.bigquery.analyticshub.v1.AnalyticsHubService/SubscribeListing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function subscribeListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new SubscribeListingRequest()) + ->setName($formattedName); + try { + $gapicClient->subscribeListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.analyticshub.v1.AnalyticsHubService/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 updateDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new UpdateDataExchangeRequest()) + ->setUpdateMask($updateMask) + ->setDataExchange($dataExchange); + $response = $gapicClient->updateDataExchange($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.bigquery.analyticshub.v1.AnalyticsHubService/UpdateDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getDataExchange(); + $this->assertProtobufEquals($dataExchange, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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(); + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new UpdateDataExchangeRequest()) + ->setUpdateMask($updateMask) + ->setDataExchange($dataExchange); + try { + $gapicClient->updateDataExchange($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $icon = '121'; + $requestAccess = 'requestAccess2059178260'; + $expectedResponse = new Listing(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setIcon($icon); + $expectedResponse->setRequestAccess($requestAccess); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $request = (new UpdateListingRequest()) + ->setUpdateMask($updateMask) + ->setListing($listing); + $response = $gapicClient->updateListing($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.bigquery.analyticshub.v1.AnalyticsHubService/UpdateListing', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getListing(); + $this->assertProtobufEquals($listing, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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(); + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $request = (new UpdateListingRequest()) + ->setUpdateMask($updateMask) + ->setListing($listing); + try { + $gapicClient->updateListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataExchangeAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataExchangeId = 'dataExchangeId1402219426'; + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new CreateDataExchangeRequest()) + ->setParent($formattedParent) + ->setDataExchangeId($dataExchangeId) + ->setDataExchange($dataExchange); + $response = $gapicClient->createDataExchangeAsync($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.bigquery.analyticshub.v1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataExchangeId(); + $this->assertProtobufEquals($dataExchangeId, $actualValue); + $actualValue = $actualRequestObject->getDataExchange(); + $this->assertProtobufEquals($dataExchange, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Connection/V1/Connection.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Connection/V1/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..0503193128ae2c9e5fb25f64af5b3bc4f7e04950 GIT binary patch literal 6926 zcmcIpTW=f36*eWyl}55HPb`U%k$SxjAX!jINHx-gj#4jmvk*I0M8$;-+KVMQl(t@S z*E>tgiog~q&|lC$(e|;A?LRQm7HHlC6v#s!3jc%vL3_^3?2VGFrPAt!tDQM#&gDC| z*-w7q?Rw;pRi0|;qbEyg{o z&b0N-@&guF4J)v!>w;Hx8F^L9idS_x;#GaLaEFk(V{xv?(5pb9^mE;xHX`+178U$V&AVCvPD7xZyrL@F%wz~ax3msa5GgHLURCZo}a zz_SLSHygPdoj*f%LLK@K^BX;_FVxfsH zH*3o0YQwvU4Zd=$TKcJ4vaJ?o1NbpL;XbuKonB9^T~li!Z$Q))8G1nxhRG*dl#;c; z)^dmbmmHZ|_8FwOIA3fr$Wc6?ACn87<%5d(oR*s%Dc}0m82H|}Np3i9T}Dqq9uCIf zV5e5`zFMHuN*SJ zx1r!=avt-i68p9gyFlhcm&T{}${(}Re?unk+dRRXhunXJStiMdXYDYPL(0vc2hE3s zB9sy$-Use;))poi(O;3NBLZ*_QWm3Aj?eO=g30Y{OpqeQW*d?Nb}%M1 zIM4<8`3b@9P9}CzH%XY{`iNYTT*Ks=pA>9A$<8*cw<*4$G|1^c&rkKCbOk9=Y<9^6 zw;aZsE_8(^c5|i>H=h@5%bBFCL>yLtfiOjU2!cBYj>g=J86ALR1~#O@Avj?WR|n~J zLZLYf%$D1*p%ygch70kAYvj_d#Z6$)fW!~YVg4tuI4r13{EgxDmqzJb&v$=9 zsHbi*Dj&sz@Ufd{fnjT$#Jc4%$c+(>_16Q0N(dz3jqzi*p=*TR6swKQhT~)y?Od}s zll6ygk@La6$3%QxT3pFw^P{H~(D=x88+g%8C}**?Fsb(&rci&CvC+)u(Mg>7FKy7p zs@L64J3yV#izC7h`WhKaiSQnIcg5H?%0^|?+89^GvdRjx<@A5#$i-AjqfZE}`!2Fqb`~VEB7Kwz9l&oH zIT(_`793d~$YU68kWt`@vJ0lN&&iy3fgg|}yL;!#Q)I&G!1M_LDH|`d#e!Y8p+6(< z93y~;2IwL2+&CKY5F+prU7Kpi1}UsSHz7tfTtP_{&^{Cfi)A^UGkDw<01ozLoaukd zk;_Ip@8c0AIhRGu>75JFeJ3Me(ph>{mmW&UKyb*ep zj6pQnK2mjjTSg77&XDU(2r@Csn+Y)>2V)P92Oxe%pgzaCVCGYXC_$HuCF^K~I3ZeP z$BgRfPst<>@F1|yDl)F2J!slHbeUWMN6Hleb_jW8m|4i>-y1s7q74d;QLn970sFkD zHus=gb^U#O&3tu$LB=r}Ab-|DQ?MBnTPay}MjUX1Tn{(&@?Vzw_5Xk`d&=3VI@21- zM}mi%nUK{%Yk{xP#cb97c*9{9%+VckO%!HxS8A@(MR<(N#7mi?_#^|0gLIR;_twIT zpo^*xf=;HrB$Py#Cz3b4LPlcHidb9x`Xadk9#a=W%CYp{IWi7uIn{>KjNMERnHpWD z`yI1%c4%CeGvGXUPYIZKguwajH{bn!U`a3HY~~QboR$7y{{EAv32Y zIr?!Xzolr-tmLPMhL{(HCJR(*g5~c7JyN~OT$lbGBBWC~gYv^}?yxsvYBl3F5LY4YPo^@zkLmwo-HlLXFBVL z_L7BaPKL0B2oRT`1#u~+ry(}iuh{gDIWh)dhf6wnK}YrQAgJkZFI7k`hQdtr?2)AU zvqNJ%oRQ{T59b6f%(<%H6+s*>W`jT8=0Ia z21s=Vt^-5ch~*P5R5x=^*5$gqN)*?KJ8pD#BG(o{y41H4uXZOcN?z?x12@;j_Yryj zQGo9wU*NZv#I<4J(ZcI+S5H z0m`0irEsv7Pu(}hv(sBUS~`Y#I57jW@UdIuvaN)7>Zx11ATrR;W}@5idHLxi@ulU& PuPkDx{2J0FT|)i~$#gg? literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsAccessRole.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsAccessRole.php new file mode 100644 index 000000000000..a8e30e4d6bc3 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsAccessRole.php @@ -0,0 +1,110 @@ +google.cloud.bigquery.connection.v1.AwsAccessRole + */ +class AwsAccessRole extends \Google\Protobuf\Internal\Message +{ + /** + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + * + * Generated from protobuf field string iam_role_id = 1; + */ + protected $iam_role_id = ''; + /** + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + * + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $iam_role_id + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + * @type string $identity + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + * + * Generated from protobuf field string iam_role_id = 1; + * @return string + */ + public function getIamRoleId() + { + return $this->iam_role_id; + } + + /** + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + * + * Generated from protobuf field string iam_role_id = 1; + * @param string $var + * @return $this + */ + public function setIamRoleId($var) + { + GPBUtil::checkString($var, True); + $this->iam_role_id = $var; + + return $this; + } + + /** + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + * + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + * + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsCrossAccountRole.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsCrossAccountRole.php new file mode 100644 index 000000000000..9b36df96aeba --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsCrossAccountRole.php @@ -0,0 +1,152 @@ +google.cloud.bigquery.connection.v1.AwsCrossAccountRole + */ +class AwsCrossAccountRole extends \Google\Protobuf\Internal\Message +{ + /** + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + * + * Generated from protobuf field string iam_role_id = 1; + */ + protected $iam_role_id = ''; + /** + * Output only. Google-owned AWS IAM User for a Connection. + * + * Generated from protobuf field string iam_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $iam_user_id = ''; + /** + * Output only. A Google-generated id for representing Connection’s identity + * in AWS. External Id is also used for preventing the Confused Deputy + * Problem. See + * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html + * + * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $external_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $iam_role_id + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + * @type string $iam_user_id + * Output only. Google-owned AWS IAM User for a Connection. + * @type string $external_id + * Output only. A Google-generated id for representing Connection’s identity + * in AWS. External Id is also used for preventing the Confused Deputy + * Problem. See + * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + * + * Generated from protobuf field string iam_role_id = 1; + * @return string + */ + public function getIamRoleId() + { + return $this->iam_role_id; + } + + /** + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + * + * Generated from protobuf field string iam_role_id = 1; + * @param string $var + * @return $this + */ + public function setIamRoleId($var) + { + GPBUtil::checkString($var, True); + $this->iam_role_id = $var; + + return $this; + } + + /** + * Output only. Google-owned AWS IAM User for a Connection. + * + * Generated from protobuf field string iam_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIamUserId() + { + return $this->iam_user_id; + } + + /** + * Output only. Google-owned AWS IAM User for a Connection. + * + * Generated from protobuf field string iam_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIamUserId($var) + { + GPBUtil::checkString($var, True); + $this->iam_user_id = $var; + + return $this; + } + + /** + * Output only. A Google-generated id for representing Connection’s identity + * in AWS. External Id is also used for preventing the Confused Deputy + * Problem. See + * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html + * + * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExternalId() + { + return $this->external_id; + } + + /** + * Output only. A Google-generated id for representing Connection’s identity + * in AWS. External Id is also used for preventing the Confused Deputy + * Problem. See + * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html + * + * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExternalId($var) + { + GPBUtil::checkString($var, True); + $this->external_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsProperties.php new file mode 100644 index 000000000000..9d0a58c34f8b --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsProperties.php @@ -0,0 +1,122 @@ +google.cloud.bigquery.connection.v1.AwsProperties + */ +class AwsProperties extends \Google\Protobuf\Internal\Message +{ + protected $authentication_method; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Connection\V1\AwsCrossAccountRole $cross_account_role + * Authentication using Google owned AWS IAM user's access key to assume + * into customer's AWS IAM Role. + * Deprecated, do not use. + * @type \Google\Cloud\BigQuery\Connection\V1\AwsAccessRole $access_role + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Authentication using Google owned AWS IAM user's access key to assume + * into customer's AWS IAM Role. + * Deprecated, do not use. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsCrossAccountRole cross_account_role = 2 [deprecated = true]; + * @return \Google\Cloud\BigQuery\Connection\V1\AwsCrossAccountRole|null + * @deprecated + */ + public function getCrossAccountRole() + { + @trigger_error('cross_account_role is deprecated.', E_USER_DEPRECATED); + return $this->readOneof(2); + } + + public function hasCrossAccountRole() + { + @trigger_error('cross_account_role is deprecated.', E_USER_DEPRECATED); + return $this->hasOneof(2); + } + + /** + * Authentication using Google owned AWS IAM user's access key to assume + * into customer's AWS IAM Role. + * Deprecated, do not use. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsCrossAccountRole cross_account_role = 2 [deprecated = true]; + * @param \Google\Cloud\BigQuery\Connection\V1\AwsCrossAccountRole $var + * @return $this + * @deprecated + */ + public function setCrossAccountRole($var) + { + @trigger_error('cross_account_role is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\AwsCrossAccountRole::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3; + * @return \Google\Cloud\BigQuery\Connection\V1\AwsAccessRole|null + */ + public function getAccessRole() + { + return $this->readOneof(3); + } + + public function hasAccessRole() + { + return $this->hasOneof(3); + } + + /** + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3; + * @param \Google\Cloud\BigQuery\Connection\V1\AwsAccessRole $var + * @return $this + */ + public function setAccessRole($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\AwsAccessRole::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthenticationMethod() + { + return $this->whichOneof("authentication_method"); + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AzureProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AzureProperties.php new file mode 100644 index 000000000000..4eed865cd3d5 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AzureProperties.php @@ -0,0 +1,287 @@ +google.cloud.bigquery.connection.v1.AzureProperties + */ +class AzureProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the Azure Active Directory Application. + * + * Generated from protobuf field string application = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $application = ''; + /** + * Output only. The client id of the Azure Active Directory Application. + * + * Generated from protobuf field string client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $client_id = ''; + /** + * Output only. The object id of the Azure Active Directory Application. + * + * Generated from protobuf field string object_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $object_id = ''; + /** + * The id of customer's directory that host the data. + * + * Generated from protobuf field string customer_tenant_id = 4; + */ + protected $customer_tenant_id = ''; + /** + * The URL user will be redirected to after granting consent during connection + * setup. + * + * Generated from protobuf field string redirect_uri = 5; + */ + protected $redirect_uri = ''; + /** + * The client ID of the user's Azure Active Directory Application used for a + * federated connection. + * + * Generated from protobuf field string federated_application_client_id = 6; + */ + protected $federated_application_client_id = ''; + /** + * Output only. A unique Google-owned and Google-generated identity for the + * Connection. This identity will be used to access the user's Azure Active + * Directory Application. + * + * Generated from protobuf field string identity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $application + * Output only. The name of the Azure Active Directory Application. + * @type string $client_id + * Output only. The client id of the Azure Active Directory Application. + * @type string $object_id + * Output only. The object id of the Azure Active Directory Application. + * @type string $customer_tenant_id + * The id of customer's directory that host the data. + * @type string $redirect_uri + * The URL user will be redirected to after granting consent during connection + * setup. + * @type string $federated_application_client_id + * The client ID of the user's Azure Active Directory Application used for a + * federated connection. + * @type string $identity + * Output only. A unique Google-owned and Google-generated identity for the + * Connection. This identity will be used to access the user's Azure Active + * Directory Application. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the Azure Active Directory Application. + * + * Generated from protobuf field string application = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApplication() + { + return $this->application; + } + + /** + * Output only. The name of the Azure Active Directory Application. + * + * Generated from protobuf field string application = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApplication($var) + { + GPBUtil::checkString($var, True); + $this->application = $var; + + return $this; + } + + /** + * Output only. The client id of the Azure Active Directory Application. + * + * Generated from protobuf field string client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getClientId() + { + return $this->client_id; + } + + /** + * Output only. The client id of the Azure Active Directory Application. + * + * Generated from protobuf field string client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setClientId($var) + { + GPBUtil::checkString($var, True); + $this->client_id = $var; + + return $this; + } + + /** + * Output only. The object id of the Azure Active Directory Application. + * + * Generated from protobuf field string object_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getObjectId() + { + return $this->object_id; + } + + /** + * Output only. The object id of the Azure Active Directory Application. + * + * Generated from protobuf field string object_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setObjectId($var) + { + GPBUtil::checkString($var, True); + $this->object_id = $var; + + return $this; + } + + /** + * The id of customer's directory that host the data. + * + * Generated from protobuf field string customer_tenant_id = 4; + * @return string + */ + public function getCustomerTenantId() + { + return $this->customer_tenant_id; + } + + /** + * The id of customer's directory that host the data. + * + * Generated from protobuf field string customer_tenant_id = 4; + * @param string $var + * @return $this + */ + public function setCustomerTenantId($var) + { + GPBUtil::checkString($var, True); + $this->customer_tenant_id = $var; + + return $this; + } + + /** + * The URL user will be redirected to after granting consent during connection + * setup. + * + * Generated from protobuf field string redirect_uri = 5; + * @return string + */ + public function getRedirectUri() + { + return $this->redirect_uri; + } + + /** + * The URL user will be redirected to after granting consent during connection + * setup. + * + * Generated from protobuf field string redirect_uri = 5; + * @param string $var + * @return $this + */ + public function setRedirectUri($var) + { + GPBUtil::checkString($var, True); + $this->redirect_uri = $var; + + return $this; + } + + /** + * The client ID of the user's Azure Active Directory Application used for a + * federated connection. + * + * Generated from protobuf field string federated_application_client_id = 6; + * @return string + */ + public function getFederatedApplicationClientId() + { + return $this->federated_application_client_id; + } + + /** + * The client ID of the user's Azure Active Directory Application used for a + * federated connection. + * + * Generated from protobuf field string federated_application_client_id = 6; + * @param string $var + * @return $this + */ + public function setFederatedApplicationClientId($var) + { + GPBUtil::checkString($var, True); + $this->federated_application_client_id = $var; + + return $this; + } + + /** + * Output only. A unique Google-owned and Google-generated identity for the + * Connection. This identity will be used to access the user's Azure Active + * Directory Application. + * + * Generated from protobuf field string identity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Output only. A unique Google-owned and Google-generated identity for the + * Connection. This identity will be used to access the user's Azure Active + * Directory Application. + * + * Generated from protobuf field string identity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudResourceProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudResourceProperties.php new file mode 100644 index 000000000000..cf4b72596aaf --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudResourceProperties.php @@ -0,0 +1,100 @@ +google.cloud.bigquery.connection.v1.CloudResourceProperties + */ +class CloudResourceProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The account ID of the service created for the purpose of this + * connection. + * The service account does not have any permissions associated with it + * when it is created. After creation, customers delegate permissions + * to the service account. When the connection is used in the context of an + * operation in BigQuery, the service account will be used to connect to the + * desired resources in GCP. + * The account ID is in the form of: + * @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com + * + * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account_id + * Output only. The account ID of the service created for the purpose of this + * connection. + * The service account does not have any permissions associated with it + * when it is created. After creation, customers delegate permissions + * to the service account. When the connection is used in the context of an + * operation in BigQuery, the service account will be used to connect to the + * desired resources in GCP. + * The account ID is in the form of: + * @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The account ID of the service created for the purpose of this + * connection. + * The service account does not have any permissions associated with it + * when it is created. After creation, customers delegate permissions + * to the service account. When the connection is used in the context of an + * operation in BigQuery, the service account will be used to connect to the + * desired resources in GCP. + * The account ID is in the form of: + * @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com + * + * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccountId() + { + return $this->service_account_id; + } + + /** + * Output only. The account ID of the service created for the purpose of this + * connection. + * The service account does not have any permissions associated with it + * when it is created. After creation, customers delegate permissions + * to the service account. When the connection is used in the context of an + * operation in BigQuery, the service account will be used to connect to the + * desired resources in GCP. + * The account ID is in the form of: + * @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com + * + * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccountId($var) + { + GPBUtil::checkString($var, True); + $this->service_account_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSpannerProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSpannerProperties.php new file mode 100644 index 000000000000..e200b09b16a3 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSpannerProperties.php @@ -0,0 +1,313 @@ +google.cloud.bigquery.connection.v1.CloudSpannerProperties + */ +class CloudSpannerProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Spanner database in the form `project/instance/database' + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * If parallelism should be used when reading from Cloud Spanner + * + * Generated from protobuf field bool use_parallelism = 2; + */ + protected $use_parallelism = false; + /** + * Allows setting max parallelism per query when executing on Spanner + * independent compute resources. If unspecified, default values of + * parallelism are chosen that are dependent on the Cloud Spanner instance + * configuration. + * REQUIRES: `use_parallelism` must be set. + * REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be + * set. + * + * Generated from protobuf field int32 max_parallelism = 5; + */ + protected $max_parallelism = 0; + /** + * If the serverless analytics service should be used to read data from Cloud + * Spanner. + * Note: `use_parallelism` must be set when using serverless analytics. + * + * Generated from protobuf field bool use_serverless_analytics = 3; + */ + protected $use_serverless_analytics = false; + /** + * If set, the request will be executed via Spanner independent compute + * resources. + * REQUIRES: `use_parallelism` must be set. + * NOTE: `use_serverless_analytics` will be deprecated. Prefer + * `use_data_boost` over `use_serverless_analytics`. + * + * Generated from protobuf field bool use_data_boost = 6; + */ + protected $use_data_boost = false; + /** + * Optional. Cloud Spanner database role for fine-grained access control. + * The Cloud Spanner admin should have provisioned the database role with + * appropriate permissions, such as `SELECT` and `INSERT`. Other users should + * only use roles provided by their Cloud Spanner admins. + * For more details, see [About fine-grained access control] + * (https://cloud.google.com/spanner/docs/fgac-about). + * REQUIRES: The database role name must start with a letter, and can only + * contain letters, numbers, and underscores. + * + * Generated from protobuf field string database_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $database_role = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Cloud Spanner database in the form `project/instance/database' + * @type bool $use_parallelism + * If parallelism should be used when reading from Cloud Spanner + * @type int $max_parallelism + * Allows setting max parallelism per query when executing on Spanner + * independent compute resources. If unspecified, default values of + * parallelism are chosen that are dependent on the Cloud Spanner instance + * configuration. + * REQUIRES: `use_parallelism` must be set. + * REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be + * set. + * @type bool $use_serverless_analytics + * If the serverless analytics service should be used to read data from Cloud + * Spanner. + * Note: `use_parallelism` must be set when using serverless analytics. + * @type bool $use_data_boost + * If set, the request will be executed via Spanner independent compute + * resources. + * REQUIRES: `use_parallelism` must be set. + * NOTE: `use_serverless_analytics` will be deprecated. Prefer + * `use_data_boost` over `use_serverless_analytics`. + * @type string $database_role + * Optional. Cloud Spanner database role for fine-grained access control. + * The Cloud Spanner admin should have provisioned the database role with + * appropriate permissions, such as `SELECT` and `INSERT`. Other users should + * only use roles provided by their Cloud Spanner admins. + * For more details, see [About fine-grained access control] + * (https://cloud.google.com/spanner/docs/fgac-about). + * REQUIRES: The database role name must start with a letter, and can only + * contain letters, numbers, and underscores. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Spanner database in the form `project/instance/database' + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Cloud Spanner database in the form `project/instance/database' + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * If parallelism should be used when reading from Cloud Spanner + * + * Generated from protobuf field bool use_parallelism = 2; + * @return bool + */ + public function getUseParallelism() + { + return $this->use_parallelism; + } + + /** + * If parallelism should be used when reading from Cloud Spanner + * + * Generated from protobuf field bool use_parallelism = 2; + * @param bool $var + * @return $this + */ + public function setUseParallelism($var) + { + GPBUtil::checkBool($var); + $this->use_parallelism = $var; + + return $this; + } + + /** + * Allows setting max parallelism per query when executing on Spanner + * independent compute resources. If unspecified, default values of + * parallelism are chosen that are dependent on the Cloud Spanner instance + * configuration. + * REQUIRES: `use_parallelism` must be set. + * REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be + * set. + * + * Generated from protobuf field int32 max_parallelism = 5; + * @return int + */ + public function getMaxParallelism() + { + return $this->max_parallelism; + } + + /** + * Allows setting max parallelism per query when executing on Spanner + * independent compute resources. If unspecified, default values of + * parallelism are chosen that are dependent on the Cloud Spanner instance + * configuration. + * REQUIRES: `use_parallelism` must be set. + * REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be + * set. + * + * Generated from protobuf field int32 max_parallelism = 5; + * @param int $var + * @return $this + */ + public function setMaxParallelism($var) + { + GPBUtil::checkInt32($var); + $this->max_parallelism = $var; + + return $this; + } + + /** + * If the serverless analytics service should be used to read data from Cloud + * Spanner. + * Note: `use_parallelism` must be set when using serverless analytics. + * + * Generated from protobuf field bool use_serverless_analytics = 3; + * @return bool + */ + public function getUseServerlessAnalytics() + { + return $this->use_serverless_analytics; + } + + /** + * If the serverless analytics service should be used to read data from Cloud + * Spanner. + * Note: `use_parallelism` must be set when using serverless analytics. + * + * Generated from protobuf field bool use_serverless_analytics = 3; + * @param bool $var + * @return $this + */ + public function setUseServerlessAnalytics($var) + { + GPBUtil::checkBool($var); + $this->use_serverless_analytics = $var; + + return $this; + } + + /** + * If set, the request will be executed via Spanner independent compute + * resources. + * REQUIRES: `use_parallelism` must be set. + * NOTE: `use_serverless_analytics` will be deprecated. Prefer + * `use_data_boost` over `use_serverless_analytics`. + * + * Generated from protobuf field bool use_data_boost = 6; + * @return bool + */ + public function getUseDataBoost() + { + return $this->use_data_boost; + } + + /** + * If set, the request will be executed via Spanner independent compute + * resources. + * REQUIRES: `use_parallelism` must be set. + * NOTE: `use_serverless_analytics` will be deprecated. Prefer + * `use_data_boost` over `use_serverless_analytics`. + * + * Generated from protobuf field bool use_data_boost = 6; + * @param bool $var + * @return $this + */ + public function setUseDataBoost($var) + { + GPBUtil::checkBool($var); + $this->use_data_boost = $var; + + return $this; + } + + /** + * Optional. Cloud Spanner database role for fine-grained access control. + * The Cloud Spanner admin should have provisioned the database role with + * appropriate permissions, such as `SELECT` and `INSERT`. Other users should + * only use roles provided by their Cloud Spanner admins. + * For more details, see [About fine-grained access control] + * (https://cloud.google.com/spanner/docs/fgac-about). + * REQUIRES: The database role name must start with a letter, and can only + * contain letters, numbers, and underscores. + * + * Generated from protobuf field string database_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDatabaseRole() + { + return $this->database_role; + } + + /** + * Optional. Cloud Spanner database role for fine-grained access control. + * The Cloud Spanner admin should have provisioned the database role with + * appropriate permissions, such as `SELECT` and `INSERT`. Other users should + * only use roles provided by their Cloud Spanner admins. + * For more details, see [About fine-grained access control] + * (https://cloud.google.com/spanner/docs/fgac-about). + * REQUIRES: The database role name must start with a letter, and can only + * contain letters, numbers, and underscores. + * + * Generated from protobuf field string database_role = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDatabaseRole($var) + { + GPBUtil::checkString($var, True); + $this->database_role = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlCredential.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlCredential.php new file mode 100644 index 000000000000..29199f24bfeb --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlCredential.php @@ -0,0 +1,101 @@ +google.cloud.bigquery.connection.v1.CloudSqlCredential + */ +class CloudSqlCredential extends \Google\Protobuf\Internal\Message +{ + /** + * The username for the credential. + * + * Generated from protobuf field string username = 1; + */ + protected $username = ''; + /** + * The password for the credential. + * + * Generated from protobuf field string password = 2; + */ + protected $password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * The username for the credential. + * @type string $password + * The password for the credential. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * The username for the credential. + * + * Generated from protobuf field string username = 1; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for the credential. + * + * Generated from protobuf field string username = 1; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for the credential. + * + * Generated from protobuf field string password = 2; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the credential. + * + * Generated from protobuf field string password = 2; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties.php new file mode 100644 index 000000000000..088c0b4a1475 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties.php @@ -0,0 +1,229 @@ +google.cloud.bigquery.connection.v1.CloudSqlProperties + */ +class CloudSqlProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID in the form `project:location:instance`. + * + * Generated from protobuf field string instance_id = 1; + */ + protected $instance_id = ''; + /** + * Database name. + * + * Generated from protobuf field string database = 2; + */ + protected $database = ''; + /** + * Type of the Cloud SQL database. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType type = 3; + */ + protected $type = 0; + /** + * Input only. Cloud SQL credential. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlCredential credential = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $credential = null; + /** + * Output only. The account ID of the service used for the purpose of this + * connection. + * When the connection is used in the context of an operation in + * BigQuery, this service account will serve as the identity being used for + * connecting to the CloudSQL instance specified in this connection. + * + * Generated from protobuf field string service_account_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_id + * Cloud SQL instance ID in the form `project:location:instance`. + * @type string $database + * Database name. + * @type int $type + * Type of the Cloud SQL database. + * @type \Google\Cloud\BigQuery\Connection\V1\CloudSqlCredential $credential + * Input only. Cloud SQL credential. + * @type string $service_account_id + * Output only. The account ID of the service used for the purpose of this + * connection. + * When the connection is used in the context of an operation in + * BigQuery, this service account will serve as the identity being used for + * connecting to the CloudSQL instance specified in this connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID in the form `project:location:instance`. + * + * Generated from protobuf field string instance_id = 1; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Cloud SQL instance ID in the form `project:location:instance`. + * + * Generated from protobuf field string instance_id = 1; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Database name. + * + * Generated from protobuf field string database = 2; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Database name. + * + * Generated from protobuf field string database = 2; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Type of the Cloud SQL database. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the Cloud SQL database. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties\DatabaseType::class); + $this->type = $var; + + return $this; + } + + /** + * Input only. Cloud SQL credential. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlCredential credential = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Connection\V1\CloudSqlCredential|null + */ + public function getCredential() + { + return $this->credential; + } + + public function hasCredential() + { + return isset($this->credential); + } + + public function clearCredential() + { + unset($this->credential); + } + + /** + * Input only. Cloud SQL credential. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlCredential credential = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Connection\V1\CloudSqlCredential $var + * @return $this + */ + public function setCredential($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\CloudSqlCredential::class); + $this->credential = $var; + + return $this; + } + + /** + * Output only. The account ID of the service used for the purpose of this + * connection. + * When the connection is used in the context of an operation in + * BigQuery, this service account will serve as the identity being used for + * connecting to the CloudSQL instance specified in this connection. + * + * Generated from protobuf field string service_account_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccountId() + { + return $this->service_account_id; + } + + /** + * Output only. The account ID of the service used for the purpose of this + * connection. + * When the connection is used in the context of an operation in + * BigQuery, this service account will serve as the identity being used for + * connecting to the CloudSQL instance specified in this connection. + * + * Generated from protobuf field string service_account_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccountId($var) + { + GPBUtil::checkString($var, True); + $this->service_account_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties/DatabaseType.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties/DatabaseType.php new file mode 100644 index 000000000000..8c0ea09de1f7 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties/DatabaseType.php @@ -0,0 +1,64 @@ +google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType + */ +class DatabaseType +{ + /** + * Unspecified database type. + * + * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; + */ + const DATABASE_TYPE_UNSPECIFIED = 0; + /** + * Cloud SQL for PostgreSQL. + * + * Generated from protobuf enum POSTGRES = 1; + */ + const POSTGRES = 1; + /** + * Cloud SQL for MySQL. + * + * Generated from protobuf enum MYSQL = 2; + */ + const MYSQL = 2; + + private static $valueToName = [ + self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', + self::POSTGRES => 'POSTGRES', + self::MYSQL => 'MYSQL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DatabaseType::class, \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties_DatabaseType::class); + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/Connection.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/Connection.php new file mode 100644 index 000000000000..692d883d280c --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/Connection.php @@ -0,0 +1,488 @@ +google.cloud.bigquery.connection.v1.Connection + */ +class Connection extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the connection in the form of: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * User provided display name for the connection. + * + * Generated from protobuf field string friendly_name = 2; + */ + protected $friendly_name = ''; + /** + * User provided description. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. The creation timestamp of the connection. + * + * Generated from protobuf field int64 creation_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creation_time = 0; + /** + * Output only. The last update timestamp of the connection. + * + * Generated from protobuf field int64 last_modified_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_modified_time = 0; + /** + * Output only. True, if credential is configured for this connection. + * + * Generated from protobuf field bool has_credential = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $has_credential = false; + protected $properties; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the connection in the form of: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * @type string $friendly_name + * User provided display name for the connection. + * @type string $description + * User provided description. + * @type \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties $cloud_sql + * Cloud SQL properties. + * @type \Google\Cloud\BigQuery\Connection\V1\AwsProperties $aws + * Amazon Web Services (AWS) properties. + * @type \Google\Cloud\BigQuery\Connection\V1\AzureProperties $azure + * Azure properties. + * @type \Google\Cloud\BigQuery\Connection\V1\CloudSpannerProperties $cloud_spanner + * Cloud Spanner properties. + * @type \Google\Cloud\BigQuery\Connection\V1\CloudResourceProperties $cloud_resource + * Cloud Resource properties. + * @type \Google\Cloud\BigQuery\Connection\V1\SparkProperties $spark + * Spark properties. + * @type \Google\Cloud\BigQuery\Connection\V1\SalesforceDataCloudProperties $salesforce_data_cloud + * Optional. Salesforce DataCloud properties. This field is intended for + * use only by Salesforce partner projects. This field contains properties + * for your Salesforce DataCloud connection. + * @type int|string $creation_time + * Output only. The creation timestamp of the connection. + * @type int|string $last_modified_time + * Output only. The last update timestamp of the connection. + * @type bool $has_credential + * Output only. True, if credential is configured for this connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the connection in the form of: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the connection in the form of: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * + * 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; + } + + /** + * User provided display name for the connection. + * + * Generated from protobuf field string friendly_name = 2; + * @return string + */ + public function getFriendlyName() + { + return $this->friendly_name; + } + + /** + * User provided display name for the connection. + * + * Generated from protobuf field string friendly_name = 2; + * @param string $var + * @return $this + */ + public function setFriendlyName($var) + { + GPBUtil::checkString($var, True); + $this->friendly_name = $var; + + return $this; + } + + /** + * User provided description. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User provided description. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Cloud SQL properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties cloud_sql = 4; + * @return \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties|null + */ + public function getCloudSql() + { + return $this->readOneof(4); + } + + public function hasCloudSql() + { + return $this->hasOneof(4); + } + + /** + * Cloud SQL properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties cloud_sql = 4; + * @param \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties $var + * @return $this + */ + public function setCloudSql($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Amazon Web Services (AWS) properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsProperties aws = 8; + * @return \Google\Cloud\BigQuery\Connection\V1\AwsProperties|null + */ + public function getAws() + { + return $this->readOneof(8); + } + + public function hasAws() + { + return $this->hasOneof(8); + } + + /** + * Amazon Web Services (AWS) properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsProperties aws = 8; + * @param \Google\Cloud\BigQuery\Connection\V1\AwsProperties $var + * @return $this + */ + public function setAws($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\AwsProperties::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Azure properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.AzureProperties azure = 11; + * @return \Google\Cloud\BigQuery\Connection\V1\AzureProperties|null + */ + public function getAzure() + { + return $this->readOneof(11); + } + + public function hasAzure() + { + return $this->hasOneof(11); + } + + /** + * Azure properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.AzureProperties azure = 11; + * @param \Google\Cloud\BigQuery\Connection\V1\AzureProperties $var + * @return $this + */ + public function setAzure($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\AzureProperties::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Cloud Spanner properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21; + * @return \Google\Cloud\BigQuery\Connection\V1\CloudSpannerProperties|null + */ + public function getCloudSpanner() + { + return $this->readOneof(21); + } + + public function hasCloudSpanner() + { + return $this->hasOneof(21); + } + + /** + * Cloud Spanner properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21; + * @param \Google\Cloud\BigQuery\Connection\V1\CloudSpannerProperties $var + * @return $this + */ + public function setCloudSpanner($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\CloudSpannerProperties::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Cloud Resource properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudResourceProperties cloud_resource = 22; + * @return \Google\Cloud\BigQuery\Connection\V1\CloudResourceProperties|null + */ + public function getCloudResource() + { + return $this->readOneof(22); + } + + public function hasCloudResource() + { + return $this->hasOneof(22); + } + + /** + * Cloud Resource properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudResourceProperties cloud_resource = 22; + * @param \Google\Cloud\BigQuery\Connection\V1\CloudResourceProperties $var + * @return $this + */ + public function setCloudResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\CloudResourceProperties::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Spark properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkProperties spark = 23; + * @return \Google\Cloud\BigQuery\Connection\V1\SparkProperties|null + */ + public function getSpark() + { + return $this->readOneof(23); + } + + public function hasSpark() + { + return $this->hasOneof(23); + } + + /** + * Spark properties. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkProperties spark = 23; + * @param \Google\Cloud\BigQuery\Connection\V1\SparkProperties $var + * @return $this + */ + public function setSpark($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\SparkProperties::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * Optional. Salesforce DataCloud properties. This field is intended for + * use only by Salesforce partner projects. This field contains properties + * for your Salesforce DataCloud connection. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.SalesforceDataCloudProperties salesforce_data_cloud = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Connection\V1\SalesforceDataCloudProperties|null + */ + public function getSalesforceDataCloud() + { + return $this->readOneof(24); + } + + public function hasSalesforceDataCloud() + { + return $this->hasOneof(24); + } + + /** + * Optional. Salesforce DataCloud properties. This field is intended for + * use only by Salesforce partner projects. This field contains properties + * for your Salesforce DataCloud connection. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.SalesforceDataCloudProperties salesforce_data_cloud = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Connection\V1\SalesforceDataCloudProperties $var + * @return $this + */ + public function setSalesforceDataCloud($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\SalesforceDataCloudProperties::class); + $this->writeOneof(24, $var); + + return $this; + } + + /** + * Output only. The creation timestamp of the connection. + * + * Generated from protobuf field int64 creation_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCreationTime() + { + return $this->creation_time; + } + + /** + * Output only. The creation timestamp of the connection. + * + * Generated from protobuf field int64 creation_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCreationTime($var) + { + GPBUtil::checkInt64($var); + $this->creation_time = $var; + + return $this; + } + + /** + * Output only. The last update timestamp of the connection. + * + * Generated from protobuf field int64 last_modified_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getLastModifiedTime() + { + return $this->last_modified_time; + } + + /** + * Output only. The last update timestamp of the connection. + * + * Generated from protobuf field int64 last_modified_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setLastModifiedTime($var) + { + GPBUtil::checkInt64($var); + $this->last_modified_time = $var; + + return $this; + } + + /** + * Output only. True, if credential is configured for this connection. + * + * Generated from protobuf field bool has_credential = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getHasCredential() + { + return $this->has_credential; + } + + /** + * Output only. True, if credential is configured for this connection. + * + * Generated from protobuf field bool has_credential = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setHasCredential($var) + { + GPBUtil::checkBool($var); + $this->has_credential = $var; + + return $this; + } + + /** + * @return string + */ + public function getProperties() + { + return $this->whichOneof("properties"); + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CreateConnectionRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CreateConnectionRequest.php new file mode 100644 index 000000000000..444204a15db6 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CreateConnectionRequest.php @@ -0,0 +1,169 @@ +google.cloud.bigquery.connection.v1.CreateConnectionRequest + */ +class CreateConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent resource name. + * Must be in the format `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Connection id that should be assigned to the created connection. + * + * Generated from protobuf field string connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $connection_id = ''; + /** + * Required. Connection to create. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $connection = null; + + /** + * @param string $parent Required. Parent resource name. + * Must be in the format `projects/{project_id}/locations/{location_id}` + * Please see {@see ConnectionServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Connection\V1\Connection $connection Required. Connection to create. + * @param string $connectionId Optional. Connection id that should be assigned to the created connection. + * + * @return \Google\Cloud\BigQuery\Connection\V1\CreateConnectionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\Connection\V1\Connection $connection, string $connectionId): self + { + return (new self()) + ->setParent($parent) + ->setConnection($connection) + ->setConnectionId($connectionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent resource name. + * Must be in the format `projects/{project_id}/locations/{location_id}` + * @type string $connection_id + * Optional. Connection id that should be assigned to the created connection. + * @type \Google\Cloud\BigQuery\Connection\V1\Connection $connection + * Required. Connection to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent resource name. + * Must be in the format `projects/{project_id}/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. Parent resource name. + * Must be in the format `projects/{project_id}/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. Connection id that should be assigned to the created connection. + * + * Generated from protobuf field string connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getConnectionId() + { + return $this->connection_id; + } + + /** + * Optional. Connection id that should be assigned to the created connection. + * + * Generated from protobuf field string connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setConnectionId($var) + { + GPBUtil::checkString($var, True); + $this->connection_id = $var; + + return $this; + } + + /** + * Required. Connection to create. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\Connection\V1\Connection|null + */ + public function getConnection() + { + return $this->connection; + } + + public function hasConnection() + { + return isset($this->connection); + } + + public function clearConnection() + { + unset($this->connection); + } + + /** + * Required. Connection to create. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\Connection\V1\Connection $var + * @return $this + */ + public function setConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\Connection::class); + $this->connection = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/DeleteConnectionRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/DeleteConnectionRequest.php new file mode 100644 index 000000000000..8c912391fd91 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/DeleteConnectionRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.connection.v1.DeleteConnectionRequest + */ +class DeleteConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the deleted connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the deleted connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * Please see {@see ConnectionServiceClient::connectionName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Connection\V1\DeleteConnectionRequest + * + * @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. Name of the deleted connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the deleted connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_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. Name of the deleted connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_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/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/GetConnectionRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/GetConnectionRequest.php new file mode 100644 index 000000000000..cbd405870a93 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/GetConnectionRequest.php @@ -0,0 +1,87 @@ +google.cloud.bigquery.connection.v1.GetConnectionRequest + */ +class GetConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the requested connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the requested connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * Please see {@see ConnectionServiceClient::connectionName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Connection\V1\GetConnectionRequest + * + * @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. Name of the requested connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the requested connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_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. Name of the requested connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_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/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsRequest.php new file mode 100644 index 000000000000..f2b7e3b5136d --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsRequest.php @@ -0,0 +1,155 @@ +google.cloud.bigquery.connection.v1.ListConnectionsRequest + */ +class ListConnectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent resource name. + * Must be in the form: `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Page size. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_size = 0; + /** + * Page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent resource name. + * Must be in the form: `projects/{project_id}/locations/{location_id}` + * Please see {@see ConnectionServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Connection\V1\ListConnectionsRequest + * + * @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. Parent resource name. + * Must be in the form: `projects/{project_id}/locations/{location_id}` + * @type int $page_size + * Required. Page size. + * @type string $page_token + * Page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent resource name. + * Must be in the form: `projects/{project_id}/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. Parent resource name. + * Must be in the form: `projects/{project_id}/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. Page size. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Required. Page size. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsResponse.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsResponse.php new file mode 100644 index 000000000000..8039d6aeb66d --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsResponse.php @@ -0,0 +1,102 @@ +google.cloud.bigquery.connection.v1.ListConnectionsResponse + */ +class ListConnectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 1; + */ + protected $next_page_token = ''; + /** + * List of connections. + * + * Generated from protobuf field repeated .google.cloud.bigquery.connection.v1.Connection connections = 2; + */ + private $connections; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $next_page_token + * Next page token. + * @type array<\Google\Cloud\BigQuery\Connection\V1\Connection>|\Google\Protobuf\Internal\RepeatedField $connections + * List of connections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 1; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 1; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * List of connections. + * + * Generated from protobuf field repeated .google.cloud.bigquery.connection.v1.Connection connections = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnections() + { + return $this->connections; + } + + /** + * List of connections. + * + * Generated from protobuf field repeated .google.cloud.bigquery.connection.v1.Connection connections = 2; + * @param array<\Google\Cloud\BigQuery\Connection\V1\Connection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Connection\V1\Connection::class); + $this->connections = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/MetastoreServiceConfig.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/MetastoreServiceConfig.php new file mode 100644 index 000000000000..ffc140b0c99c --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/MetastoreServiceConfig.php @@ -0,0 +1,75 @@ +google.cloud.bigquery.connection.v1.MetastoreServiceConfig + */ +class MetastoreServiceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Resource name of an existing Dataproc Metastore service. + * Example: + * * `projects/[project_id]/locations/[region]/services/[service_id]` + * + * Generated from protobuf field string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $metastore_service = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metastore_service + * Optional. Resource name of an existing Dataproc Metastore service. + * Example: + * * `projects/[project_id]/locations/[region]/services/[service_id]` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Resource name of an existing Dataproc Metastore service. + * Example: + * * `projects/[project_id]/locations/[region]/services/[service_id]` + * + * Generated from protobuf field string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getMetastoreService() + { + return $this->metastore_service; + } + + /** + * Optional. Resource name of an existing Dataproc Metastore service. + * Example: + * * `projects/[project_id]/locations/[region]/services/[service_id]` + * + * Generated from protobuf field string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMetastoreService($var) + { + GPBUtil::checkString($var, True); + $this->metastore_service = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SalesforceDataCloudProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SalesforceDataCloudProperties.php new file mode 100644 index 000000000000..96554aba2f5c --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SalesforceDataCloudProperties.php @@ -0,0 +1,140 @@ +google.cloud.bigquery.connection.v1.SalesforceDataCloudProperties + */ +class SalesforceDataCloudProperties extends \Google\Protobuf\Internal\Message +{ + /** + * The URL to the user's Salesforce DataCloud instance. + * + * Generated from protobuf field string instance_uri = 1; + */ + protected $instance_uri = ''; + /** + * Output only. A unique Google-owned and Google-generated service account + * identity for the connection. + * + * Generated from protobuf field string identity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $identity = ''; + /** + * The ID of the user's Salesforce tenant. + * + * Generated from protobuf field string tenant_id = 3; + */ + protected $tenant_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_uri + * The URL to the user's Salesforce DataCloud instance. + * @type string $identity + * Output only. A unique Google-owned and Google-generated service account + * identity for the connection. + * @type string $tenant_id + * The ID of the user's Salesforce tenant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * The URL to the user's Salesforce DataCloud instance. + * + * Generated from protobuf field string instance_uri = 1; + * @return string + */ + public function getInstanceUri() + { + return $this->instance_uri; + } + + /** + * The URL to the user's Salesforce DataCloud instance. + * + * Generated from protobuf field string instance_uri = 1; + * @param string $var + * @return $this + */ + public function setInstanceUri($var) + { + GPBUtil::checkString($var, True); + $this->instance_uri = $var; + + return $this; + } + + /** + * Output only. A unique Google-owned and Google-generated service account + * identity for the connection. + * + * Generated from protobuf field string identity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Output only. A unique Google-owned and Google-generated service account + * identity for the connection. + * + * Generated from protobuf field string identity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * The ID of the user's Salesforce tenant. + * + * Generated from protobuf field string tenant_id = 3; + * @return string + */ + public function getTenantId() + { + return $this->tenant_id; + } + + /** + * The ID of the user's Salesforce tenant. + * + * Generated from protobuf field string tenant_id = 3; + * @param string $var + * @return $this + */ + public function setTenantId($var) + { + GPBUtil::checkString($var, True); + $this->tenant_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkHistoryServerConfig.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkHistoryServerConfig.php new file mode 100644 index 000000000000..cc00cd0d8cb8 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkHistoryServerConfig.php @@ -0,0 +1,79 @@ +google.cloud.bigquery.connection.v1.SparkHistoryServerConfig + */ +class SparkHistoryServerConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Resource name of an existing Dataproc Cluster to act as a Spark + * History Server for the connection. + * Example: + * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` + * + * Generated from protobuf field string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $dataproc_cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataproc_cluster + * Optional. Resource name of an existing Dataproc Cluster to act as a Spark + * History Server for the connection. + * Example: + * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Resource name of an existing Dataproc Cluster to act as a Spark + * History Server for the connection. + * Example: + * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` + * + * Generated from protobuf field string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getDataprocCluster() + { + return $this->dataproc_cluster; + } + + /** + * Optional. Resource name of an existing Dataproc Cluster to act as a Spark + * History Server for the connection. + * Example: + * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` + * + * Generated from protobuf field string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDataprocCluster($var) + { + GPBUtil::checkString($var, True); + $this->dataproc_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkProperties.php new file mode 100644 index 000000000000..8c3e21da8ebb --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkProperties.php @@ -0,0 +1,188 @@ +google.cloud.bigquery.connection.v1.SparkProperties + */ +class SparkProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The account ID of the service created for the purpose of this + * connection. + * The service account does not have any permissions associated with it when + * it is created. After creation, customers delegate permissions to the + * service account. When the connection is used in the context of a stored + * procedure for Apache Spark in BigQuery, the service account is used to + * connect to the desired resources in Google Cloud. + * The account ID is in the form of: + * bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com + * + * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account_id = ''; + /** + * Optional. Dataproc Metastore Service configuration for the connection. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.MetastoreServiceConfig metastore_service_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metastore_service_config = null; + /** + * Optional. Spark History Server configuration for the connection. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkHistoryServerConfig spark_history_server_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $spark_history_server_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account_id + * Output only. The account ID of the service created for the purpose of this + * connection. + * The service account does not have any permissions associated with it when + * it is created. After creation, customers delegate permissions to the + * service account. When the connection is used in the context of a stored + * procedure for Apache Spark in BigQuery, the service account is used to + * connect to the desired resources in Google Cloud. + * The account ID is in the form of: + * bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com + * @type \Google\Cloud\BigQuery\Connection\V1\MetastoreServiceConfig $metastore_service_config + * Optional. Dataproc Metastore Service configuration for the connection. + * @type \Google\Cloud\BigQuery\Connection\V1\SparkHistoryServerConfig $spark_history_server_config + * Optional. Spark History Server configuration for the connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The account ID of the service created for the purpose of this + * connection. + * The service account does not have any permissions associated with it when + * it is created. After creation, customers delegate permissions to the + * service account. When the connection is used in the context of a stored + * procedure for Apache Spark in BigQuery, the service account is used to + * connect to the desired resources in Google Cloud. + * The account ID is in the form of: + * bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com + * + * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccountId() + { + return $this->service_account_id; + } + + /** + * Output only. The account ID of the service created for the purpose of this + * connection. + * The service account does not have any permissions associated with it when + * it is created. After creation, customers delegate permissions to the + * service account. When the connection is used in the context of a stored + * procedure for Apache Spark in BigQuery, the service account is used to + * connect to the desired resources in Google Cloud. + * The account ID is in the form of: + * bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com + * + * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccountId($var) + { + GPBUtil::checkString($var, True); + $this->service_account_id = $var; + + return $this; + } + + /** + * Optional. Dataproc Metastore Service configuration for the connection. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.MetastoreServiceConfig metastore_service_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Connection\V1\MetastoreServiceConfig|null + */ + public function getMetastoreServiceConfig() + { + return $this->metastore_service_config; + } + + public function hasMetastoreServiceConfig() + { + return isset($this->metastore_service_config); + } + + public function clearMetastoreServiceConfig() + { + unset($this->metastore_service_config); + } + + /** + * Optional. Dataproc Metastore Service configuration for the connection. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.MetastoreServiceConfig metastore_service_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Connection\V1\MetastoreServiceConfig $var + * @return $this + */ + public function setMetastoreServiceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\MetastoreServiceConfig::class); + $this->metastore_service_config = $var; + + return $this; + } + + /** + * Optional. Spark History Server configuration for the connection. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkHistoryServerConfig spark_history_server_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Connection\V1\SparkHistoryServerConfig|null + */ + public function getSparkHistoryServerConfig() + { + return $this->spark_history_server_config; + } + + public function hasSparkHistoryServerConfig() + { + return isset($this->spark_history_server_config); + } + + public function clearSparkHistoryServerConfig() + { + unset($this->spark_history_server_config); + } + + /** + * Optional. Spark History Server configuration for the connection. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkHistoryServerConfig spark_history_server_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Connection\V1\SparkHistoryServerConfig $var + * @return $this + */ + public function setSparkHistoryServerConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\SparkHistoryServerConfig::class); + $this->spark_history_server_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/UpdateConnectionRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/UpdateConnectionRequest.php new file mode 100644 index 000000000000..21c323c829fa --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/UpdateConnectionRequest.php @@ -0,0 +1,179 @@ +google.cloud.bigquery.connection.v1.UpdateConnectionRequest + */ +class UpdateConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the connection to update, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Connection containing the updated fields. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $connection = null; + /** + * Required. Update mask for the connection fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param string $name Required. Name of the connection to update, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * Please see {@see ConnectionServiceClient::connectionName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Connection\V1\Connection $connection Required. Connection containing the updated fields. + * @param \Google\Protobuf\FieldMask $updateMask Required. Update mask for the connection fields to be updated. + * + * @return \Google\Cloud\BigQuery\Connection\V1\UpdateConnectionRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\BigQuery\Connection\V1\Connection $connection, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setName($name) + ->setConnection($connection) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the connection to update, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * @type \Google\Cloud\BigQuery\Connection\V1\Connection $connection + * Required. Connection containing the updated fields. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Update mask for the connection fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the connection to update, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_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. Name of the connection to update, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_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. Connection containing the updated fields. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\Connection\V1\Connection|null + */ + public function getConnection() + { + return $this->connection; + } + + public function hasConnection() + { + return isset($this->connection); + } + + public function clearConnection() + { + unset($this->connection); + } + + /** + * Required. Connection containing the updated fields. + * + * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\Connection\V1\Connection $var + * @return $this + */ + public function setConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\Connection::class); + $this->connection = $var; + + return $this; + } + + /** + * Required. Update mask for the connection fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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. Update mask for the connection fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/create_connection.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/create_connection.php new file mode 100644 index 000000000000..98de64cb0e63 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/create_connection.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setConnection($connection); + + // Call the API and handle any network failures. + try { + /** @var Connection $response */ + $response = $connectionServiceClient->createConnection($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 = ConnectionServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_connection_sample($formattedParent); +} +// [END bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/delete_connection.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/delete_connection.php new file mode 100644 index 000000000000..cbe881ff8807 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/delete_connection.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $connectionServiceClient->deleteConnection($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 = ConnectionServiceClient::connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); + + delete_connection_sample($formattedName); +} +// [END bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_connection.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_connection.php new file mode 100644 index 000000000000..831921fe59ec --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_connection.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Connection $response */ + $response = $connectionServiceClient->getConnection($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 = ConnectionServiceClient::connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); + + get_connection_sample($formattedName); +} +// [END bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_iam_policy.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..53aee56c0402 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_iam_policy.php @@ -0,0 +1,73 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $connectionServiceClient->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 bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/list_connections.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/list_connections.php new file mode 100644 index 000000000000..091267c7cd4b --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/list_connections.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageSize($pageSize); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $connectionServiceClient->listConnections($request); + + /** @var Connection $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 = ConnectionServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $pageSize = 0; + + list_connections_sample($formattedParent, $pageSize); +} +// [END bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/set_iam_policy.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..ef729bbf6995 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/set_iam_policy.php @@ -0,0 +1,76 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $connectionServiceClient->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 bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/test_iam_permissions.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..0541de4552dc --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/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 = $connectionServiceClient->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 bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/update_connection.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/update_connection.php new file mode 100644 index 000000000000..bd37bfe621a1 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/update_connection.php @@ -0,0 +1,78 @@ +setName($formattedName) + ->setConnection($connection) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Connection $response */ + $response = $connectionServiceClient->updateConnection($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 = ConnectionServiceClient::connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); + + update_connection_sample($formattedName); +} +// [END bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/Client/ConnectionServiceClient.php b/owl-bot-staging/BigQueryConnection/v1/src/V1/Client/ConnectionServiceClient.php new file mode 100644 index 000000000000..e022e96d5501 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/src/V1/Client/ConnectionServiceClient.php @@ -0,0 +1,507 @@ + createConnectionAsync(CreateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteConnectionAsync(DeleteConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getConnectionAsync(GetConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listConnectionsAsync(ListConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateConnectionAsync(UpdateConnectionRequest $request, array $optionalArgs = []) + */ +final class ConnectionServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.connection.v1.ConnectionService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigqueryconnection.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigqueryconnection.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/connection_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/connection_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/connection_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/connection_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $region + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $region, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'region' => $region, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a connection + * resource. + * + * @param string $project + * @param string $location + * @param string $connection + * + * @return string The formatted connection resource. + */ + public static function connectionName(string $project, string $location, string $connection): string + { + return self::getPathTemplate('connection')->render([ + 'project' => $project, + 'location' => $location, + 'connection' => $connection, + ]); + } + + /** + * 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 service + * resource. + * + * @param string $project + * @param string $location + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName(string $project, string $location, string $service): string + { + return self::getPathTemplate('service')->render([ + 'project' => $project, + 'location' => $location, + 'service' => $service, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cluster: projects/{project}/regions/{region}/clusters/{cluster} + * - connection: projects/{project}/locations/{location}/connections/{connection} + * - location: projects/{project}/locations/{location} + * - service: projects/{project}/locations/{location}/services/{service} + * + * 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 'bigqueryconnection.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new connection. + * + * The async variant is {@see ConnectionServiceClient::createConnectionAsync()} . + * + * @example samples/V1/ConnectionServiceClient/create_connection.php + * + * @param CreateConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Connection + * + * @throws ApiException Thrown if the API call fails. + */ + public function createConnection(CreateConnectionRequest $request, array $callOptions = []): Connection + { + return $this->startApiCall('CreateConnection', $request, $callOptions)->wait(); + } + + /** + * Deletes connection and associated credential. + * + * The async variant is {@see ConnectionServiceClient::deleteConnectionAsync()} . + * + * @example samples/V1/ConnectionServiceClient/delete_connection.php + * + * @param DeleteConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteConnection(DeleteConnectionRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteConnection', $request, $callOptions)->wait(); + } + + /** + * Returns specified connection. + * + * The async variant is {@see ConnectionServiceClient::getConnectionAsync()} . + * + * @example samples/V1/ConnectionServiceClient/get_connection.php + * + * @param GetConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Connection + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConnection(GetConnectionRequest $request, array $callOptions = []): Connection + { + return $this->startApiCall('GetConnection', $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 ConnectionServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/ConnectionServiceClient/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(); + } + + /** + * Returns a list of connections in the given project. + * + * The async variant is {@see ConnectionServiceClient::listConnectionsAsync()} . + * + * @example samples/V1/ConnectionServiceClient/list_connections.php + * + * @param ListConnectionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listConnections(ListConnectionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListConnections', $request, $callOptions); + } + + /** + * 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 ConnectionServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/ConnectionServiceClient/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 ConnectionServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/ConnectionServiceClient/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(); + } + + /** + * Updates the specified connection. For security reasons, also resets + * credential if connection properties are in the update field mask. + * + * The async variant is {@see ConnectionServiceClient::updateConnectionAsync()} . + * + * @example samples/V1/ConnectionServiceClient/update_connection.php + * + * @param UpdateConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Connection + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateConnection(UpdateConnectionRequest $request, array $callOptions = []): Connection + { + return $this->startApiCall('UpdateConnection', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryConnection/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..184acd74f36e --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/src/V1/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.connection.v1", + "libraryPackage": "Google\\Cloud\\BigQuery\\Connection\\V1", + "services": { + "ConnectionService": { + "clients": { + "grpc": { + "libraryClient": "ConnectionServiceGapicClient", + "rpcs": { + "CreateConnection": { + "methods": [ + "createConnection" + ] + }, + "DeleteConnection": { + "methods": [ + "deleteConnection" + ] + }, + "GetConnection": { + "methods": [ + "getConnection" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "ListConnections": { + "methods": [ + "listConnections" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateConnection": { + "methods": [ + "updateConnection" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_client_config.json b/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_client_config.json new file mode 100644 index 000000000000..31abd111ed39 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_client_config.json @@ -0,0 +1,85 @@ +{ + "interfaces": { + "google.cloud.bigquery.connection.v1.ConnectionService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteConnection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetConnection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListConnections": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_descriptor_config.php b/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_descriptor_config.php new file mode 100644 index 000000000000..cde4430f8eda --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_descriptor_config.php @@ -0,0 +1,138 @@ + [ + 'google.cloud.bigquery.connection.v1.ConnectionService' => [ + 'CreateConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Connection\V1\Connection', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Connection\V1\Connection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'ListConnections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConnections', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Connection\V1\ListConnectionsResponse', + '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', + ], + ], + ], + ], + 'UpdateConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Connection\V1\Connection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'cluster' => 'projects/{project}/regions/{region}/clusters/{cluster}', + 'connection' => 'projects/{project}/locations/{location}/connections/{connection}', + 'location' => 'projects/{project}/locations/{location}', + 'service' => 'projects/{project}/locations/{location}/services/{service}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_rest_client_config.php b/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_rest_client_config.php new file mode 100644 index 000000000000..31ae1178ae30 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_rest_client_config.php @@ -0,0 +1,128 @@ + [ + 'google.cloud.bigquery.connection.v1.ConnectionService' => [ + 'CreateConnection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connections', + 'body' => 'connection', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConnection' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/connections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConnection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/connections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/connections/*}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'ListConnections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_size', + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/connections/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/connections/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateConnection' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/connections/*}', + 'body' => 'connection', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/BigQueryConnection/v1/tests/Unit/V1/Client/ConnectionServiceClientTest.php b/owl-bot-staging/BigQueryConnection/v1/tests/Unit/V1/Client/ConnectionServiceClientTest.php new file mode 100644 index 000000000000..f7f488f16614 --- /dev/null +++ b/owl-bot-staging/BigQueryConnection/v1/tests/Unit/V1/Client/ConnectionServiceClientTest.php @@ -0,0 +1,702 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ConnectionServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ConnectionServiceClient($options); + } + + /** @test */ + public function createConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $friendlyName = 'friendlyName1451097503'; + $description = 'description-1724546052'; + $creationTime = 1932333101; + $lastModifiedTime = 671513446; + $hasCredential = true; + $expectedResponse = new Connection(); + $expectedResponse->setName($name); + $expectedResponse->setFriendlyName($friendlyName); + $expectedResponse->setDescription($description); + $expectedResponse->setCreationTime($creationTime); + $expectedResponse->setLastModifiedTime($lastModifiedTime); + $expectedResponse->setHasCredential($hasCredential); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connection = new Connection(); + $request = (new CreateConnectionRequest()) + ->setParent($formattedParent) + ->setConnection($connection); + $response = $gapicClient->createConnection($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.bigquery.connection.v1.ConnectionService/CreateConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConnection(); + $this->assertProtobufEquals($connection, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $connection = new Connection(); + $request = (new CreateConnectionRequest()) + ->setParent($formattedParent) + ->setConnection($connection); + try { + $gapicClient->createConnection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); + $request = (new DeleteConnectionRequest()) + ->setName($formattedName); + $gapicClient->deleteConnection($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.connection.v1.ConnectionService/DeleteConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); + $request = (new DeleteConnectionRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteConnection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $friendlyName = 'friendlyName1451097503'; + $description = 'description-1724546052'; + $creationTime = 1932333101; + $lastModifiedTime = 671513446; + $hasCredential = true; + $expectedResponse = new Connection(); + $expectedResponse->setName($name2); + $expectedResponse->setFriendlyName($friendlyName); + $expectedResponse->setDescription($description); + $expectedResponse->setCreationTime($creationTime); + $expectedResponse->setLastModifiedTime($lastModifiedTime); + $expectedResponse->setHasCredential($hasCredential); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); + $request = (new GetConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->getConnection($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.bigquery.connection.v1.ConnectionService/GetConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); + $request = (new GetConnectionRequest()) + ->setName($formattedName); + try { + $gapicClient->getConnection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.connection.v1.ConnectionService/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 listConnectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $connectionsElement = new Connection(); + $connections = [ + $connectionsElement, + ]; + $expectedResponse = new ListConnectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConnections($connections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageSize = 883849137; + $request = (new ListConnectionsRequest()) + ->setParent($formattedParent) + ->setPageSize($pageSize); + $response = $gapicClient->listConnections($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConnections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.connection.v1.ConnectionService/ListConnections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageSize(); + $this->assertProtobufEquals($pageSize, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $pageSize = 883849137; + $request = (new ListConnectionsRequest()) + ->setParent($formattedParent) + ->setPageSize($pageSize); + try { + $gapicClient->listConnections($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.connection.v1.ConnectionService/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.bigquery.connection.v1.ConnectionService/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 updateConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $friendlyName = 'friendlyName1451097503'; + $description = 'description-1724546052'; + $creationTime = 1932333101; + $lastModifiedTime = 671513446; + $hasCredential = true; + $expectedResponse = new Connection(); + $expectedResponse->setName($name2); + $expectedResponse->setFriendlyName($friendlyName); + $expectedResponse->setDescription($description); + $expectedResponse->setCreationTime($creationTime); + $expectedResponse->setLastModifiedTime($lastModifiedTime); + $expectedResponse->setHasCredential($hasCredential); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); + $connection = new Connection(); + $updateMask = new FieldMask(); + $request = (new UpdateConnectionRequest()) + ->setName($formattedName) + ->setConnection($connection) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateConnection($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.bigquery.connection.v1.ConnectionService/UpdateConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getConnection(); + $this->assertProtobufEquals($connection, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); + $connection = new Connection(); + $updateMask = new FieldMask(); + $request = (new UpdateConnectionRequest()) + ->setName($formattedName) + ->setConnection($connection) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateConnection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConnectionAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $friendlyName = 'friendlyName1451097503'; + $description = 'description-1724546052'; + $creationTime = 1932333101; + $lastModifiedTime = 671513446; + $hasCredential = true; + $expectedResponse = new Connection(); + $expectedResponse->setName($name); + $expectedResponse->setFriendlyName($friendlyName); + $expectedResponse->setDescription($description); + $expectedResponse->setCreationTime($creationTime); + $expectedResponse->setLastModifiedTime($lastModifiedTime); + $expectedResponse->setHasCredential($hasCredential); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connection = new Connection(); + $request = (new CreateConnectionRequest()) + ->setParent($formattedParent) + ->setConnection($connection); + $response = $gapicClient->createConnectionAsync($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.bigquery.connection.v1.ConnectionService/CreateConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConnection(); + $this->assertProtobufEquals($connection, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Dataexchange/V1Beta1/Dataexchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Dataexchange/V1Beta1/Dataexchange.php new file mode 100644 index 0000000000000000000000000000000000000000..50488f80095d0feb2b8cfc10d2ae33e5dfb1ce98 GIT binary patch literal 10020 zcmcgy%WoUU8P8IdY!79b8u>xXNweNKjjY;atu%p6M@d%Hnqnh9LQ;;CG9Z@ZNZObp zH@i#QimMh#fdaksQlR|@`T&YvdMH}7J@uHLngTuO)I)n{dg!%Cd+0Z_Gs|7B>~Klc z1`J6%-}lY;p5HuPd&Ar{(F<~pbcv-qq%Al1WoMVjrqy$LtzJiN_P4i*CAWHerqLl* zN|x74a5z1*)9bg>O=IW7KC$-GZQaqy!`80e-684w z*PF!AuLnM+*h~m@^*v&ndW*=p@>&7NC}%y#gx0fEXnlX)avNA zE&B)2BP7E=v)}9(E!lQ-2Yy^O?1s@b97FFIAA!ZI^0wZw2?z+&Zuh$_$LMus%24XI z$kG+rl}TwYn?3N*sw~tjQ>TH$>iMoitghavuM@jv8K%>-%0QaQ>=4IuHT|-5g-=Vx z8Qb!bt79e;QgT&xtUmG2F3T2i`d0TA)0+x7@P4Zw;Y8Im>T0*!qh9EB?M!B1(?G=I z7_%LNbe(8Cw++&1uaRB-zR|Oyu~rCAtC5w=>wAz2b@);4L9q8npO14!W%Gg!uGaQU zC&G*#EAvo6x9^Rvt;hS0rJE+P9ur5Fn%7=8cp|FpwwHIep^lflOrd%668e*dRwpW8 zyzH{4SpBC&{ipo(pW^kuc%DzCn+Eg?npkcZSbW|$uuZe4(d6mF2`=~uES@8L=u3Ra z(D$Ixq~S-yWSPLn7lY%0v5S1neN}innS^K`XO4$dHFMMkl?LjDGbbwn;2RwCR$`7Xy4ok#4XkG}igmfk^zLMi^ z9;K{OVbPwlG>S2N1D)EopxoLWUy{XFo)wdT)@=PsRUHd5o_{T>6Qcj03}5CYVfeI;)t*0qbSeCr2w?NO_2~!pDII3EF2rp zgcJIy_kjYMrjUcMVxL>NIgW`{Du9|aMGa!DjGaFcx3A5oIRo zJkbT*xNia6gIRZakk57!L2}KlycR{Ih)>p)!qcgMPBO4a8%8qD6n!O%RIl5(T3$qR z76Bk^I}N?nBDS5J1(~elON&Kx_Q>SGub|^1@!SRC^5^O$^t{MQu1}!zLK9M!(KL$$ zK8xn7HMOQSwu;rVmd)SJYwL+;FhVnGwwAx6B_QFCp%cP#SYOU$fjn2LygS6QfKGcO zrP_v8sU{@+Wu$l?)%81CrIxSei@AncTyGTA%3E3u{z}BC8XjG?R48bbtd^LtXRC>6d=6o6NXwRrr2_pv6a2ou z1vL3mF>xIGjnIl(CHHRPM1c5qzNi+nd37^!GC-VD3)B(>4Sm6zF{hQPWe^S2alC{s zdjlJqx>?)EsukCq&HQbxQO)MHB3M0(F`Dxz3$S%k6Q}SZI_G^WZ>??SvyG~jt(7W? zxqu!Ot)}KT6Q=_otL0LqR!t=ECG?yph0n+QS<$MRTFGuC=J6HuqDNAzsE`%F%iO~# zH%qyEwMLzY@$=}SpY)El$w+FYtxCRHNGxPNmOfLzjb3;X6cC;CE?)&FLjmcI+n7NL z|LtJy1e$U82g)~5l1@h(goh(4Zpq=BXvWlGt##3Ckc6 zPj|^fr{PnC!3(8b;8*3OZh0C3r}cJ!|CkqZPp+!-6y((g&=*`sH8`o`Wx=W-+v zauM;@1GxIDEZ)nb<5uO55YMbdU`g=1QAnR4pPoaBKq>@*p|?hgOko&*f<$5XLirh3 zvt`1(M_ThW6z{Xa2HnYUytybAI}ZwaTT~`9tSQaEi8cKOy0A_<zN66-FK%=L5VX#&MBb4L<_)-D((8f4oBQY37!| z_?o?q&bZk>q}T+p`h$edSNlzR_}C;vV&6v#aGW5vwcZ|w9xKFGUXPN3;SDG3X~x%j z?G)Q(3eA*7lnmS87SGC0pF<0(IF8upH>-~KXUQPst25wea9xtL&qifJ2AJj46ph)(y0M8cUXe3 zcq6LCVL{yJyN7B3f-uvwSRI(|2PmulKkW1qz3>+aogRV%crA+FL(IbVu~C|$9jfej zFC1QaviF$a4jqLpAK?E;u+a&D5gaKC!~Bz**FIFwxOsXtfN7YyIc3aj&bX%p0s-Og z#}E#KmuS|9`6svj!J&E~VD?oXiefI`7NYF7$ik=NSI$ZBSPa(;kyBGX!j>KyMp z9XF9!!EGwOWn|3AWdzQ|{|0LVI5C>F0oIAEH4oJVZf2;*)K>C?9>a;EbQgbo2d4iH zOb;N@Xr>2Ph3SuLEWtEg_C;{qH2trH62o{AXQNc$Ft@NF5_}8`;r-@)e_@uDw*~p%k=zV9`d(m|DiwGH@xds>c&UVk*Tl-fG(fe`X_vm5uFo~KmcMO7LUKkB8G*}O&3s6g0e^XIYU9D84t%F_2$-c@DF zKYxn9ulhs~*ZFHK`W%bhY}VO(EOAC%hgUf4mDgvnlq)@xVd66xU|^5JG8z8_nT%ji zH@@(a3%}@XjR!9as8vuG{QUs@cF>$*F!tq_yk{;~-RD!j*H({xX~ihr7f}c30HOZ@ D2TVz% literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateDataExchangeRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateDataExchangeRequest.php new file mode 100644 index 000000000000..09056571a3e0 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateDataExchangeRequest.php @@ -0,0 +1,182 @@ +google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest + */ +class CreateDataExchangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the data exchange. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_exchange_id = ''; + /** + * Required. The data exchange to create. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_exchange = null; + + /** + * @param string $parent Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. Please see + * {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $dataExchange Required. The data exchange to create. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\CreateDataExchangeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $dataExchange): self + { + return (new self()) + ->setParent($parent) + ->setDataExchange($dataExchange); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. + * @type string $data_exchange_id + * Required. The ID of the data exchange. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $data_exchange + * Required. The data exchange to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the data exchange. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataExchangeId() + { + return $this->data_exchange_id; + } + + /** + * Required. The ID of the data exchange. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataExchangeId($var) + { + GPBUtil::checkString($var, True); + $this->data_exchange_id = $var; + + return $this; + } + + /** + * Required. The data exchange to create. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange|null + */ + public function getDataExchange() + { + return $this->data_exchange; + } + + public function hasDataExchange() + { + return isset($this->data_exchange); + } + + public function clearDataExchange() + { + unset($this->data_exchange); + } + + /** + * Required. The data exchange to create. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $var + * @return $this + */ + public function setDataExchange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange::class); + $this->data_exchange = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateListingRequest.php new file mode 100644 index 000000000000..185295f4c739 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateListingRequest.php @@ -0,0 +1,182 @@ +google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest + */ +class CreateListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the listing to create. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $listing_id = ''; + /** + * Required. The listing to create. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $listing = null; + + /** + * @param string $parent Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see + * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing Required. The listing to create. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\CreateListingRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing): self + { + return (new self()) + ->setParent($parent) + ->setListing($listing); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @type string $listing_id + * Required. The ID of the listing to create. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing + * Required. The listing to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the listing to create. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getListingId() + { + return $this->listing_id; + } + + /** + * Required. The ID of the listing to create. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * + * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setListingId($var) + { + GPBUtil::checkString($var, True); + $this->listing_id = $var; + + return $this; + } + + /** + * Required. The listing to create. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing|null + */ + public function getListing() + { + return $this->listing; + } + + public function hasListing() + { + return isset($this->listing); + } + + public function clearListing() + { + unset($this->listing); + } + + /** + * Required. The listing to create. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $var + * @return $this + */ + public function setListing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing::class); + $this->listing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataExchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataExchange.php new file mode 100644 index 000000000000..6e9c67d93f21 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataExchange.php @@ -0,0 +1,329 @@ +google.cloud.bigquery.dataexchange.v1beta1.DataExchange + */ +class DataExchange extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Human-readable display name of the data exchange. The display name must + * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + * spaces ( ), ampersands (&) and must not start or end with spaces. + * Default value is an empty string. + * Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Description of the data exchange. The description must not contain Unicode + * non-characters as well as C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Email or URL of the primary point of contact of the data exchange. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_contact = ''; + /** + * Optional. Documentation describing the data exchange. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $documentation = ''; + /** + * Output only. Number of listings contained in the data exchange. + * + * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $listing_count = 0; + /** + * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the content of the fields are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $icon = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @type string $display_name + * Required. Human-readable display name of the data exchange. The display name must + * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + * spaces ( ), ampersands (&) and must not start or end with spaces. + * Default value is an empty string. + * Max length: 63 bytes. + * @type string $description + * Optional. Description of the data exchange. The description must not contain Unicode + * non-characters as well as C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * @type string $primary_contact + * Optional. Email or URL of the primary point of contact of the data exchange. + * Max Length: 1000 bytes. + * @type string $documentation + * Optional. Documentation describing the data exchange. + * @type int $listing_count + * Output only. Number of listings contained in the data exchange. + * @type string $icon + * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the content of the fields are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Human-readable display name of the data exchange. The display name must + * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + * spaces ( ), ampersands (&) and must not start or end with spaces. + * Default value is an empty string. + * Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Human-readable display name of the data exchange. The display name must + * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + * spaces ( ), ampersands (&) and must not start or end with spaces. + * Default value is an empty string. + * Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Description of the data exchange. The description must not contain Unicode + * non-characters as well as C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the data exchange. The description must not contain Unicode + * non-characters as well as C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * + * 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. Email or URL of the primary point of contact of the data exchange. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrimaryContact() + { + return $this->primary_contact; + } + + /** + * Optional. Email or URL of the primary point of contact of the data exchange. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrimaryContact($var) + { + GPBUtil::checkString($var, True); + $this->primary_contact = $var; + + return $this; + } + + /** + * Optional. Documentation describing the data exchange. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDocumentation() + { + return $this->documentation; + } + + /** + * Optional. Documentation describing the data exchange. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDocumentation($var) + { + GPBUtil::checkString($var, True); + $this->documentation = $var; + + return $this; + } + + /** + * Output only. Number of listings contained in the data exchange. + * + * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getListingCount() + { + return $this->listing_count; + } + + /** + * Output only. Number of listings contained in the data exchange. + * + * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setListingCount($var) + { + GPBUtil::checkInt32($var); + $this->listing_count = $var; + + return $this; + } + + /** + * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the content of the fields are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the content of the fields are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkString($var, False); + $this->icon = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataProvider.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataProvider.php new file mode 100644 index 000000000000..a84fe678974c --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataProvider.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.dataexchange.v1beta1.DataProvider + */ +class DataProvider extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the data provider. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Optional. Email or URL of the data provider. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_contact = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. Name of the data provider. + * @type string $primary_contact + * Optional. Email or URL of the data provider. + * Max Length: 1000 bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the data provider. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Name of the data provider. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Email or URL of the data provider. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrimaryContact() + { + return $this->primary_contact; + } + + /** + * Optional. Email or URL of the data provider. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrimaryContact($var) + { + GPBUtil::checkString($var, True); + $this->primary_contact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteDataExchangeRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteDataExchangeRequest.php new file mode 100644 index 000000000000..a51e62da4faf --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteDataExchangeRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest + */ +class DeleteDataExchangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. Please see + * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DeleteDataExchangeRequest + * + * @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 full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. + * + * 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/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteListingRequest.php new file mode 100644 index 000000000000..3a38544c15a9 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteListingRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest + */ +class DeleteListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see + * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DeleteListingRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDataset.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDataset.php new file mode 100644 index 000000000000..5cdedbec98c6 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDataset.php @@ -0,0 +1,311 @@ +google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset + */ +class DestinationDataset extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A reference that identifies the destination dataset. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset_reference = null; + /** + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $friendly_name = null; + /** + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = null; + /** + * Optional. The labels associated with this dataset. You can use these + * to organize and group your datasets. + * You can set this property when inserting or updating a dataset. + * See https://cloud.google.com/resource-manager/docs/creating-managing-labels + * for more information. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDatasetReference $dataset_reference + * Required. A reference that identifies the destination dataset. + * @type \Google\Protobuf\StringValue $friendly_name + * Optional. A descriptive name for the dataset. + * @type \Google\Protobuf\StringValue $description + * Optional. A user-friendly description of the dataset. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels associated with this dataset. You can use these + * to organize and group your datasets. + * You can set this property when inserting or updating a dataset. + * See https://cloud.google.com/resource-manager/docs/creating-managing-labels + * for more information. + * @type string $location + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. A reference that identifies the destination dataset. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDatasetReference|null + */ + public function getDatasetReference() + { + return $this->dataset_reference; + } + + public function hasDatasetReference() + { + return isset($this->dataset_reference); + } + + public function clearDatasetReference() + { + unset($this->dataset_reference); + } + + /** + * Required. A reference that identifies the destination dataset. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDatasetReference $var + * @return $this + */ + public function setDatasetReference($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDatasetReference::class); + $this->dataset_reference = $var; + + return $this; + } + + /** + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\StringValue|null + */ + public function getFriendlyName() + { + return $this->friendly_name; + } + + public function hasFriendlyName() + { + return isset($this->friendly_name); + } + + public function clearFriendlyName() + { + unset($this->friendly_name); + } + + /** + * Returns the unboxed value from getFriendlyName() + + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string|null + */ + public function getFriendlyNameUnwrapped() + { + return $this->readWrapperValue("friendly_name"); + } + + /** + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setFriendlyName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->friendly_name = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * Optional. A descriptive name for the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string|null $var + * @return $this + */ + public function setFriendlyNameUnwrapped($var) + { + $this->writeWrapperValue("friendly_name", $var); + return $this;} + + /** + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\StringValue|null + */ + public function getDescription() + { + return $this->description; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Returns the unboxed value from getDescription() + + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string|null + */ + public function getDescriptionUnwrapped() + { + return $this->readWrapperValue("description"); + } + + /** + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * Optional. A user-friendly description of the dataset. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string|null $var + * @return $this + */ + public function setDescriptionUnwrapped($var) + { + $this->writeWrapperValue("description", $var); + return $this;} + + /** + * Optional. The labels associated with this dataset. You can use these + * to organize and group your datasets. + * You can set this property when inserting or updating a dataset. + * See https://cloud.google.com/resource-manager/docs/creating-managing-labels + * for more information. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels associated with this dataset. You can use these + * to organize and group your datasets. + * You can set this property when inserting or updating a dataset. + * See https://cloud.google.com/resource-manager/docs/creating-managing-labels + * for more information. + * + * Generated from protobuf field map labels = 4 [(.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. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDatasetReference.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDatasetReference.php new file mode 100644 index 000000000000..cdfc01fa84a4 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDatasetReference.php @@ -0,0 +1,109 @@ +google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference + */ +class DestinationDatasetReference extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A unique ID for this dataset, without the project name. The ID + * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + * The maximum length is 1,024 characters. + * + * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset_id = ''; + /** + * Required. The ID of the project containing this dataset. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset_id + * Required. A unique ID for this dataset, without the project name. The ID + * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + * The maximum length is 1,024 characters. + * @type string $project_id + * Required. The ID of the project containing this dataset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. A unique ID for this dataset, without the project name. The ID + * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + * The maximum length is 1,024 characters. + * + * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatasetId() + { + return $this->dataset_id; + } + + /** + * Required. A unique ID for this dataset, without the project name. The ID + * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + * The maximum length is 1,024 characters. + * + * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->dataset_id = $var; + + return $this; + } + + /** + * Required. The ID of the project containing this dataset. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The ID of the project containing this dataset. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetDataExchangeRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetDataExchangeRequest.php new file mode 100644 index 000000000000..1589433adf0e --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetDataExchangeRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest + */ +class GetDataExchangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see + * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\GetDataExchangeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * 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/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetListingRequest.php new file mode 100644 index 000000000000..4833f1fea1f0 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetListingRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest + */ +class GetListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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 listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see + * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\GetListingRequest + * + * @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 listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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 listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesRequest.php new file mode 100644 index 000000000000..0d3c1e996b60 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesRequest.php @@ -0,0 +1,162 @@ +google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest + */ +class ListDataExchangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. Please see + * {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\ListDataExchangesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. + * @type int $page_size + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * @type string $page_token + * Page token, returned by a previous call, to request the next page of + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesResponse.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesResponse.php new file mode 100644 index 000000000000..e4bc976a6fda --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesResponse.php @@ -0,0 +1,101 @@ +google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesResponse + */ +class ListDataExchangesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; + */ + private $data_exchanges; + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges + * The list of data exchanges. + * @type string $next_page_token + * A token to request the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataExchanges() + { + return $this->data_exchanges; + } + + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; + * @param array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataExchanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange::class); + $this->data_exchanges = $arr; + + return $this; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsRequest.php new file mode 100644 index 000000000000..453823573a96 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsRequest.php @@ -0,0 +1,162 @@ +google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest + */ +class ListListingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see + * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\ListListingsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @type int $page_size + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * @type string $page_token + * Page token, returned by a previous call, to request the next page of + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsResponse.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsResponse.php new file mode 100644 index 000000000000..52139dd5acde --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsResponse.php @@ -0,0 +1,101 @@ +google.cloud.bigquery.dataexchange.v1beta1.ListListingsResponse + */ +class ListListingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Listing. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing listings = 1; + */ + private $listings; + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataExchange\V1beta1\Listing>|\Google\Protobuf\Internal\RepeatedField $listings + * The list of Listing. + * @type string $next_page_token + * A token to request the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * The list of Listing. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing listings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getListings() + { + return $this->listings; + } + + /** + * The list of Listing. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing listings = 1; + * @param array<\Google\Cloud\BigQuery\DataExchange\V1beta1\Listing>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setListings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing::class); + $this->listings = $arr; + + return $this; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesRequest.php new file mode 100644 index 000000000000..f6b4ab045d71 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesRequest.php @@ -0,0 +1,162 @@ +google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest + */ +class ListOrgDataExchangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The organization resource path of the projects containing DataExchanges. + * e.g. `organizations/myorg/locations/US`. + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $organization = ''; + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $organization Required. The organization resource path of the projects containing DataExchanges. + * e.g. `organizations/myorg/locations/US`. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\ListOrgDataExchangesRequest + * + * @experimental + */ + public static function build(string $organization): self + { + return (new self()) + ->setOrganization($organization); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $organization + * Required. The organization resource path of the projects containing DataExchanges. + * e.g. `organizations/myorg/locations/US`. + * @type int $page_size + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * @type string $page_token + * Page token, returned by a previous call, to request the next page of + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. The organization resource path of the projects containing DataExchanges. + * e.g. `organizations/myorg/locations/US`. + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOrganization() + { + return $this->organization; + } + + /** + * Required. The organization resource path of the projects containing DataExchanges. + * e.g. `organizations/myorg/locations/US`. + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOrganization($var) + { + GPBUtil::checkString($var, True); + $this->organization = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response page. Leverage + * the page tokens to iterate through the entire collection. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token, returned by a previous call, to request the next page of + * results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesResponse.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesResponse.php new file mode 100644 index 000000000000..10b57cdff8e8 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesResponse.php @@ -0,0 +1,102 @@ +google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesResponse + */ +class ListOrgDataExchangesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; + */ + private $data_exchanges; + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges + * The list of data exchanges. + * @type string $next_page_token + * A token to request the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataExchanges() + { + return $this->data_exchanges; + } + + /** + * The list of data exchanges. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; + * @param array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataExchanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange::class); + $this->data_exchanges = $arr; + + return $this; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing.php new file mode 100644 index 000000000000..97a1b7104982 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing.php @@ -0,0 +1,540 @@ +google.cloud.bigquery.dataexchange.v1beta1.Listing + */ +class Listing extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Human-readable display name of the listing. The display name must contain + * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces + * ( ), ampersands (&) and can't start or end with spaces. + * Default value is an empty string. + * Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Short description of the listing. The description must not contain + * Unicode non-characters and C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Email or URL of the primary point of contact of the listing. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_contact = ''; + /** + * Optional. Documentation describing the listing. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $documentation = ''; + /** + * Output only. Current state of the listing. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the contents of the field are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $icon = ''; + /** + * Optional. Details of the data provider who owns the source data. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_provider = null; + /** + * Optional. Categories of the listing. Up to two categories are allowed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $categories; + /** + * Optional. Details of the publisher who owns the listing and who can share + * the source data. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $publisher = null; + /** + * Optional. Email or URL of the request access of the listing. + * Subscribers can use this reference to request access. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_access = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource $bigquery_dataset + * Required. Shared dataset i.e. BigQuery dataset source. + * @type string $name + * Output only. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + * @type string $display_name + * Required. Human-readable display name of the listing. The display name must contain + * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces + * ( ), ampersands (&) and can't start or end with spaces. + * Default value is an empty string. + * Max length: 63 bytes. + * @type string $description + * Optional. Short description of the listing. The description must not contain + * Unicode non-characters and C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * @type string $primary_contact + * Optional. Email or URL of the primary point of contact of the listing. + * Max Length: 1000 bytes. + * @type string $documentation + * Optional. Documentation describing the listing. + * @type int $state + * Output only. Current state of the listing. + * @type string $icon + * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the contents of the field are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider $data_provider + * Optional. Details of the data provider who owns the source data. + * @type array|\Google\Protobuf\Internal\RepeatedField $categories + * Optional. Categories of the listing. Up to two categories are allowed. + * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Publisher $publisher + * Optional. Details of the publisher who owns the listing and who can share + * the source data. + * @type string $request_access + * Optional. Email or URL of the request access of the listing. + * Subscribers can use this reference to request access. + * Max Length: 1000 bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. Shared dataset i.e. BigQuery dataset source. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource|null + */ + public function getBigqueryDataset() + { + return $this->readOneof(6); + } + + public function hasBigqueryDataset() + { + return $this->hasOneof(6); + } + + /** + * Required. Shared dataset i.e. BigQuery dataset source. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource $var + * @return $this + */ + public function setBigqueryDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Human-readable display name of the listing. The display name must contain + * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces + * ( ), ampersands (&) and can't start or end with spaces. + * Default value is an empty string. + * Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Human-readable display name of the listing. The display name must contain + * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces + * ( ), ampersands (&) and can't start or end with spaces. + * Default value is an empty string. + * Max length: 63 bytes. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Short description of the listing. The description must not contain + * Unicode non-characters and C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Short description of the listing. The description must not contain + * Unicode non-characters and C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). + * Default value is an empty string. + * Max length: 2000 bytes. + * + * 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. Email or URL of the primary point of contact of the listing. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrimaryContact() + { + return $this->primary_contact; + } + + /** + * Optional. Email or URL of the primary point of contact of the listing. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrimaryContact($var) + { + GPBUtil::checkString($var, True); + $this->primary_contact = $var; + + return $this; + } + + /** + * Optional. Documentation describing the listing. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDocumentation() + { + return $this->documentation; + } + + /** + * Optional. Documentation describing the listing. + * + * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDocumentation($var) + { + GPBUtil::checkString($var, True); + $this->documentation = $var; + + return $this; + } + + /** + * Output only. Current state of the listing. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the listing. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the contents of the field are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + * Expected image dimensions are 512x512 pixels, however the API only + * performs validation on size of the encoded data. + * Note: For byte fields, the contents of the field are base64-encoded (which + * increases the size of the data by 33-36%) when using JSON on the wire. + * + * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkString($var, False); + $this->icon = $var; + + return $this; + } + + /** + * Optional. Details of the data provider who owns the source data. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider|null + */ + public function getDataProvider() + { + return $this->data_provider; + } + + public function hasDataProvider() + { + return isset($this->data_provider); + } + + public function clearDataProvider() + { + unset($this->data_provider); + } + + /** + * Optional. Details of the data provider who owns the source data. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider $var + * @return $this + */ + public function setDataProvider($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider::class); + $this->data_provider = $var; + + return $this; + } + + /** + * Optional. Categories of the listing. Up to two categories are allowed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * Optional. Categories of the listing. Up to two categories are allowed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\Category::class); + $this->categories = $arr; + + return $this; + } + + /** + * Optional. Details of the publisher who owns the listing and who can share + * the source data. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Publisher|null + */ + public function getPublisher() + { + return $this->publisher; + } + + public function hasPublisher() + { + return isset($this->publisher); + } + + public function clearPublisher() + { + unset($this->publisher); + } + + /** + * Optional. Details of the publisher who owns the listing and who can share + * the source data. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Publisher $var + * @return $this + */ + public function setPublisher($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Publisher::class); + $this->publisher = $var; + + return $this; + } + + /** + * Optional. Email or URL of the request access of the listing. + * Subscribers can use this reference to request access. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestAccess() + { + return $this->request_access; + } + + /** + * Optional. Email or URL of the request access of the listing. + * Subscribers can use this reference to request access. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestAccess($var) + { + GPBUtil::checkString($var, True); + $this->request_access = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/BigQueryDatasetSource.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/BigQueryDatasetSource.php new file mode 100644 index 000000000000..46799e57be56 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/BigQueryDatasetSource.php @@ -0,0 +1,80 @@ +google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource + */ +class BigQueryDatasetSource extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the dataset source for this listing. + * e.g. `projects/myproject/datasets/123` + * + * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { + */ + protected $dataset = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset + * Resource name of the dataset source for this listing. + * e.g. `projects/myproject/datasets/123` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the dataset source for this listing. + * e.g. `projects/myproject/datasets/123` + * + * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * Resource name of the dataset source for this listing. + * e.g. `projects/myproject/datasets/123` + * + * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigQueryDatasetSource::class, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing_BigQueryDatasetSource::class); + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/Category.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/Category.php new file mode 100644 index 000000000000..49feae1ddd69 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/Category.php @@ -0,0 +1,143 @@ +google.cloud.bigquery.dataexchange.v1beta1.Listing.Category + */ +class Category +{ + /** + * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; + */ + const CATEGORY_UNSPECIFIED = 0; + /** + * Generated from protobuf enum CATEGORY_OTHERS = 1; + */ + const CATEGORY_OTHERS = 1; + /** + * Generated from protobuf enum CATEGORY_ADVERTISING_AND_MARKETING = 2; + */ + const CATEGORY_ADVERTISING_AND_MARKETING = 2; + /** + * Generated from protobuf enum CATEGORY_COMMERCE = 3; + */ + const CATEGORY_COMMERCE = 3; + /** + * Generated from protobuf enum CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; + */ + const CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; + /** + * Generated from protobuf enum CATEGORY_DEMOGRAPHICS = 5; + */ + const CATEGORY_DEMOGRAPHICS = 5; + /** + * Generated from protobuf enum CATEGORY_ECONOMICS = 6; + */ + const CATEGORY_ECONOMICS = 6; + /** + * Generated from protobuf enum CATEGORY_EDUCATION = 7; + */ + const CATEGORY_EDUCATION = 7; + /** + * Generated from protobuf enum CATEGORY_ENERGY = 8; + */ + const CATEGORY_ENERGY = 8; + /** + * Generated from protobuf enum CATEGORY_FINANCIAL = 9; + */ + const CATEGORY_FINANCIAL = 9; + /** + * Generated from protobuf enum CATEGORY_GAMING = 10; + */ + const CATEGORY_GAMING = 10; + /** + * Generated from protobuf enum CATEGORY_GEOSPATIAL = 11; + */ + const CATEGORY_GEOSPATIAL = 11; + /** + * Generated from protobuf enum CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; + */ + const CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; + /** + * Generated from protobuf enum CATEGORY_MEDIA = 13; + */ + const CATEGORY_MEDIA = 13; + /** + * Generated from protobuf enum CATEGORY_PUBLIC_SECTOR = 14; + */ + const CATEGORY_PUBLIC_SECTOR = 14; + /** + * Generated from protobuf enum CATEGORY_RETAIL = 15; + */ + const CATEGORY_RETAIL = 15; + /** + * Generated from protobuf enum CATEGORY_SPORTS = 16; + */ + const CATEGORY_SPORTS = 16; + /** + * Generated from protobuf enum CATEGORY_SCIENCE_AND_RESEARCH = 17; + */ + const CATEGORY_SCIENCE_AND_RESEARCH = 17; + /** + * Generated from protobuf enum CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; + */ + const CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; + /** + * Generated from protobuf enum CATEGORY_TRAVEL_AND_TOURISM = 19; + */ + const CATEGORY_TRAVEL_AND_TOURISM = 19; + + private static $valueToName = [ + self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', + self::CATEGORY_OTHERS => 'CATEGORY_OTHERS', + self::CATEGORY_ADVERTISING_AND_MARKETING => 'CATEGORY_ADVERTISING_AND_MARKETING', + self::CATEGORY_COMMERCE => 'CATEGORY_COMMERCE', + self::CATEGORY_CLIMATE_AND_ENVIRONMENT => 'CATEGORY_CLIMATE_AND_ENVIRONMENT', + self::CATEGORY_DEMOGRAPHICS => 'CATEGORY_DEMOGRAPHICS', + self::CATEGORY_ECONOMICS => 'CATEGORY_ECONOMICS', + self::CATEGORY_EDUCATION => 'CATEGORY_EDUCATION', + self::CATEGORY_ENERGY => 'CATEGORY_ENERGY', + self::CATEGORY_FINANCIAL => 'CATEGORY_FINANCIAL', + self::CATEGORY_GAMING => 'CATEGORY_GAMING', + self::CATEGORY_GEOSPATIAL => 'CATEGORY_GEOSPATIAL', + self::CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE => 'CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE', + self::CATEGORY_MEDIA => 'CATEGORY_MEDIA', + self::CATEGORY_PUBLIC_SECTOR => 'CATEGORY_PUBLIC_SECTOR', + self::CATEGORY_RETAIL => 'CATEGORY_RETAIL', + self::CATEGORY_SPORTS => 'CATEGORY_SPORTS', + self::CATEGORY_SCIENCE_AND_RESEARCH => 'CATEGORY_SCIENCE_AND_RESEARCH', + self::CATEGORY_TRANSPORTATION_AND_LOGISTICS => 'CATEGORY_TRANSPORTATION_AND_LOGISTICS', + self::CATEGORY_TRAVEL_AND_TOURISM => 'CATEGORY_TRAVEL_AND_TOURISM', + ]; + + 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\BigQuery\DataExchange\V1beta1\Listing_Category::class); + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/State.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/State.php new file mode 100644 index 000000000000..b32889752911 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/State.php @@ -0,0 +1,58 @@ +google.cloud.bigquery.dataexchange.v1beta1.Listing.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Subscribable state. Users with dataexchange.listings.subscribe permission + * can subscribe to this listing. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + ]; + + 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\BigQuery\DataExchange\V1beta1\Listing_State::class); + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Publisher.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Publisher.php new file mode 100644 index 000000000000..df925cb8cd92 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Publisher.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.dataexchange.v1beta1.Publisher + */ +class Publisher extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the listing publisher. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Optional. Email or URL of the listing publisher. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_contact = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optional. Name of the listing publisher. + * @type string $primary_contact + * Optional. Email or URL of the listing publisher. + * Max Length: 1000 bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the listing publisher. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Name of the listing publisher. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Email or URL of the listing publisher. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrimaryContact() + { + return $this->primary_contact; + } + + /** + * Optional. Email or URL of the listing publisher. + * Max Length: 1000 bytes. + * + * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrimaryContact($var) + { + GPBUtil::checkString($var, True); + $this->primary_contact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingRequest.php new file mode 100644 index 000000000000..618a4dddf6d5 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingRequest.php @@ -0,0 +1,128 @@ +google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest + */ +class SubscribeListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + protected $destination; + + /** + * @param string $name Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see + * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\SubscribeListingRequest + * + * @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 \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDataset $destination_dataset + * BigQuery destination dataset to create for the subscriber. + * @type string $name + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * BigQuery destination dataset to create for the subscriber. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset destination_dataset = 3; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDataset|null + */ + public function getDestinationDataset() + { + return $this->readOneof(3); + } + + public function hasDestinationDataset() + { + return $this->hasOneof(3); + } + + /** + * BigQuery destination dataset to create for the subscriber. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset destination_dataset = 3; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDataset $var + * @return $this + */ + public function setDestinationDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDataset::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * 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; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingResponse.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingResponse.php new file mode 100644 index 000000000000..d40416cb2840 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingResponse.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingResponse + */ +class SubscribeListingResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateDataExchangeRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateDataExchangeRequest.php new file mode 100644 index 000000000000..9c8093ac7295 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateDataExchangeRequest.php @@ -0,0 +1,146 @@ +google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest + */ +class UpdateDataExchangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The data exchange to update. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_exchange = null; + + /** + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $dataExchange Required. The data exchange to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\UpdateDataExchangeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $dataExchange, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataExchange($dataExchange) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $data_exchange + * Required. The data exchange to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * + * 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. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * + * 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. The data exchange to update. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange|null + */ + public function getDataExchange() + { + return $this->data_exchange; + } + + public function hasDataExchange() + { + return isset($this->data_exchange); + } + + public function clearDataExchange() + { + unset($this->data_exchange); + } + + /** + * Required. The data exchange to update. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $var + * @return $this + */ + public function setDataExchange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange::class); + $this->data_exchange = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateListingRequest.php new file mode 100644 index 000000000000..65cdaa83e854 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateListingRequest.php @@ -0,0 +1,146 @@ +google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest + */ +class UpdateListingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The listing to update. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $listing = null; + + /** + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing Required. The listing to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\UpdateListingRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setListing($listing) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. + * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing + * Required. The listing to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. + * + * 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. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. + * + * 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. The listing to update. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing|null + */ + public function getListing() + { + return $this->listing; + } + + public function hasListing() + { + return isset($this->listing); + } + + public function clearListing() + { + unset($this->listing); + } + + /** + * Required. The listing to update. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $var + * @return $this + */ + public function setListing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing::class); + $this->listing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php new file mode 100644 index 000000000000..91e7905c6d7e --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php @@ -0,0 +1,91 @@ +setDisplayName($dataExchangeDisplayName); + $request = (new CreateDataExchangeRequest()) + ->setParent($formattedParent) + ->setDataExchangeId($dataExchangeId) + ->setDataExchange($dataExchange); + + // Call the API and handle any network failures. + try { + /** @var DataExchange $response */ + $response = $analyticsHubServiceClient->createDataExchange($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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $dataExchangeId = '[DATA_EXCHANGE_ID]'; + $dataExchangeDisplayName = '[DISPLAY_NAME]'; + + create_data_exchange_sample($formattedParent, $dataExchangeId, $dataExchangeDisplayName); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_listing.php new file mode 100644 index 000000000000..a6c498b410c6 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_listing.php @@ -0,0 +1,98 @@ +setBigqueryDataset($listingBigqueryDataset) + ->setDisplayName($listingDisplayName); + $request = (new CreateListingRequest()) + ->setParent($formattedParent) + ->setListingId($listingId) + ->setListing($listing); + + // Call the API and handle any network failures. + try { + /** @var Listing $response */ + $response = $analyticsHubServiceClient->createListing($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 = AnalyticsHubServiceClient::dataExchangeName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]' + ); + $listingId = '[LISTING_ID]'; + $listingDisplayName = '[DISPLAY_NAME]'; + + create_listing_sample($formattedParent, $listingId, $listingDisplayName); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php new file mode 100644 index 000000000000..99c5254ba3df --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $analyticsHubServiceClient->deleteDataExchange($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 = AnalyticsHubServiceClient::dataExchangeName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]' + ); + + delete_data_exchange_sample($formattedName); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php new file mode 100644 index 000000000000..264c3616cdd1 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $analyticsHubServiceClient->deleteListing($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 = AnalyticsHubServiceClient::listingName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]', + '[LISTING]' + ); + + delete_listing_sample($formattedName); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php new file mode 100644 index 000000000000..9e08be2ec9f1 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataExchange $response */ + $response = $analyticsHubServiceClient->getDataExchange($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 = AnalyticsHubServiceClient::dataExchangeName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]' + ); + + get_data_exchange_sample($formattedName); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_iam_policy.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..d56bce00ca61 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_iam_policy.php @@ -0,0 +1,71 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $analyticsHubServiceClient->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 analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_listing.php new file mode 100644 index 000000000000..2c6fa3115ade --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_listing.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Listing $response */ + $response = $analyticsHubServiceClient->getListing($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 = AnalyticsHubServiceClient::listingName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]', + '[LISTING]' + ); + + get_listing_sample($formattedName); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_location.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_location.php new file mode 100644 index 000000000000..2fbe8bedff2f --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/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 analyticshub_v1beta1_generated_AnalyticsHubService_GetLocation_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php new file mode 100644 index 000000000000..ea159727feb2 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $analyticsHubServiceClient->listDataExchanges($request); + + /** @var DataExchange $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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_data_exchanges_sample($formattedParent); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_listings.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_listings.php new file mode 100644 index 000000000000..dcdeb97ccecc --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_listings.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $analyticsHubServiceClient->listListings($request); + + /** @var Listing $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 = AnalyticsHubServiceClient::dataExchangeName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]' + ); + + list_listings_sample($formattedParent); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_locations.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_locations.php new file mode 100644 index 000000000000..750c4435e1cf --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/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 analyticshub_v1beta1_generated_AnalyticsHubService_ListLocations_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php new file mode 100644 index 000000000000..7366041a733f --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php @@ -0,0 +1,77 @@ +setOrganization($organization); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $analyticsHubServiceClient->listOrgDataExchanges($request); + + /** @var DataExchange $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 +{ + $organization = '[ORGANIZATION]'; + + list_org_data_exchanges_sample($organization); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/set_iam_policy.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..73a7dac77161 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/set_iam_policy.php @@ -0,0 +1,73 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $analyticsHubServiceClient->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 analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php new file mode 100644 index 000000000000..df0061aa875d --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SubscribeListingResponse $response */ + $response = $analyticsHubServiceClient->subscribeListing($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 = AnalyticsHubServiceClient::listingName( + '[PROJECT]', + '[LOCATION]', + '[DATA_EXCHANGE]', + '[LISTING]' + ); + + subscribe_listing_sample($formattedName); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/test_iam_permissions.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..6b252fbccb6d --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/test_iam_permissions.php @@ -0,0 +1,78 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $analyticsHubServiceClient->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 analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php new file mode 100644 index 000000000000..2e2328984071 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php @@ -0,0 +1,79 @@ +setDisplayName($dataExchangeDisplayName); + $request = (new UpdateDataExchangeRequest()) + ->setUpdateMask($updateMask) + ->setDataExchange($dataExchange); + + // Call the API and handle any network failures. + try { + /** @var DataExchange $response */ + $response = $analyticsHubServiceClient->updateDataExchange($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 +{ + $dataExchangeDisplayName = '[DISPLAY_NAME]'; + + update_data_exchange_sample($dataExchangeDisplayName); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_listing.php new file mode 100644 index 000000000000..d2929851a9da --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_listing.php @@ -0,0 +1,82 @@ +setBigqueryDataset($listingBigqueryDataset) + ->setDisplayName($listingDisplayName); + $request = (new UpdateListingRequest()) + ->setUpdateMask($updateMask) + ->setListing($listing); + + // Call the API and handle any network failures. + try { + /** @var Listing $response */ + $response = $analyticsHubServiceClient->updateListing($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 +{ + $listingDisplayName = '[DISPLAY_NAME]'; + + update_listing_sample($listingDisplayName); +} +// [END analyticshub_v1beta1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/AnalyticsHubServiceClient.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/AnalyticsHubServiceClient.php new file mode 100644 index 000000000000..fa24a46a2864 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/AnalyticsHubServiceClient.php @@ -0,0 +1,36 @@ + createDataExchangeAsync(CreateDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface createListingAsync(CreateListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataExchangeAsync(DeleteDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteListingAsync(DeleteListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataExchangeAsync(GetDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getListingAsync(GetListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataExchangesAsync(ListDataExchangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listListingsAsync(ListListingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrgDataExchangesAsync(ListOrgDataExchangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface subscribeListingAsync(SubscribeListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataExchangeAsync(UpdateDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateListingAsync(UpdateListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class AnalyticsHubServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'analyticshub.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'analyticshub.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/analytics_hub_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/analytics_hub_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/analytics_hub_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/analytics_hub_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_exchange resource. + * + * @param string $project + * @param string $location + * @param string $dataExchange + * + * @return string The formatted data_exchange resource. + * + * @experimental + */ + public static function dataExchangeName(string $project, string $location, string $dataExchange): string + { + return self::getPathTemplate('dataExchange')->render([ + 'project' => $project, + 'location' => $location, + 'data_exchange' => $dataExchange, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a dataset + * resource. + * + * @param string $project + * @param string $dataset + * + * @return string The formatted dataset resource. + * + * @experimental + */ + public static function datasetName(string $project, string $dataset): string + { + return self::getPathTemplate('dataset')->render([ + 'project' => $project, + 'dataset' => $dataset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a listing + * resource. + * + * @param string $project + * @param string $location + * @param string $dataExchange + * @param string $listing + * + * @return string The formatted listing resource. + * + * @experimental + */ + public static function listingName(string $project, string $location, string $dataExchange, string $listing): string + { + return self::getPathTemplate('listing')->render([ + 'project' => $project, + 'location' => $location, + 'data_exchange' => $dataExchange, + 'listing' => $listing, + ]); + } + + /** + * 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. + * + * @experimental + */ + 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 + * - dataExchange: projects/{project}/locations/{location}/dataExchanges/{data_exchange} + * - dataset: projects/{project}/datasets/{dataset} + * - listing: projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing} + * - 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. + * + * @experimental + */ + 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 'analyticshub.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 + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new data exchange. + * + * The async variant is {@see AnalyticsHubServiceClient::createDataExchangeAsync()} + * . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php + * + * @param CreateDataExchangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataExchange + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createDataExchange(CreateDataExchangeRequest $request, array $callOptions = []): DataExchange + { + return $this->startApiCall('CreateDataExchange', $request, $callOptions)->wait(); + } + + /** + * Creates a new listing. + * + * The async variant is {@see AnalyticsHubServiceClient::createListingAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/create_listing.php + * + * @param CreateListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Listing + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createListing(CreateListingRequest $request, array $callOptions = []): Listing + { + return $this->startApiCall('CreateListing', $request, $callOptions)->wait(); + } + + /** + * Deletes an existing data exchange. + * + * The async variant is {@see AnalyticsHubServiceClient::deleteDataExchangeAsync()} + * . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php + * + * @param DeleteDataExchangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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. + * + * @experimental + */ + public function deleteDataExchange(DeleteDataExchangeRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDataExchange', $request, $callOptions)->wait(); + } + + /** + * Deletes a listing. + * + * The async variant is {@see AnalyticsHubServiceClient::deleteListingAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php + * + * @param DeleteListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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. + * + * @experimental + */ + public function deleteListing(DeleteListingRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteListing', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a data exchange. + * + * The async variant is {@see AnalyticsHubServiceClient::getDataExchangeAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php + * + * @param GetDataExchangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataExchange + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getDataExchange(GetDataExchangeRequest $request, array $callOptions = []): DataExchange + { + return $this->startApiCall('GetDataExchange', $request, $callOptions)->wait(); + } + + /** + * Gets the IAM policy. + * + * The async variant is {@see AnalyticsHubServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/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. + * + * @experimental + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a listing. + * + * The async variant is {@see AnalyticsHubServiceClient::getListingAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/get_listing.php + * + * @param GetListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Listing + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getListing(GetListingRequest $request, array $callOptions = []): Listing + { + return $this->startApiCall('GetListing', $request, $callOptions)->wait(); + } + + /** + * Lists all data exchanges in a given project and location. + * + * The async variant is {@see AnalyticsHubServiceClient::listDataExchangesAsync()} + * . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php + * + * @param ListDataExchangesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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. + * + * @experimental + */ + public function listDataExchanges(ListDataExchangesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataExchanges', $request, $callOptions); + } + + /** + * Lists all listings in a given project and location. + * + * The async variant is {@see AnalyticsHubServiceClient::listListingsAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/list_listings.php + * + * @param ListListingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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. + * + * @experimental + */ + public function listListings(ListListingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListListings', $request, $callOptions); + } + + /** + * Lists all data exchanges from projects in a given organization and + * location. + * + * The async variant is + * {@see AnalyticsHubServiceClient::listOrgDataExchangesAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php + * + * @param ListOrgDataExchangesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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. + * + * @experimental + */ + public function listOrgDataExchanges(ListOrgDataExchangesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOrgDataExchanges', $request, $callOptions); + } + + /** + * Sets the IAM policy. + * + * The async variant is {@see AnalyticsHubServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/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. + * + * @experimental + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Subscribes to a listing. + * + * Currently, with Analytics Hub, you can create listings that + * reference only BigQuery datasets. + * Upon subscription to a listing for a BigQuery dataset, Analytics Hub + * creates a linked dataset in the subscriber's project. + * + * The async variant is {@see AnalyticsHubServiceClient::subscribeListingAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php + * + * @param SubscribeListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SubscribeListingResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function subscribeListing(SubscribeListingRequest $request, array $callOptions = []): SubscribeListingResponse + { + return $this->startApiCall('SubscribeListing', $request, $callOptions)->wait(); + } + + /** + * Returns the permissions that a caller has. + * + * The async variant is {@see AnalyticsHubServiceClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/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. + * + * @experimental + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Updates an existing data exchange. + * + * The async variant is {@see AnalyticsHubServiceClient::updateDataExchangeAsync()} + * . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php + * + * @param UpdateDataExchangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataExchange + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateDataExchange(UpdateDataExchangeRequest $request, array $callOptions = []): DataExchange + { + return $this->startApiCall('UpdateDataExchange', $request, $callOptions)->wait(); + } + + /** + * Updates an existing listing. + * + * The async variant is {@see AnalyticsHubServiceClient::updateListingAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/update_listing.php + * + * @param UpdateListingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Listing + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateListing(UpdateListingRequest $request, array $callOptions = []): Listing + { + return $this->startApiCall('UpdateListing', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AnalyticsHubServiceClient::getLocationAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/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. + * + * @experimental + */ + 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 AnalyticsHubServiceClient::listLocationsAsync()} . + * + * @example samples/V1beta1/AnalyticsHubServiceClient/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. + * + * @experimental + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php new file mode 100644 index 000000000000..6f0c940efa5f --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php @@ -0,0 +1,1305 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $dataExchangeId = 'data_exchange_id'; + * $dataExchange = new DataExchange(); + * $response = $analyticsHubServiceClient->createDataExchange($formattedParent, $dataExchangeId, $dataExchange); + * } finally { + * $analyticsHubServiceClient->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. + * + * @experimental + * + * @deprecated Please use the new service client {@see \Google\Cloud\BigQuery\DataExchange\V1beta1\Client\AnalyticsHubServiceClient}. + */ +class AnalyticsHubServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'analyticshub.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'analyticshub.UNIVERSE_DOMAIN'; + + /** 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/bigquery', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $dataExchangeNameTemplate; + + private static $datasetNameTemplate; + + private static $listingNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/analytics_hub_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/analytics_hub_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/analytics_hub_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/analytics_hub_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getDataExchangeNameTemplate() + { + if (self::$dataExchangeNameTemplate == null) { + self::$dataExchangeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataExchanges/{data_exchange}'); + } + + return self::$dataExchangeNameTemplate; + } + + private static function getDatasetNameTemplate() + { + if (self::$datasetNameTemplate == null) { + self::$datasetNameTemplate = new PathTemplate('projects/{project}/datasets/{dataset}'); + } + + return self::$datasetNameTemplate; + } + + private static function getListingNameTemplate() + { + if (self::$listingNameTemplate == null) { + self::$listingNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}'); + } + + return self::$listingNameTemplate; + } + + 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 = [ + 'dataExchange' => self::getDataExchangeNameTemplate(), + 'dataset' => self::getDatasetNameTemplate(), + 'listing' => self::getListingNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_exchange resource. + * + * @param string $project + * @param string $location + * @param string $dataExchange + * + * @return string The formatted data_exchange resource. + * + * @experimental + */ + public static function dataExchangeName($project, $location, $dataExchange) + { + return self::getDataExchangeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'data_exchange' => $dataExchange, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a dataset + * resource. + * + * @param string $project + * @param string $dataset + * + * @return string The formatted dataset resource. + * + * @experimental + */ + public static function datasetName($project, $dataset) + { + return self::getDatasetNameTemplate()->render([ + 'project' => $project, + 'dataset' => $dataset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a listing + * resource. + * + * @param string $project + * @param string $location + * @param string $dataExchange + * @param string $listing + * + * @return string The formatted listing resource. + * + * @experimental + */ + public static function listingName($project, $location, $dataExchange, $listing) + { + return self::getListingNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'data_exchange' => $dataExchange, + 'listing' => $listing, + ]); + } + + /** + * 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. + * + * @experimental + */ + 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 + * - dataExchange: projects/{project}/locations/{location}/dataExchanges/{data_exchange} + * - dataset: projects/{project}/datasets/{dataset} + * - listing: projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing} + * - 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. + * + * @experimental + */ + 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 'analyticshub.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 + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a new data exchange. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $formattedParent = $analyticsHubServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $dataExchangeId = 'data_exchange_id'; + * $dataExchange = new DataExchange(); + * $response = $analyticsHubServiceClient->createDataExchange($formattedParent, $dataExchangeId, $dataExchange); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource path of the data exchange. + * e.g. `projects/myproject/locations/US`. + * @param string $dataExchangeId Required. The ID of the data exchange. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * @param DataExchange $dataExchange Required. The data exchange to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createDataExchange($parent, $dataExchangeId, $dataExchange, array $optionalArgs = []) + { + $request = new CreateDataExchangeRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDataExchangeId($dataExchangeId); + $request->setDataExchange($dataExchange); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateDataExchange', DataExchange::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new listing. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $formattedParent = $analyticsHubServiceClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + * $listingId = 'listing_id'; + * $listing = new Listing(); + * $response = $analyticsHubServiceClient->createListing($formattedParent, $listingId, $listing); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @param string $listingId Required. The ID of the listing to create. + * Must contain only Unicode letters, numbers (0-9), underscores (_). + * Should not use characters that require URL-escaping, or characters + * outside of ASCII, spaces. + * Max length: 100 bytes. + * @param Listing $listing Required. The listing to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createListing($parent, $listingId, $listing, array $optionalArgs = []) + { + $request = new CreateListingRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setListingId($listingId); + $request->setListing($listing); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateListing', Listing::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an existing data exchange. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $formattedName = $analyticsHubServiceClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + * $analyticsHubServiceClient->deleteDataExchange($formattedName); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. + * @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 + * + * @experimental + */ + public function deleteDataExchange($name, array $optionalArgs = []) + { + $request = new DeleteDataExchangeRequest(); + $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('DeleteDataExchange', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a listing. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $formattedName = $analyticsHubServiceClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + * $analyticsHubServiceClient->deleteListing($formattedName); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the listing to delete. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * @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 + * + * @experimental + */ + public function deleteListing($name, array $optionalArgs = []) + { + $request = new DeleteListingRequest(); + $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('DeleteListing', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the details of a data exchange. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $formattedName = $analyticsHubServiceClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + * $response = $analyticsHubServiceClient->getDataExchange($formattedName); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the data exchange. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @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\BigQuery\DataExchange\V1beta1\DataExchange + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getDataExchange($name, array $optionalArgs = []) + { + $request = new GetDataExchangeRequest(); + $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('GetDataExchange', DataExchange::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the IAM policy. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $resource = 'resource'; + * $response = $analyticsHubServiceClient->getIamPolicy($resource); + * } finally { + * $analyticsHubServiceClient->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 + * + * @experimental + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the details of a listing. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $formattedName = $analyticsHubServiceClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + * $response = $analyticsHubServiceClient->getListing($formattedName); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * @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\BigQuery\DataExchange\V1beta1\Listing + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getListing($name, array $optionalArgs = []) + { + $request = new GetListingRequest(); + $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('GetListing', Listing::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all data exchanges in a given project and location. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $formattedParent = $analyticsHubServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $analyticsHubServiceClient->listDataExchanges($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $analyticsHubServiceClient->listDataExchanges($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource path of the data exchanges. + * e.g. `projects/myproject/locations/US`. + * @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 + * + * @experimental + */ + public function listDataExchanges($parent, array $optionalArgs = []) + { + $request = new ListDataExchangesRequest(); + $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('ListDataExchanges', $optionalArgs, ListDataExchangesResponse::class, $request); + } + + /** + * Lists all listings in a given project and location. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $formattedParent = $analyticsHubServiceClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + * // Iterate over pages of elements + * $pagedResponse = $analyticsHubServiceClient->listListings($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $analyticsHubServiceClient->listListings($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource path of the listing. + * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @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 + * + * @experimental + */ + public function listListings($parent, array $optionalArgs = []) + { + $request = new ListListingsRequest(); + $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('ListListings', $optionalArgs, ListListingsResponse::class, $request); + } + + /** + * Lists all data exchanges from projects in a given organization and + * location. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $organization = 'organization'; + * // Iterate over pages of elements + * $pagedResponse = $analyticsHubServiceClient->listOrgDataExchanges($organization); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $analyticsHubServiceClient->listOrgDataExchanges($organization); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $organization Required. The organization resource path of the projects containing DataExchanges. + * e.g. `organizations/myorg/locations/US`. + * @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 + * + * @experimental + */ + public function listOrgDataExchanges($organization, array $optionalArgs = []) + { + $request = new ListOrgDataExchangesRequest(); + $requestParamHeaders = []; + $request->setOrganization($organization); + $requestParamHeaders['organization'] = $organization; + 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('ListOrgDataExchanges', $optionalArgs, ListOrgDataExchangesResponse::class, $request); + } + + /** + * Sets the IAM policy. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $analyticsHubServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $analyticsHubServiceClient->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 + * + * @experimental + */ + 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(); + } + + /** + * Subscribes to a listing. + * + * Currently, with Analytics Hub, you can create listings that + * reference only BigQuery datasets. + * Upon subscription to a listing for a BigQuery dataset, Analytics Hub + * creates a linked dataset in the subscriber's project. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $formattedName = $analyticsHubServiceClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + * $response = $analyticsHubServiceClient->subscribeListing($formattedName); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * @param array $optionalArgs { + * Optional. + * + * @type DestinationDataset $destinationDataset + * BigQuery destination dataset to create for the subscriber. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can 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\BigQuery\DataExchange\V1beta1\SubscribeListingResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function subscribeListing($name, array $optionalArgs = []) + { + $request = new SubscribeListingRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['destinationDataset'])) { + $request->setDestinationDataset($optionalArgs['destinationDataset']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SubscribeListing', SubscribeListingResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the permissions that a caller has. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $analyticsHubServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $analyticsHubServiceClient->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 + * + * @experimental + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an existing data exchange. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $dataExchange = new DataExchange(); + * $response = $analyticsHubServiceClient->updateDataExchange($updateMask, $dataExchange); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * @param DataExchange $dataExchange Required. The data exchange to update. + * @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\BigQuery\DataExchange\V1beta1\DataExchange + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateDataExchange($updateMask, $dataExchange, array $optionalArgs = []) + { + $request = new UpdateDataExchangeRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setDataExchange($dataExchange); + $requestParamHeaders['data_exchange.name'] = $dataExchange->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateDataExchange', DataExchange::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an existing listing. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $listing = new Listing(); + * $response = $analyticsHubServiceClient->updateListing($updateMask, $listing); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. + * @param Listing $listing Required. The listing to update. + * @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\BigQuery\DataExchange\V1beta1\Listing + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateListing($updateMask, $listing, array $optionalArgs = []) + { + $request = new UpdateListingRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setListing($listing); + $requestParamHeaders['listing.name'] = $listing->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateListing', Listing::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $response = $analyticsHubServiceClient->getLocation(); + * } finally { + * $analyticsHubServiceClient->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 + * + * @experimental + */ + 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: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $analyticsHubServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $analyticsHubServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $analyticsHubServiceClient->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 + * + * @experimental + */ + 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/BigQueryDataExchange/v1beta1/src/V1beta1/gapic_metadata.json b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/gapic_metadata.json new file mode 100644 index 000000000000..f0e891ccec84 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/gapic_metadata.json @@ -0,0 +1,103 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.dataexchange.v1beta1", + "libraryPackage": "Google\\Cloud\\BigQuery\\DataExchange\\V1beta1", + "services": { + "AnalyticsHubService": { + "clients": { + "grpc": { + "libraryClient": "AnalyticsHubServiceGapicClient", + "rpcs": { + "CreateDataExchange": { + "methods": [ + "createDataExchange" + ] + }, + "CreateListing": { + "methods": [ + "createListing" + ] + }, + "DeleteDataExchange": { + "methods": [ + "deleteDataExchange" + ] + }, + "DeleteListing": { + "methods": [ + "deleteListing" + ] + }, + "GetDataExchange": { + "methods": [ + "getDataExchange" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetListing": { + "methods": [ + "getListing" + ] + }, + "ListDataExchanges": { + "methods": [ + "listDataExchanges" + ] + }, + "ListListings": { + "methods": [ + "listListings" + ] + }, + "ListOrgDataExchanges": { + "methods": [ + "listOrgDataExchanges" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "SubscribeListing": { + "methods": [ + "subscribeListing" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateDataExchange": { + "methods": [ + "updateDataExchange" + ] + }, + "UpdateListing": { + "methods": [ + "updateListing" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_client_config.json b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_client_config.json new file mode 100644 index 000000000000..ef5607e7a3c2 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_client_config.json @@ -0,0 +1,120 @@ +{ + "interfaces": { + "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateDataExchange": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDataExchange": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDataExchange": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDataExchanges": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListListings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListOrgDataExchanges": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SubscribeListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDataExchange": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateListing": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_descriptor_config.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_descriptor_config.php new file mode 100644 index 000000000000..a8f4be36fc80 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_descriptor_config.php @@ -0,0 +1,274 @@ + [ + 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService' => [ + 'CreateDataExchange' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\Listing', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataExchange' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataExchange' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\Listing', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDataExchanges' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataExchanges', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\ListDataExchangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListListings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getListings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\ListListingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrgDataExchanges' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataExchanges', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\ListOrgDataExchangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'organization', + 'fieldAccessors' => [ + 'getOrganization', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'SubscribeListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\SubscribeListingResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateDataExchange' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange', + 'headerParams' => [ + [ + 'keyName' => 'data_exchange.name', + 'fieldAccessors' => [ + 'getDataExchange', + 'getName', + ], + ], + ], + ], + 'UpdateListing' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\Listing', + 'headerParams' => [ + [ + 'keyName' => 'listing.name', + 'fieldAccessors' => [ + 'getListing', + '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' => [ + 'dataExchange' => 'projects/{project}/locations/{location}/dataExchanges/{data_exchange}', + 'dataset' => 'projects/{project}/datasets/{dataset}', + 'listing' => 'projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_rest_client_config.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_rest_client_config.php new file mode 100644 index 000000000000..514c173d9e4f --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_rest_client_config.php @@ -0,0 +1,260 @@ + [ + 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService' => [ + 'CreateDataExchange' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/dataExchanges', + 'body' => 'data_exchange', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_exchange_id', + ], + ], + 'CreateListing' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings', + 'body' => 'listing', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'listing_id', + ], + ], + 'DeleteDataExchange' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteListing' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataExchange' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetListing' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDataExchanges' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/dataExchanges', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListListings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrgDataExchanges' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{organization=organizations/*/locations/*}/dataExchanges', + 'placeholders' => [ + 'organization' => [ + 'getters' => [ + 'getOrganization', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SubscribeListing' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateDataExchange' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta1/{data_exchange.name=projects/*/locations/*/dataExchanges/*}', + 'body' => 'data_exchange', + 'placeholders' => [ + 'data_exchange.name' => [ + 'getters' => [ + 'getDataExchange', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateListing' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta1/{listing.name=projects/*/locations/*/dataExchanges/*/listings/*}', + 'body' => 'listing', + 'placeholders' => [ + 'listing.name' => [ + 'getters' => [ + 'getListing', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php new file mode 100644 index 000000000000..95b5f271dd3e --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php @@ -0,0 +1,1239 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AnalyticsHubServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AnalyticsHubServiceClient($options); + } + + /** @test */ + public function createDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataExchangeId = 'dataExchangeId1402219426'; + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $response = $gapicClient->createDataExchange($formattedParent, $dataExchangeId, $dataExchange); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataExchangeId(); + $this->assertProtobufEquals($dataExchangeId, $actualValue); + $actualValue = $actualRequestObject->getDataExchange(); + $this->assertProtobufEquals($dataExchange, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $dataExchangeId = 'dataExchangeId1402219426'; + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + try { + $gapicClient->createDataExchange($formattedParent, $dataExchangeId, $dataExchange); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $icon = '121'; + $requestAccess = 'requestAccess2059178260'; + $expectedResponse = new Listing(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setIcon($icon); + $expectedResponse->setRequestAccess($requestAccess); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $listingId = 'listingId988969142'; + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $response = $gapicClient->createListing($formattedParent, $listingId, $listing); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateListing', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getListingId(); + $this->assertProtobufEquals($listingId, $actualValue); + $actualValue = $actualRequestObject->getListing(); + $this->assertProtobufEquals($listing, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $listingId = 'listingId988969142'; + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + try { + $gapicClient->createListing($formattedParent, $listingId, $listing); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $gapicClient->deleteDataExchange($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + try { + $gapicClient->deleteDataExchange($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 deleteListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $gapicClient->deleteListing($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteListing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + try { + $gapicClient->deleteListing($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 getDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $response = $gapicClient->getDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + try { + $gapicClient->getDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 getListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $icon = '121'; + $requestAccess = 'requestAccess2059178260'; + $expectedResponse = new Listing(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setIcon($icon); + $expectedResponse->setRequestAccess($requestAccess); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $response = $gapicClient->getListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetListing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + try { + $gapicClient->getListing($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 listDataExchangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataExchangesElement = new DataExchange(); + $dataExchanges = [ + $dataExchangesElement, + ]; + $expectedResponse = new ListDataExchangesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataExchanges($dataExchanges); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listDataExchanges($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListDataExchanges', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataExchangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listDataExchanges($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 listListingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $listingsElement = new Listing(); + $listings = [ + $listingsElement, + ]; + $expectedResponse = new ListListingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setListings($listings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $response = $gapicClient->listListings($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getListings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListListings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listListingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + try { + $gapicClient->listListings($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 listOrgDataExchangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataExchangesElement = new DataExchange(); + $dataExchanges = [ + $dataExchangesElement, + ]; + $expectedResponse = new ListOrgDataExchangesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataExchanges($dataExchanges); + $transport->addResponse($expectedResponse); + // Mock request + $organization = 'organization1178922291'; + $response = $gapicClient->listOrgDataExchanges($organization); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListOrgDataExchanges', $actualFuncCall); + $actualValue = $actualRequestObject->getOrganization(); + $this->assertProtobufEquals($organization, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrgDataExchangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $organization = 'organization1178922291'; + try { + $gapicClient->listOrgDataExchanges($organization); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 subscribeListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SubscribeListingResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $response = $gapicClient->subscribeListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/SubscribeListing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function subscribeListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + try { + $gapicClient->subscribeListing($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 updateDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $response = $gapicClient->updateDataExchange($updateMask, $dataExchange); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getDataExchange(); + $this->assertProtobufEquals($dataExchange, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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(); + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + try { + $gapicClient->updateDataExchange($updateMask, $dataExchange); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $icon = '121'; + $requestAccess = 'requestAccess2059178260'; + $expectedResponse = new Listing(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setIcon($icon); + $expectedResponse->setRequestAccess($requestAccess); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $response = $gapicClient->updateListing($updateMask, $listing); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateListing', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getListing(); + $this->assertProtobufEquals($listing, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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(); + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + try { + $gapicClient->updateListing($updateMask, $listing); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/Client/AnalyticsHubServiceClientTest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/Client/AnalyticsHubServiceClientTest.php new file mode 100644 index 000000000000..3a78232d4dc3 --- /dev/null +++ b/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/Client/AnalyticsHubServiceClientTest.php @@ -0,0 +1,1387 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AnalyticsHubServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AnalyticsHubServiceClient($options); + } + + /** @test */ + public function createDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataExchangeId = 'dataExchangeId1402219426'; + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new CreateDataExchangeRequest()) + ->setParent($formattedParent) + ->setDataExchangeId($dataExchangeId) + ->setDataExchange($dataExchange); + $response = $gapicClient->createDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataExchangeId(); + $this->assertProtobufEquals($dataExchangeId, $actualValue); + $actualValue = $actualRequestObject->getDataExchange(); + $this->assertProtobufEquals($dataExchange, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $dataExchangeId = 'dataExchangeId1402219426'; + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new CreateDataExchangeRequest()) + ->setParent($formattedParent) + ->setDataExchangeId($dataExchangeId) + ->setDataExchange($dataExchange); + try { + $gapicClient->createDataExchange($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $icon = '121'; + $requestAccess = 'requestAccess2059178260'; + $expectedResponse = new Listing(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setIcon($icon); + $expectedResponse->setRequestAccess($requestAccess); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $listingId = 'listingId988969142'; + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $request = (new CreateListingRequest()) + ->setParent($formattedParent) + ->setListingId($listingId) + ->setListing($listing); + $response = $gapicClient->createListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateListing', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getListingId(); + $this->assertProtobufEquals($listingId, $actualValue); + $actualValue = $actualRequestObject->getListing(); + $this->assertProtobufEquals($listing, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $listingId = 'listingId988969142'; + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $request = (new CreateListingRequest()) + ->setParent($formattedParent) + ->setListingId($listingId) + ->setListing($listing); + try { + $gapicClient->createListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new DeleteDataExchangeRequest()) + ->setName($formattedName); + $gapicClient->deleteDataExchange($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new DeleteDataExchangeRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDataExchange($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new DeleteListingRequest()) + ->setName($formattedName); + $gapicClient->deleteListing($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteListing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new DeleteListingRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new GetDataExchangeRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new GetDataExchangeRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataExchange($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 getListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $icon = '121'; + $requestAccess = 'requestAccess2059178260'; + $expectedResponse = new Listing(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setIcon($icon); + $expectedResponse->setRequestAccess($requestAccess); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new GetListingRequest()) + ->setName($formattedName); + $response = $gapicClient->getListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetListing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new GetListingRequest()) + ->setName($formattedName); + try { + $gapicClient->getListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataExchangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataExchangesElement = new DataExchange(); + $dataExchanges = [ + $dataExchangesElement, + ]; + $expectedResponse = new ListDataExchangesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataExchanges($dataExchanges); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDataExchangesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataExchanges($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListDataExchanges', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataExchangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListDataExchangesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataExchanges($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listListingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $listingsElement = new Listing(); + $listings = [ + $listingsElement, + ]; + $expectedResponse = new ListListingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setListings($listings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new ListListingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listListings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getListings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListListings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listListingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); + $request = (new ListListingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listListings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrgDataExchangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataExchangesElement = new DataExchange(); + $dataExchanges = [ + $dataExchangesElement, + ]; + $expectedResponse = new ListOrgDataExchangesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataExchanges($dataExchanges); + $transport->addResponse($expectedResponse); + // Mock request + $organization = 'organization1178922291'; + $request = (new ListOrgDataExchangesRequest()) + ->setOrganization($organization); + $response = $gapicClient->listOrgDataExchanges($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListOrgDataExchanges', $actualFuncCall); + $actualValue = $actualRequestObject->getOrganization(); + $this->assertProtobufEquals($organization, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrgDataExchangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $organization = 'organization1178922291'; + $request = (new ListOrgDataExchangesRequest()) + ->setOrganization($organization); + try { + $gapicClient->listOrgDataExchanges($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 subscribeListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SubscribeListingResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new SubscribeListingRequest()) + ->setName($formattedName); + $response = $gapicClient->subscribeListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/SubscribeListing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function subscribeListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); + $request = (new SubscribeListingRequest()) + ->setName($formattedName); + try { + $gapicClient->subscribeListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 updateDataExchangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new UpdateDataExchangeRequest()) + ->setUpdateMask($updateMask) + ->setDataExchange($dataExchange); + $response = $gapicClient->updateDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getDataExchange(); + $this->assertProtobufEquals($dataExchange, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataExchangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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(); + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new UpdateDataExchangeRequest()) + ->setUpdateMask($updateMask) + ->setDataExchange($dataExchange); + try { + $gapicClient->updateDataExchange($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateListingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $icon = '121'; + $requestAccess = 'requestAccess2059178260'; + $expectedResponse = new Listing(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setIcon($icon); + $expectedResponse->setRequestAccess($requestAccess); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $request = (new UpdateListingRequest()) + ->setUpdateMask($updateMask) + ->setListing($listing); + $response = $gapicClient->updateListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateListing', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getListing(); + $this->assertProtobufEquals($listing, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateListingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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(); + $listing = new Listing(); + $listingDisplayName = 'listingDisplayName293456201'; + $listing->setDisplayName($listingDisplayName); + $listingBigqueryDataset = new BigQueryDatasetSource(); + $listing->setBigqueryDataset($listingBigqueryDataset); + $request = (new UpdateListingRequest()) + ->setUpdateMask($updateMask) + ->setListing($listing); + try { + $gapicClient->updateListing($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 createDataExchangeAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $primaryContact = 'primaryContact203339491'; + $documentation = 'documentation1587405498'; + $listingCount = 1101038700; + $icon = '121'; + $expectedResponse = new DataExchange(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setDocumentation($documentation); + $expectedResponse->setListingCount($listingCount); + $expectedResponse->setIcon($icon); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataExchangeId = 'dataExchangeId1402219426'; + $dataExchange = new DataExchange(); + $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; + $dataExchange->setDisplayName($dataExchangeDisplayName); + $request = (new CreateDataExchangeRequest()) + ->setParent($formattedParent) + ->setDataExchangeId($dataExchangeId) + ->setDataExchange($dataExchange); + $response = $gapicClient->createDataExchangeAsync($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataExchangeId(); + $this->assertProtobufEquals($dataExchangeId, $actualValue); + $actualValue = $actualRequestObject->getDataExchange(); + $this->assertProtobufEquals($dataExchange, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datapolicies/V1/Datapolicy.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datapolicies/V1/Datapolicy.php new file mode 100644 index 0000000000000000000000000000000000000000..5e5cef94109ac6d626004435a3261967337142c8 GIT binary patch literal 5331 zcmcIo-EZ4e6kpn{qqkd^-F0hM5V&U3+NyJCfq~q0#Yx;YTH1yr?PwKbImu0G=Gew| zww0H znoF(|SEVYYRc5V}qSi`D-&!dhu~yoiUqq;)tB%8k-}li0;^1dB%P=SBxT*_}E1IKd zhURLju6+VNE^#$gcL=C=%hsAk#nnuMqY9fwg-p+Io=qxy#WI1DB`(01qcj0UrHtVc z+femVnm83(vs}~8fv70fi5rqjzf8~g(^7Lx{#$NWvSoeU+OAs0f-*C``!a)yN1NinN z`0rzAJY^GTb+l)A8IUK?s~i`n(U7Iu;NnD#i%kzF-}+q|_(u}(T)<99&c5KG09G6U zT4SPR4Btj0RL=KkVgO8yEX?}~&!Agq*+~wu5YrXzy-84tP9|PSOFNMd}BB4Pk@aS0cnHT9wT*>^b@&8c!3Q z9OY-S&72<;)K^gWT{N~z+-|5Z!uHn?qpaq%tiw_lQ1N0?>O2~@)H+cdSiKl&r!Yo{ zeR9pa#F!YQ`HDx;P)*Ze9hx{v-}yr{(T&ToU?m`U4V`TT0{}y?29K3KcpRNG$OBi2 zz@a%m%zu6op%&wK3=p$Et+;C4L%4PV-$54`4w`kEQ4gx-6ieoJgZz7XlVVjvdny?4 zDtax3yOMAa@1l6i=Y7T9w>&mS7vAe*B5#IBr53>szJx}jwjsG$O!x*GZE?UPIrK_e zDoRRjGn+~6D8-$etZZ!*a&juOl9AK#6Br~?o7t`P4J9jY%UPu$r?&E$;*PHp9|X=X zFdOSq;dW+YH5eEWn~x>CztX@-DDIC)#dQ(~{=dV7ZdSZ4L*gL#dzhg9G3V)4?jYjr zVKR(B`qY>2AGSQPSK`&*|=Kmc)=P3nk0m25lXxXGnYMMc+3V8r8jsu$%)-*;J z*82!Zn_(drT9reikZ0%7Y1?eNFq;>cwG;f$F*J6RG`@Xps}n} zC@L$PTX`k5Cgr76QO+0Q!&GS{lRshzL2V;>UCLycwfGsR|53;QS=o`Ly!Y*Fatz_1 zj9P>)e0k2}-^<$qvF~XWg8zu2c;`BZZ}rG}r=s8OCi`FI_}xbm_7>f_NJf43>tA0D zEc0*B-NAu3ycDMCY$QEr+tX5vF1`3~@Ue68?Agao#pm$x?jvbD;@n(hp=FNVUbx8| zjmQXe0eynY?S(jd*zWY7;B@E0+_Tf2iqGM6sRUkAFXp-ze&+Q}{vGCZKc2$o3@nPV zS^OQi*|}lp+09PHz|BiR{)hV=w$104A4zOS!*DOmdTH4QZv0~moo(BH;Kg97XDn@P zS^>^u)LFX=xPKRZ1HwCZ6Fn2&sTer2+#?I!`rbB%mmW#}p52R$?^qu#1H%^k46qy? zBQYOUtV`D(V(|bVj9Nj*7 z8J45>O}W_ax~JluLfHwlZiZ;s0>O4)bf*T0qxWv`$to|>r6!QD%HIxLU1j%eLWfLiXt;AiXhAG1Vu4w kRus4A%R{W;zIiRY-k9_5z9Ls;PrN2$lHPUJAv#3pKSDw%QUCw| literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/CreateDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/CreateDataPolicyRequest.php new file mode 100644 index 000000000000..f587ea304fcb --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/CreateDataPolicyRequest.php @@ -0,0 +1,137 @@ +google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest + */ +class CreateDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the project that the data policy will belong to. + * The format is `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. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_policy = null; + + /** + * @param string $parent Required. Resource name of the project that the data policy will belong to. + * The format is `projects/{project_number}/locations/{location_id}`. Please see + * {@see DataPolicyServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $dataPolicy Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\CreateDataPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $dataPolicy): self + { + return (new self()) + ->setParent($parent) + ->setDataPolicy($dataPolicy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the project that the data policy will belong to. + * The format is `projects/{project_number}/locations/{location_id}`. + * @type \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $data_policy + * Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the project that the data policy will belong to. + * The format is `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. Resource name of the project that the data policy will belong to. + * The format is `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. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy|null + */ + public function getDataPolicy() + { + return $this->data_policy; + } + + public function hasDataPolicy() + { + return isset($this->data_policy); + } + + public function clearDataPolicy() + { + unset($this->data_policy); + } + + /** + * Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $var + * @return $this + */ + public function setDataPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy::class); + $this->data_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy.php new file mode 100644 index 000000000000..67d9e2641f29 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy.php @@ -0,0 +1,114 @@ +google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy + */ +class DataMaskingPolicy extends \Google\Protobuf\Internal\Message +{ + protected $masking_expression; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $predefined_expression + * A predefined masking expression. + * @type string $routine + * The name of the BigQuery routine that contains the custom masking + * routine, in the format of + * `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * A predefined masking expression. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression predefined_expression = 1; + * @return int + */ + public function getPredefinedExpression() + { + return $this->readOneof(1); + } + + public function hasPredefinedExpression() + { + return $this->hasOneof(1); + } + + /** + * A predefined masking expression. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression predefined_expression = 1; + * @param int $var + * @return $this + */ + public function setPredefinedExpression($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy\PredefinedExpression::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The name of the BigQuery routine that contains the custom masking + * routine, in the format of + * `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`. + * + * Generated from protobuf field string routine = 3; + * @return string + */ + public function getRoutine() + { + return $this->readOneof(3); + } + + public function hasRoutine() + { + return $this->hasOneof(3); + } + + /** + * The name of the BigQuery routine that contains the custom masking + * routine, in the format of + * `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`. + * + * Generated from protobuf field string routine = 3; + * @param string $var + * @return $this + */ + public function setRoutine($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getMaskingExpression() + { + return $this->whichOneof("masking_expression"); + } + +} + diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy/PredefinedExpression.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy/PredefinedExpression.php new file mode 100644 index 000000000000..c561f3ab4083 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy/PredefinedExpression.php @@ -0,0 +1,141 @@ +google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression + */ +class PredefinedExpression +{ + /** + * Default, unspecified predefined expression. No masking will take place + * since no expression is specified. + * + * Generated from protobuf enum PREDEFINED_EXPRESSION_UNSPECIFIED = 0; + */ + const PREDEFINED_EXPRESSION_UNSPECIFIED = 0; + /** + * Masking expression to replace data with SHA-256 hash. + * + * Generated from protobuf enum SHA256 = 3; + */ + const SHA256 = 3; + /** + * Masking expression to replace data with NULLs. + * + * Generated from protobuf enum ALWAYS_NULL = 5; + */ + const ALWAYS_NULL = 5; + /** + * Masking expression to replace data with their default masking values. + * The default masking values for each type listed as below: + * * STRING: "" + * * BYTES: b'' + * * INTEGER: 0 + * * FLOAT: 0.0 + * * NUMERIC: 0 + * * BOOLEAN: FALSE + * * TIMESTAMP: 1970-01-01 00:00:00 UTC + * * DATE: 1970-01-01 + * * TIME: 00:00:00 + * * DATETIME: 1970-01-01T00:00:00 + * * GEOGRAPHY: POINT(0 0) + * * BIGNUMERIC: 0 + * * ARRAY: [] + * * STRUCT: NOT_APPLICABLE + * * JSON: NULL + * + * Generated from protobuf enum DEFAULT_MASKING_VALUE = 7; + */ + const DEFAULT_MASKING_VALUE = 7; + /** + * Masking expression shows the last four characters of text. + * The masking behavior is as follows: + * * If text length > 4 characters: Replace text with XXXXX, append last + * four characters of original text. + * * If text length <= 4 characters: Apply SHA-256 hash. + * + * Generated from protobuf enum LAST_FOUR_CHARACTERS = 9; + */ + const LAST_FOUR_CHARACTERS = 9; + /** + * Masking expression shows the first four characters of text. + * The masking behavior is as follows: + * * If text length > 4 characters: Replace text with XXXXX, prepend first + * four characters of original text. + * * If text length <= 4 characters: Apply SHA-256 hash. + * + * Generated from protobuf enum FIRST_FOUR_CHARACTERS = 10; + */ + const FIRST_FOUR_CHARACTERS = 10; + /** + * Masking expression for email addresses. + * The masking behavior is as follows: + * * Syntax-valid email address: Replace username with XXXXX. For example, + * cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com. + * * Syntax-invalid email address: Apply SHA-256 hash. + * For more information, see [Email + * mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options). + * + * Generated from protobuf enum EMAIL_MASK = 12; + */ + const EMAIL_MASK = 12; + /** + * Masking expression to only show the year of `Date`, + * `DateTime` and `TimeStamp`. For example, with the + * year 2076: + * * DATE : 2076-01-01 + * * DATETIME : 2076-01-01T00:00:00 + * * TIMESTAMP : 2076-01-01 00:00:00 UTC + * Truncation occurs according to the UTC time zone. To change this, adjust + * the default time zone using the `time_zone` system variable. + * For more information, see the System + * variables reference. + * + * Generated from protobuf enum DATE_YEAR_MASK = 13; + */ + const DATE_YEAR_MASK = 13; + + private static $valueToName = [ + self::PREDEFINED_EXPRESSION_UNSPECIFIED => 'PREDEFINED_EXPRESSION_UNSPECIFIED', + self::SHA256 => 'SHA256', + self::ALWAYS_NULL => 'ALWAYS_NULL', + self::DEFAULT_MASKING_VALUE => 'DEFAULT_MASKING_VALUE', + self::LAST_FOUR_CHARACTERS => 'LAST_FOUR_CHARACTERS', + self::FIRST_FOUR_CHARACTERS => 'FIRST_FOUR_CHARACTERS', + self::EMAIL_MASK => 'EMAIL_MASK', + self::DATE_YEAR_MASK => 'DATE_YEAR_MASK', + ]; + + 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(PredefinedExpression::class, \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy_PredefinedExpression::class); + diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy.php new file mode 100644 index 000000000000..dd24973d3fd5 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy.php @@ -0,0 +1,234 @@ +google.cloud.bigquery.datapolicies.v1.DataPolicy + */ +class DataPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Type of data policy. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType data_policy_type = 2; + */ + protected $data_policy_type = 0; + /** + * User-assigned (human readable) ID of the data policy that needs to be + * unique within a project. Used as {data_policy_id} in part of the resource + * name. + * + * Generated from protobuf field string data_policy_id = 3; + */ + protected $data_policy_id = ''; + protected $matching_label; + protected $policy; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $policy_tag + * Policy tag resource name, in the format of + * `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. + * @type \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy $data_masking_policy + * The data masking policy that specifies the data masking rule to use. + * @type string $name + * Output only. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * @type int $data_policy_type + * Type of data policy. + * @type string $data_policy_id + * User-assigned (human readable) ID of the data policy that needs to be + * unique within a project. Used as {data_policy_id} in part of the resource + * name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Policy tag resource name, in the format of + * `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. + * + * Generated from protobuf field string policy_tag = 4; + * @return string + */ + public function getPolicyTag() + { + return $this->readOneof(4); + } + + public function hasPolicyTag() + { + return $this->hasOneof(4); + } + + /** + * Policy tag resource name, in the format of + * `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. + * + * Generated from protobuf field string policy_tag = 4; + * @param string $var + * @return $this + */ + public function setPolicyTag($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The data masking policy that specifies the data masking rule to use. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy data_masking_policy = 5; + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy|null + */ + public function getDataMaskingPolicy() + { + return $this->readOneof(5); + } + + public function hasDataMaskingPolicy() + { + return $this->hasOneof(5); + } + + /** + * The data masking policy that specifies the data masking rule to use. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy data_masking_policy = 5; + * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy $var + * @return $this + */ + public function setDataMaskingPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * 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; + } + + /** + * Type of data policy. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType data_policy_type = 2; + * @return int + */ + public function getDataPolicyType() + { + return $this->data_policy_type; + } + + /** + * Type of data policy. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType data_policy_type = 2; + * @param int $var + * @return $this + */ + public function setDataPolicyType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy\DataPolicyType::class); + $this->data_policy_type = $var; + + return $this; + } + + /** + * User-assigned (human readable) ID of the data policy that needs to be + * unique within a project. Used as {data_policy_id} in part of the resource + * name. + * + * Generated from protobuf field string data_policy_id = 3; + * @return string + */ + public function getDataPolicyId() + { + return $this->data_policy_id; + } + + /** + * User-assigned (human readable) ID of the data policy that needs to be + * unique within a project. Used as {data_policy_id} in part of the resource + * name. + * + * Generated from protobuf field string data_policy_id = 3; + * @param string $var + * @return $this + */ + public function setDataPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->data_policy_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getMatchingLabel() + { + return $this->whichOneof("matching_label"); + } + + /** + * @return string + */ + public function getPolicy() + { + return $this->whichOneof("policy"); + } + +} + diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy/DataPolicyType.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy/DataPolicyType.php new file mode 100644 index 000000000000..0f431ea3e887 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy/DataPolicyType.php @@ -0,0 +1,65 @@ +google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType + */ +class DataPolicyType +{ + /** + * Default value for the data policy type. This should not be used. + * + * Generated from protobuf enum DATA_POLICY_TYPE_UNSPECIFIED = 0; + */ + const DATA_POLICY_TYPE_UNSPECIFIED = 0; + /** + * Used to create a data policy for column-level security, without data + * masking. + * + * Generated from protobuf enum COLUMN_LEVEL_SECURITY_POLICY = 3; + */ + const COLUMN_LEVEL_SECURITY_POLICY = 3; + /** + * Used to create a data policy for data masking. + * + * Generated from protobuf enum DATA_MASKING_POLICY = 2; + */ + const DATA_MASKING_POLICY = 2; + + private static $valueToName = [ + self::DATA_POLICY_TYPE_UNSPECIFIED => 'DATA_POLICY_TYPE_UNSPECIFIED', + self::COLUMN_LEVEL_SECURITY_POLICY => 'COLUMN_LEVEL_SECURITY_POLICY', + self::DATA_MASKING_POLICY => 'DATA_MASKING_POLICY', + ]; + + 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(DataPolicyType::class, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy_DataPolicyType::class); + diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DeleteDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DeleteDataPolicyRequest.php new file mode 100644 index 000000000000..753de5ead174 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DeleteDataPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest + */ +class DeleteDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. Please see + * {@see DataPolicyServiceClient::dataPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DeleteDataPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_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. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_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/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/GetDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/GetDataPolicyRequest.php new file mode 100644 index 000000000000..8e6aa8262f60 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/GetDataPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest + */ +class GetDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. Please see + * {@see DataPolicyServiceClient::dataPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\GetDataPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_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. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_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/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesRequest.php new file mode 100644 index 000000000000..ec8bb56c49dc --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesRequest.php @@ -0,0 +1,228 @@ +google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest + */ +class ListDataPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of data policies to return. Must be a value between 1 + * and 1000. + * If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `nextPageToken` value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filters the data policies by policy tags that they + * are associated with. Currently filter only supports + * "policy_tag" based filtering and OR based predicates. Sample + * filter can be "policy_tag: + * projects/1/locations/us/taxonomies/2/policyTags/3". + * You may also use wildcard such as "policy_tag: + * projects/1/locations/us/taxonomies/2*". Please note that OR predicates + * cannot be used with wildcard filters. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. Please see + * {@see DataPolicyServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\ListDataPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * @type int $page_size + * The maximum number of data policies to return. Must be a value between 1 + * and 1000. + * If not set, defaults to 50. + * @type string $page_token + * The `nextPageToken` value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * @type string $filter + * Filters the data policies by policy tags that they + * are associated with. Currently filter only supports + * "policy_tag" based filtering and OR based predicates. Sample + * filter can be "policy_tag: + * projects/1/locations/us/taxonomies/2/policyTags/3". + * You may also use wildcard such as "policy_tag: + * projects/1/locations/us/taxonomies/2*". Please note that OR predicates + * cannot be used with wildcard filters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the project for which to list data policies. + * Format is `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. Resource name of the project for which to list data policies. + * Format is `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; + } + + /** + * The maximum number of data policies to return. Must be a value between 1 + * and 1000. + * If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of data policies to return. Must be a value between 1 + * and 1000. + * If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `nextPageToken` value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `nextPageToken` value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filters the data policies by policy tags that they + * are associated with. Currently filter only supports + * "policy_tag" based filtering and OR based predicates. Sample + * filter can be "policy_tag: + * projects/1/locations/us/taxonomies/2/policyTags/3". + * You may also use wildcard such as "policy_tag: + * projects/1/locations/us/taxonomies/2*". Please note that OR predicates + * cannot be used with wildcard filters. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filters the data policies by policy tags that they + * are associated with. Currently filter only supports + * "policy_tag" based filtering and OR based predicates. Sample + * filter can be "policy_tag: + * projects/1/locations/us/taxonomies/2/policyTags/3". + * You may also use wildcard such as "policy_tag: + * projects/1/locations/us/taxonomies/2*". Please note that OR predicates + * cannot be used with wildcard filters. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesResponse.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesResponse.php new file mode 100644 index 000000000000..e23d7ae0d58e --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesResponse.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.datapolicies.v1.ListDataPoliciesResponse + */ +class ListDataPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Data policies that belong to the requested project. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policies = 1; + */ + private $data_policies; + /** + * Token used to retrieve the next page of results, or empty if there are no + * more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy>|\Google\Protobuf\Internal\RepeatedField $data_policies + * Data policies that belong to the requested project. + * @type string $next_page_token + * Token used to retrieve the next page of results, or empty if there are no + * more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Data policies that belong to the requested project. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataPolicies() + { + return $this->data_policies; + } + + /** + * Data policies that belong to the requested project. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policies = 1; + * @param array<\Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy::class); + $this->data_policies = $arr; + + return $this; + } + + /** + * Token used to retrieve the next page of results, or empty if there are no + * more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token used to retrieve the next page of results, or empty if there are no + * more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/RenameDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/RenameDataPolicyRequest.php new file mode 100644 index 000000000000..cb59f030aab8 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/RenameDataPolicyRequest.php @@ -0,0 +1,121 @@ +google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest + */ +class RenameDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The new data policy id. + * + * Generated from protobuf field string new_data_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $new_data_policy_id = ''; + + /** + * @param string $name Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * @param string $newDataPolicyId Required. The new data policy id. + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\RenameDataPolicyRequest + * + * @experimental + */ + public static function build(string $name, string $newDataPolicyId): self + { + return (new self()) + ->setName($name) + ->setNewDataPolicyId($newDataPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * @type string $new_data_policy_id + * Required. The new data policy id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * + * 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. The new data policy id. + * + * Generated from protobuf field string new_data_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNewDataPolicyId() + { + return $this->new_data_policy_id; + } + + /** + * Required. The new data policy id. + * + * Generated from protobuf field string new_data_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNewDataPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->new_data_policy_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/UpdateDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/UpdateDataPolicyRequest.php new file mode 100644 index 000000000000..3bad7e59018b --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/UpdateDataPolicyRequest.php @@ -0,0 +1,168 @@ +google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest + */ +class UpdateDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Update the data policy's metadata. + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_policy = null; + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $dataPolicy Required. Update the data policy's metadata. + * + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * @param \Google\Protobuf\FieldMask $updateMask The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\UpdateDataPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $dataPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataPolicy($dataPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $data_policy + * Required. Update the data policy's metadata. + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * @type \Google\Protobuf\FieldMask $update_mask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Update the data policy's metadata. + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy|null + */ + public function getDataPolicy() + { + return $this->data_policy; + } + + public function hasDataPolicy() + { + return isset($this->data_policy); + } + + public function clearDataPolicy() + { + unset($this->data_policy); + } + + /** + * Required. Update the data policy's metadata. + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $var + * @return $this + */ + public function setDataPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy::class); + $this->data_policy = $var; + + return $this; + } + + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/create_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/create_data_policy.php new file mode 100644 index 000000000000..8b28f612f640 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/create_data_policy.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setDataPolicy($dataPolicy); + + // Call the API and handle any network failures. + try { + /** @var DataPolicy $response */ + $response = $dataPolicyServiceClient->createDataPolicy($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 = DataPolicyServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_data_policy_sample($formattedParent); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_CreateDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/delete_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/delete_data_policy.php new file mode 100644 index 000000000000..d73d33365f40 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/delete_data_policy.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dataPolicyServiceClient->deleteDataPolicy($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 = DataPolicyServiceClient::dataPolicyName( + '[PROJECT]', + '[LOCATION]', + '[DATA_POLICY]' + ); + + delete_data_policy_sample($formattedName); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_DeleteDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_data_policy.php new file mode 100644 index 000000000000..e2eb490b924f --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_data_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataPolicy $response */ + $response = $dataPolicyServiceClient->getDataPolicy($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 = DataPolicyServiceClient::dataPolicyName( + '[PROJECT]', + '[LOCATION]', + '[DATA_POLICY]' + ); + + get_data_policy_sample($formattedName); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_GetDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_iam_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..bc045d514fd1 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_iam_policy.php @@ -0,0 +1,71 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dataPolicyServiceClient->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 bigquerydatapolicy_v1_generated_DataPolicyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/list_data_policies.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/list_data_policies.php new file mode 100644 index 000000000000..827e2ff72c7d --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/list_data_policies.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataPolicyServiceClient->listDataPolicies($request); + + /** @var DataPolicy $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 = DataPolicyServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_data_policies_sample($formattedParent); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_ListDataPolicies_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/rename_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/rename_data_policy.php new file mode 100644 index 000000000000..efb6587c14d7 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/rename_data_policy.php @@ -0,0 +1,74 @@ +setName($name) + ->setNewDataPolicyId($newDataPolicyId); + + // Call the API and handle any network failures. + try { + /** @var DataPolicy $response */ + $response = $dataPolicyServiceClient->renameDataPolicy($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 +{ + $name = '[NAME]'; + $newDataPolicyId = '[NEW_DATA_POLICY_ID]'; + + rename_data_policy_sample($name, $newDataPolicyId); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_RenameDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/set_iam_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..e680348581ab --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/set_iam_policy.php @@ -0,0 +1,73 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dataPolicyServiceClient->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 bigquerydatapolicy_v1_generated_DataPolicyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/test_iam_permissions.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..8e8f3cdfc0b7 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/test_iam_permissions.php @@ -0,0 +1,78 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $dataPolicyServiceClient->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 bigquerydatapolicy_v1_generated_DataPolicyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/update_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/update_data_policy.php new file mode 100644 index 000000000000..54d136b98c09 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/update_data_policy.php @@ -0,0 +1,60 @@ +setDataPolicy($dataPolicy); + + // Call the API and handle any network failures. + try { + /** @var DataPolicy $response */ + $response = $dataPolicyServiceClient->updateDataPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_UpdateDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/Client/DataPolicyServiceClient.php b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/Client/DataPolicyServiceClient.php new file mode 100644 index 000000000000..c2858168bd70 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/Client/DataPolicyServiceClient.php @@ -0,0 +1,485 @@ + createDataPolicyAsync(CreateDataPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataPolicyAsync(DeleteDataPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataPolicyAsync(GetDataPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataPoliciesAsync(ListDataPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameDataPolicyAsync(RenameDataPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataPolicyAsync(UpdateDataPolicyRequest $request, array $optionalArgs = []) + */ +final class DataPolicyServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.datapolicies.v1.DataPolicyService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigquerydatapolicy.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigquerydatapolicy.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/data_policy_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_policy_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_policy_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_policy_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_policy + * resource. + * + * @param string $project + * @param string $location + * @param string $dataPolicy + * + * @return string The formatted data_policy resource. + */ + public static function dataPolicyName(string $project, string $location, string $dataPolicy): string + { + return self::getPathTemplate('dataPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'data_policy' => $dataPolicy, + ]); + } + + /** + * 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 + * - dataPolicy: projects/{project}/locations/{location}/dataPolicies/{data_policy} + * - 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 'bigquerydatapolicy.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new data policy under a project with the given `dataPolicyId` + * (used as the display name), policy tag, and data policy type. + * + * The async variant is {@see DataPolicyServiceClient::createDataPolicyAsync()} . + * + * @example samples/V1/DataPolicyServiceClient/create_data_policy.php + * + * @param CreateDataPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDataPolicy(CreateDataPolicyRequest $request, array $callOptions = []): DataPolicy + { + return $this->startApiCall('CreateDataPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes the data policy specified by its resource name. + * + * The async variant is {@see DataPolicyServiceClient::deleteDataPolicyAsync()} . + * + * @example samples/V1/DataPolicyServiceClient/delete_data_policy.php + * + * @param DeleteDataPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteDataPolicy(DeleteDataPolicyRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDataPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets the data policy specified by its resource name. + * + * The async variant is {@see DataPolicyServiceClient::getDataPolicyAsync()} . + * + * @example samples/V1/DataPolicyServiceClient/get_data_policy.php + * + * @param GetDataPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataPolicy(GetDataPolicyRequest $request, array $callOptions = []): DataPolicy + { + return $this->startApiCall('GetDataPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets the IAM policy for the specified data policy. + * + * The async variant is {@see DataPolicyServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/DataPolicyServiceClient/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 all of the data policies in the specified parent project. + * + * The async variant is {@see DataPolicyServiceClient::listDataPoliciesAsync()} . + * + * @example samples/V1/DataPolicyServiceClient/list_data_policies.php + * + * @param ListDataPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDataPolicies(ListDataPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataPolicies', $request, $callOptions); + } + + /** + * Renames the id (display name) of the specified data policy. + * + * The async variant is {@see DataPolicyServiceClient::renameDataPolicyAsync()} . + * + * @example samples/V1/DataPolicyServiceClient/rename_data_policy.php + * + * @param RenameDataPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function renameDataPolicy(RenameDataPolicyRequest $request, array $callOptions = []): DataPolicy + { + return $this->startApiCall('RenameDataPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the IAM policy for the specified data policy. + * + * The async variant is {@see DataPolicyServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/DataPolicyServiceClient/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 permission on the specified data policy resource. + * + * The async variant is {@see DataPolicyServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/DataPolicyServiceClient/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(); + } + + /** + * Updates the metadata for an existing data policy. The target data policy + * can be specified by the resource name. + * + * The async variant is {@see DataPolicyServiceClient::updateDataPolicyAsync()} . + * + * @example samples/V1/DataPolicyServiceClient/update_data_policy.php + * + * @param UpdateDataPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDataPolicy(UpdateDataPolicyRequest $request, array $callOptions = []): DataPolicy + { + return $this->startApiCall('UpdateDataPolicy', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..1d84ac5f7a4d --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.datapolicies.v1", + "libraryPackage": "Google\\Cloud\\BigQuery\\DataPolicies\\V1", + "services": { + "DataPolicyService": { + "clients": { + "grpc": { + "libraryClient": "DataPolicyServiceGapicClient", + "rpcs": { + "CreateDataPolicy": { + "methods": [ + "createDataPolicy" + ] + }, + "DeleteDataPolicy": { + "methods": [ + "deleteDataPolicy" + ] + }, + "GetDataPolicy": { + "methods": [ + "getDataPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "ListDataPolicies": { + "methods": [ + "listDataPolicies" + ] + }, + "RenameDataPolicy": { + "methods": [ + "renameDataPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateDataPolicy": { + "methods": [ + "updateDataPolicy" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_client_config.json b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_client_config.json new file mode 100644 index 000000000000..c403ed0aa2f4 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.bigquery.datapolicies.v1.DataPolicyService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDataPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RenameDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_descriptor_config.php b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_descriptor_config.php new file mode 100644 index 000000000000..adc115ae66f4 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_descriptor_config.php @@ -0,0 +1,149 @@ + [ + 'google.cloud.bigquery.datapolicies.v1.DataPolicyService' => [ + 'CreateDataPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'ListDataPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\ListDataPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RenameDataPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + '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', + ], + ], + ], + ], + 'UpdateDataPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy', + 'headerParams' => [ + [ + 'keyName' => 'data_policy.name', + 'fieldAccessors' => [ + 'getDataPolicy', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'dataPolicy' => 'projects/{project}/locations/{location}/dataPolicies/{data_policy}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_rest_client_config.php b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_rest_client_config.php new file mode 100644 index 000000000000..ea0fae9fef3c --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_rest_client_config.php @@ -0,0 +1,135 @@ + [ + 'google.cloud.bigquery.datapolicies.v1.DataPolicyService' => [ + 'CreateDataPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataPolicies', + 'body' => 'data_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'ListDataPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RenameDataPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataPolicies/*}:rename', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateDataPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_policy.name=projects/*/locations/*/dataPolicies/*}', + 'body' => 'data_policy', + 'placeholders' => [ + 'data_policy.name' => [ + 'getters' => [ + 'getDataPolicy', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/tests/Unit/V1/Client/DataPolicyServiceClientTest.php b/owl-bot-staging/BigQueryDataPolicies/v1/tests/Unit/V1/Client/DataPolicyServiceClientTest.php new file mode 100644 index 000000000000..7d6570c772a0 --- /dev/null +++ b/owl-bot-staging/BigQueryDataPolicies/v1/tests/Unit/V1/Client/DataPolicyServiceClientTest.php @@ -0,0 +1,734 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataPolicyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataPolicyServiceClient($options); + } + + /** @test */ + public function createDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $policyTag = 'policyTag1593879309'; + $name = 'name3373707'; + $dataPolicyId = 'dataPolicyId456934643'; + $expectedResponse = new DataPolicy(); + $expectedResponse->setPolicyTag($policyTag); + $expectedResponse->setName($name); + $expectedResponse->setDataPolicyId($dataPolicyId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataPolicy = new DataPolicy(); + $request = (new CreateDataPolicyRequest()) + ->setParent($formattedParent) + ->setDataPolicy($dataPolicy); + $response = $gapicClient->createDataPolicy($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.bigquery.datapolicies.v1.DataPolicyService/CreateDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataPolicy(); + $this->assertProtobufEquals($dataPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $dataPolicy = new DataPolicy(); + $request = (new CreateDataPolicyRequest()) + ->setParent($formattedParent) + ->setDataPolicy($dataPolicy); + try { + $gapicClient->createDataPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + $request = (new DeleteDataPolicyRequest()) + ->setName($formattedName); + $gapicClient->deleteDataPolicy($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/DeleteDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + $request = (new DeleteDataPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDataPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $policyTag = 'policyTag1593879309'; + $name2 = 'name2-1052831874'; + $dataPolicyId = 'dataPolicyId456934643'; + $expectedResponse = new DataPolicy(); + $expectedResponse->setPolicyTag($policyTag); + $expectedResponse->setName($name2); + $expectedResponse->setDataPolicyId($dataPolicyId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + $request = (new GetDataPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataPolicy($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.bigquery.datapolicies.v1.DataPolicyService/GetDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + $request = (new GetDataPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.datapolicies.v1.DataPolicyService/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 listDataPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataPoliciesElement = new DataPolicy(); + $dataPolicies = [ + $dataPoliciesElement, + ]; + $expectedResponse = new ListDataPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataPolicies($dataPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDataPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/ListDataPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListDataPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $policyTag = 'policyTag1593879309'; + $name2 = 'name2-1052831874'; + $dataPolicyId = 'dataPolicyId456934643'; + $expectedResponse = new DataPolicy(); + $expectedResponse->setPolicyTag($policyTag); + $expectedResponse->setName($name2); + $expectedResponse->setDataPolicyId($dataPolicyId); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $newDataPolicyId = 'newDataPolicyId-1742039694'; + $request = (new RenameDataPolicyRequest()) + ->setName($name) + ->setNewDataPolicyId($newDataPolicyId); + $response = $gapicClient->renameDataPolicy($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.bigquery.datapolicies.v1.DataPolicyService/RenameDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getNewDataPolicyId(); + $this->assertProtobufEquals($newDataPolicyId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $newDataPolicyId = 'newDataPolicyId-1742039694'; + $request = (new RenameDataPolicyRequest()) + ->setName($name) + ->setNewDataPolicyId($newDataPolicyId); + try { + $gapicClient->renameDataPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigquery.datapolicies.v1.DataPolicyService/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.bigquery.datapolicies.v1.DataPolicyService/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 updateDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $policyTag = 'policyTag1593879309'; + $name = 'name3373707'; + $dataPolicyId = 'dataPolicyId456934643'; + $expectedResponse = new DataPolicy(); + $expectedResponse->setPolicyTag($policyTag); + $expectedResponse->setName($name); + $expectedResponse->setDataPolicyId($dataPolicyId); + $transport->addResponse($expectedResponse); + // Mock request + $dataPolicy = new DataPolicy(); + $request = (new UpdateDataPolicyRequest()) + ->setDataPolicy($dataPolicy); + $response = $gapicClient->updateDataPolicy($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.bigquery.datapolicies.v1.DataPolicyService/UpdateDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getDataPolicy(); + $this->assertProtobufEquals($dataPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $dataPolicy = new DataPolicy(); + $request = (new UpdateDataPolicyRequest()) + ->setDataPolicy($dataPolicy); + try { + $gapicClient->updateDataPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataPolicyAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $policyTag = 'policyTag1593879309'; + $name = 'name3373707'; + $dataPolicyId = 'dataPolicyId456934643'; + $expectedResponse = new DataPolicy(); + $expectedResponse->setPolicyTag($policyTag); + $expectedResponse->setName($name); + $expectedResponse->setDataPolicyId($dataPolicyId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataPolicy = new DataPolicy(); + $request = (new CreateDataPolicyRequest()) + ->setParent($formattedParent) + ->setDataPolicy($dataPolicy); + $response = $gapicClient->createDataPolicyAsync($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.bigquery.datapolicies.v1.DataPolicyService/CreateDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataPolicy(); + $this->assertProtobufEquals($dataPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Datatransfer.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Datatransfer.php new file mode 100644 index 0000000000000000000000000000000000000000..f585538c53801ac3b04f6b0915c86dd399e469d6 GIT binary patch literal 11719 zcmcIq-)|eo5e}&zmR7MutreM;Qir)Duq7yDL_29pM{!7zk{L*%N>X+su(_Pbm2?ex zcey)SQ4AJEP@sX+qD}kQpg;o@DB8C?^r`O!0`#FR`r-mb3KRvJ|DZvEc6M)XEgWfYBgrT0^q-ARZCVi)mD|d`X1Q165Chm76AplWA~d{)mC*aMg2S&4}iZd0fLrb=G3iK!{|N|snvQ#EYe+=ij4)B&;E0MjQ|7x=VPow^^p z>Z~!9>RIGU%r=|EJ$o!>61!!&liVuEiL#?DWO{Xa6nw3g*Z0e}!C%9Ty ziDsWoW=$paT811dcU9dyn`n`6X9~Q?lf9!-=AIXP8STx?HX$AWu>nM37jg~5J{~}n zfw!qxZx0|_Rw0aRrC|&pd&g7^gP48XgL(Y(ud3X?)3sXLo!5XAuC^VJy5kk}^CEhA zP&UBNIg)Y4BXPkaaW{{|?=H_>94^M2))+e?Q;-o>1rDF9mJ3g`G7wzy`4?w?gDv(C%`gflN^wDqvzOSX3?Zluj@yoCc}s(v7%$KA+RTb#v7{UJd2LQ(23-e zVx23Fe^F%GfpH^LjB3^>jwnBjAmW-xgmd?Svij` zxZWR}$@8~IW>a!&eq9HEXY;Au3> z+>JS5X6WAA5af>Z#4}=H*HI9H0!o%)QK#npk4`(vyo4s zi%kP8Byx=?wYsVi*&q;Oz1?8DXVqAL^$1o)e7>J?eIo$<=`9bsQj`cI#s9SgD|C z<^U$y2a-N?wuid$WHNpB3Fur!M-x*I8B3t+ndL~;YWk5}Q;w}@1ST87PokNIqBWJe zY&JDZ2706sR*OzEq+daofMC={v$F?KWCH9Es8I|t@*8r2 z4vGv(RW#L&($nZ`*>pKA7jtXHT{l7I6tZvAR<#7dGXt zSK-vJLSLkR8A9!}PQe%9!Eu6wZpES7NYK?dDGM(FcHbdY+e+Nyf3;X6;k<^YY!e-> zXyLTa=(-N1N9*6jJ@MxWDkN~fnRQ}!mQaM`1jQB3dZ_B9&(q;A(=VLW9_a@mG`pc% zF8!96U=58z>_R!?q~r{r0-qH!AYwx~0P@k_CL(78BeG`}G(aqIk4WDOp^H5$u?zr; z;B}}5Ivi}lf@p?Y7XBPK!$Ay9Y2;m7b}fjpIiq^%r(ra|YSKh6_;gj*_SFM{2&7mK zA}I#?b(|EnAzfrYC-SPqB{U^Q%D}cT3(G4L$rl4!<<&KPR*9@st9nzjotlf*I^)uRLuh`7B?#|~0u&!ZX!iVS4Y`gc zc+#TfDf6I-_fGSslxHhPf-at{W1&>houR~~#QiB(qHc>swu)K(-TucM?ngwA= z3;2L6_7Oyj?@~FFl~KgzCjmU{1)B{X_d}=9+TX(tvkLfNXWH1^?4mTj@lZbo+<3@C zqx8%ODp?BDWb(R*!c$mTtfoYT1Hy~nL=$FHlNH;hoh#$7$z(p@jP8ALVGxJE(~d&v zMT9!P@I1O$+}V=T<#KLwyWHE5Y^2LM=psVW2O$*g)y}uvUE0Iq#eOFPu3F#(>v9^B zlXKYTJdFym4gKJ>%?=*rUE9>|ZaTS~b~hvV+vq$T09h>SLr3B?Ig`n?Gn%~V=!o4Mv_k;8o(P1_>E_#y=4FAX+-5ZK>Dv#W=s`ZhH0Y7J_LS{w97Q>P`- z#UB0KV4$o+#iAz#YE7=vsae4`CjAMxsKh%q;SS(M?UnW6%|Q|vzJ?I6fN9J0NQhT5 zz4^F(F6iXrWi&>#nj=EnXTKEg6_MUTPx_n0!FUY~KU|DS_lMAB;3U)DWX;xB4V;c< zOsArUBO?l)49#@mW; z+_T|M#dpGn<0aQ#(~|qd$ugsGrUz?=R`995raiJ9UqjKHX6p5Nr^#x^NY8;#822j? zq+4iiMMkZkUuz{6J1 zsGD3)#3li42h@hG-4}4&SGorcA%Xu5{Orvm6ojDs+#@M)=$C%Hwk|%Dt&3;16+TBq z+;m922%n{lE%S2_Dkv-s3RU;Sa3P9)i;-Gh5*7~7L#C(j3fs}P1N2JwxIl|Z;7_|i zp=Un>f#NzCn;Qfa_o0*YF;K9(JNRJ;=leu@pvY(wF`Z@iCSK{ItOq3#C>{m)7hyEj zb$k@Ko$8VkeiYOXd&IdLeF%tkI?3-!H+_k~4VJe>OhH<5AGgue^fGTky2o@U`| z%)*rP;%VF3N;P}WOu)vuJD;VW3GfZ#&*}J~Z5vi9kvKX!;>oc6<(^&*aqa;>4|mDz zecfziJ`AG;_^KZ)Z)T?H5riPpZF;|UJG8s$lqlk+8C(%K(ED68hNX1fH8%EcP=^$u zYwZ0d{M5R literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Transfer.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Transfer.php new file mode 100644 index 0000000000000000000000000000000000000000..385f1d373ad22e6a7f7da82a5d7a30fd29d42e10 GIT binary patch literal 4804 zcmbVQOLH5?5f(s^0vdd2WSJ|Pk=C$fQ7#2AVa0Z>BD?Tdk|>)X0)Uk5plY*N48V=S z-OWBI(=MKJN#&BYE|$tG!b-Jff=SyP<2jBefR|2GmzA_t>*X)Gw%NZC`EdcT~Mr@4Shs zfgAZ2)zqQu4o9?TjoheT?AgOVMbtkn_RY`?ebWgLq1~kP0ud+ac~5Q);HoMPAN>tV!$I1uil$o4W*l7fxEK;&tqT4 z>ud44?^%e<93~d>@4>2mY}%uyPm$de`4W%~c#S${Z$ym&u0%dHC=*dqYHBl+|9c8n z+SU>6MXImdG=>#db4#WHBEe&mor%{=BXBNW!saWYn_q?H^DfAj;MN7klQ-ZNc7h=48Tc#eGUl7G zF~13!gMj*VXW$Y7^OGFS?q2&#DpkqAf=Jx_KeDha8%))82KJELgzKzr38>24kL3(e z;q^Y&F5AJL<2nW-Z$LxC?knv42ufaqMND&VWS$yanVmFCUWa8SYlvdYo#Fk#>{X9$rOcyd>}zylDIMfBt;M4)-0lNQc~`5 z(4=gb0Y#FjpzyHWIVT>zWW@VcN!>*h&|5^7uSZqvV@;x$YaPw9%@m+@9W%z zEAoYfXO4UTOAh@yH2laBdYNQ;yD-lx9#sJ4mrIWm`cLKyYcEt-umU$COgI+d9AeF3 zdh*D#Eb-}(W#%$|o)yw>!X3vA?SXBHe2Nn}bUoWrR+t=V!A+jEhBv9c3c;mZ>BEF( zzEHgP0Nm$z5yT7Az*XMhV8w)Bl1}^pyD20Q`2#4}6#P@3gNDV)6X7kB9d?6*f1D6p zAHxU=#wg?+q^|F~zM^tCBH^%AAwO8F;^t`Ir+zAbmx7Y)t}N}wH&M|^u&)LMyyX^U z@M5w*M#BA(T47N9HhwxAUt)y_u1Ku-kY}WRf!4?s(L{Oqm;kD>1i7iw!d{I@kn(%5 zcA0ZZu=v$+V0=a6io;rPuCyV2G+jur*&dpsh~|G@fShzdD{?L>bz87BE(W|KzqDqv z3O{BZW73r!nQX!$530ea7X`}g%VJC3KX)@oSPQnMt_Q5xUTKV=<4n<6NT&5DVF?#| z+`qbm2wGi}Wn-#g@S-m;svB#vB;LkB=crEnp@RVOcmP^}`_%CVxGkX_e8`?1%yU2`f!Jf)5 z>Dl}Ntjr3ku(7AN+vOeIXzPc1tKRv-IB2w+dbPe?*K4cSNCvLg8{7MfF1Z!lJaNbLvs@E4b5Xl^gACy=8R1XzDY7s97m@s=J7|1le|{ zrI+_O=6YI5y&J%i1mm5V+=cZqTDw#3%)+5nO}$YQR^dzQputU?*L!mQ^`Ghaooc1l`FHyM4j-`;s%*qkz!A&u*tn)p!^S9mR5;xFLCSUGSqvM- zaLF#8#z@gFj$?jGKNOgn#z8d=W%&?D)23lH?QpBNz`M`;55`}jABlm-)O>_hf7`lX OHo_&v1mg_O0Db|}&Luzq literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsRequest.php new file mode 100644 index 000000000000..afd08a0f7a9d --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsRequest.php @@ -0,0 +1,96 @@ +google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + */ +class CheckValidCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The data source in the form: + * `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The data source in the form: + * `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. Please see + * {@see DataTransferServiceClient::dataSourceName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\CheckValidCredsRequest + * + * @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 data source in the form: + * `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The data source in the form: + * `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_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 data source in the form: + * `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsResponse.php new file mode 100644 index 000000000000..ed8cc0aece07 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsResponse.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + */ +class CheckValidCredsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If set to `true`, the credentials exist and are valid. + * + * Generated from protobuf field bool has_valid_creds = 1; + */ + protected $has_valid_creds = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $has_valid_creds + * If set to `true`, the credentials exist and are valid. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * If set to `true`, the credentials exist and are valid. + * + * Generated from protobuf field bool has_valid_creds = 1; + * @return bool + */ + public function getHasValidCreds() + { + return $this->has_valid_creds; + } + + /** + * If set to `true`, the credentials exist and are valid. + * + * Generated from protobuf field bool has_valid_creds = 1; + * @param bool $var + * @return $this + */ + public function setHasValidCreds($var) + { + GPBUtil::checkBool($var); + $this->has_valid_creds = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CreateTransferConfigRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CreateTransferConfigRequest.php new file mode 100644 index 000000000000..ce1cd4587f87 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CreateTransferConfigRequest.php @@ -0,0 +1,403 @@ +google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + */ +class CreateTransferConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The BigQuery project id where the transfer configuration should + * be created. Must be in the format + * projects/{project_id}/locations/{location_id} or projects/{project_id}. If + * specified location and location of the destination bigquery dataset do not + * match - the request will fail. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Data transfer configuration to create. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $transfer_config = null; + /** + * Deprecated: Authorization code was required when + * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + * in any data sources. Use `version_info` instead. + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + * and new credentials are needed, as indicated by `CheckValidCreds`. In order + * to obtain authorization_code, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * create the transfer config. + * + * Generated from protobuf field string authorization_code = 3 [deprecated = true]; + * @deprecated + */ + protected $authorization_code = ''; + /** + * Optional version info. This parameter replaces `authorization_code` which + * is no longer used in any data sources. This is required only if + * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + * are needed, as indicated by `CheckValidCreds`. In order to obtain version + * info, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * create the transfer config. + * + * Generated from protobuf field string version_info = 5; + */ + protected $version_info = ''; + /** + * Optional service account email. If this field is set, the transfer config + * will be created with this service account's credentials. It requires that + * the requesting user calling this API has permissions to act as this service + * account. + * Note that not all data sources support service account credentials when + * creating a transfer config. For the latest list of data sources, read about + * [using service + * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + * + * Generated from protobuf field string service_account_name = 6; + */ + protected $service_account_name = ''; + + /** + * @param string $parent Required. The BigQuery project id where the transfer configuration should + * be created. Must be in the format + * projects/{project_id}/locations/{location_id} or projects/{project_id}. If + * specified location and location of the destination bigquery dataset do not + * match - the request will fail. Please see + * {@see DataTransferServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transferConfig Required. Data transfer configuration to create. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\CreateTransferConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transferConfig): self + { + return (new self()) + ->setParent($parent) + ->setTransferConfig($transferConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The BigQuery project id where the transfer configuration should + * be created. Must be in the format + * projects/{project_id}/locations/{location_id} or projects/{project_id}. If + * specified location and location of the destination bigquery dataset do not + * match - the request will fail. + * @type \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transfer_config + * Required. Data transfer configuration to create. + * @type string $authorization_code + * Deprecated: Authorization code was required when + * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + * in any data sources. Use `version_info` instead. + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + * and new credentials are needed, as indicated by `CheckValidCreds`. In order + * to obtain authorization_code, make a request to the following URL: + *
+     *           https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+     *           
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * create the transfer config. + * @type string $version_info + * Optional version info. This parameter replaces `authorization_code` which + * is no longer used in any data sources. This is required only if + * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + * are needed, as indicated by `CheckValidCreds`. In order to obtain version + * info, make a request to the following URL: + *
+     *           https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+     *           
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * create the transfer config. + * @type string $service_account_name + * Optional service account email. If this field is set, the transfer config + * will be created with this service account's credentials. It requires that + * the requesting user calling this API has permissions to act as this service + * account. + * Note that not all data sources support service account credentials when + * creating a transfer config. For the latest list of data sources, read about + * [using service + * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The BigQuery project id where the transfer configuration should + * be created. Must be in the format + * projects/{project_id}/locations/{location_id} or projects/{project_id}. If + * specified location and location of the destination bigquery dataset do not + * match - the request will fail. + * + * 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 BigQuery project id where the transfer configuration should + * be created. Must be in the format + * projects/{project_id}/locations/{location_id} or projects/{project_id}. If + * specified location and location of the destination bigquery dataset do not + * match - the request will fail. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Data transfer configuration to create. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig|null + */ + public function getTransferConfig() + { + return $this->transfer_config; + } + + public function hasTransferConfig() + { + return isset($this->transfer_config); + } + + public function clearTransferConfig() + { + unset($this->transfer_config); + } + + /** + * Required. Data transfer configuration to create. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $var + * @return $this + */ + public function setTransferConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig::class); + $this->transfer_config = $var; + + return $this; + } + + /** + * Deprecated: Authorization code was required when + * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + * in any data sources. Use `version_info` instead. + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + * and new credentials are needed, as indicated by `CheckValidCreds`. In order + * to obtain authorization_code, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * create the transfer config. + * + * Generated from protobuf field string authorization_code = 3 [deprecated = true]; + * @return string + * @deprecated + */ + public function getAuthorizationCode() + { + @trigger_error('authorization_code is deprecated.', E_USER_DEPRECATED); + return $this->authorization_code; + } + + /** + * Deprecated: Authorization code was required when + * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + * in any data sources. Use `version_info` instead. + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + * and new credentials are needed, as indicated by `CheckValidCreds`. In order + * to obtain authorization_code, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * create the transfer config. + * + * Generated from protobuf field string authorization_code = 3 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setAuthorizationCode($var) + { + @trigger_error('authorization_code is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->authorization_code = $var; + + return $this; + } + + /** + * Optional version info. This parameter replaces `authorization_code` which + * is no longer used in any data sources. This is required only if + * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + * are needed, as indicated by `CheckValidCreds`. In order to obtain version + * info, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * create the transfer config. + * + * Generated from protobuf field string version_info = 5; + * @return string + */ + public function getVersionInfo() + { + return $this->version_info; + } + + /** + * Optional version info. This parameter replaces `authorization_code` which + * is no longer used in any data sources. This is required only if + * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + * are needed, as indicated by `CheckValidCreds`. In order to obtain version + * info, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * create the transfer config. + * + * Generated from protobuf field string version_info = 5; + * @param string $var + * @return $this + */ + public function setVersionInfo($var) + { + GPBUtil::checkString($var, True); + $this->version_info = $var; + + return $this; + } + + /** + * Optional service account email. If this field is set, the transfer config + * will be created with this service account's credentials. It requires that + * the requesting user calling this API has permissions to act as this service + * account. + * Note that not all data sources support service account credentials when + * creating a transfer config. For the latest list of data sources, read about + * [using service + * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + * + * Generated from protobuf field string service_account_name = 6; + * @return string + */ + public function getServiceAccountName() + { + return $this->service_account_name; + } + + /** + * Optional service account email. If this field is set, the transfer config + * will be created with this service account's credentials. It requires that + * the requesting user calling this API has permissions to act as this service + * account. + * Note that not all data sources support service account credentials when + * creating a transfer config. For the latest list of data sources, read about + * [using service + * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + * + * Generated from protobuf field string service_account_name = 6; + * @param string $var + * @return $this + */ + public function setServiceAccountName($var) + { + GPBUtil::checkString($var, True); + $this->service_account_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource.php new file mode 100644 index 000000000000..830c728a8d39 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource.php @@ -0,0 +1,721 @@ +google.cloud.bigquery.datatransfer.v1.DataSource + */ +class DataSource extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Data source resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Data source id. + * + * Generated from protobuf field string data_source_id = 2; + */ + protected $data_source_id = ''; + /** + * User friendly data source name. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * User friendly data source description string. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Data source client id which should be used to receive refresh token. + * + * Generated from protobuf field string client_id = 5; + */ + protected $client_id = ''; + /** + * Api auth scopes for which refresh token needs to be obtained. These are + * scopes needed by a data source to prepare data and ingest them into + * BigQuery, e.g., https://www.googleapis.com/auth/bigquery + * + * Generated from protobuf field repeated string scopes = 6; + */ + private $scopes; + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferType transfer_type = 7 [deprecated = true]; + * @deprecated + */ + protected $transfer_type = 0; + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field bool supports_multiple_transfers = 8 [deprecated = true]; + * @deprecated + */ + protected $supports_multiple_transfers = false; + /** + * The number of seconds to wait for an update from the data source + * before the Data Transfer Service marks the transfer as FAILED. + * + * Generated from protobuf field int32 update_deadline_seconds = 9; + */ + protected $update_deadline_seconds = 0; + /** + * Default data transfer schedule. + * Examples of valid schedules include: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * + * Generated from protobuf field string default_schedule = 10; + */ + protected $default_schedule = ''; + /** + * Specifies whether the data source supports a user defined schedule, or + * operates on the default schedule. + * When set to `true`, user can override default schedule. + * + * Generated from protobuf field bool supports_custom_schedule = 11; + */ + protected $supports_custom_schedule = false; + /** + * Data source parameters. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter parameters = 12; + */ + private $parameters; + /** + * Url for the help document for this data source. + * + * Generated from protobuf field string help_url = 13; + */ + protected $help_url = ''; + /** + * Indicates the type of authorization. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType authorization_type = 14; + */ + protected $authorization_type = 0; + /** + * Specifies whether the data source supports automatic data refresh for the + * past few days, and how it's supported. + * For some data sources, data might not be complete until a few days later, + * so it's useful to refresh data automatically. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType data_refresh_type = 15; + */ + protected $data_refresh_type = 0; + /** + * Default data refresh window on days. + * Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. + * + * Generated from protobuf field int32 default_data_refresh_window_days = 16; + */ + protected $default_data_refresh_window_days = 0; + /** + * Disables backfilling and manual run scheduling + * for the data source. + * + * Generated from protobuf field bool manual_runs_disabled = 17; + */ + protected $manual_runs_disabled = false; + /** + * The minimum interval for scheduler to schedule runs. + * + * Generated from protobuf field .google.protobuf.Duration minimum_schedule_interval = 18; + */ + protected $minimum_schedule_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Data source resource name. + * @type string $data_source_id + * Data source id. + * @type string $display_name + * User friendly data source name. + * @type string $description + * User friendly data source description string. + * @type string $client_id + * Data source client id which should be used to receive refresh token. + * @type array|\Google\Protobuf\Internal\RepeatedField $scopes + * Api auth scopes for which refresh token needs to be obtained. These are + * scopes needed by a data source to prepare data and ingest them into + * BigQuery, e.g., https://www.googleapis.com/auth/bigquery + * @type int $transfer_type + * Deprecated. This field has no effect. + * @type bool $supports_multiple_transfers + * Deprecated. This field has no effect. + * @type int $update_deadline_seconds + * The number of seconds to wait for an update from the data source + * before the Data Transfer Service marks the transfer as FAILED. + * @type string $default_schedule + * Default data transfer schedule. + * Examples of valid schedules include: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * @type bool $supports_custom_schedule + * Specifies whether the data source supports a user defined schedule, or + * operates on the default schedule. + * When set to `true`, user can override default schedule. + * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter>|\Google\Protobuf\Internal\RepeatedField $parameters + * Data source parameters. + * @type string $help_url + * Url for the help document for this data source. + * @type int $authorization_type + * Indicates the type of authorization. + * @type int $data_refresh_type + * Specifies whether the data source supports automatic data refresh for the + * past few days, and how it's supported. + * For some data sources, data might not be complete until a few days later, + * so it's useful to refresh data automatically. + * @type int $default_data_refresh_window_days + * Default data refresh window on days. + * Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. + * @type bool $manual_runs_disabled + * Disables backfilling and manual run scheduling + * for the data source. + * @type \Google\Protobuf\Duration $minimum_schedule_interval + * The minimum interval for scheduler to schedule runs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Data source resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Data source resource name. + * + * 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; + } + + /** + * Data source id. + * + * Generated from protobuf field string data_source_id = 2; + * @return string + */ + public function getDataSourceId() + { + return $this->data_source_id; + } + + /** + * Data source id. + * + * Generated from protobuf field string data_source_id = 2; + * @param string $var + * @return $this + */ + public function setDataSourceId($var) + { + GPBUtil::checkString($var, True); + $this->data_source_id = $var; + + return $this; + } + + /** + * User friendly data source name. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User friendly data source name. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * User friendly data source description string. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User friendly data source description string. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Data source client id which should be used to receive refresh token. + * + * Generated from protobuf field string client_id = 5; + * @return string + */ + public function getClientId() + { + return $this->client_id; + } + + /** + * Data source client id which should be used to receive refresh token. + * + * Generated from protobuf field string client_id = 5; + * @param string $var + * @return $this + */ + public function setClientId($var) + { + GPBUtil::checkString($var, True); + $this->client_id = $var; + + return $this; + } + + /** + * Api auth scopes for which refresh token needs to be obtained. These are + * scopes needed by a data source to prepare data and ingest them into + * BigQuery, e.g., https://www.googleapis.com/auth/bigquery + * + * Generated from protobuf field repeated string scopes = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * Api auth scopes for which refresh token needs to be obtained. These are + * scopes needed by a data source to prepare data and ingest them into + * BigQuery, e.g., https://www.googleapis.com/auth/bigquery + * + * Generated from protobuf field repeated string scopes = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scopes = $arr; + + return $this; + } + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferType transfer_type = 7 [deprecated = true]; + * @return int + * @deprecated + */ + public function getTransferType() + { + @trigger_error('transfer_type is deprecated.', E_USER_DEPRECATED); + return $this->transfer_type; + } + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferType transfer_type = 7 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setTransferType($var) + { + @trigger_error('transfer_type is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferType::class); + $this->transfer_type = $var; + + return $this; + } + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field bool supports_multiple_transfers = 8 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getSupportsMultipleTransfers() + { + @trigger_error('supports_multiple_transfers is deprecated.', E_USER_DEPRECATED); + return $this->supports_multiple_transfers; + } + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field bool supports_multiple_transfers = 8 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setSupportsMultipleTransfers($var) + { + @trigger_error('supports_multiple_transfers is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->supports_multiple_transfers = $var; + + return $this; + } + + /** + * The number of seconds to wait for an update from the data source + * before the Data Transfer Service marks the transfer as FAILED. + * + * Generated from protobuf field int32 update_deadline_seconds = 9; + * @return int + */ + public function getUpdateDeadlineSeconds() + { + return $this->update_deadline_seconds; + } + + /** + * The number of seconds to wait for an update from the data source + * before the Data Transfer Service marks the transfer as FAILED. + * + * Generated from protobuf field int32 update_deadline_seconds = 9; + * @param int $var + * @return $this + */ + public function setUpdateDeadlineSeconds($var) + { + GPBUtil::checkInt32($var); + $this->update_deadline_seconds = $var; + + return $this; + } + + /** + * Default data transfer schedule. + * Examples of valid schedules include: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * + * Generated from protobuf field string default_schedule = 10; + * @return string + */ + public function getDefaultSchedule() + { + return $this->default_schedule; + } + + /** + * Default data transfer schedule. + * Examples of valid schedules include: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * + * Generated from protobuf field string default_schedule = 10; + * @param string $var + * @return $this + */ + public function setDefaultSchedule($var) + { + GPBUtil::checkString($var, True); + $this->default_schedule = $var; + + return $this; + } + + /** + * Specifies whether the data source supports a user defined schedule, or + * operates on the default schedule. + * When set to `true`, user can override default schedule. + * + * Generated from protobuf field bool supports_custom_schedule = 11; + * @return bool + */ + public function getSupportsCustomSchedule() + { + return $this->supports_custom_schedule; + } + + /** + * Specifies whether the data source supports a user defined schedule, or + * operates on the default schedule. + * When set to `true`, user can override default schedule. + * + * Generated from protobuf field bool supports_custom_schedule = 11; + * @param bool $var + * @return $this + */ + public function setSupportsCustomSchedule($var) + { + GPBUtil::checkBool($var); + $this->supports_custom_schedule = $var; + + return $this; + } + + /** + * Data source parameters. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter parameters = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Data source parameters. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter parameters = 12; + * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter::class); + $this->parameters = $arr; + + return $this; + } + + /** + * Url for the help document for this data source. + * + * Generated from protobuf field string help_url = 13; + * @return string + */ + public function getHelpUrl() + { + return $this->help_url; + } + + /** + * Url for the help document for this data source. + * + * Generated from protobuf field string help_url = 13; + * @param string $var + * @return $this + */ + public function setHelpUrl($var) + { + GPBUtil::checkString($var, True); + $this->help_url = $var; + + return $this; + } + + /** + * Indicates the type of authorization. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType authorization_type = 14; + * @return int + */ + public function getAuthorizationType() + { + return $this->authorization_type; + } + + /** + * Indicates the type of authorization. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType authorization_type = 14; + * @param int $var + * @return $this + */ + public function setAuthorizationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource\AuthorizationType::class); + $this->authorization_type = $var; + + return $this; + } + + /** + * Specifies whether the data source supports automatic data refresh for the + * past few days, and how it's supported. + * For some data sources, data might not be complete until a few days later, + * so it's useful to refresh data automatically. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType data_refresh_type = 15; + * @return int + */ + public function getDataRefreshType() + { + return $this->data_refresh_type; + } + + /** + * Specifies whether the data source supports automatic data refresh for the + * past few days, and how it's supported. + * For some data sources, data might not be complete until a few days later, + * so it's useful to refresh data automatically. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType data_refresh_type = 15; + * @param int $var + * @return $this + */ + public function setDataRefreshType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource\DataRefreshType::class); + $this->data_refresh_type = $var; + + return $this; + } + + /** + * Default data refresh window on days. + * Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. + * + * Generated from protobuf field int32 default_data_refresh_window_days = 16; + * @return int + */ + public function getDefaultDataRefreshWindowDays() + { + return $this->default_data_refresh_window_days; + } + + /** + * Default data refresh window on days. + * Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. + * + * Generated from protobuf field int32 default_data_refresh_window_days = 16; + * @param int $var + * @return $this + */ + public function setDefaultDataRefreshWindowDays($var) + { + GPBUtil::checkInt32($var); + $this->default_data_refresh_window_days = $var; + + return $this; + } + + /** + * Disables backfilling and manual run scheduling + * for the data source. + * + * Generated from protobuf field bool manual_runs_disabled = 17; + * @return bool + */ + public function getManualRunsDisabled() + { + return $this->manual_runs_disabled; + } + + /** + * Disables backfilling and manual run scheduling + * for the data source. + * + * Generated from protobuf field bool manual_runs_disabled = 17; + * @param bool $var + * @return $this + */ + public function setManualRunsDisabled($var) + { + GPBUtil::checkBool($var); + $this->manual_runs_disabled = $var; + + return $this; + } + + /** + * The minimum interval for scheduler to schedule runs. + * + * Generated from protobuf field .google.protobuf.Duration minimum_schedule_interval = 18; + * @return \Google\Protobuf\Duration|null + */ + public function getMinimumScheduleInterval() + { + return $this->minimum_schedule_interval; + } + + public function hasMinimumScheduleInterval() + { + return isset($this->minimum_schedule_interval); + } + + public function clearMinimumScheduleInterval() + { + unset($this->minimum_schedule_interval); + } + + /** + * The minimum interval for scheduler to schedule runs. + * + * Generated from protobuf field .google.protobuf.Duration minimum_schedule_interval = 18; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinimumScheduleInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->minimum_schedule_interval = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/AuthorizationType.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/AuthorizationType.php new file mode 100644 index 000000000000..4bef94c57096 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/AuthorizationType.php @@ -0,0 +1,73 @@ +google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType + */ +class AuthorizationType +{ + /** + * Type unspecified. + * + * Generated from protobuf enum AUTHORIZATION_TYPE_UNSPECIFIED = 0; + */ + const AUTHORIZATION_TYPE_UNSPECIFIED = 0; + /** + * Use OAuth 2 authorization codes that can be exchanged + * for a refresh token on the backend. + * + * Generated from protobuf enum AUTHORIZATION_CODE = 1; + */ + const AUTHORIZATION_CODE = 1; + /** + * Return an authorization code for a given Google+ page that can then be + * exchanged for a refresh token on the backend. + * + * Generated from protobuf enum GOOGLE_PLUS_AUTHORIZATION_CODE = 2; + */ + const GOOGLE_PLUS_AUTHORIZATION_CODE = 2; + /** + * Use First Party OAuth. + * + * Generated from protobuf enum FIRST_PARTY_OAUTH = 3; + */ + const FIRST_PARTY_OAUTH = 3; + + private static $valueToName = [ + self::AUTHORIZATION_TYPE_UNSPECIFIED => 'AUTHORIZATION_TYPE_UNSPECIFIED', + self::AUTHORIZATION_CODE => 'AUTHORIZATION_CODE', + self::GOOGLE_PLUS_AUTHORIZATION_CODE => 'GOOGLE_PLUS_AUTHORIZATION_CODE', + self::FIRST_PARTY_OAUTH => 'FIRST_PARTY_OAUTH', + ]; + + 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(AuthorizationType::class, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource_AuthorizationType::class); + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/DataRefreshType.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/DataRefreshType.php new file mode 100644 index 000000000000..2af897748a1f --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/DataRefreshType.php @@ -0,0 +1,68 @@ +google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType + */ +class DataRefreshType +{ + /** + * The data source won't support data auto refresh, which is default value. + * + * Generated from protobuf enum DATA_REFRESH_TYPE_UNSPECIFIED = 0; + */ + const DATA_REFRESH_TYPE_UNSPECIFIED = 0; + /** + * The data source supports data auto refresh, and runs will be scheduled + * for the past few days. Does not allow custom values to be set for each + * transfer config. + * + * Generated from protobuf enum SLIDING_WINDOW = 1; + */ + const SLIDING_WINDOW = 1; + /** + * The data source supports data auto refresh, and runs will be scheduled + * for the past few days. Allows custom values to be set for each transfer + * config. + * + * Generated from protobuf enum CUSTOM_SLIDING_WINDOW = 2; + */ + const CUSTOM_SLIDING_WINDOW = 2; + + private static $valueToName = [ + self::DATA_REFRESH_TYPE_UNSPECIFIED => 'DATA_REFRESH_TYPE_UNSPECIFIED', + self::SLIDING_WINDOW => 'SLIDING_WINDOW', + self::CUSTOM_SLIDING_WINDOW => 'CUSTOM_SLIDING_WINDOW', + ]; + + 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(DataRefreshType::class, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource_DataRefreshType::class); + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter.php new file mode 100644 index 000000000000..e58593a0ab3d --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter.php @@ -0,0 +1,659 @@ +google.cloud.bigquery.datatransfer.v1.DataSourceParameter + */ +class DataSourceParameter extends \Google\Protobuf\Internal\Message +{ + /** + * Parameter identifier. + * + * Generated from protobuf field string param_id = 1; + */ + protected $param_id = ''; + /** + * Parameter display name in the user interface. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Parameter description. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Parameter type. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type type = 4; + */ + protected $type = 0; + /** + * Is parameter required. + * + * Generated from protobuf field bool required = 5; + */ + protected $required = false; + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field bool repeated = 6; + */ + protected $repeated = false; + /** + * Regular expression which can be used for parameter validation. + * + * Generated from protobuf field string validation_regex = 7; + */ + protected $validation_regex = ''; + /** + * All possible values for the parameter. + * + * Generated from protobuf field repeated string allowed_values = 8; + */ + private $allowed_values; + /** + * For integer and double values specifies minimum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; + */ + protected $min_value = null; + /** + * For integer and double values specifies maximum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; + */ + protected $max_value = null; + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter fields = 11; + */ + private $fields; + /** + * Description of the requirements for this field, in case the user input does + * not fulfill the regex pattern or min/max values. + * + * Generated from protobuf field string validation_description = 12; + */ + protected $validation_description = ''; + /** + * URL to a help document to further explain the naming requirements. + * + * Generated from protobuf field string validation_help_url = 13; + */ + protected $validation_help_url = ''; + /** + * Cannot be changed after initial creation. + * + * Generated from protobuf field bool immutable = 14; + */ + protected $immutable = false; + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field bool recurse = 15; + */ + protected $recurse = false; + /** + * If true, it should not be used in new transfers, and it should not be + * visible to users. + * + * Generated from protobuf field bool deprecated = 20; + */ + protected $deprecated = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $param_id + * Parameter identifier. + * @type string $display_name + * Parameter display name in the user interface. + * @type string $description + * Parameter description. + * @type int $type + * Parameter type. + * @type bool $required + * Is parameter required. + * @type bool $repeated + * Deprecated. This field has no effect. + * @type string $validation_regex + * Regular expression which can be used for parameter validation. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_values + * All possible values for the parameter. + * @type \Google\Protobuf\DoubleValue $min_value + * For integer and double values specifies minimum allowed value. + * @type \Google\Protobuf\DoubleValue $max_value + * For integer and double values specifies maximum allowed value. + * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter>|\Google\Protobuf\Internal\RepeatedField $fields + * Deprecated. This field has no effect. + * @type string $validation_description + * Description of the requirements for this field, in case the user input does + * not fulfill the regex pattern or min/max values. + * @type string $validation_help_url + * URL to a help document to further explain the naming requirements. + * @type bool $immutable + * Cannot be changed after initial creation. + * @type bool $recurse + * Deprecated. This field has no effect. + * @type bool $deprecated + * If true, it should not be used in new transfers, and it should not be + * visible to users. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Parameter identifier. + * + * Generated from protobuf field string param_id = 1; + * @return string + */ + public function getParamId() + { + return $this->param_id; + } + + /** + * Parameter identifier. + * + * Generated from protobuf field string param_id = 1; + * @param string $var + * @return $this + */ + public function setParamId($var) + { + GPBUtil::checkString($var, True); + $this->param_id = $var; + + return $this; + } + + /** + * Parameter display name in the user interface. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Parameter display name in the user interface. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Parameter description. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Parameter description. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Parameter type. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type type = 4; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Parameter type. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type type = 4; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Is parameter required. + * + * Generated from protobuf field bool required = 5; + * @return bool + */ + public function getRequired() + { + return $this->required; + } + + /** + * Is parameter required. + * + * Generated from protobuf field bool required = 5; + * @param bool $var + * @return $this + */ + public function setRequired($var) + { + GPBUtil::checkBool($var); + $this->required = $var; + + return $this; + } + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field bool repeated = 6; + * @return bool + */ + public function getRepeated() + { + return $this->repeated; + } + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field bool repeated = 6; + * @param bool $var + * @return $this + */ + public function setRepeated($var) + { + GPBUtil::checkBool($var); + $this->repeated = $var; + + return $this; + } + + /** + * Regular expression which can be used for parameter validation. + * + * Generated from protobuf field string validation_regex = 7; + * @return string + */ + public function getValidationRegex() + { + return $this->validation_regex; + } + + /** + * Regular expression which can be used for parameter validation. + * + * Generated from protobuf field string validation_regex = 7; + * @param string $var + * @return $this + */ + public function setValidationRegex($var) + { + GPBUtil::checkString($var, True); + $this->validation_regex = $var; + + return $this; + } + + /** + * All possible values for the parameter. + * + * Generated from protobuf field repeated string allowed_values = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedValues() + { + return $this->allowed_values; + } + + /** + * All possible values for the parameter. + * + * Generated from protobuf field repeated string allowed_values = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_values = $arr; + + return $this; + } + + /** + * For integer and double values specifies minimum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getMinValue() + { + return $this->min_value; + } + + public function hasMinValue() + { + return isset($this->min_value); + } + + public function clearMinValue() + { + unset($this->min_value); + } + + /** + * Returns the unboxed value from getMinValue() + + * For integer and double values specifies minimum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; + * @return float|null + */ + public function getMinValueUnwrapped() + { + return $this->readWrapperValue("min_value"); + } + + /** + * For integer and double values specifies minimum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setMinValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->min_value = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * For integer and double values specifies minimum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; + * @param float|null $var + * @return $this + */ + public function setMinValueUnwrapped($var) + { + $this->writeWrapperValue("min_value", $var); + return $this;} + + /** + * For integer and double values specifies maximum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getMaxValue() + { + return $this->max_value; + } + + public function hasMaxValue() + { + return isset($this->max_value); + } + + public function clearMaxValue() + { + unset($this->max_value); + } + + /** + * Returns the unboxed value from getMaxValue() + + * For integer and double values specifies maximum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; + * @return float|null + */ + public function getMaxValueUnwrapped() + { + return $this->readWrapperValue("max_value"); + } + + /** + * For integer and double values specifies maximum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setMaxValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->max_value = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * For integer and double values specifies maximum allowed value. + * + * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; + * @param float|null $var + * @return $this + */ + public function setMaxValueUnwrapped($var) + { + $this->writeWrapperValue("max_value", $var); + return $this;} + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter fields = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter fields = 11; + * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter::class); + $this->fields = $arr; + + return $this; + } + + /** + * Description of the requirements for this field, in case the user input does + * not fulfill the regex pattern or min/max values. + * + * Generated from protobuf field string validation_description = 12; + * @return string + */ + public function getValidationDescription() + { + return $this->validation_description; + } + + /** + * Description of the requirements for this field, in case the user input does + * not fulfill the regex pattern or min/max values. + * + * Generated from protobuf field string validation_description = 12; + * @param string $var + * @return $this + */ + public function setValidationDescription($var) + { + GPBUtil::checkString($var, True); + $this->validation_description = $var; + + return $this; + } + + /** + * URL to a help document to further explain the naming requirements. + * + * Generated from protobuf field string validation_help_url = 13; + * @return string + */ + public function getValidationHelpUrl() + { + return $this->validation_help_url; + } + + /** + * URL to a help document to further explain the naming requirements. + * + * Generated from protobuf field string validation_help_url = 13; + * @param string $var + * @return $this + */ + public function setValidationHelpUrl($var) + { + GPBUtil::checkString($var, True); + $this->validation_help_url = $var; + + return $this; + } + + /** + * Cannot be changed after initial creation. + * + * Generated from protobuf field bool immutable = 14; + * @return bool + */ + public function getImmutable() + { + return $this->immutable; + } + + /** + * Cannot be changed after initial creation. + * + * Generated from protobuf field bool immutable = 14; + * @param bool $var + * @return $this + */ + public function setImmutable($var) + { + GPBUtil::checkBool($var); + $this->immutable = $var; + + return $this; + } + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field bool recurse = 15; + * @return bool + */ + public function getRecurse() + { + return $this->recurse; + } + + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf field bool recurse = 15; + * @param bool $var + * @return $this + */ + public function setRecurse($var) + { + GPBUtil::checkBool($var); + $this->recurse = $var; + + return $this; + } + + /** + * If true, it should not be used in new transfers, and it should not be + * visible to users. + * + * Generated from protobuf field bool deprecated = 20; + * @return bool + */ + public function getDeprecated() + { + return $this->deprecated; + } + + /** + * If true, it should not be used in new transfers, and it should not be + * visible to users. + * + * Generated from protobuf field bool deprecated = 20; + * @param bool $var + * @return $this + */ + public function setDeprecated($var) + { + GPBUtil::checkBool($var); + $this->deprecated = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter/Type.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter/Type.php new file mode 100644 index 000000000000..8804827735b1 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter/Type.php @@ -0,0 +1,104 @@ +google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type + */ +class Type +{ + /** + * Type unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * String parameter. + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * Integer parameter (64-bits). + * Will be serialized to json as string. + * + * Generated from protobuf enum INTEGER = 2; + */ + const INTEGER = 2; + /** + * Double precision floating point parameter. + * + * Generated from protobuf enum DOUBLE = 3; + */ + const DOUBLE = 3; + /** + * Boolean parameter. + * + * Generated from protobuf enum BOOLEAN = 4; + */ + const BOOLEAN = 4; + /** + * Deprecated. This field has no effect. + * + * Generated from protobuf enum RECORD = 5; + */ + const RECORD = 5; + /** + * Page ID for a Google+ Page. + * + * Generated from protobuf enum PLUS_PAGE = 6; + */ + const PLUS_PAGE = 6; + /** + * List of strings parameter. + * + * Generated from protobuf enum LIST = 7; + */ + const PBLIST = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::INTEGER => 'INTEGER', + self::DOUBLE => 'DOUBLE', + self::BOOLEAN => 'BOOLEAN', + self::RECORD => 'RECORD', + self::PLUS_PAGE => 'PLUS_PAGE', + self::PBLIST => 'LIST', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter_Type::class); + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferConfigRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferConfigRequest.php new file mode 100644 index 000000000000..d2ac100033aa --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferConfigRequest.php @@ -0,0 +1,92 @@ +google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + */ +class DeleteTransferConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + * Please see {@see DataTransferServiceClient::transferConfigName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\DeleteTransferConfigRequest + * + * @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 field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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 field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferRunRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferRunRequest.php new file mode 100644 index 000000000000..41fde560161f --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferRunRequest.php @@ -0,0 +1,96 @@ +google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + */ +class DeleteTransferRunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + * Please see {@see DataTransferServiceClient::runName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\DeleteTransferRunRequest + * + * @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 field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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 field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EmailPreferences.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EmailPreferences.php new file mode 100644 index 000000000000..4c1edcba0238 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EmailPreferences.php @@ -0,0 +1,68 @@ +google.cloud.bigquery.datatransfer.v1.EmailPreferences + */ +class EmailPreferences extends \Google\Protobuf\Internal\Message +{ + /** + * If true, email notifications will be sent on transfer run failures. + * + * Generated from protobuf field bool enable_failure_email = 1; + */ + protected $enable_failure_email = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_failure_email + * If true, email notifications will be sent on transfer run failures. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * If true, email notifications will be sent on transfer run failures. + * + * Generated from protobuf field bool enable_failure_email = 1; + * @return bool + */ + public function getEnableFailureEmail() + { + return $this->enable_failure_email; + } + + /** + * If true, email notifications will be sent on transfer run failures. + * + * Generated from protobuf field bool enable_failure_email = 1; + * @param bool $var + * @return $this + */ + public function setEnableFailureEmail($var) + { + GPBUtil::checkBool($var); + $this->enable_failure_email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EncryptionConfiguration.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EncryptionConfiguration.php new file mode 100644 index 000000000000..2aa88ac83724 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EncryptionConfiguration.php @@ -0,0 +1,104 @@ +google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration + */ +class EncryptionConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the KMS key used for encrypting BigQuery data. + * + * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; + */ + protected $kms_key_name = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\StringValue $kms_key_name + * The name of the KMS key used for encrypting BigQuery data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * The name of the KMS key used for encrypting BigQuery data. + * + * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; + * @return \Google\Protobuf\StringValue|null + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + public function hasKmsKeyName() + { + return isset($this->kms_key_name); + } + + public function clearKmsKeyName() + { + unset($this->kms_key_name); + } + + /** + * Returns the unboxed value from getKmsKeyName() + + * The name of the KMS key used for encrypting BigQuery data. + * + * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; + * @return string|null + */ + public function getKmsKeyNameUnwrapped() + { + return $this->readWrapperValue("kms_key_name"); + } + + /** + * The name of the KMS key used for encrypting BigQuery data. + * + * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->kms_key_name = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * The name of the KMS key used for encrypting BigQuery data. + * + * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; + * @param string|null $var + * @return $this + */ + public function setKmsKeyNameUnwrapped($var) + { + $this->writeWrapperValue("kms_key_name", $var); + return $this;} + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EnrollDataSourcesRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EnrollDataSourcesRequest.php new file mode 100644 index 000000000000..851958ec1cb3 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EnrollDataSourcesRequest.php @@ -0,0 +1,110 @@ +google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest + */ +class EnrollDataSourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project resource in the form: + * `projects/{project_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Data sources that are enrolled. It is required to provide at least one + * data source id. + * + * Generated from protobuf field repeated string data_source_ids = 2; + */ + private $data_source_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the project resource in the form: + * `projects/{project_id}` + * @type array|\Google\Protobuf\Internal\RepeatedField $data_source_ids + * Data sources that are enrolled. It is required to provide at least one + * data source id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project resource in the form: + * `projects/{project_id}` + * + * 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 project resource in the form: + * `projects/{project_id}` + * + * 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; + } + + /** + * Data sources that are enrolled. It is required to provide at least one + * data source id. + * + * Generated from protobuf field repeated string data_source_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataSourceIds() + { + return $this->data_source_ids; + } + + /** + * Data sources that are enrolled. It is required to provide at least one + * data source id. + * + * Generated from protobuf field repeated string data_source_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataSourceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_source_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EventDrivenSchedule.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EventDrivenSchedule.php new file mode 100644 index 000000000000..31a5153fcb4d --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EventDrivenSchedule.php @@ -0,0 +1,75 @@ +google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule + */ +class EventDrivenSchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Pub/Sub subscription name used to receive events. + * Only Google Cloud Storage data source support this option. + * Format: projects/{project}/subscriptions/{subscription} + * + * Generated from protobuf field string pubsub_subscription = 1; + */ + protected $pubsub_subscription = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pubsub_subscription + * Pub/Sub subscription name used to receive events. + * Only Google Cloud Storage data source support this option. + * Format: projects/{project}/subscriptions/{subscription} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Pub/Sub subscription name used to receive events. + * Only Google Cloud Storage data source support this option. + * Format: projects/{project}/subscriptions/{subscription} + * + * Generated from protobuf field string pubsub_subscription = 1; + * @return string + */ + public function getPubsubSubscription() + { + return $this->pubsub_subscription; + } + + /** + * Pub/Sub subscription name used to receive events. + * Only Google Cloud Storage data source support this option. + * Format: projects/{project}/subscriptions/{subscription} + * + * Generated from protobuf field string pubsub_subscription = 1; + * @param string $var + * @return $this + */ + public function setPubsubSubscription($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_subscription = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetDataSourceRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetDataSourceRequest.php new file mode 100644 index 000000000000..4a1ca8890805 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetDataSourceRequest.php @@ -0,0 +1,91 @@ +google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + */ +class GetDataSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + * Please see {@see DataTransferServiceClient::dataSourceName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\GetDataSourceRequest + * + * @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 field will contain name of the resource requested, for + * example: `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_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 field will contain name of the resource requested, for + * example: `projects/{project_id}/dataSources/{data_source_id}` or + * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferConfigRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferConfigRequest.php new file mode 100644 index 000000000000..3b5e8a4ce8d1 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferConfigRequest.php @@ -0,0 +1,91 @@ +google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + */ +class GetTransferConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + * Please see {@see DataTransferServiceClient::transferConfigName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\GetTransferConfigRequest + * + * @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 field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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 field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferRunRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferRunRequest.php new file mode 100644 index 000000000000..a86266124d87 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferRunRequest.php @@ -0,0 +1,96 @@ +google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + */ +class GetTransferRunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + * Please see {@see DataTransferServiceClient::runName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\GetTransferRunRequest + * + * @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 field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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 field will contain name of the resource requested, for + * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesRequest.php new file mode 100644 index 000000000000..2523d66f0527 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesRequest.php @@ -0,0 +1,175 @@ +google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + */ +class ListDataSourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The BigQuery project id for which data sources should be + * returned. Must be in the form: `projects/{project_id}` or + * `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Pagination token, which can be used to request a specific page + * of `ListDataSourcesRequest` list results. For multiple-page + * results, `ListDataSourcesResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. The BigQuery project id for which data sources should be + * returned. Must be in the form: `projects/{project_id}` or + * `projects/{project_id}/locations/{location_id}` + * Please see {@see DataTransferServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\ListDataSourcesRequest + * + * @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 BigQuery project id for which data sources should be + * returned. Must be in the form: `projects/{project_id}` or + * `projects/{project_id}/locations/{location_id}` + * @type string $page_token + * Pagination token, which can be used to request a specific page + * of `ListDataSourcesRequest` list results. For multiple-page + * results, `ListDataSourcesResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * @type int $page_size + * Page size. The default page size is the maximum value of 1000 results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The BigQuery project id for which data sources should be + * returned. Must be in the form: `projects/{project_id}` or + * `projects/{project_id}/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 BigQuery project id for which data sources should be + * returned. Must be in the form: `projects/{project_id}` or + * `projects/{project_id}/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; + } + + /** + * Pagination token, which can be used to request a specific page + * of `ListDataSourcesRequest` list results. For multiple-page + * results, `ListDataSourcesResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Pagination token, which can be used to request a specific page + * of `ListDataSourcesRequest` list results. For multiple-page + * results, `ListDataSourcesResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesResponse.php new file mode 100644 index 000000000000..9ca585c15ea9 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesResponse.php @@ -0,0 +1,113 @@ +google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + */ +class ListDataSourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of supported data sources and their transfer settings. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSource data_sources = 1; + */ + private $data_sources; + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListDataSourcesRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSource>|\Google\Protobuf\Internal\RepeatedField $data_sources + * List of supported data sources and their transfer settings. + * @type string $next_page_token + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListDataSourcesRequest.page_token` + * to request the next page of list results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * List of supported data sources and their transfer settings. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSource data_sources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataSources() + { + return $this->data_sources; + } + + /** + * List of supported data sources and their transfer settings. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSource data_sources = 1; + * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource::class); + $this->data_sources = $arr; + + return $this; + } + + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListDataSourcesRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListDataSourcesRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsRequest.php new file mode 100644 index 000000000000..7f7b9bc17914 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsRequest.php @@ -0,0 +1,209 @@ +google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + */ +class ListTransferConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The BigQuery project id for which transfer configs + * should be returned: `projects/{project_id}` or + * `projects/{project_id}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * When specified, only configurations of requested data sources are returned. + * + * Generated from protobuf field repeated string data_source_ids = 2; + */ + private $data_source_ids; + /** + * Pagination token, which can be used to request a specific page + * of `ListTransfersRequest` list results. For multiple-page + * results, `ListTransfersResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. The BigQuery project id for which transfer configs + * should be returned: `projects/{project_id}` or + * `projects/{project_id}/locations/{location_id}` + * Please see {@see DataTransferServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferConfigsRequest + * + * @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 BigQuery project id for which transfer configs + * should be returned: `projects/{project_id}` or + * `projects/{project_id}/locations/{location_id}` + * @type array|\Google\Protobuf\Internal\RepeatedField $data_source_ids + * When specified, only configurations of requested data sources are returned. + * @type string $page_token + * Pagination token, which can be used to request a specific page + * of `ListTransfersRequest` list results. For multiple-page + * results, `ListTransfersResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * @type int $page_size + * Page size. The default page size is the maximum value of 1000 results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The BigQuery project id for which transfer configs + * should be returned: `projects/{project_id}` or + * `projects/{project_id}/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 BigQuery project id for which transfer configs + * should be returned: `projects/{project_id}` or + * `projects/{project_id}/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; + } + + /** + * When specified, only configurations of requested data sources are returned. + * + * Generated from protobuf field repeated string data_source_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataSourceIds() + { + return $this->data_source_ids; + } + + /** + * When specified, only configurations of requested data sources are returned. + * + * Generated from protobuf field repeated string data_source_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataSourceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_source_ids = $arr; + + return $this; + } + + /** + * Pagination token, which can be used to request a specific page + * of `ListTransfersRequest` list results. For multiple-page + * results, `ListTransfersResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Pagination token, which can be used to request a specific page + * of `ListTransfersRequest` list results. For multiple-page + * results, `ListTransfersResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsResponse.php new file mode 100644 index 000000000000..f22f3fea2555 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsResponse.php @@ -0,0 +1,113 @@ +google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + */ +class ListTransferConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The stored pipeline transfer configurations. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_configs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $transfer_configs; + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferConfigsRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig>|\Google\Protobuf\Internal\RepeatedField $transfer_configs + * Output only. The stored pipeline transfer configurations. + * @type string $next_page_token + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferConfigsRequest.page_token` + * to request the next page of list results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The stored pipeline transfer configurations. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_configs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransferConfigs() + { + return $this->transfer_configs; + } + + /** + * Output only. The stored pipeline transfer configurations. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_configs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransferConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig::class); + $this->transfer_configs = $arr; + + return $this; + } + + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferConfigsRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferConfigsRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsRequest.php new file mode 100644 index 000000000000..e9afd5bb4fdd --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsRequest.php @@ -0,0 +1,213 @@ +google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + */ +class ListTransferLogsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Transfer run name in the form: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferLogsRequest` list results. For multiple-page + * results, `ListTransferLogsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 5; + */ + protected $page_size = 0; + /** + * Message types to return. If not populated - INFO, WARNING and ERROR + * messages are returned. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity message_types = 6; + */ + private $message_types; + + /** + * @param string $parent Required. Transfer run name in the form: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + * Please see {@see DataTransferServiceClient::runName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferLogsRequest + * + * @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. Transfer run name in the form: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + * @type string $page_token + * Pagination token, which can be used to request a specific page + * of `ListTransferLogsRequest` list results. For multiple-page + * results, `ListTransferLogsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * @type int $page_size + * Page size. The default page size is the maximum value of 1000 results. + * @type array|\Google\Protobuf\Internal\RepeatedField $message_types + * Message types to return. If not populated - INFO, WARNING and ERROR + * messages are returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. Transfer run name in the form: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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. Transfer run name in the form: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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; + } + + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferLogsRequest` list results. For multiple-page + * results, `ListTransferLogsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferLogsRequest` list results. For multiple-page + * results, `ListTransferLogsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 5; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 5; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Message types to return. If not populated - INFO, WARNING and ERROR + * messages are returned. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity message_types = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessageTypes() + { + return $this->message_types; + } + + /** + * Message types to return. If not populated - INFO, WARNING and ERROR + * messages are returned. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity message_types = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessageTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage\MessageSeverity::class); + $this->message_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsResponse.php new file mode 100644 index 000000000000..4e34aaac630f --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsResponse.php @@ -0,0 +1,113 @@ +google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + */ +class ListTransferLogsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The stored pipeline transfer messages. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $transfer_messages; + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `GetTransferRunLogRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage>|\Google\Protobuf\Internal\RepeatedField $transfer_messages + * Output only. The stored pipeline transfer messages. + * @type string $next_page_token + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `GetTransferRunLogRequest.page_token` + * to request the next page of list results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The stored pipeline transfer messages. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransferMessages() + { + return $this->transfer_messages; + } + + /** + * Output only. The stored pipeline transfer messages. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransferMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage::class); + $this->transfer_messages = $arr; + + return $this; + } + + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `GetTransferRunLogRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `GetTransferRunLogRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest.php new file mode 100644 index 000000000000..e167275131bf --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest.php @@ -0,0 +1,248 @@ +google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + */ +class ListTransferRunsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of transfer configuration for which transfer runs should be + * retrieved. Format of transfer configuration resource name is: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * When specified, only transfer runs with requested states are returned. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferState states = 2; + */ + private $states; + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferRunsRequest` list results. For multiple-page + * results, `ListTransferRunsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * Indicates how run attempts are to be pulled. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt run_attempt = 5; + */ + protected $run_attempt = 0; + + /** + * @param string $parent Required. Name of transfer configuration for which transfer runs should be + * retrieved. Format of transfer configuration resource name is: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. Please see + * {@see DataTransferServiceClient::transferConfigName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsRequest + * + * @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. Name of transfer configuration for which transfer runs should be + * retrieved. Format of transfer configuration resource name is: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + * @type array|\Google\Protobuf\Internal\RepeatedField $states + * When specified, only transfer runs with requested states are returned. + * @type string $page_token + * Pagination token, which can be used to request a specific page + * of `ListTransferRunsRequest` list results. For multiple-page + * results, `ListTransferRunsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * @type int $page_size + * Page size. The default page size is the maximum value of 1000 results. + * @type int $run_attempt + * Indicates how run attempts are to be pulled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of transfer configuration for which transfer runs should be + * retrieved. Format of transfer configuration resource name is: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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. Name of transfer configuration for which transfer runs should be + * retrieved. Format of transfer configuration resource name is: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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; + } + + /** + * When specified, only transfer runs with requested states are returned. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferState states = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStates() + { + return $this->states; + } + + /** + * When specified, only transfer runs with requested states are returned. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferState states = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class); + $this->states = $arr; + + return $this; + } + + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferRunsRequest` list results. For multiple-page + * results, `ListTransferRunsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferRunsRequest` list results. For multiple-page + * results, `ListTransferRunsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Page size. The default page size is the maximum value of 1000 results. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Indicates how run attempts are to be pulled. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt run_attempt = 5; + * @return int + */ + public function getRunAttempt() + { + return $this->run_attempt; + } + + /** + * Indicates how run attempts are to be pulled. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt run_attempt = 5; + * @param int $var + * @return $this + */ + public function setRunAttempt($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsRequest\RunAttempt::class); + $this->run_attempt = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest/RunAttempt.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest/RunAttempt.php new file mode 100644 index 000000000000..24ffa90187ad --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest/RunAttempt.php @@ -0,0 +1,57 @@ +google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt + */ +class RunAttempt +{ + /** + * All runs should be returned. + * + * Generated from protobuf enum RUN_ATTEMPT_UNSPECIFIED = 0; + */ + const RUN_ATTEMPT_UNSPECIFIED = 0; + /** + * Only latest run per day should be returned. + * + * Generated from protobuf enum LATEST = 1; + */ + const LATEST = 1; + + private static $valueToName = [ + self::RUN_ATTEMPT_UNSPECIFIED => 'RUN_ATTEMPT_UNSPECIFIED', + self::LATEST => 'LATEST', + ]; + + 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(RunAttempt::class, \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsRequest_RunAttempt::class); + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsResponse.php new file mode 100644 index 000000000000..d1be9c36e029 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsResponse.php @@ -0,0 +1,113 @@ +google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + */ +class ListTransferRunsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The stored pipeline transfer runs. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_runs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $transfer_runs; + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferRunsRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $transfer_runs + * Output only. The stored pipeline transfer runs. + * @type string $next_page_token + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferRunsRequest.page_token` + * to request the next page of list results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The stored pipeline transfer runs. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_runs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransferRuns() + { + return $this->transfer_runs; + } + + /** + * Output only. The stored pipeline transfer runs. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_runs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransferRuns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun::class); + $this->transfer_runs = $arr; + + return $this; + } + + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferRunsRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferRunsRequest.page_token` + * to request the next page of list results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ManualSchedule.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ManualSchedule.php new file mode 100644 index 000000000000..d63152a9d504 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ManualSchedule.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.datatransfer.v1.ManualSchedule + */ +class ManualSchedule extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptions.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptions.php new file mode 100644 index 000000000000..35e0e40bc6dc --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptions.php @@ -0,0 +1,195 @@ +google.cloud.bigquery.datatransfer.v1.ScheduleOptions + */ +class ScheduleOptions extends \Google\Protobuf\Internal\Message +{ + /** + * If true, automatic scheduling of data transfer runs for this configuration + * will be disabled. The runs can be started on ad-hoc basis using + * StartManualTransferRuns API. When automatic scheduling is disabled, the + * TransferConfig.schedule field will be ignored. + * + * Generated from protobuf field bool disable_auto_scheduling = 3; + */ + protected $disable_auto_scheduling = false; + /** + * Specifies time to start scheduling transfer runs. The first run will be + * scheduled at or after the start time according to a recurrence pattern + * defined in the schedule string. The start time can be changed at any + * moment. The time when a data transfer can be triggered manually is not + * limited by this option. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Defines time to stop scheduling transfer runs. A transfer run cannot be + * scheduled at or after the end time. The end time can be changed at any + * moment. The time when a data transfer can be triggered manually is not + * limited by this option. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $disable_auto_scheduling + * If true, automatic scheduling of data transfer runs for this configuration + * will be disabled. The runs can be started on ad-hoc basis using + * StartManualTransferRuns API. When automatic scheduling is disabled, the + * TransferConfig.schedule field will be ignored. + * @type \Google\Protobuf\Timestamp $start_time + * Specifies time to start scheduling transfer runs. The first run will be + * scheduled at or after the start time according to a recurrence pattern + * defined in the schedule string. The start time can be changed at any + * moment. The time when a data transfer can be triggered manually is not + * limited by this option. + * @type \Google\Protobuf\Timestamp $end_time + * Defines time to stop scheduling transfer runs. A transfer run cannot be + * scheduled at or after the end time. The end time can be changed at any + * moment. The time when a data transfer can be triggered manually is not + * limited by this option. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * If true, automatic scheduling of data transfer runs for this configuration + * will be disabled. The runs can be started on ad-hoc basis using + * StartManualTransferRuns API. When automatic scheduling is disabled, the + * TransferConfig.schedule field will be ignored. + * + * Generated from protobuf field bool disable_auto_scheduling = 3; + * @return bool + */ + public function getDisableAutoScheduling() + { + return $this->disable_auto_scheduling; + } + + /** + * If true, automatic scheduling of data transfer runs for this configuration + * will be disabled. The runs can be started on ad-hoc basis using + * StartManualTransferRuns API. When automatic scheduling is disabled, the + * TransferConfig.schedule field will be ignored. + * + * Generated from protobuf field bool disable_auto_scheduling = 3; + * @param bool $var + * @return $this + */ + public function setDisableAutoScheduling($var) + { + GPBUtil::checkBool($var); + $this->disable_auto_scheduling = $var; + + return $this; + } + + /** + * Specifies time to start scheduling transfer runs. The first run will be + * scheduled at or after the start time according to a recurrence pattern + * defined in the schedule string. The start time can be changed at any + * moment. The time when a data transfer can be triggered manually is not + * limited by this option. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * Specifies time to start scheduling transfer runs. The first run will be + * scheduled at or after the start time according to a recurrence pattern + * defined in the schedule string. The start time can be changed at any + * moment. The time when a data transfer can be triggered manually is not + * limited by this option. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Defines time to stop scheduling transfer runs. A transfer run cannot be + * scheduled at or after the end time. The end time can be changed at any + * moment. The time when a data transfer can be triggered manually is not + * limited by this option. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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); + } + + /** + * Defines time to stop scheduling transfer runs. A transfer run cannot be + * scheduled at or after the end time. The end time can be changed at any + * moment. The time when a data transfer can be triggered manually is not + * limited by this option. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptionsV2.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptionsV2.php new file mode 100644 index 000000000000..9f60741106c1 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptionsV2.php @@ -0,0 +1,159 @@ +google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2 + */ +class ScheduleOptionsV2 extends \Google\Protobuf\Internal\Message +{ + protected $schedule; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\DataTransfer\V1\TimeBasedSchedule $time_based_schedule + * Time based transfer schedule options. This is the default schedule + * option. + * @type \Google\Cloud\BigQuery\DataTransfer\V1\ManualSchedule $manual_schedule + * Manual transfer schedule. If set, the transfer run will not be + * auto-scheduled by the system, unless the client invokes + * StartManualTransferRuns. This is equivalent to + * disable_auto_scheduling = true. + * @type \Google\Cloud\BigQuery\DataTransfer\V1\EventDrivenSchedule $event_driven_schedule + * Event driven transfer schedule options. If set, the transfer will be + * scheduled upon events arrial. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Time based transfer schedule options. This is the default schedule + * option. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule time_based_schedule = 1; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\TimeBasedSchedule|null + */ + public function getTimeBasedSchedule() + { + return $this->readOneof(1); + } + + public function hasTimeBasedSchedule() + { + return $this->hasOneof(1); + } + + /** + * Time based transfer schedule options. This is the default schedule + * option. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule time_based_schedule = 1; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\TimeBasedSchedule $var + * @return $this + */ + public function setTimeBasedSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\TimeBasedSchedule::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Manual transfer schedule. If set, the transfer run will not be + * auto-scheduled by the system, unless the client invokes + * StartManualTransferRuns. This is equivalent to + * disable_auto_scheduling = true. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ManualSchedule manual_schedule = 2; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\ManualSchedule|null + */ + public function getManualSchedule() + { + return $this->readOneof(2); + } + + public function hasManualSchedule() + { + return $this->hasOneof(2); + } + + /** + * Manual transfer schedule. If set, the transfer run will not be + * auto-scheduled by the system, unless the client invokes + * StartManualTransferRuns. This is equivalent to + * disable_auto_scheduling = true. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ManualSchedule manual_schedule = 2; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\ManualSchedule $var + * @return $this + */ + public function setManualSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\ManualSchedule::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Event driven transfer schedule options. If set, the transfer will be + * scheduled upon events arrial. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule event_driven_schedule = 3; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\EventDrivenSchedule|null + */ + public function getEventDrivenSchedule() + { + return $this->readOneof(3); + } + + public function hasEventDrivenSchedule() + { + return $this->hasOneof(3); + } + + /** + * Event driven transfer schedule options. If set, the transfer will be + * scheduled upon events arrial. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule event_driven_schedule = 3; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\EventDrivenSchedule $var + * @return $this + */ + public function setEventDrivenSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\EventDrivenSchedule::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSchedule() + { + return $this->whichOneof("schedule"); + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsRequest.php new file mode 100644 index 000000000000..8f0b713bd735 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsRequest.php @@ -0,0 +1,193 @@ +google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + */ +class ScheduleTransferRunsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_time = null; + /** + * Required. End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $end_time = null; + + /** + * @param string $parent Required. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. Please see + * {@see DataTransferServiceClient::transferConfigName()} for help formatting this field. + * @param \Google\Protobuf\Timestamp $startTime Required. Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. + * @param \Google\Protobuf\Timestamp $endTime Required. End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleTransferRunsRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Protobuf\Timestamp $startTime, \Google\Protobuf\Timestamp $endTime): self + { + return (new self()) + ->setParent($parent) + ->setStartTime($startTime) + ->setEndTime($endTime); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + * @type \Google\Protobuf\Timestamp $start_time + * Required. Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. + * @type \Google\Protobuf\Timestamp $end_time + * Required. End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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. Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Required. End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsResponse.php new file mode 100644 index 000000000000..673793b8f344 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsResponse.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + */ +class ScheduleTransferRunsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transfer runs that were scheduled. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; + */ + private $runs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $runs + * The transfer runs that were scheduled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * The transfer runs that were scheduled. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRuns() + { + return $this->runs; + } + + /** + * The transfer runs that were scheduled. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; + * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRuns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun::class); + $this->runs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest.php new file mode 100644 index 000000000000..2248a14c5c92 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest.php @@ -0,0 +1,168 @@ +google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + */ +class StartManualTransferRunsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + protected $time; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + * @type \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest\TimeRange $requested_time_range + * A time_range start and end timestamp for historical data files or reports + * that are scheduled to be transferred by the scheduled transfer run. + * requested_time_range must be a past time and cannot include future time + * values. + * @type \Google\Protobuf\Timestamp $requested_run_time + * A run_time timestamp for historical data files or reports + * that are scheduled to be transferred by the scheduled transfer run. + * requested_run_time must be a past time and cannot include future time + * values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}` or + * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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; + } + + /** + * A time_range start and end timestamp for historical data files or reports + * that are scheduled to be transferred by the scheduled transfer run. + * requested_time_range must be a past time and cannot include future time + * values. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange requested_time_range = 3; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest\TimeRange|null + */ + public function getRequestedTimeRange() + { + return $this->readOneof(3); + } + + public function hasRequestedTimeRange() + { + return $this->hasOneof(3); + } + + /** + * A time_range start and end timestamp for historical data files or reports + * that are scheduled to be transferred by the scheduled transfer run. + * requested_time_range must be a past time and cannot include future time + * values. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange requested_time_range = 3; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest\TimeRange $var + * @return $this + */ + public function setRequestedTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest\TimeRange::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A run_time timestamp for historical data files or reports + * that are scheduled to be transferred by the scheduled transfer run. + * requested_run_time must be a past time and cannot include future time + * values. + * + * Generated from protobuf field .google.protobuf.Timestamp requested_run_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestedRunTime() + { + return $this->readOneof(4); + } + + public function hasRequestedRunTime() + { + return $this->hasOneof(4); + } + + /** + * A run_time timestamp for historical data files or reports + * that are scheduled to be transferred by the scheduled transfer run. + * requested_run_time must be a past time and cannot include future time + * values. + * + * Generated from protobuf field .google.protobuf.Timestamp requested_run_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestedRunTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getTime() + { + return $this->whichOneof("time"); + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest/TimeRange.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest/TimeRange.php new file mode 100644 index 000000000000..3916e079bfe7 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest/TimeRange.php @@ -0,0 +1,149 @@ +google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + */ +class TimeRange extends \Google\Protobuf\Internal\Message +{ + /** + * Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than + * the end_time. Creates transfer runs where run_time is in the range + * between start_time (inclusive) and end_time (exclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. + * Creates transfer runs where run_time is in the range between start_time + * (inclusive) and end_time (exclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than + * the end_time. Creates transfer runs where run_time is in the range + * between start_time (inclusive) and end_time (exclusive). + * @type \Google\Protobuf\Timestamp $end_time + * End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. + * Creates transfer runs where run_time is in the range between start_time + * (inclusive) and end_time (exclusive). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than + * the end_time. Creates transfer runs where run_time is in the range + * between start_time (inclusive) and end_time (exclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than + * the end_time. Creates transfer runs where run_time is in the range + * between start_time (inclusive) and end_time (exclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. + * Creates transfer runs where run_time is in the range between start_time + * (inclusive) and end_time (exclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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); + } + + /** + * End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. + * Creates transfer runs where run_time is in the range between start_time + * (inclusive) and end_time (exclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimeRange::class, \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest_TimeRange::class); + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsResponse.php new file mode 100644 index 000000000000..2c891f31e726 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsResponse.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + */ +class StartManualTransferRunsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transfer runs that were created. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; + */ + private $runs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $runs + * The transfer runs that were created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * The transfer runs that were created. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRuns() + { + return $this->runs; + } + + /** + * The transfer runs that were created. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; + * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRuns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun::class); + $this->runs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TimeBasedSchedule.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TimeBasedSchedule.php new file mode 100644 index 000000000000..11981b94a608 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TimeBasedSchedule.php @@ -0,0 +1,220 @@ +google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule + */ +class TimeBasedSchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Data transfer schedule. + * If the data source does not support a custom schedule, this should be + * empty. If it is empty, the default value for the data source will be used. + * The specified times are in UTC. + * Examples of valid format: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * See more explanation about the format here: + * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + * NOTE: The minimum interval time between recurring transfers depends on the + * data source; refer to the documentation for your data source. + * + * Generated from protobuf field string schedule = 1; + */ + protected $schedule = ''; + /** + * Specifies time to start scheduling transfer runs. The first run will be + * scheduled at or after the start time according to a recurrence pattern + * defined in the schedule string. The start time can be changed at any + * moment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * Defines time to stop scheduling transfer runs. A transfer run cannot be + * scheduled at or after the end time. The end time can be changed at any + * moment. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schedule + * Data transfer schedule. + * If the data source does not support a custom schedule, this should be + * empty. If it is empty, the default value for the data source will be used. + * The specified times are in UTC. + * Examples of valid format: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * See more explanation about the format here: + * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + * NOTE: The minimum interval time between recurring transfers depends on the + * data source; refer to the documentation for your data source. + * @type \Google\Protobuf\Timestamp $start_time + * Specifies time to start scheduling transfer runs. The first run will be + * scheduled at or after the start time according to a recurrence pattern + * defined in the schedule string. The start time can be changed at any + * moment. + * @type \Google\Protobuf\Timestamp $end_time + * Defines time to stop scheduling transfer runs. A transfer run cannot be + * scheduled at or after the end time. The end time can be changed at any + * moment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Data transfer schedule. + * If the data source does not support a custom schedule, this should be + * empty. If it is empty, the default value for the data source will be used. + * The specified times are in UTC. + * Examples of valid format: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * See more explanation about the format here: + * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + * NOTE: The minimum interval time between recurring transfers depends on the + * data source; refer to the documentation for your data source. + * + * Generated from protobuf field string schedule = 1; + * @return string + */ + public function getSchedule() + { + return $this->schedule; + } + + /** + * Data transfer schedule. + * If the data source does not support a custom schedule, this should be + * empty. If it is empty, the default value for the data source will be used. + * The specified times are in UTC. + * Examples of valid format: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * See more explanation about the format here: + * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + * NOTE: The minimum interval time between recurring transfers depends on the + * data source; refer to the documentation for your data source. + * + * Generated from protobuf field string schedule = 1; + * @param string $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkString($var, True); + $this->schedule = $var; + + return $this; + } + + /** + * Specifies time to start scheduling transfer runs. The first run will be + * scheduled at or after the start time according to a recurrence pattern + * defined in the schedule string. The start time can be changed at any + * moment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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); + } + + /** + * Specifies time to start scheduling transfer runs. The first run will be + * scheduled at or after the start time according to a recurrence pattern + * defined in the schedule string. The start time can be changed at any + * moment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Defines time to stop scheduling transfer runs. A transfer run cannot be + * scheduled at or after the end time. The end time can be changed at any + * moment. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @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); + } + + /** + * Defines time to stop scheduling transfer runs. A transfer run cannot be + * scheduled at or after the end time. The end time can be changed at any + * moment. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferConfig.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferConfig.php new file mode 100644 index 000000000000..e02892d345a5 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferConfig.php @@ -0,0 +1,980 @@ +google.cloud.bigquery.datatransfer.v1.TransferConfig + */ +class TransferConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the transfer config. + * Transfer config names have the form either + * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or + * `projects/{project_id}/transferConfigs/{config_id}`, + * where `config_id` is usually a UUID, even though it is not + * guaranteed or required. The name is ignored when creating a transfer + * config. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * User specified display name for the data transfer. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * Data source ID. This cannot be changed once data transfer is created. The + * full list of available data source IDs can be returned through an API call: + * https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list + * + * Generated from protobuf field string data_source_id = 5; + */ + protected $data_source_id = ''; + /** + * Parameters specific to each data source. For more information see the + * bq tab in the 'Setting up a data transfer' section for each data source. + * For example the parameters for Cloud Storage transfers are listed here: + * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + * + * Generated from protobuf field .google.protobuf.Struct params = 9; + */ + protected $params = null; + /** + * Data transfer schedule. + * If the data source does not support a custom schedule, this should be + * empty. If it is empty, the default value for the data source will be used. + * The specified times are in UTC. + * Examples of valid format: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * See more explanation about the format here: + * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + * NOTE: The minimum interval time between recurring transfers depends on the + * data source; refer to the documentation for your data source. + * + * Generated from protobuf field string schedule = 7; + */ + protected $schedule = ''; + /** + * Options customizing the data transfer schedule. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptions schedule_options = 24; + */ + protected $schedule_options = null; + /** + * Options customizing different types of data transfer schedule. + * This field replaces "schedule" and "schedule_options" fields. + * ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2 schedule_options_v2 = 31; + */ + protected $schedule_options_v2 = null; + /** + * The number of days to look back to automatically refresh the data. + * For example, if `data_refresh_window_days = 10`, then every day + * BigQuery reingests data for [today-10, today-1], rather than ingesting data + * for just [today-1]. + * Only valid if the data source supports the feature. Set the value to 0 + * to use the default value. + * + * Generated from protobuf field int32 data_refresh_window_days = 12; + */ + protected $data_refresh_window_days = 0; + /** + * Is this config disabled. When set to true, no runs will be scheduled for + * this transfer config. + * + * Generated from protobuf field bool disabled = 13; + */ + protected $disabled = false; + /** + * Output only. Data transfer modification time. Ignored by server on input. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Next time when data transfer will run. + * + * Generated from protobuf field .google.protobuf.Timestamp next_run_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_run_time = null; + /** + * Output only. State of the most recently updated transfer run. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Deprecated. Unique ID of the user on whose behalf transfer is done. + * + * Generated from protobuf field int64 user_id = 11; + */ + protected $user_id = 0; + /** + * Output only. Region in which BigQuery dataset is located. + * + * Generated from protobuf field string dataset_region = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dataset_region = ''; + /** + * Pub/Sub topic where notifications will be sent after transfer runs + * associated with this transfer config finish. + * The format for specifying a pubsub topic is: + * `projects/{project_id}/topics/{topic_id}` + * + * Generated from protobuf field string notification_pubsub_topic = 15; + */ + protected $notification_pubsub_topic = ''; + /** + * Email notifications will be sent according to these preferences + * to the email address of the user who owns this transfer config. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 18; + */ + protected $email_preferences = null; + /** + * Output only. Information about the user whose credentials are used to + * transfer data. Populated only for `transferConfigs.get` requests. In case + * the user information is not available, this field will not be populated. + * + * Generated from protobuf field optional .google.cloud.bigquery.datatransfer.v1.UserInfo owner_info = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $owner_info = null; + /** + * The encryption configuration part. Currently, it is only used for the + * optional KMS key name. The BigQuery service account of your project must be + * granted permissions to use the key. Read methods will return the key name + * applied in effect. Write methods will apply the key if it is present, or + * otherwise try to apply project default keys if it is absent. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration encryption_configuration = 28; + */ + protected $encryption_configuration = null; + /** + * Output only. Error code with detailed information about reason of the + * latest config failure. + * + * Generated from protobuf field .google.rpc.Status error = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the transfer config. + * Transfer config names have the form either + * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or + * `projects/{project_id}/transferConfigs/{config_id}`, + * where `config_id` is usually a UUID, even though it is not + * guaranteed or required. The name is ignored when creating a transfer + * config. + * @type string $destination_dataset_id + * The BigQuery target dataset id. + * @type string $display_name + * User specified display name for the data transfer. + * @type string $data_source_id + * Data source ID. This cannot be changed once data transfer is created. The + * full list of available data source IDs can be returned through an API call: + * https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list + * @type \Google\Protobuf\Struct $params + * Parameters specific to each data source. For more information see the + * bq tab in the 'Setting up a data transfer' section for each data source. + * For example the parameters for Cloud Storage transfers are listed here: + * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + * @type string $schedule + * Data transfer schedule. + * If the data source does not support a custom schedule, this should be + * empty. If it is empty, the default value for the data source will be used. + * The specified times are in UTC. + * Examples of valid format: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * See more explanation about the format here: + * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + * NOTE: The minimum interval time between recurring transfers depends on the + * data source; refer to the documentation for your data source. + * @type \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptions $schedule_options + * Options customizing the data transfer schedule. + * @type \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptionsV2 $schedule_options_v2 + * Options customizing different types of data transfer schedule. + * This field replaces "schedule" and "schedule_options" fields. + * ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. + * @type int $data_refresh_window_days + * The number of days to look back to automatically refresh the data. + * For example, if `data_refresh_window_days = 10`, then every day + * BigQuery reingests data for [today-10, today-1], rather than ingesting data + * for just [today-1]. + * Only valid if the data source supports the feature. Set the value to 0 + * to use the default value. + * @type bool $disabled + * Is this config disabled. When set to true, no runs will be scheduled for + * this transfer config. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Data transfer modification time. Ignored by server on input. + * @type \Google\Protobuf\Timestamp $next_run_time + * Output only. Next time when data transfer will run. + * @type int $state + * Output only. State of the most recently updated transfer run. + * @type int|string $user_id + * Deprecated. Unique ID of the user on whose behalf transfer is done. + * @type string $dataset_region + * Output only. Region in which BigQuery dataset is located. + * @type string $notification_pubsub_topic + * Pub/Sub topic where notifications will be sent after transfer runs + * associated with this transfer config finish. + * The format for specifying a pubsub topic is: + * `projects/{project_id}/topics/{topic_id}` + * @type \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences $email_preferences + * Email notifications will be sent according to these preferences + * to the email address of the user who owns this transfer config. + * @type \Google\Cloud\BigQuery\DataTransfer\V1\UserInfo $owner_info + * Output only. Information about the user whose credentials are used to + * transfer data. Populated only for `transferConfigs.get` requests. In case + * the user information is not available, this field will not be populated. + * @type \Google\Cloud\BigQuery\DataTransfer\V1\EncryptionConfiguration $encryption_configuration + * The encryption configuration part. Currently, it is only used for the + * optional KMS key name. The BigQuery service account of your project must be + * granted permissions to use the key. Read methods will return the key name + * applied in effect. Write methods will apply the key if it is present, or + * otherwise try to apply project default keys if it is absent. + * @type \Google\Rpc\Status $error + * Output only. Error code with detailed information about reason of the + * latest config failure. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the transfer config. + * Transfer config names have the form either + * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or + * `projects/{project_id}/transferConfigs/{config_id}`, + * where `config_id` is usually a UUID, even though it is not + * guaranteed or required. The name is ignored when creating a transfer + * config. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the transfer config. + * Transfer config names have the form either + * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or + * `projects/{project_id}/transferConfigs/{config_id}`, + * where `config_id` is usually a UUID, even though it is not + * guaranteed or required. The name is ignored when creating a transfer + * config. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The BigQuery target dataset id. + * + * Generated from protobuf field string destination_dataset_id = 2; + * @return string + */ + public function getDestinationDatasetId() + { + return $this->readOneof(2); + } + + public function hasDestinationDatasetId() + { + return $this->hasOneof(2); + } + + /** + * The BigQuery target dataset id. + * + * Generated from protobuf field string destination_dataset_id = 2; + * @param string $var + * @return $this + */ + public function setDestinationDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * User specified display name for the data transfer. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User specified display name for the data transfer. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Data source ID. This cannot be changed once data transfer is created. The + * full list of available data source IDs can be returned through an API call: + * https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list + * + * Generated from protobuf field string data_source_id = 5; + * @return string + */ + public function getDataSourceId() + { + return $this->data_source_id; + } + + /** + * Data source ID. This cannot be changed once data transfer is created. The + * full list of available data source IDs can be returned through an API call: + * https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list + * + * Generated from protobuf field string data_source_id = 5; + * @param string $var + * @return $this + */ + public function setDataSourceId($var) + { + GPBUtil::checkString($var, True); + $this->data_source_id = $var; + + return $this; + } + + /** + * Parameters specific to each data source. For more information see the + * bq tab in the 'Setting up a data transfer' section for each data source. + * For example the parameters for Cloud Storage transfers are listed here: + * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + * + * Generated from protobuf field .google.protobuf.Struct params = 9; + * @return \Google\Protobuf\Struct|null + */ + public function getParams() + { + return $this->params; + } + + public function hasParams() + { + return isset($this->params); + } + + public function clearParams() + { + unset($this->params); + } + + /** + * Parameters specific to each data source. For more information see the + * bq tab in the 'Setting up a data transfer' section for each data source. + * For example the parameters for Cloud Storage transfers are listed here: + * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + * + * Generated from protobuf field .google.protobuf.Struct params = 9; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParams($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->params = $var; + + return $this; + } + + /** + * Data transfer schedule. + * If the data source does not support a custom schedule, this should be + * empty. If it is empty, the default value for the data source will be used. + * The specified times are in UTC. + * Examples of valid format: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * See more explanation about the format here: + * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + * NOTE: The minimum interval time between recurring transfers depends on the + * data source; refer to the documentation for your data source. + * + * Generated from protobuf field string schedule = 7; + * @return string + */ + public function getSchedule() + { + return $this->schedule; + } + + /** + * Data transfer schedule. + * If the data source does not support a custom schedule, this should be + * empty. If it is empty, the default value for the data source will be used. + * The specified times are in UTC. + * Examples of valid format: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * See more explanation about the format here: + * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + * NOTE: The minimum interval time between recurring transfers depends on the + * data source; refer to the documentation for your data source. + * + * Generated from protobuf field string schedule = 7; + * @param string $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkString($var, True); + $this->schedule = $var; + + return $this; + } + + /** + * Options customizing the data transfer schedule. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptions schedule_options = 24; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptions|null + */ + public function getScheduleOptions() + { + return $this->schedule_options; + } + + public function hasScheduleOptions() + { + return isset($this->schedule_options); + } + + public function clearScheduleOptions() + { + unset($this->schedule_options); + } + + /** + * Options customizing the data transfer schedule. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptions schedule_options = 24; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptions $var + * @return $this + */ + public function setScheduleOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptions::class); + $this->schedule_options = $var; + + return $this; + } + + /** + * Options customizing different types of data transfer schedule. + * This field replaces "schedule" and "schedule_options" fields. + * ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2 schedule_options_v2 = 31; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptionsV2|null + */ + public function getScheduleOptionsV2() + { + return $this->schedule_options_v2; + } + + public function hasScheduleOptionsV2() + { + return isset($this->schedule_options_v2); + } + + public function clearScheduleOptionsV2() + { + unset($this->schedule_options_v2); + } + + /** + * Options customizing different types of data transfer schedule. + * This field replaces "schedule" and "schedule_options" fields. + * ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2 schedule_options_v2 = 31; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptionsV2 $var + * @return $this + */ + public function setScheduleOptionsV2($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptionsV2::class); + $this->schedule_options_v2 = $var; + + return $this; + } + + /** + * The number of days to look back to automatically refresh the data. + * For example, if `data_refresh_window_days = 10`, then every day + * BigQuery reingests data for [today-10, today-1], rather than ingesting data + * for just [today-1]. + * Only valid if the data source supports the feature. Set the value to 0 + * to use the default value. + * + * Generated from protobuf field int32 data_refresh_window_days = 12; + * @return int + */ + public function getDataRefreshWindowDays() + { + return $this->data_refresh_window_days; + } + + /** + * The number of days to look back to automatically refresh the data. + * For example, if `data_refresh_window_days = 10`, then every day + * BigQuery reingests data for [today-10, today-1], rather than ingesting data + * for just [today-1]. + * Only valid if the data source supports the feature. Set the value to 0 + * to use the default value. + * + * Generated from protobuf field int32 data_refresh_window_days = 12; + * @param int $var + * @return $this + */ + public function setDataRefreshWindowDays($var) + { + GPBUtil::checkInt32($var); + $this->data_refresh_window_days = $var; + + return $this; + } + + /** + * Is this config disabled. When set to true, no runs will be scheduled for + * this transfer config. + * + * Generated from protobuf field bool disabled = 13; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * Is this config disabled. When set to true, no runs will be scheduled for + * this transfer config. + * + * Generated from protobuf field bool disabled = 13; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * Output only. Data transfer modification time. Ignored by server on input. + * + * 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. Data transfer modification time. Ignored by server on input. + * + * 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; + } + + /** + * Output only. Next time when data transfer will run. + * + * Generated from protobuf field .google.protobuf.Timestamp next_run_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextRunTime() + { + return $this->next_run_time; + } + + public function hasNextRunTime() + { + return isset($this->next_run_time); + } + + public function clearNextRunTime() + { + unset($this->next_run_time); + } + + /** + * Output only. Next time when data transfer will run. + * + * Generated from protobuf field .google.protobuf.Timestamp next_run_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextRunTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_run_time = $var; + + return $this; + } + + /** + * Output only. State of the most recently updated transfer run. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the most recently updated transfer run. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class); + $this->state = $var; + + return $this; + } + + /** + * Deprecated. Unique ID of the user on whose behalf transfer is done. + * + * Generated from protobuf field int64 user_id = 11; + * @return int|string + */ + public function getUserId() + { + return $this->user_id; + } + + /** + * Deprecated. Unique ID of the user on whose behalf transfer is done. + * + * Generated from protobuf field int64 user_id = 11; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->user_id = $var; + + return $this; + } + + /** + * Output only. Region in which BigQuery dataset is located. + * + * Generated from protobuf field string dataset_region = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatasetRegion() + { + return $this->dataset_region; + } + + /** + * Output only. Region in which BigQuery dataset is located. + * + * Generated from protobuf field string dataset_region = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatasetRegion($var) + { + GPBUtil::checkString($var, True); + $this->dataset_region = $var; + + return $this; + } + + /** + * Pub/Sub topic where notifications will be sent after transfer runs + * associated with this transfer config finish. + * The format for specifying a pubsub topic is: + * `projects/{project_id}/topics/{topic_id}` + * + * Generated from protobuf field string notification_pubsub_topic = 15; + * @return string + */ + public function getNotificationPubsubTopic() + { + return $this->notification_pubsub_topic; + } + + /** + * Pub/Sub topic where notifications will be sent after transfer runs + * associated with this transfer config finish. + * The format for specifying a pubsub topic is: + * `projects/{project_id}/topics/{topic_id}` + * + * Generated from protobuf field string notification_pubsub_topic = 15; + * @param string $var + * @return $this + */ + public function setNotificationPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->notification_pubsub_topic = $var; + + return $this; + } + + /** + * Email notifications will be sent according to these preferences + * to the email address of the user who owns this transfer config. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 18; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences|null + */ + public function getEmailPreferences() + { + return $this->email_preferences; + } + + public function hasEmailPreferences() + { + return isset($this->email_preferences); + } + + public function clearEmailPreferences() + { + unset($this->email_preferences); + } + + /** + * Email notifications will be sent according to these preferences + * to the email address of the user who owns this transfer config. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 18; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences $var + * @return $this + */ + public function setEmailPreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences::class); + $this->email_preferences = $var; + + return $this; + } + + /** + * Output only. Information about the user whose credentials are used to + * transfer data. Populated only for `transferConfigs.get` requests. In case + * the user information is not available, this field will not be populated. + * + * Generated from protobuf field optional .google.cloud.bigquery.datatransfer.v1.UserInfo owner_info = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\UserInfo|null + */ + public function getOwnerInfo() + { + return $this->owner_info; + } + + public function hasOwnerInfo() + { + return isset($this->owner_info); + } + + public function clearOwnerInfo() + { + unset($this->owner_info); + } + + /** + * Output only. Information about the user whose credentials are used to + * transfer data. Populated only for `transferConfigs.get` requests. In case + * the user information is not available, this field will not be populated. + * + * Generated from protobuf field optional .google.cloud.bigquery.datatransfer.v1.UserInfo owner_info = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\UserInfo $var + * @return $this + */ + public function setOwnerInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\UserInfo::class); + $this->owner_info = $var; + + return $this; + } + + /** + * The encryption configuration part. Currently, it is only used for the + * optional KMS key name. The BigQuery service account of your project must be + * granted permissions to use the key. Read methods will return the key name + * applied in effect. Write methods will apply the key if it is present, or + * otherwise try to apply project default keys if it is absent. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration encryption_configuration = 28; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\EncryptionConfiguration|null + */ + public function getEncryptionConfiguration() + { + return $this->encryption_configuration; + } + + public function hasEncryptionConfiguration() + { + return isset($this->encryption_configuration); + } + + public function clearEncryptionConfiguration() + { + unset($this->encryption_configuration); + } + + /** + * The encryption configuration part. Currently, it is only used for the + * optional KMS key name. The BigQuery service account of your project must be + * granted permissions to use the key. Read methods will return the key name + * applied in effect. Write methods will apply the key if it is present, or + * otherwise try to apply project default keys if it is absent. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration encryption_configuration = 28; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\EncryptionConfiguration $var + * @return $this + */ + public function setEncryptionConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\EncryptionConfiguration::class); + $this->encryption_configuration = $var; + + return $this; + } + + /** + * Output only. Error code with detailed information about reason of the + * latest config failure. + * + * Generated from protobuf field .google.rpc.Status error = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Error code with detailed information about reason of the + * latest config failure. + * + * Generated from protobuf field .google.rpc.Status error = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage.php new file mode 100644 index 000000000000..a870acd7fa2d --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage.php @@ -0,0 +1,145 @@ +google.cloud.bigquery.datatransfer.v1.TransferMessage + */ +class TransferMessage extends \Google\Protobuf\Internal\Message +{ + /** + * Time when message was logged. + * + * Generated from protobuf field .google.protobuf.Timestamp message_time = 1; + */ + protected $message_time = null; + /** + * Message severity. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity severity = 2; + */ + protected $severity = 0; + /** + * Message text. + * + * Generated from protobuf field string message_text = 3; + */ + protected $message_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $message_time + * Time when message was logged. + * @type int $severity + * Message severity. + * @type string $message_text + * Message text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Time when message was logged. + * + * Generated from protobuf field .google.protobuf.Timestamp message_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getMessageTime() + { + return $this->message_time; + } + + public function hasMessageTime() + { + return isset($this->message_time); + } + + public function clearMessageTime() + { + unset($this->message_time); + } + + /** + * Time when message was logged. + * + * Generated from protobuf field .google.protobuf.Timestamp message_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setMessageTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->message_time = $var; + + return $this; + } + + /** + * Message severity. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity severity = 2; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Message severity. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity severity = 2; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage\MessageSeverity::class); + $this->severity = $var; + + return $this; + } + + /** + * Message text. + * + * Generated from protobuf field string message_text = 3; + * @return string + */ + public function getMessageText() + { + return $this->message_text; + } + + /** + * Message text. + * + * Generated from protobuf field string message_text = 3; + * @param string $var + * @return $this + */ + public function setMessageText($var) + { + GPBUtil::checkString($var, True); + $this->message_text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage/MessageSeverity.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage/MessageSeverity.php new file mode 100644 index 000000000000..60b5fec68483 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage/MessageSeverity.php @@ -0,0 +1,71 @@ +google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity + */ +class MessageSeverity +{ + /** + * No severity specified. + * + * Generated from protobuf enum MESSAGE_SEVERITY_UNSPECIFIED = 0; + */ + const MESSAGE_SEVERITY_UNSPECIFIED = 0; + /** + * Informational message. + * + * Generated from protobuf enum INFO = 1; + */ + const INFO = 1; + /** + * Warning message. + * + * Generated from protobuf enum WARNING = 2; + */ + const WARNING = 2; + /** + * Error message. + * + * Generated from protobuf enum ERROR = 3; + */ + const ERROR = 3; + + private static $valueToName = [ + self::MESSAGE_SEVERITY_UNSPECIFIED => 'MESSAGE_SEVERITY_UNSPECIFIED', + self::INFO => 'INFO', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MessageSeverity::class, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage_MessageSeverity::class); + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferRun.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferRun.php new file mode 100644 index 000000000000..849c9f95aec3 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferRun.php @@ -0,0 +1,707 @@ +google.cloud.bigquery.datatransfer.v1.TransferRun + */ +class TransferRun extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the transfer run. + * Transfer run names have the form + * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. + * The name is ignored when creating a transfer run. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Minimum time after which a transfer run can be started. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; + */ + protected $schedule_time = null; + /** + * For batch transfer runs, specifies the date and time of the data should be + * ingested. + * + * Generated from protobuf field .google.protobuf.Timestamp run_time = 10; + */ + protected $run_time = null; + /** + * Status of the transfer run. + * + * Generated from protobuf field .google.rpc.Status error_status = 21; + */ + protected $error_status = null; + /** + * Output only. Time when transfer run was started. + * Parameter ignored by server for input requests. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Time when transfer run ended. + * Parameter ignored by server for input requests. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Last time the data transfer run state was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Parameters specific to each data source. For more information + * see the bq tab in the 'Setting up a data transfer' section for each data + * source. For example the parameters for Cloud Storage transfers are listed + * here: + * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + * + * Generated from protobuf field .google.protobuf.Struct params = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $params = null; + /** + * Output only. Data source id. + * + * Generated from protobuf field string data_source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_source_id = ''; + /** + * Data transfer run state. Ignored for input requests. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 8; + */ + protected $state = 0; + /** + * Deprecated. Unique ID of the user on whose behalf transfer is done. + * + * Generated from protobuf field int64 user_id = 11; + */ + protected $user_id = 0; + /** + * Output only. Describes the schedule of this transfer run if it was + * created as part of a regular schedule. For batch transfer runs that are + * scheduled manually, this is empty. + * NOTE: the system might choose to delay the schedule depending on the + * current load, so `schedule_time` doesn't always match this. + * + * Generated from protobuf field string schedule = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $schedule = ''; + /** + * Output only. Pub/Sub topic where a notification will be sent after this + * transfer run finishes. + * The format for specifying a pubsub topic is: + * `projects/{project_id}/topics/{topic_id}` + * + * Generated from protobuf field string notification_pubsub_topic = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $notification_pubsub_topic = ''; + /** + * Output only. Email notifications will be sent according to these + * preferences to the email address of the user who owns the transfer config + * this run was derived from. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $email_preferences = null; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the transfer run. + * Transfer run names have the form + * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. + * The name is ignored when creating a transfer run. + * @type \Google\Protobuf\Timestamp $schedule_time + * Minimum time after which a transfer run can be started. + * @type \Google\Protobuf\Timestamp $run_time + * For batch transfer runs, specifies the date and time of the data should be + * ingested. + * @type \Google\Rpc\Status $error_status + * Status of the transfer run. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Time when transfer run was started. + * Parameter ignored by server for input requests. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Time when transfer run ended. + * Parameter ignored by server for input requests. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last time the data transfer run state was updated. + * @type \Google\Protobuf\Struct $params + * Output only. Parameters specific to each data source. For more information + * see the bq tab in the 'Setting up a data transfer' section for each data + * source. For example the parameters for Cloud Storage transfers are listed + * here: + * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + * @type string $destination_dataset_id + * Output only. The BigQuery target dataset id. + * @type string $data_source_id + * Output only. Data source id. + * @type int $state + * Data transfer run state. Ignored for input requests. + * @type int|string $user_id + * Deprecated. Unique ID of the user on whose behalf transfer is done. + * @type string $schedule + * Output only. Describes the schedule of this transfer run if it was + * created as part of a regular schedule. For batch transfer runs that are + * scheduled manually, this is empty. + * NOTE: the system might choose to delay the schedule depending on the + * current load, so `schedule_time` doesn't always match this. + * @type string $notification_pubsub_topic + * Output only. Pub/Sub topic where a notification will be sent after this + * transfer run finishes. + * The format for specifying a pubsub topic is: + * `projects/{project_id}/topics/{topic_id}` + * @type \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences $email_preferences + * Output only. Email notifications will be sent according to these + * preferences to the email address of the user who owns the transfer config + * this run was derived from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the transfer run. + * Transfer run names have the form + * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. + * The name is ignored when creating a transfer run. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the transfer run. + * Transfer run names have the form + * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. + * The name is ignored when creating a transfer run. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Minimum time after which a transfer run can be started. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Minimum time after which a transfer run can be started. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * For batch transfer runs, specifies the date and time of the data should be + * ingested. + * + * Generated from protobuf field .google.protobuf.Timestamp run_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRunTime() + { + return $this->run_time; + } + + public function hasRunTime() + { + return isset($this->run_time); + } + + public function clearRunTime() + { + unset($this->run_time); + } + + /** + * For batch transfer runs, specifies the date and time of the data should be + * ingested. + * + * Generated from protobuf field .google.protobuf.Timestamp run_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRunTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->run_time = $var; + + return $this; + } + + /** + * Status of the transfer run. + * + * Generated from protobuf field .google.rpc.Status error_status = 21; + * @return \Google\Rpc\Status|null + */ + public function getErrorStatus() + { + return $this->error_status; + } + + public function hasErrorStatus() + { + return isset($this->error_status); + } + + public function clearErrorStatus() + { + unset($this->error_status); + } + + /** + * Status of the transfer run. + * + * Generated from protobuf field .google.rpc.Status error_status = 21; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setErrorStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error_status = $var; + + return $this; + } + + /** + * Output only. Time when transfer run was started. + * Parameter ignored by server for input requests. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.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. Time when transfer run was started. + * Parameter ignored by server for input requests. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.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. Time when transfer run ended. + * Parameter ignored by server for input requests. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.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. Time when transfer run ended. + * Parameter ignored by server for input requests. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.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. Last time the data transfer run state was 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. Last time the data transfer run state was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Parameters specific to each data source. For more information + * see the bq tab in the 'Setting up a data transfer' section for each data + * source. For example the parameters for Cloud Storage transfers are listed + * here: + * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + * + * Generated from protobuf field .google.protobuf.Struct params = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Struct|null + */ + public function getParams() + { + return $this->params; + } + + public function hasParams() + { + return isset($this->params); + } + + public function clearParams() + { + unset($this->params); + } + + /** + * Output only. Parameters specific to each data source. For more information + * see the bq tab in the 'Setting up a data transfer' section for each data + * source. For example the parameters for Cloud Storage transfers are listed + * here: + * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + * + * Generated from protobuf field .google.protobuf.Struct params = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParams($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->params = $var; + + return $this; + } + + /** + * Output only. The BigQuery target dataset id. + * + * Generated from protobuf field string destination_dataset_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDestinationDatasetId() + { + return $this->readOneof(2); + } + + public function hasDestinationDatasetId() + { + return $this->hasOneof(2); + } + + /** + * Output only. The BigQuery target dataset id. + * + * Generated from protobuf field string destination_dataset_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDestinationDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Output only. Data source id. + * + * Generated from protobuf field string data_source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDataSourceId() + { + return $this->data_source_id; + } + + /** + * Output only. Data source id. + * + * Generated from protobuf field string data_source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDataSourceId($var) + { + GPBUtil::checkString($var, True); + $this->data_source_id = $var; + + return $this; + } + + /** + * Data transfer run state. Ignored for input requests. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 8; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Data transfer run state. Ignored for input requests. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 8; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class); + $this->state = $var; + + return $this; + } + + /** + * Deprecated. Unique ID of the user on whose behalf transfer is done. + * + * Generated from protobuf field int64 user_id = 11; + * @return int|string + */ + public function getUserId() + { + return $this->user_id; + } + + /** + * Deprecated. Unique ID of the user on whose behalf transfer is done. + * + * Generated from protobuf field int64 user_id = 11; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->user_id = $var; + + return $this; + } + + /** + * Output only. Describes the schedule of this transfer run if it was + * created as part of a regular schedule. For batch transfer runs that are + * scheduled manually, this is empty. + * NOTE: the system might choose to delay the schedule depending on the + * current load, so `schedule_time` doesn't always match this. + * + * Generated from protobuf field string schedule = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSchedule() + { + return $this->schedule; + } + + /** + * Output only. Describes the schedule of this transfer run if it was + * created as part of a regular schedule. For batch transfer runs that are + * scheduled manually, this is empty. + * NOTE: the system might choose to delay the schedule depending on the + * current load, so `schedule_time` doesn't always match this. + * + * Generated from protobuf field string schedule = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkString($var, True); + $this->schedule = $var; + + return $this; + } + + /** + * Output only. Pub/Sub topic where a notification will be sent after this + * transfer run finishes. + * The format for specifying a pubsub topic is: + * `projects/{project_id}/topics/{topic_id}` + * + * Generated from protobuf field string notification_pubsub_topic = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNotificationPubsubTopic() + { + return $this->notification_pubsub_topic; + } + + /** + * Output only. Pub/Sub topic where a notification will be sent after this + * transfer run finishes. + * The format for specifying a pubsub topic is: + * `projects/{project_id}/topics/{topic_id}` + * + * Generated from protobuf field string notification_pubsub_topic = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNotificationPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->notification_pubsub_topic = $var; + + return $this; + } + + /** + * Output only. Email notifications will be sent according to these + * preferences to the email address of the user who owns the transfer config + * this run was derived from. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences|null + */ + public function getEmailPreferences() + { + return $this->email_preferences; + } + + public function hasEmailPreferences() + { + return isset($this->email_preferences); + } + + public function clearEmailPreferences() + { + unset($this->email_preferences); + } + + /** + * Output only. Email notifications will be sent according to these + * preferences to the email address of the user who owns the transfer config + * this run was derived from. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences $var + * @return $this + */ + public function setEmailPreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences::class); + $this->email_preferences = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferState.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferState.php new file mode 100644 index 000000000000..37f2117d5072 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferState.php @@ -0,0 +1,83 @@ +google.cloud.bigquery.datatransfer.v1.TransferState + */ +class TransferState +{ + /** + * State placeholder (0). + * + * Generated from protobuf enum TRANSFER_STATE_UNSPECIFIED = 0; + */ + const TRANSFER_STATE_UNSPECIFIED = 0; + /** + * Data transfer is scheduled and is waiting to be picked up by + * data transfer backend (2). + * + * Generated from protobuf enum PENDING = 2; + */ + const PENDING = 2; + /** + * Data transfer is in progress (3). + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * Data transfer completed successfully (4). + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * Data transfer failed (5). + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * Data transfer is cancelled (6). + * + * Generated from protobuf enum CANCELLED = 6; + */ + const CANCELLED = 6; + + private static $valueToName = [ + self::TRANSFER_STATE_UNSPECIFIED => 'TRANSFER_STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + ]; + + 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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferType.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferType.php new file mode 100644 index 000000000000..175c432ce5db --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferType.php @@ -0,0 +1,63 @@ +google.cloud.bigquery.datatransfer.v1.TransferType + */ +class TransferType +{ + /** + * Invalid or Unknown transfer type placeholder. + * + * Generated from protobuf enum TRANSFER_TYPE_UNSPECIFIED = 0; + */ + const TRANSFER_TYPE_UNSPECIFIED = 0; + /** + * Batch data transfer. + * + * Generated from protobuf enum BATCH = 1; + */ + const BATCH = 1; + /** + * Streaming data transfer. Streaming data source currently doesn't + * support multiple transfer configs per project. + * + * Generated from protobuf enum STREAMING = 2; + */ + const STREAMING = 2; + + private static $valueToName = [ + self::TRANSFER_TYPE_UNSPECIFIED => 'TRANSFER_TYPE_UNSPECIFIED', + self::BATCH => 'BATCH', + self::STREAMING => 'STREAMING', + ]; + + 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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UnenrollDataSourcesRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UnenrollDataSourcesRequest.php new file mode 100644 index 000000000000..b95df4cd08eb --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UnenrollDataSourcesRequest.php @@ -0,0 +1,110 @@ +google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest + */ +class UnenrollDataSourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project resource in the form: + * `projects/{project_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Data sources that are unenrolled. It is required to provide at least one + * data source id. + * + * Generated from protobuf field repeated string data_source_ids = 2; + */ + private $data_source_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the project resource in the form: + * `projects/{project_id}` + * @type array|\Google\Protobuf\Internal\RepeatedField $data_source_ids + * Data sources that are unenrolled. It is required to provide at least one + * data source id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project resource in the form: + * `projects/{project_id}` + * + * 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 project resource in the form: + * `projects/{project_id}` + * + * 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; + } + + /** + * Data sources that are unenrolled. It is required to provide at least one + * data source id. + * + * Generated from protobuf field repeated string data_source_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataSourceIds() + { + return $this->data_source_ids; + } + + /** + * Data sources that are unenrolled. It is required to provide at least one + * data source id. + * + * Generated from protobuf field repeated string data_source_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataSourceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_source_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UpdateTransferConfigRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UpdateTransferConfigRequest.php new file mode 100644 index 000000000000..a6a1b12a9307 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UpdateTransferConfigRequest.php @@ -0,0 +1,388 @@ +google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + */ +class UpdateTransferConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Data transfer configuration to create. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $transfer_config = null; + /** + * Deprecated: Authorization code was required when + * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + * in any data sources. Use `version_info` instead. + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + * and new credentials are needed, as indicated by `CheckValidCreds`. In order + * to obtain authorization_code, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * update the transfer config. + * + * Generated from protobuf field string authorization_code = 3 [deprecated = true]; + * @deprecated + */ + protected $authorization_code = ''; + /** + * Required. Required list of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional version info. This parameter replaces `authorization_code` which + * is no longer used in any data sources. This is required only if + * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + * are needed, as indicated by `CheckValidCreds`. In order to obtain version + * info, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * update the transfer config. + * + * Generated from protobuf field string version_info = 5; + */ + protected $version_info = ''; + /** + * Optional service account email. If this field is set, the transfer config + * will be created with this service account's credentials. It requires that + * the requesting user calling this API has permissions to act as this service + * account. + * Note that not all data sources support service account credentials when + * creating a transfer config. For the latest list of data sources, read about + * [using service + * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + * + * Generated from protobuf field string service_account_name = 6; + */ + protected $service_account_name = ''; + + /** + * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transferConfig Required. Data transfer configuration to create. + * @param \Google\Protobuf\FieldMask $updateMask Required. Required list of fields to be updated in this request. + * + * @return \Google\Cloud\BigQuery\DataTransfer\V1\UpdateTransferConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transferConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTransferConfig($transferConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transfer_config + * Required. Data transfer configuration to create. + * @type string $authorization_code + * Deprecated: Authorization code was required when + * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + * in any data sources. Use `version_info` instead. + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + * and new credentials are needed, as indicated by `CheckValidCreds`. In order + * to obtain authorization_code, make a request to the following URL: + *
+     *           https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+     *           
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * update the transfer config. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Required list of fields to be updated in this request. + * @type string $version_info + * Optional version info. This parameter replaces `authorization_code` which + * is no longer used in any data sources. This is required only if + * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + * are needed, as indicated by `CheckValidCreds`. In order to obtain version + * info, make a request to the following URL: + *
+     *           https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+     *           
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * update the transfer config. + * @type string $service_account_name + * Optional service account email. If this field is set, the transfer config + * will be created with this service account's credentials. It requires that + * the requesting user calling this API has permissions to act as this service + * account. + * Note that not all data sources support service account credentials when + * creating a transfer config. For the latest list of data sources, read about + * [using service + * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. Data transfer configuration to create. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig|null + */ + public function getTransferConfig() + { + return $this->transfer_config; + } + + public function hasTransferConfig() + { + return isset($this->transfer_config); + } + + public function clearTransferConfig() + { + unset($this->transfer_config); + } + + /** + * Required. Data transfer configuration to create. + * + * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $var + * @return $this + */ + public function setTransferConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig::class); + $this->transfer_config = $var; + + return $this; + } + + /** + * Deprecated: Authorization code was required when + * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + * in any data sources. Use `version_info` instead. + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + * and new credentials are needed, as indicated by `CheckValidCreds`. In order + * to obtain authorization_code, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * update the transfer config. + * + * Generated from protobuf field string authorization_code = 3 [deprecated = true]; + * @return string + * @deprecated + */ + public function getAuthorizationCode() + { + @trigger_error('authorization_code is deprecated.', E_USER_DEPRECATED); + return $this->authorization_code; + } + + /** + * Deprecated: Authorization code was required when + * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + * in any data sources. Use `version_info` instead. + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + * and new credentials are needed, as indicated by `CheckValidCreds`. In order + * to obtain authorization_code, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * update the transfer config. + * + * Generated from protobuf field string authorization_code = 3 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setAuthorizationCode($var) + { + @trigger_error('authorization_code is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->authorization_code = $var; + + return $this; + } + + /** + * Required. Required list of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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. Required list of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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 version info. This parameter replaces `authorization_code` which + * is no longer used in any data sources. This is required only if + * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + * are needed, as indicated by `CheckValidCreds`. In order to obtain version + * info, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * update the transfer config. + * + * Generated from protobuf field string version_info = 5; + * @return string + */ + public function getVersionInfo() + { + return $this->version_info; + } + + /** + * Optional version info. This parameter replaces `authorization_code` which + * is no longer used in any data sources. This is required only if + * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + * are needed, as indicated by `CheckValidCreds`. In order to obtain version + * info, make a request to the following URL: + *
+     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+     * 
+ * * The client_id is the OAuth client_id of the data source as + * returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources + * method. + * Note that this should not be set when `service_account_name` is used to + * update the transfer config. + * + * Generated from protobuf field string version_info = 5; + * @param string $var + * @return $this + */ + public function setVersionInfo($var) + { + GPBUtil::checkString($var, True); + $this->version_info = $var; + + return $this; + } + + /** + * Optional service account email. If this field is set, the transfer config + * will be created with this service account's credentials. It requires that + * the requesting user calling this API has permissions to act as this service + * account. + * Note that not all data sources support service account credentials when + * creating a transfer config. For the latest list of data sources, read about + * [using service + * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + * + * Generated from protobuf field string service_account_name = 6; + * @return string + */ + public function getServiceAccountName() + { + return $this->service_account_name; + } + + /** + * Optional service account email. If this field is set, the transfer config + * will be created with this service account's credentials. It requires that + * the requesting user calling this API has permissions to act as this service + * account. + * Note that not all data sources support service account credentials when + * creating a transfer config. For the latest list of data sources, read about + * [using service + * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + * + * Generated from protobuf field string service_account_name = 6; + * @param string $var + * @return $this + */ + public function setServiceAccountName($var) + { + GPBUtil::checkString($var, True); + $this->service_account_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UserInfo.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UserInfo.php new file mode 100644 index 000000000000..c1443d0e955d --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UserInfo.php @@ -0,0 +1,77 @@ +google.cloud.bigquery.datatransfer.v1.UserInfo + */ +class UserInfo extends \Google\Protobuf\Internal\Message +{ + /** + * E-mail address of the user. + * + * Generated from protobuf field optional string email = 1; + */ + protected $email = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * E-mail address of the user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * E-mail address of the user. + * + * Generated from protobuf field optional string email = 1; + * @return string + */ + public function getEmail() + { + return isset($this->email) ? $this->email : ''; + } + + public function hasEmail() + { + return isset($this->email); + } + + public function clearEmail() + { + unset($this->email); + } + + /** + * E-mail address of the user. + * + * Generated from protobuf field optional string email = 1; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/check_valid_creds.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/check_valid_creds.php new file mode 100644 index 000000000000..fd44c27b79c6 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/check_valid_creds.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CheckValidCredsResponse $response */ + $response = $dataTransferServiceClient->checkValidCreds($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 = DataTransferServiceClient::dataSourceName('[PROJECT]', '[DATA_SOURCE]'); + + check_valid_creds_sample($formattedName); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/create_transfer_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/create_transfer_config.php new file mode 100644 index 000000000000..8fd517d92263 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/create_transfer_config.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setTransferConfig($transferConfig); + + // Call the API and handle any network failures. + try { + /** @var TransferConfig $response */ + $response = $dataTransferServiceClient->createTransferConfig($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 = DataTransferServiceClient::projectName('[PROJECT]'); + + create_transfer_config_sample($formattedParent); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_config.php new file mode 100644 index 000000000000..b61329e4e465 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_config.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dataTransferServiceClient->deleteTransferConfig($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 = DataTransferServiceClient::transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + + delete_transfer_config_sample($formattedName); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_run.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_run.php new file mode 100644 index 000000000000..ce7b3ea6cf04 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_run.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dataTransferServiceClient->deleteTransferRun($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 = DataTransferServiceClient::runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); + + delete_transfer_run_sample($formattedName); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/enroll_data_sources.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/enroll_data_sources.php new file mode 100644 index 000000000000..61f2edc53140 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/enroll_data_sources.php @@ -0,0 +1,62 @@ +enrollDataSources($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_data_source.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_data_source.php new file mode 100644 index 000000000000..c39115e7a0da --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_data_source.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataSource $response */ + $response = $dataTransferServiceClient->getDataSource($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 = DataTransferServiceClient::dataSourceName('[PROJECT]', '[DATA_SOURCE]'); + + get_data_source_sample($formattedName); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_location.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_location.php new file mode 100644 index 000000000000..c1d7d545dd69 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/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 bigquerydatatransfer_v1_generated_DataTransferService_GetLocation_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_config.php new file mode 100644 index 000000000000..61aa88b01764 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_config.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TransferConfig $response */ + $response = $dataTransferServiceClient->getTransferConfig($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 = DataTransferServiceClient::transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + + get_transfer_config_sample($formattedName); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_run.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_run.php new file mode 100644 index 000000000000..a47824de7290 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_run.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TransferRun $response */ + $response = $dataTransferServiceClient->getTransferRun($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 = DataTransferServiceClient::runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); + + get_transfer_run_sample($formattedName); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_data_sources.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_data_sources.php new file mode 100644 index 000000000000..ed56eb6de375 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_data_sources.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataTransferServiceClient->listDataSources($request); + + /** @var DataSource $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 = DataTransferServiceClient::projectName('[PROJECT]'); + + list_data_sources_sample($formattedParent); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_locations.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_locations.php new file mode 100644 index 000000000000..292209afe3af --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/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 bigquerydatatransfer_v1_generated_DataTransferService_ListLocations_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_configs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_configs.php new file mode 100644 index 000000000000..83ed0e4f60bb --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_configs.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataTransferServiceClient->listTransferConfigs($request); + + /** @var TransferConfig $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 = DataTransferServiceClient::projectName('[PROJECT]'); + + list_transfer_configs_sample($formattedParent); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_logs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_logs.php new file mode 100644 index 000000000000..ae83b475dd8c --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_logs.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataTransferServiceClient->listTransferLogs($request); + + /** @var TransferMessage $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 = DataTransferServiceClient::runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); + + list_transfer_logs_sample($formattedParent); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_runs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_runs.php new file mode 100644 index 000000000000..fdf0bc8552e5 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_runs.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataTransferServiceClient->listTransferRuns($request); + + /** @var TransferRun $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 = DataTransferServiceClient::transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + + list_transfer_runs_sample($formattedParent); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/schedule_transfer_runs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/schedule_transfer_runs.php new file mode 100644 index 000000000000..eb4bc5505a14 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/schedule_transfer_runs.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setStartTime($startTime) + ->setEndTime($endTime); + + // Call the API and handle any network failures. + try { + /** @var ScheduleTransferRunsResponse $response */ + $response = $dataTransferServiceClient->scheduleTransferRuns($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 = DataTransferServiceClient::transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + + schedule_transfer_runs_sample($formattedParent); +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php new file mode 100644 index 000000000000..38bf28def1e7 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php @@ -0,0 +1,60 @@ +startManualTransferRuns($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/unenroll_data_sources.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/unenroll_data_sources.php new file mode 100644 index 000000000000..0bdd9433964c --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/unenroll_data_sources.php @@ -0,0 +1,59 @@ +unenrollDataSources($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/update_transfer_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/update_transfer_config.php new file mode 100644 index 000000000000..1a25f828d7b2 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/update_transfer_config.php @@ -0,0 +1,63 @@ +setTransferConfig($transferConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var TransferConfig $response */ + $response = $dataTransferServiceClient->updateTransferConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/Client/DataTransferServiceClient.php b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/Client/DataTransferServiceClient.php new file mode 100644 index 000000000000..64b5a5fe8ab7 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/Client/DataTransferServiceClient.php @@ -0,0 +1,936 @@ + checkValidCredsAsync(CheckValidCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTransferConfigAsync(CreateTransferConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTransferConfigAsync(DeleteTransferConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTransferRunAsync(DeleteTransferRunRequest $request, array $optionalArgs = []) + * @method PromiseInterface enrollDataSourcesAsync(EnrollDataSourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataSourceAsync(GetDataSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTransferConfigAsync(GetTransferConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTransferRunAsync(GetTransferRunRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataSourcesAsync(ListDataSourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTransferConfigsAsync(ListTransferConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTransferLogsAsync(ListTransferLogsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTransferRunsAsync(ListTransferRunsRequest $request, array $optionalArgs = []) + * @method PromiseInterface scheduleTransferRunsAsync(ScheduleTransferRunsRequest $request, array $optionalArgs = []) + * @method PromiseInterface startManualTransferRunsAsync(StartManualTransferRunsRequest $request, array $optionalArgs = []) + * @method PromiseInterface unenrollDataSourcesAsync(UnenrollDataSourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTransferConfigAsync(UpdateTransferConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class DataTransferServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.datatransfer.v1.DataTransferService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigquerydatatransfer.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigquerydatatransfer.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/data_transfer_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_transfer_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_transfer_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_transfer_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_source + * resource. + * + * @param string $project + * @param string $dataSource + * + * @return string The formatted data_source resource. + */ + public static function dataSourceName(string $project, string $dataSource): string + { + return self::getPathTemplate('dataSource')->render([ + 'project' => $project, + 'data_source' => $dataSource, + ]); + } + + /** + * 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 project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_data_source resource. + * + * @param string $project + * @param string $dataSource + * + * @return string The formatted project_data_source resource. + */ + public static function projectDataSourceName(string $project, string $dataSource): string + { + return self::getPathTemplate('projectDataSource')->render([ + 'project' => $project, + 'data_source' => $dataSource, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_source resource. + * + * @param string $project + * @param string $location + * @param string $dataSource + * + * @return string The formatted project_location_data_source resource. + */ + public static function projectLocationDataSourceName(string $project, string $location, string $dataSource): string + { + return self::getPathTemplate('projectLocationDataSource')->render([ + 'project' => $project, + 'location' => $location, + 'data_source' => $dataSource, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_transfer_config resource. + * + * @param string $project + * @param string $location + * @param string $transferConfig + * + * @return string The formatted project_location_transfer_config resource. + */ + public static function projectLocationTransferConfigName(string $project, string $location, string $transferConfig): string + { + return self::getPathTemplate('projectLocationTransferConfig')->render([ + 'project' => $project, + 'location' => $location, + 'transfer_config' => $transferConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_transfer_config_run resource. + * + * @param string $project + * @param string $location + * @param string $transferConfig + * @param string $run + * + * @return string The formatted project_location_transfer_config_run resource. + */ + public static function projectLocationTransferConfigRunName(string $project, string $location, string $transferConfig, string $run): string + { + return self::getPathTemplate('projectLocationTransferConfigRun')->render([ + 'project' => $project, + 'location' => $location, + 'transfer_config' => $transferConfig, + 'run' => $run, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_transfer_config resource. + * + * @param string $project + * @param string $transferConfig + * + * @return string The formatted project_transfer_config resource. + */ + public static function projectTransferConfigName(string $project, string $transferConfig): string + { + return self::getPathTemplate('projectTransferConfig')->render([ + 'project' => $project, + 'transfer_config' => $transferConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_transfer_config_run resource. + * + * @param string $project + * @param string $transferConfig + * @param string $run + * + * @return string The formatted project_transfer_config_run resource. + */ + public static function projectTransferConfigRunName(string $project, string $transferConfig, string $run): string + { + return self::getPathTemplate('projectTransferConfigRun')->render([ + 'project' => $project, + 'transfer_config' => $transferConfig, + 'run' => $run, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a run + * resource. + * + * @param string $project + * @param string $transferConfig + * @param string $run + * + * @return string The formatted run resource. + */ + public static function runName(string $project, string $transferConfig, string $run): string + { + return self::getPathTemplate('run')->render([ + 'project' => $project, + 'transfer_config' => $transferConfig, + 'run' => $run, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * transfer_config resource. + * + * @param string $project + * @param string $transferConfig + * + * @return string The formatted transfer_config resource. + */ + public static function transferConfigName(string $project, string $transferConfig): string + { + return self::getPathTemplate('transferConfig')->render([ + 'project' => $project, + 'transfer_config' => $transferConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataSource: projects/{project}/dataSources/{data_source} + * - location: projects/{project}/locations/{location} + * - project: projects/{project} + * - projectDataSource: projects/{project}/dataSources/{data_source} + * - projectLocationDataSource: projects/{project}/locations/{location}/dataSources/{data_source} + * - projectLocationTransferConfig: projects/{project}/locations/{location}/transferConfigs/{transfer_config} + * - projectLocationTransferConfigRun: projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run} + * - projectTransferConfig: projects/{project}/transferConfigs/{transfer_config} + * - projectTransferConfigRun: projects/{project}/transferConfigs/{transfer_config}/runs/{run} + * - run: projects/{project}/transferConfigs/{transfer_config}/runs/{run} + * - transferConfig: projects/{project}/transferConfigs/{transfer_config} + * + * 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 'bigquerydatatransfer.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); + } + + /** + * Returns true if valid credentials exist for the given data source and + * requesting user. + * + * The async variant is {@see DataTransferServiceClient::checkValidCredsAsync()} . + * + * @example samples/V1/DataTransferServiceClient/check_valid_creds.php + * + * @param CheckValidCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CheckValidCredsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function checkValidCreds(CheckValidCredsRequest $request, array $callOptions = []): CheckValidCredsResponse + { + return $this->startApiCall('CheckValidCreds', $request, $callOptions)->wait(); + } + + /** + * Creates a new data transfer configuration. + * + * The async variant is + * {@see DataTransferServiceClient::createTransferConfigAsync()} . + * + * @example samples/V1/DataTransferServiceClient/create_transfer_config.php + * + * @param CreateTransferConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransferConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTransferConfig(CreateTransferConfigRequest $request, array $callOptions = []): TransferConfig + { + return $this->startApiCall('CreateTransferConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a data transfer configuration, including any associated transfer + * runs and logs. + * + * The async variant is + * {@see DataTransferServiceClient::deleteTransferConfigAsync()} . + * + * @example samples/V1/DataTransferServiceClient/delete_transfer_config.php + * + * @param DeleteTransferConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteTransferConfig(DeleteTransferConfigRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTransferConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified transfer run. + * + * The async variant is {@see DataTransferServiceClient::deleteTransferRunAsync()} + * . + * + * @example samples/V1/DataTransferServiceClient/delete_transfer_run.php + * + * @param DeleteTransferRunRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteTransferRun(DeleteTransferRunRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTransferRun', $request, $callOptions)->wait(); + } + + /** + * Enroll data sources in a user project. This allows users to create transfer + * configurations for these data sources. They will also appear in the + * ListDataSources RPC and as such, will appear in the + * [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents + * can be found in the public guide for + * [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and + * [Data Transfer + * Service](https://cloud.google.com/bigquery/docs/working-with-transfers). + * + * The async variant is {@see DataTransferServiceClient::enrollDataSourcesAsync()} + * . + * + * @example samples/V1/DataTransferServiceClient/enroll_data_sources.php + * + * @param EnrollDataSourcesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 enrollDataSources(EnrollDataSourcesRequest $request, array $callOptions = []): void + { + $this->startApiCall('EnrollDataSources', $request, $callOptions)->wait(); + } + + /** + * Retrieves a supported data source and returns its settings. + * + * The async variant is {@see DataTransferServiceClient::getDataSourceAsync()} . + * + * @example samples/V1/DataTransferServiceClient/get_data_source.php + * + * @param GetDataSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DataSource + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataSource(GetDataSourceRequest $request, array $callOptions = []): DataSource + { + return $this->startApiCall('GetDataSource', $request, $callOptions)->wait(); + } + + /** + * Returns information about a data transfer config. + * + * The async variant is {@see DataTransferServiceClient::getTransferConfigAsync()} + * . + * + * @example samples/V1/DataTransferServiceClient/get_transfer_config.php + * + * @param GetTransferConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransferConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTransferConfig(GetTransferConfigRequest $request, array $callOptions = []): TransferConfig + { + return $this->startApiCall('GetTransferConfig', $request, $callOptions)->wait(); + } + + /** + * Returns information about the particular transfer run. + * + * The async variant is {@see DataTransferServiceClient::getTransferRunAsync()} . + * + * @example samples/V1/DataTransferServiceClient/get_transfer_run.php + * + * @param GetTransferRunRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransferRun + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTransferRun(GetTransferRunRequest $request, array $callOptions = []): TransferRun + { + return $this->startApiCall('GetTransferRun', $request, $callOptions)->wait(); + } + + /** + * Lists supported data sources and returns their settings. + * + * The async variant is {@see DataTransferServiceClient::listDataSourcesAsync()} . + * + * @example samples/V1/DataTransferServiceClient/list_data_sources.php + * + * @param ListDataSourcesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDataSources(ListDataSourcesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataSources', $request, $callOptions); + } + + /** + * Returns information about all transfer configs owned by a project in the + * specified location. + * + * The async variant is + * {@see DataTransferServiceClient::listTransferConfigsAsync()} . + * + * @example samples/V1/DataTransferServiceClient/list_transfer_configs.php + * + * @param ListTransferConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTransferConfigs(ListTransferConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTransferConfigs', $request, $callOptions); + } + + /** + * Returns log messages for the transfer run. + * + * The async variant is {@see DataTransferServiceClient::listTransferLogsAsync()} . + * + * @example samples/V1/DataTransferServiceClient/list_transfer_logs.php + * + * @param ListTransferLogsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTransferLogs(ListTransferLogsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTransferLogs', $request, $callOptions); + } + + /** + * Returns information about running and completed transfer runs. + * + * The async variant is {@see DataTransferServiceClient::listTransferRunsAsync()} . + * + * @example samples/V1/DataTransferServiceClient/list_transfer_runs.php + * + * @param ListTransferRunsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTransferRuns(ListTransferRunsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTransferRuns', $request, $callOptions); + } + + /** + * Creates transfer runs for a time range [start_time, end_time]. + * For each date - or whatever granularity the data source supports - in the + * range, one transfer run is created. + * Note that runs are created per UTC time in the time range. + * DEPRECATED: use StartManualTransferRuns instead. + * + * The async variant is + * {@see DataTransferServiceClient::scheduleTransferRunsAsync()} . + * + * @example samples/V1/DataTransferServiceClient/schedule_transfer_runs.php + * + * @param ScheduleTransferRunsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ScheduleTransferRunsResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @deprecated This method will be removed in the next major version update. + */ + public function scheduleTransferRuns(ScheduleTransferRunsRequest $request, array $callOptions = []): ScheduleTransferRunsResponse + { + return $this->startApiCall('ScheduleTransferRuns', $request, $callOptions)->wait(); + } + + /** + * Start manual transfer runs to be executed now with schedule_time equal to + * current time. The transfer runs can be created for a time range where the + * run_time is between start_time (inclusive) and end_time (exclusive), or for + * a specific run_time. + * + * The async variant is + * {@see DataTransferServiceClient::startManualTransferRunsAsync()} . + * + * @example samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php + * + * @param StartManualTransferRunsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StartManualTransferRunsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function startManualTransferRuns(StartManualTransferRunsRequest $request, array $callOptions = []): StartManualTransferRunsResponse + { + return $this->startApiCall('StartManualTransferRuns', $request, $callOptions)->wait(); + } + + /** + * Unenroll data sources in a user project. This allows users to remove + * transfer configurations for these data sources. They will no longer appear + * in the ListDataSources RPC and will also no longer appear in the [BigQuery + * UI](https://console.cloud.google.com/bigquery). Data transfers + * configurations of unenrolled data sources will not be scheduled. + * + * The async variant is + * {@see DataTransferServiceClient::unenrollDataSourcesAsync()} . + * + * @example samples/V1/DataTransferServiceClient/unenroll_data_sources.php + * + * @param UnenrollDataSourcesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 unenrollDataSources(UnenrollDataSourcesRequest $request, array $callOptions = []): void + { + $this->startApiCall('UnenrollDataSources', $request, $callOptions)->wait(); + } + + /** + * Updates a data transfer configuration. + * All fields must be set, even if they are not updated. + * + * The async variant is + * {@see DataTransferServiceClient::updateTransferConfigAsync()} . + * + * @example samples/V1/DataTransferServiceClient/update_transfer_config.php + * + * @param UpdateTransferConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransferConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTransferConfig(UpdateTransferConfigRequest $request, array $callOptions = []): TransferConfig + { + return $this->startApiCall('UpdateTransferConfig', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DataTransferServiceClient::getLocationAsync()} . + * + * @example samples/V1/DataTransferServiceClient/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 DataTransferServiceClient::listLocationsAsync()} . + * + * @example samples/V1/DataTransferServiceClient/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/BigQueryDataTransfer/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..23bf9fbef1f5 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/gapic_metadata.json @@ -0,0 +1,108 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.datatransfer.v1", + "libraryPackage": "Google\\Cloud\\BigQuery\\DataTransfer\\V1", + "services": { + "DataTransferService": { + "clients": { + "grpc": { + "libraryClient": "DataTransferServiceGapicClient", + "rpcs": { + "CheckValidCreds": { + "methods": [ + "checkValidCreds" + ] + }, + "CreateTransferConfig": { + "methods": [ + "createTransferConfig" + ] + }, + "DeleteTransferConfig": { + "methods": [ + "deleteTransferConfig" + ] + }, + "DeleteTransferRun": { + "methods": [ + "deleteTransferRun" + ] + }, + "EnrollDataSources": { + "methods": [ + "enrollDataSources" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "GetTransferConfig": { + "methods": [ + "getTransferConfig" + ] + }, + "GetTransferRun": { + "methods": [ + "getTransferRun" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources" + ] + }, + "ListTransferConfigs": { + "methods": [ + "listTransferConfigs" + ] + }, + "ListTransferLogs": { + "methods": [ + "listTransferLogs" + ] + }, + "ListTransferRuns": { + "methods": [ + "listTransferRuns" + ] + }, + "ScheduleTransferRuns": { + "methods": [ + "scheduleTransferRuns" + ] + }, + "StartManualTransferRuns": { + "methods": [ + "startManualTransferRuns" + ] + }, + "UnenrollDataSources": { + "methods": [ + "unenrollDataSources" + ] + }, + "UpdateTransferConfig": { + "methods": [ + "updateTransferConfig" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_client_config.json b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_client_config.json new file mode 100644 index 000000000000..80caf7d9cba5 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_client_config.json @@ -0,0 +1,135 @@ +{ + "interfaces": { + "google.cloud.bigquery.datatransfer.v1.DataTransferService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ], + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 20000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CheckValidCreds": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateTransferConfig": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteTransferConfig": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteTransferRun": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "EnrollDataSources": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDataSource": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTransferConfig": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTransferRun": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDataSources": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTransferConfigs": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTransferLogs": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTransferRuns": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ScheduleTransferRuns": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartManualTransferRuns": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UnenrollDataSources": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateTransferConfig": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_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/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_descriptor_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_descriptor_config.php new file mode 100644 index 000000000000..fa7c2336fc25 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_descriptor_config.php @@ -0,0 +1,300 @@ + [ + 'google.cloud.bigquery.datatransfer.v1.DataTransferService' => [ + 'CheckValidCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\CheckValidCredsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateTransferConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteTransferConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTransferRun' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EnrollDataSources' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataSource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\DataSource', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTransferConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTransferRun' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\TransferRun', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDataSources' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataSources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ListDataSourcesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTransferConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTransferConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ListTransferConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTransferLogs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTransferMessages', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ListTransferLogsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTransferRuns' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTransferRuns', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ScheduleTransferRuns' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ScheduleTransferRunsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'StartManualTransferRuns' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UnenrollDataSources' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateTransferConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig', + 'headerParams' => [ + [ + 'keyName' => 'transfer_config.name', + 'fieldAccessors' => [ + 'getTransferConfig', + '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' => [ + 'dataSource' => 'projects/{project}/dataSources/{data_source}', + 'location' => 'projects/{project}/locations/{location}', + 'project' => 'projects/{project}', + 'projectDataSource' => 'projects/{project}/dataSources/{data_source}', + 'projectLocationDataSource' => 'projects/{project}/locations/{location}/dataSources/{data_source}', + 'projectLocationTransferConfig' => 'projects/{project}/locations/{location}/transferConfigs/{transfer_config}', + 'projectLocationTransferConfigRun' => 'projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}', + 'projectTransferConfig' => 'projects/{project}/transferConfigs/{transfer_config}', + 'projectTransferConfigRun' => 'projects/{project}/transferConfigs/{transfer_config}/runs/{run}', + 'run' => 'projects/{project}/transferConfigs/{transfer_config}/runs/{run}', + 'transferConfig' => 'projects/{project}/transferConfigs/{transfer_config}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_rest_client_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_rest_client_config.php new file mode 100644 index 000000000000..ba2556ef3d8d --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_rest_client_config.php @@ -0,0 +1,339 @@ + [ + 'google.cloud.bigquery.datatransfer.v1.DataTransferService' => [ + 'CheckValidCreds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/dataSources/*}:checkValidCreds', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateTransferConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/transferConfigs', + 'body' => 'transfer_config', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/transferConfigs', + 'body' => 'transfer_config', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteTransferConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/transferConfigs/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/transferConfigs/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTransferRun' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/transferConfigs/*/runs/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EnrollDataSources' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}:enrollDataSources', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*}:enrollDataSources', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataSource' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataSources/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/dataSources/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTransferConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/transferConfigs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/transferConfigs/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTransferRun' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/transferConfigs/*/runs/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDataSources' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataSources', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/dataSources', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTransferConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/transferConfigs', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/transferConfigs', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTransferLogs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogs', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTransferRuns' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/transferConfigs/*}/runs', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/transferConfigs/*}/runs', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ScheduleTransferRuns' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartManualTransferRuns' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/transferConfigs/*}:startManualRuns', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/transferConfigs/*}:startManualRuns', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UnenrollDataSources' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}:unenrollDataSources', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateTransferConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}', + 'body' => 'transfer_config', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{transfer_config.name=projects/*/transferConfigs/*}', + 'body' => 'transfer_config', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'transfer_config.name' => [ + 'getters' => [ + 'getTransferConfig', + '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', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/tests/Unit/V1/Client/DataTransferServiceClientTest.php b/owl-bot-staging/BigQueryDataTransfer/v1/tests/Unit/V1/Client/DataTransferServiceClientTest.php new file mode 100644 index 000000000000..b68964a97156 --- /dev/null +++ b/owl-bot-staging/BigQueryDataTransfer/v1/tests/Unit/V1/Client/DataTransferServiceClientTest.php @@ -0,0 +1,1373 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataTransferServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataTransferServiceClient($options); + } + + /** @test */ + public function checkValidCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $hasValidCreds = false; + $expectedResponse = new CheckValidCredsResponse(); + $expectedResponse->setHasValidCreds($hasValidCreds); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); + $request = (new CheckValidCredsRequest()) + ->setName($formattedName); + $response = $gapicClient->checkValidCreds($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.bigquery.datatransfer.v1.DataTransferService/CheckValidCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function checkValidCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); + $request = (new CheckValidCredsRequest()) + ->setName($formattedName); + try { + $gapicClient->checkValidCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTransferConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $destinationDatasetId = 'destinationDatasetId1541564179'; + $displayName = 'displayName1615086568'; + $dataSourceId = 'dataSourceId-1015796374'; + $schedule = 'schedule-697920873'; + $dataRefreshWindowDays = 327632845; + $disabled = true; + $userId = 147132913; + $datasetRegion = 'datasetRegion959248539'; + $notificationPubsubTopic = 'notificationPubsubTopic1794281191'; + $expectedResponse = new TransferConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDestinationDatasetId($destinationDatasetId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDataSourceId($dataSourceId); + $expectedResponse->setSchedule($schedule); + $expectedResponse->setDataRefreshWindowDays($dataRefreshWindowDays); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setUserId($userId); + $expectedResponse->setDatasetRegion($datasetRegion); + $expectedResponse->setNotificationPubsubTopic($notificationPubsubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $transferConfig = new TransferConfig(); + $request = (new CreateTransferConfigRequest()) + ->setParent($formattedParent) + ->setTransferConfig($transferConfig); + $response = $gapicClient->createTransferConfig($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.bigquery.datatransfer.v1.DataTransferService/CreateTransferConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTransferConfig(); + $this->assertProtobufEquals($transferConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTransferConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->projectName('[PROJECT]'); + $transferConfig = new TransferConfig(); + $request = (new CreateTransferConfigRequest()) + ->setParent($formattedParent) + ->setTransferConfig($transferConfig); + try { + $gapicClient->createTransferConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTransferConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + $request = (new DeleteTransferConfigRequest()) + ->setName($formattedName); + $gapicClient->deleteTransferConfig($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/DeleteTransferConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTransferConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + $request = (new DeleteTransferConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTransferConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTransferRunTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); + $request = (new DeleteTransferRunRequest()) + ->setName($formattedName); + $gapicClient->deleteTransferRun($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/DeleteTransferRun', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTransferRunExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); + $request = (new DeleteTransferRunRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTransferRun($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enrollDataSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + $request = new EnrollDataSourcesRequest(); + $gapicClient->enrollDataSources($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/EnrollDataSources', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enrollDataSourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 EnrollDataSourcesRequest(); + try { + $gapicClient->enrollDataSources($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dataSourceId = 'dataSourceId-1015796374'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $clientId = 'clientId-1904089585'; + $supportsMultipleTransfers = true; + $updateDeadlineSeconds = 991471694; + $defaultSchedule = 'defaultSchedule-800168235'; + $supportsCustomSchedule = true; + $helpUrl = 'helpUrl-789431439'; + $defaultDataRefreshWindowDays = 1804935157; + $manualRunsDisabled = true; + $expectedResponse = new DataSource(); + $expectedResponse->setName($name2); + $expectedResponse->setDataSourceId($dataSourceId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setClientId($clientId); + $expectedResponse->setSupportsMultipleTransfers($supportsMultipleTransfers); + $expectedResponse->setUpdateDeadlineSeconds($updateDeadlineSeconds); + $expectedResponse->setDefaultSchedule($defaultSchedule); + $expectedResponse->setSupportsCustomSchedule($supportsCustomSchedule); + $expectedResponse->setHelpUrl($helpUrl); + $expectedResponse->setDefaultDataRefreshWindowDays($defaultDataRefreshWindowDays); + $expectedResponse->setManualRunsDisabled($manualRunsDisabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); + $request = (new GetDataSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataSource($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.bigquery.datatransfer.v1.DataTransferService/GetDataSource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); + $request = (new GetDataSourceRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataSource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTransferConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $destinationDatasetId = 'destinationDatasetId1541564179'; + $displayName = 'displayName1615086568'; + $dataSourceId = 'dataSourceId-1015796374'; + $schedule = 'schedule-697920873'; + $dataRefreshWindowDays = 327632845; + $disabled = true; + $userId = 147132913; + $datasetRegion = 'datasetRegion959248539'; + $notificationPubsubTopic = 'notificationPubsubTopic1794281191'; + $expectedResponse = new TransferConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDestinationDatasetId($destinationDatasetId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDataSourceId($dataSourceId); + $expectedResponse->setSchedule($schedule); + $expectedResponse->setDataRefreshWindowDays($dataRefreshWindowDays); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setUserId($userId); + $expectedResponse->setDatasetRegion($datasetRegion); + $expectedResponse->setNotificationPubsubTopic($notificationPubsubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + $request = (new GetTransferConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getTransferConfig($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.bigquery.datatransfer.v1.DataTransferService/GetTransferConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTransferConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + $request = (new GetTransferConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getTransferConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTransferRunTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $destinationDatasetId = 'destinationDatasetId1541564179'; + $dataSourceId = 'dataSourceId-1015796374'; + $userId = 147132913; + $schedule = 'schedule-697920873'; + $notificationPubsubTopic = 'notificationPubsubTopic1794281191'; + $expectedResponse = new TransferRun(); + $expectedResponse->setName($name2); + $expectedResponse->setDestinationDatasetId($destinationDatasetId); + $expectedResponse->setDataSourceId($dataSourceId); + $expectedResponse->setUserId($userId); + $expectedResponse->setSchedule($schedule); + $expectedResponse->setNotificationPubsubTopic($notificationPubsubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); + $request = (new GetTransferRunRequest()) + ->setName($formattedName); + $response = $gapicClient->getTransferRun($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.bigquery.datatransfer.v1.DataTransferService/GetTransferRun', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTransferRunExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); + $request = (new GetTransferRunRequest()) + ->setName($formattedName); + try { + $gapicClient->getTransferRun($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataSourcesElement = new DataSource(); + $dataSources = [ + $dataSourcesElement, + ]; + $expectedResponse = new ListDataSourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataSources($dataSources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListDataSourcesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataSources($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataSources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListDataSources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataSourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->projectName('[PROJECT]'); + $request = (new ListDataSourcesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataSources($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransferConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $transferConfigsElement = new TransferConfig(); + $transferConfigs = [ + $transferConfigsElement, + ]; + $expectedResponse = new ListTransferConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTransferConfigs($transferConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListTransferConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTransferConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTransferConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransferConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->projectName('[PROJECT]'); + $request = (new ListTransferConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTransferConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransferLogsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $transferMessagesElement = new TransferMessage(); + $transferMessages = [ + $transferMessagesElement, + ]; + $expectedResponse = new ListTransferLogsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTransferMessages($transferMessages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); + $request = (new ListTransferLogsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTransferLogs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTransferMessages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferLogs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransferLogsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); + $request = (new ListTransferLogsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTransferLogs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransferRunsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $transferRunsElement = new TransferRun(); + $transferRuns = [ + $transferRunsElement, + ]; + $expectedResponse = new ListTransferRunsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTransferRuns($transferRuns); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + $request = (new ListTransferRunsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTransferRuns($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTransferRuns()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferRuns', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransferRunsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + $request = (new ListTransferRunsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTransferRuns($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function scheduleTransferRunsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ScheduleTransferRunsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + $startTime = new Timestamp(); + $endTime = new Timestamp(); + $request = (new ScheduleTransferRunsRequest()) + ->setParent($formattedParent) + ->setStartTime($startTime) + ->setEndTime($endTime); + $response = $gapicClient->scheduleTransferRuns($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.bigquery.datatransfer.v1.DataTransferService/ScheduleTransferRuns', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getStartTime(); + $this->assertProtobufEquals($startTime, $actualValue); + $actualValue = $actualRequestObject->getEndTime(); + $this->assertProtobufEquals($endTime, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function scheduleTransferRunsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); + $startTime = new Timestamp(); + $endTime = new Timestamp(); + $request = (new ScheduleTransferRunsRequest()) + ->setParent($formattedParent) + ->setStartTime($startTime) + ->setEndTime($endTime); + try { + $gapicClient->scheduleTransferRuns($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startManualTransferRunsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new StartManualTransferRunsResponse(); + $transport->addResponse($expectedResponse); + $request = new StartManualTransferRunsRequest(); + $response = $gapicClient->startManualTransferRuns($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.bigquery.datatransfer.v1.DataTransferService/StartManualTransferRuns', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startManualTransferRunsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 StartManualTransferRunsRequest(); + try { + $gapicClient->startManualTransferRuns($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function unenrollDataSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + $request = new UnenrollDataSourcesRequest(); + $gapicClient->unenrollDataSources($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/UnenrollDataSources', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function unenrollDataSourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 UnenrollDataSourcesRequest(); + try { + $gapicClient->unenrollDataSources($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTransferConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $destinationDatasetId = 'destinationDatasetId1541564179'; + $displayName = 'displayName1615086568'; + $dataSourceId = 'dataSourceId-1015796374'; + $schedule = 'schedule-697920873'; + $dataRefreshWindowDays = 327632845; + $disabled = true; + $userId = 147132913; + $datasetRegion = 'datasetRegion959248539'; + $notificationPubsubTopic = 'notificationPubsubTopic1794281191'; + $expectedResponse = new TransferConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDestinationDatasetId($destinationDatasetId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDataSourceId($dataSourceId); + $expectedResponse->setSchedule($schedule); + $expectedResponse->setDataRefreshWindowDays($dataRefreshWindowDays); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setUserId($userId); + $expectedResponse->setDatasetRegion($datasetRegion); + $expectedResponse->setNotificationPubsubTopic($notificationPubsubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $transferConfig = new TransferConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateTransferConfigRequest()) + ->setTransferConfig($transferConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateTransferConfig($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.bigquery.datatransfer.v1.DataTransferService/UpdateTransferConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getTransferConfig(); + $this->assertProtobufEquals($transferConfig, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTransferConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $transferConfig = new TransferConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateTransferConfigRequest()) + ->setTransferConfig($transferConfig) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateTransferConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 checkValidCredsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $hasValidCreds = false; + $expectedResponse = new CheckValidCredsResponse(); + $expectedResponse->setHasValidCreds($hasValidCreds); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); + $request = (new CheckValidCredsRequest()) + ->setName($formattedName); + $response = $gapicClient->checkValidCredsAsync($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.bigquery.datatransfer.v1.DataTransferService/CheckValidCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationEntities.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationEntities.php new file mode 100644 index 0000000000000000000000000000000000000000..28064ec72497d2b18389ba2661dbef4568868935 GIT binary patch literal 4645 zcmcIoOK;mo5RNR#j#joSuVY6wf|gZ-#z9*OQHwrg=b;B}3$-Ohl2f!GKv2|5VMCKF z9}e6=J@wGv(sO|RhaUS2a_+h4xwFfMXj_%&B=w1+cfOgO{l1yy>^?M~n&?ArpXkJr z9WvnhXPontaHeHAhGJ-3-yIH##VN*#scOXHIj-K~nynru)Em7Iz|=NeOCe=$WEdlj z6cx>I2gSZR`q3rUS@A?20j_H3#naN{heUKobyQ;W%nw4kd_rtfRtUG>t{xFb9>|U? z?lVZSMj^$j4=El6km8fl4nm41+cp=z6ntd#0&(zXx_wPmINO0B6z;ZaOR5f@WljAF zHhZ5N%9>382vDJWRUwwrN0e?sGwmZJIC0mDtc7V(GFb)`_iH zs_7V387we%epHw74nPvVpe zR!mjgQ;9aHlBe>iYFOp+WLFcA|1#|m|Bz!_%{a2j`3aU~SampTRkPy<6bl+CWU0zq zLhV_yZflIiHA5e&qqh@m1oo{aA%c5s%Y9W-owN86heYnFAW26)G2`2IOhuf3s7yMa zK2Uw3R0e}k7kf}*wnHXUUf)44x6sZT)D~RujCod=_@FTHVPWD=OIz>y4rEg;T0Ysm z(zNyHYQ8C@rGdw3AEA6DgcFaszHOYHI}>_J3gf45yc@%D)cAbZ53XqK23+&Kzwg_# z3J;aB=mdoF7rf^$uuP>$F6XWAPYSJtW&K;jdN$OI=lCW{(PoiPaEa|qHS?;Hd{s%m zs$9o6(DFdFO-(+N*n&m60Jl)uk?m)8et}DFXG@QG&*>~S@RywOJqiJx#X6&av`~|L z67W|`JFf@Wr4UsJJ&B7bt5^hnN;E;W0|HUEvM1*6me#f^^*M zwuM?_uOZZP*Kh`<>z&G8FPFeswA49nHXF_T+yX{uv0XXt!kQ#rL77_XsC_8(;Ag7r z{#CJ1DUj?$vECViSZyBeCB;kUg?AxsKM=*Si!c1AaZxiAR>I+3@Hj3$_h|($gU4~< zdenz6#(a)}e{n_d2`okn z>cCgaqNf(Tj8e{->7925e-kj8Qg5~NWgJ)M(!)pC4CI82E5x={eIzki=RI<61h}Ag zo^^?aJ~XCkfJ*o38d#cZC5mV>DDPfu;Tf*6@(^q9!EGqg>AYRsLN_j;D~78(c?^N2 z@k6xa*Y^B6bH)b=nWZx-`!2EIs*E3_tOI0}z=x|j`5SDzu_8WqS`a>%dlBD8w;aQf zHRh3n_nu0Y){UG_a(5zF*C-53tX?1D`Lbunc^t>t%DGA9) zNl4L>&^@lz1fdQkAx;0aS7{u=^I~-sEwhC9QYrkMM!9gSUAIsF32hn zNP`x=OehIj)ibymNP<##wN#FCQWrhXQ-w$JS*n;p*X93_t}FCFFSe!m;+oc$t^?F; zAxBh^eH~R4PUjF02ve!`8c&3aedipp80UOqr6T-G<4uHp;!1UaJ_*g*ce%y#uZh1Z zza-GT_}wXBWa~|uQ_=Q#4GqhG8W(;>>mm7iz(u`mf{gI?}Qx z;0M>L8MG7#@Am}Sn7RxfOqv=QNbn^BQwGh3c0?~@AIEWj=-J>NTDOR4SdOF_BMClD zYinternalAddGeneratedFile( + ' +ß +@google/cloud/bigquery/migration/v2/migration_error_details.proto"google.cloud.bigquery.migration.v2google/rpc/error_details.proto"² +ResourceErrorDetail4 + resource_info ( 2.google.rpc.ResourceInfoBàAK + error_details ( 2/.google.cloud.bigquery.migration.v2.ErrorDetailBàA + error_count (BàA"‡ + ErrorDetailH +location ( 21.google.cloud.bigquery.migration.v2.ErrorLocationBàA. + +error_info ( 2.google.rpc.ErrorInfoBàA"7 + ErrorLocation +line (BàA +column (BàABÖ +&com.google.cloud.bigquery.migration.v2BMigrationErrorDetailsProtoPZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpbª"Google.Cloud.BigQuery.Migration.V2Ê"Google\\Cloud\\BigQuery\\Migration\\V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationMetrics.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationMetrics.php new file mode 100644 index 0000000000000000000000000000000000000000..21788890345126b0a90954c3308ebc80bdc8cdbb GIT binary patch literal 1890 zcmbVN&2G~`5XMbg(oMy|P>6bA300d);DC#Ia7nAUp=pImgNS-SmLmUb(iM(v>~*Aq z`T{&kZ@dOK-hd15!R)T>1o}fEr+9Y0Z)d)loq4$vokZv{?vQ}QHX|N(PBA+nIEq6S zx}lGqbTA+>cEeFbeG+RJw~z3fqaJ?MKIlCHXcDHeOAI^=!=XM*7DBQiq6)?`trk!-;QWwzy<3&nPRfVmmf?y$mY)ua-?_(&_WHC=Pn&;KNWJCC<+fPZKokpZO0|$5XRV|AfV$x(KCQYdwbN3#2 zOM(`vNY?%b8hF)`V6fJ%rI4Jj!Jl&|>Nc8>La0enoyDbkMPJX+*9fO|IYPux`=X#Z z@u`}qENTlmi7YGnvzu^nl@54M08VY9IU$KqqoQj!A^<%+p-gRz7JsALKnNN#W_@0s zEU4w2Gq0V-A);@kBF|Bo1fGQOqEz(1KxS&^yxK(=>OF)Um==AR3a@y1|CYLhDxlBi zi_FZaOJKf_7QGNA9?9&yii))J#~%zc`z+WOz`lu8Z)z-Lr*m*x(W`lGynCjH$Nnwz zb|$U)T|uj`7;@KZ>TE9kIibZ{?<()x5|zKPaMT!vm#q(oV|s%`&Q|dNBj z+vUqbgJtoSuOF?rRXf(dinternalAddGeneratedFile( + ' +Ô +:google/cloud/bigquery/migration/v2/migration_service.proto"google.cloud.bigquery.migration.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto;google/cloud/bigquery/migration/v2/migration_entities.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"³ +CreateMigrationWorkflowRequest9 +parent ( B)àAúA# +!locations.googleapis.com/LocationV +migration_workflow ( 25.google.cloud.bigquery.migration.v2.MigrationWorkflowBàA"– +GetMigrationWorkflowRequestH +name ( B:àAúA4 +2bigquerymigration.googleapis.com/MigrationWorkflow- + read_mask ( 2.google.protobuf.FieldMask"° +ListMigrationWorkflowsRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location- + read_mask ( 2.google.protobuf.FieldMask + page_size ( + +page_token ( " +ListMigrationWorkflowsResponseR +migration_workflows ( 25.google.cloud.bigquery.migration.v2.MigrationWorkflow +next_page_token ( "j +DeleteMigrationWorkflowRequestH +name ( B:àAúA4 +2bigquerymigration.googleapis.com/MigrationWorkflow"i +StartMigrationWorkflowRequestH +name ( B:àAúA4 +2bigquerymigration.googleapis.com/MigrationWorkflow"™ +GetMigrationSubtaskRequestG +name ( B9àAúA3 +1bigquerymigration.googleapis.com/MigrationSubtask2 + read_mask ( 2.google.protobuf.FieldMaskBàA"ä +ListMigrationSubtasksRequestJ +parent ( B:àAúA4 +2bigquerymigration.googleapis.com/MigrationWorkflow2 + read_mask ( 2.google.protobuf.FieldMaskBàA + page_size (BàA + +page_token ( BàA +filter ( BàA"Š +ListMigrationSubtasksResponseP +migration_subtasks ( 24.google.cloud.bigquery.migration.v2.MigrationSubtask +next_page_token ( 2Ë +MigrationServiceû +CreateMigrationWorkflowB.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest5.google.cloud.bigquery.migration.v2.MigrationWorkflow"eÚAparent,migration_workflow‚Óä“C"-/v2/{parent=projects/*/locations/*}/workflows:migration_workflowÌ +GetMigrationWorkflow?.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest5.google.cloud.bigquery.migration.v2.MigrationWorkflow"<ÚAname‚Óä“/-/v2/{name=projects/*/locations/*/workflows/*}ß +ListMigrationWorkflowsA.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequestB.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse">ÚAparent‚Óä“/-/v2/{parent=projects/*/locations/*}/workflows³ +DeleteMigrationWorkflowB.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.google.protobuf.Empty"<ÚAname‚Óä“/*-/v2/{name=projects/*/locations/*/workflows/*}º +StartMigrationWorkflowA.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.google.protobuf.Empty"EÚAname‚Óä“8"3/v2/{name=projects/*/locations/*/workflows/*}:start:*Ô +GetMigrationSubtask>.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest4.google.cloud.bigquery.migration.v2.MigrationSubtask"GÚAname‚Óä“:8/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}ç +ListMigrationSubtasks@.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequestA.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse"IÚAparent‚Óä“:8/v2/{parent=projects/*/locations/*/workflows/*}/subtasksTÊA bigquerymigration.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÑ +&com.google.cloud.bigquery.migration.v2BMigrationServiceProtoPZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpbª"Google.Cloud.BigQuery.Migration.V2Ê"Google\\Cloud\\BigQuery\\Migration\\V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationConfig.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..7bf3333eef5aef13d4089156d2f090f7b2681551 GIT binary patch literal 4030 zcmbuC-E!Mh5XbA-P2x>r%PQ@dUJ12B(}Bw1!T=71v12FkG>)Cv%}~ZOMwX9lQCU)@ zBQpup7vLRu0l4QOxa0|X&r7i9=*u5rP>0+kk^ zH!2PF$!m`|SEZRgL9T9@rFpqT9o2LV{_jAu%&|UE_;&zIbw*rU)rfT5skI1IM=DkO z#~j%|WXOIkK=xZ9vVU1V0MHE8b){a6KICNh86^C%y`iCNl1uTcn)Fb22fC?KT{ZM; zboQAvRt=XRWqs|~Gc_h$Vg_wfBm0jfpUKufv@HzIGbz;AVe!IP^_wOoj;R{`I&n2e zx2ffHaA~D7AvB6Id$RvH_$BJb-$W)!{mQ$(3Ud0gZ)RS-Yz=i5)6e&K!&EJo{!M^wi{JSU{K6&0 zG>3ka1X}k^7$ndfLNf0TsR9H_h&eBAa=?=$D!TkEH_W+s4{{E{Bka;3yv1$AWX1Pj zH_%6~Y~mKPQhGmID?mQ@pkZnJe6vTv!syXmxMO+L_UK?S{_@`dTcP`H5W+kdgaKe% zx>J6dL_gMub5?c&9Ol7u$W8S*d2K{EmIgcJPm|zI(DM8=hM_u#jNGX{rV-BH<3#E% z0^21ZRtsM2BA~zDiGaPpHU^@*mZNG0iEw^mCvvyVEn^tEi#6GKpSld%k$GN zH;$QI5N*q)6NfDB_%3IDp2YJ`WF12>BW(myD-yZKfr&D*!!2W26ZU3Ti{f&e^+^(O zt*fP6Y{1TFSdK*HIY>zYs@KY~B6JV+=rqn0A-Q`f2rXk6o(~K@F>S+}Mal}Cm*{*P zhsF`ImWREOf3*zes^JkC>+(vKlyS{crDJPWYL)y;3i2!EMm&Pd%o-7X=jO^^CW+k& zLTRDBT!IYyjdzRCYS$Zs7iZm0ckx4zE(&g*2AEMCWu3CjXj(!rD`@2Alr1&bK&eO^q9)=j2MP!=~Q{ z6#a`gQ6euiSC>3%f8W5ZTLw2E!&;Ca`w~^=WrET}b5Ve8Hfs!3mvDtyF^67jQ!-O| z|CVJd9O6$cMRqx7#R6niN*#UZQNlaNEIS_=&ch_`z3i+e@h)uFtG#Ni+HGJa18jB= zPa3VNup#1`i^gfS*KD5&X>kv-)n4zSS$olI2pLg?T=;TOJ#ALI!fo*mVO5EfkJ5nS?Pi#3BeIGFCkU+o3RqKKnji zPdtWrL#d874Lfjb7R3i}Zx&2=1H2dTvSr3D@%!a$E&aBds{NIM4{_#9P*ZC6*5(5~ zjCE4q*Zs*N?CGspX=2?pnyR*r(`ht!*u#T`zkl11kNF&`@HtcotEUppp~_|X&u~#c sm{!@i%3IO?!n}$D>u{4#yiXrRv((4_bhj`J{_7yfSNh}H8+Zfo4+$L`UjP6A literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationDetails.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationDetails.php new file mode 100644 index 0000000000000000000000000000000000000000..a5cc48171d100a173aaa613a47fcf486c4ac92e8 GIT binary patch literal 1792 zcmbtV+ioL85XBB;+v|7ozpg2xKBtjC!%EM};QG2Frw=|xf z?e4LZUFCrv;1_u3Q+VYE_zIrs%Xn-lL0H01@ZIwL!Fp}%QV8~E8;Ls?2C+Rc@D^oCjGRgsRlp zylK8F${IK}Bu&S$(|JJhfGCmUVs%0Us$8UdmbU@8FQ0-(Bs|JkaLO==yEvv(#zm(y z?`jTWoBHmM6)haaamn~pkH1;gFcn|I-)pe{f9CErT()nw#-DACUv7;*Z8v_cg7$_%U(sjl?bpj!JDDeYU&3}#%S|&(nBE<|koAvs6E*L1*eK4`U52v$ ziFw=jtpd*;V}1abeL!zcv3)mb=WEhg;EIvYsaoj?ZD>jWN@eS7)-qleelJjpoU1by9FDw zBx7Zb6h3o`EY80UPh%X?JW-(uG9o!*8rqZ57$-E8NJTVuq^ou-c42!`IHab^1=?hZ zZW#+9{;a^)+O(GtwY&51c3CsKs=V#Fi#fYWe9{{6$IP8(O#6FzZL`7N!t?Ld#+fy8 z-x|5Ejr`ht9Q@MA{oD2*v!I}`d*k;uELbpn?f8RL`^otJW$8uVI(J+!(|+`XUPlTj z?|ciN!Uymbd<5%DoJeg25`MDBGiPq+%)7JTIzTUR2Ylc}fP*IsEUp0uoC#(#4^N`$ z6galoETA5672{?PcY8zJY8t~AGBjinw?W4)W3C69?Xk$wCe-~B0bgh{>PlS7d~IIW z1SfvzC7Ljq%MGR{-GFa~W@%-HuZU~)*OcvWXVo|~MRW%vTPPduv$q0MO^81GA0U3Wp`(~d2*<1B3qN2j=! z)~M?@iaf=FN3fY4V-6zX{z+1I46w}KtXrmd9#E@I!E+jLP3DwwU0-*#2DvNLglyTj zMkS+o^PXmnpF2+8XIoOImRAK^hYR#)Szsyr4Z)8saRABxKMjoZ>oRKrrrUk4l*p|G1^c0F!rbq zm7;{+QJ$g)nNdnEn)#Kj#9T%tTZ+D^FMz`H77nFUpdv$Jhjc%u0RQAwL%QSmtd8_fOfL=+B z|3iz7gN+{7I!lP(FMMvMyI75i%`}(Yb`In^1WM$VOJ`ahTwQ(QhftcJ+F3j7boPn=XC2a`rPSGWvsWg^oiO?UAF}8XD literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationUsability.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationUsability.php new file mode 100644 index 000000000000..e741adf2e14f --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationUsability.php @@ -0,0 +1,42 @@ +internalAddGeneratedFile( + ' +Ø +>google/cloud/bigquery/migration/v2/translation_usability.proto"google.cloud.bigquery.migration.v2google/api/resource.proto"ö +GcsReportLogMessage +severity (  +category (  + file_path (  +filename (  +source_script_line ( +source_script_column ( +message (  +script_context (  +action (  +effect + (  + object_name ( BÕ +&com.google.cloud.bigquery.migration.v2BTranslationUsabilityProtoPZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpbª"Google.Cloud.BigQuery.Migration.V2Ê"Google\\Cloud\\BigQuery\\Migration\\V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/AzureSynapseDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/AzureSynapseDialect.php new file mode 100644 index 000000000000..4cd1024c3f8c --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/AzureSynapseDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.AzureSynapseDialect + */ +class AzureSynapseDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/BigQueryDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/BigQueryDialect.php new file mode 100644 index 000000000000..633c28794cb2 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/BigQueryDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.BigQueryDialect + */ +class BigQueryDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/CreateMigrationWorkflowRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/CreateMigrationWorkflowRequest.php new file mode 100644 index 000000000000..cf86b9f22bb6 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/CreateMigrationWorkflowRequest.php @@ -0,0 +1,132 @@ +google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + */ +class CreateMigrationWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project to which this migration workflow belongs. + * Example: `projects/foo/locations/bar` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The migration workflow to create. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflow = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $migration_workflow = null; + + /** + * @param string $parent Required. The name of the project to which this migration workflow belongs. + * Example: `projects/foo/locations/bar` + * Please see {@see MigrationServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow $migrationWorkflow Required. The migration workflow to create. + * + * @return \Google\Cloud\BigQuery\Migration\V2\CreateMigrationWorkflowRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow $migrationWorkflow): self + { + return (new self()) + ->setParent($parent) + ->setMigrationWorkflow($migrationWorkflow); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project to which this migration workflow belongs. + * Example: `projects/foo/locations/bar` + * @type \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow $migration_workflow + * Required. The migration workflow to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project to which this migration workflow belongs. + * Example: `projects/foo/locations/bar` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project to which this migration workflow belongs. + * Example: `projects/foo/locations/bar` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The migration workflow to create. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflow = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow|null + */ + public function getMigrationWorkflow() + { + return $this->migration_workflow; + } + + public function hasMigrationWorkflow() + { + return isset($this->migration_workflow); + } + + public function clearMigrationWorkflow() + { + unset($this->migration_workflow); + } + + /** + * Required. The migration workflow to create. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflow = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow $var + * @return $this + */ + public function setMigrationWorkflow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow::class); + $this->migration_workflow = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DB2Dialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DB2Dialect.php new file mode 100644 index 000000000000..1b6645ef9a1a --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DB2Dialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.DB2Dialect + */ +class DB2Dialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DeleteMigrationWorkflowRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DeleteMigrationWorkflowRequest.php new file mode 100644 index 000000000000..8d1a839efb89 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DeleteMigrationWorkflowRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + */ +class DeleteMigrationWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * Please see {@see MigrationServiceClient::migrationWorkflowName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Migration\V2\DeleteMigrationWorkflowRequest + * + * @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 unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * + * 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/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Dialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Dialect.php new file mode 100644 index 000000000000..85655db62741 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Dialect.php @@ -0,0 +1,603 @@ +google.cloud.bigquery.migration.v2.Dialect + */ +class Dialect extends \Google\Protobuf\Internal\Message +{ + protected $dialect_value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Migration\V2\BigQueryDialect $bigquery_dialect + * The BigQuery dialect + * @type \Google\Cloud\BigQuery\Migration\V2\HiveQLDialect $hiveql_dialect + * The HiveQL dialect + * @type \Google\Cloud\BigQuery\Migration\V2\RedshiftDialect $redshift_dialect + * The Redshift dialect + * @type \Google\Cloud\BigQuery\Migration\V2\TeradataDialect $teradata_dialect + * The Teradata dialect + * @type \Google\Cloud\BigQuery\Migration\V2\OracleDialect $oracle_dialect + * The Oracle dialect + * @type \Google\Cloud\BigQuery\Migration\V2\SparkSQLDialect $sparksql_dialect + * The SparkSQL dialect + * @type \Google\Cloud\BigQuery\Migration\V2\SnowflakeDialect $snowflake_dialect + * The Snowflake dialect + * @type \Google\Cloud\BigQuery\Migration\V2\NetezzaDialect $netezza_dialect + * The Netezza dialect + * @type \Google\Cloud\BigQuery\Migration\V2\AzureSynapseDialect $azure_synapse_dialect + * The Azure Synapse dialect + * @type \Google\Cloud\BigQuery\Migration\V2\VerticaDialect $vertica_dialect + * The Vertica dialect + * @type \Google\Cloud\BigQuery\Migration\V2\SQLServerDialect $sql_server_dialect + * The SQL Server dialect + * @type \Google\Cloud\BigQuery\Migration\V2\PostgresqlDialect $postgresql_dialect + * The Postgresql dialect + * @type \Google\Cloud\BigQuery\Migration\V2\PrestoDialect $presto_dialect + * The Presto dialect + * @type \Google\Cloud\BigQuery\Migration\V2\MySQLDialect $mysql_dialect + * The MySQL dialect + * @type \Google\Cloud\BigQuery\Migration\V2\DB2Dialect $db2_dialect + * DB2 dialect + * @type \Google\Cloud\BigQuery\Migration\V2\SQLiteDialect $sqlite_dialect + * SQLite dialect + * @type \Google\Cloud\BigQuery\Migration\V2\GreenplumDialect $greenplum_dialect + * Greenplum dialect + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + + /** + * The BigQuery dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.BigQueryDialect bigquery_dialect = 1; + * @return \Google\Cloud\BigQuery\Migration\V2\BigQueryDialect|null + */ + public function getBigqueryDialect() + { + return $this->readOneof(1); + } + + public function hasBigqueryDialect() + { + return $this->hasOneof(1); + } + + /** + * The BigQuery dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.BigQueryDialect bigquery_dialect = 1; + * @param \Google\Cloud\BigQuery\Migration\V2\BigQueryDialect $var + * @return $this + */ + public function setBigqueryDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\BigQueryDialect::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The HiveQL dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.HiveQLDialect hiveql_dialect = 2; + * @return \Google\Cloud\BigQuery\Migration\V2\HiveQLDialect|null + */ + public function getHiveqlDialect() + { + return $this->readOneof(2); + } + + public function hasHiveqlDialect() + { + return $this->hasOneof(2); + } + + /** + * The HiveQL dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.HiveQLDialect hiveql_dialect = 2; + * @param \Google\Cloud\BigQuery\Migration\V2\HiveQLDialect $var + * @return $this + */ + public function setHiveqlDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\HiveQLDialect::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The Redshift dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.RedshiftDialect redshift_dialect = 3; + * @return \Google\Cloud\BigQuery\Migration\V2\RedshiftDialect|null + */ + public function getRedshiftDialect() + { + return $this->readOneof(3); + } + + public function hasRedshiftDialect() + { + return $this->hasOneof(3); + } + + /** + * The Redshift dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.RedshiftDialect redshift_dialect = 3; + * @param \Google\Cloud\BigQuery\Migration\V2\RedshiftDialect $var + * @return $this + */ + public function setRedshiftDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\RedshiftDialect::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The Teradata dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect teradata_dialect = 4; + * @return \Google\Cloud\BigQuery\Migration\V2\TeradataDialect|null + */ + public function getTeradataDialect() + { + return $this->readOneof(4); + } + + public function hasTeradataDialect() + { + return $this->hasOneof(4); + } + + /** + * The Teradata dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect teradata_dialect = 4; + * @param \Google\Cloud\BigQuery\Migration\V2\TeradataDialect $var + * @return $this + */ + public function setTeradataDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TeradataDialect::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The Oracle dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.OracleDialect oracle_dialect = 5; + * @return \Google\Cloud\BigQuery\Migration\V2\OracleDialect|null + */ + public function getOracleDialect() + { + return $this->readOneof(5); + } + + public function hasOracleDialect() + { + return $this->hasOneof(5); + } + + /** + * The Oracle dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.OracleDialect oracle_dialect = 5; + * @param \Google\Cloud\BigQuery\Migration\V2\OracleDialect $var + * @return $this + */ + public function setOracleDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\OracleDialect::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The SparkSQL dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SparkSQLDialect sparksql_dialect = 6; + * @return \Google\Cloud\BigQuery\Migration\V2\SparkSQLDialect|null + */ + public function getSparksqlDialect() + { + return $this->readOneof(6); + } + + public function hasSparksqlDialect() + { + return $this->hasOneof(6); + } + + /** + * The SparkSQL dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SparkSQLDialect sparksql_dialect = 6; + * @param \Google\Cloud\BigQuery\Migration\V2\SparkSQLDialect $var + * @return $this + */ + public function setSparksqlDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SparkSQLDialect::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The Snowflake dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SnowflakeDialect snowflake_dialect = 7; + * @return \Google\Cloud\BigQuery\Migration\V2\SnowflakeDialect|null + */ + public function getSnowflakeDialect() + { + return $this->readOneof(7); + } + + public function hasSnowflakeDialect() + { + return $this->hasOneof(7); + } + + /** + * The Snowflake dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SnowflakeDialect snowflake_dialect = 7; + * @param \Google\Cloud\BigQuery\Migration\V2\SnowflakeDialect $var + * @return $this + */ + public function setSnowflakeDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SnowflakeDialect::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The Netezza dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NetezzaDialect netezza_dialect = 8; + * @return \Google\Cloud\BigQuery\Migration\V2\NetezzaDialect|null + */ + public function getNetezzaDialect() + { + return $this->readOneof(8); + } + + public function hasNetezzaDialect() + { + return $this->hasOneof(8); + } + + /** + * The Netezza dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NetezzaDialect netezza_dialect = 8; + * @param \Google\Cloud\BigQuery\Migration\V2\NetezzaDialect $var + * @return $this + */ + public function setNetezzaDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\NetezzaDialect::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * The Azure Synapse dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.AzureSynapseDialect azure_synapse_dialect = 9; + * @return \Google\Cloud\BigQuery\Migration\V2\AzureSynapseDialect|null + */ + public function getAzureSynapseDialect() + { + return $this->readOneof(9); + } + + public function hasAzureSynapseDialect() + { + return $this->hasOneof(9); + } + + /** + * The Azure Synapse dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.AzureSynapseDialect azure_synapse_dialect = 9; + * @param \Google\Cloud\BigQuery\Migration\V2\AzureSynapseDialect $var + * @return $this + */ + public function setAzureSynapseDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\AzureSynapseDialect::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * The Vertica dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.VerticaDialect vertica_dialect = 10; + * @return \Google\Cloud\BigQuery\Migration\V2\VerticaDialect|null + */ + public function getVerticaDialect() + { + return $this->readOneof(10); + } + + public function hasVerticaDialect() + { + return $this->hasOneof(10); + } + + /** + * The Vertica dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.VerticaDialect vertica_dialect = 10; + * @param \Google\Cloud\BigQuery\Migration\V2\VerticaDialect $var + * @return $this + */ + public function setVerticaDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\VerticaDialect::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * The SQL Server dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SQLServerDialect sql_server_dialect = 11; + * @return \Google\Cloud\BigQuery\Migration\V2\SQLServerDialect|null + */ + public function getSqlServerDialect() + { + return $this->readOneof(11); + } + + public function hasSqlServerDialect() + { + return $this->hasOneof(11); + } + + /** + * The SQL Server dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SQLServerDialect sql_server_dialect = 11; + * @param \Google\Cloud\BigQuery\Migration\V2\SQLServerDialect $var + * @return $this + */ + public function setSqlServerDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SQLServerDialect::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * The Postgresql dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.PostgresqlDialect postgresql_dialect = 12; + * @return \Google\Cloud\BigQuery\Migration\V2\PostgresqlDialect|null + */ + public function getPostgresqlDialect() + { + return $this->readOneof(12); + } + + public function hasPostgresqlDialect() + { + return $this->hasOneof(12); + } + + /** + * The Postgresql dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.PostgresqlDialect postgresql_dialect = 12; + * @param \Google\Cloud\BigQuery\Migration\V2\PostgresqlDialect $var + * @return $this + */ + public function setPostgresqlDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\PostgresqlDialect::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * The Presto dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.PrestoDialect presto_dialect = 13; + * @return \Google\Cloud\BigQuery\Migration\V2\PrestoDialect|null + */ + public function getPrestoDialect() + { + return $this->readOneof(13); + } + + public function hasPrestoDialect() + { + return $this->hasOneof(13); + } + + /** + * The Presto dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.PrestoDialect presto_dialect = 13; + * @param \Google\Cloud\BigQuery\Migration\V2\PrestoDialect $var + * @return $this + */ + public function setPrestoDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\PrestoDialect::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * The MySQL dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MySQLDialect mysql_dialect = 14; + * @return \Google\Cloud\BigQuery\Migration\V2\MySQLDialect|null + */ + public function getMysqlDialect() + { + return $this->readOneof(14); + } + + public function hasMysqlDialect() + { + return $this->hasOneof(14); + } + + /** + * The MySQL dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MySQLDialect mysql_dialect = 14; + * @param \Google\Cloud\BigQuery\Migration\V2\MySQLDialect $var + * @return $this + */ + public function setMysqlDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\MySQLDialect::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * DB2 dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.DB2Dialect db2_dialect = 15; + * @return \Google\Cloud\BigQuery\Migration\V2\DB2Dialect|null + */ + public function getDb2Dialect() + { + return $this->readOneof(15); + } + + public function hasDb2Dialect() + { + return $this->hasOneof(15); + } + + /** + * DB2 dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.DB2Dialect db2_dialect = 15; + * @param \Google\Cloud\BigQuery\Migration\V2\DB2Dialect $var + * @return $this + */ + public function setDb2Dialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\DB2Dialect::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * SQLite dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SQLiteDialect sqlite_dialect = 16; + * @return \Google\Cloud\BigQuery\Migration\V2\SQLiteDialect|null + */ + public function getSqliteDialect() + { + return $this->readOneof(16); + } + + public function hasSqliteDialect() + { + return $this->hasOneof(16); + } + + /** + * SQLite dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SQLiteDialect sqlite_dialect = 16; + * @param \Google\Cloud\BigQuery\Migration\V2\SQLiteDialect $var + * @return $this + */ + public function setSqliteDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SQLiteDialect::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Greenplum dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.GreenplumDialect greenplum_dialect = 17; + * @return \Google\Cloud\BigQuery\Migration\V2\GreenplumDialect|null + */ + public function getGreenplumDialect() + { + return $this->readOneof(17); + } + + public function hasGreenplumDialect() + { + return $this->hasOneof(17); + } + + /** + * Greenplum dialect + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.GreenplumDialect greenplum_dialect = 17; + * @param \Google\Cloud\BigQuery\Migration\V2\GreenplumDialect $var + * @return $this + */ + public function setGreenplumDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\GreenplumDialect::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * @return string + */ + public function getDialectValue() + { + return $this->whichOneof("dialect_value"); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorDetail.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorDetail.php new file mode 100644 index 000000000000..b12388d8d92f --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorDetail.php @@ -0,0 +1,122 @@ +google.cloud.bigquery.migration.v2.ErrorDetail + */ +class ErrorDetail extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The exact location within the resource (if applicable). + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.ErrorLocation location = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $location = null; + /** + * Required. Describes the cause of the error with structured detail. + * + * Generated from protobuf field .google.rpc.ErrorInfo error_info = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $error_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Migration\V2\ErrorLocation $location + * Optional. The exact location within the resource (if applicable). + * @type \Google\Rpc\ErrorInfo $error_info + * Required. Describes the cause of the error with structured detail. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationErrorDetails::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The exact location within the resource (if applicable). + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.ErrorLocation location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Migration\V2\ErrorLocation|null + */ + public function getLocation() + { + return $this->location; + } + + public function hasLocation() + { + return isset($this->location); + } + + public function clearLocation() + { + unset($this->location); + } + + /** + * Optional. The exact location within the resource (if applicable). + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.ErrorLocation location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Migration\V2\ErrorLocation $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\ErrorLocation::class); + $this->location = $var; + + return $this; + } + + /** + * Required. Describes the cause of the error with structured detail. + * + * Generated from protobuf field .google.rpc.ErrorInfo error_info = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Rpc\ErrorInfo|null + */ + public function getErrorInfo() + { + return $this->error_info; + } + + public function hasErrorInfo() + { + return isset($this->error_info); + } + + public function clearErrorInfo() + { + unset($this->error_info); + } + + /** + * Required. Describes the cause of the error with structured detail. + * + * Generated from protobuf field .google.rpc.ErrorInfo error_info = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Rpc\ErrorInfo $var + * @return $this + */ + public function setErrorInfo($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\ErrorInfo::class); + $this->error_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorLocation.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorLocation.php new file mode 100644 index 000000000000..b2d7144c0b51 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorLocation.php @@ -0,0 +1,109 @@ +google.cloud.bigquery.migration.v2.ErrorLocation + */ +class ErrorLocation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If applicable, denotes the line where the error occurred. A zero + * value means that there is no line information. + * + * Generated from protobuf field int32 line = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $line = 0; + /** + * Optional. If applicable, denotes the column where the error occurred. A + * zero value means that there is no columns information. + * + * Generated from protobuf field int32 column = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $column = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $line + * Optional. If applicable, denotes the line where the error occurred. A zero + * value means that there is no line information. + * @type int $column + * Optional. If applicable, denotes the column where the error occurred. A + * zero value means that there is no columns information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationErrorDetails::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If applicable, denotes the line where the error occurred. A zero + * value means that there is no line information. + * + * Generated from protobuf field int32 line = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getLine() + { + return $this->line; + } + + /** + * Optional. If applicable, denotes the line where the error occurred. A zero + * value means that there is no line information. + * + * Generated from protobuf field int32 line = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setLine($var) + { + GPBUtil::checkInt32($var); + $this->line = $var; + + return $this; + } + + /** + * Optional. If applicable, denotes the column where the error occurred. A + * zero value means that there is no columns information. + * + * Generated from protobuf field int32 column = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getColumn() + { + return $this->column; + } + + /** + * Optional. If applicable, denotes the column where the error occurred. A + * zero value means that there is no columns information. + * + * Generated from protobuf field int32 column = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkInt32($var); + $this->column = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GcsReportLogMessage.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GcsReportLogMessage.php new file mode 100644 index 000000000000..94d6aa4ab8bc --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GcsReportLogMessage.php @@ -0,0 +1,415 @@ +google.cloud.bigquery.migration.v2.GcsReportLogMessage + */ +class GcsReportLogMessage extends \Google\Protobuf\Internal\Message +{ + /** + * Severity of the translation record. + * + * Generated from protobuf field string severity = 1; + */ + protected $severity = ''; + /** + * Category of the error/warning. Example: SyntaxError + * + * Generated from protobuf field string category = 2; + */ + protected $category = ''; + /** + * The file path in which the error occurred + * + * Generated from protobuf field string file_path = 3; + */ + protected $file_path = ''; + /** + * The file name in which the error occurred + * + * Generated from protobuf field string filename = 4; + */ + protected $filename = ''; + /** + * Specifies the row from the source text where the error occurred (0 based, + * -1 for messages without line location). Example: 2 + * + * Generated from protobuf field int32 source_script_line = 5; + */ + protected $source_script_line = 0; + /** + * Specifies the column from the source texts where the error occurred. (0 + * based, -1 for messages without column location) example: 6 + * + * Generated from protobuf field int32 source_script_column = 6; + */ + protected $source_script_column = 0; + /** + * Detailed message of the record. + * + * Generated from protobuf field string message = 7; + */ + protected $message = ''; + /** + * The script context (obfuscated) in which the error occurred + * + * Generated from protobuf field string script_context = 8; + */ + protected $script_context = ''; + /** + * Category of the error/warning. Example: SyntaxError + * + * Generated from protobuf field string action = 9; + */ + protected $action = ''; + /** + * Effect of the error/warning. Example: COMPATIBILITY + * + * Generated from protobuf field string effect = 10; + */ + protected $effect = ''; + /** + * Name of the affected object in the log message. + * + * Generated from protobuf field string object_name = 11; + */ + protected $object_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $severity + * Severity of the translation record. + * @type string $category + * Category of the error/warning. Example: SyntaxError + * @type string $file_path + * The file path in which the error occurred + * @type string $filename + * The file name in which the error occurred + * @type int $source_script_line + * Specifies the row from the source text where the error occurred (0 based, + * -1 for messages without line location). Example: 2 + * @type int $source_script_column + * Specifies the column from the source texts where the error occurred. (0 + * based, -1 for messages without column location) example: 6 + * @type string $message + * Detailed message of the record. + * @type string $script_context + * The script context (obfuscated) in which the error occurred + * @type string $action + * Category of the error/warning. Example: SyntaxError + * @type string $effect + * Effect of the error/warning. Example: COMPATIBILITY + * @type string $object_name + * Name of the affected object in the log message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationUsability::initOnce(); + parent::__construct($data); + } + + /** + * Severity of the translation record. + * + * Generated from protobuf field string severity = 1; + * @return string + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Severity of the translation record. + * + * Generated from protobuf field string severity = 1; + * @param string $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkString($var, True); + $this->severity = $var; + + return $this; + } + + /** + * Category of the error/warning. Example: SyntaxError + * + * Generated from protobuf field string category = 2; + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * Category of the error/warning. Example: SyntaxError + * + * Generated from protobuf field string category = 2; + * @param string $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkString($var, True); + $this->category = $var; + + return $this; + } + + /** + * The file path in which the error occurred + * + * Generated from protobuf field string file_path = 3; + * @return string + */ + public function getFilePath() + { + return $this->file_path; + } + + /** + * The file path in which the error occurred + * + * Generated from protobuf field string file_path = 3; + * @param string $var + * @return $this + */ + public function setFilePath($var) + { + GPBUtil::checkString($var, True); + $this->file_path = $var; + + return $this; + } + + /** + * The file name in which the error occurred + * + * Generated from protobuf field string filename = 4; + * @return string + */ + public function getFilename() + { + return $this->filename; + } + + /** + * The file name in which the error occurred + * + * Generated from protobuf field string filename = 4; + * @param string $var + * @return $this + */ + public function setFilename($var) + { + GPBUtil::checkString($var, True); + $this->filename = $var; + + return $this; + } + + /** + * Specifies the row from the source text where the error occurred (0 based, + * -1 for messages without line location). Example: 2 + * + * Generated from protobuf field int32 source_script_line = 5; + * @return int + */ + public function getSourceScriptLine() + { + return $this->source_script_line; + } + + /** + * Specifies the row from the source text where the error occurred (0 based, + * -1 for messages without line location). Example: 2 + * + * Generated from protobuf field int32 source_script_line = 5; + * @param int $var + * @return $this + */ + public function setSourceScriptLine($var) + { + GPBUtil::checkInt32($var); + $this->source_script_line = $var; + + return $this; + } + + /** + * Specifies the column from the source texts where the error occurred. (0 + * based, -1 for messages without column location) example: 6 + * + * Generated from protobuf field int32 source_script_column = 6; + * @return int + */ + public function getSourceScriptColumn() + { + return $this->source_script_column; + } + + /** + * Specifies the column from the source texts where the error occurred. (0 + * based, -1 for messages without column location) example: 6 + * + * Generated from protobuf field int32 source_script_column = 6; + * @param int $var + * @return $this + */ + public function setSourceScriptColumn($var) + { + GPBUtil::checkInt32($var); + $this->source_script_column = $var; + + return $this; + } + + /** + * Detailed message of the record. + * + * Generated from protobuf field string message = 7; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Detailed message of the record. + * + * 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; + } + + /** + * The script context (obfuscated) in which the error occurred + * + * Generated from protobuf field string script_context = 8; + * @return string + */ + public function getScriptContext() + { + return $this->script_context; + } + + /** + * The script context (obfuscated) in which the error occurred + * + * Generated from protobuf field string script_context = 8; + * @param string $var + * @return $this + */ + public function setScriptContext($var) + { + GPBUtil::checkString($var, True); + $this->script_context = $var; + + return $this; + } + + /** + * Category of the error/warning. Example: SyntaxError + * + * Generated from protobuf field string action = 9; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Category of the error/warning. Example: SyntaxError + * + * Generated from protobuf field string action = 9; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + + /** + * Effect of the error/warning. Example: COMPATIBILITY + * + * Generated from protobuf field string effect = 10; + * @return string + */ + public function getEffect() + { + return $this->effect; + } + + /** + * Effect of the error/warning. Example: COMPATIBILITY + * + * Generated from protobuf field string effect = 10; + * @param string $var + * @return $this + */ + public function setEffect($var) + { + GPBUtil::checkString($var, True); + $this->effect = $var; + + return $this; + } + + /** + * Name of the affected object in the log message. + * + * Generated from protobuf field string object_name = 11; + * @return string + */ + public function getObjectName() + { + return $this->object_name; + } + + /** + * Name of the affected object in the log message. + * + * Generated from protobuf field string object_name = 11; + * @param string $var + * @return $this + */ + public function setObjectName($var) + { + GPBUtil::checkString($var, True); + $this->object_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationSubtaskRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationSubtaskRequest.php new file mode 100644 index 000000000000..ac8f15bd9e87 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationSubtaskRequest.php @@ -0,0 +1,130 @@ +google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + */ +class GetMigrationSubtaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier for the migration subtask. + * Example: `projects/123/locations/us/workflows/1234/subtasks/543` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_mask = null; + + /** + * @param string $name Required. The unique identifier for the migration subtask. + * Example: `projects/123/locations/us/workflows/1234/subtasks/543` + * Please see {@see MigrationServiceClient::migrationSubtaskName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Migration\V2\GetMigrationSubtaskRequest + * + * @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 unique identifier for the migration subtask. + * Example: `projects/123/locations/us/workflows/1234/subtasks/543` + * @type \Google\Protobuf\FieldMask $read_mask + * Optional. The list of fields to be retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier for the migration subtask. + * Example: `projects/123/locations/us/workflows/1234/subtasks/543` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique identifier for the migration subtask. + * Example: `projects/123/locations/us/workflows/1234/subtasks/543` + * + * 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 list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * Optional. The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationWorkflowRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationWorkflowRequest.php new file mode 100644 index 000000000000..cf20c5101842 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationWorkflowRequest.php @@ -0,0 +1,130 @@ +google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + */ +class GetMigrationWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; + */ + protected $read_mask = null; + + /** + * @param string $name Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * Please see {@see MigrationServiceClient::migrationWorkflowName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Migration\V2\GetMigrationWorkflowRequest + * + * @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 unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * @type \Google\Protobuf\FieldMask $read_mask + * The list of fields to be retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GreenplumDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GreenplumDialect.php new file mode 100644 index 000000000000..f07458775fb2 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GreenplumDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.GreenplumDialect + */ +class GreenplumDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/HiveQLDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/HiveQLDialect.php new file mode 100644 index 000000000000..4eba620616c9 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/HiveQLDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.HiveQLDialect + */ +class HiveQLDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksRequest.php new file mode 100644 index 000000000000..5cdf51450e54 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksRequest.php @@ -0,0 +1,256 @@ +google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + */ +class ListMigrationSubtasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_mask = null; + /** + * Optional. The maximum number of migration tasks to return. The service may + * return fewer than this number. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from previous `ListMigrationSubtasks` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * 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 filter to apply. This can be used to get the subtasks of a + * specific tasks in a workflow, e.g. `migration_task = "ab012"` where + * `"ab012"` is the task ID (not the name in the named map). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * Please see {@see MigrationServiceClient::migrationWorkflowName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Migration\V2\ListMigrationSubtasksRequest + * + * @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 migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * @type \Google\Protobuf\FieldMask $read_mask + * Optional. The list of fields to be retrieved. + * @type int $page_size + * Optional. The maximum number of migration tasks to return. The service may + * return fewer than this number. + * @type string $page_token + * Optional. A page token, received from previous `ListMigrationSubtasks` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * must match the call that provided the page token. + * @type string $filter + * Optional. The filter to apply. This can be used to get the subtasks of a + * specific tasks in a workflow, e.g. `migration_task = "ab012"` where + * `"ab012"` is the task ID (not the name in the named map). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * + * 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 migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * Optional. The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + + /** + * Optional. The maximum number of migration tasks to return. The service may + * return fewer than this number. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of migration tasks to return. The service may + * return fewer than this number. + * + * 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. A page token, received from previous `ListMigrationSubtasks` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * 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. A page token, received from previous `ListMigrationSubtasks` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * 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 filter to apply. This can be used to get the subtasks of a + * specific tasks in a workflow, e.g. `migration_task = "ab012"` where + * `"ab012"` is the task ID (not the name in the named map). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter to apply. This can be used to get the subtasks of a + * specific tasks in a workflow, e.g. `migration_task = "ab012"` where + * `"ab012"` is the task ID (not the name in the named map). + * + * 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/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksResponse.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksResponse.php new file mode 100644 index 000000000000..5ef10e1eda97 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksResponse.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + */ +class ListMigrationSubtasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The migration subtasks for the specified task. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationSubtask migration_subtasks = 1; + */ + private $migration_subtasks; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\Migration\V2\MigrationSubtask>|\Google\Protobuf\Internal\RepeatedField $migration_subtasks + * The migration subtasks for the specified task. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); + parent::__construct($data); + } + + /** + * The migration subtasks for the specified task. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationSubtask migration_subtasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMigrationSubtasks() + { + return $this->migration_subtasks; + } + + /** + * The migration subtasks for the specified task. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationSubtask migration_subtasks = 1; + * @param array<\Google\Cloud\BigQuery\Migration\V2\MigrationSubtask>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMigrationSubtasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\MigrationSubtask::class); + $this->migration_subtasks = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsRequest.php new file mode 100644 index 000000000000..e3637ad33ae3 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsRequest.php @@ -0,0 +1,214 @@ +google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + */ +class ListMigrationWorkflowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; + */ + protected $read_mask = null; + /** + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * Please see {@see MigrationServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Migration\V2\ListMigrationWorkflowsRequest + * + * @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 project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * @type \Google\Protobuf\FieldMask $read_mask + * The list of fields to be retrieved. + * @type int $page_size + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * @type string $page_token + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * + * 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 project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * The list of fields to be retrieved. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + + /** + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 4; + * @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/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsResponse.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsResponse.php new file mode 100644 index 000000000000..41d31c2cfebd --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsResponse.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + */ +class ListMigrationWorkflowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The migration workflows for the specified project / location. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflows = 1; + */ + private $migration_workflows; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow>|\Google\Protobuf\Internal\RepeatedField $migration_workflows + * The migration workflows for the specified project / location. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); + parent::__construct($data); + } + + /** + * The migration workflows for the specified project / location. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflows = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMigrationWorkflows() + { + return $this->migration_workflows; + } + + /** + * The migration workflows for the specified project / location. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflows = 1; + * @param array<\Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMigrationWorkflows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow::class); + $this->migration_workflows = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Literal.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Literal.php new file mode 100644 index 000000000000..bf0dc573e7ed --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Literal.php @@ -0,0 +1,142 @@ +google.cloud.bigquery.migration.v2.Literal + */ +class Literal extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The identifier of the literal entry. + * + * Generated from protobuf field string relative_path = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $relative_path = ''; + protected $literal_data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $literal_string + * Literal string data. + * @type string $literal_bytes + * Literal byte data. + * @type string $relative_path + * Required. The identifier of the literal entry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); + parent::__construct($data); + } + + /** + * Literal string data. + * + * Generated from protobuf field string literal_string = 2; + * @return string + */ + public function getLiteralString() + { + return $this->readOneof(2); + } + + public function hasLiteralString() + { + return $this->hasOneof(2); + } + + /** + * Literal string data. + * + * Generated from protobuf field string literal_string = 2; + * @param string $var + * @return $this + */ + public function setLiteralString($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Literal byte data. + * + * Generated from protobuf field bytes literal_bytes = 3; + * @return string + */ + public function getLiteralBytes() + { + return $this->readOneof(3); + } + + public function hasLiteralBytes() + { + return $this->hasOneof(3); + } + + /** + * Literal byte data. + * + * Generated from protobuf field bytes literal_bytes = 3; + * @param string $var + * @return $this + */ + public function setLiteralBytes($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. The identifier of the literal entry. + * + * Generated from protobuf field string relative_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRelativePath() + { + return $this->relative_path; + } + + /** + * Required. The identifier of the literal entry. + * + * Generated from protobuf field string relative_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRelativePath($var) + { + GPBUtil::checkString($var, True); + $this->relative_path = $var; + + return $this; + } + + /** + * @return string + */ + public function getLiteralData() + { + return $this->whichOneof("literal_data"); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask.php new file mode 100644 index 000000000000..89a6b5afbe96 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask.php @@ -0,0 +1,449 @@ +google.cloud.bigquery.migration.v2.MigrationSubtask + */ +class MigrationSubtask extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Immutable. The resource name for the migration subtask. The ID + * is server-generated. + * Example: `projects/123/locations/us/workflows/345/subtasks/678` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The unique ID of the task to which this subtask belongs. + * + * Generated from protobuf field string task_id = 2; + */ + protected $task_id = ''; + /** + * The type of the Subtask. The migration service does not check whether this + * is a known type. It is up to the task creator (i.e. orchestrator or worker) + * to ensure it only creates subtasks for which there are compatible workers + * polling for Subtasks. + * + * Generated from protobuf field string type = 3; + */ + protected $type = ''; + /** + * Output only. The current state of the subtask. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationSubtask.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. An explanation that may be populated when the task is in + * FAILED state. + * + * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $processing_error = null; + /** + * Output only. Provides details to errors and issues encountered while + * processing the subtask. Presence of error details does not mean that the + * subtask failed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $resource_error_details; + /** + * The number or resources with errors. Note: This is not the total + * number of errors as each resource can have more than one error. + * This is used to indicate truncation by having a `resource_error_count` + * that is higher than the size of `resource_error_details`. + * + * Generated from protobuf field int32 resource_error_count = 13; + */ + protected $resource_error_count = 0; + /** + * Time when the subtask was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + */ + protected $create_time = null; + /** + * Time when the subtask was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8; + */ + protected $last_update_time = null; + /** + * The metrics for the subtask. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11; + */ + private $metrics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Immutable. The resource name for the migration subtask. The ID + * is server-generated. + * Example: `projects/123/locations/us/workflows/345/subtasks/678` + * @type string $task_id + * The unique ID of the task to which this subtask belongs. + * @type string $type + * The type of the Subtask. The migration service does not check whether this + * is a known type. It is up to the task creator (i.e. orchestrator or worker) + * to ensure it only creates subtasks for which there are compatible workers + * polling for Subtasks. + * @type int $state + * Output only. The current state of the subtask. + * @type \Google\Rpc\ErrorInfo $processing_error + * Output only. An explanation that may be populated when the task is in + * FAILED state. + * @type array<\Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail>|\Google\Protobuf\Internal\RepeatedField $resource_error_details + * Output only. Provides details to errors and issues encountered while + * processing the subtask. Presence of error details does not mean that the + * subtask failed. + * @type int $resource_error_count + * The number or resources with errors. Note: This is not the total + * number of errors as each resource can have more than one error. + * This is used to indicate truncation by having a `resource_error_count` + * that is higher than the size of `resource_error_details`. + * @type \Google\Protobuf\Timestamp $create_time + * Time when the subtask was created. + * @type \Google\Protobuf\Timestamp $last_update_time + * Time when the subtask was last updated. + * @type array<\Google\Cloud\BigQuery\Migration\V2\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $metrics + * The metrics for the subtask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Immutable. The resource name for the migration subtask. The ID + * is server-generated. + * Example: `projects/123/locations/us/workflows/345/subtasks/678` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Immutable. The resource name for the migration subtask. The ID + * is server-generated. + * Example: `projects/123/locations/us/workflows/345/subtasks/678` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The unique ID of the task to which this subtask belongs. + * + * Generated from protobuf field string task_id = 2; + * @return string + */ + public function getTaskId() + { + return $this->task_id; + } + + /** + * The unique ID of the task to which this subtask belongs. + * + * Generated from protobuf field string task_id = 2; + * @param string $var + * @return $this + */ + public function setTaskId($var) + { + GPBUtil::checkString($var, True); + $this->task_id = $var; + + return $this; + } + + /** + * The type of the Subtask. The migration service does not check whether this + * is a known type. It is up to the task creator (i.e. orchestrator or worker) + * to ensure it only creates subtasks for which there are compatible workers + * polling for Subtasks. + * + * Generated from protobuf field string type = 3; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the Subtask. The migration service does not check whether this + * is a known type. It is up to the task creator (i.e. orchestrator or worker) + * to ensure it only creates subtasks for which there are compatible workers + * polling for Subtasks. + * + * Generated from protobuf field string type = 3; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Output only. The current state of the subtask. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationSubtask.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the subtask. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationSubtask.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\MigrationSubtask\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. An explanation that may be populated when the task is in + * FAILED state. + * + * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\ErrorInfo|null + */ + public function getProcessingError() + { + return $this->processing_error; + } + + public function hasProcessingError() + { + return isset($this->processing_error); + } + + public function clearProcessingError() + { + unset($this->processing_error); + } + + /** + * Output only. An explanation that may be populated when the task is in + * FAILED state. + * + * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\ErrorInfo $var + * @return $this + */ + public function setProcessingError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\ErrorInfo::class); + $this->processing_error = $var; + + return $this; + } + + /** + * Output only. Provides details to errors and issues encountered while + * processing the subtask. Presence of error details does not mean that the + * subtask failed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceErrorDetails() + { + return $this->resource_error_details; + } + + /** + * Output only. Provides details to errors and issues encountered while + * processing the subtask. Presence of error details does not mean that the + * subtask failed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceErrorDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail::class); + $this->resource_error_details = $arr; + + return $this; + } + + /** + * The number or resources with errors. Note: This is not the total + * number of errors as each resource can have more than one error. + * This is used to indicate truncation by having a `resource_error_count` + * that is higher than the size of `resource_error_details`. + * + * Generated from protobuf field int32 resource_error_count = 13; + * @return int + */ + public function getResourceErrorCount() + { + return $this->resource_error_count; + } + + /** + * The number or resources with errors. Note: This is not the total + * number of errors as each resource can have more than one error. + * This is used to indicate truncation by having a `resource_error_count` + * that is higher than the size of `resource_error_details`. + * + * Generated from protobuf field int32 resource_error_count = 13; + * @param int $var + * @return $this + */ + public function setResourceErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->resource_error_count = $var; + + return $this; + } + + /** + * Time when the subtask was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + * @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); + } + + /** + * Time when the subtask was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Time when the subtask was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Time when the subtask was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + + /** + * The metrics for the subtask. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * The metrics for the subtask. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11; + * @param array<\Google\Cloud\BigQuery\Migration\V2\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\TimeSeries::class); + $this->metrics = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask/State.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask/State.php new file mode 100644 index 000000000000..69f3698eaf48 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask/State.php @@ -0,0 +1,94 @@ +google.cloud.bigquery.migration.v2.MigrationSubtask.State + */ +class State +{ + /** + * The state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The subtask is ready, i.e. it is ready for execution. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The subtask is running, i.e. it is assigned to a worker for execution. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The subtask finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The subtask finished unsuccessfully. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The subtask is paused, i.e., it will not be scheduled. If it was already + * assigned,it might still finish but no new lease renewals will be granted. + * + * Generated from protobuf enum PAUSED = 5; + */ + const PAUSED = 5; + /** + * The subtask is pending a dependency. It will be scheduled once its + * dependencies are done. + * + * Generated from protobuf enum PENDING_DEPENDENCY = 6; + */ + const PENDING_DEPENDENCY = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::PAUSED => 'PAUSED', + self::PENDING_DEPENDENCY => 'PENDING_DEPENDENCY', + ]; + + 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\BigQuery\Migration\V2\MigrationSubtask_State::class); + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask.php new file mode 100644 index 000000000000..38a9467bd6cb --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask.php @@ -0,0 +1,609 @@ +google.cloud.bigquery.migration.v2.MigrationTask + */ +class MigrationTask extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Immutable. The unique identifier for the migration task. The + * ID is server-generated. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $id = ''; + /** + * The type of the task. This must be one of the supported task types: + * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, + * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, + * Translation_Snowflake2BQ, Translation_Netezza2BQ, + * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, + * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, + * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + /** + * Output only. The current state of the task. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTask.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. An explanation that may be populated when the task is in + * FAILED state. + * + * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $processing_error = null; + /** + * Time when the task was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + */ + protected $create_time = null; + /** + * Time when the task was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7; + */ + protected $last_update_time = null; + /** + * Output only. Provides details to errors and issues encountered while + * processing the task. Presence of error details does not mean that the task + * failed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $resource_error_details; + /** + * The number or resources with errors. Note: This is not the total + * number of errors as each resource can have more than one error. + * This is used to indicate truncation by having a `resource_error_count` + * that is higher than the size of `resource_error_details`. + * + * Generated from protobuf field int32 resource_error_count = 18; + */ + protected $resource_error_count = 0; + /** + * The metrics for the task. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19; + */ + private $metrics; + /** + * Output only. The result of the task. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTaskResult task_result = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $task_result = null; + /** + * Count of all the processing errors in this task and its subtasks. + * + * Generated from protobuf field int32 total_processing_error_count = 21; + */ + protected $total_processing_error_count = 0; + /** + * Count of all the resource errors in this task and its subtasks. + * + * Generated from protobuf field int32 total_resource_error_count = 22; + */ + protected $total_resource_error_count = 0; + protected $task_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Migration\V2\TranslationConfigDetails $translation_config_details + * Task configuration for CW Batch/Offline SQL Translation. + * @type \Google\Cloud\BigQuery\Migration\V2\TranslationDetails $translation_details + * Task details for unified SQL Translation. + * @type string $id + * Output only. Immutable. The unique identifier for the migration task. The + * ID is server-generated. + * @type string $type + * The type of the task. This must be one of the supported task types: + * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, + * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, + * Translation_Snowflake2BQ, Translation_Netezza2BQ, + * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, + * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, + * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + * @type int $state + * Output only. The current state of the task. + * @type \Google\Rpc\ErrorInfo $processing_error + * Output only. An explanation that may be populated when the task is in + * FAILED state. + * @type \Google\Protobuf\Timestamp $create_time + * Time when the task was created. + * @type \Google\Protobuf\Timestamp $last_update_time + * Time when the task was last updated. + * @type array<\Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail>|\Google\Protobuf\Internal\RepeatedField $resource_error_details + * Output only. Provides details to errors and issues encountered while + * processing the task. Presence of error details does not mean that the task + * failed. + * @type int $resource_error_count + * The number or resources with errors. Note: This is not the total + * number of errors as each resource can have more than one error. + * This is used to indicate truncation by having a `resource_error_count` + * that is higher than the size of `resource_error_details`. + * @type array<\Google\Cloud\BigQuery\Migration\V2\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $metrics + * The metrics for the task. + * @type \Google\Cloud\BigQuery\Migration\V2\MigrationTaskResult $task_result + * Output only. The result of the task. + * @type int $total_processing_error_count + * Count of all the processing errors in this task and its subtasks. + * @type int $total_resource_error_count + * Count of all the resource errors in this task and its subtasks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); + parent::__construct($data); + } + + /** + * Task configuration for CW Batch/Offline SQL Translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationConfigDetails translation_config_details = 14; + * @return \Google\Cloud\BigQuery\Migration\V2\TranslationConfigDetails|null + */ + public function getTranslationConfigDetails() + { + return $this->readOneof(14); + } + + public function hasTranslationConfigDetails() + { + return $this->hasOneof(14); + } + + /** + * Task configuration for CW Batch/Offline SQL Translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationConfigDetails translation_config_details = 14; + * @param \Google\Cloud\BigQuery\Migration\V2\TranslationConfigDetails $var + * @return $this + */ + public function setTranslationConfigDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TranslationConfigDetails::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Task details for unified SQL Translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationDetails translation_details = 16; + * @return \Google\Cloud\BigQuery\Migration\V2\TranslationDetails|null + */ + public function getTranslationDetails() + { + return $this->readOneof(16); + } + + public function hasTranslationDetails() + { + return $this->hasOneof(16); + } + + /** + * Task details for unified SQL Translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationDetails translation_details = 16; + * @param \Google\Cloud\BigQuery\Migration\V2\TranslationDetails $var + * @return $this + */ + public function setTranslationDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TranslationDetails::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Output only. Immutable. The unique identifier for the migration task. The + * ID is server-generated. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. Immutable. The unique identifier for the migration task. The + * ID is server-generated. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The type of the task. This must be one of the supported task types: + * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, + * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, + * Translation_Snowflake2BQ, Translation_Netezza2BQ, + * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, + * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, + * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the task. This must be one of the supported task types: + * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, + * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, + * Translation_Snowflake2BQ, Translation_Netezza2BQ, + * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, + * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, + * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + * + * 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; + } + + /** + * Output only. The current state of the task. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTask.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the task. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTask.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\MigrationTask\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. An explanation that may be populated when the task is in + * FAILED state. + * + * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\ErrorInfo|null + */ + public function getProcessingError() + { + return $this->processing_error; + } + + public function hasProcessingError() + { + return isset($this->processing_error); + } + + public function clearProcessingError() + { + unset($this->processing_error); + } + + /** + * Output only. An explanation that may be populated when the task is in + * FAILED state. + * + * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\ErrorInfo $var + * @return $this + */ + public function setProcessingError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\ErrorInfo::class); + $this->processing_error = $var; + + return $this; + } + + /** + * Time when the task was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @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); + } + + /** + * Time when the task was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Time when the task was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Time when the task was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + + /** + * Output only. Provides details to errors and issues encountered while + * processing the task. Presence of error details does not mean that the task + * failed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceErrorDetails() + { + return $this->resource_error_details; + } + + /** + * Output only. Provides details to errors and issues encountered while + * processing the task. Presence of error details does not mean that the task + * failed. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceErrorDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail::class); + $this->resource_error_details = $arr; + + return $this; + } + + /** + * The number or resources with errors. Note: This is not the total + * number of errors as each resource can have more than one error. + * This is used to indicate truncation by having a `resource_error_count` + * that is higher than the size of `resource_error_details`. + * + * Generated from protobuf field int32 resource_error_count = 18; + * @return int + */ + public function getResourceErrorCount() + { + return $this->resource_error_count; + } + + /** + * The number or resources with errors. Note: This is not the total + * number of errors as each resource can have more than one error. + * This is used to indicate truncation by having a `resource_error_count` + * that is higher than the size of `resource_error_details`. + * + * Generated from protobuf field int32 resource_error_count = 18; + * @param int $var + * @return $this + */ + public function setResourceErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->resource_error_count = $var; + + return $this; + } + + /** + * The metrics for the task. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * The metrics for the task. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19; + * @param array<\Google\Cloud\BigQuery\Migration\V2\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\TimeSeries::class); + $this->metrics = $arr; + + return $this; + } + + /** + * Output only. The result of the task. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTaskResult task_result = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Migration\V2\MigrationTaskResult|null + */ + public function getTaskResult() + { + return $this->task_result; + } + + public function hasTaskResult() + { + return isset($this->task_result); + } + + public function clearTaskResult() + { + unset($this->task_result); + } + + /** + * Output only. The result of the task. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTaskResult task_result = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Migration\V2\MigrationTaskResult $var + * @return $this + */ + public function setTaskResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\MigrationTaskResult::class); + $this->task_result = $var; + + return $this; + } + + /** + * Count of all the processing errors in this task and its subtasks. + * + * Generated from protobuf field int32 total_processing_error_count = 21; + * @return int + */ + public function getTotalProcessingErrorCount() + { + return $this->total_processing_error_count; + } + + /** + * Count of all the processing errors in this task and its subtasks. + * + * Generated from protobuf field int32 total_processing_error_count = 21; + * @param int $var + * @return $this + */ + public function setTotalProcessingErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->total_processing_error_count = $var; + + return $this; + } + + /** + * Count of all the resource errors in this task and its subtasks. + * + * Generated from protobuf field int32 total_resource_error_count = 22; + * @return int + */ + public function getTotalResourceErrorCount() + { + return $this->total_resource_error_count; + } + + /** + * Count of all the resource errors in this task and its subtasks. + * + * Generated from protobuf field int32 total_resource_error_count = 22; + * @param int $var + * @return $this + */ + public function setTotalResourceErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->total_resource_error_count = $var; + + return $this; + } + + /** + * @return string + */ + public function getTaskDetails() + { + return $this->whichOneof("task_details"); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask/State.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask/State.php new file mode 100644 index 000000000000..e55eb83b5525 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask/State.php @@ -0,0 +1,93 @@ +google.cloud.bigquery.migration.v2.MigrationTask.State + */ +class State +{ + /** + * The state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The task is waiting for orchestration. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The task is assigned to an orchestrator. + * + * Generated from protobuf enum ORCHESTRATING = 2; + */ + const ORCHESTRATING = 2; + /** + * The task is running, i.e. its subtasks are ready for execution. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * Tha task is paused. Assigned subtasks can continue, but no new subtasks + * will be scheduled. + * + * Generated from protobuf enum PAUSED = 4; + */ + const PAUSED = 4; + /** + * The task finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 5; + */ + const SUCCEEDED = 5; + /** + * The task finished unsuccessfully. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::ORCHESTRATING => 'ORCHESTRATING', + self::RUNNING => 'RUNNING', + self::PAUSED => 'PAUSED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\BigQuery\Migration\V2\MigrationTask_State::class); + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTaskResult.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTaskResult.php new file mode 100644 index 000000000000..b232b1eab376 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTaskResult.php @@ -0,0 +1,75 @@ +google.cloud.bigquery.migration.v2.MigrationTaskResult + */ +class MigrationTaskResult extends \Google\Protobuf\Internal\Message +{ + protected $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Migration\V2\TranslationTaskResult $translation_task_result + * Details specific to translation task types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); + parent::__construct($data); + } + + /** + * Details specific to translation task types. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationTaskResult translation_task_result = 2; + * @return \Google\Cloud\BigQuery\Migration\V2\TranslationTaskResult|null + */ + public function getTranslationTaskResult() + { + return $this->readOneof(2); + } + + public function hasTranslationTaskResult() + { + return $this->hasOneof(2); + } + + /** + * Details specific to translation task types. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationTaskResult translation_task_result = 2; + * @param \Google\Cloud\BigQuery\Migration\V2\TranslationTaskResult $var + * @return $this + */ + public function setTranslationTaskResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TranslationTaskResult::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getDetails() + { + return $this->whichOneof("details"); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow.php new file mode 100644 index 000000000000..09dd9ef34d5e --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow.php @@ -0,0 +1,278 @@ +google.cloud.bigquery.migration.v2.MigrationWorkflow + */ +class MigrationWorkflow extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Immutable. Identifier. The unique identifier for the migration + * workflow. The ID is server-generated. + * Example: `projects/123/locations/us/workflows/345` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The display name of the workflow. This can be set to give a workflow + * a descriptive name. There is no guarantee or enforcement of uniqueness. + * + * Generated from protobuf field string display_name = 6; + */ + protected $display_name = ''; + /** + * The tasks in a workflow in a named map. The name (i.e. key) has no + * meaning and is merely a convenient way to address a specific task + * in a workflow. + * + * Generated from protobuf field map tasks = 2; + */ + private $tasks; + /** + * Output only. That status of the workflow. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Time when the workflow was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + */ + protected $create_time = null; + /** + * Time when the workflow was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; + */ + protected $last_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Immutable. Identifier. The unique identifier for the migration + * workflow. The ID is server-generated. + * Example: `projects/123/locations/us/workflows/345` + * @type string $display_name + * The display name of the workflow. This can be set to give a workflow + * a descriptive name. There is no guarantee or enforcement of uniqueness. + * @type array|\Google\Protobuf\Internal\MapField $tasks + * The tasks in a workflow in a named map. The name (i.e. key) has no + * meaning and is merely a convenient way to address a specific task + * in a workflow. + * @type int $state + * Output only. That status of the workflow. + * @type \Google\Protobuf\Timestamp $create_time + * Time when the workflow was created. + * @type \Google\Protobuf\Timestamp $last_update_time + * Time when the workflow was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Immutable. Identifier. The unique identifier for the migration + * workflow. The ID is server-generated. + * Example: `projects/123/locations/us/workflows/345` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Immutable. Identifier. The unique identifier for the migration + * workflow. The ID is server-generated. + * Example: `projects/123/locations/us/workflows/345` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The display name of the workflow. This can be set to give a workflow + * a descriptive name. There is no guarantee or enforcement of uniqueness. + * + * Generated from protobuf field string display_name = 6; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the workflow. This can be set to give a workflow + * a descriptive name. There is no guarantee or enforcement of uniqueness. + * + * Generated from protobuf field string display_name = 6; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The tasks in a workflow in a named map. The name (i.e. key) has no + * meaning and is merely a convenient way to address a specific task + * in a workflow. + * + * Generated from protobuf field map tasks = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * The tasks in a workflow in a named map. The name (i.e. key) has no + * meaning and is merely a convenient way to address a specific task + * in a workflow. + * + * Generated from protobuf field map tasks = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\MigrationTask::class); + $this->tasks = $arr; + + return $this; + } + + /** + * Output only. That status of the workflow. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. That status of the workflow. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow\State::class); + $this->state = $var; + + return $this; + } + + /** + * Time when the workflow was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @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); + } + + /** + * Time when the workflow was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Time when the workflow was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Time when the workflow was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow/State.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow/State.php new file mode 100644 index 000000000000..a3d08c0f69bd --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow/State.php @@ -0,0 +1,82 @@ +google.cloud.bigquery.migration.v2.MigrationWorkflow.State + */ +class State +{ + /** + * Workflow state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Workflow is in draft status, i.e. tasks are not yet eligible for + * execution. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * Workflow is running (i.e. tasks are eligible for execution). + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * Workflow is paused. Tasks currently in progress may continue, but no + * further tasks will be scheduled. + * + * Generated from protobuf enum PAUSED = 3; + */ + const PAUSED = 3; + /** + * Workflow is complete. There should not be any task in a non-terminal + * state, but if they are (e.g. forced termination), they will not be + * scheduled. + * + * Generated from protobuf enum COMPLETED = 4; + */ + const COMPLETED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::RUNNING => 'RUNNING', + self::PAUSED => 'PAUSED', + self::COMPLETED => 'COMPLETED', + ]; + + 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\BigQuery\Migration\V2\MigrationWorkflow_State::class); + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MySQLDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MySQLDialect.php new file mode 100644 index 000000000000..0537001d6700 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MySQLDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.MySQLDialect + */ +class MySQLDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey.php new file mode 100644 index 000000000000..685893ad9db5 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey.php @@ -0,0 +1,216 @@ +google.cloud.bigquery.migration.v2.NameMappingKey + */ +class NameMappingKey extends \Google\Protobuf\Internal\Message +{ + /** + * The type of object that is being mapped. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey.Type type = 1; + */ + protected $type = 0; + /** + * The database name (BigQuery project ID equivalent in the source data + * warehouse). + * + * Generated from protobuf field string database = 2; + */ + protected $database = ''; + /** + * The schema name (BigQuery dataset equivalent in the source data warehouse). + * + * Generated from protobuf field string schema = 3; + */ + protected $schema = ''; + /** + * The relation name (BigQuery table or view equivalent in the source data + * warehouse). + * + * Generated from protobuf field string relation = 4; + */ + protected $relation = ''; + /** + * The attribute name (BigQuery column equivalent in the source data + * warehouse). + * + * Generated from protobuf field string attribute = 5; + */ + protected $attribute = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of object that is being mapped. + * @type string $database + * The database name (BigQuery project ID equivalent in the source data + * warehouse). + * @type string $schema + * The schema name (BigQuery dataset equivalent in the source data warehouse). + * @type string $relation + * The relation name (BigQuery table or view equivalent in the source data + * warehouse). + * @type string $attribute + * The attribute name (BigQuery column equivalent in the source data + * warehouse). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + + /** + * The type of object that is being mapped. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of object that is being mapped. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\NameMappingKey\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The database name (BigQuery project ID equivalent in the source data + * warehouse). + * + * Generated from protobuf field string database = 2; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * The database name (BigQuery project ID equivalent in the source data + * warehouse). + * + * Generated from protobuf field string database = 2; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The schema name (BigQuery dataset equivalent in the source data warehouse). + * + * Generated from protobuf field string schema = 3; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * The schema name (BigQuery dataset equivalent in the source data warehouse). + * + * Generated from protobuf field string schema = 3; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + + /** + * The relation name (BigQuery table or view equivalent in the source data + * warehouse). + * + * Generated from protobuf field string relation = 4; + * @return string + */ + public function getRelation() + { + return $this->relation; + } + + /** + * The relation name (BigQuery table or view equivalent in the source data + * warehouse). + * + * Generated from protobuf field string relation = 4; + * @param string $var + * @return $this + */ + public function setRelation($var) + { + GPBUtil::checkString($var, True); + $this->relation = $var; + + return $this; + } + + /** + * The attribute name (BigQuery column equivalent in the source data + * warehouse). + * + * Generated from protobuf field string attribute = 5; + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * The attribute name (BigQuery column equivalent in the source data + * warehouse). + * + * Generated from protobuf field string attribute = 5; + * @param string $var + * @return $this + */ + public function setAttribute($var) + { + GPBUtil::checkString($var, True); + $this->attribute = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey/Type.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey/Type.php new file mode 100644 index 000000000000..dac0840dcc6e --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey/Type.php @@ -0,0 +1,103 @@ +google.cloud.bigquery.migration.v2.NameMappingKey.Type + */ +class Type +{ + /** + * Unspecified name mapping type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * The object being mapped is a database. + * + * Generated from protobuf enum DATABASE = 1; + */ + const DATABASE = 1; + /** + * The object being mapped is a schema. + * + * Generated from protobuf enum SCHEMA = 2; + */ + const SCHEMA = 2; + /** + * The object being mapped is a relation. + * + * Generated from protobuf enum RELATION = 3; + */ + const RELATION = 3; + /** + * The object being mapped is an attribute. + * + * Generated from protobuf enum ATTRIBUTE = 4; + */ + const ATTRIBUTE = 4; + /** + * The object being mapped is a relation alias. + * + * Generated from protobuf enum RELATION_ALIAS = 5; + */ + const RELATION_ALIAS = 5; + /** + * The object being mapped is a an attribute alias. + * + * Generated from protobuf enum ATTRIBUTE_ALIAS = 6; + */ + const ATTRIBUTE_ALIAS = 6; + /** + * The object being mapped is a function. + * + * Generated from protobuf enum FUNCTION = 7; + */ + const PBFUNCTION = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::DATABASE => 'DATABASE', + self::SCHEMA => 'SCHEMA', + self::RELATION => 'RELATION', + self::ATTRIBUTE => 'ATTRIBUTE', + self::RELATION_ALIAS => 'RELATION_ALIAS', + self::ATTRIBUTE_ALIAS => 'ATTRIBUTE_ALIAS', + self::PBFUNCTION => 'FUNCTION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\BigQuery\Migration\V2\NameMappingKey_Type::class); + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingValue.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingValue.php new file mode 100644 index 000000000000..9720101da805 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingValue.php @@ -0,0 +1,182 @@ +google.cloud.bigquery.migration.v2.NameMappingValue + */ +class NameMappingValue extends \Google\Protobuf\Internal\Message +{ + /** + * The database name (BigQuery project ID equivalent in the target data + * warehouse). + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * The schema name (BigQuery dataset equivalent in the target data warehouse). + * + * Generated from protobuf field string schema = 2; + */ + protected $schema = ''; + /** + * The relation name (BigQuery table or view equivalent in the target data + * warehouse). + * + * Generated from protobuf field string relation = 3; + */ + protected $relation = ''; + /** + * The attribute name (BigQuery column equivalent in the target data + * warehouse). + * + * Generated from protobuf field string attribute = 4; + */ + protected $attribute = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * The database name (BigQuery project ID equivalent in the target data + * warehouse). + * @type string $schema + * The schema name (BigQuery dataset equivalent in the target data warehouse). + * @type string $relation + * The relation name (BigQuery table or view equivalent in the target data + * warehouse). + * @type string $attribute + * The attribute name (BigQuery column equivalent in the target data + * warehouse). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + + /** + * The database name (BigQuery project ID equivalent in the target data + * warehouse). + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * The database name (BigQuery project ID equivalent in the target data + * warehouse). + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The schema name (BigQuery dataset equivalent in the target data warehouse). + * + * Generated from protobuf field string schema = 2; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * The schema name (BigQuery dataset equivalent in the target data warehouse). + * + * Generated from protobuf field string schema = 2; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + + /** + * The relation name (BigQuery table or view equivalent in the target data + * warehouse). + * + * Generated from protobuf field string relation = 3; + * @return string + */ + public function getRelation() + { + return $this->relation; + } + + /** + * The relation name (BigQuery table or view equivalent in the target data + * warehouse). + * + * Generated from protobuf field string relation = 3; + * @param string $var + * @return $this + */ + public function setRelation($var) + { + GPBUtil::checkString($var, True); + $this->relation = $var; + + return $this; + } + + /** + * The attribute name (BigQuery column equivalent in the target data + * warehouse). + * + * Generated from protobuf field string attribute = 4; + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * The attribute name (BigQuery column equivalent in the target data + * warehouse). + * + * Generated from protobuf field string attribute = 4; + * @param string $var + * @return $this + */ + public function setAttribute($var) + { + GPBUtil::checkString($var, True); + $this->attribute = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NetezzaDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NetezzaDialect.php new file mode 100644 index 000000000000..1a722f2364c1 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NetezzaDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.NetezzaDialect + */ +class NetezzaDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMapping.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMapping.php new file mode 100644 index 000000000000..8f6205ed4689 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMapping.php @@ -0,0 +1,122 @@ +google.cloud.bigquery.migration.v2.ObjectNameMapping + */ +class ObjectNameMapping extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the object in source that is being mapped. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey source = 1; + */ + protected $source = null; + /** + * The desired target name of the object that is being mapped. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingValue target = 2; + */ + protected $target = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Migration\V2\NameMappingKey $source + * The name of the object in source that is being mapped. + * @type \Google\Cloud\BigQuery\Migration\V2\NameMappingValue $target + * The desired target name of the object that is being mapped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + + /** + * The name of the object in source that is being mapped. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey source = 1; + * @return \Google\Cloud\BigQuery\Migration\V2\NameMappingKey|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * The name of the object in source that is being mapped. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey source = 1; + * @param \Google\Cloud\BigQuery\Migration\V2\NameMappingKey $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\NameMappingKey::class); + $this->source = $var; + + return $this; + } + + /** + * The desired target name of the object that is being mapped. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingValue target = 2; + * @return \Google\Cloud\BigQuery\Migration\V2\NameMappingValue|null + */ + public function getTarget() + { + return $this->target; + } + + public function hasTarget() + { + return isset($this->target); + } + + public function clearTarget() + { + unset($this->target); + } + + /** + * The desired target name of the object that is being mapped. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingValue target = 2; + * @param \Google\Cloud\BigQuery\Migration\V2\NameMappingValue $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\NameMappingValue::class); + $this->target = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMappingList.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMappingList.php new file mode 100644 index 000000000000..6dba3633d75d --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMappingList.php @@ -0,0 +1,68 @@ +google.cloud.bigquery.migration.v2.ObjectNameMappingList + */ +class ObjectNameMappingList extends \Google\Protobuf\Internal\Message +{ + /** + * The elements of the object name map. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ObjectNameMapping name_map = 1; + */ + private $name_map; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\Migration\V2\ObjectNameMapping>|\Google\Protobuf\Internal\RepeatedField $name_map + * The elements of the object name map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + + /** + * The elements of the object name map. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ObjectNameMapping name_map = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNameMap() + { + return $this->name_map; + } + + /** + * The elements of the object name map. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ObjectNameMapping name_map = 1; + * @param array<\Google\Cloud\BigQuery\Migration\V2\ObjectNameMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNameMap($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\ObjectNameMapping::class); + $this->name_map = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/OracleDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/OracleDialect.php new file mode 100644 index 000000000000..3d3708230e6d --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/OracleDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.OracleDialect + */ +class OracleDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Point.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Point.php new file mode 100644 index 000000000000..19294ba7a81d --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Point.php @@ -0,0 +1,153 @@ +google.cloud.bigquery.migration.v2.Point + */ +class Point extends \Google\Protobuf\Internal\Message +{ + /** + * The time interval to which the data point applies. For `GAUGE` metrics, + * the start time does not need to be supplied, but if it is supplied, it must + * equal the end time. For `DELTA` metrics, the start and end time should + * specify a non-zero interval, with subsequent points specifying contiguous + * and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * the same start time and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TimeInterval interval = 1; + */ + protected $interval = null; + /** + * The value of the data point. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TypedValue value = 2; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Migration\V2\TimeInterval $interval + * The time interval to which the data point applies. For `GAUGE` metrics, + * the start time does not need to be supplied, but if it is supplied, it must + * equal the end time. For `DELTA` metrics, the start and end time should + * specify a non-zero interval, with subsequent points specifying contiguous + * and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * the same start time and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. + * @type \Google\Cloud\BigQuery\Migration\V2\TypedValue $value + * The value of the data point. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationMetrics::initOnce(); + parent::__construct($data); + } + + /** + * The time interval to which the data point applies. For `GAUGE` metrics, + * the start time does not need to be supplied, but if it is supplied, it must + * equal the end time. For `DELTA` metrics, the start and end time should + * specify a non-zero interval, with subsequent points specifying contiguous + * and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * the same start time and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TimeInterval interval = 1; + * @return \Google\Cloud\BigQuery\Migration\V2\TimeInterval|null + */ + public function getInterval() + { + return $this->interval; + } + + public function hasInterval() + { + return isset($this->interval); + } + + public function clearInterval() + { + unset($this->interval); + } + + /** + * The time interval to which the data point applies. For `GAUGE` metrics, + * the start time does not need to be supplied, but if it is supplied, it must + * equal the end time. For `DELTA` metrics, the start and end time should + * specify a non-zero interval, with subsequent points specifying contiguous + * and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * the same start time and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TimeInterval interval = 1; + * @param \Google\Cloud\BigQuery\Migration\V2\TimeInterval $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TimeInterval::class); + $this->interval = $var; + + return $this; + } + + /** + * The value of the data point. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TypedValue value = 2; + * @return \Google\Cloud\BigQuery\Migration\V2\TypedValue|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * The value of the data point. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TypedValue value = 2; + * @param \Google\Cloud\BigQuery\Migration\V2\TypedValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TypedValue::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PostgresqlDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PostgresqlDialect.php new file mode 100644 index 000000000000..9be7ec3ba359 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PostgresqlDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.PostgresqlDialect + */ +class PostgresqlDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PrestoDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PrestoDialect.php new file mode 100644 index 000000000000..ede9e320ec01 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PrestoDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.PrestoDialect + */ +class PrestoDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/RedshiftDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/RedshiftDialect.php new file mode 100644 index 000000000000..a2130a53a9af --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/RedshiftDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.RedshiftDialect + */ +class RedshiftDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ResourceErrorDetail.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ResourceErrorDetail.php new file mode 100644 index 000000000000..a28217d83d87 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ResourceErrorDetail.php @@ -0,0 +1,153 @@ +google.cloud.bigquery.migration.v2.ResourceErrorDetail + */ +class ResourceErrorDetail extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Information about the resource where the error is located. + * + * Generated from protobuf field .google.rpc.ResourceInfo resource_info = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource_info = null; + /** + * Required. The error details for the resource. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ErrorDetail error_details = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $error_details; + /** + * Required. How many errors there are in total for the resource. Truncation + * can be indicated by having an `error_count` that is higher than the size of + * `error_details`. + * + * Generated from protobuf field int32 error_count = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $error_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\ResourceInfo $resource_info + * Required. Information about the resource where the error is located. + * @type array<\Google\Cloud\BigQuery\Migration\V2\ErrorDetail>|\Google\Protobuf\Internal\RepeatedField $error_details + * Required. The error details for the resource. + * @type int $error_count + * Required. How many errors there are in total for the resource. Truncation + * can be indicated by having an `error_count` that is higher than the size of + * `error_details`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationErrorDetails::initOnce(); + parent::__construct($data); + } + + /** + * Required. Information about the resource where the error is located. + * + * Generated from protobuf field .google.rpc.ResourceInfo resource_info = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Rpc\ResourceInfo|null + */ + public function getResourceInfo() + { + return $this->resource_info; + } + + public function hasResourceInfo() + { + return isset($this->resource_info); + } + + public function clearResourceInfo() + { + unset($this->resource_info); + } + + /** + * Required. Information about the resource where the error is located. + * + * Generated from protobuf field .google.rpc.ResourceInfo resource_info = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Rpc\ResourceInfo $var + * @return $this + */ + public function setResourceInfo($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\ResourceInfo::class); + $this->resource_info = $var; + + return $this; + } + + /** + * Required. The error details for the resource. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ErrorDetail error_details = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorDetails() + { + return $this->error_details; + } + + /** + * Required. The error details for the resource. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ErrorDetail error_details = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\BigQuery\Migration\V2\ErrorDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\ErrorDetail::class); + $this->error_details = $arr; + + return $this; + } + + /** + * Required. How many errors there are in total for the resource. Truncation + * can be indicated by having an `error_count` that is higher than the size of + * `error_details`. + * + * Generated from protobuf field int32 error_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getErrorCount() + { + return $this->error_count; + } + + /** + * Required. How many errors there are in total for the resource. Truncation + * can be indicated by having an `error_count` that is higher than the size of + * `error_details`. + * + * Generated from protobuf field int32 error_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->error_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLServerDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLServerDialect.php new file mode 100644 index 000000000000..f535d05ac4af --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLServerDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.SQLServerDialect + */ +class SQLServerDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLiteDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLiteDialect.php new file mode 100644 index 000000000000..49887f66be65 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLiteDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.SQLiteDialect + */ +class SQLiteDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SnowflakeDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SnowflakeDialect.php new file mode 100644 index 000000000000..b0edf5c26f67 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SnowflakeDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.SnowflakeDialect + */ +class SnowflakeDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnv.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnv.php new file mode 100644 index 000000000000..83549de530ab --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnv.php @@ -0,0 +1,163 @@ +google.cloud.bigquery.migration.v2.SourceEnv + */ +class SourceEnv extends \Google\Protobuf\Internal\Message +{ + /** + * The default database name to fully qualify SQL objects when their database + * name is missing. + * + * Generated from protobuf field string default_database = 1; + */ + protected $default_database = ''; + /** + * The schema search path. When SQL objects are missing schema name, + * translation engine will search through this list to find the value. + * + * Generated from protobuf field repeated string schema_search_path = 2; + */ + private $schema_search_path; + /** + * Optional. Expects a valid BigQuery dataset ID that exists, e.g., + * project-123.metadata_store_123. If specified, translation will search and + * read the required schema information from a metadata store in this dataset. + * If metadata store doesn't exist, translation will parse the metadata file + * and upload the schema info to a temp table in the dataset to speed up + * future translation jobs. + * + * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metadata_store_dataset = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $default_database + * The default database name to fully qualify SQL objects when their database + * name is missing. + * @type array|\Google\Protobuf\Internal\RepeatedField $schema_search_path + * The schema search path. When SQL objects are missing schema name, + * translation engine will search through this list to find the value. + * @type string $metadata_store_dataset + * Optional. Expects a valid BigQuery dataset ID that exists, e.g., + * project-123.metadata_store_123. If specified, translation will search and + * read the required schema information from a metadata store in this dataset. + * If metadata store doesn't exist, translation will parse the metadata file + * and upload the schema info to a temp table in the dataset to speed up + * future translation jobs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + + /** + * The default database name to fully qualify SQL objects when their database + * name is missing. + * + * Generated from protobuf field string default_database = 1; + * @return string + */ + public function getDefaultDatabase() + { + return $this->default_database; + } + + /** + * The default database name to fully qualify SQL objects when their database + * name is missing. + * + * Generated from protobuf field string default_database = 1; + * @param string $var + * @return $this + */ + public function setDefaultDatabase($var) + { + GPBUtil::checkString($var, True); + $this->default_database = $var; + + return $this; + } + + /** + * The schema search path. When SQL objects are missing schema name, + * translation engine will search through this list to find the value. + * + * Generated from protobuf field repeated string schema_search_path = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSchemaSearchPath() + { + return $this->schema_search_path; + } + + /** + * The schema search path. When SQL objects are missing schema name, + * translation engine will search through this list to find the value. + * + * Generated from protobuf field repeated string schema_search_path = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSchemaSearchPath($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->schema_search_path = $arr; + + return $this; + } + + /** + * Optional. Expects a valid BigQuery dataset ID that exists, e.g., + * project-123.metadata_store_123. If specified, translation will search and + * read the required schema information from a metadata store in this dataset. + * If metadata store doesn't exist, translation will parse the metadata file + * and upload the schema info to a temp table in the dataset to speed up + * future translation jobs. + * + * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMetadataStoreDataset() + { + return $this->metadata_store_dataset; + } + + /** + * Optional. Expects a valid BigQuery dataset ID that exists, e.g., + * project-123.metadata_store_123. If specified, translation will search and + * read the required schema information from a metadata store in this dataset. + * If metadata store doesn't exist, translation will parse the metadata file + * and upload the schema info to a temp table in the dataset to speed up + * future translation jobs. + * + * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMetadataStoreDataset($var) + { + GPBUtil::checkString($var, True); + $this->metadata_store_dataset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnvironment.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnvironment.php new file mode 100644 index 000000000000..95e9b3842155 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnvironment.php @@ -0,0 +1,163 @@ +google.cloud.bigquery.migration.v2.SourceEnvironment + */ +class SourceEnvironment extends \Google\Protobuf\Internal\Message +{ + /** + * The default database name to fully qualify SQL objects when their database + * name is missing. + * + * Generated from protobuf field string default_database = 1; + */ + protected $default_database = ''; + /** + * The schema search path. When SQL objects are missing schema name, + * translation engine will search through this list to find the value. + * + * Generated from protobuf field repeated string schema_search_path = 2; + */ + private $schema_search_path; + /** + * Optional. Expects a validQ BigQuery dataset ID that exists, e.g., + * project-123.metadata_store_123. If specified, translation will search and + * read the required schema information from a metadata store in this dataset. + * If metadata store doesn't exist, translation will parse the metadata file + * and upload the schema info to a temp table in the dataset to speed up + * future translation jobs. + * + * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metadata_store_dataset = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $default_database + * The default database name to fully qualify SQL objects when their database + * name is missing. + * @type array|\Google\Protobuf\Internal\RepeatedField $schema_search_path + * The schema search path. When SQL objects are missing schema name, + * translation engine will search through this list to find the value. + * @type string $metadata_store_dataset + * Optional. Expects a validQ BigQuery dataset ID that exists, e.g., + * project-123.metadata_store_123. If specified, translation will search and + * read the required schema information from a metadata store in this dataset. + * If metadata store doesn't exist, translation will parse the metadata file + * and upload the schema info to a temp table in the dataset to speed up + * future translation jobs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); + parent::__construct($data); + } + + /** + * The default database name to fully qualify SQL objects when their database + * name is missing. + * + * Generated from protobuf field string default_database = 1; + * @return string + */ + public function getDefaultDatabase() + { + return $this->default_database; + } + + /** + * The default database name to fully qualify SQL objects when their database + * name is missing. + * + * Generated from protobuf field string default_database = 1; + * @param string $var + * @return $this + */ + public function setDefaultDatabase($var) + { + GPBUtil::checkString($var, True); + $this->default_database = $var; + + return $this; + } + + /** + * The schema search path. When SQL objects are missing schema name, + * translation engine will search through this list to find the value. + * + * Generated from protobuf field repeated string schema_search_path = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSchemaSearchPath() + { + return $this->schema_search_path; + } + + /** + * The schema search path. When SQL objects are missing schema name, + * translation engine will search through this list to find the value. + * + * Generated from protobuf field repeated string schema_search_path = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSchemaSearchPath($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->schema_search_path = $arr; + + return $this; + } + + /** + * Optional. Expects a validQ BigQuery dataset ID that exists, e.g., + * project-123.metadata_store_123. If specified, translation will search and + * read the required schema information from a metadata store in this dataset. + * If metadata store doesn't exist, translation will parse the metadata file + * and upload the schema info to a temp table in the dataset to speed up + * future translation jobs. + * + * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMetadataStoreDataset() + { + return $this->metadata_store_dataset; + } + + /** + * Optional. Expects a validQ BigQuery dataset ID that exists, e.g., + * project-123.metadata_store_123. If specified, translation will search and + * read the required schema information from a metadata store in this dataset. + * If metadata store doesn't exist, translation will parse the metadata file + * and upload the schema info to a temp table in the dataset to speed up + * future translation jobs. + * + * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMetadataStoreDataset($var) + { + GPBUtil::checkString($var, True); + $this->metadata_store_dataset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceSpec.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceSpec.php new file mode 100644 index 000000000000..143506f1f801 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceSpec.php @@ -0,0 +1,142 @@ +google.cloud.bigquery.migration.v2.SourceSpec + */ +class SourceSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The optional field to specify the encoding of the sql bytes. + * + * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encoding = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $base_uri + * The base URI for all files to be read in as sources for translation. + * @type \Google\Cloud\BigQuery\Migration\V2\Literal $literal + * Source literal. + * @type string $encoding + * Optional. The optional field to specify the encoding of the sql bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); + parent::__construct($data); + } + + /** + * The base URI for all files to be read in as sources for translation. + * + * Generated from protobuf field string base_uri = 1; + * @return string + */ + public function getBaseUri() + { + return $this->readOneof(1); + } + + public function hasBaseUri() + { + return $this->hasOneof(1); + } + + /** + * The base URI for all files to be read in as sources for translation. + * + * Generated from protobuf field string base_uri = 1; + * @param string $var + * @return $this + */ + public function setBaseUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Source literal. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.Literal literal = 2; + * @return \Google\Cloud\BigQuery\Migration\V2\Literal|null + */ + public function getLiteral() + { + return $this->readOneof(2); + } + + public function hasLiteral() + { + return $this->hasOneof(2); + } + + /** + * Source literal. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.Literal literal = 2; + * @param \Google\Cloud\BigQuery\Migration\V2\Literal $var + * @return $this + */ + public function setLiteral($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\Literal::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. The optional field to specify the encoding of the sql bytes. + * + * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Optional. The optional field to specify the encoding of the sql bytes. + * + * 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; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceTargetMapping.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceTargetMapping.php new file mode 100644 index 000000000000..6748f2073f03 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceTargetMapping.php @@ -0,0 +1,121 @@ +google.cloud.bigquery.migration.v2.SourceTargetMapping + */ +class SourceTargetMapping extends \Google\Protobuf\Internal\Message +{ + /** + * The source SQL or the path to it. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceSpec source_spec = 1; + */ + protected $source_spec = null; + /** + * The target SQL or the path for it. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TargetSpec target_spec = 2; + */ + protected $target_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Migration\V2\SourceSpec $source_spec + * The source SQL or the path to it. + * @type \Google\Cloud\BigQuery\Migration\V2\TargetSpec $target_spec + * The target SQL or the path for it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); + parent::__construct($data); + } + + /** + * The source SQL or the path to it. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceSpec source_spec = 1; + * @return \Google\Cloud\BigQuery\Migration\V2\SourceSpec|null + */ + public function getSourceSpec() + { + return $this->source_spec; + } + + public function hasSourceSpec() + { + return isset($this->source_spec); + } + + public function clearSourceSpec() + { + unset($this->source_spec); + } + + /** + * The source SQL or the path to it. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceSpec source_spec = 1; + * @param \Google\Cloud\BigQuery\Migration\V2\SourceSpec $var + * @return $this + */ + public function setSourceSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SourceSpec::class); + $this->source_spec = $var; + + return $this; + } + + /** + * The target SQL or the path for it. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TargetSpec target_spec = 2; + * @return \Google\Cloud\BigQuery\Migration\V2\TargetSpec|null + */ + public function getTargetSpec() + { + return $this->target_spec; + } + + public function hasTargetSpec() + { + return isset($this->target_spec); + } + + public function clearTargetSpec() + { + unset($this->target_spec); + } + + /** + * The target SQL or the path for it. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TargetSpec target_spec = 2; + * @param \Google\Cloud\BigQuery\Migration\V2\TargetSpec $var + * @return $this + */ + public function setTargetSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TargetSpec::class); + $this->target_spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SparkSQLDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SparkSQLDialect.php new file mode 100644 index 000000000000..a933fa68324d --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SparkSQLDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.SparkSQLDialect + */ +class SparkSQLDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/StartMigrationWorkflowRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/StartMigrationWorkflowRequest.php new file mode 100644 index 000000000000..28129d124acf --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/StartMigrationWorkflowRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + */ +class StartMigrationWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * Please see {@see MigrationServiceClient::migrationWorkflowName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Migration\V2\StartMigrationWorkflowRequest + * + * @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 unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * + * 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/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TargetSpec.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TargetSpec.php new file mode 100644 index 000000000000..81a5fa9cf538 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TargetSpec.php @@ -0,0 +1,75 @@ +google.cloud.bigquery.migration.v2.TargetSpec + */ +class TargetSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The relative path for the target data. Given source file + * `base_uri/input/sql`, the output would be + * `target_base_uri/sql/relative_path/input.sql`. + * + * Generated from protobuf field string relative_path = 1; + */ + protected $relative_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $relative_path + * The relative path for the target data. Given source file + * `base_uri/input/sql`, the output would be + * `target_base_uri/sql/relative_path/input.sql`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); + parent::__construct($data); + } + + /** + * The relative path for the target data. Given source file + * `base_uri/input/sql`, the output would be + * `target_base_uri/sql/relative_path/input.sql`. + * + * Generated from protobuf field string relative_path = 1; + * @return string + */ + public function getRelativePath() + { + return $this->relative_path; + } + + /** + * The relative path for the target data. Given source file + * `base_uri/input/sql`, the output would be + * `target_base_uri/sql/relative_path/input.sql`. + * + * Generated from protobuf field string relative_path = 1; + * @param string $var + * @return $this + */ + public function setRelativePath($var) + { + GPBUtil::checkString($var, True); + $this->relative_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect.php new file mode 100644 index 000000000000..b50e261eeb92 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.migration.v2.TeradataDialect + */ +class TeradataDialect extends \Google\Protobuf\Internal\Message +{ + /** + * Which Teradata sub-dialect mode the user specifies. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect.Mode mode = 1; + */ + protected $mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * Which Teradata sub-dialect mode the user specifies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + + /** + * Which Teradata sub-dialect mode the user specifies. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect.Mode mode = 1; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Which Teradata sub-dialect mode the user specifies. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect.Mode mode = 1; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\TeradataDialect\Mode::class); + $this->mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect/Mode.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect/Mode.php new file mode 100644 index 000000000000..8565d3737289 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect/Mode.php @@ -0,0 +1,64 @@ +google.cloud.bigquery.migration.v2.TeradataDialect.Mode + */ +class Mode +{ + /** + * Unspecified mode. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Teradata SQL mode. + * + * Generated from protobuf enum SQL = 1; + */ + const SQL = 1; + /** + * BTEQ mode (which includes SQL). + * + * Generated from protobuf enum BTEQ = 2; + */ + const BTEQ = 2; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::SQL => 'SQL', + self::BTEQ => 'BTEQ', + ]; + + 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\BigQuery\Migration\V2\TeradataDialect_Mode::class); + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeInterval.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeInterval.php new file mode 100644 index 000000000000..ecb718c94a98 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeInterval.php @@ -0,0 +1,131 @@ +google.cloud.bigquery.migration.v2.TimeInterval + */ +class TimeInterval extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The beginning of the time interval. The default value + * for the start time is the end time. The start time must not be + * later than the end time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $start_time = null; + /** + * Required. The end of the time interval. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Optional. The beginning of the time interval. The default value + * for the start time is the end time. The start time must not be + * later than the end time. + * @type \Google\Protobuf\Timestamp $end_time + * Required. The end of the time interval. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationMetrics::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The beginning of the time interval. The default value + * for the start time is the end time. The start time must not be + * later than the end time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.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 beginning of the time interval. The default value + * for the start time is the end time. The start time must not be + * later than the end time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.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; + } + + /** + * Required. The end of the time interval. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The end of the time interval. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeSeries.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeSeries.php new file mode 100644 index 000000000000..2ea97494c4de --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeSeries.php @@ -0,0 +1,213 @@ +google.cloud.bigquery.migration.v2.TimeSeries + */ +class TimeSeries extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the metric. + * If the metric is not known by the service yet, it will be auto-created. + * + * Generated from protobuf field string metric = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric = ''; + /** + * Required. The value type of the time series. + * + * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value_type = 0; + /** + * Optional. The metric kind of the time series. + * If present, it must be the same as the metric kind of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * this field specifies the metric kind of the new descriptor and must be + * either `GAUGE` (the default) or `CUMULATIVE`. + * + * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_kind = 0; + /** + * Required. The data points of this time series. When listing time series, + * points are returned in reverse time order. + * When creating a time series, this field must contain exactly one point and + * the point's type must be the same as the value type of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * the value type of the descriptor is determined by the point's type, which + * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $points; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric + * Required. The name of the metric. + * If the metric is not known by the service yet, it will be auto-created. + * @type int $value_type + * Required. The value type of the time series. + * @type int $metric_kind + * Optional. The metric kind of the time series. + * If present, it must be the same as the metric kind of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * this field specifies the metric kind of the new descriptor and must be + * either `GAUGE` (the default) or `CUMULATIVE`. + * @type array<\Google\Cloud\BigQuery\Migration\V2\Point>|\Google\Protobuf\Internal\RepeatedField $points + * Required. The data points of this time series. When listing time series, + * points are returned in reverse time order. + * When creating a time series, this field must contain exactly one point and + * the point's type must be the same as the value type of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * the value type of the descriptor is determined by the point's type, which + * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationMetrics::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the metric. + * If the metric is not known by the service yet, it will be auto-created. + * + * Generated from protobuf field string metric = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMetric() + { + return $this->metric; + } + + /** + * Required. The name of the metric. + * If the metric is not known by the service yet, it will be auto-created. + * + * Generated from protobuf field string metric = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMetric($var) + { + GPBUtil::checkString($var, True); + $this->metric = $var; + + return $this; + } + + /** + * Required. The value type of the time series. + * + * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getValueType() + { + return $this->value_type; + } + + /** + * Required. The value type of the time series. + * + * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setValueType($var) + { + GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\ValueType::class); + $this->value_type = $var; + + return $this; + } + + /** + * Optional. The metric kind of the time series. + * If present, it must be the same as the metric kind of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * this field specifies the metric kind of the new descriptor and must be + * either `GAUGE` (the default) or `CUMULATIVE`. + * + * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMetricKind() + { + return $this->metric_kind; + } + + /** + * Optional. The metric kind of the time series. + * If present, it must be the same as the metric kind of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * this field specifies the metric kind of the new descriptor and must be + * either `GAUGE` (the default) or `CUMULATIVE`. + * + * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMetricKind($var) + { + GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\MetricKind::class); + $this->metric_kind = $var; + + return $this; + } + + /** + * Required. The data points of this time series. When listing time series, + * points are returned in reverse time order. + * When creating a time series, this field must contain exactly one point and + * the point's type must be the same as the value type of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * the value type of the descriptor is determined by the point's type, which + * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPoints() + { + return $this->points; + } + + /** + * Required. The data points of this time series. When listing time series, + * points are returned in reverse time order. + * When creating a time series, this field must contain exactly one point and + * the point's type must be the same as the value type of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * the value type of the descriptor is determined by the point's type, which + * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\BigQuery\Migration\V2\Point>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\Point::class); + $this->points = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationConfigDetails.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationConfigDetails.php new file mode 100644 index 000000000000..73e902b8d2f1 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationConfigDetails.php @@ -0,0 +1,372 @@ +google.cloud.bigquery.migration.v2.TranslationConfigDetails + */ +class TranslationConfigDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The dialect of the input files. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect source_dialect = 3; + */ + protected $source_dialect = null; + /** + * The target dialect for the engine to translate the input to. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect target_dialect = 4; + */ + protected $target_dialect = null; + /** + * The default source environment values for the translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnv source_env = 6; + */ + protected $source_env = null; + /** + * The indicator to show translation request initiator. + * + * Generated from protobuf field string request_source = 8; + */ + protected $request_source = ''; + /** + * The types of output to generate, e.g. sql, metadata etc. If not specified, + * a default set of targets will be generated. Some additional target types + * may be slower to generate. See the documentation for the set of available + * target types. + * + * Generated from protobuf field repeated string target_types = 9; + */ + private $target_types; + protected $source_location; + protected $target_location; + protected $output_name_mapping; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_source_path + * The Cloud Storage path for a directory of files to translate in a task. + * @type string $gcs_target_path + * The Cloud Storage path to write back the corresponding input files to. + * @type \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList $name_mapping_list + * The mapping of objects to their desired output names in list form. + * @type \Google\Cloud\BigQuery\Migration\V2\Dialect $source_dialect + * The dialect of the input files. + * @type \Google\Cloud\BigQuery\Migration\V2\Dialect $target_dialect + * The target dialect for the engine to translate the input to. + * @type \Google\Cloud\BigQuery\Migration\V2\SourceEnv $source_env + * The default source environment values for the translation. + * @type string $request_source + * The indicator to show translation request initiator. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_types + * The types of output to generate, e.g. sql, metadata etc. If not specified, + * a default set of targets will be generated. Some additional target types + * may be slower to generate. See the documentation for the set of available + * target types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage path for a directory of files to translate in a task. + * + * Generated from protobuf field string gcs_source_path = 1; + * @return string + */ + public function getGcsSourcePath() + { + return $this->readOneof(1); + } + + public function hasGcsSourcePath() + { + return $this->hasOneof(1); + } + + /** + * The Cloud Storage path for a directory of files to translate in a task. + * + * Generated from protobuf field string gcs_source_path = 1; + * @param string $var + * @return $this + */ + public function setGcsSourcePath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The Cloud Storage path to write back the corresponding input files to. + * + * Generated from protobuf field string gcs_target_path = 2; + * @return string + */ + public function getGcsTargetPath() + { + return $this->readOneof(2); + } + + public function hasGcsTargetPath() + { + return $this->hasOneof(2); + } + + /** + * The Cloud Storage path to write back the corresponding input files to. + * + * Generated from protobuf field string gcs_target_path = 2; + * @param string $var + * @return $this + */ + public function setGcsTargetPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The mapping of objects to their desired output names in list form. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.ObjectNameMappingList name_mapping_list = 5; + * @return \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList|null + */ + public function getNameMappingList() + { + return $this->readOneof(5); + } + + public function hasNameMappingList() + { + return $this->hasOneof(5); + } + + /** + * The mapping of objects to their desired output names in list form. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.ObjectNameMappingList name_mapping_list = 5; + * @param \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList $var + * @return $this + */ + public function setNameMappingList($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The dialect of the input files. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect source_dialect = 3; + * @return \Google\Cloud\BigQuery\Migration\V2\Dialect|null + */ + public function getSourceDialect() + { + return $this->source_dialect; + } + + public function hasSourceDialect() + { + return isset($this->source_dialect); + } + + public function clearSourceDialect() + { + unset($this->source_dialect); + } + + /** + * The dialect of the input files. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect source_dialect = 3; + * @param \Google\Cloud\BigQuery\Migration\V2\Dialect $var + * @return $this + */ + public function setSourceDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\Dialect::class); + $this->source_dialect = $var; + + return $this; + } + + /** + * The target dialect for the engine to translate the input to. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect target_dialect = 4; + * @return \Google\Cloud\BigQuery\Migration\V2\Dialect|null + */ + public function getTargetDialect() + { + return $this->target_dialect; + } + + public function hasTargetDialect() + { + return isset($this->target_dialect); + } + + public function clearTargetDialect() + { + unset($this->target_dialect); + } + + /** + * The target dialect for the engine to translate the input to. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect target_dialect = 4; + * @param \Google\Cloud\BigQuery\Migration\V2\Dialect $var + * @return $this + */ + public function setTargetDialect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\Dialect::class); + $this->target_dialect = $var; + + return $this; + } + + /** + * The default source environment values for the translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnv source_env = 6; + * @return \Google\Cloud\BigQuery\Migration\V2\SourceEnv|null + */ + public function getSourceEnv() + { + return $this->source_env; + } + + public function hasSourceEnv() + { + return isset($this->source_env); + } + + public function clearSourceEnv() + { + unset($this->source_env); + } + + /** + * The default source environment values for the translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnv source_env = 6; + * @param \Google\Cloud\BigQuery\Migration\V2\SourceEnv $var + * @return $this + */ + public function setSourceEnv($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SourceEnv::class); + $this->source_env = $var; + + return $this; + } + + /** + * The indicator to show translation request initiator. + * + * Generated from protobuf field string request_source = 8; + * @return string + */ + public function getRequestSource() + { + return $this->request_source; + } + + /** + * The indicator to show translation request initiator. + * + * Generated from protobuf field string request_source = 8; + * @param string $var + * @return $this + */ + public function setRequestSource($var) + { + GPBUtil::checkString($var, True); + $this->request_source = $var; + + return $this; + } + + /** + * The types of output to generate, e.g. sql, metadata etc. If not specified, + * a default set of targets will be generated. Some additional target types + * may be slower to generate. See the documentation for the set of available + * target types. + * + * Generated from protobuf field repeated string target_types = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetTypes() + { + return $this->target_types; + } + + /** + * The types of output to generate, e.g. sql, metadata etc. If not specified, + * a default set of targets will be generated. Some additional target types + * may be slower to generate. See the documentation for the set of available + * target types. + * + * Generated from protobuf field repeated string target_types = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_types = $arr; + + return $this; + } + + /** + * @return string + */ + public function getSourceLocation() + { + return $this->whichOneof("source_location"); + } + + /** + * @return string + */ + public function getTargetLocation() + { + return $this->whichOneof("target_location"); + } + + /** + * @return string + */ + public function getOutputNameMapping() + { + return $this->whichOneof("output_name_mapping"); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationDetails.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationDetails.php new file mode 100644 index 000000000000..3b03ce6d4ce4 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationDetails.php @@ -0,0 +1,234 @@ +google.cloud.bigquery.migration.v2.TranslationDetails + */ +class TranslationDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The mapping from source to target SQL. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.SourceTargetMapping source_target_mapping = 1; + */ + private $source_target_mapping; + /** + * The base URI for all writes to persistent storage. + * + * Generated from protobuf field string target_base_uri = 2; + */ + protected $target_base_uri = ''; + /** + * The default source environment values for the translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnvironment source_environment = 3; + */ + protected $source_environment = null; + /** + * The list of literal targets that will be directly returned to the response. + * Each entry consists of the constructed path, EXCLUDING the base path. Not + * providing a target_base_uri will prevent writing to persistent storage. + * + * Generated from protobuf field repeated string target_return_literals = 4; + */ + private $target_return_literals; + /** + * The types of output to generate, e.g. sql, metadata, + * lineage_from_sql_scripts, etc. If not specified, a default set of + * targets will be generated. Some additional target types may be slower to + * generate. See the documentation for the set of available target types. + * + * Generated from protobuf field repeated string target_types = 5; + */ + private $target_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping>|\Google\Protobuf\Internal\RepeatedField $source_target_mapping + * The mapping from source to target SQL. + * @type string $target_base_uri + * The base URI for all writes to persistent storage. + * @type \Google\Cloud\BigQuery\Migration\V2\SourceEnvironment $source_environment + * The default source environment values for the translation. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_return_literals + * The list of literal targets that will be directly returned to the response. + * Each entry consists of the constructed path, EXCLUDING the base path. Not + * providing a target_base_uri will prevent writing to persistent storage. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_types + * The types of output to generate, e.g. sql, metadata, + * lineage_from_sql_scripts, etc. If not specified, a default set of + * targets will be generated. Some additional target types may be slower to + * generate. See the documentation for the set of available target types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); + parent::__construct($data); + } + + /** + * The mapping from source to target SQL. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.SourceTargetMapping source_target_mapping = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSourceTargetMapping() + { + return $this->source_target_mapping; + } + + /** + * The mapping from source to target SQL. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.SourceTargetMapping source_target_mapping = 1; + * @param array<\Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSourceTargetMapping($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping::class); + $this->source_target_mapping = $arr; + + return $this; + } + + /** + * The base URI for all writes to persistent storage. + * + * Generated from protobuf field string target_base_uri = 2; + * @return string + */ + public function getTargetBaseUri() + { + return $this->target_base_uri; + } + + /** + * The base URI for all writes to persistent storage. + * + * Generated from protobuf field string target_base_uri = 2; + * @param string $var + * @return $this + */ + public function setTargetBaseUri($var) + { + GPBUtil::checkString($var, True); + $this->target_base_uri = $var; + + return $this; + } + + /** + * The default source environment values for the translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnvironment source_environment = 3; + * @return \Google\Cloud\BigQuery\Migration\V2\SourceEnvironment|null + */ + public function getSourceEnvironment() + { + return $this->source_environment; + } + + public function hasSourceEnvironment() + { + return isset($this->source_environment); + } + + public function clearSourceEnvironment() + { + unset($this->source_environment); + } + + /** + * The default source environment values for the translation. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnvironment source_environment = 3; + * @param \Google\Cloud\BigQuery\Migration\V2\SourceEnvironment $var + * @return $this + */ + public function setSourceEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SourceEnvironment::class); + $this->source_environment = $var; + + return $this; + } + + /** + * The list of literal targets that will be directly returned to the response. + * Each entry consists of the constructed path, EXCLUDING the base path. Not + * providing a target_base_uri will prevent writing to persistent storage. + * + * Generated from protobuf field repeated string target_return_literals = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetReturnLiterals() + { + return $this->target_return_literals; + } + + /** + * The list of literal targets that will be directly returned to the response. + * Each entry consists of the constructed path, EXCLUDING the base path. Not + * providing a target_base_uri will prevent writing to persistent storage. + * + * Generated from protobuf field repeated string target_return_literals = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetReturnLiterals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_return_literals = $arr; + + return $this; + } + + /** + * The types of output to generate, e.g. sql, metadata, + * lineage_from_sql_scripts, etc. If not specified, a default set of + * targets will be generated. Some additional target types may be slower to + * generate. See the documentation for the set of available target types. + * + * Generated from protobuf field repeated string target_types = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetTypes() + { + return $this->target_types; + } + + /** + * The types of output to generate, e.g. sql, metadata, + * lineage_from_sql_scripts, etc. If not specified, a default set of + * targets will be generated. Some additional target types may be slower to + * generate. See the documentation for the set of available target types. + * + * Generated from protobuf field repeated string target_types = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord.php new file mode 100644 index 000000000000..4f2bf754676d --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord.php @@ -0,0 +1,211 @@ +google.cloud.bigquery.migration.v2.TranslationReportRecord + */ +class TranslationReportRecord extends \Google\Protobuf\Internal\Message +{ + /** + * Severity of the translation record. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity severity = 1; + */ + protected $severity = 0; + /** + * Specifies the row from the source text where the error occurred (0 based). + * Example: 2 + * + * Generated from protobuf field int32 script_line = 2; + */ + protected $script_line = 0; + /** + * Specifies the column from the source texts where the error occurred. (0 + * based) example: 6 + * + * Generated from protobuf field int32 script_column = 3; + */ + protected $script_column = 0; + /** + * Category of the error/warning. Example: SyntaxError + * + * Generated from protobuf field string category = 4; + */ + protected $category = ''; + /** + * Detailed message of the record. + * + * Generated from protobuf field string message = 5; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $severity + * Severity of the translation record. + * @type int $script_line + * Specifies the row from the source text where the error occurred (0 based). + * Example: 2 + * @type int $script_column + * Specifies the column from the source texts where the error occurred. (0 + * based) example: 6 + * @type string $category + * Category of the error/warning. Example: SyntaxError + * @type string $message + * Detailed message of the record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationSuggestion::initOnce(); + parent::__construct($data); + } + + /** + * Severity of the translation record. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity severity = 1; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Severity of the translation record. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity severity = 1; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\TranslationReportRecord\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Specifies the row from the source text where the error occurred (0 based). + * Example: 2 + * + * Generated from protobuf field int32 script_line = 2; + * @return int + */ + public function getScriptLine() + { + return $this->script_line; + } + + /** + * Specifies the row from the source text where the error occurred (0 based). + * Example: 2 + * + * Generated from protobuf field int32 script_line = 2; + * @param int $var + * @return $this + */ + public function setScriptLine($var) + { + GPBUtil::checkInt32($var); + $this->script_line = $var; + + return $this; + } + + /** + * Specifies the column from the source texts where the error occurred. (0 + * based) example: 6 + * + * Generated from protobuf field int32 script_column = 3; + * @return int + */ + public function getScriptColumn() + { + return $this->script_column; + } + + /** + * Specifies the column from the source texts where the error occurred. (0 + * based) example: 6 + * + * Generated from protobuf field int32 script_column = 3; + * @param int $var + * @return $this + */ + public function setScriptColumn($var) + { + GPBUtil::checkInt32($var); + $this->script_column = $var; + + return $this; + } + + /** + * Category of the error/warning. Example: SyntaxError + * + * Generated from protobuf field string category = 4; + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * Category of the error/warning. Example: SyntaxError + * + * Generated from protobuf field string category = 4; + * @param string $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkString($var, True); + $this->category = $var; + + return $this; + } + + /** + * Detailed message of the record. + * + * Generated from protobuf field string message = 5; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Detailed message of the record. + * + * Generated from protobuf field string message = 5; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord/Severity.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord/Severity.php new file mode 100644 index 000000000000..52cf5ab95075 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord/Severity.php @@ -0,0 +1,72 @@ +google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity + */ +class Severity +{ + /** + * SeverityType not specified. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * INFO type. + * + * Generated from protobuf enum INFO = 1; + */ + const INFO = 1; + /** + * WARNING type. The translated query may still provide useful information + * if all the report records are WARNING. + * + * Generated from protobuf enum WARNING = 2; + */ + const WARNING = 2; + /** + * ERROR type. Translation failed. + * + * Generated from protobuf enum ERROR = 3; + */ + const ERROR = 3; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::INFO => 'INFO', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Severity::class, \Google\Cloud\BigQuery\Migration\V2\TranslationReportRecord_Severity::class); + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationTaskResult.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationTaskResult.php new file mode 100644 index 000000000000..7f35cd749ddc --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationTaskResult.php @@ -0,0 +1,101 @@ +google.cloud.bigquery.migration.v2.TranslationTaskResult + */ +class TranslationTaskResult extends \Google\Protobuf\Internal\Message +{ + /** + * The list of the translated literals. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Literal translated_literals = 1; + */ + private $translated_literals; + /** + * The records from the aggregate CSV report for a migration workflow. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.GcsReportLogMessage report_log_messages = 2; + */ + private $report_log_messages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\Migration\V2\Literal>|\Google\Protobuf\Internal\RepeatedField $translated_literals + * The list of the translated literals. + * @type array<\Google\Cloud\BigQuery\Migration\V2\GcsReportLogMessage>|\Google\Protobuf\Internal\RepeatedField $report_log_messages + * The records from the aggregate CSV report for a migration workflow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); + parent::__construct($data); + } + + /** + * The list of the translated literals. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Literal translated_literals = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTranslatedLiterals() + { + return $this->translated_literals; + } + + /** + * The list of the translated literals. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Literal translated_literals = 1; + * @param array<\Google\Cloud\BigQuery\Migration\V2\Literal>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTranslatedLiterals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\Literal::class); + $this->translated_literals = $arr; + + return $this; + } + + /** + * The records from the aggregate CSV report for a migration workflow. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.GcsReportLogMessage report_log_messages = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReportLogMessages() + { + return $this->report_log_messages; + } + + /** + * The records from the aggregate CSV report for a migration workflow. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.GcsReportLogMessage report_log_messages = 2; + * @param array<\Google\Cloud\BigQuery\Migration\V2\GcsReportLogMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReportLogMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\GcsReportLogMessage::class); + $this->report_log_messages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TypedValue.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TypedValue.php new file mode 100644 index 000000000000..f1f140446f87 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TypedValue.php @@ -0,0 +1,213 @@ +google.cloud.bigquery.migration.v2.TypedValue + */ +class TypedValue extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $bool_value + * A Boolean value: `true` or `false`. + * @type int|string $int64_value + * A 64-bit integer. Its range is approximately `+/-9.2x10^18`. + * @type float $double_value + * A 64-bit double-precision floating-point number. Its magnitude + * is approximately `+/-10^(+/-300)` and it has 16 significant digits of + * precision. + * @type string $string_value + * A variable-length string value. + * @type \Google\Api\Distribution $distribution_value + * A distribution value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationMetrics::initOnce(); + parent::__construct($data); + } + + /** + * A Boolean value: `true` or `false`. + * + * Generated from protobuf field bool bool_value = 1; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(1); + } + + public function hasBoolValue() + { + return $this->hasOneof(1); + } + + /** + * A Boolean value: `true` or `false`. + * + * Generated from protobuf field bool bool_value = 1; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A 64-bit integer. Its range is approximately `+/-9.2x10^18`. + * + * Generated from protobuf field int64 int64_value = 2; + * @return int|string + */ + public function getInt64Value() + { + return $this->readOneof(2); + } + + public function hasInt64Value() + { + return $this->hasOneof(2); + } + + /** + * A 64-bit integer. Its range is approximately `+/-9.2x10^18`. + * + * Generated from protobuf field int64 int64_value = 2; + * @param int|string $var + * @return $this + */ + public function setInt64Value($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A 64-bit double-precision floating-point number. Its magnitude + * is approximately `+/-10^(+/-300)` and it has 16 significant digits of + * precision. + * + * Generated from protobuf field double double_value = 3; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(3); + } + + public function hasDoubleValue() + { + return $this->hasOneof(3); + } + + /** + * A 64-bit double-precision floating-point number. Its magnitude + * is approximately `+/-10^(+/-300)` and it has 16 significant digits of + * precision. + * + * Generated from protobuf field double double_value = 3; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A variable-length string value. + * + * Generated from protobuf field string string_value = 4; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(4); + } + + public function hasStringValue() + { + return $this->hasOneof(4); + } + + /** + * A variable-length string value. + * + * Generated from protobuf field string string_value = 4; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A distribution value. + * + * Generated from protobuf field .google.api.Distribution distribution_value = 5; + * @return \Google\Api\Distribution|null + */ + public function getDistributionValue() + { + return $this->readOneof(5); + } + + public function hasDistributionValue() + { + return $this->hasOneof(5); + } + + /** + * A distribution value. + * + * Generated from protobuf field .google.api.Distribution distribution_value = 5; + * @param \Google\Api\Distribution $var + * @return $this + */ + public function setDistributionValue($var) + { + GPBUtil::checkMessage($var, \Google\Api\Distribution::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/VerticaDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/VerticaDialect.php new file mode 100644 index 000000000000..c00c7444c8b1 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/VerticaDialect.php @@ -0,0 +1,33 @@ +google.cloud.bigquery.migration.v2.VerticaDialect + */ +class VerticaDialect extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/create_migration_workflow.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/create_migration_workflow.php new file mode 100644 index 000000000000..7ac5039b3269 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/create_migration_workflow.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setMigrationWorkflow($migrationWorkflow); + + // Call the API and handle any network failures. + try { + /** @var MigrationWorkflow $response */ + $response = $migrationServiceClient->createMigrationWorkflow($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 = MigrationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_migration_workflow_sample($formattedParent); +} +// [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/delete_migration_workflow.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/delete_migration_workflow.php new file mode 100644 index 000000000000..4e68d8af9c8f --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/delete_migration_workflow.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $migrationServiceClient->deleteMigrationWorkflow($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 = MigrationServiceClient::migrationWorkflowName( + '[PROJECT]', + '[LOCATION]', + '[WORKFLOW]' + ); + + delete_migration_workflow_sample($formattedName); +} +// [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_subtask.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_subtask.php new file mode 100644 index 000000000000..7deb48d19f70 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_subtask.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MigrationSubtask $response */ + $response = $migrationServiceClient->getMigrationSubtask($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 = MigrationServiceClient::migrationSubtaskName( + '[PROJECT]', + '[LOCATION]', + '[WORKFLOW]', + '[SUBTASK]' + ); + + get_migration_subtask_sample($formattedName); +} +// [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_workflow.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_workflow.php new file mode 100644 index 000000000000..15b66eb6713e --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_workflow.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MigrationWorkflow $response */ + $response = $migrationServiceClient->getMigrationWorkflow($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 = MigrationServiceClient::migrationWorkflowName( + '[PROJECT]', + '[LOCATION]', + '[WORKFLOW]' + ); + + get_migration_workflow_sample($formattedName); +} +// [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_subtasks.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_subtasks.php new file mode 100644 index 000000000000..b7ccdc34948f --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_subtasks.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationServiceClient->listMigrationSubtasks($request); + + /** @var MigrationSubtask $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 = MigrationServiceClient::migrationWorkflowName( + '[PROJECT]', + '[LOCATION]', + '[WORKFLOW]' + ); + + list_migration_subtasks_sample($formattedParent); +} +// [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_workflows.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_workflows.php new file mode 100644 index 000000000000..8c4720d6cb52 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_workflows.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationServiceClient->listMigrationWorkflows($request); + + /** @var MigrationWorkflow $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 = MigrationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_migration_workflows_sample($formattedParent); +} +// [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/start_migration_workflow.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/start_migration_workflow.php new file mode 100644 index 000000000000..fe557b31bd70 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/start_migration_workflow.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $migrationServiceClient->startMigrationWorkflow($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 = MigrationServiceClient::migrationWorkflowName( + '[PROJECT]', + '[LOCATION]', + '[WORKFLOW]' + ); + + start_migration_workflow_sample($formattedName); +} +// [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/Client/MigrationServiceClient.php b/owl-bot-staging/BigQueryMigration/v2/src/V2/Client/MigrationServiceClient.php new file mode 100644 index 000000000000..988db052413d --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/src/V2/Client/MigrationServiceClient.php @@ -0,0 +1,454 @@ + createMigrationWorkflowAsync(CreateMigrationWorkflowRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMigrationWorkflowAsync(DeleteMigrationWorkflowRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMigrationSubtaskAsync(GetMigrationSubtaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMigrationWorkflowAsync(GetMigrationWorkflowRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMigrationSubtasksAsync(ListMigrationSubtasksRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMigrationWorkflowsAsync(ListMigrationWorkflowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface startMigrationWorkflowAsync(StartMigrationWorkflowRequest $request, array $optionalArgs = []) + */ +final class MigrationServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.migration.v2.MigrationService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigquerymigration.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigquerymigration.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/migration_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/migration_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/migration_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/migration_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * migration_subtask resource. + * + * @param string $project + * @param string $location + * @param string $workflow + * @param string $subtask + * + * @return string The formatted migration_subtask resource. + */ + public static function migrationSubtaskName(string $project, string $location, string $workflow, string $subtask): string + { + return self::getPathTemplate('migrationSubtask')->render([ + 'project' => $project, + 'location' => $location, + 'workflow' => $workflow, + 'subtask' => $subtask, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * migration_workflow resource. + * + * @param string $project + * @param string $location + * @param string $workflow + * + * @return string The formatted migration_workflow resource. + */ + public static function migrationWorkflowName(string $project, string $location, string $workflow): string + { + return self::getPathTemplate('migrationWorkflow')->render([ + 'project' => $project, + 'location' => $location, + 'workflow' => $workflow, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - migrationSubtask: projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask} + * - migrationWorkflow: projects/{project}/locations/{location}/workflows/{workflow} + * + * 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 'bigquerymigration.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a migration workflow. + * + * The async variant is + * {@see MigrationServiceClient::createMigrationWorkflowAsync()} . + * + * @example samples/V2/MigrationServiceClient/create_migration_workflow.php + * + * @param CreateMigrationWorkflowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MigrationWorkflow + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMigrationWorkflow(CreateMigrationWorkflowRequest $request, array $callOptions = []): MigrationWorkflow + { + return $this->startApiCall('CreateMigrationWorkflow', $request, $callOptions)->wait(); + } + + /** + * Deletes a migration workflow by name. + * + * The async variant is + * {@see MigrationServiceClient::deleteMigrationWorkflowAsync()} . + * + * @example samples/V2/MigrationServiceClient/delete_migration_workflow.php + * + * @param DeleteMigrationWorkflowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteMigrationWorkflow(DeleteMigrationWorkflowRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteMigrationWorkflow', $request, $callOptions)->wait(); + } + + /** + * Gets a previously created migration subtask. + * + * The async variant is {@see MigrationServiceClient::getMigrationSubtaskAsync()} . + * + * @example samples/V2/MigrationServiceClient/get_migration_subtask.php + * + * @param GetMigrationSubtaskRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MigrationSubtask + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMigrationSubtask(GetMigrationSubtaskRequest $request, array $callOptions = []): MigrationSubtask + { + return $this->startApiCall('GetMigrationSubtask', $request, $callOptions)->wait(); + } + + /** + * Gets a previously created migration workflow. + * + * The async variant is {@see MigrationServiceClient::getMigrationWorkflowAsync()} + * . + * + * @example samples/V2/MigrationServiceClient/get_migration_workflow.php + * + * @param GetMigrationWorkflowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MigrationWorkflow + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMigrationWorkflow(GetMigrationWorkflowRequest $request, array $callOptions = []): MigrationWorkflow + { + return $this->startApiCall('GetMigrationWorkflow', $request, $callOptions)->wait(); + } + + /** + * Lists previously created migration subtasks. + * + * The async variant is {@see MigrationServiceClient::listMigrationSubtasksAsync()} + * . + * + * @example samples/V2/MigrationServiceClient/list_migration_subtasks.php + * + * @param ListMigrationSubtasksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMigrationSubtasks(ListMigrationSubtasksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMigrationSubtasks', $request, $callOptions); + } + + /** + * Lists previously created migration workflow. + * + * The async variant is + * {@see MigrationServiceClient::listMigrationWorkflowsAsync()} . + * + * @example samples/V2/MigrationServiceClient/list_migration_workflows.php + * + * @param ListMigrationWorkflowsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMigrationWorkflows(ListMigrationWorkflowsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMigrationWorkflows', $request, $callOptions); + } + + /** + * Starts a previously created migration workflow. I.e., the state transitions + * from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + * An error will be signaled if the state is anything other than DRAFT or + * RUNNING. + * + * The async variant is + * {@see MigrationServiceClient::startMigrationWorkflowAsync()} . + * + * @example samples/V2/MigrationServiceClient/start_migration_workflow.php + * + * @param StartMigrationWorkflowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 startMigrationWorkflow(StartMigrationWorkflowRequest $request, array $callOptions = []): void + { + $this->startApiCall('StartMigrationWorkflow', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/gapic_metadata.json b/owl-bot-staging/BigQueryMigration/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..f29fa4dd179b --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/src/V2/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.migration.v2", + "libraryPackage": "Google\\Cloud\\BigQuery\\Migration\\V2", + "services": { + "MigrationService": { + "clients": { + "grpc": { + "libraryClient": "MigrationServiceGapicClient", + "rpcs": { + "CreateMigrationWorkflow": { + "methods": [ + "createMigrationWorkflow" + ] + }, + "DeleteMigrationWorkflow": { + "methods": [ + "deleteMigrationWorkflow" + ] + }, + "GetMigrationSubtask": { + "methods": [ + "getMigrationSubtask" + ] + }, + "GetMigrationWorkflow": { + "methods": [ + "getMigrationWorkflow" + ] + }, + "ListMigrationSubtasks": { + "methods": [ + "listMigrationSubtasks" + ] + }, + "ListMigrationWorkflows": { + "methods": [ + "listMigrationWorkflows" + ] + }, + "StartMigrationWorkflow": { + "methods": [ + "startMigrationWorkflow" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_client_config.json b/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_client_config.json new file mode 100644 index 000000000000..177fac8a03f3 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.bigquery.migration.v2.MigrationService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 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": { + "CreateMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetMigrationSubtask": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMigrationSubtasks": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListMigrationWorkflows": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "StartMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_descriptor_config.php b/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_descriptor_config.php new file mode 100644 index 000000000000..4b8ec9bd0660 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_descriptor_config.php @@ -0,0 +1,133 @@ + [ + 'google.cloud.bigquery.migration.v2.MigrationService' => [ + 'CreateMigrationWorkflow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteMigrationWorkflow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMigrationSubtask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\MigrationSubtask', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMigrationWorkflow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListMigrationSubtasks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMigrationSubtasks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\ListMigrationSubtasksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMigrationWorkflows' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMigrationWorkflows', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\ListMigrationWorkflowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'StartMigrationWorkflow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'migrationSubtask' => 'projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}', + 'migrationWorkflow' => 'projects/{project}/locations/{location}/workflows/{workflow}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_rest_client_config.php b/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_rest_client_config.php new file mode 100644 index 000000000000..efc080cd9643 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_rest_client_config.php @@ -0,0 +1,107 @@ + [ + 'google.cloud.bigquery.migration.v2.MigrationService' => [ + 'CreateMigrationWorkflow' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/workflows', + 'body' => 'migration_workflow', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteMigrationWorkflow' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/workflows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMigrationSubtask' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMigrationWorkflow' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/workflows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMigrationSubtasks' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/workflows/*}/subtasks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMigrationWorkflows' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/workflows', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartMigrationWorkflow' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/workflows/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryMigration/v2/tests/Unit/V2/Client/MigrationServiceClientTest.php b/owl-bot-staging/BigQueryMigration/v2/tests/Unit/V2/Client/MigrationServiceClientTest.php new file mode 100644 index 000000000000..684815e9be91 --- /dev/null +++ b/owl-bot-staging/BigQueryMigration/v2/tests/Unit/V2/Client/MigrationServiceClientTest.php @@ -0,0 +1,581 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MigrationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MigrationServiceClient($options); + } + + /** @test */ + public function createMigrationWorkflowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new MigrationWorkflow(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $migrationWorkflow = new MigrationWorkflow(); + $request = (new CreateMigrationWorkflowRequest()) + ->setParent($formattedParent) + ->setMigrationWorkflow($migrationWorkflow); + $response = $gapicClient->createMigrationWorkflow($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.bigquery.migration.v2.MigrationService/CreateMigrationWorkflow', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getMigrationWorkflow(); + $this->assertProtobufEquals($migrationWorkflow, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMigrationWorkflowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $migrationWorkflow = new MigrationWorkflow(); + $request = (new CreateMigrationWorkflowRequest()) + ->setParent($formattedParent) + ->setMigrationWorkflow($migrationWorkflow); + try { + $gapicClient->createMigrationWorkflow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMigrationWorkflowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new DeleteMigrationWorkflowRequest()) + ->setName($formattedName); + $gapicClient->deleteMigrationWorkflow($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.migration.v2.MigrationService/DeleteMigrationWorkflow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMigrationWorkflowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new DeleteMigrationWorkflowRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteMigrationWorkflow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMigrationSubtaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $taskId = 'taskId-1537240555'; + $type = 'type3575610'; + $resourceErrorCount = 929997465; + $expectedResponse = new MigrationSubtask(); + $expectedResponse->setName($name2); + $expectedResponse->setTaskId($taskId); + $expectedResponse->setType($type); + $expectedResponse->setResourceErrorCount($resourceErrorCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->migrationSubtaskName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[SUBTASK]'); + $request = (new GetMigrationSubtaskRequest()) + ->setName($formattedName); + $response = $gapicClient->getMigrationSubtask($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.bigquery.migration.v2.MigrationService/GetMigrationSubtask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMigrationSubtaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->migrationSubtaskName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[SUBTASK]'); + $request = (new GetMigrationSubtaskRequest()) + ->setName($formattedName); + try { + $gapicClient->getMigrationSubtask($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMigrationWorkflowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new MigrationWorkflow(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new GetMigrationWorkflowRequest()) + ->setName($formattedName); + $response = $gapicClient->getMigrationWorkflow($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.bigquery.migration.v2.MigrationService/GetMigrationWorkflow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMigrationWorkflowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new GetMigrationWorkflowRequest()) + ->setName($formattedName); + try { + $gapicClient->getMigrationWorkflow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigrationSubtasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $migrationSubtasksElement = new MigrationSubtask(); + $migrationSubtasks = [ + $migrationSubtasksElement, + ]; + $expectedResponse = new ListMigrationSubtasksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMigrationSubtasks($migrationSubtasks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new ListMigrationSubtasksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMigrationSubtasks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMigrationSubtasks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.migration.v2.MigrationService/ListMigrationSubtasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigrationSubtasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new ListMigrationSubtasksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMigrationSubtasks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigrationWorkflowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $migrationWorkflowsElement = new MigrationWorkflow(); + $migrationWorkflows = [ + $migrationWorkflowsElement, + ]; + $expectedResponse = new ListMigrationWorkflowsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMigrationWorkflows($migrationWorkflows); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMigrationWorkflowsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMigrationWorkflows($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMigrationWorkflows()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.migration.v2.MigrationService/ListMigrationWorkflows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigrationWorkflowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListMigrationWorkflowsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMigrationWorkflows($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startMigrationWorkflowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new StartMigrationWorkflowRequest()) + ->setName($formattedName); + $gapicClient->startMigrationWorkflow($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.migration.v2.MigrationService/StartMigrationWorkflow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startMigrationWorkflowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new StartMigrationWorkflowRequest()) + ->setName($formattedName); + try { + $gapicClient->startMigrationWorkflow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMigrationWorkflowAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new MigrationWorkflow(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $migrationWorkflow = new MigrationWorkflow(); + $request = (new CreateMigrationWorkflowRequest()) + ->setParent($formattedParent) + ->setMigrationWorkflow($migrationWorkflow); + $response = $gapicClient->createMigrationWorkflowAsync($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.bigquery.migration.v2.MigrationService/CreateMigrationWorkflow', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getMigrationWorkflow(); + $this->assertProtobufEquals($migrationWorkflow, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Reservation/V1/Reservation.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Reservation/V1/Reservation.php new file mode 100644 index 0000000000000000000000000000000000000000..fa91d4470232dc1fac410f955473b6c28c26a9da GIT binary patch literal 13099 zcmd5@OKcm*87}qa$d;*bY%xj@F&hJM1e>&(#7St&&XS^J+7iW3l=G+(c1exojY%%E zyR@UaYLOg*AT5lbL3`+>=&db!Y=K^iB0cnwW7|U^plA;5B?XEW=_$SRpPAj|>@F$o z(uPr;sO9`K|NHR`_tKU2%{F=}u}oS-S4^^%sO=`qnHz7Ymgqfz;4CdYxnvJDRrBAgOvo>ujZJ>dreIqVJ}3Vi5hdVyapz zb^E;dZ;~B>P)lhNqpj3QV!4!EC8n~an9Ald+if#PciYTbyKR=cyKUY$e-WX2Lotkm z@EF}i3HWPwY7MoXFibePo;al%Rkfv>s?t!u2{JAuwv~oKfZo4$yVI&uZWEMXtyL$d zpGojN>Dp6m4Ro@Qu=y)dHGzsY3oVoAEv2!!NQ}C!woOeh!O~1-hnS9X>66pXSjW=s z)a}G+&SNIyV{##3>K!7Uo=E7#?C7nFjBmQZp7Uw5hxX*Qx+%9>8r6cQ%%95MPZB^65k%A4mBL!yC(LG3>Z??_d;0HRSjNw(qxHSN6MFqz- zm1a9QZMj|FTnB4(`q+ZG*V)UeA>KObB=~p9YQb-l}2pXZuCmu;ePDk+x zbkt~QX0@(BGE&Xm_z*lE#*dpEcpT&0r6C)h!=_CdB9l8!rO zhd-Bx@pEXh(}q+^I8`(l)f4Dsv(qrus!nzwWmJ{UyJ|yK^xgOrY%qZ@qj9nYiBxOF zr{Td=`mD{zfsT~SbE4S{igx9l1<{zWrlnSDh+)qDG>SHrcdh5l5}7++$R=`JRrFM@ zb8u2433VzZXcuQeKW~$|X{7F2pY~D>taP89PpnL^R@i+{`f?oMoaGfct=Uw~ zCPV_B7Tt$)jS=ELq;*=RnT3eiY6eOQaAL_9wG_|d$jShqw4_hmyuq_${ zbdqx0F*v(#q9YI~c zIiIh-o|nrpL|G}W74xw%DThXx6F~}{UatTv9;ShhQoguYC@#k$5Ful7u2Q&>2cF>b zl3Z8;$%ZrcB45ZKMbPthDH0;kvcD7G{@}o`1PyaLyLS~2(QZGicD;8``dtLYb2Rf3 zA)k~9w6%tbm(W;S0p~M$@yK5ITps#LK8M4mC$OR*D3lnMG@`Kor0|^Oj>+_SI}i@e zwF0}+hY>Whq8g^~%y`f;K&oylI}o(cTQl}YF<6#8GPPTTXTGTPEfn{2Vzi+zC3u-e zvNI?cpwwZ=7~$o`Gw4{0ylYm4(`oUDN^hbQ%S2Rzt%XHb7Pssew#-Q1K=DP=AU%EM z!JP03xZ?&Z=z=Y6Aw2Fv>*zr0OF2ygZMc{*dnInCYnFa6gywjV_=D1BZq*Yj3oKS% zzypT*1{4{q7z^=g@%m!05b-mM&!AJJwXMM@3y$1^Nw%tNHPu$tN-Whj(W{!iW3_%z z8+tH7^GR+&4IHp~oRO z{kpO}=(;OLE&my?R7iVhj)&^QIS(I2qs*;X5}%NM1_t19-2ePOF3!VxaQ%ml?)Sip z*V_&CA(@7j4R8A_{Sx%mmj|bOjBcyC!He-^dT|}szp2V2>N**{X&Y_vQKPy5)G9WV!Lq__~Fha6nz%1Kuc!{A20MlRr;X_3fUqcgb zYqhGm+a}id5>U0>gOb;@S_SA~FKb>IW4-c)V2N7Th_#rk@rPnQZf_e$k6c^JRx7WU zyj|xJG*K#)@+$@CQCVC3%0|9SJK_e49b<~{!R zJS)s89FqSA4JeeTCcj?JK^(y*bi7ZcX=c2;=@Wm zc{JH&-7b^iHPE*_zJ+FZ#p)hzn=t39jFtgII-vAjXf4-?qStSB4{)^nlE+D&VNUWC zdeVkY49nEcc(!7}E41>lO918*QNT-tIf0@f-Z_C=95Ux)7B`K?{{usJ(W5=I^N?)+ zZS;6=Wjv(we;Yw3R<+xtYlsKwdQcUnwqTxCTO8nou&0g@&8EMSL+2r12H~yv$B+Se z!{wL3ow|5`6+Uo7_f;TuMX5CaSb(cFz+P1Lf#TB7h0_3i^D3=$ZS%QWL z@W*_)R4%MjobEU}*8Lw~$&K~caQf5Drx6zXZXND59SNXu8+`W zcL2rT+LvdcsF5|qd>w{tMLtx0+fTOFQ z0qLE6dDcoKJ!WjCjiU5IkPKpz3%3uMUT7x%mxbH=xiRo!Fn!R((1YA|iGW(|yNi`& zuDY|#OL$N{;J-kp*%JlC*-G;cnoJH+R+2*IBgoSbJa&v)2pZ z3zqF2!S4^DnLfB>&R)5%28jO}LC0v}=nmWlz7#Bpd&q2AL-f+Z zp)j4W`(e_bDy@HQ3XO$py8im(G^4U-DiR3((8+ob`jEQfSGH)VydVT8I7) z9i|V@3ff`%2yN!C1T$|BdfP-F4ng`pV!0>74Vh=cjmY7ixtB4#_$B^l1U+IM=fV-O z9Ew#Jtu1Z9j-=P|qEGsz&EOY9NbBN_8g|MJ)dii_+*G!Z;q%MZzI>dO5;vyD?08km z9a>Hfblgl6U`U!v{|m9ln}}|x2aP>1-Qcp`-j`2ylc=x7cr{&M;&zuD*jXGbxtLqw zS7R~gblsRx!1U;)v!x#dhmtOfY3V#p9cta0h|2BZ_lD4MZVtCBF9!?H9;EjrjsZiS z8>I8uw3Oz#*S+jOySio0cwoTU?|ddphr^(MkYBxNnr$PKO5M40$5M}T-2y*BzUjPg zaptgvY=%AyKbJJ&M+wdBpCjlr{OB!^%Cj-ZUG~cyC5n5LB5z#dL%IE{XZZE)j^=P9 zHVi3X*!==XyLM4<`*!W;L#LM6TOY|Bed{BcRd-&Y?~o*gW0N<|e`YV+wB8P(uZOUO to38gm;02M|7=ve?ecJim{2BgEh42an{i&&1@A3KtTghLO*h6~={SQsP>G}Ww literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php new file mode 100644 index 000000000000..041fc0363a57 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php @@ -0,0 +1,186 @@ +google.cloud.bigquery.reservation.v1.Assignment + */ +class Assignment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the resource. E.g.: + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. + * The assignment_id must only contain lower case alphanumeric characters or + * dashes and the max length is 64 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The resource which will use the reservation. E.g. + * `projects/myproject`, `folders/123`, or `organizations/456`. + * + * Generated from protobuf field string assignee = 4; + */ + protected $assignee = ''; + /** + * Which type of jobs will use the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3; + */ + protected $job_type = 0; + /** + * Output only. State of the assignment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.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. Name of the resource. E.g.: + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. + * The assignment_id must only contain lower case alphanumeric characters or + * dashes and the max length is 64 characters. + * @type string $assignee + * The resource which will use the reservation. E.g. + * `projects/myproject`, `folders/123`, or `organizations/456`. + * @type int $job_type + * Which type of jobs will use the reservation. + * @type int $state + * Output only. State of the assignment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the resource. E.g.: + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. + * The assignment_id must only contain lower case alphanumeric characters or + * dashes and the max length is 64 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the resource. E.g.: + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. + * The assignment_id must only contain lower case alphanumeric characters or + * dashes and the max length is 64 characters. + * + * 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; + } + + /** + * The resource which will use the reservation. E.g. + * `projects/myproject`, `folders/123`, or `organizations/456`. + * + * Generated from protobuf field string assignee = 4; + * @return string + */ + public function getAssignee() + { + return $this->assignee; + } + + /** + * The resource which will use the reservation. E.g. + * `projects/myproject`, `folders/123`, or `organizations/456`. + * + * Generated from protobuf field string assignee = 4; + * @param string $var + * @return $this + */ + public function setAssignee($var) + { + GPBUtil::checkString($var, True); + $this->assignee = $var; + + return $this; + } + + /** + * Which type of jobs will use the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3; + * @return int + */ + public function getJobType() + { + return $this->job_type; + } + + /** + * Which type of jobs will use the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3; + * @param int $var + * @return $this + */ + public function setJobType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment\JobType::class); + $this->job_type = $var; + + return $this; + } + + /** + * Output only. State of the assignment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the assignment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php new file mode 100644 index 000000000000..27d2d076d829 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php @@ -0,0 +1,80 @@ +google.cloud.bigquery.reservation.v1.Assignment.JobType + */ +class JobType +{ + /** + * Invalid type. Requests with this value will be rejected with + * error code `google.rpc.Code.INVALID_ARGUMENT`. + * + * Generated from protobuf enum JOB_TYPE_UNSPECIFIED = 0; + */ + const JOB_TYPE_UNSPECIFIED = 0; + /** + * Pipeline (load/export) jobs from the project will use the reservation. + * + * Generated from protobuf enum PIPELINE = 1; + */ + const PIPELINE = 1; + /** + * Query jobs from the project will use the reservation. + * + * Generated from protobuf enum QUERY = 2; + */ + const QUERY = 2; + /** + * BigQuery ML jobs that use services external to BigQuery for model + * training. These jobs will not utilize idle slots from other reservations. + * + * Generated from protobuf enum ML_EXTERNAL = 3; + */ + const ML_EXTERNAL = 3; + /** + * Background jobs that BigQuery runs for the customers in the background. + * + * Generated from protobuf enum BACKGROUND = 4; + */ + const BACKGROUND = 4; + + private static $valueToName = [ + self::JOB_TYPE_UNSPECIFIED => 'JOB_TYPE_UNSPECIFIED', + self::PIPELINE => 'PIPELINE', + self::QUERY => 'QUERY', + self::ML_EXTERNAL => 'ML_EXTERNAL', + self::BACKGROUND => 'BACKGROUND', + ]; + + 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(JobType::class, \Google\Cloud\BigQuery\Reservation\V1\Assignment_JobType::class); + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php new file mode 100644 index 000000000000..434bfa37de78 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.reservation.v1.Assignment.State + */ +class State +{ + /** + * Invalid state value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Queries from assignee will be executed as on-demand, if related + * assignment is pending. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * Assignment is ready. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::ACTIVE => 'ACTIVE', + ]; + + 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\BigQuery\Reservation\V1\Assignment_State::class); + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/BiReservation.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/BiReservation.php new file mode 100644 index 000000000000..65b19149239a --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/BiReservation.php @@ -0,0 +1,187 @@ +google.cloud.bigquery.reservation.v1.BiReservation + */ +class BiReservation extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the singleton BI reservation. + * Reservation names have the form + * `projects/{project_id}/locations/{location_id}/biReservation`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The last update timestamp of a reservation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Size of a reservation, in bytes. + * + * Generated from protobuf field int64 size = 4; + */ + protected $size = 0; + /** + * Preferred tables to use BI capacity for. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5; + */ + private $preferred_tables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the singleton BI reservation. + * Reservation names have the form + * `projects/{project_id}/locations/{location_id}/biReservation`. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of a reservation. + * @type int|string $size + * Size of a reservation, in bytes. + * @type array<\Google\Cloud\BigQuery\Reservation\V1\TableReference>|\Google\Protobuf\Internal\RepeatedField $preferred_tables + * Preferred tables to use BI capacity for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the singleton BI reservation. + * Reservation names have the form + * `projects/{project_id}/locations/{location_id}/biReservation`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the singleton BI reservation. + * Reservation names have the form + * `projects/{project_id}/locations/{location_id}/biReservation`. + * + * 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; + } + + /** + * Output only. The last update timestamp of a reservation. + * + * 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. The last update timestamp of a reservation. + * + * 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; + } + + /** + * Size of a reservation, in bytes. + * + * Generated from protobuf field int64 size = 4; + * @return int|string + */ + public function getSize() + { + return $this->size; + } + + /** + * Size of a reservation, in bytes. + * + * Generated from protobuf field int64 size = 4; + * @param int|string $var + * @return $this + */ + public function setSize($var) + { + GPBUtil::checkInt64($var); + $this->size = $var; + + return $this; + } + + /** + * Preferred tables to use BI capacity for. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPreferredTables() + { + return $this->preferred_tables; + } + + /** + * Preferred tables to use BI capacity for. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5; + * @param array<\Google\Cloud\BigQuery\Reservation\V1\TableReference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPreferredTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\TableReference::class); + $this->preferred_tables = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php new file mode 100644 index 000000000000..7ff9f6aaaa0e --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php @@ -0,0 +1,466 @@ +google.cloud.bigquery.reservation.v1.CapacityCommitment + */ +class CapacityCommitment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the capacity commitment, e.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * The commitment_id must only contain lower case alphanumeric characters or + * dashes. It must start with a letter and must not end + * with a dash. Its maximum length is 64 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Number of slots in this commitment. + * + * Generated from protobuf field int64 slot_count = 2; + */ + protected $slot_count = 0; + /** + * Capacity commitment commitment plan. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3; + */ + protected $plan = 0; + /** + * Output only. State of the commitment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The start of the current commitment period. It is applicable + * only for ACTIVE capacity commitments. + * + * Generated from protobuf field .google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $commitment_start_time = null; + /** + * Output only. The end of the current commitment period. It is applicable + * only for ACTIVE capacity commitments. + * + * Generated from protobuf field .google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $commitment_end_time = null; + /** + * Output only. For FAILED commitment plan, provides the reason of failure. + * + * Generated from protobuf field .google.rpc.Status failure_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_status = null; + /** + * The plan this capacity commitment is converted to after commitment_end_time + * passes. Once the plan is changed, committed period is extended according to + * commitment plan. Only applicable for ANNUAL and TRIAL commitments. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan renewal_plan = 8; + */ + protected $renewal_plan = 0; + /** + * Applicable only for commitments located within one of the BigQuery + * multi-regions (US or EU). + * If set to true, this commitment is placed in the organization's + * secondary region which is designated for disaster recovery purposes. + * If false, this commitment is placed in the organization's default region. + * NOTE: this is a preview feature. Project must be allow-listed in order to + * set this field. + * + * Generated from protobuf field bool multi_region_auxiliary = 10; + */ + protected $multi_region_auxiliary = false; + /** + * Edition of the capacity commitment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12; + */ + protected $edition = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the capacity commitment, e.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * The commitment_id must only contain lower case alphanumeric characters or + * dashes. It must start with a letter and must not end + * with a dash. Its maximum length is 64 characters. + * @type int|string $slot_count + * Number of slots in this commitment. + * @type int $plan + * Capacity commitment commitment plan. + * @type int $state + * Output only. State of the commitment. + * @type \Google\Protobuf\Timestamp $commitment_start_time + * Output only. The start of the current commitment period. It is applicable + * only for ACTIVE capacity commitments. + * @type \Google\Protobuf\Timestamp $commitment_end_time + * Output only. The end of the current commitment period. It is applicable + * only for ACTIVE capacity commitments. + * @type \Google\Rpc\Status $failure_status + * Output only. For FAILED commitment plan, provides the reason of failure. + * @type int $renewal_plan + * The plan this capacity commitment is converted to after commitment_end_time + * passes. Once the plan is changed, committed period is extended according to + * commitment plan. Only applicable for ANNUAL and TRIAL commitments. + * @type bool $multi_region_auxiliary + * Applicable only for commitments located within one of the BigQuery + * multi-regions (US or EU). + * If set to true, this commitment is placed in the organization's + * secondary region which is designated for disaster recovery purposes. + * If false, this commitment is placed in the organization's default region. + * NOTE: this is a preview feature. Project must be allow-listed in order to + * set this field. + * @type int $edition + * Edition of the capacity commitment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the capacity commitment, e.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * The commitment_id must only contain lower case alphanumeric characters or + * dashes. It must start with a letter and must not end + * with a dash. Its maximum length is 64 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the capacity commitment, e.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * The commitment_id must only contain lower case alphanumeric characters or + * dashes. It must start with a letter and must not end + * with a dash. Its maximum length is 64 characters. + * + * 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; + } + + /** + * Number of slots in this commitment. + * + * Generated from protobuf field int64 slot_count = 2; + * @return int|string + */ + public function getSlotCount() + { + return $this->slot_count; + } + + /** + * Number of slots in this commitment. + * + * Generated from protobuf field int64 slot_count = 2; + * @param int|string $var + * @return $this + */ + public function setSlotCount($var) + { + GPBUtil::checkInt64($var); + $this->slot_count = $var; + + return $this; + } + + /** + * Capacity commitment commitment plan. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3; + * @return int + */ + public function getPlan() + { + return $this->plan; + } + + /** + * Capacity commitment commitment plan. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3; + * @param int $var + * @return $this + */ + public function setPlan($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment\CommitmentPlan::class); + $this->plan = $var; + + return $this; + } + + /** + * Output only. State of the commitment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the commitment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The start of the current commitment period. It is applicable + * only for ACTIVE capacity commitments. + * + * Generated from protobuf field .google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitmentStartTime() + { + return $this->commitment_start_time; + } + + public function hasCommitmentStartTime() + { + return isset($this->commitment_start_time); + } + + public function clearCommitmentStartTime() + { + unset($this->commitment_start_time); + } + + /** + * Output only. The start of the current commitment period. It is applicable + * only for ACTIVE capacity commitments. + * + * Generated from protobuf field .google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitmentStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commitment_start_time = $var; + + return $this; + } + + /** + * Output only. The end of the current commitment period. It is applicable + * only for ACTIVE capacity commitments. + * + * Generated from protobuf field .google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitmentEndTime() + { + return $this->commitment_end_time; + } + + public function hasCommitmentEndTime() + { + return isset($this->commitment_end_time); + } + + public function clearCommitmentEndTime() + { + unset($this->commitment_end_time); + } + + /** + * Output only. The end of the current commitment period. It is applicable + * only for ACTIVE capacity commitments. + * + * Generated from protobuf field .google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitmentEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commitment_end_time = $var; + + return $this; + } + + /** + * Output only. For FAILED commitment plan, provides the reason of failure. + * + * Generated from protobuf field .google.rpc.Status failure_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getFailureStatus() + { + return $this->failure_status; + } + + public function hasFailureStatus() + { + return isset($this->failure_status); + } + + public function clearFailureStatus() + { + unset($this->failure_status); + } + + /** + * Output only. For FAILED commitment plan, provides the reason of failure. + * + * Generated from protobuf field .google.rpc.Status failure_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setFailureStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->failure_status = $var; + + return $this; + } + + /** + * The plan this capacity commitment is converted to after commitment_end_time + * passes. Once the plan is changed, committed period is extended according to + * commitment plan. Only applicable for ANNUAL and TRIAL commitments. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan renewal_plan = 8; + * @return int + */ + public function getRenewalPlan() + { + return $this->renewal_plan; + } + + /** + * The plan this capacity commitment is converted to after commitment_end_time + * passes. Once the plan is changed, committed period is extended according to + * commitment plan. Only applicable for ANNUAL and TRIAL commitments. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan renewal_plan = 8; + * @param int $var + * @return $this + */ + public function setRenewalPlan($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment\CommitmentPlan::class); + $this->renewal_plan = $var; + + return $this; + } + + /** + * Applicable only for commitments located within one of the BigQuery + * multi-regions (US or EU). + * If set to true, this commitment is placed in the organization's + * secondary region which is designated for disaster recovery purposes. + * If false, this commitment is placed in the organization's default region. + * NOTE: this is a preview feature. Project must be allow-listed in order to + * set this field. + * + * Generated from protobuf field bool multi_region_auxiliary = 10; + * @return bool + */ + public function getMultiRegionAuxiliary() + { + return $this->multi_region_auxiliary; + } + + /** + * Applicable only for commitments located within one of the BigQuery + * multi-regions (US or EU). + * If set to true, this commitment is placed in the organization's + * secondary region which is designated for disaster recovery purposes. + * If false, this commitment is placed in the organization's default region. + * NOTE: this is a preview feature. Project must be allow-listed in order to + * set this field. + * + * Generated from protobuf field bool multi_region_auxiliary = 10; + * @param bool $var + * @return $this + */ + public function setMultiRegionAuxiliary($var) + { + GPBUtil::checkBool($var); + $this->multi_region_auxiliary = $var; + + return $this; + } + + /** + * Edition of the capacity commitment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12; + * @return int + */ + public function getEdition() + { + return $this->edition; + } + + /** + * Edition of the capacity commitment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12; + * @param int $var + * @return $this + */ + public function setEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Edition::class); + $this->edition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php new file mode 100644 index 000000000000..5cae6f7ebca5 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php @@ -0,0 +1,134 @@ +google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan + */ +class CommitmentPlan +{ + /** + * Invalid plan value. Requests with this value will be rejected with + * error code `google.rpc.Code.INVALID_ARGUMENT`. + * + * Generated from protobuf enum COMMITMENT_PLAN_UNSPECIFIED = 0; + */ + const COMMITMENT_PLAN_UNSPECIFIED = 0; + /** + * Flex commitments have committed period of 1 minute after becoming ACTIVE. + * After that, they are not in a committed period anymore and can be removed + * any time. + * + * Generated from protobuf enum FLEX = 3; + */ + const FLEX = 3; + /** + * Same as FLEX, should only be used if flat-rate commitments are still + * available. + * + * Generated from protobuf enum FLEX_FLAT_RATE = 7 [deprecated = true]; + */ + const FLEX_FLAT_RATE = 7; + /** + * Trial commitments have a committed period of 182 days after becoming + * ACTIVE. After that, they are converted to a new commitment based on the + * `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so + * that it can be deleted right after committed period ends. + * + * Generated from protobuf enum TRIAL = 5; + */ + const TRIAL = 5; + /** + * Monthly commitments have a committed period of 30 days after becoming + * ACTIVE. After that, they are not in a committed period anymore and can be + * removed any time. + * + * Generated from protobuf enum MONTHLY = 2; + */ + const MONTHLY = 2; + /** + * Same as MONTHLY, should only be used if flat-rate commitments are still + * available. + * + * Generated from protobuf enum MONTHLY_FLAT_RATE = 8 [deprecated = true]; + */ + const MONTHLY_FLAT_RATE = 8; + /** + * Annual commitments have a committed period of 365 days after becoming + * ACTIVE. After that they are converted to a new commitment based on the + * renewal_plan. + * + * Generated from protobuf enum ANNUAL = 4; + */ + const ANNUAL = 4; + /** + * Same as ANNUAL, should only be used if flat-rate commitments are still + * available. + * + * Generated from protobuf enum ANNUAL_FLAT_RATE = 9 [deprecated = true]; + */ + const ANNUAL_FLAT_RATE = 9; + /** + * 3-year commitments have a committed period of 1095(3 * 365) days after + * becoming ACTIVE. After that they are converted to a new commitment based + * on the renewal_plan. + * + * Generated from protobuf enum THREE_YEAR = 10; + */ + const THREE_YEAR = 10; + /** + * Should only be used for `renewal_plan` and is only meaningful if + * edition is specified to values other than EDITION_UNSPECIFIED. Otherwise + * CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will + * be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. If the + * renewal_plan is NONE, capacity commitment will be removed at the end of + * its commitment period. + * + * Generated from protobuf enum NONE = 6; + */ + const NONE = 6; + + private static $valueToName = [ + self::COMMITMENT_PLAN_UNSPECIFIED => 'COMMITMENT_PLAN_UNSPECIFIED', + self::FLEX => 'FLEX', + self::FLEX_FLAT_RATE => 'FLEX_FLAT_RATE', + self::TRIAL => 'TRIAL', + self::MONTHLY => 'MONTHLY', + self::MONTHLY_FLAT_RATE => 'MONTHLY_FLAT_RATE', + self::ANNUAL => 'ANNUAL', + self::ANNUAL_FLAT_RATE => 'ANNUAL_FLAT_RATE', + self::THREE_YEAR => 'THREE_YEAR', + self::NONE => 'NONE', + ]; + + 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(CommitmentPlan::class, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment_CommitmentPlan::class); + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php new file mode 100644 index 000000000000..7ca01cf2c1b3 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php @@ -0,0 +1,74 @@ +google.cloud.bigquery.reservation.v1.CapacityCommitment.State + */ +class State +{ + /** + * Invalid state value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Capacity commitment is pending provisioning. Pending capacity commitment + * does not contribute to the project's slot_capacity. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * Once slots are provisioned, capacity commitment becomes active. + * slot_count is added to the project's slot_capacity. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * Capacity commitment is failed to be activated by the backend. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::ACTIVE => 'ACTIVE', + 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(State::class, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment_State::class); + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateAssignmentRequest.php new file mode 100644 index 000000000000..3dbab04fdca5 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateAssignmentRequest.php @@ -0,0 +1,181 @@ +google.cloud.bigquery.reservation.v1.CreateAssignmentRequest + */ +class CreateAssignmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name of the assignment + * E.g. `projects/myproject/locations/US/reservations/team1-prod` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Assignment resource to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 2; + */ + protected $assignment = null; + /** + * The optional assignment ID. Assignment name will be generated automatically + * if this field is empty. + * This field must only contain lower case alphanumeric characters or dashes. + * Max length is 64 characters. + * + * Generated from protobuf field string assignment_id = 4; + */ + protected $assignment_id = ''; + + /** + * @param string $parent Required. The parent resource name of the assignment + * E.g. `projects/myproject/locations/US/reservations/team1-prod` + * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment Assignment resource to create. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\CreateAssignmentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment): self + { + return (new self()) + ->setParent($parent) + ->setAssignment($assignment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name of the assignment + * E.g. `projects/myproject/locations/US/reservations/team1-prod` + * @type \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment + * Assignment resource to create. + * @type string $assignment_id + * The optional assignment ID. Assignment name will be generated automatically + * if this field is empty. + * This field must only contain lower case alphanumeric characters or dashes. + * Max length is 64 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name of the assignment + * E.g. `projects/myproject/locations/US/reservations/team1-prod` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name of the assignment + * E.g. `projects/myproject/locations/US/reservations/team1-prod` + * + * 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; + } + + /** + * Assignment resource to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 2; + * @return \Google\Cloud\BigQuery\Reservation\V1\Assignment|null + */ + public function getAssignment() + { + return $this->assignment; + } + + public function hasAssignment() + { + return isset($this->assignment); + } + + public function clearAssignment() + { + unset($this->assignment); + } + + /** + * Assignment resource to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 2; + * @param \Google\Cloud\BigQuery\Reservation\V1\Assignment $var + * @return $this + */ + public function setAssignment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); + $this->assignment = $var; + + return $this; + } + + /** + * The optional assignment ID. Assignment name will be generated automatically + * if this field is empty. + * This field must only contain lower case alphanumeric characters or dashes. + * Max length is 64 characters. + * + * Generated from protobuf field string assignment_id = 4; + * @return string + */ + public function getAssignmentId() + { + return $this->assignment_id; + } + + /** + * The optional assignment ID. Assignment name will be generated automatically + * if this field is empty. + * This field must only contain lower case alphanumeric characters or dashes. + * Max length is 64 characters. + * + * Generated from protobuf field string assignment_id = 4; + * @param string $var + * @return $this + */ + public function setAssignmentId($var) + { + GPBUtil::checkString($var, True); + $this->assignment_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateCapacityCommitmentRequest.php new file mode 100644 index 000000000000..9329e35d14d5 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateCapacityCommitmentRequest.php @@ -0,0 +1,221 @@ +google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest + */ +class CreateCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Content of the capacity commitment to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2; + */ + protected $capacity_commitment = null; + /** + * If true, fail the request if another project in the organization has a + * capacity commitment. + * + * Generated from protobuf field bool enforce_single_admin_project_per_org = 4; + */ + protected $enforce_single_admin_project_per_org = false; + /** + * The optional capacity commitment ID. Capacity commitment name will be + * generated automatically if this field is empty. + * This field must only contain lower case alphanumeric characters or dashes. + * The first and last character cannot be a dash. Max length is 64 characters. + * NOTE: this ID won't be kept if the capacity commitment is split or merged. + * + * Generated from protobuf field string capacity_commitment_id = 5; + */ + protected $capacity_commitment_id = ''; + + /** + * @param string $parent Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * Please see {@see ReservationServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacityCommitment Content of the capacity commitment to create. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\CreateCapacityCommitmentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacityCommitment): self + { + return (new self()) + ->setParent($parent) + ->setCapacityCommitment($capacityCommitment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * @type \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacity_commitment + * Content of the capacity commitment to create. + * @type bool $enforce_single_admin_project_per_org + * If true, fail the request if another project in the organization has a + * capacity commitment. + * @type string $capacity_commitment_id + * The optional capacity commitment ID. Capacity commitment name will be + * generated automatically if this field is empty. + * This field must only contain lower case alphanumeric characters or dashes. + * The first and last character cannot be a dash. Max length is 64 characters. + * NOTE: this ID won't be kept if the capacity commitment is split or merged. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * + * 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; + } + + /** + * Content of the capacity commitment to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2; + * @return \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment|null + */ + public function getCapacityCommitment() + { + return $this->capacity_commitment; + } + + public function hasCapacityCommitment() + { + return isset($this->capacity_commitment); + } + + public function clearCapacityCommitment() + { + unset($this->capacity_commitment); + } + + /** + * Content of the capacity commitment to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2; + * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $var + * @return $this + */ + public function setCapacityCommitment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); + $this->capacity_commitment = $var; + + return $this; + } + + /** + * If true, fail the request if another project in the organization has a + * capacity commitment. + * + * Generated from protobuf field bool enforce_single_admin_project_per_org = 4; + * @return bool + */ + public function getEnforceSingleAdminProjectPerOrg() + { + return $this->enforce_single_admin_project_per_org; + } + + /** + * If true, fail the request if another project in the organization has a + * capacity commitment. + * + * Generated from protobuf field bool enforce_single_admin_project_per_org = 4; + * @param bool $var + * @return $this + */ + public function setEnforceSingleAdminProjectPerOrg($var) + { + GPBUtil::checkBool($var); + $this->enforce_single_admin_project_per_org = $var; + + return $this; + } + + /** + * The optional capacity commitment ID. Capacity commitment name will be + * generated automatically if this field is empty. + * This field must only contain lower case alphanumeric characters or dashes. + * The first and last character cannot be a dash. Max length is 64 characters. + * NOTE: this ID won't be kept if the capacity commitment is split or merged. + * + * Generated from protobuf field string capacity_commitment_id = 5; + * @return string + */ + public function getCapacityCommitmentId() + { + return $this->capacity_commitment_id; + } + + /** + * The optional capacity commitment ID. Capacity commitment name will be + * generated automatically if this field is empty. + * This field must only contain lower case alphanumeric characters or dashes. + * The first and last character cannot be a dash. Max length is 64 characters. + * NOTE: this ID won't be kept if the capacity commitment is split or merged. + * + * Generated from protobuf field string capacity_commitment_id = 5; + * @param string $var + * @return $this + */ + public function setCapacityCommitmentId($var) + { + GPBUtil::checkString($var, True); + $this->capacity_commitment_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationRequest.php new file mode 100644 index 000000000000..ade4f1d52ee1 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationRequest.php @@ -0,0 +1,179 @@ +google.cloud.bigquery.reservation.v1.CreateReservationRequest + */ +class CreateReservationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project, location. E.g., + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The reservation ID. It must only contain lower case alphanumeric + * characters or dashes. It must start with a letter and must not end + * with a dash. Its maximum length is 64 characters. + * + * Generated from protobuf field string reservation_id = 2; + */ + protected $reservation_id = ''; + /** + * Definition of the new reservation to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 3; + */ + protected $reservation = null; + + /** + * @param string $parent Required. Project, location. E.g., + * `projects/myproject/locations/US` + * Please see {@see ReservationServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation Definition of the new reservation to create. + * @param string $reservationId The reservation ID. It must only contain lower case alphanumeric + * characters or dashes. It must start with a letter and must not end + * with a dash. Its maximum length is 64 characters. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\CreateReservationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation, string $reservationId): self + { + return (new self()) + ->setParent($parent) + ->setReservation($reservation) + ->setReservationId($reservationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Project, location. E.g., + * `projects/myproject/locations/US` + * @type string $reservation_id + * The reservation ID. It must only contain lower case alphanumeric + * characters or dashes. It must start with a letter and must not end + * with a dash. Its maximum length is 64 characters. + * @type \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation + * Definition of the new reservation to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project, location. E.g., + * `projects/myproject/locations/US` + * + * 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. Project, location. E.g., + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The reservation ID. It must only contain lower case alphanumeric + * characters or dashes. It must start with a letter and must not end + * with a dash. Its maximum length is 64 characters. + * + * Generated from protobuf field string reservation_id = 2; + * @return string + */ + public function getReservationId() + { + return $this->reservation_id; + } + + /** + * The reservation ID. It must only contain lower case alphanumeric + * characters or dashes. It must start with a letter and must not end + * with a dash. Its maximum length is 64 characters. + * + * Generated from protobuf field string reservation_id = 2; + * @param string $var + * @return $this + */ + public function setReservationId($var) + { + GPBUtil::checkString($var, True); + $this->reservation_id = $var; + + return $this; + } + + /** + * Definition of the new reservation to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 3; + * @return \Google\Cloud\BigQuery\Reservation\V1\Reservation|null + */ + public function getReservation() + { + return $this->reservation; + } + + public function hasReservation() + { + return isset($this->reservation); + } + + public function clearReservation() + { + unset($this->reservation); + } + + /** + * Definition of the new reservation to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 3; + * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation $var + * @return $this + */ + public function setReservation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation::class); + $this->reservation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteAssignmentRequest.php new file mode 100644 index 000000000000..3f39a0587e8e --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteAssignmentRequest.php @@ -0,0 +1,89 @@ +google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest + */ +class DeleteAssignmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource, e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource, e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * Please see {@see ReservationServiceClient::assignmentName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\DeleteAssignmentRequest + * + * @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. Name of the resource, e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource, e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * + * 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. Name of the resource, e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * + * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteCapacityCommitmentRequest.php new file mode 100644 index 000000000000..dc012790ec91 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteCapacityCommitmentRequest.php @@ -0,0 +1,129 @@ +google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest + */ +class DeleteCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the capacity commitment to delete. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Can be used to force delete commitments even if assignments exist. Deleting + * commitments with assignments may cause queries to fail if they no longer + * have access to slots. + * + * Generated from protobuf field bool force = 3; + */ + protected $force = false; + + /** + * @param string $name Required. Resource name of the capacity commitment to delete. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * Please see {@see ReservationServiceClient::capacityCommitmentName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\DeleteCapacityCommitmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the capacity commitment to delete. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * @type bool $force + * Can be used to force delete commitments even if assignments exist. Deleting + * commitments with assignments may cause queries to fail if they no longer + * have access to slots. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the capacity commitment to delete. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the capacity commitment to delete. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * + * 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; + } + + /** + * Can be used to force delete commitments even if assignments exist. Deleting + * commitments with assignments may cause queries to fail if they no longer + * have access to slots. + * + * Generated from protobuf field bool force = 3; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Can be used to force delete commitments even if assignments exist. Deleting + * commitments with assignments may cause queries to fail if they no longer + * have access to slots. + * + * Generated from protobuf field bool force = 3; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php new file mode 100644 index 000000000000..745b2051ee75 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php @@ -0,0 +1,87 @@ +google.cloud.bigquery.reservation.v1.DeleteReservationRequest + */ +class DeleteReservationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\DeleteReservationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * + * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Edition.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Edition.php new file mode 100644 index 000000000000..1e3cae77d674 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Edition.php @@ -0,0 +1,70 @@ +google.cloud.bigquery.reservation.v1.Edition + */ +class Edition +{ + /** + * Default value, which will be treated as ENTERPRISE. + * + * Generated from protobuf enum EDITION_UNSPECIFIED = 0; + */ + const EDITION_UNSPECIFIED = 0; + /** + * Standard edition. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * Enterprise edition. + * + * Generated from protobuf enum ENTERPRISE = 2; + */ + const ENTERPRISE = 2; + /** + * Enterprise plus edition. + * + * Generated from protobuf enum ENTERPRISE_PLUS = 3; + */ + const ENTERPRISE_PLUS = 3; + + private static $valueToName = [ + self::EDITION_UNSPECIFIED => 'EDITION_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::ENTERPRISE => 'ENTERPRISE', + self::ENTERPRISE_PLUS => 'ENTERPRISE_PLUS', + ]; + + 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetBiReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetBiReservationRequest.php new file mode 100644 index 000000000000..2c7408d233fc --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetBiReservationRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.reservation.v1.GetBiReservationRequest + */ +class GetBiReservationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the requested reservation, for example: + * `projects/{project_id}/locations/{location_id}/biReservation` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the requested reservation, for example: + * `projects/{project_id}/locations/{location_id}/biReservation` + * Please see {@see ReservationServiceClient::biReservationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\GetBiReservationRequest + * + * @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. Name of the requested reservation, for example: + * `projects/{project_id}/locations/{location_id}/biReservation` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the requested reservation, for example: + * `projects/{project_id}/locations/{location_id}/biReservation` + * + * 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. Name of the requested reservation, for example: + * `projects/{project_id}/locations/{location_id}/biReservation` + * + * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetCapacityCommitmentRequest.php new file mode 100644 index 000000000000..785336d7ba0b --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetCapacityCommitmentRequest.php @@ -0,0 +1,87 @@ +google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest + */ +class GetCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the capacity commitment to retrieve. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the capacity commitment to retrieve. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * Please see {@see ReservationServiceClient::capacityCommitmentName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\GetCapacityCommitmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the capacity commitment to retrieve. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the capacity commitment to retrieve. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the capacity commitment to retrieve. E.g., + * `projects/myproject/locations/US/capacityCommitments/123` + * + * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php new file mode 100644 index 000000000000..0b048b21d39d --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php @@ -0,0 +1,87 @@ +google.cloud.bigquery.reservation.v1.GetReservationRequest + */ +class GetReservationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\GetReservationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the reservation to retrieve. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * + * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsRequest.php new file mode 100644 index 000000000000..821a46e9140e --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsRequest.php @@ -0,0 +1,168 @@ +google.cloud.bigquery.reservation.v1.ListAssignmentsRequest + */ +class ListAssignmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name e.g.: + * `projects/myproject/locations/US/reservations/team1-prod` + * Or: + * `projects/myproject/locations/US/reservations/-` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource name e.g.: + * + * `projects/myproject/locations/US/reservations/team1-prod` + * + * Or: + * + * `projects/myproject/locations/US/reservations/-` + * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\ListAssignmentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name e.g.: + * `projects/myproject/locations/US/reservations/team1-prod` + * Or: + * `projects/myproject/locations/US/reservations/-` + * @type int $page_size + * The maximum number of items to return per page. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name e.g.: + * `projects/myproject/locations/US/reservations/team1-prod` + * Or: + * `projects/myproject/locations/US/reservations/-` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name e.g.: + * `projects/myproject/locations/US/reservations/team1-prod` + * Or: + * `projects/myproject/locations/US/reservations/-` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsResponse.php new file mode 100644 index 000000000000..86846c01f893 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsResponse.php @@ -0,0 +1,106 @@ +google.cloud.bigquery.reservation.v1.ListAssignmentsResponse + */ +class ListAssignmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of assignments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; + */ + private $assignments; + /** + * 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\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $assignments + * List of assignments visible to the user. + * @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\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * List of assignments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssignments() + { + return $this->assignments; + } + + /** + * List of assignments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; + * @param array<\Google\Cloud\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssignments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); + $this->assignments = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsRequest.php new file mode 100644 index 000000000000..74d24a845b98 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsRequest.php @@ -0,0 +1,155 @@ +google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest + */ +class ListCapacityCommitmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * Please see {@see ReservationServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\ListCapacityCommitmentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the parent reservation. E.g., + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsResponse.php new file mode 100644 index 000000000000..3775a9f7af41 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsResponse.php @@ -0,0 +1,106 @@ +google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse + */ +class ListCapacityCommitmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of capacity commitments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitments = 1; + */ + private $capacity_commitments; + /** + * 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\BigQuery\Reservation\V1\CapacityCommitment>|\Google\Protobuf\Internal\RepeatedField $capacity_commitments + * List of capacity commitments visible to the user. + * @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\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * List of capacity commitments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCapacityCommitments() + { + return $this->capacity_commitments; + } + + /** + * List of capacity commitments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitments = 1; + * @param array<\Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCapacityCommitments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); + $this->capacity_commitments = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsRequest.php new file mode 100644 index 000000000000..a7badf9061a2 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsRequest.php @@ -0,0 +1,155 @@ +google.cloud.bigquery.reservation.v1.ListReservationsRequest + */ +class ListReservationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name containing project and location, e.g.: + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource name containing project and location, e.g.: + * `projects/myproject/locations/US` + * Please see {@see ReservationServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\ListReservationsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name containing project and location, e.g.: + * `projects/myproject/locations/US` + * @type int $page_size + * The maximum number of items to return per page. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name containing project and location, e.g.: + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name containing project and location, e.g.: + * `projects/myproject/locations/US` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsResponse.php new file mode 100644 index 000000000000..01a522f87675 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsResponse.php @@ -0,0 +1,106 @@ +google.cloud.bigquery.reservation.v1.ListReservationsResponse + */ +class ListReservationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of reservations visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Reservation reservations = 1; + */ + private $reservations; + /** + * 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\BigQuery\Reservation\V1\Reservation>|\Google\Protobuf\Internal\RepeatedField $reservations + * List of reservations visible to the user. + * @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\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * List of reservations visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Reservation reservations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReservations() + { + return $this->reservations; + } + + /** + * List of reservations visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Reservation reservations = 1; + * @param array<\Google\Cloud\BigQuery\Reservation\V1\Reservation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReservations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\Reservation::class); + $this->reservations = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php new file mode 100644 index 000000000000..4cba4685918d --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php @@ -0,0 +1,142 @@ +google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest + */ +class MergeCapacityCommitmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Parent resource that identifies admin project and location e.g., + * `projects/myproject/locations/us` + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Ids of capacity commitments to merge. + * These capacity commitments must exist under admin project and location + * specified in the parent. + * ID is the last portion of capacity commitment name e.g., 'abc' for + * projects/myproject/locations/US/capacityCommitments/abc + * + * Generated from protobuf field repeated string capacity_commitment_ids = 2; + */ + private $capacity_commitment_ids; + + /** + * @param string $parent Parent resource that identifies admin project and location e.g., + * `projects/myproject/locations/us` + * @param string[] $capacityCommitmentIds Ids of capacity commitments to merge. + * These capacity commitments must exist under admin project and location + * specified in the parent. + * ID is the last portion of capacity commitment name e.g., 'abc' for + * projects/myproject/locations/US/capacityCommitments/abc + * + * @return \Google\Cloud\BigQuery\Reservation\V1\MergeCapacityCommitmentsRequest + * + * @experimental + */ + public static function build(string $parent, array $capacityCommitmentIds): self + { + return (new self()) + ->setParent($parent) + ->setCapacityCommitmentIds($capacityCommitmentIds); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Parent resource that identifies admin project and location e.g., + * `projects/myproject/locations/us` + * @type array|\Google\Protobuf\Internal\RepeatedField $capacity_commitment_ids + * Ids of capacity commitments to merge. + * These capacity commitments must exist under admin project and location + * specified in the parent. + * ID is the last portion of capacity commitment name e.g., 'abc' for + * projects/myproject/locations/US/capacityCommitments/abc + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Parent resource that identifies admin project and location e.g., + * `projects/myproject/locations/us` + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Parent resource that identifies admin project and location e.g., + * `projects/myproject/locations/us` + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Ids of capacity commitments to merge. + * These capacity commitments must exist under admin project and location + * specified in the parent. + * ID is the last portion of capacity commitment name e.g., 'abc' for + * projects/myproject/locations/US/capacityCommitments/abc + * + * Generated from protobuf field repeated string capacity_commitment_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCapacityCommitmentIds() + { + return $this->capacity_commitment_ids; + } + + /** + * Ids of capacity commitments to merge. + * These capacity commitments must exist under admin project and location + * specified in the parent. + * ID is the last portion of capacity commitment name e.g., 'abc' for + * projects/myproject/locations/US/capacityCommitments/abc + * + * Generated from protobuf field repeated string capacity_commitment_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCapacityCommitmentIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->capacity_commitment_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php new file mode 100644 index 000000000000..9c82141891e1 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php @@ -0,0 +1,184 @@ +google.cloud.bigquery.reservation.v1.MoveAssignmentRequest + */ +class MoveAssignmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the assignment, + * e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The new reservation ID, e.g.: + * `projects/myotherproject/locations/US/reservations/team2-prod` + * + * Generated from protobuf field string destination_id = 3 [(.google.api.resource_reference) = { + */ + protected $destination_id = ''; + /** + * The optional assignment ID. A new assignment name is generated if this + * field is empty. + * This field can contain only lowercase alphanumeric characters or dashes. + * Max length is 64 characters. + * + * Generated from protobuf field string assignment_id = 5; + */ + protected $assignment_id = ''; + + /** + * @param string $name Required. The resource name of the assignment, + * e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * Please see {@see ReservationServiceClient::assignmentName()} for help formatting this field. + * @param string $destinationId The new reservation ID, e.g.: + * `projects/myotherproject/locations/US/reservations/team2-prod` + * + * @return \Google\Cloud\BigQuery\Reservation\V1\MoveAssignmentRequest + * + * @experimental + */ + public static function build(string $name, string $destinationId): self + { + return (new self()) + ->setName($name) + ->setDestinationId($destinationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the assignment, + * e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * @type string $destination_id + * The new reservation ID, e.g.: + * `projects/myotherproject/locations/US/reservations/team2-prod` + * @type string $assignment_id + * The optional assignment ID. A new assignment name is generated if this + * field is empty. + * This field can contain only lowercase alphanumeric characters or dashes. + * Max length is 64 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the assignment, + * e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * + * 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 assignment, + * e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The new reservation ID, e.g.: + * `projects/myotherproject/locations/US/reservations/team2-prod` + * + * Generated from protobuf field string destination_id = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getDestinationId() + { + return $this->destination_id; + } + + /** + * The new reservation ID, e.g.: + * `projects/myotherproject/locations/US/reservations/team2-prod` + * + * Generated from protobuf field string destination_id = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDestinationId($var) + { + GPBUtil::checkString($var, True); + $this->destination_id = $var; + + return $this; + } + + /** + * The optional assignment ID. A new assignment name is generated if this + * field is empty. + * This field can contain only lowercase alphanumeric characters or dashes. + * Max length is 64 characters. + * + * Generated from protobuf field string assignment_id = 5; + * @return string + */ + public function getAssignmentId() + { + return $this->assignment_id; + } + + /** + * The optional assignment ID. A new assignment name is generated if this + * field is empty. + * This field can contain only lowercase alphanumeric characters or dashes. + * Max length is 64 characters. + * + * Generated from protobuf field string assignment_id = 5; + * @param string $var + * @return $this + */ + public function setAssignmentId($var) + { + GPBUtil::checkString($var, True); + $this->assignment_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php new file mode 100644 index 000000000000..9c806e7cf943 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php @@ -0,0 +1,489 @@ +google.cloud.bigquery.reservation.v1.Reservation + */ +class Reservation extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the reservation, e.g., + * `projects/*/locations/*/reservations/team1-prod`. + * The reservation_id must only contain lower case alphanumeric characters or + * dashes. It must start with a letter and must not end with a dash. Its + * maximum length is 64 characters. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Minimum slots available to this reservation. A slot is a unit of + * computational power in BigQuery, and serves as the unit of parallelism. + * Queries using this reservation might use more slots during runtime if + * ignore_idle_slots is set to false. + * If total slot_capacity of the reservation and its siblings + * exceeds the total slot_count of all capacity commitments, the request will + * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. + * NOTE: for reservations in US or EU multi-regions, slot capacity constraints + * are checked separately for default and auxiliary regions. See + * multi_region_auxiliary flag for more details. + * + * Generated from protobuf field int64 slot_capacity = 2; + */ + protected $slot_capacity = 0; + /** + * If false, any query or pipeline job using this reservation will use idle + * slots from other reservations within the same admin project. If true, a + * query or pipeline job using this reservation will execute with the slot + * capacity specified in the slot_capacity field at most. + * + * Generated from protobuf field bool ignore_idle_slots = 4; + */ + protected $ignore_idle_slots = false; + /** + * The configuration parameters for the auto scaling feature. Note this is an + * alpha feature. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7; + */ + protected $autoscale = null; + /** + * Job concurrency target which sets a soft upper bound on the number of jobs + * that can run concurrently in this reservation. This is a soft target due to + * asynchronous nature of the system and various optimizations for small + * queries. + * Default value is 0 which means that concurrency target will be + * automatically computed by the system. + * NOTE: this field is exposed as `target_job_concurrency` in the Information + * Schema, DDL and BQ CLI. + * + * Generated from protobuf field int64 concurrency = 16; + */ + protected $concurrency = 0; + /** + * Output only. Creation time of the reservation. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creation_time = null; + /** + * Output only. Last update time of the reservation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Applicable only for reservations located within one of the BigQuery + * multi-regions (US or EU). + * If set to true, this reservation is placed in the organization's + * secondary region which is designated for disaster recovery purposes. + * If false, this reservation is placed in the organization's default region. + * NOTE: this is a preview feature. Project must be allow-listed in order to + * set this field. + * + * Generated from protobuf field bool multi_region_auxiliary = 14; + */ + protected $multi_region_auxiliary = false; + /** + * Edition of the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17; + */ + protected $edition = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the reservation, e.g., + * `projects/*/locations/*/reservations/team1-prod`. + * The reservation_id must only contain lower case alphanumeric characters or + * dashes. It must start with a letter and must not end with a dash. Its + * maximum length is 64 characters. + * @type int|string $slot_capacity + * Minimum slots available to this reservation. A slot is a unit of + * computational power in BigQuery, and serves as the unit of parallelism. + * Queries using this reservation might use more slots during runtime if + * ignore_idle_slots is set to false. + * If total slot_capacity of the reservation and its siblings + * exceeds the total slot_count of all capacity commitments, the request will + * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. + * NOTE: for reservations in US or EU multi-regions, slot capacity constraints + * are checked separately for default and auxiliary regions. See + * multi_region_auxiliary flag for more details. + * @type bool $ignore_idle_slots + * If false, any query or pipeline job using this reservation will use idle + * slots from other reservations within the same admin project. If true, a + * query or pipeline job using this reservation will execute with the slot + * capacity specified in the slot_capacity field at most. + * @type \Google\Cloud\BigQuery\Reservation\V1\Reservation\Autoscale $autoscale + * The configuration parameters for the auto scaling feature. Note this is an + * alpha feature. + * @type int|string $concurrency + * Job concurrency target which sets a soft upper bound on the number of jobs + * that can run concurrently in this reservation. This is a soft target due to + * asynchronous nature of the system and various optimizations for small + * queries. + * Default value is 0 which means that concurrency target will be + * automatically computed by the system. + * NOTE: this field is exposed as `target_job_concurrency` in the Information + * Schema, DDL and BQ CLI. + * @type \Google\Protobuf\Timestamp $creation_time + * Output only. Creation time of the reservation. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of the reservation. + * @type bool $multi_region_auxiliary + * Applicable only for reservations located within one of the BigQuery + * multi-regions (US or EU). + * If set to true, this reservation is placed in the organization's + * secondary region which is designated for disaster recovery purposes. + * If false, this reservation is placed in the organization's default region. + * NOTE: this is a preview feature. Project must be allow-listed in order to + * set this field. + * @type int $edition + * Edition of the reservation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the reservation, e.g., + * `projects/*/locations/*/reservations/team1-prod`. + * The reservation_id must only contain lower case alphanumeric characters or + * dashes. It must start with a letter and must not end with a dash. Its + * maximum length is 64 characters. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the reservation, e.g., + * `projects/*/locations/*/reservations/team1-prod`. + * The reservation_id must only contain lower case alphanumeric characters or + * dashes. It must start with a letter and must not end with a dash. Its + * maximum length is 64 characters. + * + * 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; + } + + /** + * Minimum slots available to this reservation. A slot is a unit of + * computational power in BigQuery, and serves as the unit of parallelism. + * Queries using this reservation might use more slots during runtime if + * ignore_idle_slots is set to false. + * If total slot_capacity of the reservation and its siblings + * exceeds the total slot_count of all capacity commitments, the request will + * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. + * NOTE: for reservations in US or EU multi-regions, slot capacity constraints + * are checked separately for default and auxiliary regions. See + * multi_region_auxiliary flag for more details. + * + * Generated from protobuf field int64 slot_capacity = 2; + * @return int|string + */ + public function getSlotCapacity() + { + return $this->slot_capacity; + } + + /** + * Minimum slots available to this reservation. A slot is a unit of + * computational power in BigQuery, and serves as the unit of parallelism. + * Queries using this reservation might use more slots during runtime if + * ignore_idle_slots is set to false. + * If total slot_capacity of the reservation and its siblings + * exceeds the total slot_count of all capacity commitments, the request will + * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. + * NOTE: for reservations in US or EU multi-regions, slot capacity constraints + * are checked separately for default and auxiliary regions. See + * multi_region_auxiliary flag for more details. + * + * Generated from protobuf field int64 slot_capacity = 2; + * @param int|string $var + * @return $this + */ + public function setSlotCapacity($var) + { + GPBUtil::checkInt64($var); + $this->slot_capacity = $var; + + return $this; + } + + /** + * If false, any query or pipeline job using this reservation will use idle + * slots from other reservations within the same admin project. If true, a + * query or pipeline job using this reservation will execute with the slot + * capacity specified in the slot_capacity field at most. + * + * Generated from protobuf field bool ignore_idle_slots = 4; + * @return bool + */ + public function getIgnoreIdleSlots() + { + return $this->ignore_idle_slots; + } + + /** + * If false, any query or pipeline job using this reservation will use idle + * slots from other reservations within the same admin project. If true, a + * query or pipeline job using this reservation will execute with the slot + * capacity specified in the slot_capacity field at most. + * + * Generated from protobuf field bool ignore_idle_slots = 4; + * @param bool $var + * @return $this + */ + public function setIgnoreIdleSlots($var) + { + GPBUtil::checkBool($var); + $this->ignore_idle_slots = $var; + + return $this; + } + + /** + * The configuration parameters for the auto scaling feature. Note this is an + * alpha feature. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7; + * @return \Google\Cloud\BigQuery\Reservation\V1\Reservation\Autoscale|null + */ + public function getAutoscale() + { + return $this->autoscale; + } + + public function hasAutoscale() + { + return isset($this->autoscale); + } + + public function clearAutoscale() + { + unset($this->autoscale); + } + + /** + * The configuration parameters for the auto scaling feature. Note this is an + * alpha feature. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7; + * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation\Autoscale $var + * @return $this + */ + public function setAutoscale($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation\Autoscale::class); + $this->autoscale = $var; + + return $this; + } + + /** + * Job concurrency target which sets a soft upper bound on the number of jobs + * that can run concurrently in this reservation. This is a soft target due to + * asynchronous nature of the system and various optimizations for small + * queries. + * Default value is 0 which means that concurrency target will be + * automatically computed by the system. + * NOTE: this field is exposed as `target_job_concurrency` in the Information + * Schema, DDL and BQ CLI. + * + * Generated from protobuf field int64 concurrency = 16; + * @return int|string + */ + public function getConcurrency() + { + return $this->concurrency; + } + + /** + * Job concurrency target which sets a soft upper bound on the number of jobs + * that can run concurrently in this reservation. This is a soft target due to + * asynchronous nature of the system and various optimizations for small + * queries. + * Default value is 0 which means that concurrency target will be + * automatically computed by the system. + * NOTE: this field is exposed as `target_job_concurrency` in the Information + * Schema, DDL and BQ CLI. + * + * Generated from protobuf field int64 concurrency = 16; + * @param int|string $var + * @return $this + */ + public function setConcurrency($var) + { + GPBUtil::checkInt64($var); + $this->concurrency = $var; + + return $this; + } + + /** + * Output only. Creation time of the reservation. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreationTime() + { + return $this->creation_time; + } + + public function hasCreationTime() + { + return isset($this->creation_time); + } + + public function clearCreationTime() + { + unset($this->creation_time); + } + + /** + * Output only. Creation time of the reservation. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->creation_time = $var; + + return $this; + } + + /** + * Output only. Last update time of the reservation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last update time of the reservation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Applicable only for reservations located within one of the BigQuery + * multi-regions (US or EU). + * If set to true, this reservation is placed in the organization's + * secondary region which is designated for disaster recovery purposes. + * If false, this reservation is placed in the organization's default region. + * NOTE: this is a preview feature. Project must be allow-listed in order to + * set this field. + * + * Generated from protobuf field bool multi_region_auxiliary = 14; + * @return bool + */ + public function getMultiRegionAuxiliary() + { + return $this->multi_region_auxiliary; + } + + /** + * Applicable only for reservations located within one of the BigQuery + * multi-regions (US or EU). + * If set to true, this reservation is placed in the organization's + * secondary region which is designated for disaster recovery purposes. + * If false, this reservation is placed in the organization's default region. + * NOTE: this is a preview feature. Project must be allow-listed in order to + * set this field. + * + * Generated from protobuf field bool multi_region_auxiliary = 14; + * @param bool $var + * @return $this + */ + public function setMultiRegionAuxiliary($var) + { + GPBUtil::checkBool($var); + $this->multi_region_auxiliary = $var; + + return $this; + } + + /** + * Edition of the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17; + * @return int + */ + public function getEdition() + { + return $this->edition; + } + + /** + * Edition of the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17; + * @param int $var + * @return $this + */ + public function setEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Edition::class); + $this->edition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php new file mode 100644 index 000000000000..e81fa3770b43 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php @@ -0,0 +1,108 @@ +google.cloud.bigquery.reservation.v1.Reservation.Autoscale + */ +class Autoscale extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The slot capacity added to this reservation when autoscale + * happens. Will be between [0, max_slots]. + * + * Generated from protobuf field int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $current_slots = 0; + /** + * Number of slots to be scaled when needed. + * + * Generated from protobuf field int64 max_slots = 2; + */ + protected $max_slots = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $current_slots + * Output only. The slot capacity added to this reservation when autoscale + * happens. Will be between [0, max_slots]. + * @type int|string $max_slots + * Number of slots to be scaled when needed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The slot capacity added to this reservation when autoscale + * happens. Will be between [0, max_slots]. + * + * Generated from protobuf field int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCurrentSlots() + { + return $this->current_slots; + } + + /** + * Output only. The slot capacity added to this reservation when autoscale + * happens. Will be between [0, max_slots]. + * + * Generated from protobuf field int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCurrentSlots($var) + { + GPBUtil::checkInt64($var); + $this->current_slots = $var; + + return $this; + } + + /** + * Number of slots to be scaled when needed. + * + * Generated from protobuf field int64 max_slots = 2; + * @return int|string + */ + public function getMaxSlots() + { + return $this->max_slots; + } + + /** + * Number of slots to be scaled when needed. + * + * Generated from protobuf field int64 max_slots = 2; + * @param int|string $var + * @return $this + */ + public function setMaxSlots($var) + { + GPBUtil::checkInt64($var); + $this->max_slots = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Autoscale::class, \Google\Cloud\BigQuery\Reservation\V1\Reservation_Autoscale::class); + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsRequest.php new file mode 100644 index 000000000000..c21a1dea6c94 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsRequest.php @@ -0,0 +1,220 @@ +google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest + */ +class SearchAllAssignmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name with location (project name could be the + * wildcard '-'), e.g.: + * `projects/-/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Please specify resource name as assignee in the query. + * Examples: + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * + * Generated from protobuf field string query = 2; + */ + protected $query = ''; + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name with location (project name could be the + * wildcard '-'), e.g.: + * `projects/-/locations/US`. Please see + * {@see ReservationServiceClient::locationName()} for help formatting this field. + * @param string $query Please specify resource name as assignee in the query. + * + * Examples: + * + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * + * @return \Google\Cloud\BigQuery\Reservation\V1\SearchAllAssignmentsRequest + * + * @experimental + */ + public static function build(string $parent, string $query): self + { + return (new self()) + ->setParent($parent) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name with location (project name could be the + * wildcard '-'), e.g.: + * `projects/-/locations/US`. + * @type string $query + * Please specify resource name as assignee in the query. + * Examples: + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * @type int $page_size + * The maximum number of items to return per page. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name with location (project name could be the + * wildcard '-'), e.g.: + * `projects/-/locations/US`. + * + * 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 with location (project name could be the + * wildcard '-'), e.g.: + * `projects/-/locations/US`. + * + * 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; + } + + /** + * Please specify resource name as assignee in the query. + * Examples: + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * + * Generated from protobuf field string query = 2; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Please specify resource name as assignee in the query. + * Examples: + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * + * Generated from protobuf field string query = 2; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 4; + * @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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsResponse.php new file mode 100644 index 000000000000..1864b05872c0 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsResponse.php @@ -0,0 +1,106 @@ +google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse + */ +class SearchAllAssignmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of assignments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; + */ + private $assignments; + /** + * 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\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $assignments + * List of assignments visible to the user. + * @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\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * List of assignments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssignments() + { + return $this->assignments; + } + + /** + * List of assignments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; + * @param array<\Google\Cloud\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssignments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); + $this->assignments = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsRequest.php new file mode 100644 index 000000000000..2965aef34365 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsRequest.php @@ -0,0 +1,220 @@ +google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest + */ +class SearchAssignmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the admin project(containing project and + * location), e.g.: + * `projects/myproject/locations/US`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Please specify resource name as assignee in the query. + * Examples: + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * + * Generated from protobuf field string query = 2; + */ + protected $query = ''; + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the admin project(containing project and + * location), e.g.: + * `projects/myproject/locations/US`. Please see + * {@see ReservationServiceClient::locationName()} for help formatting this field. + * @param string $query Please specify resource name as assignee in the query. + * + * Examples: + * + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * + * @return \Google\Cloud\BigQuery\Reservation\V1\SearchAssignmentsRequest + * + * @experimental + */ + public static function build(string $parent, string $query): self + { + return (new self()) + ->setParent($parent) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the admin project(containing project and + * location), e.g.: + * `projects/myproject/locations/US`. + * @type string $query + * Please specify resource name as assignee in the query. + * Examples: + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * @type int $page_size + * The maximum number of items to return per page. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the admin project(containing project and + * location), e.g.: + * `projects/myproject/locations/US`. + * + * 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 admin project(containing project and + * location), e.g.: + * `projects/myproject/locations/US`. + * + * 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; + } + + /** + * Please specify resource name as assignee in the query. + * Examples: + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * + * Generated from protobuf field string query = 2; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Please specify resource name as assignee in the query. + * Examples: + * * `assignee=projects/myproject` + * * `assignee=folders/123` + * * `assignee=organizations/456` + * + * Generated from protobuf field string query = 2; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return per page. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 4; + * @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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsResponse.php new file mode 100644 index 000000000000..f7f802f7c0c8 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsResponse.php @@ -0,0 +1,106 @@ +google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse + */ +class SearchAssignmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of assignments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; + */ + private $assignments; + /** + * 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\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $assignments + * List of assignments visible to the user. + * @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\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * List of assignments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssignments() + { + return $this->assignments; + } + + /** + * List of assignments visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; + * @param array<\Google\Cloud\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssignments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); + $this->assignments = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentRequest.php new file mode 100644 index 000000000000..ef7d9a88c90e --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentRequest.php @@ -0,0 +1,123 @@ +google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest + */ +class SplitCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name e.g.,: + * `projects/myproject/locations/US/capacityCommitments/123` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Number of slots in the capacity commitment after the split. + * + * Generated from protobuf field int64 slot_count = 2; + */ + protected $slot_count = 0; + + /** + * @param string $name Required. The resource name e.g.,: + * `projects/myproject/locations/US/capacityCommitments/123` + * Please see {@see ReservationServiceClient::capacityCommitmentName()} for help formatting this field. + * @param int $slotCount Number of slots in the capacity commitment after the split. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\SplitCapacityCommitmentRequest + * + * @experimental + */ + public static function build(string $name, int $slotCount): self + { + return (new self()) + ->setName($name) + ->setSlotCount($slotCount); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name e.g.,: + * `projects/myproject/locations/US/capacityCommitments/123` + * @type int|string $slot_count + * Number of slots in the capacity commitment after the split. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name e.g.,: + * `projects/myproject/locations/US/capacityCommitments/123` + * + * 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 e.g.,: + * `projects/myproject/locations/US/capacityCommitments/123` + * + * 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; + } + + /** + * Number of slots in the capacity commitment after the split. + * + * Generated from protobuf field int64 slot_count = 2; + * @return int|string + */ + public function getSlotCount() + { + return $this->slot_count; + } + + /** + * Number of slots in the capacity commitment after the split. + * + * Generated from protobuf field int64 slot_count = 2; + * @param int|string $var + * @return $this + */ + public function setSlotCount($var) + { + GPBUtil::checkInt64($var); + $this->slot_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentResponse.php new file mode 100644 index 000000000000..dfe6cb372ee1 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentResponse.php @@ -0,0 +1,122 @@ +google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse + */ +class SplitCapacityCommitmentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * First capacity commitment, result of a split. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment first = 1; + */ + protected $first = null; + /** + * Second capacity commitment, result of a split. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment second = 2; + */ + protected $second = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $first + * First capacity commitment, result of a split. + * @type \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $second + * Second capacity commitment, result of a split. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * First capacity commitment, result of a split. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment first = 1; + * @return \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment|null + */ + public function getFirst() + { + return $this->first; + } + + public function hasFirst() + { + return isset($this->first); + } + + public function clearFirst() + { + unset($this->first); + } + + /** + * First capacity commitment, result of a split. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment first = 1; + * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $var + * @return $this + */ + public function setFirst($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); + $this->first = $var; + + return $this; + } + + /** + * Second capacity commitment, result of a split. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment second = 2; + * @return \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment|null + */ + public function getSecond() + { + return $this->second; + } + + public function hasSecond() + { + return isset($this->second); + } + + public function clearSecond() + { + unset($this->second); + } + + /** + * Second capacity commitment, result of a split. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment second = 2; + * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $var + * @return $this + */ + public function setSecond($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); + $this->second = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/TableReference.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/TableReference.php new file mode 100644 index 000000000000..a90214c8e1bb --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/TableReference.php @@ -0,0 +1,136 @@ +google.cloud.bigquery.reservation.v1.TableReference + */ +class TableReference extends \Google\Protobuf\Internal\Message +{ + /** + * The assigned project ID of the project. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * The ID of the dataset in the above project. + * + * Generated from protobuf field string dataset_id = 2; + */ + protected $dataset_id = ''; + /** + * The ID of the table in the above dataset. + * + * Generated from protobuf field string table_id = 3; + */ + protected $table_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The assigned project ID of the project. + * @type string $dataset_id + * The ID of the dataset in the above project. + * @type string $table_id + * The ID of the table in the above dataset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * The assigned project ID of the project. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The assigned project ID of the project. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The ID of the dataset in the above project. + * + * Generated from protobuf field string dataset_id = 2; + * @return string + */ + public function getDatasetId() + { + return $this->dataset_id; + } + + /** + * The ID of the dataset in the above project. + * + * Generated from protobuf field string dataset_id = 2; + * @param string $var + * @return $this + */ + public function setDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->dataset_id = $var; + + return $this; + } + + /** + * The ID of the table in the above dataset. + * + * Generated from protobuf field string table_id = 3; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * The ID of the table in the above dataset. + * + * Generated from protobuf field string table_id = 3; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateAssignmentRequest.php new file mode 100644 index 000000000000..9cf9c1ac0556 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateAssignmentRequest.php @@ -0,0 +1,137 @@ +google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest + */ +class UpdateAssignmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Content of the assignment to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 1; + */ + protected $assignment = null; + /** + * Standard field mask for the set of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment Content of the assignment to update. + * @param \Google\Protobuf\FieldMask $updateMask Standard field mask for the set of fields to be updated. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\UpdateAssignmentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAssignment($assignment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment + * Content of the assignment to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Standard field mask for the set of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Content of the assignment to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 1; + * @return \Google\Cloud\BigQuery\Reservation\V1\Assignment|null + */ + public function getAssignment() + { + return $this->assignment; + } + + public function hasAssignment() + { + return isset($this->assignment); + } + + public function clearAssignment() + { + unset($this->assignment); + } + + /** + * Content of the assignment to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 1; + * @param \Google\Cloud\BigQuery\Reservation\V1\Assignment $var + * @return $this + */ + public function setAssignment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); + $this->assignment = $var; + + return $this; + } + + /** + * Standard field mask for the set of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Standard field mask for the set of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateBiReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateBiReservationRequest.php new file mode 100644 index 000000000000..f38c800ad548 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateBiReservationRequest.php @@ -0,0 +1,136 @@ +google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest + */ +class UpdateBiReservationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A reservation to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.BiReservation bi_reservation = 1; + */ + protected $bi_reservation = null; + /** + * A list of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\BigQuery\Reservation\V1\BiReservation $biReservation A reservation to update. + * @param \Google\Protobuf\FieldMask $updateMask A list of fields to be updated in this request. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\UpdateBiReservationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\Reservation\V1\BiReservation $biReservation, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBiReservation($biReservation) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Reservation\V1\BiReservation $bi_reservation + * A reservation to update. + * @type \Google\Protobuf\FieldMask $update_mask + * A list of fields to be updated in this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * A reservation to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.BiReservation bi_reservation = 1; + * @return \Google\Cloud\BigQuery\Reservation\V1\BiReservation|null + */ + public function getBiReservation() + { + return $this->bi_reservation; + } + + public function hasBiReservation() + { + return isset($this->bi_reservation); + } + + public function clearBiReservation() + { + unset($this->bi_reservation); + } + + /** + * A reservation to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.BiReservation bi_reservation = 1; + * @param \Google\Cloud\BigQuery\Reservation\V1\BiReservation $var + * @return $this + */ + public function setBiReservation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\BiReservation::class); + $this->bi_reservation = $var; + + return $this; + } + + /** + * A list of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * A list of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateCapacityCommitmentRequest.php new file mode 100644 index 000000000000..b60c38af791f --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateCapacityCommitmentRequest.php @@ -0,0 +1,137 @@ +google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest + */ +class UpdateCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Content of the capacity commitment to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 1; + */ + protected $capacity_commitment = null; + /** + * Standard field mask for the set of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacityCommitment Content of the capacity commitment to update. + * @param \Google\Protobuf\FieldMask $updateMask Standard field mask for the set of fields to be updated. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\UpdateCapacityCommitmentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacityCommitment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCapacityCommitment($capacityCommitment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacity_commitment + * Content of the capacity commitment to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Standard field mask for the set of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Content of the capacity commitment to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 1; + * @return \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment|null + */ + public function getCapacityCommitment() + { + return $this->capacity_commitment; + } + + public function hasCapacityCommitment() + { + return isset($this->capacity_commitment); + } + + public function clearCapacityCommitment() + { + unset($this->capacity_commitment); + } + + /** + * Content of the capacity commitment to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 1; + * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $var + * @return $this + */ + public function setCapacityCommitment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); + $this->capacity_commitment = $var; + + return $this; + } + + /** + * Standard field mask for the set of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Standard field mask for the set of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateReservationRequest.php new file mode 100644 index 000000000000..001b97e55e2a --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateReservationRequest.php @@ -0,0 +1,137 @@ +google.cloud.bigquery.reservation.v1.UpdateReservationRequest + */ +class UpdateReservationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Content of the reservation to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 1; + */ + protected $reservation = null; + /** + * Standard field mask for the set of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation Content of the reservation to update. + * @param \Google\Protobuf\FieldMask $updateMask Standard field mask for the set of fields to be updated. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\UpdateReservationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setReservation($reservation) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation + * Content of the reservation to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Standard field mask for the set of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Content of the reservation to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 1; + * @return \Google\Cloud\BigQuery\Reservation\V1\Reservation|null + */ + public function getReservation() + { + return $this->reservation; + } + + public function hasReservation() + { + return isset($this->reservation); + } + + public function clearReservation() + { + unset($this->reservation); + } + + /** + * Content of the reservation to update. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 1; + * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation $var + * @return $this + */ + public function setReservation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation::class); + $this->reservation = $var; + + return $this; + } + + /** + * Standard field mask for the set of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Standard field mask for the set of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_assignment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_assignment.php new file mode 100644 index 000000000000..d5baf3ac5d8d --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_assignment.php @@ -0,0 +1,110 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var Assignment $response */ + $response = $reservationServiceClient->createAssignment($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 = ReservationServiceClient::reservationName( + '[PROJECT]', + '[LOCATION]', + '[RESERVATION]' + ); + + create_assignment_sample($formattedParent); +} +// [END bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_capacity_commitment.php new file mode 100644 index 000000000000..7285b583f0e5 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_capacity_commitment.php @@ -0,0 +1,72 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var CapacityCommitment $response */ + $response = $reservationServiceClient->createCapacityCommitment($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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_capacity_commitment_sample($formattedParent); +} +// [END bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation.php new file mode 100644 index 000000000000..c12c794dba85 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation.php @@ -0,0 +1,72 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var Reservation $response */ + $response = $reservationServiceClient->createReservation($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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_reservation_sample($formattedParent); +} +// [END bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_assignment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_assignment.php new file mode 100644 index 000000000000..1aacfc39838a --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_assignment.php @@ -0,0 +1,89 @@ +` + * and `` + * + * In this example, deletion of the `` assignment won't + * affect the other assignment ``. After said deletion, + * queries from `project1` will still use `res1` while queries from + * `project2` will switch to use on-demand mode. + * + * @param string $formattedName Name of the resource, e.g. + * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + * Please see {@see ReservationServiceClient::assignmentName()} for help formatting this field. + */ +function delete_assignment_sample(string $formattedName): void +{ + // Create a client. + $reservationServiceClient = new ReservationServiceClient(); + + // Prepare the request message. + $request = (new DeleteAssignmentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $reservationServiceClient->deleteAssignment($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 = ReservationServiceClient::assignmentName( + '[PROJECT]', + '[LOCATION]', + '[RESERVATION]', + '[ASSIGNMENT]' + ); + + delete_assignment_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_capacity_commitment.php new file mode 100644 index 000000000000..517fdcbacd57 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_capacity_commitment.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $reservationServiceClient->deleteCapacityCommitment($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 = ReservationServiceClient::capacityCommitmentName( + '[PROJECT]', + '[LOCATION]', + '[CAPACITY_COMMITMENT]' + ); + + delete_capacity_commitment_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation.php new file mode 100644 index 000000000000..71dcc51c2648 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $reservationServiceClient->deleteReservation($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 = ReservationServiceClient::reservationName( + '[PROJECT]', + '[LOCATION]', + '[RESERVATION]' + ); + + delete_reservation_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_bi_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_bi_reservation.php new file mode 100644 index 000000000000..5dd1e2e6a678 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_bi_reservation.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BiReservation $response */ + $response = $reservationServiceClient->getBiReservation($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 = ReservationServiceClient::biReservationName('[PROJECT]', '[LOCATION]'); + + get_bi_reservation_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_capacity_commitment.php new file mode 100644 index 000000000000..da0a087521bd --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_capacity_commitment.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CapacityCommitment $response */ + $response = $reservationServiceClient->getCapacityCommitment($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 = ReservationServiceClient::capacityCommitmentName( + '[PROJECT]', + '[LOCATION]', + '[CAPACITY_COMMITMENT]' + ); + + get_capacity_commitment_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation.php new file mode 100644 index 000000000000..9b3ec448caee --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Reservation $response */ + $response = $reservationServiceClient->getReservation($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 = ReservationServiceClient::reservationName( + '[PROJECT]', + '[LOCATION]', + '[RESERVATION]' + ); + + get_reservation_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_assignments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_assignments.php new file mode 100644 index 000000000000..5aa935e5c914 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_assignments.php @@ -0,0 +1,106 @@ +` + * and `` + * + * In this example, ListAssignments will just return the above two assignments + * for reservation `res1`, and no expansion/merge will happen. + * + * The wildcard "-" can be used for + * reservations in the request. In that case all assignments belongs to the + * specified project and location will be listed. + * + * **Note** "-" cannot be used for projects nor locations. + * + * @param string $formattedParent The parent resource name e.g.: + * + * `projects/myproject/locations/US/reservations/team1-prod` + * + * Or: + * + * `projects/myproject/locations/US/reservations/-` + * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. + */ +function list_assignments_sample(string $formattedParent): void +{ + // Create a client. + $reservationServiceClient = new ReservationServiceClient(); + + // Prepare the request message. + $request = (new ListAssignmentsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $reservationServiceClient->listAssignments($request); + + /** @var Assignment $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 = ReservationServiceClient::reservationName( + '[PROJECT]', + '[LOCATION]', + '[RESERVATION]' + ); + + list_assignments_sample($formattedParent); +} +// [END bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_capacity_commitments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_capacity_commitments.php new file mode 100644 index 000000000000..0f2b30e94d34 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_capacity_commitments.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $reservationServiceClient->listCapacityCommitments($request); + + /** @var CapacityCommitment $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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_capacity_commitments_sample($formattedParent); +} +// [END bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservations.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservations.php new file mode 100644 index 000000000000..6a7f0288ac41 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservations.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $reservationServiceClient->listReservations($request); + + /** @var Reservation $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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_reservations_sample($formattedParent); +} +// [END bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/merge_capacity_commitments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/merge_capacity_commitments.php new file mode 100644 index 000000000000..a894deeac331 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/merge_capacity_commitments.php @@ -0,0 +1,63 @@ +mergeCapacityCommitments($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/move_assignment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/move_assignment.php new file mode 100644 index 000000000000..e2ac5b2d9b86 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/move_assignment.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Assignment $response */ + $response = $reservationServiceClient->moveAssignment($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 = ReservationServiceClient::assignmentName( + '[PROJECT]', + '[LOCATION]', + '[RESERVATION]', + '[ASSIGNMENT]' + ); + + move_assignment_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_all_assignments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_all_assignments.php new file mode 100644 index 000000000000..6be032006ec9 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_all_assignments.php @@ -0,0 +1,97 @@ +folder->organization) happens in this API. + * 3. Parent here is `projects/*/locations/*`, instead of + * `projects/*/locations/*reservations/*`. + * + * @param string $formattedParent The resource name with location (project name could be the + * wildcard '-'), e.g.: + * `projects/-/locations/US`. Please see + * {@see ReservationServiceClient::locationName()} for help formatting this field. + */ +function search_all_assignments_sample(string $formattedParent): void +{ + // Create a client. + $reservationServiceClient = new ReservationServiceClient(); + + // Prepare the request message. + $request = (new SearchAllAssignmentsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $reservationServiceClient->searchAllAssignments($request); + + /** @var Assignment $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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + search_all_assignments_sample($formattedParent); +} +// [END bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_assignments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_assignments.php new file mode 100644 index 000000000000..492d7ee69f37 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_assignments.php @@ -0,0 +1,100 @@ +folder->organization) happens in this API. + * 3. Parent here is `projects/*/locations/*`, instead of + * `projects/*/locations/*reservations/*`. + * + * **Note** "-" cannot be used for projects + * nor locations. + * + * @param string $formattedParent The resource name of the admin project(containing project and + * location), e.g.: + * `projects/myproject/locations/US`. Please see + * {@see ReservationServiceClient::locationName()} for help formatting this field. + */ +function search_assignments_sample(string $formattedParent): void +{ + // Create a client. + $reservationServiceClient = new ReservationServiceClient(); + + // Prepare the request message. + $request = (new SearchAssignmentsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $reservationServiceClient->searchAssignments($request); + + /** @var Assignment $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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + search_assignments_sample($formattedParent); +} +// [END bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/split_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/split_capacity_commitment.php new file mode 100644 index 000000000000..8b64bf3ad918 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/split_capacity_commitment.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SplitCapacityCommitmentResponse $response */ + $response = $reservationServiceClient->splitCapacityCommitment($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 = ReservationServiceClient::capacityCommitmentName( + '[PROJECT]', + '[LOCATION]', + '[CAPACITY_COMMITMENT]' + ); + + split_capacity_commitment_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_assignment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_assignment.php new file mode 100644 index 000000000000..165918ebdc33 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_assignment.php @@ -0,0 +1,59 @@ +updateAssignment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_bi_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_bi_reservation.php new file mode 100644 index 000000000000..0b9afd0d6f84 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_bi_reservation.php @@ -0,0 +1,64 @@ +updateBiReservation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_capacity_commitment.php new file mode 100644 index 000000000000..f874b135046f --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_capacity_commitment.php @@ -0,0 +1,63 @@ +updateCapacityCommitment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_reservation.php new file mode 100644 index 000000000000..0c1ab7f41205 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_reservation.php @@ -0,0 +1,57 @@ +updateReservation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php b/owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php new file mode 100644 index 000000000000..0c70f8f7d0b1 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php @@ -0,0 +1,1047 @@ + createAssignmentAsync(CreateAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCapacityCommitmentAsync(CreateCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReservationAsync(CreateReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAssignmentAsync(DeleteAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCapacityCommitmentAsync(DeleteCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReservationAsync(DeleteReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBiReservationAsync(GetBiReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCapacityCommitmentAsync(GetCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReservationAsync(GetReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAssignmentsAsync(ListAssignmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCapacityCommitmentsAsync(ListCapacityCommitmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReservationsAsync(ListReservationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface mergeCapacityCommitmentsAsync(MergeCapacityCommitmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface moveAssignmentAsync(MoveAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchAllAssignmentsAsync(SearchAllAssignmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchAssignmentsAsync(SearchAssignmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface splitCapacityCommitmentAsync(SplitCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAssignmentAsync(UpdateAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBiReservationAsync(UpdateBiReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCapacityCommitmentAsync(UpdateCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateReservationAsync(UpdateReservationRequest $request, array $optionalArgs = []) + */ +final class ReservationServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.reservation.v1.ReservationService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigqueryreservation.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigqueryreservation.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/reservation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/reservation_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/reservation_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/reservation_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a assignment + * resource. + * + * @param string $project + * @param string $location + * @param string $reservation + * @param string $assignment + * + * @return string The formatted assignment resource. + */ + public static function assignmentName(string $project, string $location, string $reservation, string $assignment): string + { + return self::getPathTemplate('assignment')->render([ + 'project' => $project, + 'location' => $location, + 'reservation' => $reservation, + 'assignment' => $assignment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * bi_reservation resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted bi_reservation resource. + */ + public static function biReservationName(string $project, string $location): string + { + return self::getPathTemplate('biReservation')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * capacity_commitment resource. + * + * @param string $project + * @param string $location + * @param string $capacityCommitment + * + * @return string The formatted capacity_commitment resource. + */ + public static function capacityCommitmentName(string $project, string $location, string $capacityCommitment): string + { + return self::getPathTemplate('capacityCommitment')->render([ + 'project' => $project, + 'location' => $location, + 'capacity_commitment' => $capacityCommitment, + ]); + } + + /** + * 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 reservation + * resource. + * + * @param string $project + * @param string $location + * @param string $reservation + * + * @return string The formatted reservation resource. + */ + public static function reservationName(string $project, string $location, string $reservation): string + { + return self::getPathTemplate('reservation')->render([ + 'project' => $project, + 'location' => $location, + 'reservation' => $reservation, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - assignment: projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment} + * - biReservation: projects/{project}/locations/{location}/biReservation + * - capacityCommitment: projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment} + * - location: projects/{project}/locations/{location} + * - reservation: projects/{project}/locations/{location}/reservations/{reservation} + * + * 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 'bigqueryreservation.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an assignment object which allows the given project to submit jobs + * of a certain type using slots from the specified reservation. + * + * Currently a + * resource (project, folder, organization) can only have one assignment per + * each (job_type, location) combination, and that reservation will be used + * for all jobs of the matching type. + * + * Different assignments can be created on different levels of the + * projects, folders or organization hierarchy. During query execution, + * the assignment is looked up at the project, folder and organization levels + * in that order. The first assignment found is applied to the query. + * + * When creating assignments, it does not matter if other assignments exist at + * higher levels. + * + * Example: + * + * * The organization `organizationA` contains two projects, `project1` + * and `project2`. + * * Assignments for all three entities (`organizationA`, `project1`, and + * `project2`) could all be created and mapped to the same or different + * reservations. + * + * "None" assignments represent an absence of the assignment. Projects + * assigned to None use on-demand pricing. To create a "None" assignment, use + * "none" as a reservation_id in the parent. Example parent: + * `projects/myproject/locations/US/reservations/none`. + * + * Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have + * 'bigquery.admin' permissions on the project using the reservation + * and the project that owns this reservation. + * + * Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + * does not match location of the reservation. + * + * The async variant is {@see ReservationServiceClient::createAssignmentAsync()} . + * + * @example samples/V1/ReservationServiceClient/create_assignment.php + * + * @param CreateAssignmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Assignment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAssignment(CreateAssignmentRequest $request, array $callOptions = []): Assignment + { + return $this->startApiCall('CreateAssignment', $request, $callOptions)->wait(); + } + + /** + * Creates a new capacity commitment resource. + * + * The async variant is + * {@see ReservationServiceClient::createCapacityCommitmentAsync()} . + * + * @example samples/V1/ReservationServiceClient/create_capacity_commitment.php + * + * @param CreateCapacityCommitmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CapacityCommitment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCapacityCommitment(CreateCapacityCommitmentRequest $request, array $callOptions = []): CapacityCommitment + { + return $this->startApiCall('CreateCapacityCommitment', $request, $callOptions)->wait(); + } + + /** + * Creates a new reservation resource. + * + * The async variant is {@see ReservationServiceClient::createReservationAsync()} . + * + * @example samples/V1/ReservationServiceClient/create_reservation.php + * + * @param CreateReservationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Reservation + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReservation(CreateReservationRequest $request, array $callOptions = []): Reservation + { + return $this->startApiCall('CreateReservation', $request, $callOptions)->wait(); + } + + /** + * Deletes a assignment. No expansion will happen. + * + * Example: + * + * * Organization `organizationA` contains two projects, `project1` and + * `project2`. + * * Reservation `res1` exists and was created previously. + * * CreateAssignment was used previously to define the following + * associations between entities and reservations: `` + * and `` + * + * In this example, deletion of the `` assignment won't + * affect the other assignment ``. After said deletion, + * queries from `project1` will still use `res1` while queries from + * `project2` will switch to use on-demand mode. + * + * The async variant is {@see ReservationServiceClient::deleteAssignmentAsync()} . + * + * @example samples/V1/ReservationServiceClient/delete_assignment.php + * + * @param DeleteAssignmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteAssignment(DeleteAssignmentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAssignment', $request, $callOptions)->wait(); + } + + /** + * Deletes a capacity commitment. Attempting to delete capacity commitment + * before its commitment_end_time will fail with the error code + * `google.rpc.Code.FAILED_PRECONDITION`. + * + * The async variant is + * {@see ReservationServiceClient::deleteCapacityCommitmentAsync()} . + * + * @example samples/V1/ReservationServiceClient/delete_capacity_commitment.php + * + * @param DeleteCapacityCommitmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteCapacityCommitment(DeleteCapacityCommitmentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteCapacityCommitment', $request, $callOptions)->wait(); + } + + /** + * Deletes a reservation. + * Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + * assignments. + * + * The async variant is {@see ReservationServiceClient::deleteReservationAsync()} . + * + * @example samples/V1/ReservationServiceClient/delete_reservation.php + * + * @param DeleteReservationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteReservation(DeleteReservationRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteReservation', $request, $callOptions)->wait(); + } + + /** + * Retrieves a BI reservation. + * + * The async variant is {@see ReservationServiceClient::getBiReservationAsync()} . + * + * @example samples/V1/ReservationServiceClient/get_bi_reservation.php + * + * @param GetBiReservationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BiReservation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBiReservation(GetBiReservationRequest $request, array $callOptions = []): BiReservation + { + return $this->startApiCall('GetBiReservation', $request, $callOptions)->wait(); + } + + /** + * Returns information about the capacity commitment. + * + * The async variant is + * {@see ReservationServiceClient::getCapacityCommitmentAsync()} . + * + * @example samples/V1/ReservationServiceClient/get_capacity_commitment.php + * + * @param GetCapacityCommitmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CapacityCommitment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCapacityCommitment(GetCapacityCommitmentRequest $request, array $callOptions = []): CapacityCommitment + { + return $this->startApiCall('GetCapacityCommitment', $request, $callOptions)->wait(); + } + + /** + * Returns information about the reservation. + * + * The async variant is {@see ReservationServiceClient::getReservationAsync()} . + * + * @example samples/V1/ReservationServiceClient/get_reservation.php + * + * @param GetReservationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Reservation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReservation(GetReservationRequest $request, array $callOptions = []): Reservation + { + return $this->startApiCall('GetReservation', $request, $callOptions)->wait(); + } + + /** + * Lists assignments. + * + * Only explicitly created assignments will be returned. + * + * Example: + * + * * Organization `organizationA` contains two projects, `project1` and + * `project2`. + * * Reservation `res1` exists and was created previously. + * * CreateAssignment was used previously to define the following + * associations between entities and reservations: `` + * and `` + * + * In this example, ListAssignments will just return the above two assignments + * for reservation `res1`, and no expansion/merge will happen. + * + * The wildcard "-" can be used for + * reservations in the request. In that case all assignments belongs to the + * specified project and location will be listed. + * + * **Note** "-" cannot be used for projects nor locations. + * + * The async variant is {@see ReservationServiceClient::listAssignmentsAsync()} . + * + * @example samples/V1/ReservationServiceClient/list_assignments.php + * + * @param ListAssignmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAssignments(ListAssignmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAssignments', $request, $callOptions); + } + + /** + * Lists all the capacity commitments for the admin project. + * + * The async variant is + * {@see ReservationServiceClient::listCapacityCommitmentsAsync()} . + * + * @example samples/V1/ReservationServiceClient/list_capacity_commitments.php + * + * @param ListCapacityCommitmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCapacityCommitments(ListCapacityCommitmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCapacityCommitments', $request, $callOptions); + } + + /** + * Lists all the reservations for the project in the specified location. + * + * The async variant is {@see ReservationServiceClient::listReservationsAsync()} . + * + * @example samples/V1/ReservationServiceClient/list_reservations.php + * + * @param ListReservationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listReservations(ListReservationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReservations', $request, $callOptions); + } + + /** + * Merges capacity commitments of the same plan into a single commitment. + * + * The resulting capacity commitment has the greater commitment_end_time + * out of the to-be-merged capacity commitments. + * + * Attempting to merge capacity commitments of different plan will fail + * with the error code `google.rpc.Code.FAILED_PRECONDITION`. + * + * The async variant is + * {@see ReservationServiceClient::mergeCapacityCommitmentsAsync()} . + * + * @example samples/V1/ReservationServiceClient/merge_capacity_commitments.php + * + * @param MergeCapacityCommitmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CapacityCommitment + * + * @throws ApiException Thrown if the API call fails. + */ + public function mergeCapacityCommitments(MergeCapacityCommitmentsRequest $request, array $callOptions = []): CapacityCommitment + { + return $this->startApiCall('MergeCapacityCommitments', $request, $callOptions)->wait(); + } + + /** + * Moves an assignment under a new reservation. + * + * This differs from removing an existing assignment and recreating a new one + * by providing a transactional change that ensures an assignee always has an + * associated reservation. + * + * The async variant is {@see ReservationServiceClient::moveAssignmentAsync()} . + * + * @example samples/V1/ReservationServiceClient/move_assignment.php + * + * @param MoveAssignmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Assignment + * + * @throws ApiException Thrown if the API call fails. + */ + public function moveAssignment(MoveAssignmentRequest $request, array $callOptions = []): Assignment + { + return $this->startApiCall('MoveAssignment', $request, $callOptions)->wait(); + } + + /** + * Looks up assignments for a specified resource for a particular region. + * If the request is about a project: + * + * 1. Assignments created on the project will be returned if they exist. + * 2. Otherwise assignments created on the closest ancestor will be + * returned. + * 3. Assignments for different JobTypes will all be returned. + * + * The same logic applies if the request is about a folder. + * + * If the request is about an organization, then assignments created on the + * organization will be returned (organization doesn't have ancestors). + * + * Comparing to ListAssignments, there are some behavior + * differences: + * + * 1. permission on the assignee will be verified in this API. + * 2. Hierarchy lookup (project->folder->organization) happens in this API. + * 3. Parent here is `projects/*/locations/*`, instead of + * `projects/*/locations/*reservations/*`. + * + * The async variant is + * {@see ReservationServiceClient::searchAllAssignmentsAsync()} . + * + * @example samples/V1/ReservationServiceClient/search_all_assignments.php + * + * @param SearchAllAssignmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 searchAllAssignments(SearchAllAssignmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchAllAssignments', $request, $callOptions); + } + + /** + * Deprecated: Looks up assignments for a specified resource for a particular + * region. If the request is about a project: + * + * 1. Assignments created on the project will be returned if they exist. + * 2. Otherwise assignments created on the closest ancestor will be + * returned. + * 3. Assignments for different JobTypes will all be returned. + * + * The same logic applies if the request is about a folder. + * + * If the request is about an organization, then assignments created on the + * organization will be returned (organization doesn't have ancestors). + * + * Comparing to ListAssignments, there are some behavior + * differences: + * + * 1. permission on the assignee will be verified in this API. + * 2. Hierarchy lookup (project->folder->organization) happens in this API. + * 3. Parent here is `projects/*/locations/*`, instead of + * `projects/*/locations/*reservations/*`. + * + * **Note** "-" cannot be used for projects + * nor locations. + * + * The async variant is {@see ReservationServiceClient::searchAssignmentsAsync()} . + * + * @example samples/V1/ReservationServiceClient/search_assignments.php + * + * @param SearchAssignmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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. + * + * @deprecated This method will be removed in the next major version update. + */ + public function searchAssignments(SearchAssignmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchAssignments', $request, $callOptions); + } + + /** + * Splits capacity commitment to two commitments of the same plan and + * `commitment_end_time`. + * + * A common use case is to enable downgrading commitments. + * + * For example, in order to downgrade from 10000 slots to 8000, you might + * split a 10000 capacity commitment into commitments of 2000 and 8000. Then, + * you delete the first one after the commitment end time passes. + * + * The async variant is + * {@see ReservationServiceClient::splitCapacityCommitmentAsync()} . + * + * @example samples/V1/ReservationServiceClient/split_capacity_commitment.php + * + * @param SplitCapacityCommitmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SplitCapacityCommitmentResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function splitCapacityCommitment(SplitCapacityCommitmentRequest $request, array $callOptions = []): SplitCapacityCommitmentResponse + { + return $this->startApiCall('SplitCapacityCommitment', $request, $callOptions)->wait(); + } + + /** + * Updates an existing assignment. + * + * Only the `priority` field can be updated. + * + * The async variant is {@see ReservationServiceClient::updateAssignmentAsync()} . + * + * @example samples/V1/ReservationServiceClient/update_assignment.php + * + * @param UpdateAssignmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Assignment + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAssignment(UpdateAssignmentRequest $request, array $callOptions = []): Assignment + { + return $this->startApiCall('UpdateAssignment', $request, $callOptions)->wait(); + } + + /** + * Updates a BI reservation. + * + * Only fields specified in the `field_mask` are updated. + * + * A singleton BI reservation always exists with default size 0. + * In order to reserve BI capacity it needs to be updated to an amount + * greater than 0. In order to release BI capacity reservation size + * must be set to 0. + * + * The async variant is {@see ReservationServiceClient::updateBiReservationAsync()} + * . + * + * @example samples/V1/ReservationServiceClient/update_bi_reservation.php + * + * @param UpdateBiReservationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BiReservation + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBiReservation(UpdateBiReservationRequest $request, array $callOptions = []): BiReservation + { + return $this->startApiCall('UpdateBiReservation', $request, $callOptions)->wait(); + } + + /** + * Updates an existing capacity commitment. + * + * Only `plan` and `renewal_plan` fields can be updated. + * + * Plan can only be changed to a plan of a longer commitment period. + * Attempting to change to a plan with shorter commitment period will fail + * with the error code `google.rpc.Code.FAILED_PRECONDITION`. + * + * The async variant is + * {@see ReservationServiceClient::updateCapacityCommitmentAsync()} . + * + * @example samples/V1/ReservationServiceClient/update_capacity_commitment.php + * + * @param UpdateCapacityCommitmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CapacityCommitment + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCapacityCommitment(UpdateCapacityCommitmentRequest $request, array $callOptions = []): CapacityCommitment + { + return $this->startApiCall('UpdateCapacityCommitment', $request, $callOptions)->wait(); + } + + /** + * Updates an existing reservation resource. + * + * The async variant is {@see ReservationServiceClient::updateReservationAsync()} . + * + * @example samples/V1/ReservationServiceClient/update_reservation.php + * + * @param UpdateReservationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Reservation + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateReservation(UpdateReservationRequest $request, array $callOptions = []): Reservation + { + return $this->startApiCall('UpdateReservation', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..13f6c3398442 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json @@ -0,0 +1,123 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.reservation.v1", + "libraryPackage": "Google\\Cloud\\BigQuery\\Reservation\\V1", + "services": { + "ReservationService": { + "clients": { + "grpc": { + "libraryClient": "ReservationServiceGapicClient", + "rpcs": { + "CreateAssignment": { + "methods": [ + "createAssignment" + ] + }, + "CreateCapacityCommitment": { + "methods": [ + "createCapacityCommitment" + ] + }, + "CreateReservation": { + "methods": [ + "createReservation" + ] + }, + "DeleteAssignment": { + "methods": [ + "deleteAssignment" + ] + }, + "DeleteCapacityCommitment": { + "methods": [ + "deleteCapacityCommitment" + ] + }, + "DeleteReservation": { + "methods": [ + "deleteReservation" + ] + }, + "GetBiReservation": { + "methods": [ + "getBiReservation" + ] + }, + "GetCapacityCommitment": { + "methods": [ + "getCapacityCommitment" + ] + }, + "GetReservation": { + "methods": [ + "getReservation" + ] + }, + "ListAssignments": { + "methods": [ + "listAssignments" + ] + }, + "ListCapacityCommitments": { + "methods": [ + "listCapacityCommitments" + ] + }, + "ListReservations": { + "methods": [ + "listReservations" + ] + }, + "MergeCapacityCommitments": { + "methods": [ + "mergeCapacityCommitments" + ] + }, + "MoveAssignment": { + "methods": [ + "moveAssignment" + ] + }, + "SearchAllAssignments": { + "methods": [ + "searchAllAssignments" + ] + }, + "SearchAssignments": { + "methods": [ + "searchAssignments" + ] + }, + "SplitCapacityCommitment": { + "methods": [ + "splitCapacityCommitment" + ] + }, + "UpdateAssignment": { + "methods": [ + "updateAssignment" + ] + }, + "UpdateBiReservation": { + "methods": [ + "updateBiReservation" + ] + }, + "UpdateCapacityCommitment": { + "methods": [ + "updateCapacityCommitment" + ] + }, + "UpdateReservation": { + "methods": [ + "updateReservation" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json new file mode 100644 index 000000000000..84c5b772f6f0 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json @@ -0,0 +1,150 @@ +{ + "interfaces": { + "google.cloud.bigquery.reservation.v1.ReservationService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + } + }, + "methods": { + "CreateAssignment": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCapacityCommitment": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateReservation": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAssignment": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteCapacityCommitment": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteReservation": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetBiReservation": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCapacityCommitment": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetReservation": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAssignments": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCapacityCommitments": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListReservations": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "MergeCapacityCommitments": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "MoveAssignment": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SearchAllAssignments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SearchAssignments": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SplitCapacityCommitment": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateBiReservation": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateCapacityCommitment": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateReservation": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php new file mode 100644 index 000000000000..64ce8be98798 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php @@ -0,0 +1,331 @@ + [ + 'google.cloud.bigquery.reservation.v1.ReservationService' => [ + 'CreateAssignment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Assignment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCapacityCommitment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReservation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAssignment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCapacityCommitment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReservation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBiReservation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\BiReservation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCapacityCommitment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReservation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAssignments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAssignments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ListAssignmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCapacityCommitments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCapacityCommitments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ListCapacityCommitmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReservations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReservations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ListReservationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'MergeCapacityCommitments' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'MoveAssignment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Assignment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SearchAllAssignments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAssignments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\SearchAllAssignmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchAssignments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAssignments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\SearchAssignmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SplitCapacityCommitment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\SplitCapacityCommitmentResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAssignment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Assignment', + 'headerParams' => [ + [ + 'keyName' => 'assignment.name', + 'fieldAccessors' => [ + 'getAssignment', + 'getName', + ], + ], + ], + ], + 'UpdateBiReservation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\BiReservation', + 'headerParams' => [ + [ + 'keyName' => 'bi_reservation.name', + 'fieldAccessors' => [ + 'getBiReservation', + 'getName', + ], + ], + ], + ], + 'UpdateCapacityCommitment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment', + 'headerParams' => [ + [ + 'keyName' => 'capacity_commitment.name', + 'fieldAccessors' => [ + 'getCapacityCommitment', + 'getName', + ], + ], + ], + ], + 'UpdateReservation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', + 'headerParams' => [ + [ + 'keyName' => 'reservation.name', + 'fieldAccessors' => [ + 'getReservation', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'assignment' => 'projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}', + 'biReservation' => 'projects/{project}/locations/{location}/biReservation', + 'capacityCommitment' => 'projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}', + 'location' => 'projects/{project}/locations/{location}', + 'reservation' => 'projects/{project}/locations/{location}/reservations/{reservation}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php new file mode 100644 index 000000000000..f9074a563915 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php @@ -0,0 +1,274 @@ + [ + 'google.cloud.bigquery.reservation.v1.ReservationService' => [ + 'CreateAssignment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reservations/*}/assignments', + 'body' => 'assignment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCapacityCommitment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/capacityCommitments', + 'body' => 'capacity_commitment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReservation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reservations', + 'body' => 'reservation', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAssignment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*/assignments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCapacityCommitment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/capacityCommitments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReservation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBiReservation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/biReservation}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCapacityCommitment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/capacityCommitments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReservation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAssignments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reservations/*}/assignments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCapacityCommitments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/capacityCommitments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListReservations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reservations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'MergeCapacityCommitments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/capacityCommitments:merge', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'MoveAssignment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SearchAllAssignments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:searchAllAssignments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchAssignments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:searchAssignments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SplitCapacityCommitment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/capacityCommitments/*}:split', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAssignment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}', + 'body' => 'assignment', + 'placeholders' => [ + 'assignment.name' => [ + 'getters' => [ + 'getAssignment', + 'getName', + ], + ], + ], + ], + 'UpdateBiReservation' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{bi_reservation.name=projects/*/locations/*/biReservation}', + 'body' => 'bi_reservation', + 'placeholders' => [ + 'bi_reservation.name' => [ + 'getters' => [ + 'getBiReservation', + 'getName', + ], + ], + ], + ], + 'UpdateCapacityCommitment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{capacity_commitment.name=projects/*/locations/*/capacityCommitments/*}', + 'body' => 'capacity_commitment', + 'placeholders' => [ + 'capacity_commitment.name' => [ + 'getters' => [ + 'getCapacityCommitment', + 'getName', + ], + ], + ], + ], + 'UpdateReservation' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{reservation.name=projects/*/locations/*/reservations/*}', + 'body' => 'reservation', + 'placeholders' => [ + 'reservation.name' => [ + 'getters' => [ + 'getReservation', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php b/owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php new file mode 100644 index 000000000000..a421c4e18cf0 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php @@ -0,0 +1,1506 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ReservationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ReservationServiceClient($options); + } + + /** @test */ + public function createAssignmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $assignee = 'assignee-369881649'; + $expectedResponse = new Assignment(); + $expectedResponse->setName($name); + $expectedResponse->setAssignee($assignee); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new CreateAssignmentRequest()) + ->setParent($formattedParent); + $response = $gapicClient->createAssignment($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.bigquery.reservation.v1.ReservationService/CreateAssignment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAssignmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new CreateAssignmentRequest()) + ->setParent($formattedParent); + try { + $gapicClient->createAssignment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCapacityCommitmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $slotCount = 191518834; + $multiRegionAuxiliary = false; + $expectedResponse = new CapacityCommitment(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCount($slotCount); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new CreateCapacityCommitmentRequest()) + ->setParent($formattedParent); + $response = $gapicClient->createCapacityCommitment($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.bigquery.reservation.v1.ReservationService/CreateCapacityCommitment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCapacityCommitmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 CreateCapacityCommitmentRequest()) + ->setParent($formattedParent); + try { + $gapicClient->createCapacityCommitment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReservationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $slotCapacity = 1516717605; + $ignoreIdleSlots = false; + $concurrency = 1476186003; + $multiRegionAuxiliary = false; + $expectedResponse = new Reservation(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCapacity($slotCapacity); + $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); + $expectedResponse->setConcurrency($concurrency); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new CreateReservationRequest()) + ->setParent($formattedParent); + $response = $gapicClient->createReservation($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.bigquery.reservation.v1.ReservationService/CreateReservation', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReservationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 CreateReservationRequest()) + ->setParent($formattedParent); + try { + $gapicClient->createReservation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAssignmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assignmentName('[PROJECT]', '[LOCATION]', '[RESERVATION]', '[ASSIGNMENT]'); + $request = (new DeleteAssignmentRequest()) + ->setName($formattedName); + $gapicClient->deleteAssignment($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/DeleteAssignment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAssignmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->assignmentName('[PROJECT]', '[LOCATION]', '[RESERVATION]', '[ASSIGNMENT]'); + $request = (new DeleteAssignmentRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAssignment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCapacityCommitmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); + $request = (new DeleteCapacityCommitmentRequest()) + ->setName($formattedName); + $gapicClient->deleteCapacityCommitment($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/DeleteCapacityCommitment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCapacityCommitmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); + $request = (new DeleteCapacityCommitmentRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteCapacityCommitment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReservationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new DeleteReservationRequest()) + ->setName($formattedName); + $gapicClient->deleteReservation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/DeleteReservation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReservationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new DeleteReservationRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteReservation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBiReservationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $size = 3530753; + $expectedResponse = new BiReservation(); + $expectedResponse->setName($name2); + $expectedResponse->setSize($size); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->biReservationName('[PROJECT]', '[LOCATION]'); + $request = (new GetBiReservationRequest()) + ->setName($formattedName); + $response = $gapicClient->getBiReservation($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.bigquery.reservation.v1.ReservationService/GetBiReservation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBiReservationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->biReservationName('[PROJECT]', '[LOCATION]'); + $request = (new GetBiReservationRequest()) + ->setName($formattedName); + try { + $gapicClient->getBiReservation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCapacityCommitmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $slotCount = 191518834; + $multiRegionAuxiliary = false; + $expectedResponse = new CapacityCommitment(); + $expectedResponse->setName($name2); + $expectedResponse->setSlotCount($slotCount); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); + $request = (new GetCapacityCommitmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getCapacityCommitment($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.bigquery.reservation.v1.ReservationService/GetCapacityCommitment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCapacityCommitmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); + $request = (new GetCapacityCommitmentRequest()) + ->setName($formattedName); + try { + $gapicClient->getCapacityCommitment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReservationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $slotCapacity = 1516717605; + $ignoreIdleSlots = false; + $concurrency = 1476186003; + $multiRegionAuxiliary = false; + $expectedResponse = new Reservation(); + $expectedResponse->setName($name2); + $expectedResponse->setSlotCapacity($slotCapacity); + $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); + $expectedResponse->setConcurrency($concurrency); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new GetReservationRequest()) + ->setName($formattedName); + $response = $gapicClient->getReservation($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.bigquery.reservation.v1.ReservationService/GetReservation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReservationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new GetReservationRequest()) + ->setName($formattedName); + try { + $gapicClient->getReservation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssignmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $assignmentsElement = new Assignment(); + $assignments = [ + $assignmentsElement, + ]; + $expectedResponse = new ListAssignmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAssignments($assignments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new ListAssignmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAssignments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAssignments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/ListAssignments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssignmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new ListAssignmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAssignments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCapacityCommitmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $capacityCommitmentsElement = new CapacityCommitment(); + $capacityCommitments = [ + $capacityCommitmentsElement, + ]; + $expectedResponse = new ListCapacityCommitmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCapacityCommitments($capacityCommitments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCapacityCommitmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCapacityCommitments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCapacityCommitments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/ListCapacityCommitments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCapacityCommitmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListCapacityCommitmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCapacityCommitments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReservationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $reservationsElement = new Reservation(); + $reservations = [ + $reservationsElement, + ]; + $expectedResponse = new ListReservationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReservations($reservations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListReservationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReservations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReservations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/ListReservations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReservationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListReservationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReservations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function mergeCapacityCommitmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $slotCount = 191518834; + $multiRegionAuxiliary = false; + $expectedResponse = new CapacityCommitment(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCount($slotCount); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $transport->addResponse($expectedResponse); + $request = new MergeCapacityCommitmentsRequest(); + $response = $gapicClient->mergeCapacityCommitments($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.bigquery.reservation.v1.ReservationService/MergeCapacityCommitments', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function mergeCapacityCommitmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 MergeCapacityCommitmentsRequest(); + try { + $gapicClient->mergeCapacityCommitments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function moveAssignmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $assignee = 'assignee-369881649'; + $expectedResponse = new Assignment(); + $expectedResponse->setName($name2); + $expectedResponse->setAssignee($assignee); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assignmentName('[PROJECT]', '[LOCATION]', '[RESERVATION]', '[ASSIGNMENT]'); + $request = (new MoveAssignmentRequest()) + ->setName($formattedName); + $response = $gapicClient->moveAssignment($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.bigquery.reservation.v1.ReservationService/MoveAssignment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function moveAssignmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->assignmentName('[PROJECT]', '[LOCATION]', '[RESERVATION]', '[ASSIGNMENT]'); + $request = (new MoveAssignmentRequest()) + ->setName($formattedName); + try { + $gapicClient->moveAssignment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchAllAssignmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $assignmentsElement = new Assignment(); + $assignments = [ + $assignmentsElement, + ]; + $expectedResponse = new SearchAllAssignmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAssignments($assignments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new SearchAllAssignmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->searchAllAssignments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAssignments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/SearchAllAssignments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchAllAssignmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 SearchAllAssignmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->searchAllAssignments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchAssignmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $assignmentsElement = new Assignment(); + $assignments = [ + $assignmentsElement, + ]; + $expectedResponse = new SearchAssignmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAssignments($assignments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new SearchAssignmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->searchAssignments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAssignments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/SearchAssignments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchAssignmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 SearchAssignmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->searchAssignments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function splitCapacityCommitmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SplitCapacityCommitmentResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); + $request = (new SplitCapacityCommitmentRequest()) + ->setName($formattedName); + $response = $gapicClient->splitCapacityCommitment($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.bigquery.reservation.v1.ReservationService/SplitCapacityCommitment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function splitCapacityCommitmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); + $request = (new SplitCapacityCommitmentRequest()) + ->setName($formattedName); + try { + $gapicClient->splitCapacityCommitment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAssignmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $assignee = 'assignee-369881649'; + $expectedResponse = new Assignment(); + $expectedResponse->setName($name); + $expectedResponse->setAssignee($assignee); + $transport->addResponse($expectedResponse); + $request = new UpdateAssignmentRequest(); + $response = $gapicClient->updateAssignment($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.bigquery.reservation.v1.ReservationService/UpdateAssignment', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAssignmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 UpdateAssignmentRequest(); + try { + $gapicClient->updateAssignment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBiReservationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $size = 3530753; + $expectedResponse = new BiReservation(); + $expectedResponse->setName($name); + $expectedResponse->setSize($size); + $transport->addResponse($expectedResponse); + $request = new UpdateBiReservationRequest(); + $response = $gapicClient->updateBiReservation($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.bigquery.reservation.v1.ReservationService/UpdateBiReservation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBiReservationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 UpdateBiReservationRequest(); + try { + $gapicClient->updateBiReservation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCapacityCommitmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $slotCount = 191518834; + $multiRegionAuxiliary = false; + $expectedResponse = new CapacityCommitment(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCount($slotCount); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $transport->addResponse($expectedResponse); + $request = new UpdateCapacityCommitmentRequest(); + $response = $gapicClient->updateCapacityCommitment($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.bigquery.reservation.v1.ReservationService/UpdateCapacityCommitment', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCapacityCommitmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 UpdateCapacityCommitmentRequest(); + try { + $gapicClient->updateCapacityCommitment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateReservationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $slotCapacity = 1516717605; + $ignoreIdleSlots = false; + $concurrency = 1476186003; + $multiRegionAuxiliary = false; + $expectedResponse = new Reservation(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCapacity($slotCapacity); + $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); + $expectedResponse->setConcurrency($concurrency); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $transport->addResponse($expectedResponse); + $request = new UpdateReservationRequest(); + $response = $gapicClient->updateReservation($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.bigquery.reservation.v1.ReservationService/UpdateReservation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateReservationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 UpdateReservationRequest(); + try { + $gapicClient->updateReservation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAssignmentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $assignee = 'assignee-369881649'; + $expectedResponse = new Assignment(); + $expectedResponse->setName($name); + $expectedResponse->setAssignee($assignee); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new CreateAssignmentRequest()) + ->setParent($formattedParent); + $response = $gapicClient->createAssignmentAsync($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.bigquery.reservation.v1.ReservationService/CreateAssignment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php new file mode 100644 index 000000000000..e94a47965444 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + ' +Ã +2google/cloud/bigquery/storage/v1/annotations.proto google.cloud.bigquery.storage.v1 google/protobuf/descriptor.protoBÀ +$com.google.cloud.bigquery.storage.v1BAnnotationsProtoPZ>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepbª Google.Cloud.BigQuery.Storage.V1Ê Google\\Cloud\\BigQuery\\Storage\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php new file mode 100644 index 0000000000000000000000000000000000000000..c40bcd2e29750c4d1abb1012d4f0eb81c3a0dbeb GIT binary patch literal 1165 zcmb7D-EPw`7$s#w%>1ZCLfgazrc_!d4Oa!OIy%(9jiRkB>)1sVsd5~*wUoxec7_Jp z3-Jg%0yjJX?}F{5VWO%Ky+|YHeCIp<&UfCtjps3V4v%R>1y(eG{uNYn3S+?)Cp?6H zGM!QZ317r4qyjXS5>LFz%yFC ztW~iP{4=t|07Q5}WsC`h$HUesRXD&3d⁣Ya0%)m2r5Zl*7BI9RNT=EG29jF7OpV z{fiSnWCTiumHsO;Ibjh~42SHCzE1;AaVV*-T*Xe4h$zM*XbJ`qp_M(DavE$o=KB5( zxKuSXBhlmVdXb_c!lBopk_Z-Sc|#4Y*Jo7agES|Vy{xUFV^dg3HP-7ZA{$VNgx>59 zp`a=e(Sg-%2(I%ttL()g%XBn@Aa8r5O{(NTQ??6!ZGip%amUTPMAl2R^b%!WqRU#T z0`6H0Mr2MG*xdn-Bo*1nC(<5nJJ6}zFTDpvi#(%*i=c%SnY&NH)(yC@Unai!loq*< z!KU_iLUI5 zedf*^d{Le8)y(0T>DXni#r{G5 z_N@TZq#>I$q?7i+q!ndJLl?ClONf`H(Ztb$ygZLOkp3N;=U2P=%I&9{d}Hy~F1internalAddGeneratedFile( + ' +· ++google/cloud/bigquery/storage/v1/avro.proto google.cloud.bigquery.storage.v1" + +AvroSchema +schema ( "A +AvroRows +serialized_binary_rows (  + row_count (B"A +AvroSerializationOptions% +enable_display_name_attribute (B¹ +$com.google.cloud.bigquery.storage.v1B AvroProtoPZ>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepbª Google.Cloud.BigQuery.Storage.V1Ê Google\\Cloud\\BigQuery\\Storage\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php new file mode 100644 index 000000000000..b136e094cddd --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' +® +/google/cloud/bigquery/storage/v1/protobuf.proto google.cloud.bigquery.storage.v1 google/protobuf/descriptor.proto"I + ProtoSchema: +proto_descriptor ( 2 .google.protobuf.DescriptorProto"$ + ProtoRows +serialized_rows ( B½ +$com.google.cloud.bigquery.storage.v1B ProtoBufProtoPZ>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepbª Google.Cloud.BigQuery.Storage.V1Ê Google\\Cloud\\BigQuery\\Storage\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php new file mode 100644 index 0000000000000000000000000000000000000000..b6dc4a5859a8ae18fcbcc9fa6638ee7200c7b512 GIT binary patch literal 8911 zcmc&)&2J-F5#P?&CgmjKd9$;V@$Swvy@NJ0ld*R^!|ZM{Uv0acm`&_pJDJ^)q1CZF zNwc=Q>26OpL^;3-1gBjj1c(blLP8vnxFT`mupE$<17gI10}_J20KtWNuixvmlX&ff zAaaS-uc}^Ey{cbTz3%&uoNWhQmlw^p=^DP-kT-T^f7_HD*Y@qY-IO;vo13O9*X@>L zHBC1u%ej(VELCMKSEzmtSv|Ys*3Ef&%eJ?gW~$z_JB`$awe_`*>F%aH-*$~HGxhAY z_?cv)0oq2(^c{! zIh~EBRhK>A@bTX@%hRp4w{7YLyY0=-AJ}vtq8DSfX_;;R zWITDxY&J6Hw(-oe-IKAFO&&M{E7>z9YO3qnJA-fk8G@d<_F2dgVR9C-D!ywPt+S9+ zH8z^&;DUq^wW@`g>KiTR6ueJd!*NXa1hH6l>X`3_-|4}_Qu5YAizlGkXoUHeM}(RU zGlb^L8}O3_NS+Lu2#2yHgR-Q6vLuJH#L?g`#rs%!yNdi5Vy(uyKZ4eHlC!mIJHq)7azG!bxJ!lrI8| z6I|iDhXgx3iuk&4zw6Yos?bmg7L>n9Fq6e}@y)VnG%BX&Ar6*JEJdDAvM}ZtE}qql zBuldsnLB?`hyJDBf}8A|#bLCJHr6Yb#|$2@m&Dqa!escWS@+2jOrrdT?gg@EhEP;2 zeT$R#4w+;`q0BJuOlBb7GCtG;Kk9Y6gNhBKv{9l!!f{Qkx~|#KTUNW9W`xox7M!CJ z%l3{Z?8`$eP>r1oH}W&X(oyC662t<$qLdzbYaGvT3w`TxPu=V9sfd6ix}9++9>TczO)kTE z!`D%$gGJ6n?-*`yrV_aX=b}qyyTSIAlwXWM{J>!WCwT-D1}2G)S>-X`$I>_Y>!%_M z_50EbWEBX@NmQn8yO`{TU*DdgClpJk2arVbxy)EIloKVMhY5Vf!(j{s4U_vYN`qW@ zaDZ5gc#tf@ba+@)j5#yP)JyeOulv-OAjX{K)wj)-G4mpmGS^=UbytP)(6}F7lE@cf zGVmG~HO@p0U>B?N-LhukWo+QEIi)d%>9VowV?oZVqk;<$B;^ zWD|0;3m9YRS48k5#<8g&iBrM7yX!`?W0DF0dmMmE00|ESL(k44c|?B-fxex?*$B}A zg>t;1h!rIAsf4mj;zBVXeGEubw;D4PaVE$fywe_OZKN=E6Mfvv-kZ9_1 z^nMCcbo^;IXt#m^&B0sk@8+Yz1T-)~hy}01D0Yap%L9rCnb;I3Y4_Ek4T=WS9S1K~ zurl)4r7h+_vCGhzN6A9~+Lf^VJnV01_7Bi0VVG!CMe@=ijHk#okywC9ZYHxSg0De> zeHOlE0LDcJsQgfZi;Jco!D>;HFzF)I`ZS=A_5PVq1yYk>nK@1xw)JdoF7Z1&ZFwhY- zEu8)_n5H~d@kJoe4P)t~VCn4>ep$zYLHPc<84!16N>zQ`Ud57I3H1k>wGYh1q%Ok1SX?CB`Yvew;RDBPNyH8>_iYQ z*d;AHo-B%?BOnfSmcPruWrAFUDVF;>UIckK90wQ{*s z*0ZIYb_iK7z`3fLS=MyCNY?YEwPFt8^;MXuRLh#WqN~gJFZVujuB;TQRRrT9gpfF2 zJ>VI}dGA7@h)`b0>3p^N{;C!q!5Q_XLkktecr88}5tJ_!k@G2vA0slnTFEYHE2@qK zVnwZHmvrsDYFX8>7A)r~@fUIGyjaTTD_S*FPkXOWsaE3SR13aTTC3`%yk1s|i&~ue z?R<7cdzYEHS}v^@a<~~#Q9?Pk94^J^5__Z-v*q_!Sy5tMj89Tw@2*tzidJ4PWVv(W zQJVrj=hwFdky?6pYgT|3jAO!O1}+Xr;!^sfF__F)TVJB@59ka-{w|>#ank6z)gkl! zRX)PRb2~A>bit;l;F3qNo~ze_tD`woBfR{XJA8lh%|HD022 zrqW9!FLfhDUv}UX3;oH~@W=kVbc6h!9vQ#bAp=w!K`Sg9psze&3D8A(`dlS}whZ0p zg4-Wv%p>w3Vhmf3TG6!Y!9;*&@Eb8|QBWnQNpDKzw-TH?G~JT7`=8w*7Gd8zr{Lsf zK4ccXP3|#^Xj^b1Qxbchs8>FFTKrUfvhDkhH=j!F?Cfw&!*SQ>_}k%&vAKSPteD<% znufn=yRG!EV=yI>f>llO$1p1*Rdn#Ih%gD?4v-ZQF6GH{^#ad|oyY*syu6^?WL^%| zqkcX%@VjmR$fpv(LH|qc^gr?gYGKRWlQHoSS$nQ_slse|tSm5FqDJ=bX2ljIlq9o`&-T_qWy zMufz|gaMK;!t*~(r^GL%0g(7RQa^+hSl$uGo>$2H+*NlHw4#k*yBC^C3f|VRH&I)5SVS;EgRd*F#vFWL;cP7M=g!8@hvY@}MMW}8zo7JheuA71=JUF&y~dpGQF_V};;gFa`E1I)hYclKD{ ov%fKhw7z}kjqttgT<{%4n3Uh@d;P4}E5+af>MF!ha(q}}iA+1+pV?4xh}LmzIc+r%Y- z$w*6W9;@t-sD9uv&+;6#*=x5+pjuwnw;d8_s+upWd*!-X$d~FjP?dVUz#zVsUJf&OPJX*nc3JDAdMUc zX=Fo?Mooe=_SZK7EXSl&tqCxA4J!WpUemEHl`@mz-z}ROwrexnbnKt;M32?B=}>~I zr)Aqc*J8Hks$8M$T4eREDlxh2E#E^AJXQy0Rk%~oA&rvDNZ^`IBTuLm*go1nwuRpSh&>Au}4+QeyP z$)R~}{*|Iu}7mwZ@cykTze-KTSkX4#sl{R3N7P3k^T2Fo+0-C;^ z4#E&hjwSDn-OJ>03Z=guFO9*N7@Bd9htgk$(1QBNpEMh|RSKm3T7Ys2j}N=2c=ab}erh?{tNgIb5AYbIvI?i1kXs8ka=!k(QA%6G6Jygq=M z6;Subnd&kM3DLHZM5_s{YzLG=85zUrUuopfTslul;^M{w2ZFTvfDNZ zXyTGE;?Z~`B0SV215m}(~vqT>mMFd+d`!_ zlG~uzT@p(p1rx;u{e_W6y{ifEzhu9iOcv}q;@QsgT;4!sjS0g>Y6@1 z^q5R{PK5WSd-AtgSQaP|$0^rfi4uoc{J0otr$v!c)2s9R1Gf+h1`BM_0R^Mxl@44F z(~|_EfnrPb++jR9f#MsRr4sMiQKJF_Bd}v0q~`<(C*F(G@;sEWxOCeSF|`2-huQ33e@R9E>+cq?=Tg z?1;odtA-ooM))}nFYTB@J5nzoah?>W?pM`9ty12r6^vYYw}KC~Qh5*8`9jWkx>u_d za;0LakYB!_q~MG9$Ub@gaCs_w8*X|%=J!}w8x0!u;vf*&tDqRC9GG2!>pXYPaaiWZ zxB4Nh4XV(fS)C|G5oakG>A_(|G{3B6B(v7ljZ3|#@sZp-OwY*-} zjbgdFtJhDMI|noRezlB;pNCn!S}h+ePpy?;DPq;WO{aEgUbk{q;8kkw!Rz@)=YJHHJedPNB_<7!&3_ ZxHG)p-;>i@WY{}*&=Zn!9P2|L;6I+MB4+>q literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php new file mode 100644 index 0000000000000000000000000000000000000000..ee9b8d1dd02fe8f4421bea32f096c12b83358010 GIT binary patch literal 1875 zcmbtV-EQMV6vj!KHYdAfunr6P-HVowrFj&1C5 zwFUKscmy7Sr`Stg0*M*haaJuWv?Vv0Idjf;eto|0e+bthe1ZGarx9V)!HZkW))a?P zzydq)@FH0*X@u=y6S^La6pVXgJQ|x=>*?m_+%yi7$fj+)3WAkKTecS@PHW+=eo1I_ z+lpBbkri#-oU|BOcvMM&0erHdaY$^6`-VECj5vf5tDj<6U4db#IfgaOFs!SSGXUEo zag0rY1-}92zc5*Nu8m_x82>wVKP~IHD|x{IfJ}0dQBGtbeIlCv>d~mwJv$*W|_xqIP?i)ea<0>Z_M- zo26X?SXt3z{|7`Hl8wo1HoBS~!u4_Y^ z&qh;2>*^P})x#xr%Gp>nP=>zb${RMcxzo1#7W z04nNuJU~_XDb!4Ts7=kz&_Mg*q1Q1rbRbUR0oCLua3Eyq4TM2o8}}z2T3ucT|h+)p~!GJ?%mIj z1B_;aK}RGb3Al-NInyUR`%-o@G#*(GmDN8aIOYWLpRH9P{YukCYDho5%$CIVdk;3P zRq&8GNa%9%$QMYsI4e%SmvF`xO3D`s=Zj0hIZDnK%GJrATNNwk6hSJfl2xz@rp572EGcwvXRh-|t-Asb;od@8AyLAAN#2@&Et; literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php new file mode 100644 index 000000000000..0b1e665e3d46 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php @@ -0,0 +1,547 @@ +google.cloud.bigquery.storage.v1.AppendRowsRequest + */ +class AppendRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * * In the first request to an AppendRows connection. + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * For explicitly created write streams, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * For the special default stream, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * * r1: {write_stream: stream_name_1} + * * r2: {write_stream: /*omit*/} + * * r3: {write_stream: /*omit*/} + * * r4: {write_stream: stream_name_2} + * * r5: {write_stream: stream_name_2} + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $write_stream = ''; + /** + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + */ + protected $offset = null; + /** + * Id set by client to annotate its identity. Only initial request setting is + * respected. + * + * Generated from protobuf field string trace_id = 6; + */ + protected $trace_id = ''; + /** + * A map to indicate how to interpret missing value for some fields. Missing + * values are fields present in user schema but missing in rows. The key is + * the field name. The value is the interpretation of missing values for the + * field. + * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + * missing values in field foo are interpreted as NULL, all missing values in + * field bar are interpreted as the default value of field bar in table + * schema. + * If a field is not in this map and has missing values, the missing values + * in this field are interpreted as NULL. + * This field only applies to the current request, it won't affect other + * requests on the connection. + * Currently, field name can only be top-level column name, can't be a struct + * field path like 'foo.bar'. + * + * Generated from protobuf field map missing_value_interpretations = 7; + */ + private $missing_value_interpretations; + /** + * Optional. Default missing value interpretation for all columns in the + * table. When a value is specified on an `AppendRowsRequest`, it is applied + * to all requests on the connection from that point forward, until a + * subsequent `AppendRowsRequest` sets it to a different value. + * `missing_value_interpretation` can override + * `default_missing_value_interpretation`. For example, if you want to write + * `NULL` instead of using default values for some columns, you can set + * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_missing_value_interpretation = 0; + protected $rows; + + /** + * @param string $writeStream Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * + * * In the first request to an AppendRows connection. + * + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * + * For explicitly created write streams, the format is: + * + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * + * For the special default stream, the format is: + * + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * + * * r1: {write_stream: stream_name_1} + * + * * r2: {write_stream: /*omit*/} + * + * * r3: {write_stream: /*omit*/} + * + * * r4: {write_stream: stream_name_2} + * + * * r5: {write_stream: stream_name_2} + * + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. Please see + * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest + * + * @experimental + */ + public static function build(string $writeStream): self + { + return (new self()) + ->setWriteStream($writeStream); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $write_stream + * Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * * In the first request to an AppendRows connection. + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * For explicitly created write streams, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * For the special default stream, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * * r1: {write_stream: stream_name_1} + * * r2: {write_stream: /*omit*/} + * * r3: {write_stream: /*omit*/} + * * r4: {write_stream: stream_name_2} + * * r5: {write_stream: stream_name_2} + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. + * @type \Google\Protobuf\Int64Value $offset + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData $proto_rows + * Rows in proto format. + * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData $arrow_rows + * Rows in arrow format. This is an experimental feature only selected for + * allowlisted customers. + * @type string $trace_id + * Id set by client to annotate its identity. Only initial request setting is + * respected. + * @type array|\Google\Protobuf\Internal\MapField $missing_value_interpretations + * A map to indicate how to interpret missing value for some fields. Missing + * values are fields present in user schema but missing in rows. The key is + * the field name. The value is the interpretation of missing values for the + * field. + * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + * missing values in field foo are interpreted as NULL, all missing values in + * field bar are interpreted as the default value of field bar in table + * schema. + * If a field is not in this map and has missing values, the missing values + * in this field are interpreted as NULL. + * This field only applies to the current request, it won't affect other + * requests on the connection. + * Currently, field name can only be top-level column name, can't be a struct + * field path like 'foo.bar'. + * @type int $default_missing_value_interpretation + * Optional. Default missing value interpretation for all columns in the + * table. When a value is specified on an `AppendRowsRequest`, it is applied + * to all requests on the connection from that point forward, until a + * subsequent `AppendRowsRequest` sets it to a different value. + * `missing_value_interpretation` can override + * `default_missing_value_interpretation`. For example, if you want to write + * `NULL` instead of using default values for some columns, you can set + * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * * In the first request to an AppendRows connection. + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * For explicitly created write streams, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * For the special default stream, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * * r1: {write_stream: stream_name_1} + * * r2: {write_stream: /*omit*/} + * * r3: {write_stream: /*omit*/} + * * r4: {write_stream: stream_name_2} + * * r5: {write_stream: stream_name_2} + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getWriteStream() + { + return $this->write_stream; + } + + /** + * Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * * In the first request to an AppendRows connection. + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * For explicitly created write streams, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * For the special default stream, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * * r1: {write_stream: stream_name_1} + * * r2: {write_stream: /*omit*/} + * * r3: {write_stream: /*omit*/} + * * r4: {write_stream: stream_name_2} + * * r5: {write_stream: stream_name_2} + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setWriteStream($var) + { + GPBUtil::checkString($var, True); + $this->write_stream = $var; + + return $this; + } + + /** + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getOffset() + { + return $this->offset; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * Returns the unboxed value from getOffset() + + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @return int|string|null + */ + public function getOffsetUnwrapped() + { + return $this->readWrapperValue("offset"); + } + + /** + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->offset = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @param int|string|null $var + * @return $this + */ + public function setOffsetUnwrapped($var) + { + $this->writeWrapperValue("offset", $var); + return $this;} + + /** + * Rows in proto format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4; + * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData|null + */ + public function getProtoRows() + { + return $this->readOneof(4); + } + + public function hasProtoRows() + { + return $this->hasOneof(4); + } + + /** + * Rows in proto format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4; + * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData $var + * @return $this + */ + public function setProtoRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Rows in arrow format. This is an experimental feature only selected for + * allowlisted customers. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData|null + */ + public function getArrowRows() + { + return $this->readOneof(5); + } + + public function hasArrowRows() + { + return $this->hasOneof(5); + } + + /** + * Rows in arrow format. This is an experimental feature only selected for + * allowlisted customers. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData $var + * @return $this + */ + public function setArrowRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Id set by client to annotate its identity. Only initial request setting is + * respected. + * + * Generated from protobuf field string trace_id = 6; + * @return string + */ + public function getTraceId() + { + return $this->trace_id; + } + + /** + * Id set by client to annotate its identity. Only initial request setting is + * respected. + * + * Generated from protobuf field string trace_id = 6; + * @param string $var + * @return $this + */ + public function setTraceId($var) + { + GPBUtil::checkString($var, True); + $this->trace_id = $var; + + return $this; + } + + /** + * A map to indicate how to interpret missing value for some fields. Missing + * values are fields present in user schema but missing in rows. The key is + * the field name. The value is the interpretation of missing values for the + * field. + * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + * missing values in field foo are interpreted as NULL, all missing values in + * field bar are interpreted as the default value of field bar in table + * schema. + * If a field is not in this map and has missing values, the missing values + * in this field are interpreted as NULL. + * This field only applies to the current request, it won't affect other + * requests on the connection. + * Currently, field name can only be top-level column name, can't be a struct + * field path like 'foo.bar'. + * + * Generated from protobuf field map missing_value_interpretations = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMissingValueInterpretations() + { + return $this->missing_value_interpretations; + } + + /** + * A map to indicate how to interpret missing value for some fields. Missing + * values are fields present in user schema but missing in rows. The key is + * the field name. The value is the interpretation of missing values for the + * field. + * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + * missing values in field foo are interpreted as NULL, all missing values in + * field bar are interpreted as the default value of field bar in table + * schema. + * If a field is not in this map and has missing values, the missing values + * in this field are interpreted as NULL. + * This field only applies to the current request, it won't affect other + * requests on the connection. + * Currently, field name can only be top-level column name, can't be a struct + * field path like 'foo.bar'. + * + * Generated from protobuf field map missing_value_interpretations = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMissingValueInterpretations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\MissingValueInterpretation::class); + $this->missing_value_interpretations = $arr; + + return $this; + } + + /** + * Optional. Default missing value interpretation for all columns in the + * table. When a value is specified on an `AppendRowsRequest`, it is applied + * to all requests on the connection from that point forward, until a + * subsequent `AppendRowsRequest` sets it to a different value. + * `missing_value_interpretation` can override + * `default_missing_value_interpretation`. For example, if you want to write + * `NULL` instead of using default values for some columns, you can set + * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDefaultMissingValueInterpretation() + { + return $this->default_missing_value_interpretation; + } + + /** + * Optional. Default missing value interpretation for all columns in the + * table. When a value is specified on an `AppendRowsRequest`, it is applied + * to all requests on the connection from that point forward, until a + * subsequent `AppendRowsRequest` sets it to a different value. + * `missing_value_interpretation` can override + * `default_missing_value_interpretation`. For example, if you want to write + * `NULL` instead of using default values for some columns, you can set + * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDefaultMissingValueInterpretation($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\MissingValueInterpretation::class); + $this->default_missing_value_interpretation = $var; + + return $this; + } + + /** + * @return string + */ + public function getRows() + { + return $this->whichOneof("rows"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php new file mode 100644 index 000000000000..111dfc08c23d --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php @@ -0,0 +1,126 @@ +google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + */ +class ArrowData extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Arrow Schema used to serialize the data. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + protected $writer_schema = null; + /** + * Required. Serialized row data in Arrow format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + protected $rows = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $writer_schema + * Optional. Arrow Schema used to serialize the data. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $rows + * Required. Serialized row data in Arrow format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Arrow Schema used to serialize the data. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null + */ + public function getWriterSchema() + { + return $this->writer_schema; + } + + public function hasWriterSchema() + { + return isset($this->writer_schema); + } + + public function clearWriterSchema() + { + unset($this->writer_schema); + } + + /** + * Optional. Arrow Schema used to serialize the data. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var + * @return $this + */ + public function setWriterSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); + $this->writer_schema = $var; + + return $this; + } + + /** + * Required. Serialized row data in Arrow format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch|null + */ + public function getRows() + { + return $this->rows; + } + + public function hasRows() + { + return isset($this->rows); + } + + public function clearRows() + { + unset($this->rows); + } + + /** + * Required. Serialized row data in Arrow format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $var + * @return $this + */ + public function setRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch::class); + $this->rows = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ArrowData::class, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest_ArrowData::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php new file mode 100644 index 000000000000..f5b70f6fd729 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php @@ -0,0 +1,68 @@ +google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation + */ +class MissingValueInterpretation +{ + /** + * Invalid missing value interpretation. Requests with this value will be + * rejected. + * + * Generated from protobuf enum MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0; + */ + const MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0; + /** + * Missing value is interpreted as NULL. + * + * Generated from protobuf enum NULL_VALUE = 1; + */ + const NULL_VALUE = 1; + /** + * Missing value is interpreted as column default value if declared in the + * table schema, NULL otherwise. + * + * Generated from protobuf enum DEFAULT_VALUE = 2; + */ + const DEFAULT_VALUE = 2; + + private static $valueToName = [ + self::MISSING_VALUE_INTERPRETATION_UNSPECIFIED => 'MISSING_VALUE_INTERPRETATION_UNSPECIFIED', + self::NULL_VALUE => 'NULL_VALUE', + self::DEFAULT_VALUE => 'DEFAULT_VALUE', + ]; + + 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(MissingValueInterpretation::class, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest_MissingValueInterpretation::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php new file mode 100644 index 000000000000..d9dd9af3d1a5 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php @@ -0,0 +1,153 @@ +google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData + */ +class ProtoData extends \Google\Protobuf\Internal\Message +{ + /** + * The protocol buffer schema used to serialize the data. Provide this value + * whenever: + * * You send the first request of an RPC connection. + * * You change the input schema. + * * You specify a new destination table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; + */ + protected $writer_schema = null; + /** + * Serialized row data in protobuf message format. + * Currently, the backend expects the serialized rows to adhere to + * proto2 semantics when appending rows, particularly with respect to + * how default values are encoded. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; + */ + protected $rows = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\ProtoSchema $writer_schema + * The protocol buffer schema used to serialize the data. Provide this value + * whenever: + * * You send the first request of an RPC connection. + * * You change the input schema. + * * You specify a new destination table. + * @type \Google\Cloud\BigQuery\Storage\V1\ProtoRows $rows + * Serialized row data in protobuf message format. + * Currently, the backend expects the serialized rows to adhere to + * proto2 semantics when appending rows, particularly with respect to + * how default values are encoded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * The protocol buffer schema used to serialize the data. Provide this value + * whenever: + * * You send the first request of an RPC connection. + * * You change the input schema. + * * You specify a new destination table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; + * @return \Google\Cloud\BigQuery\Storage\V1\ProtoSchema|null + */ + public function getWriterSchema() + { + return $this->writer_schema; + } + + public function hasWriterSchema() + { + return isset($this->writer_schema); + } + + public function clearWriterSchema() + { + unset($this->writer_schema); + } + + /** + * The protocol buffer schema used to serialize the data. Provide this value + * whenever: + * * You send the first request of an RPC connection. + * * You change the input schema. + * * You specify a new destination table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; + * @param \Google\Cloud\BigQuery\Storage\V1\ProtoSchema $var + * @return $this + */ + public function setWriterSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ProtoSchema::class); + $this->writer_schema = $var; + + return $this; + } + + /** + * Serialized row data in protobuf message format. + * Currently, the backend expects the serialized rows to adhere to + * proto2 semantics when appending rows, particularly with respect to + * how default values are encoded. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\ProtoRows|null + */ + public function getRows() + { + return $this->rows; + } + + public function hasRows() + { + return isset($this->rows); + } + + public function clearRows() + { + unset($this->rows); + } + + /** + * Serialized row data in protobuf message format. + * Currently, the backend expects the serialized rows to adhere to + * proto2 semantics when appending rows, particularly with respect to + * how default values are encoded. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\ProtoRows $var + * @return $this + */ + public function setRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ProtoRows::class); + $this->rows = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProtoData::class, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest_ProtoData::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php new file mode 100644 index 000000000000..0b2fff4bf05a --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php @@ -0,0 +1,279 @@ +google.cloud.bigquery.storage.v1.AppendRowsResponse + */ +class AppendRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If backend detects a schema update, pass it to user so that user can + * use it to input new type of message. It will be empty when no schema + * updates have occurred. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; + */ + protected $updated_schema = null; + /** + * If a request failed due to corrupted rows, no rows in the batch will be + * appended. The API will return row level error info, so that the caller can + * remove the bad rows and retry the request. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; + */ + private $row_errors; + /** + * The target of the append operation. Matches the write_stream in the + * corresponding request. + * + * Generated from protobuf field string write_stream = 5; + */ + protected $write_stream = ''; + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $append_result + * Result if the append is successful. + * @type \Google\Rpc\Status $error + * Error returned when problems were encountered. If present, + * it indicates rows were not accepted into the system. + * Users can retry or continue with other append requests within the + * same connection. + * Additional information about error signalling: + * ALREADY_EXISTS: Happens when an append specified an offset, and the + * backend already has received data at this offset. Typically encountered + * in retry scenarios, and can be ignored. + * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond + * the current end of the stream. + * INVALID_ARGUMENT: Indicates a malformed request or data. + * ABORTED: Request processing is aborted because of prior failures. The + * request can be retried if previous failure is addressed. + * INTERNAL: Indicates server side error(s) that can be retried. + * @type \Google\Cloud\BigQuery\Storage\V1\TableSchema $updated_schema + * If backend detects a schema update, pass it to user so that user can + * use it to input new type of message. It will be empty when no schema + * updates have occurred. + * @type array<\Google\Cloud\BigQuery\Storage\V1\RowError>|\Google\Protobuf\Internal\RepeatedField $row_errors + * If a request failed due to corrupted rows, no rows in the batch will be + * appended. The API will return row level error info, so that the caller can + * remove the bad rows and retry the request. + * @type string $write_stream + * The target of the append operation. Matches the write_stream in the + * corresponding request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Result if the append is successful. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1; + * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult|null + */ + public function getAppendResult() + { + return $this->readOneof(1); + } + + public function hasAppendResult() + { + return $this->hasOneof(1); + } + + /** + * Result if the append is successful. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1; + * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $var + * @return $this + */ + public function setAppendResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Error returned when problems were encountered. If present, + * it indicates rows were not accepted into the system. + * Users can retry or continue with other append requests within the + * same connection. + * Additional information about error signalling: + * ALREADY_EXISTS: Happens when an append specified an offset, and the + * backend already has received data at this offset. Typically encountered + * in retry scenarios, and can be ignored. + * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond + * the current end of the stream. + * INVALID_ARGUMENT: Indicates a malformed request or data. + * ABORTED: Request processing is aborted because of prior failures. The + * request can be retried if previous failure is addressed. + * INTERNAL: Indicates server side error(s) that can be retried. + * + * Generated from protobuf field .google.rpc.Status error = 2; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->readOneof(2); + } + + public function hasError() + { + return $this->hasOneof(2); + } + + /** + * Error returned when problems were encountered. If present, + * it indicates rows were not accepted into the system. + * Users can retry or continue with other append requests within the + * same connection. + * Additional information about error signalling: + * ALREADY_EXISTS: Happens when an append specified an offset, and the + * backend already has received data at this offset. Typically encountered + * in retry scenarios, and can be ignored. + * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond + * the current end of the stream. + * INVALID_ARGUMENT: Indicates a malformed request or data. + * ABORTED: Request processing is aborted because of prior failures. The + * request can be retried if previous failure is addressed. + * INTERNAL: Indicates server side error(s) that can be retried. + * + * Generated from protobuf field .google.rpc.Status error = 2; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If backend detects a schema update, pass it to user so that user can + * use it to input new type of message. It will be empty when no schema + * updates have occurred. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; + * @return \Google\Cloud\BigQuery\Storage\V1\TableSchema|null + */ + public function getUpdatedSchema() + { + return $this->updated_schema; + } + + public function hasUpdatedSchema() + { + return isset($this->updated_schema); + } + + public function clearUpdatedSchema() + { + unset($this->updated_schema); + } + + /** + * If backend detects a schema update, pass it to user so that user can + * use it to input new type of message. It will be empty when no schema + * updates have occurred. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; + * @param \Google\Cloud\BigQuery\Storage\V1\TableSchema $var + * @return $this + */ + public function setUpdatedSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableSchema::class); + $this->updated_schema = $var; + + return $this; + } + + /** + * If a request failed due to corrupted rows, no rows in the batch will be + * appended. The API will return row level error info, so that the caller can + * remove the bad rows and retry the request. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRowErrors() + { + return $this->row_errors; + } + + /** + * If a request failed due to corrupted rows, no rows in the batch will be + * appended. The API will return row level error info, so that the caller can + * remove the bad rows and retry the request. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; + * @param array<\Google\Cloud\BigQuery\Storage\V1\RowError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRowErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\RowError::class); + $this->row_errors = $arr; + + return $this; + } + + /** + * The target of the append operation. Matches the write_stream in the + * corresponding request. + * + * Generated from protobuf field string write_stream = 5; + * @return string + */ + public function getWriteStream() + { + return $this->write_stream; + } + + /** + * The target of the append operation. Matches the write_stream in the + * corresponding request. + * + * Generated from protobuf field string write_stream = 5; + * @param string $var + * @return $this + */ + public function setWriteStream($var) + { + GPBUtil::checkString($var, True); + $this->write_stream = $var; + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php new file mode 100644 index 000000000000..62d0e99a8d29 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php @@ -0,0 +1,113 @@ +google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult + */ +class AppendResult extends \Google\Protobuf\Internal\Message +{ + /** + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + */ + protected $offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int64Value $offset + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + * @return \Google\Protobuf\Int64Value|null + */ + public function getOffset() + { + return $this->offset; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * Returns the unboxed value from getOffset() + + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + * @return int|string|null + */ + public function getOffsetUnwrapped() + { + return $this->readWrapperValue("offset"); + } + + /** + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->offset = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + * @param int|string|null $var + * @return $this + */ + public function setOffsetUnwrapped($var) + { + $this->writeWrapperValue("offset", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AppendResult::class, \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse_AppendResult::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php new file mode 100644 index 000000000000..96ecf21ef673 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php @@ -0,0 +1,110 @@ +google.cloud.bigquery.storage.v1.ArrowRecordBatch + */ +class ArrowRecordBatch extends \Google\Protobuf\Internal\Message +{ + /** + * IPC-serialized Arrow RecordBatch. + * + * Generated from protobuf field bytes serialized_record_batch = 1; + */ + protected $serialized_record_batch = ''; + /** + * [Deprecated] The count of rows in `serialized_record_batch`. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @deprecated + */ + protected $row_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serialized_record_batch + * IPC-serialized Arrow RecordBatch. + * @type int|string $row_count + * [Deprecated] The count of rows in `serialized_record_batch`. + * Please use the format-independent ReadRowsResponse.row_count instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); + parent::__construct($data); + } + + /** + * IPC-serialized Arrow RecordBatch. + * + * Generated from protobuf field bytes serialized_record_batch = 1; + * @return string + */ + public function getSerializedRecordBatch() + { + return $this->serialized_record_batch; + } + + /** + * IPC-serialized Arrow RecordBatch. + * + * Generated from protobuf field bytes serialized_record_batch = 1; + * @param string $var + * @return $this + */ + public function setSerializedRecordBatch($var) + { + GPBUtil::checkString($var, False); + $this->serialized_record_batch = $var; + + return $this; + } + + /** + * [Deprecated] The count of rows in `serialized_record_batch`. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @return int|string + * @deprecated + */ + public function getRowCount() + { + @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); + return $this->row_count; + } + + /** + * [Deprecated] The count of rows in `serialized_record_batch`. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @param int|string $var + * @return $this + * @deprecated + */ + public function setRowCount($var) + { + @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php new file mode 100644 index 000000000000..0e081bad2c8d --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php @@ -0,0 +1,71 @@ +google.cloud.bigquery.storage.v1.ArrowSchema + */ +class ArrowSchema extends \Google\Protobuf\Internal\Message +{ + /** + * IPC serialized Arrow schema. + * + * Generated from protobuf field bytes serialized_schema = 1; + */ + protected $serialized_schema = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serialized_schema + * IPC serialized Arrow schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); + parent::__construct($data); + } + + /** + * IPC serialized Arrow schema. + * + * Generated from protobuf field bytes serialized_schema = 1; + * @return string + */ + public function getSerializedSchema() + { + return $this->serialized_schema; + } + + /** + * IPC serialized Arrow schema. + * + * Generated from protobuf field bytes serialized_schema = 1; + * @param string $var + * @return $this + */ + public function setSerializedSchema($var) + { + GPBUtil::checkString($var, False); + $this->serialized_schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php new file mode 100644 index 000000000000..9cbf862501c9 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php @@ -0,0 +1,71 @@ +google.cloud.bigquery.storage.v1.ArrowSerializationOptions + */ +class ArrowSerializationOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The compression codec to use for Arrow buffers in serialized record + * batches. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; + */ + protected $buffer_compression = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $buffer_compression + * The compression codec to use for Arrow buffers in serialized record + * batches. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); + parent::__construct($data); + } + + /** + * The compression codec to use for Arrow buffers in serialized record + * batches. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; + * @return int + */ + public function getBufferCompression() + { + return $this->buffer_compression; + } + + /** + * The compression codec to use for Arrow buffers in serialized record + * batches. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; + * @param int $var + * @return $this + */ + public function setBufferCompression($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions\CompressionCodec::class); + $this->buffer_compression = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php new file mode 100644 index 000000000000..08496a159dfe --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php @@ -0,0 +1,64 @@ +google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec + */ +class CompressionCodec +{ + /** + * If unspecified no compression will be used. + * + * Generated from protobuf enum COMPRESSION_UNSPECIFIED = 0; + */ + const COMPRESSION_UNSPECIFIED = 0; + /** + * LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md) + * + * Generated from protobuf enum LZ4_FRAME = 1; + */ + const LZ4_FRAME = 1; + /** + * Zstandard compression. + * + * Generated from protobuf enum ZSTD = 2; + */ + const ZSTD = 2; + + private static $valueToName = [ + self::COMPRESSION_UNSPECIFIED => 'COMPRESSION_UNSPECIFIED', + self::LZ4_FRAME => 'LZ4_FRAME', + self::ZSTD => 'ZSTD', + ]; + + 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(CompressionCodec::class, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions_CompressionCodec::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php new file mode 100644 index 000000000000..95057dfc33ed --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php @@ -0,0 +1,110 @@ +google.cloud.bigquery.storage.v1.AvroRows + */ +class AvroRows extends \Google\Protobuf\Internal\Message +{ + /** + * Binary serialized rows in a block. + * + * Generated from protobuf field bytes serialized_binary_rows = 1; + */ + protected $serialized_binary_rows = ''; + /** + * [Deprecated] The count of rows in the returning block. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @deprecated + */ + protected $row_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serialized_binary_rows + * Binary serialized rows in a block. + * @type int|string $row_count + * [Deprecated] The count of rows in the returning block. + * Please use the format-independent ReadRowsResponse.row_count instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); + parent::__construct($data); + } + + /** + * Binary serialized rows in a block. + * + * Generated from protobuf field bytes serialized_binary_rows = 1; + * @return string + */ + public function getSerializedBinaryRows() + { + return $this->serialized_binary_rows; + } + + /** + * Binary serialized rows in a block. + * + * Generated from protobuf field bytes serialized_binary_rows = 1; + * @param string $var + * @return $this + */ + public function setSerializedBinaryRows($var) + { + GPBUtil::checkString($var, False); + $this->serialized_binary_rows = $var; + + return $this; + } + + /** + * [Deprecated] The count of rows in the returning block. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @return int|string + * @deprecated + */ + public function getRowCount() + { + @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); + return $this->row_count; + } + + /** + * [Deprecated] The count of rows in the returning block. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @param int|string $var + * @return $this + * @deprecated + */ + public function setRowCount($var) + { + @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php new file mode 100644 index 000000000000..95f031edf513 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php @@ -0,0 +1,71 @@ +google.cloud.bigquery.storage.v1.AvroSchema + */ +class AvroSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + * + * Generated from protobuf field string schema = 1; + */ + protected $schema = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schema + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); + parent::__construct($data); + } + + /** + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + * + * Generated from protobuf field string schema = 1; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + * + * Generated from protobuf field string schema = 1; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php new file mode 100644 index 000000000000..a144d2b4e6b0 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php @@ -0,0 +1,95 @@ +google.cloud.bigquery.storage.v1.AvroSerializationOptions + */ +class AvroSerializationOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Enable displayName attribute in Avro schema. + * The Avro specification requires field names to be alphanumeric. By + * default, in cases when column names do not conform to these requirements + * (e.g. non-ascii unicode codepoints) and Avro is requested as an output + * format, the CreateReadSession call will fail. + * Setting this field to true, populates avro field names with a placeholder + * value and populates a "displayName" attribute for every avro field with the + * original column name. + * + * Generated from protobuf field bool enable_display_name_attribute = 1; + */ + protected $enable_display_name_attribute = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_display_name_attribute + * Enable displayName attribute in Avro schema. + * The Avro specification requires field names to be alphanumeric. By + * default, in cases when column names do not conform to these requirements + * (e.g. non-ascii unicode codepoints) and Avro is requested as an output + * format, the CreateReadSession call will fail. + * Setting this field to true, populates avro field names with a placeholder + * value and populates a "displayName" attribute for every avro field with the + * original column name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); + parent::__construct($data); + } + + /** + * Enable displayName attribute in Avro schema. + * The Avro specification requires field names to be alphanumeric. By + * default, in cases when column names do not conform to these requirements + * (e.g. non-ascii unicode codepoints) and Avro is requested as an output + * format, the CreateReadSession call will fail. + * Setting this field to true, populates avro field names with a placeholder + * value and populates a "displayName" attribute for every avro field with the + * original column name. + * + * Generated from protobuf field bool enable_display_name_attribute = 1; + * @return bool + */ + public function getEnableDisplayNameAttribute() + { + return $this->enable_display_name_attribute; + } + + /** + * Enable displayName attribute in Avro schema. + * The Avro specification requires field names to be alphanumeric. By + * default, in cases when column names do not conform to these requirements + * (e.g. non-ascii unicode codepoints) and Avro is requested as an output + * format, the CreateReadSession call will fail. + * Setting this field to true, populates avro field names with a placeholder + * value and populates a "displayName" attribute for every avro field with the + * original column name. + * + * Generated from protobuf field bool enable_display_name_attribute = 1; + * @param bool $var + * @return $this + */ + public function setEnableDisplayNameAttribute($var) + { + GPBUtil::checkBool($var); + $this->enable_display_name_attribute = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php new file mode 100644 index 000000000000..50e1addd8cf0 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php @@ -0,0 +1,120 @@ +google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest + */ +class BatchCommitWriteStreamsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The group of streams that will be committed atomically. + * + * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $write_streams; + + /** + * @param string $parent Required. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. Please see + * {@see BigQueryWriteClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\BatchCommitWriteStreamsRequest + * + * @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. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * @type array|\Google\Protobuf\Internal\RepeatedField $write_streams + * Required. The group of streams that will be committed atomically. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The group of streams that will be committed atomically. + * + * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWriteStreams() + { + return $this->write_streams; + } + + /** + * Required. The group of streams that will be committed atomically. + * + * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWriteStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->write_streams = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php new file mode 100644 index 000000000000..a3647346dc3b --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php @@ -0,0 +1,135 @@ +google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse + */ +class BatchCommitWriteStreamsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The time at which streams were committed in microseconds granularity. + * This field will only exist when there are no stream errors. + * **Note** if this field is not set, it means the commit was not successful. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; + */ + protected $commit_time = null; + /** + * Stream level error if commit failed. Only streams with error will be in + * the list. + * If empty, there is no error and all streams are committed successfully. + * If non empty, certain streams have errors and ZERO stream is committed due + * to atomicity guarantee. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; + */ + private $stream_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $commit_time + * The time at which streams were committed in microseconds granularity. + * This field will only exist when there are no stream errors. + * **Note** if this field is not set, it means the commit was not successful. + * @type array<\Google\Cloud\BigQuery\Storage\V1\StorageError>|\Google\Protobuf\Internal\RepeatedField $stream_errors + * Stream level error if commit failed. Only streams with error will be in + * the list. + * If empty, there is no error and all streams are committed successfully. + * If non empty, certain streams have errors and ZERO stream is committed due + * to atomicity guarantee. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * The time at which streams were committed in microseconds granularity. + * This field will only exist when there are no stream errors. + * **Note** if this field is not set, it means the commit was not successful. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * The time at which streams were committed in microseconds granularity. + * This field will only exist when there are no stream errors. + * **Note** if this field is not set, it means the commit was not successful. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + + /** + * Stream level error if commit failed. Only streams with error will be in + * the list. + * If empty, there is no error and all streams are committed successfully. + * If non empty, certain streams have errors and ZERO stream is committed due + * to atomicity guarantee. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStreamErrors() + { + return $this->stream_errors; + } + + /** + * Stream level error if commit failed. Only streams with error will be in + * the list. + * If empty, there is no error and all streams are committed successfully. + * If non empty, certain streams have errors and ZERO stream is committed due + * to atomicity guarantee. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; + * @param array<\Google\Cloud\BigQuery\Storage\V1\StorageError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStreamErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\StorageError::class); + $this->stream_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php new file mode 100644 index 000000000000..b27b6f13ecc3 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php @@ -0,0 +1,267 @@ +google.cloud.bigquery.storage.v1.CreateReadSessionRequest + */ +class CreateReadSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Session to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $read_session = null; + /** + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * + * Generated from protobuf field int32 max_stream_count = 3; + */ + protected $max_stream_count = 0; + /** + * The minimum preferred stream count. This parameter can be used to inform + * the service that there is a desired lower bound on the number of streams. + * This is typically a target parallelism of the client (e.g. a Spark + * cluster with N-workers would set this to a low multiple of N to ensure + * good cluster utilization). + * The system will make a best effort to provide at least this number of + * streams, but in some cases might provide less. + * + * Generated from protobuf field int32 preferred_min_stream_count = 4; + */ + protected $preferred_min_stream_count = 0; + + /** + * @param string $parent Required. The request project that owns the session, in the form of + * `projects/{project_id}`. Please see + * {@see BigQueryReadClient::projectName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession $readSession Required. Session to be created. + * @param int $maxStreamCount Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * + * @return \Google\Cloud\BigQuery\Storage\V1\CreateReadSessionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\Storage\V1\ReadSession $readSession, int $maxStreamCount): self + { + return (new self()) + ->setParent($parent) + ->setReadSession($readSession) + ->setMaxStreamCount($maxStreamCount); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession $read_session + * Required. Session to be created. + * @type int $max_stream_count + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * @type int $preferred_min_stream_count + * The minimum preferred stream count. This parameter can be used to inform + * the service that there is a desired lower bound on the number of streams. + * This is typically a target parallelism of the client (e.g. a Spark + * cluster with N-workers would set this to a low multiple of N to ensure + * good cluster utilization). + * The system will make a best effort to provide at least this number of + * streams, but in some cases might provide less. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. The request project that owns the session, in the form of + * `projects/{project_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 request project that owns the session, in the form of + * `projects/{project_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. Session to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession|null + */ + public function getReadSession() + { + return $this->read_session; + } + + public function hasReadSession() + { + return isset($this->read_session); + } + + public function clearReadSession() + { + unset($this->read_session); + } + + /** + * Required. Session to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession $var + * @return $this + */ + public function setReadSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession::class); + $this->read_session = $var; + + return $this; + } + + /** + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * + * Generated from protobuf field int32 max_stream_count = 3; + * @return int + */ + public function getMaxStreamCount() + { + return $this->max_stream_count; + } + + /** + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * + * Generated from protobuf field int32 max_stream_count = 3; + * @param int $var + * @return $this + */ + public function setMaxStreamCount($var) + { + GPBUtil::checkInt32($var); + $this->max_stream_count = $var; + + return $this; + } + + /** + * The minimum preferred stream count. This parameter can be used to inform + * the service that there is a desired lower bound on the number of streams. + * This is typically a target parallelism of the client (e.g. a Spark + * cluster with N-workers would set this to a low multiple of N to ensure + * good cluster utilization). + * The system will make a best effort to provide at least this number of + * streams, but in some cases might provide less. + * + * Generated from protobuf field int32 preferred_min_stream_count = 4; + * @return int + */ + public function getPreferredMinStreamCount() + { + return $this->preferred_min_stream_count; + } + + /** + * The minimum preferred stream count. This parameter can be used to inform + * the service that there is a desired lower bound on the number of streams. + * This is typically a target parallelism of the client (e.g. a Spark + * cluster with N-workers would set this to a low multiple of N to ensure + * good cluster utilization). + * The system will make a best effort to provide at least this number of + * streams, but in some cases might provide less. + * + * Generated from protobuf field int32 preferred_min_stream_count = 4; + * @param int $var + * @return $this + */ + public function setPreferredMinStreamCount($var) + { + GPBUtil::checkInt32($var); + $this->preferred_min_stream_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php new file mode 100644 index 000000000000..5f861cd2387f --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php @@ -0,0 +1,132 @@ +google.cloud.bigquery.storage.v1.CreateWriteStreamRequest + */ +class CreateWriteStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Stream to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $write_stream = null; + + /** + * @param string $parent Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. Please see + * {@see BigQueryWriteClient::tableName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Storage\V1\WriteStream $writeStream Required. Stream to be created. + * + * @return \Google\Cloud\BigQuery\Storage\V1\CreateWriteStreamRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\Storage\V1\WriteStream $writeStream): self + { + return (new self()) + ->setParent($parent) + ->setWriteStream($writeStream); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * @type \Google\Cloud\BigQuery\Storage\V1\WriteStream $write_stream + * Required. Stream to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Stream to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\Storage\V1\WriteStream|null + */ + public function getWriteStream() + { + return $this->write_stream; + } + + public function hasWriteStream() + { + return isset($this->write_stream); + } + + public function clearWriteStream() + { + unset($this->write_stream); + } + + /** + * Required. Stream to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\Storage\V1\WriteStream $var + * @return $this + */ + public function setWriteStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream::class); + $this->write_stream = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php new file mode 100644 index 000000000000..c5e81f0da7a1 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php @@ -0,0 +1,63 @@ +google.cloud.bigquery.storage.v1.DataFormat + */ +class DataFormat +{ + /** + * Data format is unspecified. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * Avro is a standard open source row based file format. + * See https://avro.apache.org/ for more details. + * + * Generated from protobuf enum AVRO = 1; + */ + const AVRO = 1; + /** + * Arrow is a standard open source column-based message format. + * See https://arrow.apache.org/ for more details. + * + * Generated from protobuf enum ARROW = 2; + */ + const ARROW = 2; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::AVRO => 'AVRO', + self::ARROW => 'ARROW', + ]; + + 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/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php new file mode 100644 index 000000000000..320ada00d1f1 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest + */ +class FinalizeWriteStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. Please see + * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\FinalizeWriteStreamRequest + * + * @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. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * 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. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * 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/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php new file mode 100644 index 000000000000..8e028e4fa78a --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse + */ +class FinalizeWriteStreamResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Number of rows in the finalized stream. + * + * 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 + * Number of rows in the finalized stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Number of rows in the finalized stream. + * + * Generated from protobuf field int64 row_count = 1; + * @return int|string + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * Number of rows in the finalized stream. + * + * 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; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php new file mode 100644 index 000000000000..c89d647475b8 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php @@ -0,0 +1,158 @@ +google.cloud.bigquery.storage.v1.FlushRowsRequest + */ +class FlushRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The stream that is the target of the flush operation. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $write_stream = ''; + /** + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + */ + protected $offset = null; + + /** + * @param string $writeStream Required. The stream that is the target of the flush operation. Please see + * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\FlushRowsRequest + * + * @experimental + */ + public static function build(string $writeStream): self + { + return (new self()) + ->setWriteStream($writeStream); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $write_stream + * Required. The stream that is the target of the flush operation. + * @type \Google\Protobuf\Int64Value $offset + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. The stream that is the target of the flush operation. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getWriteStream() + { + return $this->write_stream; + } + + /** + * Required. The stream that is the target of the flush operation. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setWriteStream($var) + { + GPBUtil::checkString($var, True); + $this->write_stream = $var; + + return $this; + } + + /** + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getOffset() + { + return $this->offset; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * Returns the unboxed value from getOffset() + + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @return int|string|null + */ + public function getOffsetUnwrapped() + { + return $this->readWrapperValue("offset"); + } + + /** + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->offset = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @param int|string|null $var + * @return $this + */ + public function setOffsetUnwrapped($var) + { + $this->writeWrapperValue("offset", $var); + return $this;} + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php new file mode 100644 index 000000000000..2bf496a5d445 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.storage.v1.FlushRowsResponse + */ +class FlushRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The rows before this offset (including this offset) are flushed. + * + * Generated from protobuf field int64 offset = 1; + */ + protected $offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $offset + * The rows before this offset (including this offset) are flushed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * The rows before this offset (including this offset) are flushed. + * + * Generated from protobuf field int64 offset = 1; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The rows before this offset (including this offset) are flushed. + * + * Generated from protobuf field int64 offset = 1; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php new file mode 100644 index 000000000000..9c23aa9e45f1 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php @@ -0,0 +1,124 @@ +google.cloud.bigquery.storage.v1.GetWriteStreamRequest + */ +class GetWriteStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates whether to get full or partial view of the WriteStream. If + * not set, view returned will be basic. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; + */ + protected $view = 0; + + /** + * @param string $name Required. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. Please see + * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\GetWriteStreamRequest + * + * @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. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * @type int $view + * Indicates whether to get full or partial view of the WriteStream. If + * not set, view returned will be basic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * 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. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * 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; + } + + /** + * Indicates whether to get full or partial view of the WriteStream. If + * not set, view returned will be basic. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Indicates whether to get full or partial view of the WriteStream. If + * not set, view returned will be basic. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStreamView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php new file mode 100644 index 000000000000..da06f296e683 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php @@ -0,0 +1,73 @@ +google.cloud.bigquery.storage.v1.ProtoRows + */ +class ProtoRows extends \Google\Protobuf\Internal\Message +{ + /** + * A sequence of rows serialized as a Protocol Buffer. + * See https://developers.google.com/protocol-buffers/docs/overview for more + * information on deserializing this field. + * + * Generated from protobuf field repeated bytes serialized_rows = 1; + */ + private $serialized_rows; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $serialized_rows + * A sequence of rows serialized as a Protocol Buffer. + * See https://developers.google.com/protocol-buffers/docs/overview for more + * information on deserializing this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Protobuf::initOnce(); + parent::__construct($data); + } + + /** + * A sequence of rows serialized as a Protocol Buffer. + * See https://developers.google.com/protocol-buffers/docs/overview for more + * information on deserializing this field. + * + * Generated from protobuf field repeated bytes serialized_rows = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSerializedRows() + { + return $this->serialized_rows; + } + + /** + * A sequence of rows serialized as a Protocol Buffer. + * See https://developers.google.com/protocol-buffers/docs/overview for more + * information on deserializing this field. + * + * Generated from protobuf field repeated bytes serialized_rows = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSerializedRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->serialized_rows = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php new file mode 100644 index 000000000000..6f20a5f57e4e --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.storage.v1.ProtoSchema + */ +class ProtoSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Descriptor for input message. The provided descriptor must be self + * contained, such that data rows sent can be fully decoded using only the + * single descriptor. For data rows that are compositions of multiple + * independent messages, this means the descriptor may need to be transformed + * to only use nested types: + * https://developers.google.com/protocol-buffers/docs/proto#nested + * For additional information for how proto types and values map onto BigQuery + * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + * + * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; + */ + protected $proto_descriptor = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\DescriptorProto $proto_descriptor + * Descriptor for input message. The provided descriptor must be self + * contained, such that data rows sent can be fully decoded using only the + * single descriptor. For data rows that are compositions of multiple + * independent messages, this means the descriptor may need to be transformed + * to only use nested types: + * https://developers.google.com/protocol-buffers/docs/proto#nested + * For additional information for how proto types and values map onto BigQuery + * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Protobuf::initOnce(); + parent::__construct($data); + } + + /** + * Descriptor for input message. The provided descriptor must be self + * contained, such that data rows sent can be fully decoded using only the + * single descriptor. For data rows that are compositions of multiple + * independent messages, this means the descriptor may need to be transformed + * to only use nested types: + * https://developers.google.com/protocol-buffers/docs/proto#nested + * For additional information for how proto types and values map onto BigQuery + * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + * + * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; + * @return \Google\Protobuf\DescriptorProto|null + */ + public function getProtoDescriptor() + { + return $this->proto_descriptor; + } + + public function hasProtoDescriptor() + { + return isset($this->proto_descriptor); + } + + public function clearProtoDescriptor() + { + unset($this->proto_descriptor); + } + + /** + * Descriptor for input message. The provided descriptor must be self + * contained, such that data rows sent can be fully decoded using only the + * single descriptor. For data rows that are compositions of multiple + * independent messages, this means the descriptor may need to be transformed + * to only use nested types: + * https://developers.google.com/protocol-buffers/docs/proto#nested + * For additional information for how proto types and values map onto BigQuery + * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + * + * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; + * @param \Google\Protobuf\DescriptorProto $var + * @return $this + */ + public function setProtoDescriptor($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DescriptorProto::class); + $this->proto_descriptor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php new file mode 100644 index 000000000000..c8a2f8817402 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php @@ -0,0 +1,127 @@ +google.cloud.bigquery.storage.v1.ReadRowsRequest + */ +class ReadRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Stream to read rows from. + * + * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $read_stream = ''; + /** + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * + * Generated from protobuf field int64 offset = 2; + */ + protected $offset = 0; + + /** + * @param string $readStream Required. Stream to read rows from. Please see + * {@see BigQueryReadClient::readStreamName()} for help formatting this field. + * @param int $offset The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * + * @return \Google\Cloud\BigQuery\Storage\V1\ReadRowsRequest + * + * @experimental + */ + public static function build(string $readStream, int $offset): self + { + return (new self()) + ->setReadStream($readStream) + ->setOffset($offset); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $read_stream + * Required. Stream to read rows from. + * @type int|string $offset + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Stream to read rows from. + * + * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getReadStream() + { + return $this->read_stream; + } + + /** + * Required. Stream to read rows from. + * + * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setReadStream($var) + { + GPBUtil::checkString($var, True); + $this->read_stream = $var; + + return $this; + } + + /** + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * + * Generated from protobuf field int64 offset = 2; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * + * Generated from protobuf field int64 offset = 2; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php new file mode 100644 index 000000000000..870309d3a0eb --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php @@ -0,0 +1,406 @@ +google.cloud.bigquery.storage.v1.ReadRowsResponse + */ +class ReadRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Number of serialized rows in the rows block. + * + * Generated from protobuf field int64 row_count = 6; + */ + protected $row_count = 0; + /** + * Statistics for the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; + */ + protected $stats = null; + /** + * Throttling state. If unset, the latest response still describes + * the current throttling status. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; + */ + protected $throttle_state = null; + /** + * Optional. If the row data in this ReadRowsResponse is compressed, then + * uncompressed byte size is the original size of the uncompressed row data. + * If it is set to a value greater than 0, then decompress into a buffer of + * size uncompressed_byte_size using the compression codec that was requested + * during session creation time and which is specified in + * TableReadOptions.response_compression_codec in ReadSession. + * This value is not set if no response_compression_codec was not requested + * and it is -1 if the requested compression would not have reduced the size + * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + * behavior described here https://github.com/apache/arrow/issues/15102 where + * the uncompressed length may be set to -1 to indicate that the data that + * follows is not compressed, which can be useful for cases where compression + * does not yield appreciable savings. When uncompressed_byte_size is not + * greater than 0, the client should skip decompression. + * + * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $uncompressed_byte_size = null; + protected $rows; + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\AvroRows $avro_rows + * Serialized row data in AVRO format. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $arrow_record_batch + * Serialized row data in Arrow RecordBatch format. + * @type int|string $row_count + * Number of serialized rows in the rows block. + * @type \Google\Cloud\BigQuery\Storage\V1\StreamStats $stats + * Statistics for the stream. + * @type \Google\Cloud\BigQuery\Storage\V1\ThrottleState $throttle_state + * Throttling state. If unset, the latest response still describes + * the current throttling status. + * @type \Google\Cloud\BigQuery\Storage\V1\AvroSchema $avro_schema + * Output only. Avro schema. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $arrow_schema + * Output only. Arrow schema. + * @type int|string $uncompressed_byte_size + * Optional. If the row data in this ReadRowsResponse is compressed, then + * uncompressed byte size is the original size of the uncompressed row data. + * If it is set to a value greater than 0, then decompress into a buffer of + * size uncompressed_byte_size using the compression codec that was requested + * during session creation time and which is specified in + * TableReadOptions.response_compression_codec in ReadSession. + * This value is not set if no response_compression_codec was not requested + * and it is -1 if the requested compression would not have reduced the size + * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + * behavior described here https://github.com/apache/arrow/issues/15102 where + * the uncompressed length may be set to -1 to indicate that the data that + * follows is not compressed, which can be useful for cases where compression + * does not yield appreciable savings. When uncompressed_byte_size is not + * greater than 0, the client should skip decompression. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Serialized row data in AVRO format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3; + * @return \Google\Cloud\BigQuery\Storage\V1\AvroRows|null + */ + public function getAvroRows() + { + return $this->readOneof(3); + } + + public function hasAvroRows() + { + return $this->hasOneof(3); + } + + /** + * Serialized row data in AVRO format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3; + * @param \Google\Cloud\BigQuery\Storage\V1\AvroRows $var + * @return $this + */ + public function setAvroRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroRows::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Serialized row data in Arrow RecordBatch format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch|null + */ + public function getArrowRecordBatch() + { + return $this->readOneof(4); + } + + public function hasArrowRecordBatch() + { + return $this->hasOneof(4); + } + + /** + * Serialized row data in Arrow RecordBatch format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $var + * @return $this + */ + public function setArrowRecordBatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Number of serialized rows in the rows block. + * + * Generated from protobuf field int64 row_count = 6; + * @return int|string + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * Number of serialized rows in the rows block. + * + * Generated from protobuf field int64 row_count = 6; + * @param int|string $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + + /** + * Statistics for the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\StreamStats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Statistics for the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\StreamStats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\StreamStats::class); + $this->stats = $var; + + return $this; + } + + /** + * Throttling state. If unset, the latest response still describes + * the current throttling status. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; + * @return \Google\Cloud\BigQuery\Storage\V1\ThrottleState|null + */ + public function getThrottleState() + { + return $this->throttle_state; + } + + public function hasThrottleState() + { + return isset($this->throttle_state); + } + + public function clearThrottleState() + { + unset($this->throttle_state); + } + + /** + * Throttling state. If unset, the latest response still describes + * the current throttling status. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; + * @param \Google\Cloud\BigQuery\Storage\V1\ThrottleState $var + * @return $this + */ + public function setThrottleState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ThrottleState::class); + $this->throttle_state = $var; + + return $this; + } + + /** + * Output only. Avro schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\AvroSchema|null + */ + public function getAvroSchema() + { + return $this->readOneof(7); + } + + public function hasAvroSchema() + { + return $this->hasOneof(7); + } + + /** + * Output only. Avro schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\AvroSchema $var + * @return $this + */ + public function setAvroSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSchema::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. Arrow schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null + */ + public function getArrowSchema() + { + return $this->readOneof(8); + } + + public function hasArrowSchema() + { + return $this->hasOneof(8); + } + + /** + * Output only. Arrow schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var + * @return $this + */ + public function setArrowSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Optional. If the row data in this ReadRowsResponse is compressed, then + * uncompressed byte size is the original size of the uncompressed row data. + * If it is set to a value greater than 0, then decompress into a buffer of + * size uncompressed_byte_size using the compression codec that was requested + * during session creation time and which is specified in + * TableReadOptions.response_compression_codec in ReadSession. + * This value is not set if no response_compression_codec was not requested + * and it is -1 if the requested compression would not have reduced the size + * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + * behavior described here https://github.com/apache/arrow/issues/15102 where + * the uncompressed length may be set to -1 to indicate that the data that + * follows is not compressed, which can be useful for cases where compression + * does not yield appreciable savings. When uncompressed_byte_size is not + * greater than 0, the client should skip decompression. + * + * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getUncompressedByteSize() + { + return isset($this->uncompressed_byte_size) ? $this->uncompressed_byte_size : 0; + } + + public function hasUncompressedByteSize() + { + return isset($this->uncompressed_byte_size); + } + + public function clearUncompressedByteSize() + { + unset($this->uncompressed_byte_size); + } + + /** + * Optional. If the row data in this ReadRowsResponse is compressed, then + * uncompressed byte size is the original size of the uncompressed row data. + * If it is set to a value greater than 0, then decompress into a buffer of + * size uncompressed_byte_size using the compression codec that was requested + * during session creation time and which is specified in + * TableReadOptions.response_compression_codec in ReadSession. + * This value is not set if no response_compression_codec was not requested + * and it is -1 if the requested compression would not have reduced the size + * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + * behavior described here https://github.com/apache/arrow/issues/15102 where + * the uncompressed length may be set to -1 to indicate that the data that + * follows is not compressed, which can be useful for cases where compression + * does not yield appreciable savings. When uncompressed_byte_size is not + * greater than 0, the client should skip decompression. + * + * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setUncompressedByteSize($var) + { + GPBUtil::checkInt64($var); + $this->uncompressed_byte_size = $var; + + return $this; + } + + /** + * @return string + */ + public function getRows() + { + return $this->whichOneof("rows"); + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php new file mode 100644 index 000000000000..c574355892c3 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php @@ -0,0 +1,604 @@ +google.cloud.bigquery.storage.v1.ReadSession + */ +class ReadSession extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Time at which the session becomes invalid. After this time, + * subsequent requests to read this Session will return errors. The + * expire_time is automatically assigned and currently cannot be specified or + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + * supported. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $data_format = 0; + /** + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + * + * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $table = ''; + /** + * Optional. Any modifiers which are applied when reading from the specified + * table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $table_modifiers = null; + /** + * Optional. Read options for this session (e.g. column selection, filters). + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_options = null; + /** + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $streams; + /** + * Output only. An estimate on the number of bytes this session will scan when + * all streams are completely consumed. This estimate is based on + * metadata from the table which might be incomplete or stale. + * + * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $estimated_total_bytes_scanned = 0; + /** + * Output only. A pre-projected estimate of the total physical size of files + * (in bytes) that this session will scan when all streams are consumed. This + * estimate is independent of the selected columns and can be based on + * incomplete or stale metadata from the table. This field is only set for + * BigLake tables. + * + * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $estimated_total_physical_file_size = 0; + /** + * Output only. An estimate on the number of rows present in this session's + * streams. This estimate is based on metadata from the table which might be + * incomplete or stale. + * + * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $estimated_row_count = 0; + /** + * Optional. ID set by client to annotate a session identity. This does not + * need to be strictly unique, but instead the same ID should be used to group + * logically connected sessions (e.g. All using the same ID for all sessions + * needed to complete a Spark SQL query is reasonable). + * Maximum length is 256 bytes. + * + * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $trace_id = ''; + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. Time at which the session becomes invalid. After this time, + * subsequent requests to read this Session will return errors. The + * expire_time is automatically assigned and currently cannot be specified or + * updated. + * @type int $data_format + * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + * supported. + * @type \Google\Cloud\BigQuery\Storage\V1\AvroSchema $avro_schema + * Output only. Avro schema. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $arrow_schema + * Output only. Arrow schema. + * @type string $table + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers $table_modifiers + * Optional. Any modifiers which are applied when reading from the specified + * table. + * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions $read_options + * Optional. Read options for this session (e.g. column selection, filters). + * @type array<\Google\Cloud\BigQuery\Storage\V1\ReadStream>|\Google\Protobuf\Internal\RepeatedField $streams + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + * @type int|string $estimated_total_bytes_scanned + * Output only. An estimate on the number of bytes this session will scan when + * all streams are completely consumed. This estimate is based on + * metadata from the table which might be incomplete or stale. + * @type int|string $estimated_total_physical_file_size + * Output only. A pre-projected estimate of the total physical size of files + * (in bytes) that this session will scan when all streams are consumed. This + * estimate is independent of the selected columns and can be based on + * incomplete or stale metadata from the table. This field is only set for + * BigLake tables. + * @type int|string $estimated_row_count + * Output only. An estimate on the number of rows present in this session's + * streams. This estimate is based on metadata from the table which might be + * incomplete or stale. + * @type string $trace_id + * Optional. ID set by client to annotate a session identity. This does not + * need to be strictly unique, but instead the same ID should be used to group + * logically connected sessions (e.g. All using the same ID for all sessions + * needed to complete a Spark SQL query is reasonable). + * Maximum length is 256 bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + * + * 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. Time at which the session becomes invalid. After this time, + * subsequent requests to read this Session will return errors. The + * expire_time is automatically assigned and currently cannot be specified or + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. Time at which the session becomes invalid. After this time, + * subsequent requests to read this Session will return errors. The + * expire_time is automatically assigned and currently cannot be specified or + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + * supported. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + * supported. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * Output only. Avro schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\AvroSchema|null + */ + public function getAvroSchema() + { + return $this->readOneof(4); + } + + public function hasAvroSchema() + { + return $this->hasOneof(4); + } + + /** + * Output only. Avro schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\AvroSchema $var + * @return $this + */ + public function setAvroSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSchema::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Output only. Arrow schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null + */ + public function getArrowSchema() + { + return $this->readOneof(5); + } + + public function hasArrowSchema() + { + return $this->hasOneof(5); + } + + /** + * Output only. Arrow schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var + * @return $this + */ + public function setArrowSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + * + * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + * + * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + + /** + * Optional. Any modifiers which are applied when reading from the specified + * table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers|null + */ + public function getTableModifiers() + { + return $this->table_modifiers; + } + + public function hasTableModifiers() + { + return isset($this->table_modifiers); + } + + public function clearTableModifiers() + { + unset($this->table_modifiers); + } + + /** + * Optional. Any modifiers which are applied when reading from the specified + * table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers $var + * @return $this + */ + public function setTableModifiers($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers::class); + $this->table_modifiers = $var; + + return $this; + } + + /** + * Optional. Read options for this session (e.g. column selection, filters). + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions|null + */ + public function getReadOptions() + { + return $this->read_options; + } + + public function hasReadOptions() + { + return isset($this->read_options); + } + + public function clearReadOptions() + { + unset($this->read_options); + } + + /** + * Optional. Read options for this session (e.g. column selection, filters). + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions $var + * @return $this + */ + public function setReadOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions::class); + $this->read_options = $var; + + return $this; + } + + /** + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStreams() + { + return $this->streams; + } + + /** + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\BigQuery\Storage\V1\ReadStream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); + $this->streams = $arr; + + return $this; + } + + /** + * Output only. An estimate on the number of bytes this session will scan when + * all streams are completely consumed. This estimate is based on + * metadata from the table which might be incomplete or stale. + * + * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getEstimatedTotalBytesScanned() + { + return $this->estimated_total_bytes_scanned; + } + + /** + * Output only. An estimate on the number of bytes this session will scan when + * all streams are completely consumed. This estimate is based on + * metadata from the table which might be incomplete or stale. + * + * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setEstimatedTotalBytesScanned($var) + { + GPBUtil::checkInt64($var); + $this->estimated_total_bytes_scanned = $var; + + return $this; + } + + /** + * Output only. A pre-projected estimate of the total physical size of files + * (in bytes) that this session will scan when all streams are consumed. This + * estimate is independent of the selected columns and can be based on + * incomplete or stale metadata from the table. This field is only set for + * BigLake tables. + * + * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getEstimatedTotalPhysicalFileSize() + { + return $this->estimated_total_physical_file_size; + } + + /** + * Output only. A pre-projected estimate of the total physical size of files + * (in bytes) that this session will scan when all streams are consumed. This + * estimate is independent of the selected columns and can be based on + * incomplete or stale metadata from the table. This field is only set for + * BigLake tables. + * + * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setEstimatedTotalPhysicalFileSize($var) + { + GPBUtil::checkInt64($var); + $this->estimated_total_physical_file_size = $var; + + return $this; + } + + /** + * Output only. An estimate on the number of rows present in this session's + * streams. This estimate is based on metadata from the table which might be + * incomplete or stale. + * + * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getEstimatedRowCount() + { + return $this->estimated_row_count; + } + + /** + * Output only. An estimate on the number of rows present in this session's + * streams. This estimate is based on metadata from the table which might be + * incomplete or stale. + * + * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setEstimatedRowCount($var) + { + GPBUtil::checkInt64($var); + $this->estimated_row_count = $var; + + return $this; + } + + /** + * Optional. ID set by client to annotate a session identity. This does not + * need to be strictly unique, but instead the same ID should be used to group + * logically connected sessions (e.g. All using the same ID for all sessions + * needed to complete a Spark SQL query is reasonable). + * Maximum length is 256 bytes. + * + * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTraceId() + { + return $this->trace_id; + } + + /** + * Optional. ID set by client to annotate a session identity. This does not + * need to be strictly unique, but instead the same ID should be used to group + * logically connected sessions (e.g. All using the same ID for all sessions + * needed to complete a Spark SQL query is reasonable). + * Maximum length is 256 bytes. + * + * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTraceId($var) + { + GPBUtil::checkString($var, True); + $this->trace_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php new file mode 100644 index 000000000000..059cd772f343 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php @@ -0,0 +1,80 @@ +google.cloud.bigquery.storage.v1.ReadSession.TableModifiers + */ +class TableModifiers extends \Google\Protobuf\Internal\Message +{ + /** + * The snapshot time of the table. If not set, interpreted as now. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; + */ + protected $snapshot_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $snapshot_time + * The snapshot time of the table. If not set, interpreted as now. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * The snapshot time of the table. If not set, interpreted as now. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * The snapshot time of the table. If not set, interpreted as now. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TableModifiers::class, \Google\Cloud\BigQuery\Storage\V1\ReadSession_TableModifiers::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php new file mode 100644 index 000000000000..092d49e3d216 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php @@ -0,0 +1,471 @@ +google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions + */ +class TableReadOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The names of the fields in the table to be returned. If no + * field names are specified, then all fields in the table are returned. + * Nested fields -- the child elements of a STRUCT field -- can be selected + * individually using their fully-qualified names, and will be returned as + * record fields containing only the selected nested fields. If a STRUCT + * field is specified in the selected fields list, all of the child elements + * will be returned. + * As an example, consider a table with the following schema: + * { + * "name": "struct_field", + * "type": "RECORD", + * "mode": "NULLABLE", + * "fields": [ + * { + * "name": "string_field1", + * "type": "STRING", + * . "mode": "NULLABLE" + * }, + * { + * "name": "string_field2", + * "type": "STRING", + * "mode": "NULLABLE" + * } + * ] + * } + * Specifying "struct_field" in the selected fields list will result in a + * read session schema with the following logical structure: + * struct_field { + * string_field1 + * string_field2 + * } + * Specifying "struct_field.string_field1" in the selected fields list will + * result in a read session schema with the following logical structure: + * struct_field { + * string_field1 + * } + * The order of the fields in the read session schema is derived from the + * table schema and does not correspond to the order in which the fields are + * specified in this list. + * + * Generated from protobuf field repeated string selected_fields = 1; + */ + private $selected_fields; + /** + * SQL text filtering statement, similar to a WHERE clause in a query. + * Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + * Restricted to a maximum length for 1 MB. + * + * Generated from protobuf field string row_restriction = 2; + */ + protected $row_restriction = ''; + /** + * Optional. Specifies a table sampling percentage. Specifically, the query + * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + * sampling percentage is applied at the data block granularity. It will + * randomly choose for each data block whether to read the rows in that data + * block. For more details, see + * https://cloud.google.com/bigquery/docs/table-sampling) + * + * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sample_percentage = null; + /** + * Optional. Set response_compression_codec when creating a read session to + * enable application-level compression of ReadRows responses. + * + * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $response_compression_codec = null; + protected $output_format_serialization_options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $selected_fields + * Optional. The names of the fields in the table to be returned. If no + * field names are specified, then all fields in the table are returned. + * Nested fields -- the child elements of a STRUCT field -- can be selected + * individually using their fully-qualified names, and will be returned as + * record fields containing only the selected nested fields. If a STRUCT + * field is specified in the selected fields list, all of the child elements + * will be returned. + * As an example, consider a table with the following schema: + * { + * "name": "struct_field", + * "type": "RECORD", + * "mode": "NULLABLE", + * "fields": [ + * { + * "name": "string_field1", + * "type": "STRING", + * . "mode": "NULLABLE" + * }, + * { + * "name": "string_field2", + * "type": "STRING", + * "mode": "NULLABLE" + * } + * ] + * } + * Specifying "struct_field" in the selected fields list will result in a + * read session schema with the following logical structure: + * struct_field { + * string_field1 + * string_field2 + * } + * Specifying "struct_field.string_field1" in the selected fields list will + * result in a read session schema with the following logical structure: + * struct_field { + * string_field1 + * } + * The order of the fields in the read session schema is derived from the + * table schema and does not correspond to the order in which the fields are + * specified in this list. + * @type string $row_restriction + * SQL text filtering statement, similar to a WHERE clause in a query. + * Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + * Restricted to a maximum length for 1 MB. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $arrow_serialization_options + * Optional. Options specific to the Apache Arrow output format. + * @type \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions $avro_serialization_options + * Optional. Options specific to the Apache Avro output format + * @type float $sample_percentage + * Optional. Specifies a table sampling percentage. Specifically, the query + * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + * sampling percentage is applied at the data block granularity. It will + * randomly choose for each data block whether to read the rows in that data + * block. For more details, see + * https://cloud.google.com/bigquery/docs/table-sampling) + * @type int $response_compression_codec + * Optional. Set response_compression_codec when creating a read session to + * enable application-level compression of ReadRows responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The names of the fields in the table to be returned. If no + * field names are specified, then all fields in the table are returned. + * Nested fields -- the child elements of a STRUCT field -- can be selected + * individually using their fully-qualified names, and will be returned as + * record fields containing only the selected nested fields. If a STRUCT + * field is specified in the selected fields list, all of the child elements + * will be returned. + * As an example, consider a table with the following schema: + * { + * "name": "struct_field", + * "type": "RECORD", + * "mode": "NULLABLE", + * "fields": [ + * { + * "name": "string_field1", + * "type": "STRING", + * . "mode": "NULLABLE" + * }, + * { + * "name": "string_field2", + * "type": "STRING", + * "mode": "NULLABLE" + * } + * ] + * } + * Specifying "struct_field" in the selected fields list will result in a + * read session schema with the following logical structure: + * struct_field { + * string_field1 + * string_field2 + * } + * Specifying "struct_field.string_field1" in the selected fields list will + * result in a read session schema with the following logical structure: + * struct_field { + * string_field1 + * } + * The order of the fields in the read session schema is derived from the + * table schema and does not correspond to the order in which the fields are + * specified in this list. + * + * Generated from protobuf field repeated string selected_fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSelectedFields() + { + return $this->selected_fields; + } + + /** + * Optional. The names of the fields in the table to be returned. If no + * field names are specified, then all fields in the table are returned. + * Nested fields -- the child elements of a STRUCT field -- can be selected + * individually using their fully-qualified names, and will be returned as + * record fields containing only the selected nested fields. If a STRUCT + * field is specified in the selected fields list, all of the child elements + * will be returned. + * As an example, consider a table with the following schema: + * { + * "name": "struct_field", + * "type": "RECORD", + * "mode": "NULLABLE", + * "fields": [ + * { + * "name": "string_field1", + * "type": "STRING", + * . "mode": "NULLABLE" + * }, + * { + * "name": "string_field2", + * "type": "STRING", + * "mode": "NULLABLE" + * } + * ] + * } + * Specifying "struct_field" in the selected fields list will result in a + * read session schema with the following logical structure: + * struct_field { + * string_field1 + * string_field2 + * } + * Specifying "struct_field.string_field1" in the selected fields list will + * result in a read session schema with the following logical structure: + * struct_field { + * string_field1 + * } + * The order of the fields in the read session schema is derived from the + * table schema and does not correspond to the order in which the fields are + * specified in this list. + * + * Generated from protobuf field repeated string selected_fields = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSelectedFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->selected_fields = $arr; + + return $this; + } + + /** + * SQL text filtering statement, similar to a WHERE clause in a query. + * Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + * Restricted to a maximum length for 1 MB. + * + * Generated from protobuf field string row_restriction = 2; + * @return string + */ + public function getRowRestriction() + { + return $this->row_restriction; + } + + /** + * SQL text filtering statement, similar to a WHERE clause in a query. + * Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + * Restricted to a maximum length for 1 MB. + * + * Generated from protobuf field string row_restriction = 2; + * @param string $var + * @return $this + */ + public function setRowRestriction($var) + { + GPBUtil::checkString($var, True); + $this->row_restriction = $var; + + return $this; + } + + /** + * Optional. Options specific to the Apache Arrow output format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions|null + */ + public function getArrowSerializationOptions() + { + return $this->readOneof(3); + } + + public function hasArrowSerializationOptions() + { + return $this->hasOneof(3); + } + + /** + * Optional. Options specific to the Apache Arrow output format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $var + * @return $this + */ + public function setArrowSerializationOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Options specific to the Apache Avro output format + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions|null + */ + public function getAvroSerializationOptions() + { + return $this->readOneof(4); + } + + public function hasAvroSerializationOptions() + { + return $this->hasOneof(4); + } + + /** + * Optional. Options specific to the Apache Avro output format + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions $var + * @return $this + */ + public function setAvroSerializationOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. Specifies a table sampling percentage. Specifically, the query + * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + * sampling percentage is applied at the data block granularity. It will + * randomly choose for each data block whether to read the rows in that data + * block. For more details, see + * https://cloud.google.com/bigquery/docs/table-sampling) + * + * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getSamplePercentage() + { + return isset($this->sample_percentage) ? $this->sample_percentage : 0.0; + } + + public function hasSamplePercentage() + { + return isset($this->sample_percentage); + } + + public function clearSamplePercentage() + { + unset($this->sample_percentage); + } + + /** + * Optional. Specifies a table sampling percentage. Specifically, the query + * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + * sampling percentage is applied at the data block granularity. It will + * randomly choose for each data block whether to read the rows in that data + * block. For more details, see + * https://cloud.google.com/bigquery/docs/table-sampling) + * + * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setSamplePercentage($var) + { + GPBUtil::checkDouble($var); + $this->sample_percentage = $var; + + return $this; + } + + /** + * Optional. Set response_compression_codec when creating a read session to + * enable application-level compression of ReadRows responses. + * + * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getResponseCompressionCodec() + { + return isset($this->response_compression_codec) ? $this->response_compression_codec : 0; + } + + public function hasResponseCompressionCodec() + { + return isset($this->response_compression_codec); + } + + public function clearResponseCompressionCodec() + { + unset($this->response_compression_codec); + } + + /** + * Optional. Set response_compression_codec when creating a read session to + * enable application-level compression of ReadRows responses. + * + * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setResponseCompressionCodec($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions\ResponseCompressionCodec::class); + $this->response_compression_codec = $var; + + return $this; + } + + /** + * @return string + */ + public function getOutputFormatSerializationOptions() + { + return $this->whichOneof("output_format_serialization_options"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TableReadOptions::class, \Google\Cloud\BigQuery\Storage\V1\ReadSession_TableReadOptions::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php new file mode 100644 index 000000000000..e64ed46852b7 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php @@ -0,0 +1,63 @@ +google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec + */ +class ResponseCompressionCodec +{ + /** + * Default is no compression. + * + * Generated from protobuf enum RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0; + */ + const RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0; + /** + * Use raw LZ4 compression. + * + * Generated from protobuf enum RESPONSE_COMPRESSION_CODEC_LZ4 = 2; + */ + const RESPONSE_COMPRESSION_CODEC_LZ4 = 2; + + private static $valueToName = [ + self::RESPONSE_COMPRESSION_CODEC_UNSPECIFIED => 'RESPONSE_COMPRESSION_CODEC_UNSPECIFIED', + self::RESPONSE_COMPRESSION_CODEC_LZ4 => 'RESPONSE_COMPRESSION_CODEC_LZ4', + ]; + + 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(ResponseCompressionCodec::class, \Google\Cloud\BigQuery\Storage\V1\ReadSession_TableReadOptions_ResponseCompressionCodec::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php new file mode 100644 index 000000000000..c2f22fa51496 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php @@ -0,0 +1,73 @@ +google.cloud.bigquery.storage.v1.ReadStream + */ +class ReadStream extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + * + * 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; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php new file mode 100644 index 000000000000..123eae533c94 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php @@ -0,0 +1,135 @@ +google.cloud.bigquery.storage.v1.RowError + */ +class RowError extends \Google\Protobuf\Internal\Message +{ + /** + * Index of the malformed row in the request. + * + * Generated from protobuf field int64 index = 1; + */ + protected $index = 0; + /** + * Structured error reason for a row error. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; + */ + protected $code = 0; + /** + * Description of the issue encountered when processing the row. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $index + * Index of the malformed row in the request. + * @type int $code + * Structured error reason for a row error. + * @type string $message + * Description of the issue encountered when processing the row. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Index of the malformed row in the request. + * + * Generated from protobuf field int64 index = 1; + * @return int|string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Index of the malformed row in the request. + * + * Generated from protobuf field int64 index = 1; + * @param int|string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt64($var); + $this->index = $var; + + return $this; + } + + /** + * Structured error reason for a row error. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Structured error reason for a row error. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\RowError\RowErrorCode::class); + $this->code = $var; + + return $this; + } + + /** + * Description of the issue encountered when processing the row. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Description of the issue encountered when processing the row. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php new file mode 100644 index 000000000000..753c651381c7 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php @@ -0,0 +1,57 @@ +google.cloud.bigquery.storage.v1.RowError.RowErrorCode + */ +class RowErrorCode +{ + /** + * Default error. + * + * Generated from protobuf enum ROW_ERROR_CODE_UNSPECIFIED = 0; + */ + const ROW_ERROR_CODE_UNSPECIFIED = 0; + /** + * One or more fields in the row has errors. + * + * Generated from protobuf enum FIELDS_ERROR = 1; + */ + const FIELDS_ERROR = 1; + + private static $valueToName = [ + self::ROW_ERROR_CODE_UNSPECIFIED => 'ROW_ERROR_CODE_UNSPECIFIED', + self::FIELDS_ERROR => 'FIELDS_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(RowErrorCode::class, \Google\Cloud\BigQuery\Storage\V1\RowError_RowErrorCode::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php new file mode 100644 index 000000000000..7536ed18b71f --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php @@ -0,0 +1,125 @@ +google.cloud.bigquery.storage.v1.SplitReadStreamRequest + */ +class SplitReadStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the stream to split. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + * + * Generated from protobuf field double fraction = 2; + */ + protected $fraction = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the stream to split. + * @type float $fraction + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the stream to split. + * + * 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. Name of the stream to split. + * + * 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; + } + + /** + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + * + * Generated from protobuf field double fraction = 2; + * @return float + */ + public function getFraction() + { + return $this->fraction; + } + + /** + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + * + * Generated from protobuf field double fraction = 2; + * @param float $var + * @return $this + */ + public function setFraction($var) + { + GPBUtil::checkDouble($var); + $this->fraction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php new file mode 100644 index 000000000000..272562b4ea98 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php @@ -0,0 +1,133 @@ +google.cloud.bigquery.storage.v1.SplitReadStreamResponse + */ +class SplitReadStreamResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; + */ + protected $primary_stream = null; + /** + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; + */ + protected $remainder_stream = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream $primary_stream + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream $remainder_stream + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadStream|null + */ + public function getPrimaryStream() + { + return $this->primary_stream; + } + + public function hasPrimaryStream() + { + return isset($this->primary_stream); + } + + public function clearPrimaryStream() + { + unset($this->primary_stream); + } + + /** + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream $var + * @return $this + */ + public function setPrimaryStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); + $this->primary_stream = $var; + + return $this; + } + + /** + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadStream|null + */ + public function getRemainderStream() + { + return $this->remainder_stream; + } + + public function hasRemainderStream() + { + return isset($this->remainder_stream); + } + + public function clearRemainderStream() + { + unset($this->remainder_stream); + } + + /** + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream $var + * @return $this + */ + public function setRemainderStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); + $this->remainder_stream = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php new file mode 100644 index 000000000000..c5d4423b5b73 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php @@ -0,0 +1,138 @@ +google.cloud.bigquery.storage.v1.StorageError + */ +class StorageError extends \Google\Protobuf\Internal\Message +{ + /** + * BigQuery Storage specific error code. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; + */ + protected $code = 0; + /** + * Name of the failed entity. + * + * Generated from protobuf field string entity = 2; + */ + protected $entity = ''; + /** + * Message that describes the error. + * + * Generated from protobuf field string error_message = 3; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * BigQuery Storage specific error code. + * @type string $entity + * Name of the failed entity. + * @type string $error_message + * Message that describes the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * BigQuery Storage specific error code. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * BigQuery Storage specific error code. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\StorageError\StorageErrorCode::class); + $this->code = $var; + + return $this; + } + + /** + * Name of the failed entity. + * + * Generated from protobuf field string entity = 2; + * @return string + */ + public function getEntity() + { + return $this->entity; + } + + /** + * Name of the failed entity. + * + * 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; + } + + /** + * Message that describes the error. + * + * Generated from protobuf field string error_message = 3; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * Message that describes the error. + * + * Generated from protobuf field string error_message = 3; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php new file mode 100644 index 000000000000..47c1405c8364 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php @@ -0,0 +1,154 @@ +google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode + */ +class StorageErrorCode +{ + /** + * Default error. + * + * Generated from protobuf enum STORAGE_ERROR_CODE_UNSPECIFIED = 0; + */ + const STORAGE_ERROR_CODE_UNSPECIFIED = 0; + /** + * Table is not found in the system. + * + * Generated from protobuf enum TABLE_NOT_FOUND = 1; + */ + const TABLE_NOT_FOUND = 1; + /** + * Stream is already committed. + * + * Generated from protobuf enum STREAM_ALREADY_COMMITTED = 2; + */ + const STREAM_ALREADY_COMMITTED = 2; + /** + * Stream is not found. + * + * Generated from protobuf enum STREAM_NOT_FOUND = 3; + */ + const STREAM_NOT_FOUND = 3; + /** + * Invalid Stream type. + * For example, you try to commit a stream that is not pending. + * + * Generated from protobuf enum INVALID_STREAM_TYPE = 4; + */ + const INVALID_STREAM_TYPE = 4; + /** + * Invalid Stream state. + * For example, you try to commit a stream that is not finalized or is + * garbaged. + * + * Generated from protobuf enum INVALID_STREAM_STATE = 5; + */ + const INVALID_STREAM_STATE = 5; + /** + * Stream is finalized. + * + * Generated from protobuf enum STREAM_FINALIZED = 6; + */ + const STREAM_FINALIZED = 6; + /** + * There is a schema mismatch and it is caused by user schema has extra + * field than bigquery schema. + * + * Generated from protobuf enum SCHEMA_MISMATCH_EXTRA_FIELDS = 7; + */ + const SCHEMA_MISMATCH_EXTRA_FIELDS = 7; + /** + * Offset already exists. + * + * Generated from protobuf enum OFFSET_ALREADY_EXISTS = 8; + */ + const OFFSET_ALREADY_EXISTS = 8; + /** + * Offset out of range. + * + * Generated from protobuf enum OFFSET_OUT_OF_RANGE = 9; + */ + const OFFSET_OUT_OF_RANGE = 9; + /** + * Customer-managed encryption key (CMEK) not provided for CMEK-enabled + * data. + * + * Generated from protobuf enum CMEK_NOT_PROVIDED = 10; + */ + const CMEK_NOT_PROVIDED = 10; + /** + * Customer-managed encryption key (CMEK) was incorrectly provided. + * + * Generated from protobuf enum INVALID_CMEK_PROVIDED = 11; + */ + const INVALID_CMEK_PROVIDED = 11; + /** + * There is an encryption error while using customer-managed encryption key. + * + * Generated from protobuf enum CMEK_ENCRYPTION_ERROR = 12; + */ + const CMEK_ENCRYPTION_ERROR = 12; + /** + * Key Management Service (KMS) service returned an error, which can be + * retried. + * + * Generated from protobuf enum KMS_SERVICE_ERROR = 13; + */ + const KMS_SERVICE_ERROR = 13; + /** + * Permission denied while using customer-managed encryption key. + * + * Generated from protobuf enum KMS_PERMISSION_DENIED = 14; + */ + const KMS_PERMISSION_DENIED = 14; + + private static $valueToName = [ + self::STORAGE_ERROR_CODE_UNSPECIFIED => 'STORAGE_ERROR_CODE_UNSPECIFIED', + self::TABLE_NOT_FOUND => 'TABLE_NOT_FOUND', + self::STREAM_ALREADY_COMMITTED => 'STREAM_ALREADY_COMMITTED', + self::STREAM_NOT_FOUND => 'STREAM_NOT_FOUND', + self::INVALID_STREAM_TYPE => 'INVALID_STREAM_TYPE', + self::INVALID_STREAM_STATE => 'INVALID_STREAM_STATE', + self::STREAM_FINALIZED => 'STREAM_FINALIZED', + self::SCHEMA_MISMATCH_EXTRA_FIELDS => 'SCHEMA_MISMATCH_EXTRA_FIELDS', + self::OFFSET_ALREADY_EXISTS => 'OFFSET_ALREADY_EXISTS', + self::OFFSET_OUT_OF_RANGE => 'OFFSET_OUT_OF_RANGE', + self::CMEK_NOT_PROVIDED => 'CMEK_NOT_PROVIDED', + self::INVALID_CMEK_PROVIDED => 'INVALID_CMEK_PROVIDED', + self::CMEK_ENCRYPTION_ERROR => 'CMEK_ENCRYPTION_ERROR', + self::KMS_SERVICE_ERROR => 'KMS_SERVICE_ERROR', + self::KMS_PERMISSION_DENIED => 'KMS_PERMISSION_DENIED', + ]; + + 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(StorageErrorCode::class, \Google\Cloud\BigQuery\Storage\V1\StorageError_StorageErrorCode::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php new file mode 100644 index 000000000000..595b148d28d7 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php @@ -0,0 +1,77 @@ +google.cloud.bigquery.storage.v1.StreamStats + */ +class StreamStats extends \Google\Protobuf\Internal\Message +{ + /** + * Represents the progress of the current stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; + */ + protected $progress = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress $progress + * Represents the progress of the current stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Represents the progress of the current stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress|null + */ + public function getProgress() + { + return $this->progress; + } + + public function hasProgress() + { + return isset($this->progress); + } + + public function clearProgress() + { + unset($this->progress); + } + + /** + * Represents the progress of the current stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress $var + * @return $this + */ + public function setProgress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress::class); + $this->progress = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php new file mode 100644 index 000000000000..0c145546b306 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php @@ -0,0 +1,142 @@ +google.cloud.bigquery.storage.v1.StreamStats.Progress + */ +class Progress extends \Google\Protobuf\Internal\Message +{ + /** + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + * + * Generated from protobuf field double at_response_start = 1; + */ + protected $at_response_start = 0.0; + /** + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + * + * Generated from protobuf field double at_response_end = 2; + */ + protected $at_response_end = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $at_response_start + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + * @type float $at_response_end + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + * + * Generated from protobuf field double at_response_start = 1; + * @return float + */ + public function getAtResponseStart() + { + return $this->at_response_start; + } + + /** + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + * + * Generated from protobuf field double at_response_start = 1; + * @param float $var + * @return $this + */ + public function setAtResponseStart($var) + { + GPBUtil::checkDouble($var); + $this->at_response_start = $var; + + return $this; + } + + /** + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + * + * Generated from protobuf field double at_response_end = 2; + * @return float + */ + public function getAtResponseEnd() + { + return $this->at_response_end; + } + + /** + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + * + * Generated from protobuf field double at_response_end = 2; + * @param float $var + * @return $this + */ + public function setAtResponseEnd($var) + { + GPBUtil::checkDouble($var); + $this->at_response_end = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Progress::class, \Google\Cloud\BigQuery\Storage\V1\StreamStats_Progress::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php new file mode 100644 index 000000000000..f435b08ae188 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php @@ -0,0 +1,535 @@ +google.cloud.bigquery.storage.v1.TableFieldSchema + */ +class TableFieldSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field name. The name must contain only letters (a-z, A-Z), + * numbers (0-9), or underscores (_), and must start with a letter or + * underscore. The maximum length is 128 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The field data type. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Optional. The field mode. The default value is NULLABLE. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = 0; + /** + * Optional. Describes the nested schema fields if the type property is set to + * STRUCT. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $fields; + /** + * Optional. The field description. The maximum length is 1,024 characters. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Maximum length of values of this field for STRINGS or BYTES. + * If max_length is not specified, no maximum length constraint is imposed + * on this field. + * If type = "STRING", then max_length represents the maximum UTF-8 + * length of strings in this field. + * If type = "BYTES", then max_length represents the maximum number of + * bytes in this field. + * It is invalid to set this field if type is not "STRING" or "BYTES". + * + * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_length = 0; + /** + * Optional. Precision (maximum number of total digits in base 10) and scale + * (maximum number of digits in the fractional part in base 10) constraints + * for values of this field for NUMERIC or BIGNUMERIC. + * It is invalid to set precision or scale if type is not "NUMERIC" or + * "BIGNUMERIC". + * If precision and scale are not specified, no value range constraint is + * imposed on this field insofar as values are permitted by the type. + * Values of this NUMERIC or BIGNUMERIC field must be in this range when: + * * Precision (P) and scale (S) are specified: + * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + * * Precision (P) is specified but not scale (and thus scale is + * interpreted to be equal to zero): + * [-10^P + 1, 10^P - 1]. + * Acceptable values for precision and scale if both are specified: + * * If type = "NUMERIC": + * 1 <= precision - scale <= 29 and 0 <= scale <= 9. + * * If type = "BIGNUMERIC": + * 1 <= precision - scale <= 38 and 0 <= scale <= 38. + * Acceptable values for precision if only precision is specified but not + * scale (and thus scale is interpreted to be equal to zero): + * * If type = "NUMERIC": 1 <= precision <= 29. + * * If type = "BIGNUMERIC": 1 <= precision <= 38. + * If scale is specified but not precision, then it is invalid. + * + * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $precision = 0; + /** + * Optional. See documentation for precision. + * + * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scale = 0; + /** + * Optional. A SQL expression to specify the [default value] + * (https://cloud.google.com/bigquery/docs/default-values) for this field. + * + * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_value_expression = ''; + /** + * Optional. The subtype of the RANGE, if the type of this field is RANGE. If + * the type is RANGE, this field is required. Possible values for the field + * element type of a RANGE include: + * * DATE + * * DATETIME + * * TIMESTAMP + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $range_element_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The field name. The name must contain only letters (a-z, A-Z), + * numbers (0-9), or underscores (_), and must start with a letter or + * underscore. The maximum length is 128 characters. + * @type int $type + * Required. The field data type. + * @type int $mode + * Optional. The field mode. The default value is NULLABLE. + * @type array<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema>|\Google\Protobuf\Internal\RepeatedField $fields + * Optional. Describes the nested schema fields if the type property is set to + * STRUCT. + * @type string $description + * Optional. The field description. The maximum length is 1,024 characters. + * @type int|string $max_length + * Optional. Maximum length of values of this field for STRINGS or BYTES. + * If max_length is not specified, no maximum length constraint is imposed + * on this field. + * If type = "STRING", then max_length represents the maximum UTF-8 + * length of strings in this field. + * If type = "BYTES", then max_length represents the maximum number of + * bytes in this field. + * It is invalid to set this field if type is not "STRING" or "BYTES". + * @type int|string $precision + * Optional. Precision (maximum number of total digits in base 10) and scale + * (maximum number of digits in the fractional part in base 10) constraints + * for values of this field for NUMERIC or BIGNUMERIC. + * It is invalid to set precision or scale if type is not "NUMERIC" or + * "BIGNUMERIC". + * If precision and scale are not specified, no value range constraint is + * imposed on this field insofar as values are permitted by the type. + * Values of this NUMERIC or BIGNUMERIC field must be in this range when: + * * Precision (P) and scale (S) are specified: + * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + * * Precision (P) is specified but not scale (and thus scale is + * interpreted to be equal to zero): + * [-10^P + 1, 10^P - 1]. + * Acceptable values for precision and scale if both are specified: + * * If type = "NUMERIC": + * 1 <= precision - scale <= 29 and 0 <= scale <= 9. + * * If type = "BIGNUMERIC": + * 1 <= precision - scale <= 38 and 0 <= scale <= 38. + * Acceptable values for precision if only precision is specified but not + * scale (and thus scale is interpreted to be equal to zero): + * * If type = "NUMERIC": 1 <= precision <= 29. + * * If type = "BIGNUMERIC": 1 <= precision <= 38. + * If scale is specified but not precision, then it is invalid. + * @type int|string $scale + * Optional. See documentation for precision. + * @type string $default_value_expression + * Optional. A SQL expression to specify the [default value] + * (https://cloud.google.com/bigquery/docs/default-values) for this field. + * @type \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType $range_element_type + * Optional. The subtype of the RANGE, if the type of this field is RANGE. If + * the type is RANGE, this field is required. Possible values for the field + * element type of a RANGE include: + * * DATE + * * DATETIME + * * TIMESTAMP + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field name. The name must contain only letters (a-z, A-Z), + * numbers (0-9), or underscores (_), and must start with a letter or + * underscore. The maximum length is 128 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The field name. The name must contain only letters (a-z, A-Z), + * numbers (0-9), or underscores (_), and must start with a letter or + * underscore. The maximum length is 128 characters. + * + * 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. The field data type. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The field data type. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. The field mode. The default value is NULLABLE. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. The field mode. The default value is NULLABLE. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Optional. Describes the nested schema fields if the type property is set to + * STRUCT. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * Optional. Describes the nested schema fields if the type property is set to + * STRUCT. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema::class); + $this->fields = $arr; + + return $this; + } + + /** + * Optional. The field description. The maximum length is 1,024 characters. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The field description. The maximum length is 1,024 characters. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Maximum length of values of this field for STRINGS or BYTES. + * If max_length is not specified, no maximum length constraint is imposed + * on this field. + * If type = "STRING", then max_length represents the maximum UTF-8 + * length of strings in this field. + * If type = "BYTES", then max_length represents the maximum number of + * bytes in this field. + * It is invalid to set this field if type is not "STRING" or "BYTES". + * + * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxLength() + { + return $this->max_length; + } + + /** + * Optional. Maximum length of values of this field for STRINGS or BYTES. + * If max_length is not specified, no maximum length constraint is imposed + * on this field. + * If type = "STRING", then max_length represents the maximum UTF-8 + * length of strings in this field. + * If type = "BYTES", then max_length represents the maximum number of + * bytes in this field. + * It is invalid to set this field if type is not "STRING" or "BYTES". + * + * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxLength($var) + { + GPBUtil::checkInt64($var); + $this->max_length = $var; + + return $this; + } + + /** + * Optional. Precision (maximum number of total digits in base 10) and scale + * (maximum number of digits in the fractional part in base 10) constraints + * for values of this field for NUMERIC or BIGNUMERIC. + * It is invalid to set precision or scale if type is not "NUMERIC" or + * "BIGNUMERIC". + * If precision and scale are not specified, no value range constraint is + * imposed on this field insofar as values are permitted by the type. + * Values of this NUMERIC or BIGNUMERIC field must be in this range when: + * * Precision (P) and scale (S) are specified: + * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + * * Precision (P) is specified but not scale (and thus scale is + * interpreted to be equal to zero): + * [-10^P + 1, 10^P - 1]. + * Acceptable values for precision and scale if both are specified: + * * If type = "NUMERIC": + * 1 <= precision - scale <= 29 and 0 <= scale <= 9. + * * If type = "BIGNUMERIC": + * 1 <= precision - scale <= 38 and 0 <= scale <= 38. + * Acceptable values for precision if only precision is specified but not + * scale (and thus scale is interpreted to be equal to zero): + * * If type = "NUMERIC": 1 <= precision <= 29. + * * If type = "BIGNUMERIC": 1 <= precision <= 38. + * If scale is specified but not precision, then it is invalid. + * + * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getPrecision() + { + return $this->precision; + } + + /** + * Optional. Precision (maximum number of total digits in base 10) and scale + * (maximum number of digits in the fractional part in base 10) constraints + * for values of this field for NUMERIC or BIGNUMERIC. + * It is invalid to set precision or scale if type is not "NUMERIC" or + * "BIGNUMERIC". + * If precision and scale are not specified, no value range constraint is + * imposed on this field insofar as values are permitted by the type. + * Values of this NUMERIC or BIGNUMERIC field must be in this range when: + * * Precision (P) and scale (S) are specified: + * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + * * Precision (P) is specified but not scale (and thus scale is + * interpreted to be equal to zero): + * [-10^P + 1, 10^P - 1]. + * Acceptable values for precision and scale if both are specified: + * * If type = "NUMERIC": + * 1 <= precision - scale <= 29 and 0 <= scale <= 9. + * * If type = "BIGNUMERIC": + * 1 <= precision - scale <= 38 and 0 <= scale <= 38. + * Acceptable values for precision if only precision is specified but not + * scale (and thus scale is interpreted to be equal to zero): + * * If type = "NUMERIC": 1 <= precision <= 29. + * * If type = "BIGNUMERIC": 1 <= precision <= 38. + * If scale is specified but not precision, then it is invalid. + * + * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setPrecision($var) + { + GPBUtil::checkInt64($var); + $this->precision = $var; + + return $this; + } + + /** + * Optional. See documentation for precision. + * + * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getScale() + { + return $this->scale; + } + + /** + * Optional. See documentation for precision. + * + * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setScale($var) + { + GPBUtil::checkInt64($var); + $this->scale = $var; + + return $this; + } + + /** + * Optional. A SQL expression to specify the [default value] + * (https://cloud.google.com/bigquery/docs/default-values) for this field. + * + * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDefaultValueExpression() + { + return $this->default_value_expression; + } + + /** + * Optional. A SQL expression to specify the [default value] + * (https://cloud.google.com/bigquery/docs/default-values) for this field. + * + * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDefaultValueExpression($var) + { + GPBUtil::checkString($var, True); + $this->default_value_expression = $var; + + return $this; + } + + /** + * Optional. The subtype of the RANGE, if the type of this field is RANGE. If + * the type is RANGE, this field is required. Possible values for the field + * element type of a RANGE include: + * * DATE + * * DATETIME + * * TIMESTAMP + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType|null + */ + public function getRangeElementType() + { + return $this->range_element_type; + } + + public function hasRangeElementType() + { + return isset($this->range_element_type); + } + + public function clearRangeElementType() + { + unset($this->range_element_type); + } + + /** + * Optional. The subtype of the RANGE, if the type of this field is RANGE. If + * the type is RANGE, this field is required. Possible values for the field + * element type of a RANGE include: + * * DATE + * * DATETIME + * * TIMESTAMP + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType $var + * @return $this + */ + public function setRangeElementType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType::class); + $this->range_element_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php new file mode 100644 index 000000000000..3ce7bc2b9dac --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php @@ -0,0 +1,70 @@ +google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType + */ +class FieldElementType extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of a field element. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. The type of a field element. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of a field element. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of a field element. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Type::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FieldElementType::class, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema_FieldElementType::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php new file mode 100644 index 000000000000..8fc99eec5196 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php @@ -0,0 +1,63 @@ +google.cloud.bigquery.storage.v1.TableFieldSchema.Mode + */ +class Mode +{ + /** + * Illegal value + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum NULLABLE = 1; + */ + const NULLABLE = 1; + /** + * Generated from protobuf enum REQUIRED = 2; + */ + const REQUIRED = 2; + /** + * Generated from protobuf enum REPEATED = 3; + */ + const REPEATED = 3; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::NULLABLE => 'NULLABLE', + self::REQUIRED => 'REQUIRED', + 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\BigQuery\Storage\V1\TableFieldSchema_Mode::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php new file mode 100644 index 000000000000..bf9405b5ff75 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php @@ -0,0 +1,160 @@ +google.cloud.bigquery.storage.v1.TableFieldSchema.Type + */ +class Type +{ + /** + * Illegal value + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * 64K, UTF8 + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * 64-bit signed + * + * Generated from protobuf enum INT64 = 2; + */ + const INT64 = 2; + /** + * 64-bit IEEE floating point + * + * Generated from protobuf enum DOUBLE = 3; + */ + const DOUBLE = 3; + /** + * Aggregate type + * + * Generated from protobuf enum STRUCT = 4; + */ + const STRUCT = 4; + /** + * 64K, Binary + * + * Generated from protobuf enum BYTES = 5; + */ + const BYTES = 5; + /** + * 2-valued + * + * Generated from protobuf enum BOOL = 6; + */ + const BOOL = 6; + /** + * 64-bit signed usec since UTC epoch + * + * Generated from protobuf enum TIMESTAMP = 7; + */ + const TIMESTAMP = 7; + /** + * Civil date - Year, Month, Day + * + * Generated from protobuf enum DATE = 8; + */ + const DATE = 8; + /** + * Civil time - Hour, Minute, Second, Microseconds + * + * Generated from protobuf enum TIME = 9; + */ + const TIME = 9; + /** + * Combination of civil date and civil time + * + * Generated from protobuf enum DATETIME = 10; + */ + const DATETIME = 10; + /** + * Geography object + * + * Generated from protobuf enum GEOGRAPHY = 11; + */ + const GEOGRAPHY = 11; + /** + * Numeric value + * + * Generated from protobuf enum NUMERIC = 12; + */ + const NUMERIC = 12; + /** + * BigNumeric value + * + * Generated from protobuf enum BIGNUMERIC = 13; + */ + const BIGNUMERIC = 13; + /** + * Interval + * + * Generated from protobuf enum INTERVAL = 14; + */ + const INTERVAL = 14; + /** + * JSON, String + * + * Generated from protobuf enum JSON = 15; + */ + const JSON = 15; + /** + * RANGE + * + * Generated from protobuf enum RANGE = 16; + */ + const RANGE = 16; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::INT64 => 'INT64', + self::DOUBLE => 'DOUBLE', + self::STRUCT => 'STRUCT', + self::BYTES => 'BYTES', + self::BOOL => 'BOOL', + self::TIMESTAMP => 'TIMESTAMP', + self::DATE => 'DATE', + self::TIME => 'TIME', + self::DATETIME => 'DATETIME', + self::GEOGRAPHY => 'GEOGRAPHY', + self::NUMERIC => 'NUMERIC', + self::BIGNUMERIC => 'BIGNUMERIC', + self::INTERVAL => 'INTERVAL', + self::JSON => 'JSON', + self::RANGE => 'RANGE', + ]; + + 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\BigQuery\Storage\V1\TableFieldSchema_Type::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php new file mode 100644 index 000000000000..8aaba43df1d9 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php @@ -0,0 +1,69 @@ +google.cloud.bigquery.storage.v1.TableSchema + */ +class TableSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Describes the fields in a table. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema>|\Google\Protobuf\Internal\RepeatedField $fields + * Describes the fields in a table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); + parent::__construct($data); + } + + /** + * Describes the fields in a table. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * Describes the fields in a table. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; + * @param array<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php new file mode 100644 index 000000000000..2680abd3dee0 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php @@ -0,0 +1,71 @@ +google.cloud.bigquery.storage.v1.ThrottleState + */ +class ThrottleState extends \Google\Protobuf\Internal\Message +{ + /** + * How much this connection is being throttled. Zero means no throttling, + * 100 means fully throttled. + * + * Generated from protobuf field int32 throttle_percent = 1; + */ + protected $throttle_percent = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $throttle_percent + * How much this connection is being throttled. Zero means no throttling, + * 100 means fully throttled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * How much this connection is being throttled. Zero means no throttling, + * 100 means fully throttled. + * + * Generated from protobuf field int32 throttle_percent = 1; + * @return int + */ + public function getThrottlePercent() + { + return $this->throttle_percent; + } + + /** + * How much this connection is being throttled. Zero means no throttling, + * 100 means fully throttled. + * + * Generated from protobuf field int32 throttle_percent = 1; + * @param int $var + * @return $this + */ + public function setThrottlePercent($var) + { + GPBUtil::checkInt32($var); + $this->throttle_percent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php new file mode 100644 index 000000000000..c49dce81a82e --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php @@ -0,0 +1,341 @@ +google.cloud.bigquery.storage.v1.WriteStream + */ +class WriteStream extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the stream, in the form + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Immutable. Type of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Output only. Create time of the stream. For the _default stream, this is + * the creation_time of the table. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Commit time of the stream. + * If a stream is of `COMMITTED` type, then it will have a commit_time same as + * `create_time`. If the stream is of `PENDING` type, empty commit_time + * means it is not committed. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $commit_time = null; + /** + * Output only. The schema of the destination table. It is only returned in + * `CreateWriteStream` response. Caller should generate data that's + * compatible with this schema to send in initial `AppendRowsRequest`. + * The table schema could go out of date during the life time of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $table_schema = null; + /** + * Immutable. Mode of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $write_mode = 0; + /** + * Immutable. The geographic location where the stream's dataset resides. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the stream, in the form + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * @type int $type + * Immutable. Type of the stream. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the stream. For the _default stream, this is + * the creation_time of the table. + * @type \Google\Protobuf\Timestamp $commit_time + * Output only. Commit time of the stream. + * If a stream is of `COMMITTED` type, then it will have a commit_time same as + * `create_time`. If the stream is of `PENDING` type, empty commit_time + * means it is not committed. + * @type \Google\Cloud\BigQuery\Storage\V1\TableSchema $table_schema + * Output only. The schema of the destination table. It is only returned in + * `CreateWriteStream` response. Caller should generate data that's + * compatible with this schema to send in initial `AppendRowsRequest`. + * The table schema could go out of date during the life time of the stream. + * @type int $write_mode + * Immutable. Mode of the stream. + * @type string $location + * Immutable. The geographic location where the stream's dataset resides. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the stream, in the form + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the stream, in the form + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * 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; + } + + /** + * Immutable. Type of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Immutable. Type of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Create time of the stream. For the _default stream, this is + * the creation_time of the table. + * + * 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. Create time of the stream. For the _default stream, this is + * the creation_time of the table. + * + * 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. Commit time of the stream. + * If a stream is of `COMMITTED` type, then it will have a commit_time same as + * `create_time`. If the stream is of `PENDING` type, empty commit_time + * means it is not committed. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * Output only. Commit time of the stream. + * If a stream is of `COMMITTED` type, then it will have a commit_time same as + * `create_time`. If the stream is of `PENDING` type, empty commit_time + * means it is not committed. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + + /** + * Output only. The schema of the destination table. It is only returned in + * `CreateWriteStream` response. Caller should generate data that's + * compatible with this schema to send in initial `AppendRowsRequest`. + * The table schema could go out of date during the life time of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\TableSchema|null + */ + public function getTableSchema() + { + return $this->table_schema; + } + + public function hasTableSchema() + { + return isset($this->table_schema); + } + + public function clearTableSchema() + { + unset($this->table_schema); + } + + /** + * Output only. The schema of the destination table. It is only returned in + * `CreateWriteStream` response. Caller should generate data that's + * compatible with this schema to send in initial `AppendRowsRequest`. + * The table schema could go out of date during the life time of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\TableSchema $var + * @return $this + */ + public function setTableSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableSchema::class); + $this->table_schema = $var; + + return $this; + } + + /** + * Immutable. Mode of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getWriteMode() + { + return $this->write_mode; + } + + /** + * Immutable. Mode of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setWriteMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream\WriteMode::class); + $this->write_mode = $var; + + return $this; + } + + /** + * Immutable. The geographic location where the stream's dataset resides. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Immutable. The geographic location where the stream's dataset resides. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php new file mode 100644 index 000000000000..f8c772aef35d --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php @@ -0,0 +1,72 @@ +google.cloud.bigquery.storage.v1.WriteStream.Type + */ +class Type +{ + /** + * Unknown type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Data will commit automatically and appear as soon as the write is + * acknowledged. + * + * Generated from protobuf enum COMMITTED = 1; + */ + const COMMITTED = 1; + /** + * Data is invisible until the stream is committed. + * + * Generated from protobuf enum PENDING = 2; + */ + const PENDING = 2; + /** + * Data is only visible up to the offset to which it was flushed. + * + * Generated from protobuf enum BUFFERED = 3; + */ + const BUFFERED = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::COMMITTED => 'COMMITTED', + self::PENDING => 'PENDING', + self::BUFFERED => 'BUFFERED', + ]; + + 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\BigQuery\Storage\V1\WriteStream_Type::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php new file mode 100644 index 000000000000..1f21103bc93d --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php @@ -0,0 +1,58 @@ +google.cloud.bigquery.storage.v1.WriteStream.WriteMode + */ +class WriteMode +{ + /** + * Unknown type. + * + * Generated from protobuf enum WRITE_MODE_UNSPECIFIED = 0; + */ + const WRITE_MODE_UNSPECIFIED = 0; + /** + * Insert new records into the table. + * It is the default value if customers do not specify it. + * + * Generated from protobuf enum INSERT = 1; + */ + const INSERT = 1; + + private static $valueToName = [ + self::WRITE_MODE_UNSPECIFIED => 'WRITE_MODE_UNSPECIFIED', + self::INSERT => 'INSERT', + ]; + + 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(WriteMode::class, \Google\Cloud\BigQuery\Storage\V1\WriteStream_WriteMode::class); + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php new file mode 100644 index 000000000000..5d008746e9fe --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php @@ -0,0 +1,66 @@ +google.cloud.bigquery.storage.v1.WriteStreamView + */ +class WriteStreamView +{ + /** + * The default / unset value. + * + * Generated from protobuf enum WRITE_STREAM_VIEW_UNSPECIFIED = 0; + */ + const WRITE_STREAM_VIEW_UNSPECIFIED = 0; + /** + * The BASIC projection returns basic metadata about a write stream. The + * basic view does not include schema information. This is the default view + * returned by GetWriteStream. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * The FULL projection returns all available write stream metadata, including + * the schema. CreateWriteStream returns the full projection of write stream + * metadata. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::WRITE_STREAM_VIEW_UNSPECIFIED => 'WRITE_STREAM_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); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php new file mode 100644 index 000000000000..9f0268f26fe2 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setReadSession($readSession); + + // Call the API and handle any network failures. + try { + /** @var ReadSession $response */ + $response = $bigQueryReadClient->createReadSession($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 = BigQueryReadClient::projectName('[PROJECT]'); + + create_read_session_sample($formattedParent); +} +// [END bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php new file mode 100644 index 000000000000..8c6fabde6488 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php @@ -0,0 +1,87 @@ +setReadStream($formattedReadStream); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $bigQueryReadClient->readRows($request); + + /** @var ReadRowsResponse $element */ + foreach ($stream->readAll() 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 +{ + $formattedReadStream = BigQueryReadClient::readStreamName( + '[PROJECT]', + '[LOCATION]', + '[SESSION]', + '[STREAM]' + ); + + read_rows_sample($formattedReadStream); +} +// [END bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php new file mode 100644 index 000000000000..d4ca17c4ca0a --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SplitReadStreamResponse $response */ + $response = $bigQueryReadClient->splitReadStream($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 = BigQueryReadClient::readStreamName( + '[PROJECT]', + '[LOCATION]', + '[SESSION]', + '[STREAM]' + ); + + split_read_stream_sample($formattedName); +} +// [END bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php new file mode 100644 index 000000000000..ce8a38bab12b --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php @@ -0,0 +1,143 @@ +setWriteStream($formattedWriteStream); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $bigQueryWriteClient->appendRows(); + $stream->writeAll([$request,]); + + /** @var AppendRowsResponse $element */ + foreach ($stream->closeWriteAndReadAll() 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 +{ + $formattedWriteStream = BigQueryWriteClient::writeStreamName( + '[PROJECT]', + '[DATASET]', + '[TABLE]', + '[STREAM]' + ); + + append_rows_sample($formattedWriteStream); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php new file mode 100644 index 000000000000..dee9cd4ef5c4 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setWriteStreams($writeStreams); + + // Call the API and handle any network failures. + try { + /** @var BatchCommitWriteStreamsResponse $response */ + $response = $bigQueryWriteClient->batchCommitWriteStreams($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 = BigQueryWriteClient::tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStreamsElement = '[WRITE_STREAMS]'; + + batch_commit_write_streams_sample($formattedParent, $writeStreamsElement); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php new file mode 100644 index 000000000000..42802be34b6c --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setWriteStream($writeStream); + + // Call the API and handle any network failures. + try { + /** @var WriteStream $response */ + $response = $bigQueryWriteClient->createWriteStream($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 = BigQueryWriteClient::tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + + create_write_stream_sample($formattedParent); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php new file mode 100644 index 000000000000..980109a2d895 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var FinalizeWriteStreamResponse $response */ + $response = $bigQueryWriteClient->finalizeWriteStream($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 = BigQueryWriteClient::writeStreamName( + '[PROJECT]', + '[DATASET]', + '[TABLE]', + '[STREAM]' + ); + + finalize_write_stream_sample($formattedName); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php new file mode 100644 index 000000000000..413fe426771e --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php @@ -0,0 +1,83 @@ +setWriteStream($formattedWriteStream); + + // Call the API and handle any network failures. + try { + /** @var FlushRowsResponse $response */ + $response = $bigQueryWriteClient->flushRows($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 +{ + $formattedWriteStream = BigQueryWriteClient::writeStreamName( + '[PROJECT]', + '[DATASET]', + '[TABLE]', + '[STREAM]' + ); + + flush_rows_sample($formattedWriteStream); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php new file mode 100644 index 000000000000..d8bbaf0d5d06 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var WriteStream $response */ + $response = $bigQueryWriteClient->getWriteStream($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 = BigQueryWriteClient::writeStreamName( + '[PROJECT]', + '[DATASET]', + '[TABLE]', + '[STREAM]' + ); + + get_write_stream_sample($formattedName); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php new file mode 100644 index 000000000000..c08dc6a41419 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php @@ -0,0 +1,388 @@ + createReadSessionAsync(CreateReadSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface splitReadStreamAsync(SplitReadStreamRequest $request, array $optionalArgs = []) + */ +final class BigQueryReadClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.storage.v1.BigQueryRead'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigquerystorage.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigquerystorage.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/big_query_read_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/big_query_read_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/big_query_read_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/big_query_read_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a read_session + * resource. + * + * @param string $project + * @param string $location + * @param string $session + * + * @return string The formatted read_session resource. + */ + public static function readSessionName(string $project, string $location, string $session): string + { + return self::getPathTemplate('readSession')->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a read_stream + * resource. + * + * @param string $project + * @param string $location + * @param string $session + * @param string $stream + * + * @return string The formatted read_stream resource. + */ + public static function readStreamName(string $project, string $location, string $session, string $stream): string + { + return self::getPathTemplate('readStream')->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + 'stream' => $stream, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a table + * resource. + * + * @param string $project + * @param string $dataset + * @param string $table + * + * @return string The formatted table resource. + */ + public static function tableName(string $project, string $dataset, string $table): string + { + return self::getPathTemplate('table')->render([ + 'project' => $project, + 'dataset' => $dataset, + 'table' => $table, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - project: projects/{project} + * - readSession: projects/{project}/locations/{location}/sessions/{session} + * - readStream: projects/{project}/locations/{location}/sessions/{session}/streams/{stream} + * - table: projects/{project}/datasets/{dataset}/tables/{table} + * + * 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 'bigquerystorage.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new read session. A read session divides the contents of a + * BigQuery table into one or more streams, which can then be used to read + * data from the table. The read session also specifies properties of the + * data to be read, such as a list of columns or a push-down filter describing + * the rows to be returned. + * + * A particular row can be read by at most one stream. When the caller has + * reached the end of each stream in the session, then all the data in the + * table has been read. + * + * Data is assigned to each stream such that roughly the same number of + * rows can be read from each stream. Because the server-side unit for + * assigning data is collections of rows, the API does not guarantee that + * each stream will return the same number or rows. Additionally, the + * limits are enforced based on the number of pre-filtered rows, so some + * filters can lead to lopsided assignments. + * + * Read sessions automatically expire 6 hours after they are created and do + * not require manual clean-up by the caller. + * + * The async variant is {@see BigQueryReadClient::createReadSessionAsync()} . + * + * @example samples/V1/BigQueryReadClient/create_read_session.php + * + * @param CreateReadSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReadSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReadSession(CreateReadSessionRequest $request, array $callOptions = []): ReadSession + { + return $this->startApiCall('CreateReadSession', $request, $callOptions)->wait(); + } + + /** + * Reads rows from the stream in the format prescribed by the ReadSession. + * Each response contains one or more table rows, up to a maximum of 100 MiB + * per response; read requests which attempt to read individual rows larger + * than 100 MiB will fail. + * + * Each request also returns a set of stream statistics reflecting the current + * state of the stream. + * + * @example samples/V1/BigQueryReadClient/read_rows.php + * + * @param ReadRowsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function readRows(ReadRowsRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('ReadRows', $request, $callOptions); + } + + /** + * Splits a given `ReadStream` into two `ReadStream` objects. These + * `ReadStream` objects are referred to as the primary and the residual + * streams of the split. The original `ReadStream` can still be read from in + * the same manner as before. Both of the returned `ReadStream` objects can + * also be read from, and the rows returned by both child streams will be + * the same as the rows read from the original stream. + * + * Moreover, the two child streams will be allocated back-to-back in the + * original `ReadStream`. Concretely, it is guaranteed that for streams + * original, primary, and residual, that original[0-j] = primary[0-j] and + * original[j-n] = residual[0-m] once the streams have been read to + * completion. + * + * The async variant is {@see BigQueryReadClient::splitReadStreamAsync()} . + * + * @example samples/V1/BigQueryReadClient/split_read_stream.php + * + * @param SplitReadStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SplitReadStreamResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function splitReadStream(SplitReadStreamRequest $request, array $callOptions = []): SplitReadStreamResponse + { + return $this->startApiCall('SplitReadStream', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php new file mode 100644 index 000000000000..7d828b8088c8 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php @@ -0,0 +1,454 @@ + batchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createWriteStreamAsync(CreateWriteStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface finalizeWriteStreamAsync(FinalizeWriteStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface flushRowsAsync(FlushRowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getWriteStreamAsync(GetWriteStreamRequest $request, array $optionalArgs = []) + */ +final class BigQueryWriteClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.storage.v1.BigQueryWrite'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigquerystorage.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigquerystorage.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/bigquery.insertdata', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/big_query_write_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/big_query_write_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/big_query_write_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/big_query_write_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a table + * resource. + * + * @param string $project + * @param string $dataset + * @param string $table + * + * @return string The formatted table resource. + */ + public static function tableName(string $project, string $dataset, string $table): string + { + return self::getPathTemplate('table')->render([ + 'project' => $project, + 'dataset' => $dataset, + 'table' => $table, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a write_stream + * resource. + * + * @param string $project + * @param string $dataset + * @param string $table + * @param string $stream + * + * @return string The formatted write_stream resource. + */ + public static function writeStreamName(string $project, string $dataset, string $table, string $stream): string + { + return self::getPathTemplate('writeStream')->render([ + 'project' => $project, + 'dataset' => $dataset, + 'table' => $table, + 'stream' => $stream, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - table: projects/{project}/datasets/{dataset}/tables/{table} + * - writeStream: projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream} + * + * 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 'bigquerystorage.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); + } + + /** + * Appends data to the given stream. + * + * If `offset` is specified, the `offset` is checked against the end of + * stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an + * attempt is made to append to an offset beyond the current end of the stream + * or `ALREADY_EXISTS` if user provides an `offset` that has already been + * written to. User can retry with adjusted offset within the same RPC + * connection. If `offset` is not specified, append happens at the end of the + * stream. + * + * The response contains an optional offset at which the append + * happened. No offset information will be returned for appends to a + * default stream. + * + * Responses are received in the same order in which requests are sent. + * There will be one response for each successful inserted request. Responses + * may optionally embed error information if the originating AppendRequest was + * not successfully processed. + * + * The specifics of when successfully appended data is made visible to the + * table are governed by the type of stream: + * + * * For COMMITTED streams (which includes the default stream), data is + * visible immediately upon successful append. + * + * * For BUFFERED streams, data is made visible via a subsequent `FlushRows` + * rpc which advances a cursor to a newer offset in the stream. + * + * * For PENDING streams, data is not made visible until the stream itself is + * finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly + * committed via the `BatchCommitWriteStreams` rpc. + * + * @example samples/V1/BigQueryWriteClient/append_rows.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function appendRows(array $callOptions = []): BidiStream + { + return $this->startApiCall('AppendRows', null, $callOptions); + } + + /** + * Atomically commits a group of `PENDING` streams that belong to the same + * `parent` table. + * + * Streams must be finalized before commit and cannot be committed multiple + * times. Once a stream is committed, data in the stream becomes available + * for read operations. + * + * The async variant is {@see BigQueryWriteClient::batchCommitWriteStreamsAsync()} + * . + * + * @example samples/V1/BigQueryWriteClient/batch_commit_write_streams.php + * + * @param BatchCommitWriteStreamsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchCommitWriteStreamsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCommitWriteStreams(BatchCommitWriteStreamsRequest $request, array $callOptions = []): BatchCommitWriteStreamsResponse + { + return $this->startApiCall('BatchCommitWriteStreams', $request, $callOptions)->wait(); + } + + /** + * Creates a write stream to the given table. + * Additionally, every table has a special stream named '_default' + * to which data can be written. This stream doesn't need to be created using + * CreateWriteStream. It is a stream that can be used simultaneously by any + * number of clients. Data written to this stream is considered committed as + * soon as an acknowledgement is received. + * + * The async variant is {@see BigQueryWriteClient::createWriteStreamAsync()} . + * + * @example samples/V1/BigQueryWriteClient/create_write_stream.php + * + * @param CreateWriteStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return WriteStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function createWriteStream(CreateWriteStreamRequest $request, array $callOptions = []): WriteStream + { + return $this->startApiCall('CreateWriteStream', $request, $callOptions)->wait(); + } + + /** + * Finalize a write stream so that no new data can be appended to the + * stream. Finalize is not supported on the '_default' stream. + * + * The async variant is {@see BigQueryWriteClient::finalizeWriteStreamAsync()} . + * + * @example samples/V1/BigQueryWriteClient/finalize_write_stream.php + * + * @param FinalizeWriteStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FinalizeWriteStreamResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function finalizeWriteStream(FinalizeWriteStreamRequest $request, array $callOptions = []): FinalizeWriteStreamResponse + { + return $this->startApiCall('FinalizeWriteStream', $request, $callOptions)->wait(); + } + + /** + * Flushes rows to a BUFFERED stream. + * + * If users are appending rows to BUFFERED stream, flush operation is + * required in order for the rows to become available for reading. A + * Flush operation flushes up to any previously flushed offset in a BUFFERED + * stream, to the offset specified in the request. + * + * Flush is not supported on the _default stream, since it is not BUFFERED. + * + * The async variant is {@see BigQueryWriteClient::flushRowsAsync()} . + * + * @example samples/V1/BigQueryWriteClient/flush_rows.php + * + * @param FlushRowsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FlushRowsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function flushRows(FlushRowsRequest $request, array $callOptions = []): FlushRowsResponse + { + return $this->startApiCall('FlushRows', $request, $callOptions)->wait(); + } + + /** + * Gets information about a write stream. + * + * The async variant is {@see BigQueryWriteClient::getWriteStreamAsync()} . + * + * @example samples/V1/BigQueryWriteClient/get_write_stream.php + * + * @param GetWriteStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return WriteStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function getWriteStream(GetWriteStreamRequest $request, array $callOptions = []): WriteStream + { + return $this->startApiCall('GetWriteStream', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..35b88c9b5daf --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json @@ -0,0 +1,72 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.storage.v1", + "libraryPackage": "Google\\Cloud\\BigQuery\\Storage\\V1", + "services": { + "BigQueryRead": { + "clients": { + "grpc": { + "libraryClient": "BigQueryReadGapicClient", + "rpcs": { + "CreateReadSession": { + "methods": [ + "createReadSession" + ] + }, + "ReadRows": { + "methods": [ + "readRows" + ] + }, + "SplitReadStream": { + "methods": [ + "splitReadStream" + ] + } + } + } + } + }, + "BigQueryWrite": { + "clients": { + "grpc": { + "libraryClient": "BigQueryWriteGapicClient", + "rpcs": { + "AppendRows": { + "methods": [ + "appendRows" + ] + }, + "BatchCommitWriteStreams": { + "methods": [ + "batchCommitWriteStreams" + ] + }, + "CreateWriteStream": { + "methods": [ + "createWriteStream" + ] + }, + "FinalizeWriteStream": { + "methods": [ + "finalizeWriteStream" + ] + }, + "FlushRows": { + "methods": [ + "flushRows" + ] + }, + "GetWriteStream": { + "methods": [ + "getWriteStream" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json new file mode 100644 index 000000000000..780af364091c --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json @@ -0,0 +1,73 @@ +{ + "interfaces": { + "google.cloud.bigquery.storage.v1.BigQueryRead": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateReadSession": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ReadRows": { + "timeout_millis": 86400000 + }, + "SplitReadStream": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php new file mode 100644 index 000000000000..38011adeeb9a --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php @@ -0,0 +1,74 @@ + [ + 'google.cloud.bigquery.storage.v1.BigQueryRead' => [ + 'CreateReadSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\ReadSession', + 'headerParams' => [ + [ + 'keyName' => 'read_session.table', + 'fieldAccessors' => [ + 'getReadSession', + 'getTable', + ], + ], + ], + ], + 'ReadRows' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\ReadRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'read_stream', + 'fieldAccessors' => [ + 'getReadStream', + ], + ], + ], + ], + 'SplitReadStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\SplitReadStreamResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'project' => 'projects/{project}', + 'readSession' => 'projects/{project}/locations/{location}/sessions/{session}', + 'readStream' => 'projects/{project}/locations/{location}/sessions/{session}/streams/{stream}', + 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php new file mode 100644 index 000000000000..7733f1719340 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php @@ -0,0 +1,63 @@ + [ + 'google.cloud.bigquery.storage.v1.BigQueryRead' => [ + 'CreateReadSession' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{read_session.table=projects/*/datasets/*/tables/*}', + 'body' => '*', + 'placeholders' => [ + 'read_session.table' => [ + 'getters' => [ + 'getReadSession', + 'getTable', + ], + ], + ], + ], + 'ReadRows' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}', + 'placeholders' => [ + 'read_stream' => [ + 'getters' => [ + 'getReadStream', + ], + ], + ], + ], + 'SplitReadStream' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*/streams/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json new file mode 100644 index 000000000000..c24690087513 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json @@ -0,0 +1,90 @@ +{ + "interfaces": { + "google.cloud.bigquery.storage.v1.BigQueryWrite": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_4_codes": [ + "UNAVAILABLE" + ], + "retry_policy_5_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" + ], + "retry_policy_6_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "retry_policy_5_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "retry_policy_6_params": { + "initial_retry_delay_millis": 10000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 120000, + "initial_rpc_timeout_millis": 1200000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 1200000, + "total_timeout_millis": 1200000 + } + }, + "methods": { + "AppendRows": { + "timeout_millis": 86400000 + }, + "BatchCommitWriteStreams": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "CreateWriteStream": { + "timeout_millis": 1200000, + "retry_codes_name": "retry_policy_6_codes", + "retry_params_name": "retry_policy_6_params" + }, + "FinalizeWriteStream": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "FlushRows": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "GetWriteStream": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php new file mode 100644 index 000000000000..60b87fa400a8 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php @@ -0,0 +1,107 @@ + [ + 'google.cloud.bigquery.storage.v1.BigQueryWrite' => [ + 'AppendRows' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'write_stream', + 'fieldAccessors' => [ + 'getWriteStream', + ], + ], + ], + ], + 'BatchCommitWriteStreams' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\BatchCommitWriteStreamsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateWriteStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\WriteStream', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'FinalizeWriteStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\FinalizeWriteStreamResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'FlushRows' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\FlushRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'write_stream', + 'fieldAccessors' => [ + 'getWriteStream', + ], + ], + ], + ], + 'GetWriteStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\WriteStream', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', + 'writeStream' => 'projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php new file mode 100644 index 000000000000..3279f1679d8b --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php @@ -0,0 +1,90 @@ + [ + 'google.cloud.bigquery.storage.v1.BigQueryWrite' => [ + 'BatchCommitWriteStreams' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/datasets/*/tables/*}', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'write_streams', + ], + ], + 'CreateWriteStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/datasets/*/tables/*}', + 'body' => 'write_stream', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'FinalizeWriteStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/datasets/*/tables/*/streams/*}', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FlushRows' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}', + 'body' => '*', + 'placeholders' => [ + 'write_stream' => [ + 'getters' => [ + 'getWriteStream', + ], + ], + ], + ], + 'GetWriteStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/datasets/*/tables/*/streams/*}', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php new file mode 100644 index 000000000000..cd753856f172 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php @@ -0,0 +1,338 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BigQueryReadClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BigQueryReadClient($options); + } + + /** @test */ + public function createReadSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $table = 'table110115790'; + $estimatedTotalBytesScanned = 452788190; + $estimatedTotalPhysicalFileSize = 938325754; + $estimatedRowCount = 1745583577; + $traceId = 'traceId1270300245'; + $expectedResponse = new ReadSession(); + $expectedResponse->setName($name); + $expectedResponse->setTable($table); + $expectedResponse->setEstimatedTotalBytesScanned($estimatedTotalBytesScanned); + $expectedResponse->setEstimatedTotalPhysicalFileSize($estimatedTotalPhysicalFileSize); + $expectedResponse->setEstimatedRowCount($estimatedRowCount); + $expectedResponse->setTraceId($traceId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $readSession = new ReadSession(); + $request = (new CreateReadSessionRequest()) + ->setParent($formattedParent) + ->setReadSession($readSession); + $response = $gapicClient->createReadSession($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.bigquery.storage.v1.BigQueryRead/CreateReadSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReadSession(); + $this->assertProtobufEquals($readSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReadSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->projectName('[PROJECT]'); + $readSession = new ReadSession(); + $request = (new CreateReadSessionRequest()) + ->setParent($formattedParent) + ->setReadSession($readSession); + try { + $gapicClient->createReadSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $rowCount = 1340416618; + $uncompressedByteSize = 2094376525; + $expectedResponse = new ReadRowsResponse(); + $expectedResponse->setRowCount($rowCount); + $expectedResponse->setUncompressedByteSize($uncompressedByteSize); + $transport->addResponse($expectedResponse); + $rowCount2 = 349815907; + $uncompressedByteSize2 = 1643824294; + $expectedResponse2 = new ReadRowsResponse(); + $expectedResponse2->setRowCount($rowCount2); + $expectedResponse2->setUncompressedByteSize($uncompressedByteSize2); + $transport->addResponse($expectedResponse2); + $rowCount3 = 349815906; + $uncompressedByteSize3 = 1643824295; + $expectedResponse3 = new ReadRowsResponse(); + $expectedResponse3->setRowCount($rowCount3); + $expectedResponse3->setUncompressedByteSize($uncompressedByteSize3); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedReadStream = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); + $request = (new ReadRowsRequest()) + ->setReadStream($formattedReadStream); + $serverStream = $gapicClient->readRows($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/ReadRows', $actualFuncCall); + $actualValue = $actualRequestObject->getReadStream(); + $this->assertProtobufEquals($formattedReadStream, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readRowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $formattedReadStream = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); + $request = (new ReadRowsRequest()) + ->setReadStream($formattedReadStream); + $serverStream = $gapicClient->readRows($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function splitReadStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SplitReadStreamResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); + $request = (new SplitReadStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->splitReadStream($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.bigquery.storage.v1.BigQueryRead/SplitReadStream', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function splitReadStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); + $request = (new SplitReadStreamRequest()) + ->setName($formattedName); + try { + $gapicClient->splitReadStream($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReadSessionAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $table = 'table110115790'; + $estimatedTotalBytesScanned = 452788190; + $estimatedTotalPhysicalFileSize = 938325754; + $estimatedRowCount = 1745583577; + $traceId = 'traceId1270300245'; + $expectedResponse = new ReadSession(); + $expectedResponse->setName($name); + $expectedResponse->setTable($table); + $expectedResponse->setEstimatedTotalBytesScanned($estimatedTotalBytesScanned); + $expectedResponse->setEstimatedTotalPhysicalFileSize($estimatedTotalPhysicalFileSize); + $expectedResponse->setEstimatedRowCount($estimatedRowCount); + $expectedResponse->setTraceId($traceId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $readSession = new ReadSession(); + $request = (new CreateReadSessionRequest()) + ->setParent($formattedParent) + ->setReadSession($readSession); + $response = $gapicClient->createReadSessionAsync($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.bigquery.storage.v1.BigQueryRead/CreateReadSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReadSession(); + $this->assertProtobufEquals($readSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php new file mode 100644 index 000000000000..3a279b3cf38b --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php @@ -0,0 +1,537 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BigQueryWriteClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BigQueryWriteClient($options); + } + + /** @test */ + public function appendRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $writeStream = 'writeStream-1431753760'; + $expectedResponse = new AppendRowsResponse(); + $expectedResponse->setWriteStream($writeStream); + $transport->addResponse($expectedResponse); + $writeStream2 = 'writeStream2-1525825645'; + $expectedResponse2 = new AppendRowsResponse(); + $expectedResponse2->setWriteStream($writeStream2); + $transport->addResponse($expectedResponse2); + $writeStream3 = 'writeStream3-1525825644'; + $expectedResponse3 = new AppendRowsResponse(); + $expectedResponse3->setWriteStream($writeStream3); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedWriteStream4 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = new AppendRowsRequest(); + $request->setWriteStream($formattedWriteStream4); + $formattedWriteStream5 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request2 = new AppendRowsRequest(); + $request2->setWriteStream($formattedWriteStream5); + $formattedWriteStream6 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request3 = new AppendRowsRequest(); + $request3->setWriteStream($formattedWriteStream6); + $bidi = $gapicClient->appendRows(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/AppendRows', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function appendRowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->appendRows(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCommitWriteStreamsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCommitWriteStreamsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStreams = []; + $request = (new BatchCommitWriteStreamsRequest()) + ->setParent($formattedParent) + ->setWriteStreams($writeStreams); + $response = $gapicClient->batchCommitWriteStreams($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.bigquery.storage.v1.BigQueryWrite/BatchCommitWriteStreams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWriteStreams(); + $this->assertProtobufEquals($writeStreams, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCommitWriteStreamsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStreams = []; + $request = (new BatchCommitWriteStreamsRequest()) + ->setParent($formattedParent) + ->setWriteStreams($writeStreams); + try { + $gapicClient->batchCommitWriteStreams($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createWriteStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $location = 'location1901043637'; + $expectedResponse = new WriteStream(); + $expectedResponse->setName($name); + $expectedResponse->setLocation($location); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStream = new WriteStream(); + $request = (new CreateWriteStreamRequest()) + ->setParent($formattedParent) + ->setWriteStream($writeStream); + $response = $gapicClient->createWriteStream($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.bigquery.storage.v1.BigQueryWrite/CreateWriteStream', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWriteStream(); + $this->assertProtobufEquals($writeStream, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createWriteStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStream = new WriteStream(); + $request = (new CreateWriteStreamRequest()) + ->setParent($formattedParent) + ->setWriteStream($writeStream); + try { + $gapicClient->createWriteStream($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function finalizeWriteStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $rowCount = 1340416618; + $expectedResponse = new FinalizeWriteStreamResponse(); + $expectedResponse->setRowCount($rowCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new FinalizeWriteStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->finalizeWriteStream($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.bigquery.storage.v1.BigQueryWrite/FinalizeWriteStream', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function finalizeWriteStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new FinalizeWriteStreamRequest()) + ->setName($formattedName); + try { + $gapicClient->finalizeWriteStream($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function flushRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $offset2 = 755984506; + $expectedResponse = new FlushRowsResponse(); + $expectedResponse->setOffset($offset2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedWriteStream = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new FlushRowsRequest()) + ->setWriteStream($formattedWriteStream); + $response = $gapicClient->flushRows($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.bigquery.storage.v1.BigQueryWrite/FlushRows', $actualFuncCall); + $actualValue = $actualRequestObject->getWriteStream(); + $this->assertProtobufEquals($formattedWriteStream, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function flushRowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedWriteStream = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new FlushRowsRequest()) + ->setWriteStream($formattedWriteStream); + try { + $gapicClient->flushRows($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWriteStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $location = 'location1901043637'; + $expectedResponse = new WriteStream(); + $expectedResponse->setName($name2); + $expectedResponse->setLocation($location); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new GetWriteStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->getWriteStream($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.bigquery.storage.v1.BigQueryWrite/GetWriteStream', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWriteStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new GetWriteStreamRequest()) + ->setName($formattedName); + try { + $gapicClient->getWriteStream($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCommitWriteStreamsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCommitWriteStreamsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStreams = []; + $request = (new BatchCommitWriteStreamsRequest()) + ->setParent($formattedParent) + ->setWriteStreams($writeStreams); + $response = $gapicClient->batchCommitWriteStreamsAsync($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.bigquery.storage.v1.BigQueryWrite/BatchCommitWriteStreams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWriteStreams(); + $this->assertProtobufEquals($writeStreams, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php new file mode 100644 index 0000000000000000000000000000000000000000..6b6c3b1fe5b0264a139b3841c8799d1bad9e0545 GIT binary patch literal 10449 zcmcgyOKcoT8K&(dYuDsiYbV}G2%Szy9PhX%p6q6`?RA#+BaRm*9vmkU(MY5AOncm9 zrn~9xan>wZ2_z5_D*OXn)37m>km$#ccJEkXBoQ7-FO;45O zi+r_`PF5@3FU%uUsT;m8i;*?HC>22OAsPO; z&F#8Xkzuz0{<~oLu(cIfM&0@fShyhX7c}?54 z>{@BVB^ftdWJ16}xK|o(Foee8R2rq*hW~JIYs0x)7UXJRG~CW}X@1P!uy{7;)oKX- zn?N4ZAzTS~FQNagqHE8_8hDD$Qw7_oj8gUr*;9N)!?p4i3Svey+0VoVb_i0-+Z?J~ z;FXww$MMLAN|*SU*e_x?L26v`EElwlMt*ND5C4^2iY-2#O^zqV&hxQ)gp#}yqJ%GS znhUv{d-5j10Us1391b!=8xU5=Mnq2ZsI15BRZJJ+hLe%jRI^-H2 zu)>riOVi_vSO2Pye5}u+S1Wa=Srr~@7`9P^bAqV}QSenbJMsXbFPW79Poa$PSlOyh zjnI`wVI}+~8WST^qwsa6pzuZ7qpS+u7U|S2G*+oMec)h!>VP~7Qy02V?P#33#OJTr zfwxar&2FM2iEnWRjXpH@nf3SzI=E-lnt3mDi%>3G_h{^;iA4+^@YR>BjiFn%YpOIv{|^6uSsY!wWIIC z31i~d(YT1A57v-K3=l*B#qk{j2%=i9I~B%>u+`}FI6j4r+2*@JIi>@_#<=nw37sh# z9y!$Sxll2*p*0RCg4cmGVQ_j4Wtw!&GD#dB;H(I+$Q(5!QaVf7LX*p8-E7z7`J(${ z2~9A_axjYUE~L_NNZ5dDp^~CWlS;%l&`W%P=V5GxR@MO$%1UyV@<19X3HJPV#T(F8-!3v}OaBy=*#cA~t- zYv{P+Sv3o4*0RU=ow84+kQX=?5eko1HMy3+;T3e4uTUmuN!N4g|+GyxhVSd$j$y+LPzLls1#~YO!)W=nt-yyYLIJb*@vrJd3!%FeG0Hq zd={OIMk|hMfe;%fcpAl<=peaUnNSc&(?<(S&!n5sMZHUwQtqRJ^bb6VPTbwnw^qvc z?%XY|EUn#KTUkE-DJT$LDz4mFUc0k;Tp}NqHi};)A4c#IG`_TPySTox1%jjWqkd;; zWqln!9>~^FCgzG{ow1&*Gx`=bDMT?J3p;2H@(Vb=SvI9)@qAbG4M2LIJm8d%(uaQ9 zfV2+m;O{{#X)Yr5Xr|C>!bS%lF$R0RJH!%%!=y<>^NrT^pC~!lrg`T z&?!bJy6XaNcAzd3RR6pO?`d?@aNV-YR!x;1H&7-v$V-n4-F+IV$IOLN(W=>wXO-HgRf)N9WA50k4}>6B>Lus6(}drI4yVy z=}|`<#GPuEZ$YTqG~jiMh7KE%t3@$BkUKjS-SnQ;v91{Iy!-1sfn6igXu}Z65(}hH>Iy55S#A@4toFBr5m%b_vTt`1n2;RH@evZZl)5WX8%9$3AfdJ|G?l~VW(G{bG-=0I0i@a+ruE?}EjKRl8lO-%3w%E;nTId$*(Wqf3PkHyL zuAnioE$&i%xAY4xZKUMHWf`b2{5x0St%$Gx;crhyE-L3p5B)thVF9R}%2t{;q^FvCaa{2}K2)MP+!0>Fx%f*B!+(n5=c}6 zA&{Q&E;B4#lU@+y)Y2ye)N;+JFG5YbR+ypi6as25Kxkou4}Tkcp6r(N%EhFl0LMuI zaYzdKGmJ`G;whlc^!GjfGXOPliRuN^grLx+4=;T6sV>8HfF(BO{nb?Q+R|U)tiTC? zkOKdc`uYte*O>|uSqDvT)(O=_7YBb|LMUp?;8%s;I#L7IN*LC^*i`1@#GqoPWDgvK z8WN89nS>6LROZ|Ic(%KCaXF!1A4U<&!tYD8L#Zqz2|}pbMi8BSihmABVOhdg#{C`C zFAEZ7|J=vn=dkdRd`pXrD z)izpryYL!?Iv?-FDsePLkpCXUDbY{smC*@70jzH9l0^H=P!Yj@l+f|?clW16g|0mU);5FF&gYV}BUJB0J2CC?#{eBh4UzJ_ zpp%vr%J(^`oNr;%dp1;%B_|@CVoui z=YD}YQheF1-X@PtLJbJ{e+XLLjeXaqReZ3IRvRt-m{1_cezhJ>IX|WdQSR3g!duY6 zB^sMv!}5Ld6ar7DoYF2L6umrvB+tGFP{KyaN4rrA7L@CQxfgoRDQ$@zzk*7ZWPNxw z^?OyaNl9T!9}0?=-V|lbJ4rs7$8YxM@AyfXhif-)G-N*r7ykk+Z+Jf;u%0wQ-773+7dtgOfJp~;fj~lsfd<~)p6CDnbmZ(ReS)Vhk=Grn*hQti6!m`LsSqfYs6;7xtH+;Y!E3#L zj3{gsO`}4ZCf3n3x{#*bFKi#87r3jJ!skIb_Vz9IRF3?VV^umllcSRCIoo6O7@_|G D#C!^S literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableTableAdmin.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableTableAdmin.php new file mode 100644 index 0000000000000000000000000000000000000000..6b8f62546804422842a32d76f63a53106a7ef6f8 GIT binary patch literal 15587 zcmc&*U2Ggz74F!MYu|O8kuR+id#dtmC%3cH;z++Bj|yW$9{mcXmBw zcV?KGwd+<9YI%Z(N`R2c&qIMqMIat%5du}>1;j%TAj%6e2vq_hRKXK(ed64|*_qw> z*|puk195lGJ@@>6=iGB=EFLdk`%97j zUZlULD1U@>rJ>rUQdX18tNH7yqf`_}DJ)Y~g*<0f$PreBo0)lp%5}xIlj6xb*@-?y zub?FS&uo_JS~+PuiUa>lX?9W5HAhqG+RLEZLb9sVZ57yb(pH;#+0hI=NfxZ=Wp(;& zlJO+8Q>Fp7SV#)dR*8AQG=;0WqguLBFD$8c+0snMuvURIo2{viYgF>f^jW?wVW(A- z(@e%}wnNB;q+>Nz@9xQ@r8-SZpQmyY2Djb63IT@8nOY&I>jtrcq1)MPOQ#l#u!W0t zP1T*=)?C)qdL^%JD4UvL^|o|PSkiz+HSQHkGM#Ip%-?x(k4W#ZFTvZx{o97Gg z&#D3Ow%zl}UYA`n^qSSwbxp4oR!owry*bv6*QF*~+r7l@QV6tX8>Z8PvhGqEAJ-N8 z)-JYP*8n0MrC|oIrI~r|DUIi0u2ON+?lJ(@w3{d-Z5~E%8tB3&0e@=qjm6mSHvSEY%(rhcIb|A`mSps84ZX5&&)njX%d z`yki%QLgYXIwS1LyvW1@2ihqxZ~CeZ@dgzDA45abjzz69-bXp~0|%T%gC(VWt7(q+ z(;ufl%AG+EMzYLP`YZS3htMFyJNb=1H0BjrR6jg|21r?CGUI1Zf-NXI+onpz7|lGA zVj_2jV~Vr9L96mQEWz_A!Ni4HST(53iOf_u2PW%PpuKVrK7&pgCfFP5C$HbG_ls1@ z0b&BM^bmNb22pH}AAnyHQ6jnkw#t{}54uVc5#>5MxxzQ)>Qty-Lrmn|oVcmC&E;47 z5MH!Y=zi`-@LWI#XiRZGoDTN`l_pOk?h|N~_c2A=tZR-vK9KAOJu~5}J2gt(AWJ94 z&;j}fPN4o<>NX9t5&4%AI^|h%*)ke8bj7qc4CiCcrpxFM4{)1r$kVFJY!zb4-vks` zvJ7+0*jiKcnkwX;^X5~2hGM`Jk|Xn#+8&RiQOnpWf|ZJpB&?ssx#xuFCy%f*EXS#RB;*&I;7>cA!WxHZLZqgsS}C^)qO0UrAzVEYgkW0=At*+cQzSJnl(pL<;aN1K>J>&!s#B04F17p| z!b>!aX@Kn65%MY;dtPUWu}>VoB%xzImj4$!z1xo_uNxJuy1i)Bn+^T4($JvQa}#;@ zq5C2_*dUCxGHdC<#U!!vB6lkl`J9XUWrWiD@V~l1t6RP6CfyV zORd3>i1wwHls|y_!Km_Q(P?oOSOoY2_*M1t_Buhiy@&b&a)&0J%sE`%kB*dE8y6YA zQsc_+^r7R68*2HMXYrne!l!~Z^mMMDL6fAltteKd2(Bgn*D#=nZCRQFpw0jzqN%vS z7q7wEHM;cEbR~G|1$2Uz!IELv4r5+7%1T}ECZ#5_VOfGAnkS11^J`?O;GG{t1K>|p zo?s zni3fvcobP=YoHTJi0+6SM%cN7wuTR(e#fcPgh^!X7b)r%9dX{rM^U1}M^rF6piTO) z{3(Q?3JX<5{LT9sre52ySI`*g90XGrBQLcb#(Fb=uWca_9o)9m(6P47xtkwH!@_`~ zd69*&ga=v}D})d4U)IqvRyhUf{uuAqQ0@dr8hLKHyMhiImR8eX)(F`}&$kq(6PZ-J z9=;%c6pe5O-8L0zl&He_!`|q&ulTcsPKTT(T!q#`6`BiID1@mn{#{V*d(gHqDcCt# zY`wSez7GwHGrDio@VIZ(kjNy%O~b@tz2zGKU|u0zqx)wIV`xOo7D!jmkO})+&e$f> z*K#tH@9ceBE$3@)+v~SqOHj6hE-9mVriRIl=#CTne7bA3OY(q))kIp z?0Ix=iO#tM!p8bA9AEzq2j)e?-1b}a<4LkSI>^(2iOuCp%X#cxPDp*En$y`?-ayQ*yk?PufIxYf+VkBVHaWc#Y0fdS~DivtkL5pWP8V; zi9NW&2U#R-Ml%t{^Gi*J-E=TTVvKT(A|Pk}G2L@c^DEBylUl+B)kg$>9cR+YQ963w7pRc8rD&Mah-l|i!aEh~dK z3fJ9*thCW2>mY*tu@Av>1P#FJ6*YePB-5YF&n_UG=l7ZPgpeceS>PW@D8WFA{)lJe zu*`e9n1~w*%hz{u$JnjhtV6m^0B`okYk&I3*Zb1)40&hd6-KcD=h)AyWyem>q&0pk z2Y=sA)0K8sn!#TogA_WZqGEV2F7U1o5)&td&YpYElw0rQZ%B7?)93)*5yzc$c5@#~-v!<1NsJY+(l z`-E5ANfLecL-t#EhIzd!x$ti!bkH}-#}ShYAE6K`#>&+@xl_W*!IuW!@R*Y?P}6oL ze74E2HAt3y7jEu@x;PxsxCGI6sn$CHHYqgfuM9Y{Gu_FZ<&dNJJLTE7{|4}-ake5~ ziU*%owxnBZNb6;1+Z%5DM>ysOG-CKM5m%kr9zZTE6k*uFRUD+C)ObPaDZD2oG2D?K z>FDop#JIeJSm@Jr8zq0z8?r)yZbG)*MFiu%4}lxh=tKo>5WP?%CLezq9JoOoMf0|k zn{0&^J==9aVli`#hH4vKSKt_6l+Mt72Zm=s%~+I`g6M^n!l2ae+8Gv`yLIg!KG z!6>1F=!MX+rM9?}!$jCwxS45PUs5nxlArDYS?T(=dsTw6@H)qc_jL|@E*v_%bV7qL zv*)Rdm*gjVkdfR;iq}erZ2zJsJ@(49=K_yjE#iyea>iUoPGonpl!M*#UZl7pFZQ5b zjlccft_o3gM?#0&FVFD#a5>v)g*zf(vU3Sn31aL%8e{GaU3r_`qEa6|BhUAsWV!9O zl_>Wiv?RXkmZ+A*M<~>afxs^V1U`U<#8Mo5xwDg-VrsJ6zFC{U2t|%Yo=ZEbbZ>2o z;6#-D0W^eAkz83KI$RH#P_&ENGI`k>f>}Hl>m7b2N{)9zQgXb*?}1-PVHdL6QGW3e z3USln5!y!2W9_QHR}j)ioD~iuv7O~_ z=i)adGz^if z$V&2a=0)O+R-q0w^`6AT>TZ$GmGe1srgIw5yVf`0B!?xZ*@2fl|+lkiD7 z6Q6|cIL>14;FDtWADBe7ZnmN(Q7x)2CI1>g%Lx}+0`AXtax)#k;=31{^<35YI*FdW zlr6&@CDHfa;4Od=_lqFx)=T)@BDHxw<$Wj=JtiQD)3C3C4iBezgS8>cd8k#vH53a;0d^cp`J5K z^Zef*_MKX$-{qzjiP=(Oixj;zO5M!d5d?(-r6{yM;N_oc!Y8~R_Q{M(HcN@JS-~fp trHr!Ko0-xeojPB5*!_5KmVFcJ`GgkUV}(zA13sUnl=Jfyo literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Common.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..3fe1a1d11e7fa4dadd2491da241faffff1178828 GIT binary patch literal 1093 zcma)5-EPw`7^SWFk#|#iRiO!)F|-biR4O;frJ%OyN-tO|S|))aRZik&mQvetoJj-q z33wA8g$rH-iKpO;)1(svL2hh0=bZ05-_Og}>O!H%c+3RT)UXiySJ+%Ith6*TkTLet z)rx5x$hG1z(+jrw!D#6pmFy zNYFJ)6b%?2&jxRqp&>QY8(XqB*pj_|M)uA-U4(*|CJ7!|5%d{h_*Cl0Jiv*e2986X zEV<_g5w@8(wSvNfC6|EVVD*) z_FR?(nkysq44{NW%#@|eURuZ7u$dfR;Z~j_AvcojVWU%aJvzpknN*9e%{vp=lsE4W z#VWH~a44yvYemS;)=tH`diIKMJ@mt{O!*XA+A4!&A&=0H8hY|yy=*jdm{YXeu`PEl zI|pAX=>Ak?69u(~JR{ALq|rom7y^4=!q0#S)2!f1>vqFI2n=YmG+?D!g}1%V17|A_ z9NPt_^w~H;_m~KCbnRd0r#-YchmO&REv^)6?4#yb|ima3#vG5 zhOL+KyW8_?^y{&mXRA5`S!CLwLG+fkx)h&5&%;o(?g!XjI15Z7&ueRlZc=|#QXqSe= zh~-_(#O;U|#?lu2C_sN}$s8m(e_%08)*?^V;&C~DFMv>Oz2pS!_=%f;ybv9W11SiG z-4BNGY{$eYdEq+!0fm38Kq^dTvI;A#9&#}uww)&TV0EawwxLcH{x;6u%84JOIQb1E zSsu|`0^hBdw~LFGPz$Lol#5Fk z?sJ2h={ZyKE68XL#Th7!fZQ!~pDE`=334CST&!q!q*GV1zjJdbv`g`C z^&8*EV)>_#nfH=`#5Z&r(6E_Yc%(=@xpUh;UwIFZ0}9GrW`iA?OLU=+o)C1Y#pH8X;lv^ zy+*5vwznZut-Y@8x7r7_W-l8TyQfkc9*5cGCzl^D%qzEu`BDm_MEYCE#UH8Wxuti( z(=5_Ve5VJxHj!3+ zn=)TX(tvf%U%#SR=13n0l~MZdhyikio7HcSI@}r3kvcIvB@8F8^dz6+|iW9I)JgIq9TE`|INWFLrnmbi++6N_h2 zru@sr9_N7kTx71|qzRkzXr5mOJc}~rkC%cAYKP#r4d78&Vpqy&Kq(QI6wy);M-+AS9hc1=ODVF{p;I50f2EFJh=U44-m-5i%5a(SWcnwmvgT18gO}RL&m!B>L z*A9&2crI3tksc82Sj?g73>DqA3}4zaoPl321&BL0H*bX2h^oVf?7W~1EX(!Ia20Gd zhKgkx(;RRQFPHLAMJSmeMJ_ss(?XbfEdRF{+*=p~mH=Ut^<6WG8FVAZis6m>LW zZTOU@MW+0_rRK8GRk358NC9H~Mt%)4b1!6oROl|>ggaNoln{1^;+w9b4})f@0D09g zaI&7GnlA28n8vE1oM70g%ac5n@4?2U7?789>A^(le@&14&oRg^CZ3$Yd+fA1!On4@ z8?3QWtP?z*@_Db9yGxO|7{7=I76vZ+*ewRlTg$>L*u3H!c?=IKt%LR<_KtF6pQ{{p zkF|>;w+88YtJ_oB(wlBJCg~WO!fNzozx4$w zC3djUn*%(3A0A}mWCPZsm-WV8J)01%Q^~-y(6zF8CNo4@Ryoy37*Ra&hk}MoCV68T z3Y~4?seCGDARU!_;rj$qV|hJxE#O@cRXi&5>w@|7PJins=@AsJT>u9o&j3(j9M3;u zu#?deM~qJ(Ma`ja!dks0Og13x`(bAdrr~Mq`EM~4_JT=n8h66GykF$4x669#u<2$; zpE&C*65^jvr9Z((*RJf0sm`*I32J+8Pb<9*`No&{tZmR)TIgJ;56j9`ZL@~q>MGhp2I7s>y9`Jcy*A$WN6@*4-i_*LB zaaO{pc2IYaJA6_ce4Ledd(3((Ml!hSow-XO%pJU>y5a(e MkMyr;W-tTz4-)fWng9R* literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Table.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Table.php new file mode 100644 index 0000000000000000000000000000000000000000..8bd9c50772afd8e16b7cb9d080951b572ce67276 GIT binary patch literal 6294 zcmbtYOLH386*eGb=^#s}ZI@;2*ge?JXgnUs;PH$LkK<{eB{N1q0C~n!Ou8DlppH>@ zyB``eE_PXGovQ3psZ@SMR#{}9shZtXW#?6PsbrONAI(DoEIZoJx_!@gZ=dfwk9$9V zWFOdYL*6AOadeM#(Dm(#7W6=p(2+n4OuM|8}Fg1 zYxz!_WaXY^_4*{;GJ2lg!Uw%`Xqf4vOq%_hVt@dqen?zfZxea9n%g6u-qAh1xyx*u zIbqvWsBQCU<^e#vue+|?ppftiWc;)JR^MpLuBUtWbJK7&!!$fY?;GFa{vXO+z3&pV zJUO@Pn{CgqOqm)~%r@EnK<1cq?oHdm?|mo-yQxwa;O94srbir8?>7s?Z99hTSxyzF zX0tuwjT}cuwm%TdQaGb4Z}UB7vnMwBQ1%?3Os+1=4)J`)e8Bci0fwWe<_upcw$a=% zNWYUK2l|m=Ioa&^tHvPnOlw5&c515=$VQkS;)tW*#XDHaf^qfFwm zu-9!P?Fb%td?Xe?Q)i1=*8~8IDO6~>BRneJUqAld3*06qToMx;yPc*Q^#yYB43y5)@XdbS=6_P{S>zNNz-2CLHrG#yrf!Adi%L=W0ZEStuP|Q zGB@WVC%94t-21_(4F_TrP0_*L*?_$7f)G@@x9Y=7-nE>hpohb&B%5y8K zG~%kJ=L~X@pOlDHf(=Zg{-LRL^+Tg?AYz0e-hCq?GushX3{omXtmo*a-`5?(8*D8x zK0bL9(kNpqNuTsBY&yh7XqKk95QO$0zG;z3APk2Q3KIr**$!+Fv+WFQ_MsvysK~bG zgR3J08X62I`MVIrkFOw|hmCqeX{Z|3XzfY4@>My0MvB8)v0Q8vl~VDWVtF?nk}kpd zYDp=V)q=LC6w3{@td#R=JS<&?i~HqSuOiYaL~E*2cotuhF5t@aQL9uN#XSxhP5d?l z7iT(Iy8jL_N6^7HxZPCyMPJZ8EJvw~K-1@EE1Rb+Uts_oX4@_tFF z6&ugA{c^pk=8HQ;wSasBEbkRdrD8oEO1^-lrv~|sQuef{esyf-Ian<#d#Y9`m!6?4 zHXv5dKUVh?jm||mFruraVqR$!D`h?!p(0bu`PwriKNyTkE3mY)Un<3yvf68<*@R?} zDtY1KH3Ms&o5E%?&6Dq^n3;crVeY11iKk)OFfsFDbB1HVF=5&<7mAm5{0zKDMr1gE%gVGqSxVB|sXDX|_YU#!FF$))M~; z0gM+%de$84yYVCr@M~CS#b%)KZw!jq&U^*V{l3)HepwYt^g%i~Ivrr@wDvze^~zJg zEEawRYglz`%XA52^Jj3mrq-*Ka$RM5T&!qJS~;a&%%heAfkv`_3B6YS6oL;IDsiaVPXn1O8Qu`#`$M}Y4U8ZtvP<5H!`t| zJm2HH?HbOLG5{o~$$x}lS(qmveyG3HO#e_jLhWMnMfDrnj$%aI zfwT0T-U|}!{FIHeRaj%)w=3#B-^xexx59UjV&^hpgfO2$)HiV(tSgFT7NlEYzfWgl z{eOhjk#_$AN=ieNI+BOuDLk3D4^f8o)|Rc9j;8&lE$;DdMuzZ-ghgN-IA&m z)E#BN)X>KBv1Flre!t$R?5Q`05OTS98mF^r5|F0?rBg`FUass0T&_l9#rD2O~xx&q)iYpjKf#ivsfDcyGn} z$FM@o4mWut<$QOSaGkO4DEUHn*+3AK%=JY{ko#*=4l~Xr^yu}r=Ms8p!2QW9ON{Mg z!KH!N3IAa^;XYizVAVW}p1sVD?g;O!vF$8iA&EtRtM?*o@^jF1XFMs|(D+0XPJRI} zv4JaaDW~M0>{qoJ2?;R}x?E6d1B;}0{}#I+LG|;8 zVe+ro5prC5GQ_A|=5P2(hs$MJmi!K8ffu>aq%2P*{|Fu)r}HUodPO`fh_%}V*gSc0 zbOWwqo7bq+RIOgwujSQQRNz5}^Ar!|{vC#^c(Mp`Y(T^)dFOzgIjZzpw;KB9KC4;5 zYw)v{d6Lf2IY0VqBE)sn$FuXyUF`}-<$Vl-n_ME(Mbdk$TkaD zOa<$Z_BjzJj6`uLLND}5JMDH^OuVokai7H&AsYu||KNyhZtNa?fM^n?vBzxE3&Wnz z7TdfhXd7Q>r_Y1Mv&N!0k62;}G zPm_ckNe%cO2>wKA+vgrh1Qqz0=ShnPTyX01?=b##(xraFkbK*=n+BfXVL&8s5O}Qq zh-gh|J0FF(-gPpF=1`^pm+$Tdg2e&#-3^v_F^@zTAEK#k_m~(aPJU8DR41-bN?q-&4{~OocSGxozOEL#hV*a zEuq=z3?tscde(O^+QzMxo7@TfU?@N#xtm}zzaLLXS2QjI7dNo)@BBo zEvO9MjnAPJ(^r|!r?=9vzM`)%urieJ#eq>&=Fdf#)JFvM-wf8uaiYOdw0{*Yg}V=x zRCHHbqnMX(CuhAxT*h0h6|frn07_4_kD5OGD|b-Lx{3J?Ol1yibYMC>-8J^%f zcHJwPn1l)0Rm>_(Wvy-ay1XP4IBXgwn#vYn{#a1k3(uml3X@%VH6^%%OW5^4&RHdH zF2pQ#ote8(RxgGDpj29NW>9CLYAnEnx=r++n7vuoT!*qc;KmZnFrW2VkaZTF{5<>= zN_fhRPoQ$jvaT`~Xfy!MsGnwSbi7#qE5G8TRn^&`%Tj z_fqLSmvZO^W9-w{HGQXyALAZHFjsFb{Mm#g)p2iel=)1Czk)%^^E8cpGI` zTNpcdNKSdsasDj8`#4Hpn->S<7?h~d^RV#Eisy%EXJC!sVlRAi!ln_&AzO`KQF}Fe z{#u;XGqv?xDPWUOQ@N!kYwNi2$H2gKm4!PRzO(5Y$M1iOb6Ul=m62@^bZlD*+4gax eJ*h_fCl80Cgoogle.bigtable.admin.v2.AppProfile + */ +class AppProfile extends \Google\Protobuf\Internal\Message +{ + /** + * The unique name of the app profile. Values are of the form + * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Strongly validated etag for optimistic concurrency control. Preserve the + * value returned from `GetAppProfile` when calling `UpdateAppProfile` to + * fail the request if there has been a modification in the mean time. The + * `update_mask` of the request need not include `etag` for this protection + * to apply. + * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and + * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more + * details. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + /** + * Long form description of the use case for this AppProfile. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + protected $routing_policy; + protected $isolation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique name of the app profile. Values are of the form + * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * @type string $etag + * Strongly validated etag for optimistic concurrency control. Preserve the + * value returned from `GetAppProfile` when calling `UpdateAppProfile` to + * fail the request if there has been a modification in the mean time. The + * `update_mask` of the request need not include `etag` for this protection + * to apply. + * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and + * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more + * details. + * @type string $description + * Long form description of the use case for this AppProfile. + * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny $multi_cluster_routing_use_any + * Use a multi-cluster routing policy. + * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting $single_cluster_routing + * Use a single-cluster routing policy. + * @type int $priority + * This field has been deprecated in favor of `standard_isolation.priority`. + * If you set this field, `standard_isolation.priority` will be set instead. + * The priority of requests sent using this app profile. + * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation $standard_isolation + * The standard options used for isolating this app profile's traffic from + * other use cases. + * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly $data_boost_isolation_read_only + * Specifies that this app profile is intended for read-only usage via the + * Data Boost feature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The unique name of the app profile. Values are of the form + * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique name of the app profile. Values are of the form + * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * + * 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; + } + + /** + * Strongly validated etag for optimistic concurrency control. Preserve the + * value returned from `GetAppProfile` when calling `UpdateAppProfile` to + * fail the request if there has been a modification in the mean time. The + * `update_mask` of the request need not include `etag` for this protection + * to apply. + * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and + * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more + * details. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Strongly validated etag for optimistic concurrency control. Preserve the + * value returned from `GetAppProfile` when calling `UpdateAppProfile` to + * fail the request if there has been a modification in the mean time. The + * `update_mask` of the request need not include `etag` for this protection + * to apply. + * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and + * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more + * details. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Long form description of the use case for this AppProfile. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Long form description of the use case for this AppProfile. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Use a multi-cluster routing policy. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; + * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny|null + */ + public function getMultiClusterRoutingUseAny() + { + return $this->readOneof(5); + } + + public function hasMultiClusterRoutingUseAny() + { + return $this->hasOneof(5); + } + + /** + * Use a multi-cluster routing policy. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny $var + * @return $this + */ + public function setMultiClusterRoutingUseAny($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Use a single-cluster routing policy. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6; + * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting|null + */ + public function getSingleClusterRouting() + { + return $this->readOneof(6); + } + + public function hasSingleClusterRouting() + { + return $this->hasOneof(6); + } + + /** + * Use a single-cluster routing policy. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6; + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting $var + * @return $this + */ + public function setSingleClusterRouting($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * This field has been deprecated in favor of `standard_isolation.priority`. + * If you set this field, `standard_isolation.priority` will be set instead. + * The priority of requests sent using this app profile. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; + * @return int + * @deprecated + */ + public function getPriority() + { + @trigger_error('priority is deprecated.', E_USER_DEPRECATED); + return $this->readOneof(7); + } + + public function hasPriority() + { + @trigger_error('priority is deprecated.', E_USER_DEPRECATED); + return $this->hasOneof(7); + } + + /** + * This field has been deprecated in favor of `standard_isolation.priority`. + * If you set this field, `standard_isolation.priority` will be set instead. + * The priority of requests sent using this app profile. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setPriority($var) + { + @trigger_error('priority is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\Priority::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The standard options used for isolating this app profile's traffic from + * other use cases. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.StandardIsolation standard_isolation = 11; + * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation|null + */ + public function getStandardIsolation() + { + return $this->readOneof(11); + } + + public function hasStandardIsolation() + { + return $this->hasOneof(11); + } + + /** + * The standard options used for isolating this app profile's traffic from + * other use cases. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.StandardIsolation standard_isolation = 11; + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation $var + * @return $this + */ + public function setStandardIsolation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Specifies that this app profile is intended for read-only usage via the + * Data Boost feature. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly data_boost_isolation_read_only = 10; + * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly|null + */ + public function getDataBoostIsolationReadOnly() + { + return $this->readOneof(10); + } + + public function hasDataBoostIsolationReadOnly() + { + return $this->hasOneof(10); + } + + /** + * Specifies that this app profile is intended for read-only usage via the + * Data Boost feature. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly data_boost_isolation_read_only = 10; + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly $var + * @return $this + */ + public function setDataBoostIsolationReadOnly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * @return string + */ + public function getRoutingPolicy() + { + return $this->whichOneof("routing_policy"); + } + + /** + * @return string + */ + public function getIsolation() + { + return $this->whichOneof("isolation"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php new file mode 100644 index 000000000000..7a8e71fd8019 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php @@ -0,0 +1,90 @@ +google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + */ +class DataBoostIsolationReadOnly extends \Google\Protobuf\Internal\Message +{ + /** + * The Compute Billing Owner for this Data Boost App Profile. + * + * Generated from protobuf field optional .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner compute_billing_owner = 1; + */ + protected $compute_billing_owner = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $compute_billing_owner + * The Compute Billing Owner for this Data Boost App Profile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The Compute Billing Owner for this Data Boost App Profile. + * + * Generated from protobuf field optional .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner compute_billing_owner = 1; + * @return int + */ + public function getComputeBillingOwner() + { + return isset($this->compute_billing_owner) ? $this->compute_billing_owner : 0; + } + + public function hasComputeBillingOwner() + { + return isset($this->compute_billing_owner); + } + + public function clearComputeBillingOwner() + { + unset($this->compute_billing_owner); + } + + /** + * The Compute Billing Owner for this Data Boost App Profile. + * + * Generated from protobuf field optional .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner compute_billing_owner = 1; + * @param int $var + * @return $this + */ + public function setComputeBillingOwner($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly\ComputeBillingOwner::class); + $this->compute_billing_owner = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataBoostIsolationReadOnly::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_DataBoostIsolationReadOnly::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php new file mode 100644 index 000000000000..7da3c3942452 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php @@ -0,0 +1,60 @@ +google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner + */ +class ComputeBillingOwner +{ + /** + * Unspecified value. + * + * Generated from protobuf enum COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; + */ + const COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; + /** + * The host Cloud Project containing the targeted Bigtable Instance / + * Table pays for compute. + * + * Generated from protobuf enum HOST_PAYS = 1; + */ + const HOST_PAYS = 1; + + private static $valueToName = [ + self::COMPUTE_BILLING_OWNER_UNSPECIFIED => 'COMPUTE_BILLING_OWNER_UNSPECIFIED', + self::HOST_PAYS => 'HOST_PAYS', + ]; + + 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(ComputeBillingOwner::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_DataBoostIsolationReadOnly_ComputeBillingOwner::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php new file mode 100644 index 000000000000..455a007dbf2b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php @@ -0,0 +1,123 @@ +google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + */ +class MultiClusterRoutingUseAny extends \Google\Protobuf\Internal\Message +{ + /** + * The set of clusters to route to. The order is ignored; clusters will be + * tried in order of distance. If left empty, all clusters are eligible. + * + * Generated from protobuf field repeated string cluster_ids = 1; + */ + private $cluster_ids; + protected $affinity; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $cluster_ids + * The set of clusters to route to. The order is ignored; clusters will be + * tried in order of distance. If left empty, all clusters are eligible. + * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny\RowAffinity $row_affinity + * Row affinity sticky routing based on the row key of the request. + * Requests that span multiple rows are routed non-deterministically. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The set of clusters to route to. The order is ignored; clusters will be + * tried in order of distance. If left empty, all clusters are eligible. + * + * Generated from protobuf field repeated string cluster_ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClusterIds() + { + return $this->cluster_ids; + } + + /** + * The set of clusters to route to. The order is ignored; clusters will be + * tried in order of distance. If left empty, all clusters are eligible. + * + * Generated from protobuf field repeated string cluster_ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClusterIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->cluster_ids = $arr; + + return $this; + } + + /** + * Row affinity sticky routing based on the row key of the request. + * Requests that span multiple rows are routed non-deterministically. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny\RowAffinity|null + */ + public function getRowAffinity() + { + return $this->readOneof(3); + } + + public function hasRowAffinity() + { + return $this->hasOneof(3); + } + + /** + * Row affinity sticky routing based on the row key of the request. + * Requests that span multiple rows are routed non-deterministically. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny\RowAffinity $var + * @return $this + */ + public function setRowAffinity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny\RowAffinity::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getAffinity() + { + return $this->whichOneof("affinity"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MultiClusterRoutingUseAny::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_MultiClusterRoutingUseAny::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny/RowAffinity.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny/RowAffinity.php new file mode 100644 index 000000000000..f553b0a42fad --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny/RowAffinity.php @@ -0,0 +1,44 @@ +google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + */ +class RowAffinity extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RowAffinity::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_MultiClusterRoutingUseAny_RowAffinity::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php new file mode 100644 index 000000000000..df376e17c64e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php @@ -0,0 +1,67 @@ +google.bigtable.admin.v2.AppProfile.Priority + */ +class Priority +{ + /** + * Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation. + * + * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; + */ + const PRIORITY_UNSPECIFIED = 0; + /** + * Generated from protobuf enum PRIORITY_LOW = 1; + */ + const PRIORITY_LOW = 1; + /** + * Generated from protobuf enum PRIORITY_MEDIUM = 2; + */ + const PRIORITY_MEDIUM = 2; + /** + * Generated from protobuf enum PRIORITY_HIGH = 3; + */ + const PRIORITY_HIGH = 3; + + private static $valueToName = [ + self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', + self::PRIORITY_LOW => 'PRIORITY_LOW', + self::PRIORITY_MEDIUM => 'PRIORITY_MEDIUM', + self::PRIORITY_HIGH => 'PRIORITY_HIGH', + ]; + + 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(Priority::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_Priority::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php new file mode 100644 index 000000000000..5bd27b02ed0b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php @@ -0,0 +1,114 @@ +google.bigtable.admin.v2.AppProfile.SingleClusterRouting + */ +class SingleClusterRouting extends \Google\Protobuf\Internal\Message +{ + /** + * The cluster to which read/write requests should be routed. + * + * Generated from protobuf field string cluster_id = 1; + */ + protected $cluster_id = ''; + /** + * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are + * allowed by this app profile. It is unsafe to send these requests to + * the same table/row/column in multiple clusters. + * + * Generated from protobuf field bool allow_transactional_writes = 2; + */ + protected $allow_transactional_writes = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster_id + * The cluster to which read/write requests should be routed. + * @type bool $allow_transactional_writes + * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are + * allowed by this app profile. It is unsafe to send these requests to + * the same table/row/column in multiple clusters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The cluster to which read/write requests should be routed. + * + * Generated from protobuf field string cluster_id = 1; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * The cluster to which read/write requests should be routed. + * + * Generated from protobuf field string cluster_id = 1; + * @param string $var + * @return $this + */ + public function setClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cluster_id = $var; + + return $this; + } + + /** + * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are + * allowed by this app profile. It is unsafe to send these requests to + * the same table/row/column in multiple clusters. + * + * Generated from protobuf field bool allow_transactional_writes = 2; + * @return bool + */ + public function getAllowTransactionalWrites() + { + return $this->allow_transactional_writes; + } + + /** + * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are + * allowed by this app profile. It is unsafe to send these requests to + * the same table/row/column in multiple clusters. + * + * Generated from protobuf field bool allow_transactional_writes = 2; + * @param bool $var + * @return $this + */ + public function setAllowTransactionalWrites($var) + { + GPBUtil::checkBool($var); + $this->allow_transactional_writes = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SingleClusterRouting::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_SingleClusterRouting::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php new file mode 100644 index 000000000000..3638ebc75214 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php @@ -0,0 +1,71 @@ +google.bigtable.admin.v2.AppProfile.StandardIsolation + */ +class StandardIsolation extends \Google\Protobuf\Internal\Message +{ + /** + * The priority of requests sent using this app profile. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 1; + */ + protected $priority = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $priority + * The priority of requests sent using this app profile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The priority of requests sent using this app profile. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 1; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * The priority of requests sent using this app profile. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 1; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\Priority::class); + $this->priority = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StandardIsolation::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_StandardIsolation::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView.php new file mode 100644 index 000000000000..a5533981fbc1 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView.php @@ -0,0 +1,203 @@ +google.bigtable.admin.v2.AuthorizedView + */ +class AuthorizedView extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The etag for this AuthorizedView. + * If this is provided on update, it must match the server's etag. The server + * returns ABORTED error on a mismatched etag. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + /** + * Set to true to make the AuthorizedView protected against deletion. + * The parent Table and containing Instance cannot be deleted if an + * AuthorizedView has this bit set. + * + * Generated from protobuf field bool deletion_protection = 4; + */ + protected $deletion_protection = false; + protected $authorized_view; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + * @type \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView $subset_view + * An AuthorizedView permitting access to an explicit subset of a Table. + * @type string $etag + * The etag for this AuthorizedView. + * If this is provided on update, it must match the server's etag. The server + * returns ABORTED error on a mismatched etag. + * @type bool $deletion_protection + * Set to true to make the AuthorizedView protected against deletion. + * The parent Table and containing Instance cannot be deleted if an + * AuthorizedView has this bit set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of this AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * An AuthorizedView permitting access to an explicit subset of a Table. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.SubsetView subset_view = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView|null + */ + public function getSubsetView() + { + return $this->readOneof(2); + } + + public function hasSubsetView() + { + return $this->hasOneof(2); + } + + /** + * An AuthorizedView permitting access to an explicit subset of a Table. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.SubsetView subset_view = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView $var + * @return $this + */ + public function setSubsetView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The etag for this AuthorizedView. + * If this is provided on update, it must match the server's etag. The server + * returns ABORTED error on a mismatched etag. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag for this AuthorizedView. + * If this is provided on update, it must match the server's etag. The server + * returns ABORTED error on a mismatched etag. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Set to true to make the AuthorizedView protected against deletion. + * The parent Table and containing Instance cannot be deleted if an + * AuthorizedView has this bit set. + * + * Generated from protobuf field bool deletion_protection = 4; + * @return bool + */ + public function getDeletionProtection() + { + return $this->deletion_protection; + } + + /** + * Set to true to make the AuthorizedView protected against deletion. + * The parent Table and containing Instance cannot be deleted if an + * AuthorizedView has this bit set. + * + * Generated from protobuf field bool deletion_protection = 4; + * @param bool $var + * @return $this + */ + public function setDeletionProtection($var) + { + GPBUtil::checkBool($var); + $this->deletion_protection = $var; + + return $this; + } + + /** + * @return string + */ + public function getAuthorizedView() + { + return $this->whichOneof("authorized_view"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/FamilySubsets.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/FamilySubsets.php new file mode 100644 index 000000000000..3a6359fca96d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/FamilySubsets.php @@ -0,0 +1,120 @@ +google.bigtable.admin.v2.AuthorizedView.FamilySubsets + */ +class FamilySubsets extends \Google\Protobuf\Internal\Message +{ + /** + * Individual exact column qualifiers to be included in the AuthorizedView. + * + * Generated from protobuf field repeated bytes qualifiers = 1; + */ + private $qualifiers; + /** + * Prefixes for qualifiers to be included in the AuthorizedView. Every + * qualifier starting with one of these prefixes is included in the + * AuthorizedView. To provide access to all qualifiers, include the empty + * string as a prefix + * (""). + * + * Generated from protobuf field repeated bytes qualifier_prefixes = 2; + */ + private $qualifier_prefixes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $qualifiers + * Individual exact column qualifiers to be included in the AuthorizedView. + * @type array|\Google\Protobuf\Internal\RepeatedField $qualifier_prefixes + * Prefixes for qualifiers to be included in the AuthorizedView. Every + * qualifier starting with one of these prefixes is included in the + * AuthorizedView. To provide access to all qualifiers, include the empty + * string as a prefix + * (""). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Individual exact column qualifiers to be included in the AuthorizedView. + * + * Generated from protobuf field repeated bytes qualifiers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQualifiers() + { + return $this->qualifiers; + } + + /** + * Individual exact column qualifiers to be included in the AuthorizedView. + * + * Generated from protobuf field repeated bytes qualifiers = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQualifiers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->qualifiers = $arr; + + return $this; + } + + /** + * Prefixes for qualifiers to be included in the AuthorizedView. Every + * qualifier starting with one of these prefixes is included in the + * AuthorizedView. To provide access to all qualifiers, include the empty + * string as a prefix + * (""). + * + * Generated from protobuf field repeated bytes qualifier_prefixes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQualifierPrefixes() + { + return $this->qualifier_prefixes; + } + + /** + * Prefixes for qualifiers to be included in the AuthorizedView. Every + * qualifier starting with one of these prefixes is included in the + * AuthorizedView. To provide access to all qualifiers, include the empty + * string as a prefix + * (""). + * + * Generated from protobuf field repeated bytes qualifier_prefixes = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQualifierPrefixes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->qualifier_prefixes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FamilySubsets::class, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView_FamilySubsets::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/ResponseView.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/ResponseView.php new file mode 100644 index 000000000000..de81a7c072d4 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/ResponseView.php @@ -0,0 +1,72 @@ +google.bigtable.admin.v2.AuthorizedView.ResponseView + */ +class ResponseView +{ + /** + * Uses the default view for each method as documented in the request. + * + * Generated from protobuf enum RESPONSE_VIEW_UNSPECIFIED = 0; + */ + const RESPONSE_VIEW_UNSPECIFIED = 0; + /** + * Only populates `name`. + * + * Generated from protobuf enum NAME_ONLY = 1; + */ + const NAME_ONLY = 1; + /** + * Only populates the AuthorizedView's basic metadata. This includes: + * name, deletion_protection, etag. + * + * Generated from protobuf enum BASIC = 2; + */ + const BASIC = 2; + /** + * Populates every fields. + * + * Generated from protobuf enum FULL = 3; + */ + const FULL = 3; + + private static $valueToName = [ + self::RESPONSE_VIEW_UNSPECIFIED => 'RESPONSE_VIEW_UNSPECIFIED', + self::NAME_ONLY => 'NAME_ONLY', + 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(ResponseView::class, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView_ResponseView::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/SubsetView.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/SubsetView.php new file mode 100644 index 000000000000..e20712a5b644 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/SubsetView.php @@ -0,0 +1,112 @@ +google.bigtable.admin.v2.AuthorizedView.SubsetView + */ +class SubsetView extends \Google\Protobuf\Internal\Message +{ + /** + * Row prefixes to be included in the AuthorizedView. + * To provide access to all rows, include the empty string as a prefix (""). + * + * Generated from protobuf field repeated bytes row_prefixes = 1; + */ + private $row_prefixes; + /** + * Map from column family name to the columns in this family to be included + * in the AuthorizedView. + * + * Generated from protobuf field map family_subsets = 2; + */ + private $family_subsets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $row_prefixes + * Row prefixes to be included in the AuthorizedView. + * To provide access to all rows, include the empty string as a prefix (""). + * @type array|\Google\Protobuf\Internal\MapField $family_subsets + * Map from column family name to the columns in this family to be included + * in the AuthorizedView. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Row prefixes to be included in the AuthorizedView. + * To provide access to all rows, include the empty string as a prefix (""). + * + * Generated from protobuf field repeated bytes row_prefixes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRowPrefixes() + { + return $this->row_prefixes; + } + + /** + * Row prefixes to be included in the AuthorizedView. + * To provide access to all rows, include the empty string as a prefix (""). + * + * Generated from protobuf field repeated bytes row_prefixes = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRowPrefixes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->row_prefixes = $arr; + + return $this; + } + + /** + * Map from column family name to the columns in this family to be included + * in the AuthorizedView. + * + * Generated from protobuf field map family_subsets = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFamilySubsets() + { + return $this->family_subsets; + } + + /** + * Map from column family name to the columns in this family to be included + * in the AuthorizedView. + * + * Generated from protobuf field map family_subsets = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFamilySubsets($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\FamilySubsets::class); + $this->family_subsets = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SubsetView::class, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView_SubsetView::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php new file mode 100644 index 000000000000..87c9350253d9 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php @@ -0,0 +1,101 @@ +google.bigtable.admin.v2.AutoscalingLimits + */ +class AutoscalingLimits extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Minimum number of nodes to scale down to. + * + * Generated from protobuf field int32 min_serve_nodes = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_serve_nodes = 0; + /** + * Required. Maximum number of nodes to scale up to. + * + * Generated from protobuf field int32 max_serve_nodes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_serve_nodes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $min_serve_nodes + * Required. Minimum number of nodes to scale down to. + * @type int $max_serve_nodes + * Required. Maximum number of nodes to scale up to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Minimum number of nodes to scale down to. + * + * Generated from protobuf field int32 min_serve_nodes = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMinServeNodes() + { + return $this->min_serve_nodes; + } + + /** + * Required. Minimum number of nodes to scale down to. + * + * Generated from protobuf field int32 min_serve_nodes = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMinServeNodes($var) + { + GPBUtil::checkInt32($var); + $this->min_serve_nodes = $var; + + return $this; + } + + /** + * Required. Maximum number of nodes to scale up to. + * + * Generated from protobuf field int32 max_serve_nodes = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMaxServeNodes() + { + return $this->max_serve_nodes; + } + + /** + * Required. Maximum number of nodes to scale up to. + * + * Generated from protobuf field int32 max_serve_nodes = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMaxServeNodes($var) + { + GPBUtil::checkInt32($var); + $this->max_serve_nodes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php new file mode 100644 index 000000000000..4825251531fe --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php @@ -0,0 +1,133 @@ +google.bigtable.admin.v2.AutoscalingTargets + */ +class AutoscalingTargets extends \Google\Protobuf\Internal\Message +{ + /** + * The cpu utilization that the Autoscaler should be trying to achieve. + * This number is on a scale from 0 (no utilization) to + * 100 (total utilization), and is limited between 10 and 80, otherwise it + * will return INVALID_ARGUMENT error. + * + * Generated from protobuf field int32 cpu_utilization_percent = 2; + */ + protected $cpu_utilization_percent = 0; + /** + * The storage utilization that the Autoscaler should be trying to achieve. + * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD + * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, + * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, + * it will be treated as if it were set to the default value: 2560 for SSD, + * 8192 for HDD. + * + * Generated from protobuf field int32 storage_utilization_gib_per_node = 3; + */ + protected $storage_utilization_gib_per_node = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cpu_utilization_percent + * The cpu utilization that the Autoscaler should be trying to achieve. + * This number is on a scale from 0 (no utilization) to + * 100 (total utilization), and is limited between 10 and 80, otherwise it + * will return INVALID_ARGUMENT error. + * @type int $storage_utilization_gib_per_node + * The storage utilization that the Autoscaler should be trying to achieve. + * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD + * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, + * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, + * it will be treated as if it were set to the default value: 2560 for SSD, + * 8192 for HDD. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The cpu utilization that the Autoscaler should be trying to achieve. + * This number is on a scale from 0 (no utilization) to + * 100 (total utilization), and is limited between 10 and 80, otherwise it + * will return INVALID_ARGUMENT error. + * + * Generated from protobuf field int32 cpu_utilization_percent = 2; + * @return int + */ + public function getCpuUtilizationPercent() + { + return $this->cpu_utilization_percent; + } + + /** + * The cpu utilization that the Autoscaler should be trying to achieve. + * This number is on a scale from 0 (no utilization) to + * 100 (total utilization), and is limited between 10 and 80, otherwise it + * will return INVALID_ARGUMENT error. + * + * Generated from protobuf field int32 cpu_utilization_percent = 2; + * @param int $var + * @return $this + */ + public function setCpuUtilizationPercent($var) + { + GPBUtil::checkInt32($var); + $this->cpu_utilization_percent = $var; + + return $this; + } + + /** + * The storage utilization that the Autoscaler should be trying to achieve. + * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD + * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, + * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, + * it will be treated as if it were set to the default value: 2560 for SSD, + * 8192 for HDD. + * + * Generated from protobuf field int32 storage_utilization_gib_per_node = 3; + * @return int + */ + public function getStorageUtilizationGibPerNode() + { + return $this->storage_utilization_gib_per_node; + } + + /** + * The storage utilization that the Autoscaler should be trying to achieve. + * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD + * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, + * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, + * it will be treated as if it were set to the default value: 2560 for SSD, + * 8192 for HDD. + * + * Generated from protobuf field int32 storage_utilization_gib_per_node = 3; + * @param int $var + * @return $this + */ + public function setStorageUtilizationGibPerNode($var) + { + GPBUtil::checkInt32($var); + $this->storage_utilization_gib_per_node = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php new file mode 100644 index 000000000000..f5dc03ee44e3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php @@ -0,0 +1,573 @@ +google.bigtable.admin.v2.Backup + */ +class Backup extends \Google\Protobuf\Internal\Message +{ + /** + * A globally unique identifier for the backup which cannot be + * changed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/ + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * The final segment of the name must be between 1 and 50 characters + * in length. + * The backup is stored in the cluster identified by the prefix of the backup + * name of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. Immutable. Name of the table from which this backup was created. + * This needs to be in the same instance as the backup. Values are of the form + * `projects/{project}/instances/{instance}/tables/{source_table}`. + * + * Generated from protobuf field string source_table = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + */ + protected $source_table = ''; + /** + * Output only. Name of the backup from which this backup was copied. If a + * backup is not created by copying a backup, this field will be empty. Values + * are of the form: + * projects//instances//clusters//backups/ + * + * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_backup = ''; + /** + * Required. The expiration time of the backup. + * When creating a backup or updating its `expire_time`, the value must be + * greater than the backup creation time by: + * - At least 6 hours + * - At most 90 days + * Once the `expire_time` has passed, Cloud Bigtable will delete the backup. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $expire_time = null; + /** + * Output only. `start_time` is the time that the backup was started + * (i.e. approximately the time the + * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] + * request is received). The row data in this backup will be no older than + * this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. `end_time` is the time that the backup was finished. The row + * data in the backup will be no newer than this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Size of the backup in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + /** + * Output only. The current state of the backup. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The encryption information for the backup. + * + * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_info = null; + /** + * Indicates the backup type of the backup. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + */ + protected $backup_type = 0; + /** + * The time at which the hot backup will be converted to a standard backup. + * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the + * hot backup to a standard backup. This value must be greater than the backup + * creation time by: + * - At least 24 hours + * This field only applies for hot backups. When creating or updating a + * standard backup, attempting to set this field will fail the request. + * + * Generated from protobuf field .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + protected $hot_to_standard_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A globally unique identifier for the backup which cannot be + * changed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/ + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * The final segment of the name must be between 1 and 50 characters + * in length. + * The backup is stored in the cluster identified by the prefix of the backup + * name of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @type string $source_table + * Required. Immutable. Name of the table from which this backup was created. + * This needs to be in the same instance as the backup. Values are of the form + * `projects/{project}/instances/{instance}/tables/{source_table}`. + * @type string $source_backup + * Output only. Name of the backup from which this backup was copied. If a + * backup is not created by copying a backup, this field will be empty. Values + * are of the form: + * projects//instances//clusters//backups/ + * @type \Google\Protobuf\Timestamp $expire_time + * Required. The expiration time of the backup. + * When creating a backup or updating its `expire_time`, the value must be + * greater than the backup creation time by: + * - At least 6 hours + * - At most 90 days + * Once the `expire_time` has passed, Cloud Bigtable will delete the backup. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. `start_time` is the time that the backup was started + * (i.e. approximately the time the + * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] + * request is received). The row data in this backup will be no older than + * this timestamp. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. `end_time` is the time that the backup was finished. The row + * data in the backup will be no newer than this timestamp. + * @type int|string $size_bytes + * Output only. Size of the backup in bytes. + * @type int $state + * Output only. The current state of the backup. + * @type \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo $encryption_info + * Output only. The encryption information for the backup. + * @type int $backup_type + * Indicates the backup type of the backup. + * @type \Google\Protobuf\Timestamp $hot_to_standard_time + * The time at which the hot backup will be converted to a standard backup. + * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the + * hot backup to a standard backup. This value must be greater than the backup + * creation time by: + * - At least 24 hours + * This field only applies for hot backups. When creating or updating a + * standard backup, attempting to set this field will fail the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * A globally unique identifier for the backup which cannot be + * changed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/ + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * The final segment of the name must be between 1 and 50 characters + * in length. + * The backup is stored in the cluster identified by the prefix of the backup + * name of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A globally unique identifier for the backup which cannot be + * changed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/ + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * The final segment of the name must be between 1 and 50 characters + * in length. + * The backup is stored in the cluster identified by the prefix of the backup + * name of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Immutable. Name of the table from which this backup was created. + * This needs to be in the same instance as the backup. Values are of the form + * `projects/{project}/instances/{instance}/tables/{source_table}`. + * + * Generated from protobuf field string source_table = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceTable() + { + return $this->source_table; + } + + /** + * Required. Immutable. Name of the table from which this backup was created. + * This needs to be in the same instance as the backup. Values are of the form + * `projects/{project}/instances/{instance}/tables/{source_table}`. + * + * Generated from protobuf field string source_table = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceTable($var) + { + GPBUtil::checkString($var, True); + $this->source_table = $var; + + return $this; + } + + /** + * Output only. Name of the backup from which this backup was copied. If a + * backup is not created by copying a backup, this field will be empty. Values + * are of the form: + * projects//instances//clusters//backups/ + * + * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceBackup() + { + return $this->source_backup; + } + + /** + * Output only. Name of the backup from which this backup was copied. If a + * backup is not created by copying a backup, this field will be empty. Values + * are of the form: + * projects//instances//clusters//backups/ + * + * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceBackup($var) + { + GPBUtil::checkString($var, True); + $this->source_backup = $var; + + return $this; + } + + /** + * Required. The expiration time of the backup. + * When creating a backup or updating its `expire_time`, the value must be + * greater than the backup creation time by: + * - At least 6 hours + * - At most 90 days + * Once the `expire_time` has passed, Cloud Bigtable will delete the backup. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Required. The expiration time of the backup. + * When creating a backup or updating its `expire_time`, the value must be + * greater than the backup creation time by: + * - At least 6 hours + * - At most 90 days + * Once the `expire_time` has passed, Cloud Bigtable will delete the backup. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. `start_time` is the time that the backup was started + * (i.e. approximately the time the + * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] + * request is received). The row data in this backup will be no older than + * this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.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. `start_time` is the time that the backup was started + * (i.e. approximately the time the + * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] + * request is received). The row data in this backup will be no older than + * this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.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. `end_time` is the time that the backup was finished. The row + * data in the backup will be no newer than this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.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. `end_time` is the time that the backup was finished. The row + * data in the backup will be no newer than this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.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. Size of the backup in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. Size of the backup in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + + /** + * Output only. The current state of the backup. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the backup. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Backup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The encryption information for the backup. + * + * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo|null + */ + public function getEncryptionInfo() + { + return $this->encryption_info; + } + + public function hasEncryptionInfo() + { + return isset($this->encryption_info); + } + + public function clearEncryptionInfo() + { + unset($this->encryption_info); + } + + /** + * Output only. The encryption information for the backup. + * + * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo $var + * @return $this + */ + public function setEncryptionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo::class); + $this->encryption_info = $var; + + return $this; + } + + /** + * Indicates the backup type of the backup. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * @return int + */ + public function getBackupType() + { + return $this->backup_type; + } + + /** + * Indicates the backup type of the backup. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * @param int $var + * @return $this + */ + public function setBackupType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Backup\BackupType::class); + $this->backup_type = $var; + + return $this; + } + + /** + * The time at which the hot backup will be converted to a standard backup. + * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the + * hot backup to a standard backup. This value must be greater than the backup + * creation time by: + * - At least 24 hours + * This field only applies for hot backups. When creating or updating a + * standard backup, attempting to set this field will fail the request. + * + * Generated from protobuf field .google.protobuf.Timestamp hot_to_standard_time = 12; + * @return \Google\Protobuf\Timestamp|null + */ + public function getHotToStandardTime() + { + return $this->hot_to_standard_time; + } + + public function hasHotToStandardTime() + { + return isset($this->hot_to_standard_time); + } + + public function clearHotToStandardTime() + { + unset($this->hot_to_standard_time); + } + + /** + * The time at which the hot backup will be converted to a standard backup. + * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the + * hot backup to a standard backup. This value must be greater than the backup + * creation time by: + * - At least 24 hours + * This field only applies for hot backups. When creating or updating a + * standard backup, attempting to set this field will fail the request. + * + * Generated from protobuf field .google.protobuf.Timestamp hot_to_standard_time = 12; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setHotToStandardTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->hot_to_standard_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/BackupType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/BackupType.php new file mode 100644 index 000000000000..cf2244ea9b7e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/BackupType.php @@ -0,0 +1,69 @@ +google.bigtable.admin.v2.Backup.BackupType + */ +class BackupType +{ + /** + * Not specified. + * + * Generated from protobuf enum BACKUP_TYPE_UNSPECIFIED = 0; + */ + const BACKUP_TYPE_UNSPECIFIED = 0; + /** + * The default type for Cloud Bigtable managed backups. Supported for + * backups created in both HDD and SSD instances. Requires optimization when + * restored to a table in an SSD instance. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * A backup type with faster restore to SSD performance. Only supported for + * backups created in SSD instances. A new SSD table restored from a hot + * backup reaches production performance more quickly than a standard + * backup. + * + * Generated from protobuf enum HOT = 2; + */ + const HOT = 2; + + private static $valueToName = [ + self::BACKUP_TYPE_UNSPECIFIED => 'BACKUP_TYPE_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::HOT => 'HOT', + ]; + + 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(BackupType::class, \Google\Cloud\Bigtable\Admin\V2\Backup_BackupType::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php new file mode 100644 index 000000000000..1e7867d2bd8a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php @@ -0,0 +1,65 @@ +google.bigtable.admin.v2.Backup.State + */ +class State +{ + /** + * Not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The pending backup is still being created. Operations on the + * backup may fail with `FAILED_PRECONDITION` in this state. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The backup is complete and ready for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + ]; + + 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\Bigtable\Admin\V2\Backup_State::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php new file mode 100644 index 000000000000..a9680225f63e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php @@ -0,0 +1,243 @@ +google.bigtable.admin.v2.BackupInfo + */ +class BackupInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the backup. + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $backup = ''; + /** + * Output only. The time that the backup was started. Row data in the backup + * will be no older than this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. This time that the backup was finished. Row data in the + * backup will be no newer than this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Name of the table the backup was created from. + * + * Generated from protobuf field string source_table = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_table = ''; + /** + * Output only. Name of the backup from which this backup was copied. If a + * backup is not created by copying a backup, this field will be empty. Values + * are of the form: + * projects//instances//clusters//backups/ + * + * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_backup = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $backup + * Output only. Name of the backup. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time that the backup was started. Row data in the backup + * will be no older than this timestamp. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. This time that the backup was finished. Row data in the + * backup will be no newer than this timestamp. + * @type string $source_table + * Output only. Name of the table the backup was created from. + * @type string $source_backup + * Output only. Name of the backup from which this backup was copied. If a + * backup is not created by copying a backup, this field will be empty. Values + * are of the form: + * projects//instances//clusters//backups/ + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the backup. + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * Output only. Name of the backup. + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + + /** + * Output only. The time that the backup was started. Row data in the backup + * will be no older than this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.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 that the backup was started. Row data in the backup + * will be no older than this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.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. This time that the backup was finished. Row data in the + * backup will be no newer than this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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. This time that the backup was finished. Row data in the + * backup will be no newer than this timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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. Name of the table the backup was created from. + * + * Generated from protobuf field string source_table = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceTable() + { + return $this->source_table; + } + + /** + * Output only. Name of the table the backup was created from. + * + * Generated from protobuf field string source_table = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceTable($var) + { + GPBUtil::checkString($var, True); + $this->source_table = $var; + + return $this; + } + + /** + * Output only. Name of the backup from which this backup was copied. If a + * backup is not created by copying a backup, this field will be empty. Values + * are of the form: + * projects//instances//clusters//backups/ + * + * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceBackup() + { + return $this->source_backup; + } + + /** + * Output only. Name of the backup from which this backup was copied. If a + * backup is not created by copying a backup, this field will be empty. Values + * are of the form: + * projects//instances//clusters//backups/ + * + * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceBackup($var) + { + GPBUtil::checkString($var, True); + $this->source_backup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php new file mode 100644 index 000000000000..49dbf3a36659 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php @@ -0,0 +1,93 @@ +google.bigtable.admin.v2.ChangeStreamConfig + */ +class ChangeStreamConfig extends \Google\Protobuf\Internal\Message +{ + /** + * How long the change stream should be retained. Change stream data older + * than the retention period will not be returned when reading the change + * stream from the table. + * Values must be at least 1 day and at most 7 days, and will be truncated to + * microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Duration retention_period = 1; + */ + protected $retention_period = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $retention_period + * How long the change stream should be retained. Change stream data older + * than the retention period will not be returned when reading the change + * stream from the table. + * Values must be at least 1 day and at most 7 days, and will be truncated to + * microsecond granularity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * How long the change stream should be retained. Change stream data older + * than the retention period will not be returned when reading the change + * stream from the table. + * Values must be at least 1 day and at most 7 days, and will be truncated to + * microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Duration retention_period = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getRetentionPeriod() + { + return $this->retention_period; + } + + public function hasRetentionPeriod() + { + return isset($this->retention_period); + } + + public function clearRetentionPeriod() + { + unset($this->retention_period); + } + + /** + * How long the change stream should be retained. Change stream data older + * than the retention period will not be returned when reading the change + * stream from the table. + * Values must be at least 1 day and at most 7 days, and will be truncated to + * microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Duration retention_period = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetentionPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention_period = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php new file mode 100644 index 000000000000..543b4f861565 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php @@ -0,0 +1,215 @@ +google.bigtable.admin.v2.CheckConsistencyRequest + */ +class CheckConsistencyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the Table for which to check replication + * consistency. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The token created using GenerateConsistencyToken for the Table. + * + * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $consistency_token = ''; + protected $mode; + + /** + * @param string $name Required. The unique name of the Table for which to check replication + * consistency. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * @param string $consistencyToken Required. The token created using GenerateConsistencyToken for the Table. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CheckConsistencyRequest + * + * @experimental + */ + public static function build(string $name, string $consistencyToken): self + { + return (new self()) + ->setName($name) + ->setConsistencyToken($consistencyToken); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique name of the Table for which to check replication + * consistency. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @type string $consistency_token + * Required. The token created using GenerateConsistencyToken for the Table. + * @type \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites $standard_read_remote_writes + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + * @type \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites $data_boost_read_local_writes + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the Table for which to check replication + * consistency. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the Table for which to check replication + * consistency. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The token created using GenerateConsistencyToken for the Table. + * + * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getConsistencyToken() + { + return $this->consistency_token; + } + + /** + * Required. The token created using GenerateConsistencyToken for the Table. + * + * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setConsistencyToken($var) + { + GPBUtil::checkString($var, True); + $this->consistency_token = $var; + + return $this; + } + + /** + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + * + * Generated from protobuf field .google.bigtable.admin.v2.StandardReadRemoteWrites standard_read_remote_writes = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites|null + */ + public function getStandardReadRemoteWrites() + { + return $this->readOneof(3); + } + + public function hasStandardReadRemoteWrites() + { + return $this->hasOneof(3); + } + + /** + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + * + * Generated from protobuf field .google.bigtable.admin.v2.StandardReadRemoteWrites standard_read_remote_writes = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites $var + * @return $this + */ + public function setStandardReadRemoteWrites($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.DataBoostReadLocalWrites data_boost_read_local_writes = 4; + * @return \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites|null + */ + public function getDataBoostReadLocalWrites() + { + return $this->readOneof(4); + } + + public function hasDataBoostReadLocalWrites() + { + return $this->hasOneof(4); + } + + /** + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.DataBoostReadLocalWrites data_boost_read_local_writes = 4; + * @param \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites $var + * @return $this + */ + public function setDataBoostReadLocalWrites($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getMode() + { + return $this->whichOneof("mode"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php new file mode 100644 index 000000000000..86e789432683 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php @@ -0,0 +1,72 @@ +google.bigtable.admin.v2.CheckConsistencyResponse + */ +class CheckConsistencyResponse extends \Google\Protobuf\Internal\Message +{ + /** + * True only if the token is consistent. A token is consistent if replication + * has caught up with the restrictions specified in the request. + * + * Generated from protobuf field bool consistent = 1; + */ + protected $consistent = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $consistent + * True only if the token is consistent. A token is consistent if replication + * has caught up with the restrictions specified in the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * True only if the token is consistent. A token is consistent if replication + * has caught up with the restrictions specified in the request. + * + * Generated from protobuf field bool consistent = 1; + * @return bool + */ + public function getConsistent() + { + return $this->consistent; + } + + /** + * True only if the token is consistent. A token is consistent if replication + * has caught up with the restrictions specified in the request. + * + * Generated from protobuf field bool consistent = 1; + * @param bool $var + * @return $this + */ + public function setConsistent($var) + { + GPBUtil::checkBool($var); + $this->consistent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php new file mode 100644 index 000000000000..f85b6bce6a47 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php @@ -0,0 +1,349 @@ +google.bigtable.admin.v2.Cluster + */ +class Cluster extends \Google\Protobuf\Internal\Message +{ + /** + * The unique name of the cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Immutable. The location where this cluster's nodes and storage reside. For + * best performance, clients should be located as close as possible to this + * cluster. Currently only zones are supported, so values should be of the + * form `projects/{project}/locations/{zone}`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $location = ''; + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * The number of nodes allocated to this cluster. More nodes enable higher + * throughput and more consistent performance. + * + * Generated from protobuf field int32 serve_nodes = 4; + */ + protected $serve_nodes = 0; + /** + * Immutable. The node scaling factor of this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $node_scaling_factor = 0; + /** + * Immutable. The type of storage used by this cluster to serve its + * parent instance's tables, unless explicitly overridden. + * + * Generated from protobuf field .google.bigtable.admin.v2.StorageType default_storage_type = 5 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $default_storage_type = 0; + /** + * Immutable. The encryption configuration for CMEK-protected clusters. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $encryption_config = null; + protected $config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique name of the cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. + * @type string $location + * Immutable. The location where this cluster's nodes and storage reside. For + * best performance, clients should be located as close as possible to this + * cluster. Currently only zones are supported, so values should be of the + * form `projects/{project}/locations/{zone}`. + * @type int $state + * Output only. The current state of the cluster. + * @type int $serve_nodes + * The number of nodes allocated to this cluster. More nodes enable higher + * throughput and more consistent performance. + * @type int $node_scaling_factor + * Immutable. The node scaling factor of this cluster. + * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig $cluster_config + * Configuration for this cluster. + * @type int $default_storage_type + * Immutable. The type of storage used by this cluster to serve its + * parent instance's tables, unless explicitly overridden. + * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig $encryption_config + * Immutable. The encryption configuration for CMEK-protected clusters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The unique name of the cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique name of the cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. + * + * 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; + } + + /** + * Immutable. The location where this cluster's nodes and storage reside. For + * best performance, clients should be located as close as possible to this + * cluster. Currently only zones are supported, so values should be of the + * form `projects/{project}/locations/{zone}`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Immutable. The location where this cluster's nodes and storage reside. For + * best performance, clients should be located as close as possible to this + * cluster. Currently only zones are supported, so values should be of the + * form `projects/{project}/locations/{zone}`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\State::class); + $this->state = $var; + + return $this; + } + + /** + * The number of nodes allocated to this cluster. More nodes enable higher + * throughput and more consistent performance. + * + * Generated from protobuf field int32 serve_nodes = 4; + * @return int + */ + public function getServeNodes() + { + return $this->serve_nodes; + } + + /** + * The number of nodes allocated to this cluster. More nodes enable higher + * throughput and more consistent performance. + * + * Generated from protobuf field int32 serve_nodes = 4; + * @param int $var + * @return $this + */ + public function setServeNodes($var) + { + GPBUtil::checkInt32($var); + $this->serve_nodes = $var; + + return $this; + } + + /** + * Immutable. The node scaling factor of this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getNodeScalingFactor() + { + return $this->node_scaling_factor; + } + + /** + * Immutable. The node scaling factor of this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setNodeScalingFactor($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\NodeScalingFactor::class); + $this->node_scaling_factor = $var; + + return $this; + } + + /** + * Configuration for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterConfig cluster_config = 7; + * @return \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig|null + */ + public function getClusterConfig() + { + return $this->readOneof(7); + } + + public function hasClusterConfig() + { + return $this->hasOneof(7); + } + + /** + * Configuration for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterConfig cluster_config = 7; + * @param \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig $var + * @return $this + */ + public function setClusterConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Immutable. The type of storage used by this cluster to serve its + * parent instance's tables, unless explicitly overridden. + * + * Generated from protobuf field .google.bigtable.admin.v2.StorageType default_storage_type = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getDefaultStorageType() + { + return $this->default_storage_type; + } + + /** + * Immutable. The type of storage used by this cluster to serve its + * parent instance's tables, unless explicitly overridden. + * + * Generated from protobuf field .google.bigtable.admin.v2.StorageType default_storage_type = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setDefaultStorageType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\StorageType::class); + $this->default_storage_type = $var; + + return $this; + } + + /** + * Immutable. The encryption configuration for CMEK-protected clusters. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig|null + */ + public function getEncryptionConfig() + { + return $this->encryption_config; + } + + public function hasEncryptionConfig() + { + return isset($this->encryption_config); + } + + public function clearEncryptionConfig() + { + unset($this->encryption_config); + } + + /** + * Immutable. The encryption configuration for CMEK-protected clusters. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig $var + * @return $this + */ + public function setEncryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig::class); + $this->encryption_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getConfig() + { + return $this->whichOneof("config"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php new file mode 100644 index 000000000000..997961367dd3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php @@ -0,0 +1,124 @@ +google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + */ +class ClusterAutoscalingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Autoscaling limits for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $autoscaling_limits = null; + /** + * Required. Autoscaling targets for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $autoscaling_targets = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits $autoscaling_limits + * Required. Autoscaling limits for this cluster. + * @type \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets $autoscaling_targets + * Required. Autoscaling targets for this cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Autoscaling limits for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits|null + */ + public function getAutoscalingLimits() + { + return $this->autoscaling_limits; + } + + public function hasAutoscalingLimits() + { + return isset($this->autoscaling_limits); + } + + public function clearAutoscalingLimits() + { + unset($this->autoscaling_limits); + } + + /** + * Required. Autoscaling limits for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits $var + * @return $this + */ + public function setAutoscalingLimits($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits::class); + $this->autoscaling_limits = $var; + + return $this; + } + + /** + * Required. Autoscaling targets for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets|null + */ + public function getAutoscalingTargets() + { + return $this->autoscaling_targets; + } + + public function hasAutoscalingTargets() + { + return isset($this->autoscaling_targets); + } + + public function clearAutoscalingTargets() + { + unset($this->autoscaling_targets); + } + + /** + * Required. Autoscaling targets for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets $var + * @return $this + */ + public function setAutoscalingTargets($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets::class); + $this->autoscaling_targets = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClusterAutoscalingConfig::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_ClusterAutoscalingConfig::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php new file mode 100644 index 000000000000..b8856b291e62 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php @@ -0,0 +1,80 @@ +google.bigtable.admin.v2.Cluster.ClusterConfig + */ +class ClusterConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Autoscaling configuration for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; + */ + protected $cluster_autoscaling_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig $cluster_autoscaling_config + * Autoscaling configuration for this cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Autoscaling configuration for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig|null + */ + public function getClusterAutoscalingConfig() + { + return $this->cluster_autoscaling_config; + } + + public function hasClusterAutoscalingConfig() + { + return isset($this->cluster_autoscaling_config); + } + + public function clearClusterAutoscalingConfig() + { + unset($this->cluster_autoscaling_config); + } + + /** + * Autoscaling configuration for this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig $var + * @return $this + */ + public function setClusterAutoscalingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig::class); + $this->cluster_autoscaling_config = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClusterConfig::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_ClusterConfig::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php new file mode 100644 index 000000000000..3294a44ba562 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php @@ -0,0 +1,107 @@ +google.bigtable.admin.v2.Cluster.EncryptionConfig + */ +class EncryptionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Describes the Cloud KMS encryption key that will be used to protect the + * destination Bigtable cluster. The requirements for this key are: + * 1) The Cloud Bigtable service account associated with the project that + * contains this cluster must be granted the + * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. + * 2) Only regional keys can be used and the region of the CMEK key must + * match the region of the cluster. + * 3) All clusters within an instance must use the same CMEK key. + * Values are of the form + * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.resource_reference) = { + */ + protected $kms_key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_name + * Describes the Cloud KMS encryption key that will be used to protect the + * destination Bigtable cluster. The requirements for this key are: + * 1) The Cloud Bigtable service account associated with the project that + * contains this cluster must be granted the + * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. + * 2) Only regional keys can be used and the region of the CMEK key must + * match the region of the cluster. + * 3) All clusters within an instance must use the same CMEK key. + * Values are of the form + * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Describes the Cloud KMS encryption key that will be used to protect the + * destination Bigtable cluster. The requirements for this key are: + * 1) The Cloud Bigtable service account associated with the project that + * contains this cluster must be granted the + * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. + * 2) Only regional keys can be used and the region of the CMEK key must + * match the region of the cluster. + * 3) All clusters within an instance must use the same CMEK key. + * Values are of the form + * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Describes the Cloud KMS encryption key that will be used to protect the + * destination Bigtable cluster. The requirements for this key are: + * 1) The Cloud Bigtable service account associated with the project that + * contains this cluster must be granted the + * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. + * 2) Only regional keys can be used and the region of the CMEK key must + * match the region of the cluster. + * 3) All clusters within an instance must use the same CMEK key. + * Values are of the form + * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EncryptionConfig::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_EncryptionConfig::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/NodeScalingFactor.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/NodeScalingFactor.php new file mode 100644 index 000000000000..c5f625fd27e6 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/NodeScalingFactor.php @@ -0,0 +1,67 @@ +google.bigtable.admin.v2.Cluster.NodeScalingFactor + */ +class NodeScalingFactor +{ + /** + * No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X. + * + * Generated from protobuf enum NODE_SCALING_FACTOR_UNSPECIFIED = 0; + */ + const NODE_SCALING_FACTOR_UNSPECIFIED = 0; + /** + * The cluster is running with a scaling factor of 1. + * + * Generated from protobuf enum NODE_SCALING_FACTOR_1X = 1; + */ + const NODE_SCALING_FACTOR_1X = 1; + /** + * The cluster is running with a scaling factor of 2. + * All node count values must be in increments of 2 with this scaling factor + * enabled, otherwise an INVALID_ARGUMENT error will be returned. + * + * Generated from protobuf enum NODE_SCALING_FACTOR_2X = 2; + */ + const NODE_SCALING_FACTOR_2X = 2; + + private static $valueToName = [ + self::NODE_SCALING_FACTOR_UNSPECIFIED => 'NODE_SCALING_FACTOR_UNSPECIFIED', + self::NODE_SCALING_FACTOR_1X => 'NODE_SCALING_FACTOR_1X', + self::NODE_SCALING_FACTOR_2X => 'NODE_SCALING_FACTOR_2X', + ]; + + 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(NodeScalingFactor::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_NodeScalingFactor::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php new file mode 100644 index 000000000000..fc392006912f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php @@ -0,0 +1,85 @@ +google.bigtable.admin.v2.Cluster.State + */ +class State +{ + /** + * The state of the cluster could not be determined. + * + * Generated from protobuf enum STATE_NOT_KNOWN = 0; + */ + const STATE_NOT_KNOWN = 0; + /** + * The cluster has been successfully created and is ready to serve requests. + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * The cluster is currently being created, and may be destroyed + * if the creation process encounters an error. + * A cluster may not be able to serve requests while being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The cluster is currently being resized, and may revert to its previous + * node count if the process encounters an error. + * A cluster is still capable of serving requests while being resized, + * but may exhibit performance as if its number of allocated nodes is + * between the starting and requested states. + * + * Generated from protobuf enum RESIZING = 3; + */ + const RESIZING = 3; + /** + * The cluster has no backing nodes. The data (tables) still + * exist, but no operations can be performed on the cluster. + * + * Generated from protobuf enum DISABLED = 4; + */ + const DISABLED = 4; + + private static $valueToName = [ + self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::RESIZING => 'RESIZING', + 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\Bigtable\Admin\V2\Cluster_State::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php new file mode 100644 index 000000000000..12959e605d65 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php @@ -0,0 +1,157 @@ +google.bigtable.admin.v2.ColumnFamily + */ +class ColumnFamily extends \Google\Protobuf\Internal\Message +{ + /** + * Garbage collection rule specified as a protobuf. + * Must serialize to at most 500 bytes. + * NOTE: Garbage collection executes opportunistically in the background, and + * so it's possible for reads to return a cell even if it matches the active + * GC expression for its family. + * + * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; + */ + protected $gc_rule = null; + /** + * The type of data stored in each of this family's cell values, including its + * full encoding. If omitted, the family only serves raw untyped bytes. + * For now, only the `Aggregate` type is supported. + * `Aggregate` can only be set at family creation and is immutable afterwards. + * If `value_type` is `Aggregate`, written data must be compatible with: + * * `value_type.input_type` for `AddInput` mutations + * + * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 3; + */ + protected $value_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\GcRule $gc_rule + * Garbage collection rule specified as a protobuf. + * Must serialize to at most 500 bytes. + * NOTE: Garbage collection executes opportunistically in the background, and + * so it's possible for reads to return a cell even if it matches the active + * GC expression for its family. + * @type \Google\Cloud\Bigtable\Admin\V2\Type $value_type + * The type of data stored in each of this family's cell values, including its + * full encoding. If omitted, the family only serves raw untyped bytes. + * For now, only the `Aggregate` type is supported. + * `Aggregate` can only be set at family creation and is immutable afterwards. + * If `value_type` is `Aggregate`, written data must be compatible with: + * * `value_type.input_type` for `AddInput` mutations + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Garbage collection rule specified as a protobuf. + * Must serialize to at most 500 bytes. + * NOTE: Garbage collection executes opportunistically in the background, and + * so it's possible for reads to return a cell even if it matches the active + * GC expression for its family. + * + * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\GcRule|null + */ + public function getGcRule() + { + return $this->gc_rule; + } + + public function hasGcRule() + { + return isset($this->gc_rule); + } + + public function clearGcRule() + { + unset($this->gc_rule); + } + + /** + * Garbage collection rule specified as a protobuf. + * Must serialize to at most 500 bytes. + * NOTE: Garbage collection executes opportunistically in the background, and + * so it's possible for reads to return a cell even if it matches the active + * GC expression for its family. + * + * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\GcRule $var + * @return $this + */ + public function setGcRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule::class); + $this->gc_rule = $var; + + return $this; + } + + /** + * The type of data stored in each of this family's cell values, including its + * full encoding. If omitted, the family only serves raw untyped bytes. + * For now, only the `Aggregate` type is supported. + * `Aggregate` can only be set at family creation and is immutable afterwards. + * If `value_type` is `Aggregate`, written data must be compatible with: + * * `value_type.input_type` for `AddInput` mutations + * + * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getValueType() + { + return $this->value_type; + } + + public function hasValueType() + { + return isset($this->value_type); + } + + public function clearValueType() + { + unset($this->value_type); + } + + /** + * The type of data stored in each of this family's cell values, including its + * full encoding. If omitted, the family only serves raw untyped bytes. + * For now, only the `Aggregate` type is supported. + * `Aggregate` can only be set at family creation and is immutable afterwards. + * If `value_type` is `Aggregate`, written data must be compatible with: + * * `value_type.input_type` for `AddInput` mutations + * + * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setValueType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->value_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php new file mode 100644 index 000000000000..0efc355bd7d8 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php @@ -0,0 +1,172 @@ +google.bigtable.admin.v2.CopyBackupMetadata + */ +class CopyBackupMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the backup being created through the copy operation. + * Values are of the form + * `projects//instances//clusters//backups/`. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Information about the source backup that is being copied from. + * + * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; + */ + protected $source_backup_info = null; + /** + * The progress of the + * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 3; + */ + protected $progress = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the backup being created through the copy operation. + * Values are of the form + * `projects//instances//clusters//backups/`. + * @type \Google\Cloud\Bigtable\Admin\V2\BackupInfo $source_backup_info + * Information about the source backup that is being copied from. + * @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress + * The progress of the + * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] + * operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The name of the backup being created through the copy operation. + * Values are of the form + * `projects//instances//clusters//backups/`. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the backup being created through the copy operation. + * Values are of the form + * `projects//instances//clusters//backups/`. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Information about the source backup that is being copied from. + * + * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\BackupInfo|null + */ + public function getSourceBackupInfo() + { + return $this->source_backup_info; + } + + public function hasSourceBackupInfo() + { + return isset($this->source_backup_info); + } + + public function clearSourceBackupInfo() + { + unset($this->source_backup_info); + } + + /** + * Information about the source backup that is being copied from. + * + * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\BackupInfo $var + * @return $this + */ + public function setSourceBackupInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\BackupInfo::class); + $this->source_backup_info = $var; + + return $this; + } + + /** + * The progress of the + * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null + */ + public function getProgress() + { + return $this->progress; + } + + public function hasProgress() + { + return isset($this->progress); + } + + public function clearProgress() + { + unset($this->progress); + } + + /** + * The progress of the + * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var + * @return $this + */ + public function setProgress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class); + $this->progress = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php new file mode 100644 index 000000000000..8f004b2b6ee0 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php @@ -0,0 +1,286 @@ +google.bigtable.admin.v2.CopyBackupRequest + */ +class CopyBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the destination cluster that will contain the backup + * copy. The cluster must already exist. Values are of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The id of the new backup. The `backup_id` along with `parent` + * are combined as {parent}/backups/{backup_id} to create the full backup + * name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_id = ''; + /** + * Required. The source backup to be copied from. + * The source backup needs to be in READY state for it to be copied. + * Copying a copied backup is not allowed. + * Once CopyBackup is in progress, the source backup cannot be deleted or + * cleaned up on expiration until CopyBackup is finished. + * Values are of the form: + * `projects//instances//clusters//backups/`. + * + * Generated from protobuf field string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $source_backup = ''; + /** + * Required. Required. The expiration time of the copied backup with + * microsecond granularity that must be at least 6 hours and at most 30 days + * from the time the request is received. Once the `expire_time` has + * passed, Cloud Bigtable will delete the backup and free the resources used + * by the backup. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $expire_time = null; + + /** + * @param string $parent Required. The name of the destination cluster that will contain the backup + * copy. The cluster must already exist. Values are of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see + * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. + * @param string $backupId Required. The id of the new backup. The `backup_id` along with `parent` + * are combined as {parent}/backups/{backup_id} to create the full backup + * name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * @param string $sourceBackup Required. The source backup to be copied from. + * The source backup needs to be in READY state for it to be copied. + * Copying a copied backup is not allowed. + * Once CopyBackup is in progress, the source backup cannot be deleted or + * cleaned up on expiration until CopyBackup is finished. + * Values are of the form: + * `projects//instances//clusters//backups/`. Please see + * {@see BigtableTableAdminClient::backupName()} for help formatting this field. + * @param \Google\Protobuf\Timestamp $expireTime Required. Required. The expiration time of the copied backup with + * microsecond granularity that must be at least 6 hours and at most 30 days + * from the time the request is received. Once the `expire_time` has + * passed, Cloud Bigtable will delete the backup and free the resources used + * by the backup. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CopyBackupRequest + * + * @experimental + */ + public static function build(string $parent, string $backupId, string $sourceBackup, \Google\Protobuf\Timestamp $expireTime): self + { + return (new self()) + ->setParent($parent) + ->setBackupId($backupId) + ->setSourceBackup($sourceBackup) + ->setExpireTime($expireTime); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the destination cluster that will contain the backup + * copy. The cluster must already exist. Values are of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @type string $backup_id + * Required. The id of the new backup. The `backup_id` along with `parent` + * are combined as {parent}/backups/{backup_id} to create the full backup + * name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * @type string $source_backup + * Required. The source backup to be copied from. + * The source backup needs to be in READY state for it to be copied. + * Copying a copied backup is not allowed. + * Once CopyBackup is in progress, the source backup cannot be deleted or + * cleaned up on expiration until CopyBackup is finished. + * Values are of the form: + * `projects//instances//clusters//backups/`. + * @type \Google\Protobuf\Timestamp $expire_time + * Required. Required. The expiration time of the copied backup with + * microsecond granularity that must be at least 6 hours and at most 30 days + * from the time the request is received. Once the `expire_time` has + * passed, Cloud Bigtable will delete the backup and free the resources used + * by the backup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the destination cluster that will contain the backup + * copy. The cluster must already exist. Values are of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the destination cluster that will contain the backup + * copy. The cluster must already exist. Values are of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The id of the new backup. The `backup_id` along with `parent` + * are combined as {parent}/backups/{backup_id} to create the full backup + * name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupId() + { + return $this->backup_id; + } + + /** + * Required. The id of the new backup. The `backup_id` along with `parent` + * are combined as {parent}/backups/{backup_id} to create the full backup + * name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkString($var, True); + $this->backup_id = $var; + + return $this; + } + + /** + * Required. The source backup to be copied from. + * The source backup needs to be in READY state for it to be copied. + * Copying a copied backup is not allowed. + * Once CopyBackup is in progress, the source backup cannot be deleted or + * cleaned up on expiration until CopyBackup is finished. + * Values are of the form: + * `projects//instances//clusters//backups/`. + * + * Generated from protobuf field string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSourceBackup() + { + return $this->source_backup; + } + + /** + * Required. The source backup to be copied from. + * The source backup needs to be in READY state for it to be copied. + * Copying a copied backup is not allowed. + * Once CopyBackup is in progress, the source backup cannot be deleted or + * cleaned up on expiration until CopyBackup is finished. + * Values are of the form: + * `projects//instances//clusters//backups/`. + * + * Generated from protobuf field string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceBackup($var) + { + GPBUtil::checkString($var, True); + $this->source_backup = $var; + + return $this; + } + + /** + * Required. Required. The expiration time of the copied backup with + * microsecond granularity that must be at least 6 hours and at most 30 days + * from the time the request is received. Once the `expire_time` has + * passed, Cloud Bigtable will delete the backup and free the resources used + * by the backup. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Required. Required. The expiration time of the copied backup with + * microsecond granularity that must be at least 6 hours and at most 30 days + * from the time the request is received. Once the `expire_time` has + * passed, Cloud Bigtable will delete the backup and free the resources used + * by the backup. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php new file mode 100644 index 000000000000..12b67e4093aa --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php @@ -0,0 +1,217 @@ +google.bigtable.admin.v2.CreateAppProfileRequest + */ +class CreateAppProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance in which to create the new app + * profile. Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to be used when referring to the new app profile within + * its instance, e.g., just `myprofile` rather than + * `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * + * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $app_profile_id = ''; + /** + * Required. The app profile to be created. + * Fields marked `OutputOnly` will be ignored. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $app_profile = null; + /** + * If true, ignore safety checks when creating the app profile. + * + * Generated from protobuf field bool ignore_warnings = 4; + */ + protected $ignore_warnings = false; + + /** + * @param string $parent Required. The unique name of the instance in which to create the new app + * profile. Values are of the form `projects/{project}/instances/{instance}`. Please see + * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. + * @param string $appProfileId Required. The ID to be used when referring to the new app profile within + * its instance, e.g., just `myprofile` rather than + * `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile Required. The app profile to be created. + * Fields marked `OutputOnly` will be ignored. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CreateAppProfileRequest + * + * @experimental + */ + public static function build(string $parent, string $appProfileId, \Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile): self + { + return (new self()) + ->setParent($parent) + ->setAppProfileId($appProfileId) + ->setAppProfile($appProfile); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The unique name of the instance in which to create the new app + * profile. Values are of the form `projects/{project}/instances/{instance}`. + * @type string $app_profile_id + * Required. The ID to be used when referring to the new app profile within + * its instance, e.g., just `myprofile` rather than + * `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile $app_profile + * Required. The app profile to be created. + * Fields marked `OutputOnly` will be ignored. + * @type bool $ignore_warnings + * If true, ignore safety checks when creating the app profile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance in which to create the new app + * profile. Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The unique name of the instance in which to create the new app + * profile. Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to be used when referring to the new app profile within + * its instance, e.g., just `myprofile` rather than + * `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * + * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * Required. The ID to be used when referring to the new app profile within + * its instance, e.g., just `myprofile` rather than + * `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * + * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + + /** + * Required. The app profile to be created. + * Fields marked `OutputOnly` will be ignored. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile|null + */ + public function getAppProfile() + { + return $this->app_profile; + } + + public function hasAppProfile() + { + return isset($this->app_profile); + } + + public function clearAppProfile() + { + unset($this->app_profile); + } + + /** + * Required. The app profile to be created. + * Fields marked `OutputOnly` will be ignored. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $var + * @return $this + */ + public function setAppProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile::class); + $this->app_profile = $var; + + return $this; + } + + /** + * If true, ignore safety checks when creating the app profile. + * + * Generated from protobuf field bool ignore_warnings = 4; + * @return bool + */ + public function getIgnoreWarnings() + { + return $this->ignore_warnings; + } + + /** + * If true, ignore safety checks when creating the app profile. + * + * Generated from protobuf field bool ignore_warnings = 4; + * @param bool $var + * @return $this + */ + public function setIgnoreWarnings($var) + { + GPBUtil::checkBool($var); + $this->ignore_warnings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewMetadata.php new file mode 100644 index 000000000000..e2172d832ac3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewMetadata.php @@ -0,0 +1,165 @@ +google.bigtable.admin.v2.CreateAuthorizedViewMetadata + */ +class CreateAuthorizedViewMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this CreateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; + */ + protected $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + protected $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + protected $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest $original_request + * The request that prompted the initiation of this CreateInstance operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this CreateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this CreateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewRequest.php new file mode 100644 index 000000000000..0329adcb6e04 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewRequest.php @@ -0,0 +1,189 @@ +google.bigtable.admin.v2.CreateAuthorizedViewRequest + */ +class CreateAuthorizedViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * + * Generated from protobuf field string authorized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorized_view_id = ''; + /** + * Required. The AuthorizedView to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorized_view = null; + + /** + * @param string $parent Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView Required. The AuthorizedView to create. + * @param string $authorizedViewId Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView, string $authorizedViewId): self + { + return (new self()) + ->setParent($parent) + ->setAuthorizedView($authorizedView) + ->setAuthorizedViewId($authorizedViewId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @type string $authorized_view_id + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * @type \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorized_view + * Required. The AuthorizedView to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * + * Generated from protobuf field string authorized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAuthorizedViewId() + { + return $this->authorized_view_id; + } + + /** + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * + * Generated from protobuf field string authorized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAuthorizedViewId($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_id = $var; + + return $this; + } + + /** + * Required. The AuthorizedView to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView|null + */ + public function getAuthorizedView() + { + return $this->authorized_view; + } + + public function hasAuthorizedView() + { + return isset($this->authorized_view); + } + + public function clearAuthorizedView() + { + unset($this->authorized_view); + } + + /** + * Required. The AuthorizedView to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $var + * @return $this + */ + public function setAuthorizedView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView::class); + $this->authorized_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php new file mode 100644 index 000000000000..557de786e6de --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php @@ -0,0 +1,190 @@ +google.bigtable.admin.v2.CreateBackupMetadata + */ +class CreateBackupMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the backup being created. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The name of the table the backup is created from. + * + * Generated from protobuf field string source_table = 2; + */ + protected $source_table = ''; + /** + * The time at which this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + /** + * If set, the time at which this operation finished or was cancelled. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the backup being created. + * @type string $source_table + * The name of the table the backup is created from. + * @type \Google\Protobuf\Timestamp $start_time + * The time at which this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * If set, the time at which this operation finished or was cancelled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The name of the backup being created. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the backup being created. + * + * 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 name of the table the backup is created from. + * + * Generated from protobuf field string source_table = 2; + * @return string + */ + public function getSourceTable() + { + return $this->source_table; + } + + /** + * The name of the table the backup is created from. + * + * Generated from protobuf field string source_table = 2; + * @param string $var + * @return $this + */ + public function setSourceTable($var) + { + GPBUtil::checkString($var, True); + $this->source_table = $var; + + return $this; + } + + /** + * The time at which this operation started. + * + * 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 at which this operation started. + * + * 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; + } + + /** + * If set, the time at which this operation finished or was cancelled. + * + * 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); + } + + /** + * If set, the time at which this operation finished or was cancelled. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php new file mode 100644 index 000000000000..8022a0ae61ec --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php @@ -0,0 +1,199 @@ +google.bigtable.admin.v2.CreateBackupRequest + */ +class CreateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. This must be one of the clusters in the instance in which this + * table is located. The backup will be stored in this cluster. Values are + * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The id of the backup to be created. The `backup_id` along with + * the parent `parent` are combined as {parent}/backups/{backup_id} to create + * the full backup name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_id = ''; + /** + * Required. The backup to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup = null; + + /** + * @param string $parent Required. This must be one of the clusters in the instance in which this + * table is located. The backup will be stored in this cluster. Values are + * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see + * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. + * @param string $backupId Required. The id of the backup to be created. The `backup_id` along with + * the parent `parent` are combined as {parent}/backups/{backup_id} to create + * the full backup name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * @param \Google\Cloud\Bigtable\Admin\V2\Backup $backup Required. The backup to create. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CreateBackupRequest + * + * @experimental + */ + public static function build(string $parent, string $backupId, \Google\Cloud\Bigtable\Admin\V2\Backup $backup): self + { + return (new self()) + ->setParent($parent) + ->setBackupId($backupId) + ->setBackup($backup); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. This must be one of the clusters in the instance in which this + * table is located. The backup will be stored in this cluster. Values are + * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @type string $backup_id + * Required. The id of the backup to be created. The `backup_id` along with + * the parent `parent` are combined as {parent}/backups/{backup_id} to create + * the full backup name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * @type \Google\Cloud\Bigtable\Admin\V2\Backup $backup + * Required. The backup to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. This must be one of the clusters in the instance in which this + * table is located. The backup will be stored in this cluster. Values are + * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * 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. This must be one of the clusters in the instance in which this + * table is located. The backup will be stored in this cluster. Values are + * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The id of the backup to be created. The `backup_id` along with + * the parent `parent` are combined as {parent}/backups/{backup_id} to create + * the full backup name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupId() + { + return $this->backup_id; + } + + /** + * Required. The id of the backup to be created. The `backup_id` along with + * the parent `parent` are combined as {parent}/backups/{backup_id} to create + * the full backup name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkString($var, True); + $this->backup_id = $var; + + return $this; + } + + /** + * Required. The backup to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\Backup|null + */ + public function getBackup() + { + return $this->backup; + } + + public function hasBackup() + { + return isset($this->backup); + } + + public function clearBackup() + { + unset($this->backup); + } + + /** + * Required. The backup to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Backup::class); + $this->backup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php new file mode 100644 index 000000000000..c752a40618c5 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php @@ -0,0 +1,223 @@ +google.bigtable.admin.v2.CreateClusterMetadata + */ +class CreateClusterMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this CreateCluster operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; + */ + protected $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + protected $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + protected $finish_time = null; + /** + * Keys: the full `name` of each table that existed in the instance when + * CreateCluster was first called, i.e. + * `projects//instances//tables/`. Any table added + * to the instance by a later API call will be created in the new cluster by + * that API call, not this one. + * Values: information on how much of a table's data has been copied to the + * newly-created cluster so far. + * + * Generated from protobuf field map tables = 4; + */ + private $tables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest $original_request + * The request that prompted the initiation of this CreateCluster operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * @type array|\Google\Protobuf\Internal\MapField $tables + * Keys: the full `name` of each table that existed in the instance when + * CreateCluster was first called, i.e. + * `projects//instances//tables/
`. Any table added + * to the instance by a later API call will be created in the new cluster by + * that API call, not this one. + * Values: information on how much of a table's data has been copied to the + * newly-created cluster so far. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this CreateCluster operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this CreateCluster operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + + /** + * Keys: the full `name` of each table that existed in the instance when + * CreateCluster was first called, i.e. + * `projects//instances//tables/
`. Any table added + * to the instance by a later API call will be created in the new cluster by + * that API call, not this one. + * Values: information on how much of a table's data has been copied to the + * newly-created cluster so far. + * + * Generated from protobuf field map tables = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTables() + { + return $this->tables; + } + + /** + * Keys: the full `name` of each table that existed in the instance when + * CreateCluster was first called, i.e. + * `projects//instances//tables/
`. Any table added + * to the instance by a later API call will be created in the new cluster by + * that API call, not this one. + * Values: information on how much of a table's data has been copied to the + * newly-created cluster so far. + * + * Generated from protobuf field map tables = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata\TableProgress::class); + $this->tables = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php new file mode 100644 index 000000000000..6fbf11f7cc3b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php @@ -0,0 +1,139 @@ +google.bigtable.admin.v2.CreateClusterMetadata.TableProgress + */ +class TableProgress extends \Google\Protobuf\Internal\Message +{ + /** + * Estimate of the size of the table to be copied. + * + * Generated from protobuf field int64 estimated_size_bytes = 2; + */ + protected $estimated_size_bytes = 0; + /** + * Estimate of the number of bytes copied so far for this table. + * This will eventually reach 'estimated_size_bytes' unless the table copy + * is CANCELLED. + * + * Generated from protobuf field int64 estimated_copied_bytes = 3; + */ + protected $estimated_copied_bytes = 0; + /** + * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $estimated_size_bytes + * Estimate of the size of the table to be copied. + * @type int|string $estimated_copied_bytes + * Estimate of the number of bytes copied so far for this table. + * This will eventually reach 'estimated_size_bytes' unless the table copy + * is CANCELLED. + * @type int $state + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Estimate of the size of the table to be copied. + * + * Generated from protobuf field int64 estimated_size_bytes = 2; + * @return int|string + */ + public function getEstimatedSizeBytes() + { + return $this->estimated_size_bytes; + } + + /** + * Estimate of the size of the table to be copied. + * + * Generated from protobuf field int64 estimated_size_bytes = 2; + * @param int|string $var + * @return $this + */ + public function setEstimatedSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->estimated_size_bytes = $var; + + return $this; + } + + /** + * Estimate of the number of bytes copied so far for this table. + * This will eventually reach 'estimated_size_bytes' unless the table copy + * is CANCELLED. + * + * Generated from protobuf field int64 estimated_copied_bytes = 3; + * @return int|string + */ + public function getEstimatedCopiedBytes() + { + return $this->estimated_copied_bytes; + } + + /** + * Estimate of the number of bytes copied so far for this table. + * This will eventually reach 'estimated_size_bytes' unless the table copy + * is CANCELLED. + * + * Generated from protobuf field int64 estimated_copied_bytes = 3; + * @param int|string $var + * @return $this + */ + public function setEstimatedCopiedBytes($var) + { + GPBUtil::checkInt64($var); + $this->estimated_copied_bytes = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata\TableProgress\State::class); + $this->state = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TableProgress::class, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata_TableProgress::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php new file mode 100644 index 000000000000..f5fc34634589 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php @@ -0,0 +1,76 @@ +google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State + */ +class State +{ + /** + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The table has not yet begun copying to the new cluster. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The table is actively being copied to the new cluster. + * + * Generated from protobuf enum COPYING = 2; + */ + const COPYING = 2; + /** + * The table has been fully copied to the new cluster. + * + * Generated from protobuf enum COMPLETED = 3; + */ + const COMPLETED = 3; + /** + * The table was deleted before it finished copying to the new cluster. + * Note that tables deleted after completion will stay marked as + * COMPLETED, not CANCELLED. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::COPYING => 'COPYING', + self::COMPLETED => 'COMPLETED', + self::CANCELLED => 'CANCELLED', + ]; + + 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\Bigtable\Admin\V2\CreateClusterMetadata_TableProgress_State::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php new file mode 100644 index 000000000000..8a849b579320 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php @@ -0,0 +1,183 @@ +google.bigtable.admin.v2.CreateClusterRequest + */ +class CreateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance in which to create the new + * cluster. Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to be used when referring to the new cluster within its + * instance, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster_id = ''; + /** + * Required. The cluster to be created. + * Fields marked `OutputOnly` must be left blank. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + + /** + * @param string $parent Required. The unique name of the instance in which to create the new + * cluster. Values are of the form `projects/{project}/instances/{instance}`. Please see + * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. + * @param string $clusterId Required. The ID to be used when referring to the new cluster within its + * instance, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster Required. The cluster to be created. + * Fields marked `OutputOnly` must be left blank. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest + * + * @experimental + */ + public static function build(string $parent, string $clusterId, \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster): self + { + return (new self()) + ->setParent($parent) + ->setClusterId($clusterId) + ->setCluster($cluster); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The unique name of the instance in which to create the new + * cluster. Values are of the form `projects/{project}/instances/{instance}`. + * @type string $cluster_id + * Required. The ID to be used when referring to the new cluster within its + * instance, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * @type \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster + * Required. The cluster to be created. + * Fields marked `OutputOnly` must be left blank. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance in which to create the new + * cluster. Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The unique name of the instance in which to create the new + * cluster. Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to be used when referring to the new cluster within its + * instance, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Required. The ID to be used when referring to the new cluster within its + * instance, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cluster_id = $var; + + return $this; + } + + /** + * Required. The cluster to be created. + * Fields marked `OutputOnly` must be left blank. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The cluster to be created. + * Fields marked `OutputOnly` must be left blank. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); + $this->cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php new file mode 100644 index 000000000000..dd7f505c0775 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php @@ -0,0 +1,165 @@ +google.bigtable.admin.v2.CreateInstanceMetadata + */ +class CreateInstanceMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this CreateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; + */ + protected $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + protected $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + protected $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest $original_request + * The request that prompted the initiation of this CreateInstance operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this CreateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this CreateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php new file mode 100644 index 000000000000..7af92a99c778 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php @@ -0,0 +1,239 @@ +google.bigtable.admin.v2.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the project in which to create the new + * instance. Values are of the form `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to be used when referring to the new instance within its + * project, e.g., just `myinstance` rather than + * `projects/myproject/instances/myinstance`. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The instance to create. + * Fields marked `OutputOnly` must be left blank. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Required. The clusters to be created within the instance, mapped by desired + * cluster ID, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * Fields marked `OutputOnly` must be left blank. + * Currently, at most four clusters can be specified. + * + * Generated from protobuf field map clusters = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $clusters; + + /** + * @param string $parent Required. The unique name of the project in which to create the new + * instance. Values are of the form `projects/{project}`. Please see + * {@see BigtableInstanceAdminClient::projectName()} for help formatting this field. + * @param string $instanceId Required. The ID to be used when referring to the new instance within its + * project, e.g., just `myinstance` rather than + * `projects/myproject/instances/myinstance`. + * @param \Google\Cloud\Bigtable\Admin\V2\Instance $instance Required. The instance to create. + * Fields marked `OutputOnly` must be left blank. + * @param array $clusters Required. The clusters to be created within the instance, mapped by desired + * cluster ID, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * Fields marked `OutputOnly` must be left blank. + * Currently, at most four clusters can be specified. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, string $instanceId, \Google\Cloud\Bigtable\Admin\V2\Instance $instance, array $clusters): self + { + return (new self()) + ->setParent($parent) + ->setInstanceId($instanceId) + ->setInstance($instance) + ->setClusters($clusters); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The unique name of the project in which to create the new + * instance. Values are of the form `projects/{project}`. + * @type string $instance_id + * Required. The ID to be used when referring to the new instance within its + * project, e.g., just `myinstance` rather than + * `projects/myproject/instances/myinstance`. + * @type \Google\Cloud\Bigtable\Admin\V2\Instance $instance + * Required. The instance to create. + * Fields marked `OutputOnly` must be left blank. + * @type array|\Google\Protobuf\Internal\MapField $clusters + * Required. The clusters to be created within the instance, mapped by desired + * cluster ID, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * Fields marked `OutputOnly` must be left blank. + * Currently, at most four clusters can be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the project in which to create the new + * instance. Values are of the form `projects/{project}`. + * + * 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 unique name of the project in which to create the new + * instance. Values are of the form `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to be used when referring to the new instance within its + * project, e.g., just `myinstance` rather than + * `projects/myproject/instances/myinstance`. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The ID to be used when referring to the new instance within its + * project, e.g., just `myinstance` rather than + * `projects/myproject/instances/myinstance`. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The instance to create. + * Fields marked `OutputOnly` must be left blank. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to create. + * Fields marked `OutputOnly` must be left blank. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Required. The clusters to be created within the instance, mapped by desired + * cluster ID, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * Fields marked `OutputOnly` must be left blank. + * Currently, at most four clusters can be specified. + * + * Generated from protobuf field map clusters = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * Required. The clusters to be created within the instance, mapped by desired + * cluster ID, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * Fields marked `OutputOnly` must be left blank. + * Currently, at most four clusters can be specified. + * + * Generated from protobuf field map clusters = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); + $this->clusters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php new file mode 100644 index 000000000000..ad6178e78b9b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php @@ -0,0 +1,173 @@ +google.bigtable.admin.v2.CreateTableFromSnapshotMetadata + */ +class CreateTableFromSnapshotMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this CreateTableFromSnapshot + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; + */ + protected $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + protected $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + protected $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest $original_request + * The request that prompted the initiation of this CreateTableFromSnapshot + * operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this CreateTableFromSnapshot + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this CreateTableFromSnapshot + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php new file mode 100644 index 000000000000..2dfa7bc94901 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php @@ -0,0 +1,184 @@ +google.bigtable.admin.v2.CreateTableFromSnapshotRequest + */ +class CreateTableFromSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * + * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Required. The unique name of the snapshot from which to restore the table. + * The snapshot and the table must be in the same instance. Values are of the + * form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * Generated from protobuf field string source_snapshot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $source_snapshot = ''; + + /** + * @param string $parent Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. Please see + * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. + * @param string $tableId Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * @param string $sourceSnapshot Required. The unique name of the snapshot from which to restore the table. + * The snapshot and the table must be in the same instance. Values are of the + * form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. Please see + * {@see BigtableTableAdminClient::snapshotName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest + * + * @experimental + */ + public static function build(string $parent, string $tableId, string $sourceSnapshot): self + { + return (new self()) + ->setParent($parent) + ->setTableId($tableId) + ->setSourceSnapshot($sourceSnapshot); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * @type string $table_id + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * @type string $source_snapshot + * Required. The unique name of the snapshot from which to restore the table. + * The snapshot and the table must be in the same instance. Values are of the + * form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * + * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * + * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Required. The unique name of the snapshot from which to restore the table. + * The snapshot and the table must be in the same instance. Values are of the + * form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * Generated from protobuf field string source_snapshot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSourceSnapshot() + { + return $this->source_snapshot; + } + + /** + * Required. The unique name of the snapshot from which to restore the table. + * The snapshot and the table must be in the same instance. Values are of the + * form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * Generated from protobuf field string source_snapshot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->source_snapshot = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php new file mode 100644 index 000000000000..06608297cf48 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php @@ -0,0 +1,265 @@ +google.bigtable.admin.v2.CreateTableRequest + */ +class CreateTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * Maximum 50 characters. + * + * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Required. The Table to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table = null; + /** + * The optional list of row keys that will be used to initially split the + * table into several tablets (tablets are similar to HBase regions). + * Given two split keys, `s1` and `s2`, three tablets will be created, + * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. + * Example: + * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` + * `"other", "zz"]` + * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` + * * Key assignment: + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; + */ + private $initial_splits; + + /** + * @param string $parent Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. Please see + * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. + * @param string $tableId Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * Maximum 50 characters. + * @param \Google\Cloud\Bigtable\Admin\V2\Table $table Required. The Table to create. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CreateTableRequest + * + * @experimental + */ + public static function build(string $parent, string $tableId, \Google\Cloud\Bigtable\Admin\V2\Table $table): self + { + return (new self()) + ->setParent($parent) + ->setTableId($tableId) + ->setTable($table); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * @type string $table_id + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * Maximum 50 characters. + * @type \Google\Cloud\Bigtable\Admin\V2\Table $table + * Required. The Table to create. + * @type array<\Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split>|\Google\Protobuf\Internal\RepeatedField $initial_splits + * The optional list of row keys that will be used to initially split the + * table into several tablets (tablets are similar to HBase regions). + * Given two split keys, `s1` and `s2`, three tablets will be created, + * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. + * Example: + * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` + * `"other", "zz"]` + * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` + * * Key assignment: + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The unique name of the instance in which to create the table. + * Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * Maximum 50 characters. + * + * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The name by which the new table should be referred to within the + * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + * Maximum 50 characters. + * + * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Required. The Table to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\Table|null + */ + public function getTable() + { + return $this->table; + } + + public function hasTable() + { + return isset($this->table); + } + + public function clearTable() + { + unset($this->table); + } + + /** + * Required. The Table to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\Table $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table::class); + $this->table = $var; + + return $this; + } + + /** + * The optional list of row keys that will be used to initially split the + * table into several tablets (tablets are similar to HBase regions). + * Given two split keys, `s1` and `s2`, three tablets will be created, + * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. + * Example: + * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` + * `"other", "zz"]` + * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` + * * Key assignment: + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInitialSplits() + { + return $this->initial_splits; + } + + /** + * The optional list of row keys that will be used to initially split the + * table into several tablets (tablets are similar to HBase regions). + * Given two split keys, `s1` and `s2`, three tablets will be created, + * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. + * Example: + * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` + * `"other", "zz"]` + * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` + * * Key assignment: + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; + * @param array<\Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInitialSplits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split::class); + $this->initial_splits = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php new file mode 100644 index 000000000000..af1990b8531e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php @@ -0,0 +1,70 @@ +google.bigtable.admin.v2.CreateTableRequest.Split + */ +class Split extends \Google\Protobuf\Internal\Message +{ + /** + * Row key to use as an initial tablet boundary. + * + * Generated from protobuf field bytes key = 1; + */ + protected $key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Row key to use as an initial tablet boundary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Row key to use as an initial tablet boundary. + * + * Generated from protobuf field bytes key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Row key to use as an initial tablet boundary. + * + * Generated from protobuf field bytes key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, False); + $this->key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Split::class, \Google\Cloud\Bigtable\Admin\V2\CreateTableRequest_Split::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DataBoostReadLocalWrites.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DataBoostReadLocalWrites.php new file mode 100644 index 000000000000..6d8e2927312c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DataBoostReadLocalWrites.php @@ -0,0 +1,34 @@ +google.bigtable.admin.v2.DataBoostReadLocalWrites + */ +class DataBoostReadLocalWrites extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php new file mode 100644 index 000000000000..d5e04caa49fc --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php @@ -0,0 +1,125 @@ +google.bigtable.admin.v2.DeleteAppProfileRequest + */ +class DeleteAppProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the app profile to be deleted. Values are of + * the form + * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. If true, ignore safety checks when deleting the app profile. + * + * Generated from protobuf field bool ignore_warnings = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ignore_warnings = false; + + /** + * @param string $name Required. The unique name of the app profile to be deleted. Values are of + * the form + * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. Please see + * {@see BigtableInstanceAdminClient::appProfileName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\DeleteAppProfileRequest + * + * @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 unique name of the app profile to be deleted. Values are of + * the form + * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * @type bool $ignore_warnings + * Required. If true, ignore safety checks when deleting the app profile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the app profile to be deleted. Values are of + * the form + * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the app profile to be deleted. Values are of + * the form + * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. If true, ignore safety checks when deleting the app profile. + * + * Generated from protobuf field bool ignore_warnings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getIgnoreWarnings() + { + return $this->ignore_warnings; + } + + /** + * Required. If true, ignore safety checks when deleting the app profile. + * + * Generated from protobuf field bool ignore_warnings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setIgnoreWarnings($var) + { + GPBUtil::checkBool($var); + $this->ignore_warnings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAuthorizedViewRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAuthorizedViewRequest.php new file mode 100644 index 000000000000..e623fe8ebb9d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAuthorizedViewRequest.php @@ -0,0 +1,138 @@ +google.bigtable.admin.v2.DeleteAuthorizedViewRequest + */ +class DeleteAuthorizedViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. Please see + * {@see BigtableTableAdminClient::authorizedViewName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\DeleteAuthorizedViewRequest + * + * @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 unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @type string $etag + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * 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 current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * + * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php new file mode 100644 index 000000000000..6bd500313c94 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php @@ -0,0 +1,92 @@ +google.bigtable.admin.v2.DeleteBackupRequest + */ +class DeleteBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the backup to delete. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the backup to delete. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. Please see + * {@see BigtableTableAdminClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\DeleteBackupRequest + * + * @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. Name of the backup to delete. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the backup to delete. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * + * 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. Name of the backup to delete. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * + * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php new file mode 100644 index 000000000000..690cdb21a15f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php @@ -0,0 +1,86 @@ +google.bigtable.admin.v2.DeleteClusterRequest + */ +class DeleteClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the cluster to be deleted. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the cluster to be deleted. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see + * {@see BigtableInstanceAdminClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\DeleteClusterRequest + * + * @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 unique name of the cluster to be deleted. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the cluster to be deleted. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the cluster to be deleted. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php new file mode 100644 index 000000000000..bcbc1c1a1e58 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php @@ -0,0 +1,86 @@ +google.bigtable.admin.v2.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance to be deleted. + * Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the instance to be deleted. + * Values are of the form `projects/{project}/instances/{instance}`. Please see + * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\DeleteInstanceRequest + * + * @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 unique name of the instance to be deleted. + * Values are of the form `projects/{project}/instances/{instance}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance to be deleted. + * Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the instance to be deleted. + * Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php new file mode 100644 index 000000000000..b83ec8b2043b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php @@ -0,0 +1,96 @@ +google.bigtable.admin.v2.DeleteSnapshotRequest + */ +class DeleteSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the snapshot to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the snapshot to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. Please see + * {@see BigtableTableAdminClient::snapshotName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\DeleteSnapshotRequest + * + * @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 unique name of the snapshot to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the snapshot to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the snapshot to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php new file mode 100644 index 000000000000..3bd4eac51dc3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php @@ -0,0 +1,92 @@ +google.bigtable.admin.v2.DeleteTableRequest + */ +class DeleteTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the table to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the table to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\DeleteTableRequest + * + * @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 unique name of the table to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the table to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the table to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php new file mode 100644 index 000000000000..a005c44024c4 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php @@ -0,0 +1,154 @@ +google.bigtable.admin.v2.DropRowRangeRequest + */ +class DropRowRangeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the table on which to drop a range of rows. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + protected $target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique name of the table on which to drop a range of rows. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @type string $row_key_prefix + * Delete all rows that start with this row key prefix. Prefix cannot be + * zero length. + * @type bool $delete_all_data_from_table + * Delete all rows in the table. Setting this to false is a no-op. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the table on which to drop a range of rows. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the table on which to drop a range of rows. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Delete all rows that start with this row key prefix. Prefix cannot be + * zero length. + * + * Generated from protobuf field bytes row_key_prefix = 2; + * @return string + */ + public function getRowKeyPrefix() + { + return $this->readOneof(2); + } + + public function hasRowKeyPrefix() + { + return $this->hasOneof(2); + } + + /** + * Delete all rows that start with this row key prefix. Prefix cannot be + * zero length. + * + * Generated from protobuf field bytes row_key_prefix = 2; + * @param string $var + * @return $this + */ + public function setRowKeyPrefix($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Delete all rows in the table. Setting this to false is a no-op. + * + * Generated from protobuf field bool delete_all_data_from_table = 3; + * @return bool + */ + public function getDeleteAllDataFromTable() + { + return $this->readOneof(3); + } + + public function hasDeleteAllDataFromTable() + { + return $this->hasOneof(3); + } + + /** + * Delete all rows in the table. Setting this to false is a no-op. + * + * Generated from protobuf field bool delete_all_data_from_table = 3; + * @param bool $var + * @return $this + */ + public function setDeleteAllDataFromTable($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php new file mode 100644 index 000000000000..d13861cd38e2 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php @@ -0,0 +1,160 @@ +google.bigtable.admin.v2.EncryptionInfo + */ +class EncryptionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The type of encryption used to protect this resource. + * + * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_type = 0; + /** + * Output only. The status of encrypt/decrypt calls on underlying data for + * this resource. Regardless of status, the existing data is always encrypted + * at rest. + * + * Generated from protobuf field .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_status = null; + /** + * Output only. The version of the Cloud KMS key specified in the parent + * cluster that is in use for the data underlying this table. + * + * Generated from protobuf field string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $kms_key_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $encryption_type + * Output only. The type of encryption used to protect this resource. + * @type \Google\Rpc\Status $encryption_status + * Output only. The status of encrypt/decrypt calls on underlying data for + * this resource. Regardless of status, the existing data is always encrypted + * at rest. + * @type string $kms_key_version + * Output only. The version of the Cloud KMS key specified in the parent + * cluster that is in use for the data underlying this table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The type of encryption used to protect this resource. + * + * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEncryptionType() + { + return $this->encryption_type; + } + + /** + * Output only. The type of encryption used to protect this resource. + * + * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEncryptionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo\EncryptionType::class); + $this->encryption_type = $var; + + return $this; + } + + /** + * Output only. The status of encrypt/decrypt calls on underlying data for + * this resource. Regardless of status, the existing data is always encrypted + * at rest. + * + * Generated from protobuf field .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getEncryptionStatus() + { + return $this->encryption_status; + } + + public function hasEncryptionStatus() + { + return isset($this->encryption_status); + } + + public function clearEncryptionStatus() + { + unset($this->encryption_status); + } + + /** + * Output only. The status of encrypt/decrypt calls on underlying data for + * this resource. Regardless of status, the existing data is always encrypted + * at rest. + * + * Generated from protobuf field .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setEncryptionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->encryption_status = $var; + + return $this; + } + + /** + * Output only. The version of the Cloud KMS key specified in the parent + * cluster that is in use for the data underlying this table. + * + * Generated from protobuf field string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsKeyVersion() + { + return $this->kms_key_version; + } + + /** + * Output only. The version of the Cloud KMS key specified in the parent + * cluster that is in use for the data underlying this table. + * + * Generated from protobuf field string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKeyVersion($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php new file mode 100644 index 000000000000..076657b976c4 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php @@ -0,0 +1,72 @@ +google.bigtable.admin.v2.EncryptionInfo.EncryptionType + */ +class EncryptionType +{ + /** + * Encryption type was not specified, though data at rest remains encrypted. + * + * Generated from protobuf enum ENCRYPTION_TYPE_UNSPECIFIED = 0; + */ + const ENCRYPTION_TYPE_UNSPECIFIED = 0; + /** + * The data backing this resource is encrypted at rest with a key that is + * fully managed by Google. No key version or status will be populated. + * This is the default state. + * + * Generated from protobuf enum GOOGLE_DEFAULT_ENCRYPTION = 1; + */ + const GOOGLE_DEFAULT_ENCRYPTION = 1; + /** + * The data backing this resource is encrypted at rest with a key that is + * managed by the customer. + * The in-use version of the key and its status are populated for + * CMEK-protected tables. + * CMEK-protected backups are pinned to the key version that was in use at + * the time the backup was taken. This key version is populated but its + * status is not tracked and is reported as `UNKNOWN`. + * + * Generated from protobuf enum CUSTOMER_MANAGED_ENCRYPTION = 2; + */ + const CUSTOMER_MANAGED_ENCRYPTION = 2; + + private static $valueToName = [ + self::ENCRYPTION_TYPE_UNSPECIFIED => 'ENCRYPTION_TYPE_UNSPECIFIED', + self::GOOGLE_DEFAULT_ENCRYPTION => 'GOOGLE_DEFAULT_ENCRYPTION', + self::CUSTOMER_MANAGED_ENCRYPTION => 'CUSTOMER_MANAGED_ENCRYPTION', + ]; + + 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(EncryptionType::class, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo_EncryptionType::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php new file mode 100644 index 000000000000..58f3cb15f627 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php @@ -0,0 +1,180 @@ +google.bigtable.admin.v2.GcRule + */ +class GcRule extends \Google\Protobuf\Internal\Message +{ + protected $rule; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_num_versions + * Delete all cells in a column except the most recent N. + * @type \Google\Protobuf\Duration $max_age + * Delete cells in a column older than the given age. + * Values must be at least one millisecond, and will be truncated to + * microsecond granularity. + * @type \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection $intersection + * Delete cells that would be deleted by every nested rule. + * @type \Google\Cloud\Bigtable\Admin\V2\GcRule\Union $union + * Delete cells that would be deleted by any nested rule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Delete all cells in a column except the most recent N. + * + * Generated from protobuf field int32 max_num_versions = 1; + * @return int + */ + public function getMaxNumVersions() + { + return $this->readOneof(1); + } + + public function hasMaxNumVersions() + { + return $this->hasOneof(1); + } + + /** + * Delete all cells in a column except the most recent N. + * + * Generated from protobuf field int32 max_num_versions = 1; + * @param int $var + * @return $this + */ + public function setMaxNumVersions($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Delete cells in a column older than the given age. + * Values must be at least one millisecond, and will be truncated to + * microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Duration max_age = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxAge() + { + return $this->readOneof(2); + } + + public function hasMaxAge() + { + return $this->hasOneof(2); + } + + /** + * Delete cells in a column older than the given age. + * Values must be at least one millisecond, and will be truncated to + * microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Duration max_age = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxAge($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Delete cells that would be deleted by every nested rule. + * + * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Intersection intersection = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection|null + */ + public function getIntersection() + { + return $this->readOneof(3); + } + + public function hasIntersection() + { + return $this->hasOneof(3); + } + + /** + * Delete cells that would be deleted by every nested rule. + * + * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Intersection intersection = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection $var + * @return $this + */ + public function setIntersection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Delete cells that would be deleted by any nested rule. + * + * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Union union = 4; + * @return \Google\Cloud\Bigtable\Admin\V2\GcRule\Union|null + */ + public function getUnion() + { + return $this->readOneof(4); + } + + public function hasUnion() + { + return $this->hasOneof(4); + } + + /** + * Delete cells that would be deleted by any nested rule. + * + * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Union union = 4; + * @param \Google\Cloud\Bigtable\Admin\V2\GcRule\Union $var + * @return $this + */ + public function setUnion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule\Union::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getRule() + { + return $this->whichOneof("rule"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php new file mode 100644 index 000000000000..3cdcac56ac62 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php @@ -0,0 +1,70 @@ +google.bigtable.admin.v2.GcRule.Intersection + */ +class Intersection extends \Google\Protobuf\Internal\Message +{ + /** + * Only delete cells which would be deleted by every element of `rules`. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; + */ + private $rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Only delete cells which would be deleted by every element of `rules`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Only delete cells which would be deleted by every element of `rules`. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Only delete cells which would be deleted by every element of `rules`. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\GcRule::class); + $this->rules = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Intersection::class, \Google\Cloud\Bigtable\Admin\V2\GcRule_Intersection::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php new file mode 100644 index 000000000000..0569197be3ac --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php @@ -0,0 +1,70 @@ +google.bigtable.admin.v2.GcRule.Union + */ +class Union extends \Google\Protobuf\Internal\Message +{ + /** + * Delete cells which would be deleted by any element of `rules`. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; + */ + private $rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Delete cells which would be deleted by any element of `rules`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Delete cells which would be deleted by any element of `rules`. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Delete cells which would be deleted by any element of `rules`. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\GcRule::class); + $this->rules = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Union::class, \Google\Cloud\Bigtable\Admin\V2\GcRule_Union::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php new file mode 100644 index 000000000000..de27631825e5 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php @@ -0,0 +1,92 @@ +google.bigtable.admin.v2.GenerateConsistencyTokenRequest + */ +class GenerateConsistencyTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the Table for which to create a consistency + * token. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the Table for which to create a consistency + * token. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenRequest + * + * @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 unique name of the Table for which to create a consistency + * token. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the Table for which to create a consistency + * token. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the Table for which to create a consistency + * token. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php new file mode 100644 index 000000000000..6b02098b9ffc --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php @@ -0,0 +1,68 @@ +google.bigtable.admin.v2.GenerateConsistencyTokenResponse + */ +class GenerateConsistencyTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The generated consistency token. + * + * Generated from protobuf field string consistency_token = 1; + */ + protected $consistency_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $consistency_token + * The generated consistency token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The generated consistency token. + * + * Generated from protobuf field string consistency_token = 1; + * @return string + */ + public function getConsistencyToken() + { + return $this->consistency_token; + } + + /** + * The generated consistency token. + * + * Generated from protobuf field string consistency_token = 1; + * @param string $var + * @return $this + */ + public function setConsistencyToken($var) + { + GPBUtil::checkString($var, True); + $this->consistency_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php new file mode 100644 index 000000000000..017793bbb5ff --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php @@ -0,0 +1,86 @@ +google.bigtable.admin.v2.GetAppProfileRequest + */ +class GetAppProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the requested app profile. Values are of the + * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the requested app profile. Values are of the + * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. Please see + * {@see BigtableInstanceAdminClient::appProfileName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\GetAppProfileRequest + * + * @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 unique name of the requested app profile. Values are of the + * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the requested app profile. Values are of the + * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the requested app profile. Values are of the + * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * + * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAuthorizedViewRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAuthorizedViewRequest.php new file mode 100644 index 000000000000..385c1c34c266 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAuthorizedViewRequest.php @@ -0,0 +1,130 @@ +google.bigtable.admin.v2.GetAuthorizedViewRequest + */ +class GetAuthorizedViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. Please see + * {@see BigtableTableAdminClient::authorizedViewName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\GetAuthorizedViewRequest + * + * @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 unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @type int $view + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * 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 resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\ResponseView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php new file mode 100644 index 000000000000..5f73e6f2900e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php @@ -0,0 +1,92 @@ +google.bigtable.admin.v2.GetBackupRequest + */ +class GetBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the backup. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the backup. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. Please see + * {@see BigtableTableAdminClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\GetBackupRequest + * + * @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. Name of the backup. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the backup. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * + * 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. Name of the backup. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. + * + * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php new file mode 100644 index 000000000000..037844cc19a3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php @@ -0,0 +1,86 @@ +google.bigtable.admin.v2.GetClusterRequest + */ +class GetClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the requested cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the requested cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see + * {@see BigtableInstanceAdminClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\GetClusterRequest + * + * @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 unique name of the requested cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the requested cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the requested cluster. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php new file mode 100644 index 000000000000..28ca52c590cd --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php @@ -0,0 +1,86 @@ +google.bigtable.admin.v2.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the requested instance. Values are of the form + * `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the requested instance. Values are of the form + * `projects/{project}/instances/{instance}`. Please see + * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\GetInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique name of the requested instance. Values are of the form + * `projects/{project}/instances/{instance}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the requested instance. Values are of the form + * `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the requested instance. Values are of the form + * `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php new file mode 100644 index 000000000000..5b3547a68e7a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php @@ -0,0 +1,96 @@ +google.bigtable.admin.v2.GetSnapshotRequest + */ +class GetSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the requested snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the requested snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. Please see + * {@see BigtableTableAdminClient::snapshotName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\GetSnapshotRequest + * + * @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 unique name of the requested snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the requested snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the requested snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php new file mode 100644 index 000000000000..34142b7797a5 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php @@ -0,0 +1,130 @@ +google.bigtable.admin.v2.GetTableRequest + */ +class GetTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the requested table. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The view to be applied to the returned table's fields. + * Defaults to `SCHEMA_VIEW` if unspecified. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; + */ + protected $view = 0; + + /** + * @param string $name Required. The unique name of the requested table. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\GetTableRequest + * + * @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 unique name of the requested table. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @type int $view + * The view to be applied to the returned table's fields. + * Defaults to `SCHEMA_VIEW` if unspecified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the requested table. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the requested table. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The view to be applied to the returned table's fields. + * Defaults to `SCHEMA_VIEW` if unspecified. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * The view to be applied to the returned table's fields. + * Defaults to `SCHEMA_VIEW` if unspecified. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\View::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php new file mode 100644 index 000000000000..4d75a90e66ee --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php @@ -0,0 +1,315 @@ +google.bigtable.admin.v2.HotTablet + */ +class HotTablet extends \Google\Protobuf\Internal\Message +{ + /** + * The unique name of the hot tablet. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Name of the table that contains the tablet. Values are of the form + * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * + * Generated from protobuf field string table_name = 2 [(.google.api.resource_reference) = { + */ + protected $table_name = ''; + /** + * Output only. The start time of the hot tablet. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The end time of the hot tablet. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Tablet Start Key (inclusive). + * + * Generated from protobuf field string start_key = 5; + */ + protected $start_key = ''; + /** + * Tablet End Key (inclusive). + * + * Generated from protobuf field string end_key = 6; + */ + protected $end_key = ''; + /** + * Output only. The average CPU usage spent by a node on this tablet over the + * start_time to end_time time range. The percentage is the amount of CPU used + * by the node to serve the tablet, from 0% (tablet was not interacted with) + * to 100% (the node spent all cycles serving the hot tablet). + * + * Generated from protobuf field float node_cpu_usage_percent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_cpu_usage_percent = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique name of the hot tablet. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. + * @type string $table_name + * Name of the table that contains the tablet. Values are of the form + * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The start time of the hot tablet. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The end time of the hot tablet. + * @type string $start_key + * Tablet Start Key (inclusive). + * @type string $end_key + * Tablet End Key (inclusive). + * @type float $node_cpu_usage_percent + * Output only. The average CPU usage spent by a node on this tablet over the + * start_time to end_time time range. The percentage is the amount of CPU used + * by the node to serve the tablet, from 0% (tablet was not interacted with) + * to 100% (the node spent all cycles serving the hot tablet). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The unique name of the hot tablet. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique name of the hot tablet. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. + * + * 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; + } + + /** + * Name of the table that contains the tablet. Values are of the form + * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * + * Generated from protobuf field string table_name = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getTableName() + { + return $this->table_name; + } + + /** + * Name of the table that contains the tablet. Values are of the form + * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * + * Generated from protobuf field string table_name = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTableName($var) + { + GPBUtil::checkString($var, True); + $this->table_name = $var; + + return $this; + } + + /** + * Output only. The start time of the hot tablet. + * + * 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 start time of the hot tablet. + * + * 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 end time of the hot tablet. + * + * 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 end time of the hot tablet. + * + * 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; + } + + /** + * Tablet Start Key (inclusive). + * + * Generated from protobuf field string start_key = 5; + * @return string + */ + public function getStartKey() + { + return $this->start_key; + } + + /** + * Tablet Start Key (inclusive). + * + * Generated from protobuf field string start_key = 5; + * @param string $var + * @return $this + */ + public function setStartKey($var) + { + GPBUtil::checkString($var, True); + $this->start_key = $var; + + return $this; + } + + /** + * Tablet End Key (inclusive). + * + * Generated from protobuf field string end_key = 6; + * @return string + */ + public function getEndKey() + { + return $this->end_key; + } + + /** + * Tablet End Key (inclusive). + * + * Generated from protobuf field string end_key = 6; + * @param string $var + * @return $this + */ + public function setEndKey($var) + { + GPBUtil::checkString($var, True); + $this->end_key = $var; + + return $this; + } + + /** + * Output only. The average CPU usage spent by a node on this tablet over the + * start_time to end_time time range. The percentage is the amount of CPU used + * by the node to serve the tablet, from 0% (tablet was not interacted with) + * to 100% (the node spent all cycles serving the hot tablet). + * + * Generated from protobuf field float node_cpu_usage_percent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getNodeCpuUsagePercent() + { + return $this->node_cpu_usage_percent; + } + + /** + * Output only. The average CPU usage spent by a node on this tablet over the + * start_time to end_time time range. The percentage is the amount of CPU used + * by the node to serve the tablet, from 0% (tablet was not interacted with) + * to 100% (the node spent all cycles serving the hot tablet). + * + * Generated from protobuf field float node_cpu_usage_percent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setNodeCpuUsagePercent($var) + { + GPBUtil::checkFloat($var); + $this->node_cpu_usage_percent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php new file mode 100644 index 000000000000..69fc8d87d690 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php @@ -0,0 +1,354 @@ +google.bigtable.admin.v2.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * The unique name of the instance. Values are of the form + * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The descriptive name for this instance as it appears in UIs. + * Can be changed at any time, but should be kept globally unique + * to avoid confusion. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * (`OutputOnly`) + * The current state of the instance. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance.State state = 3; + */ + protected $state = 0; + /** + * The type of the instance. Defaults to `PRODUCTION`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance.Type type = 4; + */ + protected $type = 0; + /** + * Labels are a flexible and lightweight mechanism for organizing cloud + * resources into groups that reflect a customer's organizational needs and + * deployment strategies. They can be used to filter resources and aggregate + * metrics. + * * Label keys must be between 1 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. + * * Keys and values must both be under 128 bytes. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + /** + * Output only. A server-assigned timestamp representing when this Instance + * was created. For instances created before this field was added (August + * 2021), this value is `seconds: 0, nanos: 1`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique name of the instance. Values are of the form + * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. + * @type string $display_name + * Required. The descriptive name for this instance as it appears in UIs. + * Can be changed at any time, but should be kept globally unique + * to avoid confusion. + * @type int $state + * (`OutputOnly`) + * The current state of the instance. + * @type int $type + * The type of the instance. Defaults to `PRODUCTION`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels are a flexible and lightweight mechanism for organizing cloud + * resources into groups that reflect a customer's organizational needs and + * deployment strategies. They can be used to filter resources and aggregate + * metrics. + * * Label keys must be between 1 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. + * * Keys and values must both be under 128 bytes. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. A server-assigned timestamp representing when this Instance + * was created. For instances created before this field was added (August + * 2021), this value is `seconds: 0, nanos: 1`. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The unique name of the instance. Values are of the form + * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique name of the instance. Values are of the form + * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The descriptive name for this instance as it appears in UIs. + * Can be changed at any time, but should be kept globally unique + * to avoid confusion. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The descriptive name for this instance as it appears in UIs. + * Can be changed at any time, but should be kept globally unique + * to avoid confusion. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * (`OutputOnly`) + * The current state of the instance. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance.State state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * (`OutputOnly`) + * The current state of the instance. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance.State state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * The type of the instance. Defaults to `PRODUCTION`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance.Type type = 4; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the instance. Defaults to `PRODUCTION`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance.Type type = 4; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Instance\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Labels are a flexible and lightweight mechanism for organizing cloud + * resources into groups that reflect a customer's organizational needs and + * deployment strategies. They can be used to filter resources and aggregate + * metrics. + * * Label keys must be between 1 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. + * * Keys and values must both be under 128 bytes. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels are a flexible and lightweight mechanism for organizing cloud + * resources into groups that reflect a customer's organizational needs and + * deployment strategies. They can be used to filter resources and aggregate + * metrics. + * * Label keys must be between 1 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform to + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. + * * Keys and values must both be under 128 bytes. + * + * Generated from protobuf field map labels = 5; + * @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. A server-assigned timestamp representing when this Instance + * was created. For instances created before this field was added (August + * 2021), this value is `seconds: 0, nanos: 1`. + * + * 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. A server-assigned timestamp representing when this Instance + * was created. For instances created before this field was added (August + * 2021), this value is `seconds: 0, nanos: 1`. + * + * 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. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php new file mode 100644 index 000000000000..8442f3728c83 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php @@ -0,0 +1,66 @@ +google.bigtable.admin.v2.Instance.State + */ +class State +{ + /** + * The state of the instance could not be determined. + * + * Generated from protobuf enum STATE_NOT_KNOWN = 0; + */ + const STATE_NOT_KNOWN = 0; + /** + * The instance has been successfully created and can serve requests + * to its tables. + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * The instance is currently being created, and may be destroyed + * if the creation process encounters an error. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + + private static $valueToName = [ + self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', + self::READY => 'READY', + self::CREATING => 'CREATING', + ]; + + 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\Bigtable\Admin\V2\Instance_State::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php new file mode 100644 index 000000000000..8e68c47b9d0f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php @@ -0,0 +1,68 @@ +google.bigtable.admin.v2.Instance.Type + */ +class Type +{ + /** + * The type of the instance is unspecified. If set when creating an + * instance, a `PRODUCTION` instance will be created. If set when updating + * an instance, the type will be left unchanged. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * An instance meant for production use. `serve_nodes` must be set + * on the cluster. + * + * Generated from protobuf enum PRODUCTION = 1; + */ + const PRODUCTION = 1; + /** + * DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces + * a higher minimum node count than DEVELOPMENT. + * + * Generated from protobuf enum DEVELOPMENT = 2; + */ + const DEVELOPMENT = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::PRODUCTION => 'PRODUCTION', + self::DEVELOPMENT => 'DEVELOPMENT', + ]; + + 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\Bigtable\Admin\V2\Instance_Type::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php new file mode 100644 index 000000000000..42d6c478cd5c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php @@ -0,0 +1,193 @@ +google.bigtable.admin.v2.ListAppProfilesRequest + */ +class ListAppProfilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance for which a list of app profiles + * is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + * e.g., `projects/myproject/instances/-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The unique name of the instance for which a list of app profiles + * is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + * e.g., `projects/myproject/instances/-`. Please see + * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\ListAppProfilesRequest + * + * @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 unique name of the instance for which a list of app profiles + * is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + * e.g., `projects/myproject/instances/-`. + * @type int $page_size + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @type string $page_token + * The value of `next_page_token` returned by a previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance for which a list of app profiles + * is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + * e.g., `projects/myproject/instances/-`. + * + * 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 unique name of the instance for which a list of app profiles + * is requested. Values are of the form + * `projects/{project}/instances/{instance}`. + * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, + * e.g., `projects/myproject/instances/-`. + * + * 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; + } + + /** + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 2; + * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php new file mode 100644 index 000000000000..c49770b40a07 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php @@ -0,0 +1,155 @@ +google.bigtable.admin.v2.ListAppProfilesResponse + */ +class ListAppProfilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested app profiles. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; + */ + private $app_profiles; + /** + * Set if not all app profiles could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations from which AppProfile information could not be retrieved, + * due to an outage or some other transient condition. + * AppProfiles from these locations may be missing from `app_profiles`. + * Values are of the form `projects//locations/` + * + * Generated from protobuf field repeated string failed_locations = 3; + */ + private $failed_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\AppProfile>|\Google\Protobuf\Internal\RepeatedField $app_profiles + * The list of requested app profiles. + * @type string $next_page_token + * Set if not all app profiles could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * @type array|\Google\Protobuf\Internal\RepeatedField $failed_locations + * Locations from which AppProfile information could not be retrieved, + * due to an outage or some other transient condition. + * AppProfiles from these locations may be missing from `app_profiles`. + * Values are of the form `projects//locations/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested app profiles. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppProfiles() + { + return $this->app_profiles; + } + + /** + * The list of requested app profiles. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\AppProfile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppProfiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\AppProfile::class); + $this->app_profiles = $arr; + + return $this; + } + + /** + * Set if not all app profiles could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Set if not all app profiles could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations from which AppProfile information could not be retrieved, + * due to an outage or some other transient condition. + * AppProfiles from these locations may be missing from `app_profiles`. + * Values are of the form `projects//locations/` + * + * Generated from protobuf field repeated string failed_locations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFailedLocations() + { + return $this->failed_locations; + } + + /** + * Locations from which AppProfile information could not be retrieved, + * due to an outage or some other transient condition. + * AppProfiles from these locations may be missing from `app_profiles`. + * Values are of the form `projects//locations/` + * + * Generated from protobuf field repeated string failed_locations = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFailedLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->failed_locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsRequest.php new file mode 100644 index 000000000000..4a02cb12c2c3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsRequest.php @@ -0,0 +1,222 @@ +google.bigtable.admin.v2.ListAuthorizedViewsRequest + */ +class ListAuthorizedViewsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $parent Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsRequest + * + * @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 unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @type int $page_size + * Optional. Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @type string $page_token + * Optional. The value of `next_page_token` returned by a previous call. + * @type int $view + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * 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 results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * 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. The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\ResponseView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsResponse.php new file mode 100644 index 000000000000..83d26b843966 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsResponse.php @@ -0,0 +1,110 @@ +google.bigtable.admin.v2.ListAuthorizedViewsResponse + */ +class ListAuthorizedViewsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The AuthorizedViews present in the requested table. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; + */ + private $authorized_views; + /** + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\AuthorizedView>|\Google\Protobuf\Internal\RepeatedField $authorized_views + * The AuthorizedViews present in the requested table. + * @type string $next_page_token + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The AuthorizedViews present in the requested table. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAuthorizedViews() + { + return $this->authorized_views; + } + + /** + * The AuthorizedViews present in the requested table. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\AuthorizedView>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAuthorizedViews($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView::class); + $this->authorized_views = $arr; + + return $this; + } + + /** + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php new file mode 100644 index 000000000000..6f5666e3bdbd --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php @@ -0,0 +1,429 @@ +google.bigtable.admin.v2.ListBackupsRequest + */ +class ListBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The cluster to list backups from. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list backups for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * A filter expression that filters backups listed in the response. + * The expression must specify the field name, a comparison operator, + * and the value that you want to use for filtering. The value must be a + * string, a number, or a boolean. The comparison operator must be + * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is + * roughly synonymous with equality. Filter rules are case insensitive. + * The fields eligible for filtering are: + * * `name` + * * `source_table` + * * `state` + * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * To filter on multiple expressions, provide each separate expression within + * parentheses. By default, each expression is an AND expression. However, + * you can include AND, OR, and NOT expressions explicitly. + * Some examples of using filters are: + * * `name:"exact"` --> The backup's name is the string "exact". + * * `name:howl` --> The backup's name contains the string "howl". + * * `source_table:prod` + * --> The source_table's name contains the string "prod". + * * `state:CREATING` --> The backup is pending creation. + * * `state:READY` --> The backup is fully created and ready for use. + * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * An expression for specifying the sort order of the results of the request. + * The string value should specify one or more fields in + * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at + * https://aip.dev/132#ordering. + * Fields supported are: + * * name + * * source_table + * * expire_time + * * start_time + * * end_time + * * size_bytes + * * state + * For example, "start_time". The default sorting order is ascending. + * To specify descending order for the field, a suffix " desc" should + * be appended to the field name. For example, "start_time desc". + * Redundant space characters in the syntax are insigificant. + * If order_by is empty, results will be sorted by `start_time` in descending + * order starting from the most recently created backup. + * + * Generated from protobuf field string order_by = 3; + */ + protected $order_by = ''; + /** + * Number of backups to be returned in the response. If 0 or + * less, defaults to the server's maximum allowed page size. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * If non-empty, `page_token` should contain a + * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] + * from a previous + * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the + * same `parent` and with the same `filter`. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The cluster to list backups from. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list backups for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. Please see + * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\ListBackupsRequest + * + * @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 cluster to list backups from. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list backups for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * @type string $filter + * A filter expression that filters backups listed in the response. + * The expression must specify the field name, a comparison operator, + * and the value that you want to use for filtering. The value must be a + * string, a number, or a boolean. The comparison operator must be + * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is + * roughly synonymous with equality. Filter rules are case insensitive. + * The fields eligible for filtering are: + * * `name` + * * `source_table` + * * `state` + * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * To filter on multiple expressions, provide each separate expression within + * parentheses. By default, each expression is an AND expression. However, + * you can include AND, OR, and NOT expressions explicitly. + * Some examples of using filters are: + * * `name:"exact"` --> The backup's name is the string "exact". + * * `name:howl` --> The backup's name contains the string "howl". + * * `source_table:prod` + * --> The source_table's name contains the string "prod". + * * `state:CREATING` --> The backup is pending creation. + * * `state:READY` --> The backup is fully created and ready for use. + * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + * @type string $order_by + * An expression for specifying the sort order of the results of the request. + * The string value should specify one or more fields in + * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at + * https://aip.dev/132#ordering. + * Fields supported are: + * * name + * * source_table + * * expire_time + * * start_time + * * end_time + * * size_bytes + * * state + * For example, "start_time". The default sorting order is ascending. + * To specify descending order for the field, a suffix " desc" should + * be appended to the field name. For example, "start_time desc". + * Redundant space characters in the syntax are insigificant. + * If order_by is empty, results will be sorted by `start_time` in descending + * order starting from the most recently created backup. + * @type int $page_size + * Number of backups to be returned in the response. If 0 or + * less, defaults to the server's maximum allowed page size. + * @type string $page_token + * If non-empty, `page_token` should contain a + * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] + * from a previous + * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the + * same `parent` and with the same `filter`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The cluster to list backups from. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list backups for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * + * 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 cluster to list backups from. Values are of the + * form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list backups for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * + * 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; + } + + /** + * A filter expression that filters backups listed in the response. + * The expression must specify the field name, a comparison operator, + * and the value that you want to use for filtering. The value must be a + * string, a number, or a boolean. The comparison operator must be + * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is + * roughly synonymous with equality. Filter rules are case insensitive. + * The fields eligible for filtering are: + * * `name` + * * `source_table` + * * `state` + * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * To filter on multiple expressions, provide each separate expression within + * parentheses. By default, each expression is an AND expression. However, + * you can include AND, OR, and NOT expressions explicitly. + * Some examples of using filters are: + * * `name:"exact"` --> The backup's name is the string "exact". + * * `name:howl` --> The backup's name contains the string "howl". + * * `source_table:prod` + * --> The source_table's name contains the string "prod". + * * `state:CREATING` --> The backup is pending creation. + * * `state:READY` --> The backup is fully created and ready for use. + * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that filters backups listed in the response. + * The expression must specify the field name, a comparison operator, + * and the value that you want to use for filtering. The value must be a + * string, a number, or a boolean. The comparison operator must be + * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is + * roughly synonymous with equality. Filter rules are case insensitive. + * The fields eligible for filtering are: + * * `name` + * * `source_table` + * * `state` + * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * To filter on multiple expressions, provide each separate expression within + * parentheses. By default, each expression is an AND expression. However, + * you can include AND, OR, and NOT expressions explicitly. + * Some examples of using filters are: + * * `name:"exact"` --> The backup's name is the string "exact". + * * `name:howl` --> The backup's name contains the string "howl". + * * `source_table:prod` + * --> The source_table's name contains the string "prod". + * * `state:CREATING` --> The backup is pending creation. + * * `state:READY` --> The backup is fully created and ready for use. + * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * An expression for specifying the sort order of the results of the request. + * The string value should specify one or more fields in + * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at + * https://aip.dev/132#ordering. + * Fields supported are: + * * name + * * source_table + * * expire_time + * * start_time + * * end_time + * * size_bytes + * * state + * For example, "start_time". The default sorting order is ascending. + * To specify descending order for the field, a suffix " desc" should + * be appended to the field name. For example, "start_time desc". + * Redundant space characters in the syntax are insigificant. + * If order_by is empty, results will be sorted by `start_time` in descending + * order starting from the most recently created backup. + * + * Generated from protobuf field string order_by = 3; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * An expression for specifying the sort order of the results of the request. + * The string value should specify one or more fields in + * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at + * https://aip.dev/132#ordering. + * Fields supported are: + * * name + * * source_table + * * expire_time + * * start_time + * * end_time + * * size_bytes + * * state + * For example, "start_time". The default sorting order is ascending. + * To specify descending order for the field, a suffix " desc" should + * be appended to the field name. For example, "start_time desc". + * Redundant space characters in the syntax are insigificant. + * If order_by is empty, results will be sorted by `start_time` in descending + * order starting from the most recently created backup. + * + * Generated from protobuf field string order_by = 3; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Number of backups to be returned in the response. If 0 or + * less, defaults to the server's maximum allowed page size. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Number of backups to be returned in the response. If 0 or + * less, defaults to the server's maximum allowed page size. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If non-empty, `page_token` should contain a + * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] + * from a previous + * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the + * same `parent` and with the same `filter`. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If non-empty, `page_token` should contain a + * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] + * from a previous + * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the + * same `parent` and with the same `filter`. + * + * Generated from protobuf field string page_token = 5; + * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php new file mode 100644 index 000000000000..c9792bd915b6 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php @@ -0,0 +1,110 @@ +google.bigtable.admin.v2.ListBackupsResponse + */ +class ListBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of matching backups. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Backup backups = 1; + */ + private $backups; + /** + * `next_page_token` can be sent in a subsequent + * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call + * to fetch more of the matching backups. + * + * 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\Bigtable\Admin\V2\Backup>|\Google\Protobuf\Internal\RepeatedField $backups + * The list of matching backups. + * @type string $next_page_token + * `next_page_token` can be sent in a subsequent + * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call + * to fetch more of the matching backups. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The list of matching backups. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Backup backups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackups() + { + return $this->backups; + } + + /** + * The list of matching backups. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Backup backups = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\Backup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Backup::class); + $this->backups = $arr; + + return $this; + } + + /** + * `next_page_token` can be sent in a subsequent + * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call + * to fetch more of the matching backups. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * `next_page_token` can be sent in a subsequent + * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call + * to fetch more of the matching backups. + * + * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php new file mode 100644 index 000000000000..00a12138e516 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php @@ -0,0 +1,135 @@ +google.bigtable.admin.v2.ListClustersRequest + */ +class ListClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance for which a list of clusters is + * requested. Values are of the form + * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list + * Clusters for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The unique name of the instance for which a list of clusters is + * requested. Values are of the form + * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list + * Clusters for all Instances in a project, e.g., + * `projects/myproject/instances/-`. Please see + * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\ListClustersRequest + * + * @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 unique name of the instance for which a list of clusters is + * requested. Values are of the form + * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list + * Clusters for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + * @type string $page_token + * DEPRECATED: This field is unused and ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance for which a list of clusters is + * requested. Values are of the form + * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list + * Clusters for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + * + * 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 unique name of the instance for which a list of clusters is + * requested. Values are of the form + * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list + * Clusters for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + * + * 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; + } + + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string page_token = 2; + * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php new file mode 100644 index 000000000000..84ccf514aa70 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php @@ -0,0 +1,151 @@ +google.bigtable.admin.v2.ListClustersResponse + */ +class ListClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested clusters. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Cluster clusters = 1; + */ + private $clusters; + /** + * Locations from which Cluster information could not be retrieved, + * due to an outage or some other transient condition. + * Clusters from these locations may be missing from `clusters`, + * or may only have partial information returned. + * Values are of the form `projects//locations/` + * + * Generated from protobuf field repeated string failed_locations = 2; + */ + private $failed_locations; + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters + * The list of requested clusters. + * @type array|\Google\Protobuf\Internal\RepeatedField $failed_locations + * Locations from which Cluster information could not be retrieved, + * due to an outage or some other transient condition. + * Clusters from these locations may be missing from `clusters`, + * or may only have partial information returned. + * Values are of the form `projects//locations/` + * @type string $next_page_token + * DEPRECATED: This field is unused and ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested clusters. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Cluster clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * The list of requested clusters. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Cluster clusters = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\Cluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); + $this->clusters = $arr; + + return $this; + } + + /** + * Locations from which Cluster information could not be retrieved, + * due to an outage or some other transient condition. + * Clusters from these locations may be missing from `clusters`, + * or may only have partial information returned. + * Values are of the form `projects//locations/` + * + * Generated from protobuf field repeated string failed_locations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFailedLocations() + { + return $this->failed_locations; + } + + /** + * Locations from which Cluster information could not be retrieved, + * due to an outage or some other transient condition. + * Clusters from these locations may be missing from `clusters`, + * or may only have partial information returned. + * Values are of the form `projects//locations/` + * + * Generated from protobuf field repeated string failed_locations = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFailedLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->failed_locations = $arr; + + return $this; + } + + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php new file mode 100644 index 000000000000..2fcefef12c29 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php @@ -0,0 +1,291 @@ +google.bigtable.admin.v2.ListHotTabletsRequest + */ +class ListHotTabletsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The cluster name to list hot tablets. + * Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The start time to list hot tablets. The hot tablets in the response will + * have start times between the requested start time and end time. Start time + * defaults to Now if it is unset, and end time defaults to Now - 24 hours if + * it is unset. The start time should be less than the end time, and the + * maximum allowed time range between start time and end time is 48 hours. + * Start time and end time should have values between Now and Now - 14 days. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * The end time to list hot tablets. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + /** + * Maximum number of results per page. + * A page_size that is empty or zero lets the server choose the number of + * items to return. A page_size which is strictly positive will return at most + * that many items. A negative page_size will cause an error. + * Following the first request, subsequent paginated calls do not need a + * page_size field. If a page_size is set in subsequent calls, it must match + * the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The cluster name to list hot tablets. + * Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see + * {@see BigtableInstanceAdminClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\ListHotTabletsRequest + * + * @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 cluster name to list hot tablets. + * Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @type \Google\Protobuf\Timestamp $start_time + * The start time to list hot tablets. The hot tablets in the response will + * have start times between the requested start time and end time. Start time + * defaults to Now if it is unset, and end time defaults to Now - 24 hours if + * it is unset. The start time should be less than the end time, and the + * maximum allowed time range between start time and end time is 48 hours. + * Start time and end time should have values between Now and Now - 14 days. + * @type \Google\Protobuf\Timestamp $end_time + * The end time to list hot tablets. + * @type int $page_size + * Maximum number of results per page. + * A page_size that is empty or zero lets the server choose the number of + * items to return. A page_size which is strictly positive will return at most + * that many items. A negative page_size will cause an error. + * Following the first request, subsequent paginated calls do not need a + * page_size field. If a page_size is set in subsequent calls, it must match + * the page_size given in the first request. + * @type string $page_token + * The value of `next_page_token` returned by a previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The cluster name to list hot tablets. + * Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * 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 cluster name to list hot tablets. + * Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The start time to list hot tablets. The hot tablets in the response will + * have start times between the requested start time and end time. Start time + * defaults to Now if it is unset, and end time defaults to Now - 24 hours if + * it is unset. The start time should be less than the end time, and the + * maximum allowed time range between start time and end time is 48 hours. + * Start time and end time should have values between Now and Now - 14 days. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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 start time to list hot tablets. The hot tablets in the response will + * have start times between the requested start time and end time. Start time + * defaults to Now if it is unset, and end time defaults to Now - 24 hours if + * it is unset. The start time should be less than the end time, and the + * maximum allowed time range between start time and end time is 48 hours. + * Start time and end time should have values between Now and Now - 14 days. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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 end time to list hot tablets. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @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 end time to list hot tablets. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Maximum number of results per page. + * A page_size that is empty or zero lets the server choose the number of + * items to return. A page_size which is strictly positive will return at most + * that many items. A negative page_size will cause an error. + * Following the first request, subsequent paginated calls do not need a + * page_size field. If a page_size is set in subsequent calls, it must match + * the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of results per page. + * A page_size that is empty or zero lets the server choose the number of + * items to return. A page_size which is strictly positive will return at most + * that many items. A negative page_size will cause an error. + * Following the first request, subsequent paginated calls do not need a + * page_size field. If a page_size is set in subsequent calls, it must match + * the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 5; + * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php new file mode 100644 index 000000000000..39b6a733dade --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php @@ -0,0 +1,125 @@ +google.bigtable.admin.v2.ListHotTabletsResponse + */ +class ListHotTabletsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of hot tablets in the tables of the requested cluster that fall + * within the requested time range. Hot tablets are ordered by node cpu usage + * percent. If there are multiple hot tablets that correspond to the same + * tablet within a 15-minute interval, only the hot tablet with the highest + * node cpu usage will be included in the response. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; + */ + private $hot_tablets; + /** + * Set if not all hot tablets could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\HotTablet>|\Google\Protobuf\Internal\RepeatedField $hot_tablets + * List of hot tablets in the tables of the requested cluster that fall + * within the requested time range. Hot tablets are ordered by node cpu usage + * percent. If there are multiple hot tablets that correspond to the same + * tablet within a 15-minute interval, only the hot tablet with the highest + * node cpu usage will be included in the response. + * @type string $next_page_token + * Set if not all hot tablets could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * List of hot tablets in the tables of the requested cluster that fall + * within the requested time range. Hot tablets are ordered by node cpu usage + * percent. If there are multiple hot tablets that correspond to the same + * tablet within a 15-minute interval, only the hot tablet with the highest + * node cpu usage will be included in the response. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHotTablets() + { + return $this->hot_tablets; + } + + /** + * List of hot tablets in the tables of the requested cluster that fall + * within the requested time range. Hot tablets are ordered by node cpu usage + * percent. If there are multiple hot tablets that correspond to the same + * tablet within a 15-minute interval, only the hot tablet with the highest + * node cpu usage will be included in the response. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\HotTablet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHotTablets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\HotTablet::class); + $this->hot_tablets = $arr; + + return $this; + } + + /** + * Set if not all hot tablets could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Set if not all hot tablets could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php new file mode 100644 index 000000000000..e0d88b2803fa --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php @@ -0,0 +1,120 @@ +google.bigtable.admin.v2.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the project for which a list of instances is + * requested. Values are of the form `projects/{project}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The unique name of the project for which a list of instances is + * requested. Values are of the form `projects/{project}`. Please see + * {@see BigtableInstanceAdminClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\ListInstancesRequest + * + * @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 unique name of the project for which a list of instances is + * requested. Values are of the form `projects/{project}`. + * @type string $page_token + * DEPRECATED: This field is unused and ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the project for which a list of instances is + * requested. Values are of the form `projects/{project}`. + * + * 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 unique name of the project for which a list of instances is + * requested. Values are of the form `projects/{project}`. + * + * 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; + } + + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string page_token = 2; + * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php new file mode 100644 index 000000000000..6e08425dbe3e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php @@ -0,0 +1,155 @@ +google.bigtable.admin.v2.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested instances. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Instance instances = 1; + */ + private $instances; + /** + * Locations from which Instance information could not be retrieved, + * due to an outage or some other transient condition. + * Instances whose Clusters are all in one of the failed locations + * may be missing from `instances`, and Instances with at least one + * Cluster in a failed location may only have partial information returned. + * Values are of the form `projects//locations/` + * + * Generated from protobuf field repeated string failed_locations = 2; + */ + private $failed_locations; + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $instances + * The list of requested instances. + * @type array|\Google\Protobuf\Internal\RepeatedField $failed_locations + * Locations from which Instance information could not be retrieved, + * due to an outage or some other transient condition. + * Instances whose Clusters are all in one of the failed locations + * may be missing from `instances`, and Instances with at least one + * Cluster in a failed location may only have partial information returned. + * Values are of the form `projects//locations/` + * @type string $next_page_token + * DEPRECATED: This field is unused and ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested instances. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Instance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * The list of requested instances. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Instance instances = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * Locations from which Instance information could not be retrieved, + * due to an outage or some other transient condition. + * Instances whose Clusters are all in one of the failed locations + * may be missing from `instances`, and Instances with at least one + * Cluster in a failed location may only have partial information returned. + * Values are of the form `projects//locations/` + * + * Generated from protobuf field repeated string failed_locations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFailedLocations() + { + return $this->failed_locations; + } + + /** + * Locations from which Instance information could not be retrieved, + * due to an outage or some other transient condition. + * Instances whose Clusters are all in one of the failed locations + * may be missing from `instances`, and Instances with at least one + * Cluster in a failed location may only have partial information returned. + * Values are of the form `projects//locations/` + * + * Generated from protobuf field repeated string failed_locations = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFailedLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->failed_locations = $arr; + + return $this; + } + + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * DEPRECATED: This field is unused and ignored. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php new file mode 100644 index 000000000000..5ee84a207816 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php @@ -0,0 +1,178 @@ +google.bigtable.admin.v2.ListSnapshotsRequest + */ +class ListSnapshotsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the cluster for which snapshots should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of snapshots to return per page. + * CURRENTLY UNIMPLEMENTED AND IGNORED. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The unique name of the cluster for which snapshots should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. Please see + * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\ListSnapshotsRequest + * + * @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 unique name of the cluster for which snapshots should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * @type int $page_size + * The maximum number of snapshots to return per page. + * CURRENTLY UNIMPLEMENTED AND IGNORED. + * @type string $page_token + * The value of `next_page_token` returned by a previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the cluster for which snapshots should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * + * 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 unique name of the cluster for which snapshots should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, + * e.g., `projects/{project}/instances/{instance}/clusters/-`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of snapshots to return per page. + * CURRENTLY UNIMPLEMENTED AND IGNORED. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of snapshots to return per page. + * CURRENTLY UNIMPLEMENTED AND IGNORED. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php new file mode 100644 index 000000000000..c3d9df13f7e0 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php @@ -0,0 +1,114 @@ +google.bigtable.admin.v2.ListSnapshotsResponse + */ +class ListSnapshotsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The snapshots present in the requested cluster. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; + */ + private $snapshots; + /** + * Set if not all snapshots could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\Snapshot>|\Google\Protobuf\Internal\RepeatedField $snapshots + * The snapshots present in the requested cluster. + * @type string $next_page_token + * Set if not all snapshots could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The snapshots present in the requested cluster. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSnapshots() + { + return $this->snapshots; + } + + /** + * The snapshots present in the requested cluster. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\Snapshot>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSnapshots($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Snapshot::class); + $this->snapshots = $arr; + + return $this; + } + + /** + * Set if not all snapshots could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Set if not all snapshots could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php new file mode 100644 index 000000000000..d10580296a66 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php @@ -0,0 +1,217 @@ +google.bigtable.admin.v2.ListTablesRequest + */ +class ListTablesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance for which tables should be + * listed. Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The view to be applied to the returned tables' fields. + * NAME_ONLY view (default) and REPLICATION_VIEW are supported. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; + */ + protected $view = 0; + /** + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The unique name of the instance for which tables should be + * listed. Values are of the form `projects/{project}/instances/{instance}`. Please see + * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\ListTablesRequest + * + * @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 unique name of the instance for which tables should be + * listed. Values are of the form `projects/{project}/instances/{instance}`. + * @type int $view + * The view to be applied to the returned tables' fields. + * NAME_ONLY view (default) and REPLICATION_VIEW are supported. + * @type int $page_size + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @type string $page_token + * The value of `next_page_token` returned by a previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance for which tables should be + * listed. Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The unique name of the instance for which tables should be + * listed. Values are of the form `projects/{project}/instances/{instance}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The view to be applied to the returned tables' fields. + * NAME_ONLY view (default) and REPLICATION_VIEW are supported. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * The view to be applied to the returned tables' fields. + * NAME_ONLY view (default) and REPLICATION_VIEW are supported. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\View::class); + $this->view = $var; + + return $this; + } + + /** + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php new file mode 100644 index 000000000000..1dac80ef82f5 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php @@ -0,0 +1,110 @@ +google.bigtable.admin.v2.ListTablesResponse + */ +class ListTablesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The tables present in the requested instance. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Table tables = 1; + */ + private $tables; + /** + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\Table>|\Google\Protobuf\Internal\RepeatedField $tables + * The tables present in the requested instance. + * @type string $next_page_token + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The tables present in the requested instance. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Table tables = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTables() + { + return $this->tables; + } + + /** + * The tables present in the requested instance. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Table tables = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\Table>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Table::class); + $this->tables = $arr; + + return $this; + } + + /** + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php new file mode 100644 index 000000000000..8960e4680f7d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php @@ -0,0 +1,177 @@ +google.bigtable.admin.v2.ModifyColumnFamiliesRequest + */ +class ModifyColumnFamiliesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the table whose families should be modified. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Modifications to be atomically applied to the specified table's + * families. Entries are applied in order, meaning that earlier modifications + * can be masked by later ones (in the case of repeated updates to the same + * family, for example). + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $modifications; + /** + * Optional. If true, ignore safety checks when modifying the column families. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ignore_warnings = false; + + /** + * @param string $name Required. The unique name of the table whose families should be modified. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * @param \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification[] $modifications Required. Modifications to be atomically applied to the specified table's + * families. Entries are applied in order, meaning that earlier modifications + * can be masked by later ones (in the case of repeated updates to the same + * family, for example). + * + * @return \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest + * + * @experimental + */ + public static function build(string $name, array $modifications): self + { + return (new self()) + ->setName($name) + ->setModifications($modifications); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique name of the table whose families should be modified. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @type array<\Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification>|\Google\Protobuf\Internal\RepeatedField $modifications + * Required. Modifications to be atomically applied to the specified table's + * families. Entries are applied in order, meaning that earlier modifications + * can be masked by later ones (in the case of repeated updates to the same + * family, for example). + * @type bool $ignore_warnings + * Optional. If true, ignore safety checks when modifying the column families. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the table whose families should be modified. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the table whose families should be modified. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Modifications to be atomically applied to the specified table's + * families. Entries are applied in order, meaning that earlier modifications + * can be masked by later ones (in the case of repeated updates to the same + * family, for example). + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getModifications() + { + return $this->modifications; + } + + /** + * Required. Modifications to be atomically applied to the specified table's + * families. Entries are applied in order, meaning that earlier modifications + * can be masked by later ones (in the case of repeated updates to the same + * family, for example). + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setModifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification::class); + $this->modifications = $arr; + + return $this; + } + + /** + * Optional. If true, ignore safety checks when modifying the column families. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreWarnings() + { + return $this->ignore_warnings; + } + + /** + * Optional. If true, ignore safety checks when modifying the column families. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreWarnings($var) + { + GPBUtil::checkBool($var); + $this->ignore_warnings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php new file mode 100644 index 000000000000..0675f7d22032 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php @@ -0,0 +1,239 @@ +google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + */ +class Modification extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the column family to be modified. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + * mod should be updated, ignored for other modification types. If unset or + * empty, we treat it as updating `gc_rule` to be backward compatible. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + protected $mod; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The ID of the column family to be modified. + * @type \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $create + * Create a new column family with the specified schema, or fail if + * one already exists with the given ID. + * @type \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $update + * Update an existing column family to the specified schema, or fail + * if no column family exists with the given ID. + * @type bool $drop + * Drop (delete) the column family with the given ID, or fail if no such + * family exists. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + * mod should be updated, ignored for other modification types. If unset or + * empty, we treat it as updating `gc_rule` to be backward compatible. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the column family to be modified. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the column family to be modified. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Create a new column family with the specified schema, or fail if + * one already exists with the given ID. + * + * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily create = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\ColumnFamily|null + */ + public function getCreate() + { + return $this->readOneof(2); + } + + public function hasCreate() + { + return $this->hasOneof(2); + } + + /** + * Create a new column family with the specified schema, or fail if + * one already exists with the given ID. + * + * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily create = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $var + * @return $this + */ + public function setCreate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Update an existing column family to the specified schema, or fail + * if no column family exists with the given ID. + * + * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily update = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\ColumnFamily|null + */ + public function getUpdate() + { + return $this->readOneof(3); + } + + public function hasUpdate() + { + return $this->hasOneof(3); + } + + /** + * Update an existing column family to the specified schema, or fail + * if no column family exists with the given ID. + * + * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily update = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Drop (delete) the column family with the given ID, or fail if no such + * family exists. + * + * Generated from protobuf field bool drop = 4; + * @return bool + */ + public function getDrop() + { + return $this->readOneof(4); + } + + public function hasDrop() + { + return $this->hasOneof(4); + } + + /** + * Drop (delete) the column family with the given ID, or fail if no such + * family exists. + * + * Generated from protobuf field bool drop = 4; + * @param bool $var + * @return $this + */ + public function setDrop($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + * mod should be updated, ignored for other modification types. If unset or + * empty, we treat it as updating `gc_rule` to be backward compatible. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + * mod should be updated, ignored for other modification types. If unset or + * empty, we treat it as updating `gc_rule` to be backward compatible. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * @return string + */ + public function getMod() + { + return $this->whichOneof("mod"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Modification::class, \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest_Modification::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php new file mode 100644 index 000000000000..31e8504969ea --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php @@ -0,0 +1,164 @@ +google.bigtable.admin.v2.OperationProgress + */ +class OperationProgress extends \Google\Protobuf\Internal\Message +{ + /** + * Percent completion of the operation. + * Values are between 0 and 100 inclusive. + * + * Generated from protobuf field int32 progress_percent = 1; + */ + protected $progress_percent = 0; + /** + * Time the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * If set, the time at which this operation failed or was completed + * successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $progress_percent + * Percent completion of the operation. + * Values are between 0 and 100 inclusive. + * @type \Google\Protobuf\Timestamp $start_time + * Time the request was received. + * @type \Google\Protobuf\Timestamp $end_time + * If set, the time at which this operation failed or was completed + * successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Common::initOnce(); + parent::__construct($data); + } + + /** + * Percent completion of the operation. + * Values are between 0 and 100 inclusive. + * + * Generated from protobuf field int32 progress_percent = 1; + * @return int + */ + public function getProgressPercent() + { + return $this->progress_percent; + } + + /** + * Percent completion of the operation. + * Values are between 0 and 100 inclusive. + * + * Generated from protobuf field int32 progress_percent = 1; + * @param int $var + * @return $this + */ + public function setProgressPercent($var) + { + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + + /** + * Time the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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); + } + + /** + * Time the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * If set, the time at which this operation failed or was completed + * successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @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); + } + + /** + * If set, the time at which this operation failed or was completed + * successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php new file mode 100644 index 000000000000..6a51fb65bbe8 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php @@ -0,0 +1,114 @@ +google.bigtable.admin.v2.OptimizeRestoredTableMetadata + */ +class OptimizeRestoredTableMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the restored table being optimized. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The progress of the post-restore optimizations. + * + * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 2; + */ + protected $progress = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the restored table being optimized. + * @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress + * The progress of the post-restore optimizations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Name of the restored table being optimized. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the restored table being optimized. + * + * 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 progress of the post-restore optimizations. + * + * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null + */ + public function getProgress() + { + return $this->progress; + } + + public function hasProgress() + { + return isset($this->progress); + } + + public function clearProgress() + { + unset($this->progress); + } + + /** + * The progress of the post-restore optimizations. + * + * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var + * @return $this + */ + public function setProgress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class); + $this->progress = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php new file mode 100644 index 000000000000..60d2f7c47f64 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php @@ -0,0 +1,165 @@ +google.bigtable.admin.v2.PartialUpdateClusterMetadata + */ +class PartialUpdateClusterMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 1; + */ + protected $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2; + */ + protected $finish_time = null; + /** + * The original request for PartialUpdateCluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; + */ + protected $original_request = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * @type \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest $original_request + * The original request for PartialUpdateCluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + + /** + * The original request for PartialUpdateCluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The original request for PartialUpdateCluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest::class); + $this->original_request = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php new file mode 100644 index 000000000000..c5cb2b443eef --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php @@ -0,0 +1,141 @@ +google.bigtable.admin.v2.PartialUpdateClusterRequest + */ +class PartialUpdateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cluster which contains the partial updates to be applied, + * subject to the update_mask. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Required. The subset of Cluster fields which should be replaced. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster Required. The Cluster which contains the partial updates to be applied, + * subject to the update_mask. + * @param \Google\Protobuf\FieldMask $updateMask Required. The subset of Cluster fields which should be replaced. + * + * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Bigtable\Admin\V2\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCluster($cluster) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster + * Required. The Cluster which contains the partial updates to be applied, + * subject to the update_mask. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The subset of Cluster fields which should be replaced. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cluster which contains the partial updates to be applied, + * subject to the update_mask. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The Cluster which contains the partial updates to be applied, + * subject to the update_mask. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Required. The subset of Cluster fields which should be replaced. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The subset of Cluster fields which should be replaced. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php new file mode 100644 index 000000000000..91e4ac7d79eb --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php @@ -0,0 +1,141 @@ +google.bigtable.admin.v2.PartialUpdateInstanceRequest + */ +class PartialUpdateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Instance which will (partially) replace the current value. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Required. The subset of Instance fields which should be replaced. + * Must be explicitly set. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Bigtable\Admin\V2\Instance $instance Required. The Instance which will (partially) replace the current value. + * @param \Google\Protobuf\FieldMask $updateMask Required. The subset of Instance fields which should be replaced. + * Must be explicitly set. + * + * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Bigtable\Admin\V2\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Instance $instance + * Required. The Instance which will (partially) replace the current value. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The subset of Instance fields which should be replaced. + * Must be explicitly set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Instance which will (partially) replace the current value. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The Instance which will (partially) replace the current value. + * + * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Required. The subset of Instance fields which should be replaced. + * Must be explicitly set. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The subset of Instance fields which should be replaced. + * Must be explicitly set. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php new file mode 100644 index 000000000000..d470c27dc7b8 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php @@ -0,0 +1,112 @@ +google.bigtable.admin.v2.RestoreInfo + */ +class RestoreInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the restore source. + * + * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 1; + */ + protected $source_type = 0; + protected $source_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $source_type + * The type of the restore source. + * @type \Google\Cloud\Bigtable\Admin\V2\BackupInfo $backup_info + * Information about the backup used to restore the table. The backup + * may no longer exist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * The type of the restore source. + * + * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 1; + * @return int + */ + public function getSourceType() + { + return $this->source_type; + } + + /** + * The type of the restore source. + * + * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 1; + * @param int $var + * @return $this + */ + public function setSourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\RestoreSourceType::class); + $this->source_type = $var; + + return $this; + } + + /** + * Information about the backup used to restore the table. The backup + * may no longer exist. + * + * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\BackupInfo|null + */ + public function getBackupInfo() + { + return $this->readOneof(2); + } + + public function hasBackupInfo() + { + return $this->hasOneof(2); + } + + /** + * Information about the backup used to restore the table. The backup + * may no longer exist. + * + * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\BackupInfo $var + * @return $this + */ + public function setBackupInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\BackupInfo::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSourceInfo() + { + return $this->whichOneof("source_info"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php new file mode 100644 index 000000000000..f69bc82f8d8a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php @@ -0,0 +1,54 @@ +google.bigtable.admin.v2.RestoreSourceType + */ +class RestoreSourceType +{ + /** + * No restore associated. + * + * Generated from protobuf enum RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; + */ + const RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; + /** + * A backup was used as the source of the restore. + * + * Generated from protobuf enum BACKUP = 1; + */ + const BACKUP = 1; + + private static $valueToName = [ + self::RESTORE_SOURCE_TYPE_UNSPECIFIED => 'RESTORE_SOURCE_TYPE_UNSPECIFIED', + self::BACKUP => 'BACKUP', + ]; + + 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php new file mode 100644 index 000000000000..c487dd2c61b1 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php @@ -0,0 +1,257 @@ +google.bigtable.admin.v2.RestoreTableMetadata + */ +class RestoreTableMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the table being created and restored to. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The type of the restore source. + * + * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 2; + */ + protected $source_type = 0; + /** + * If exists, the name of the long-running operation that will be used to + * track the post-restore optimization process to optimize the performance of + * the restored table. The metadata type of the long-running operation is + * [OptimizeRestoreTableMetadata][]. The response type is + * [Empty][google.protobuf.Empty]. This long-running operation may be + * automatically created by the system if applicable after the + * RestoreTable long-running operation completes successfully. This operation + * may not be created if the table is already optimized or the restore was + * not successful. + * + * Generated from protobuf field string optimize_table_operation_name = 4; + */ + protected $optimize_table_operation_name = ''; + /** + * The progress of the + * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 5; + */ + protected $progress = null; + protected $source_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the table being created and restored to. + * @type int $source_type + * The type of the restore source. + * @type \Google\Cloud\Bigtable\Admin\V2\BackupInfo $backup_info + * @type string $optimize_table_operation_name + * If exists, the name of the long-running operation that will be used to + * track the post-restore optimization process to optimize the performance of + * the restored table. The metadata type of the long-running operation is + * [OptimizeRestoreTableMetadata][]. The response type is + * [Empty][google.protobuf.Empty]. This long-running operation may be + * automatically created by the system if applicable after the + * RestoreTable long-running operation completes successfully. This operation + * may not be created if the table is already optimized or the restore was + * not successful. + * @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress + * The progress of the + * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] + * operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Name of the table being created and restored to. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the table being created and restored to. + * + * 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 type of the restore source. + * + * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 2; + * @return int + */ + public function getSourceType() + { + return $this->source_type; + } + + /** + * The type of the restore source. + * + * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 2; + * @param int $var + * @return $this + */ + public function setSourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\RestoreSourceType::class); + $this->source_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\BackupInfo|null + */ + public function getBackupInfo() + { + return $this->readOneof(3); + } + + public function hasBackupInfo() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\BackupInfo $var + * @return $this + */ + public function setBackupInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\BackupInfo::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * If exists, the name of the long-running operation that will be used to + * track the post-restore optimization process to optimize the performance of + * the restored table. The metadata type of the long-running operation is + * [OptimizeRestoreTableMetadata][]. The response type is + * [Empty][google.protobuf.Empty]. This long-running operation may be + * automatically created by the system if applicable after the + * RestoreTable long-running operation completes successfully. This operation + * may not be created if the table is already optimized or the restore was + * not successful. + * + * Generated from protobuf field string optimize_table_operation_name = 4; + * @return string + */ + public function getOptimizeTableOperationName() + { + return $this->optimize_table_operation_name; + } + + /** + * If exists, the name of the long-running operation that will be used to + * track the post-restore optimization process to optimize the performance of + * the restored table. The metadata type of the long-running operation is + * [OptimizeRestoreTableMetadata][]. The response type is + * [Empty][google.protobuf.Empty]. This long-running operation may be + * automatically created by the system if applicable after the + * RestoreTable long-running operation completes successfully. This operation + * may not be created if the table is already optimized or the restore was + * not successful. + * + * Generated from protobuf field string optimize_table_operation_name = 4; + * @param string $var + * @return $this + */ + public function setOptimizeTableOperationName($var) + { + GPBUtil::checkString($var, True); + $this->optimize_table_operation_name = $var; + + return $this; + } + + /** + * The progress of the + * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 5; + * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null + */ + public function getProgress() + { + return $this->progress; + } + + public function hasProgress() + { + return isset($this->progress); + } + + public function clearProgress() + { + unset($this->progress); + } + + /** + * The progress of the + * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 5; + * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var + * @return $this + */ + public function setProgress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class); + $this->progress = $var; + + return $this; + } + + /** + * @return string + */ + public function getSourceInfo() + { + return $this->whichOneof("source_info"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php new file mode 100644 index 000000000000..abdc023aa9c7 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php @@ -0,0 +1,163 @@ +google.bigtable.admin.v2.RestoreTableRequest + */ +class RestoreTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the instance in which to create the restored + * table. Values are of the form `projects//instances/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The id of the table to create and restore to. This + * table must not already exist. The `table_id` appended to + * `parent` forms the full table name of the form + * `projects//instances//tables/`. + * + * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the instance in which to create the restored + * table. Values are of the form `projects//instances/`. + * @type string $table_id + * Required. The id of the table to create and restore to. This + * table must not already exist. The `table_id` appended to + * `parent` forms the full table name of the form + * `projects//instances//tables/`. + * @type string $backup + * Name of the backup from which to restore. Values are of the form + * `projects//instances//clusters//backups/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the instance in which to create the restored + * table. Values are of the form `projects//instances/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the instance in which to create the restored + * table. Values are of the form `projects//instances/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The id of the table to create and restore to. This + * table must not already exist. The `table_id` appended to + * `parent` forms the full table name of the form + * `projects//instances//tables/`. + * + * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The id of the table to create and restore to. This + * table must not already exist. The `table_id` appended to + * `parent` forms the full table name of the form + * `projects//instances//tables/`. + * + * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Name of the backup from which to restore. Values are of the form + * `projects//instances//clusters//backups/`. + * + * Generated from protobuf field string backup = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getBackup() + { + return $this->readOneof(3); + } + + public function hasBackup() + { + return $this->hasOneof(3); + } + + /** + * Name of the backup from which to restore. Values are of the form + * `projects//instances//clusters//backups/`. + * + * Generated from protobuf field string backup = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php new file mode 100644 index 000000000000..ed150a235f5b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php @@ -0,0 +1,334 @@ +google.bigtable.admin.v2.Snapshot + */ +class Snapshot extends \Google\Protobuf\Internal\Message +{ + /** + * The unique name of the snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The source table at the time the snapshot was taken. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_table = null; + /** + * Output only. The size of the data in the source table at the time the + * snapshot was taken. In some cases, this value may be computed + * asynchronously via a background process and a placeholder of 0 will be used + * in the meantime. + * + * Generated from protobuf field int64 data_size_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_size_bytes = 0; + /** + * Output only. The time when the snapshot is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * The time when the snapshot will be deleted. The maximum amount of time a + * snapshot can stay active is 365 days. If 'ttl' is not specified, + * the default maximum of 365 days will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; + */ + protected $delete_time = null; + /** + * Output only. The current state of the snapshot. + * + * Generated from protobuf field .google.bigtable.admin.v2.Snapshot.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Description of the snapshot. + * + * Generated from protobuf field string description = 7; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique name of the snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * @type \Google\Cloud\Bigtable\Admin\V2\Table $source_table + * Output only. The source table at the time the snapshot was taken. + * @type int|string $data_size_bytes + * Output only. The size of the data in the source table at the time the + * snapshot was taken. In some cases, this value may be computed + * asynchronously via a background process and a placeholder of 0 will be used + * in the meantime. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the snapshot is created. + * @type \Google\Protobuf\Timestamp $delete_time + * The time when the snapshot will be deleted. The maximum amount of time a + * snapshot can stay active is 365 days. If 'ttl' is not specified, + * the default maximum of 365 days will be used. + * @type int $state + * Output only. The current state of the snapshot. + * @type string $description + * Description of the snapshot. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * The unique name of the snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique name of the snapshot. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. + * + * 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; + } + + /** + * Output only. The source table at the time the snapshot was taken. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Bigtable\Admin\V2\Table|null + */ + public function getSourceTable() + { + return $this->source_table; + } + + public function hasSourceTable() + { + return isset($this->source_table); + } + + public function clearSourceTable() + { + unset($this->source_table); + } + + /** + * Output only. The source table at the time the snapshot was taken. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Bigtable\Admin\V2\Table $var + * @return $this + */ + public function setSourceTable($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table::class); + $this->source_table = $var; + + return $this; + } + + /** + * Output only. The size of the data in the source table at the time the + * snapshot was taken. In some cases, this value may be computed + * asynchronously via a background process and a placeholder of 0 will be used + * in the meantime. + * + * Generated from protobuf field int64 data_size_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getDataSizeBytes() + { + return $this->data_size_bytes; + } + + /** + * Output only. The size of the data in the source table at the time the + * snapshot was taken. In some cases, this value may be computed + * asynchronously via a background process and a placeholder of 0 will be used + * in the meantime. + * + * Generated from protobuf field int64 data_size_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setDataSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->data_size_bytes = $var; + + return $this; + } + + /** + * Output only. The time when the snapshot is 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 snapshot is 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; + } + + /** + * The time when the snapshot will be deleted. The maximum amount of time a + * snapshot can stay active is 365 days. If 'ttl' is not specified, + * the default maximum of 365 days will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * The time when the snapshot will be deleted. The maximum amount of time a + * snapshot can stay active is 365 days. If 'ttl' is not specified, + * the default maximum of 365 days will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. The current state of the snapshot. + * + * Generated from protobuf field .google.bigtable.admin.v2.Snapshot.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the snapshot. + * + * Generated from protobuf field .google.bigtable.admin.v2.Snapshot.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Snapshot\State::class); + $this->state = $var; + + return $this; + } + + /** + * Description of the snapshot. + * + * Generated from protobuf field string description = 7; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the snapshot. + * + * Generated from protobuf field string description = 7; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php new file mode 100644 index 000000000000..07c31a2775e2 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php @@ -0,0 +1,66 @@ +google.bigtable.admin.v2.Snapshot.State + */ +class State +{ + /** + * The state of the snapshot could not be determined. + * + * Generated from protobuf enum STATE_NOT_KNOWN = 0; + */ + const STATE_NOT_KNOWN = 0; + /** + * The snapshot has been successfully created and can serve all requests. + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * The snapshot is currently being created, and may be destroyed if the + * creation process encounters an error. A snapshot may not be restored to a + * table while it is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + + private static $valueToName = [ + self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', + self::READY => 'READY', + self::CREATING => 'CREATING', + ]; + + 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\Bigtable\Admin\V2\Snapshot_State::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php new file mode 100644 index 000000000000..62d29e1d1bfa --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php @@ -0,0 +1,169 @@ +google.bigtable.admin.v2.SnapshotTableMetadata + */ +class SnapshotTableMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this SnapshotTable operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; + */ + protected $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + protected $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + protected $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest $original_request + * The request that prompted the initiation of this SnapshotTable operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this SnapshotTable operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this SnapshotTable operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php new file mode 100644 index 000000000000..007e4b8c67ae --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php @@ -0,0 +1,286 @@ +google.bigtable.admin.v2.SnapshotTableRequest + */ +class SnapshotTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the table to have the snapshot taken. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The name of the cluster where the snapshot will be created in. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $cluster = ''; + /** + * Required. The ID by which the new snapshot should be referred to within the + * parent cluster, e.g., `mysnapshot` of the form: + * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + * + * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot_id = ''; + /** + * The amount of time that the new snapshot can stay active after it is + * created. Once 'ttl' expires, the snapshot will get deleted. The maximum + * amount of time a snapshot can stay active is 7 days. If 'ttl' is not + * specified, the default value of 24 hours will be used. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 4; + */ + protected $ttl = null; + /** + * Description of the snapshot. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + + /** + * @param string $name Required. The unique name of the table to have the snapshot taken. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * @param string $cluster Required. The name of the cluster where the snapshot will be created in. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see + * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. + * @param string $snapshotId Required. The ID by which the new snapshot should be referred to within the + * parent cluster, e.g., `mysnapshot` of the form: + * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + * @param string $description Description of the snapshot. + * + * @return \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest + * + * @experimental + */ + public static function build(string $name, string $cluster, string $snapshotId, string $description): self + { + return (new self()) + ->setName($name) + ->setCluster($cluster) + ->setSnapshotId($snapshotId) + ->setDescription($description); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique name of the table to have the snapshot taken. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @type string $cluster + * Required. The name of the cluster where the snapshot will be created in. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @type string $snapshot_id + * Required. The ID by which the new snapshot should be referred to within the + * parent cluster, e.g., `mysnapshot` of the form: + * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + * @type \Google\Protobuf\Duration $ttl + * The amount of time that the new snapshot can stay active after it is + * created. Once 'ttl' expires, the snapshot will get deleted. The maximum + * amount of time a snapshot can stay active is 7 days. If 'ttl' is not + * specified, the default value of 24 hours will be used. + * @type string $description + * Description of the snapshot. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the table to have the snapshot taken. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the table to have the snapshot taken. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The name of the cluster where the snapshot will be created in. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * Required. The name of the cluster where the snapshot will be created in. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * + * Generated from protobuf field string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * Required. The ID by which the new snapshot should be referred to within the + * parent cluster, e.g., `mysnapshot` of the form: + * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + * + * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSnapshotId() + { + return $this->snapshot_id; + } + + /** + * Required. The ID by which the new snapshot should be referred to within the + * parent cluster, e.g., `mysnapshot` of the form: + * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + * + * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSnapshotId($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_id = $var; + + return $this; + } + + /** + * The amount of time that the new snapshot can stay active after it is + * created. Once 'ttl' expires, the snapshot will get deleted. The maximum + * amount of time a snapshot can stay active is 7 days. If 'ttl' is not + * specified, the default value of 24 hours will be used. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getTtl() + { + return $this->ttl; + } + + public function hasTtl() + { + return isset($this->ttl); + } + + public function clearTtl() + { + unset($this->ttl); + } + + /** + * The amount of time that the new snapshot can stay active after it is + * created. Once 'ttl' expires, the snapshot will get deleted. The maximum + * amount of time a snapshot can stay active is 7 days. If 'ttl' is not + * specified, the default value of 24 hours will be used. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->ttl = $var; + + return $this; + } + + /** + * Description of the snapshot. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the snapshot. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StandardReadRemoteWrites.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StandardReadRemoteWrites.php new file mode 100644 index 000000000000..bc59f6b84f19 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StandardReadRemoteWrites.php @@ -0,0 +1,34 @@ +google.bigtable.admin.v2.StandardReadRemoteWrites + */ +class StandardReadRemoteWrites extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php new file mode 100644 index 000000000000..9bc95b2df390 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php @@ -0,0 +1,61 @@ +google.bigtable.admin.v2.StorageType + */ +class StorageType +{ + /** + * The user did not specify a storage type. + * + * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; + */ + const STORAGE_TYPE_UNSPECIFIED = 0; + /** + * Flash (SSD) storage should be used. + * + * Generated from protobuf enum SSD = 1; + */ + const SSD = 1; + /** + * Magnetic drive (HDD) storage should be used. + * + * Generated from protobuf enum HDD = 2; + */ + const HDD = 2; + + private static $valueToName = [ + self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', + self::SSD => 'SSD', + self::HDD => 'HDD', + ]; + + 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php new file mode 100644 index 000000000000..046130e31c1a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php @@ -0,0 +1,409 @@ +google.bigtable.admin.v2.Table + */ +class Table extends \Google\Protobuf\Internal\Message +{ + /** + * The unique name of the table. Values are of the form + * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Map from cluster ID to per-cluster table state. + * If it could not be determined whether or not the table has data in a + * particular cluster (for example, if its zone is unavailable), then + * there will be an entry for the cluster with UNKNOWN `replication_status`. + * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` + * + * Generated from protobuf field map cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $cluster_states; + /** + * The column families configured for this table, mapped by column family ID. + * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` + * + * Generated from protobuf field map column_families = 3; + */ + private $column_families; + /** + * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored + * in this table. Timestamps not matching the granularity will be rejected. If + * unspecified at creation time, the value will be set to `MILLIS`. Views: + * `SCHEMA_VIEW`, `FULL`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $granularity = 0; + /** + * Output only. If this table was restored from another data source (e.g. a + * backup), this field will be populated with information about the restore. + * + * Generated from protobuf field .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $restore_info = null; + /** + * If specified, enable the change stream on this table. + * Otherwise, the change stream is disabled and the change stream is not + * retained. + * + * Generated from protobuf field .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; + */ + protected $change_stream_config = null; + /** + * Set to true to make the table protected against data loss. i.e. deleting + * the following resources through Admin APIs are prohibited: + * * The table. + * * The column families in the table. + * * The instance containing the table. + * Note one can still delete the data stored in the table through Data APIs. + * + * Generated from protobuf field bool deletion_protection = 9; + */ + protected $deletion_protection = false; + protected $automated_backup_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique name of the table. Values are of the form + * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` + * @type array|\Google\Protobuf\Internal\MapField $cluster_states + * Output only. Map from cluster ID to per-cluster table state. + * If it could not be determined whether or not the table has data in a + * particular cluster (for example, if its zone is unavailable), then + * there will be an entry for the cluster with UNKNOWN `replication_status`. + * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` + * @type array|\Google\Protobuf\Internal\MapField $column_families + * The column families configured for this table, mapped by column family ID. + * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` + * @type int $granularity + * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored + * in this table. Timestamps not matching the granularity will be rejected. If + * unspecified at creation time, the value will be set to `MILLIS`. Views: + * `SCHEMA_VIEW`, `FULL`. + * @type \Google\Cloud\Bigtable\Admin\V2\RestoreInfo $restore_info + * Output only. If this table was restored from another data source (e.g. a + * backup), this field will be populated with information about the restore. + * @type \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig $change_stream_config + * If specified, enable the change stream on this table. + * Otherwise, the change stream is disabled and the change stream is not + * retained. + * @type bool $deletion_protection + * Set to true to make the table protected against data loss. i.e. deleting + * the following resources through Admin APIs are prohibited: + * * The table. + * * The column families in the table. + * * The instance containing the table. + * Note one can still delete the data stored in the table through Data APIs. + * @type \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy $automated_backup_policy + * If specified, automated backups are enabled for this table. + * Otherwise, automated backups are disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * The unique name of the table. Values are of the form + * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique name of the table. Values are of the form + * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` + * + * 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; + } + + /** + * Output only. Map from cluster ID to per-cluster table state. + * If it could not be determined whether or not the table has data in a + * particular cluster (for example, if its zone is unavailable), then + * there will be an entry for the cluster with UNKNOWN `replication_status`. + * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` + * + * Generated from protobuf field map cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getClusterStates() + { + return $this->cluster_states; + } + + /** + * Output only. Map from cluster ID to per-cluster table state. + * If it could not be determined whether or not the table has data in a + * particular cluster (for example, if its zone is unavailable), then + * there will be an entry for the cluster with UNKNOWN `replication_status`. + * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` + * + * Generated from protobuf field map cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setClusterStates($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Table\ClusterState::class); + $this->cluster_states = $arr; + + return $this; + } + + /** + * The column families configured for this table, mapped by column family ID. + * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` + * + * Generated from protobuf field map column_families = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getColumnFamilies() + { + return $this->column_families; + } + + /** + * The column families configured for this table, mapped by column family ID. + * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` + * + * Generated from protobuf field map column_families = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setColumnFamilies($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class); + $this->column_families = $arr; + + return $this; + } + + /** + * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored + * in this table. Timestamps not matching the granularity will be rejected. If + * unspecified at creation time, the value will be set to `MILLIS`. Views: + * `SCHEMA_VIEW`, `FULL`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getGranularity() + { + return $this->granularity; + } + + /** + * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored + * in this table. Timestamps not matching the granularity will be rejected. If + * unspecified at creation time, the value will be set to `MILLIS`. Views: + * `SCHEMA_VIEW`, `FULL`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setGranularity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\TimestampGranularity::class); + $this->granularity = $var; + + return $this; + } + + /** + * Output only. If this table was restored from another data source (e.g. a + * backup), this field will be populated with information about the restore. + * + * Generated from protobuf field .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Bigtable\Admin\V2\RestoreInfo|null + */ + public function getRestoreInfo() + { + return $this->restore_info; + } + + public function hasRestoreInfo() + { + return isset($this->restore_info); + } + + public function clearRestoreInfo() + { + unset($this->restore_info); + } + + /** + * Output only. If this table was restored from another data source (e.g. a + * backup), this field will be populated with information about the restore. + * + * Generated from protobuf field .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Bigtable\Admin\V2\RestoreInfo $var + * @return $this + */ + public function setRestoreInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\RestoreInfo::class); + $this->restore_info = $var; + + return $this; + } + + /** + * If specified, enable the change stream on this table. + * Otherwise, the change stream is disabled and the change stream is not + * retained. + * + * Generated from protobuf field .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; + * @return \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig|null + */ + public function getChangeStreamConfig() + { + return $this->change_stream_config; + } + + public function hasChangeStreamConfig() + { + return isset($this->change_stream_config); + } + + public function clearChangeStreamConfig() + { + unset($this->change_stream_config); + } + + /** + * If specified, enable the change stream on this table. + * Otherwise, the change stream is disabled and the change stream is not + * retained. + * + * Generated from protobuf field .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; + * @param \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig $var + * @return $this + */ + public function setChangeStreamConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig::class); + $this->change_stream_config = $var; + + return $this; + } + + /** + * Set to true to make the table protected against data loss. i.e. deleting + * the following resources through Admin APIs are prohibited: + * * The table. + * * The column families in the table. + * * The instance containing the table. + * Note one can still delete the data stored in the table through Data APIs. + * + * Generated from protobuf field bool deletion_protection = 9; + * @return bool + */ + public function getDeletionProtection() + { + return $this->deletion_protection; + } + + /** + * Set to true to make the table protected against data loss. i.e. deleting + * the following resources through Admin APIs are prohibited: + * * The table. + * * The column families in the table. + * * The instance containing the table. + * Note one can still delete the data stored in the table through Data APIs. + * + * Generated from protobuf field bool deletion_protection = 9; + * @param bool $var + * @return $this + */ + public function setDeletionProtection($var) + { + GPBUtil::checkBool($var); + $this->deletion_protection = $var; + + return $this; + } + + /** + * If specified, automated backups are enabled for this table. + * Otherwise, automated backups are disabled. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13; + * @return \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy|null + */ + public function getAutomatedBackupPolicy() + { + return $this->readOneof(13); + } + + public function hasAutomatedBackupPolicy() + { + return $this->hasOneof(13); + } + + /** + * If specified, automated backups are enabled for this table. + * Otherwise, automated backups are disabled. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13; + * @param \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy $var + * @return $this + */ + public function setAutomatedBackupPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * @return string + */ + public function getAutomatedBackupConfig() + { + return $this->whichOneof("automated_backup_config"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/AutomatedBackupPolicy.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/AutomatedBackupPolicy.php new file mode 100644 index 000000000000..4befbef5a7dd --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/AutomatedBackupPolicy.php @@ -0,0 +1,132 @@ +google.bigtable.admin.v2.Table.AutomatedBackupPolicy + */ +class AutomatedBackupPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. How long the automated backups should be retained. The only + * supported value at this time is 3 days. + * + * Generated from protobuf field .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $retention_period = null; + /** + * Required. How frequently automated backups should occur. The only + * supported value at this time is 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frequency = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $retention_period + * Required. How long the automated backups should be retained. The only + * supported value at this time is 3 days. + * @type \Google\Protobuf\Duration $frequency + * Required. How frequently automated backups should occur. The only + * supported value at this time is 24 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Required. How long the automated backups should be retained. The only + * supported value at this time is 3 days. + * + * Generated from protobuf field .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getRetentionPeriod() + { + return $this->retention_period; + } + + public function hasRetentionPeriod() + { + return isset($this->retention_period); + } + + public function clearRetentionPeriod() + { + unset($this->retention_period); + } + + /** + * Required. How long the automated backups should be retained. The only + * supported value at this time is 3 days. + * + * Generated from protobuf field .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetentionPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention_period = $var; + + return $this; + } + + /** + * Required. How frequently automated backups should occur. The only + * supported value at this time is 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getFrequency() + { + return $this->frequency; + } + + public function hasFrequency() + { + return isset($this->frequency); + } + + public function clearFrequency() + { + unset($this->frequency); + } + + /** + * Required. How frequently automated backups should occur. The only + * supported value at this time is 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setFrequency($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->frequency = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AutomatedBackupPolicy::class, \Google\Cloud\Bigtable\Admin\V2\Table_AutomatedBackupPolicy::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php new file mode 100644 index 000000000000..73802c4ea588 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php @@ -0,0 +1,120 @@ +google.bigtable.admin.v2.Table.ClusterState + */ +class ClusterState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The state of replication for the table in this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.ClusterState.ReplicationState replication_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $replication_state = 0; + /** + * Output only. The encryption information for the table in this cluster. + * If the encryption key protecting this resource is customer managed, then + * its version can be rotated in Cloud Key Management Service (Cloud KMS). + * The primary version of the key and its status will be reflected here when + * changes propagate from Cloud KMS. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $encryption_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $replication_state + * Output only. The state of replication for the table in this cluster. + * @type array<\Google\Cloud\Bigtable\Admin\V2\EncryptionInfo>|\Google\Protobuf\Internal\RepeatedField $encryption_info + * Output only. The encryption information for the table in this cluster. + * If the encryption key protecting this resource is customer managed, then + * its version can be rotated in Cloud Key Management Service (Cloud KMS). + * The primary version of the key and its status will be reflected here when + * changes propagate from Cloud KMS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The state of replication for the table in this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.ClusterState.ReplicationState replication_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReplicationState() + { + return $this->replication_state; + } + + /** + * Output only. The state of replication for the table in this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.ClusterState.ReplicationState replication_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReplicationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\ClusterState\ReplicationState::class); + $this->replication_state = $var; + + return $this; + } + + /** + * Output only. The encryption information for the table in this cluster. + * If the encryption key protecting this resource is customer managed, then + * its version can be rotated in Cloud Key Management Service (Cloud KMS). + * The primary version of the key and its status will be reflected here when + * changes propagate from Cloud KMS. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEncryptionInfo() + { + return $this->encryption_info; + } + + /** + * Output only. The encryption information for the table in this cluster. + * If the encryption key protecting this resource is customer managed, then + * its version can be rotated in Cloud Key Management Service (Cloud KMS). + * The primary version of the key and its status will be reflected here when + * changes propagate from Cloud KMS. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Bigtable\Admin\V2\EncryptionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEncryptionInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo::class); + $this->encryption_info = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClusterState::class, \Google\Cloud\Bigtable\Admin\V2\Table_ClusterState::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php new file mode 100644 index 000000000000..483a7181036d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php @@ -0,0 +1,93 @@ +google.bigtable.admin.v2.Table.ClusterState.ReplicationState + */ +class ReplicationState +{ + /** + * The replication state of the table is unknown in this cluster. + * + * Generated from protobuf enum STATE_NOT_KNOWN = 0; + */ + const STATE_NOT_KNOWN = 0; + /** + * The cluster was recently created, and the table must finish copying + * over pre-existing data from other clusters before it can begin + * receiving live replication updates and serving Data API requests. + * + * Generated from protobuf enum INITIALIZING = 1; + */ + const INITIALIZING = 1; + /** + * The table is temporarily unable to serve Data API requests from this + * cluster due to planned internal maintenance. + * + * Generated from protobuf enum PLANNED_MAINTENANCE = 2; + */ + const PLANNED_MAINTENANCE = 2; + /** + * The table is temporarily unable to serve Data API requests from this + * cluster due to unplanned or emergency maintenance. + * + * Generated from protobuf enum UNPLANNED_MAINTENANCE = 3; + */ + const UNPLANNED_MAINTENANCE = 3; + /** + * The table can serve Data API requests from this cluster. Depending on + * replication delay, reads may not immediately reflect the state of the + * table in other clusters. + * + * Generated from protobuf enum READY = 4; + */ + const READY = 4; + /** + * The table is fully created and ready for use after a restore, and is + * being optimized for performance. When optimizations are complete, the + * table will transition to `READY` state. + * + * Generated from protobuf enum READY_OPTIMIZING = 5; + */ + const READY_OPTIMIZING = 5; + + private static $valueToName = [ + self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', + self::INITIALIZING => 'INITIALIZING', + self::PLANNED_MAINTENANCE => 'PLANNED_MAINTENANCE', + self::UNPLANNED_MAINTENANCE => 'UNPLANNED_MAINTENANCE', + self::READY => 'READY', + self::READY_OPTIMIZING => 'READY_OPTIMIZING', + ]; + + 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(ReplicationState::class, \Google\Cloud\Bigtable\Admin\V2\Table_ClusterState_ReplicationState::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php new file mode 100644 index 000000000000..67b1b6d1f95f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php @@ -0,0 +1,59 @@ +google.bigtable.admin.v2.Table.TimestampGranularity + */ +class TimestampGranularity +{ + /** + * The user did not specify a granularity. Should not be returned. + * When specified during table creation, MILLIS will be used. + * + * Generated from protobuf enum TIMESTAMP_GRANULARITY_UNSPECIFIED = 0; + */ + const TIMESTAMP_GRANULARITY_UNSPECIFIED = 0; + /** + * The table keeps data versioned at a granularity of 1ms. + * + * Generated from protobuf enum MILLIS = 1; + */ + const MILLIS = 1; + + private static $valueToName = [ + self::TIMESTAMP_GRANULARITY_UNSPECIFIED => 'TIMESTAMP_GRANULARITY_UNSPECIFIED', + self::MILLIS => 'MILLIS', + ]; + + 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(TimestampGranularity::class, \Google\Cloud\Bigtable\Admin\V2\Table_TimestampGranularity::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php new file mode 100644 index 000000000000..f2355cc4aa83 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php @@ -0,0 +1,86 @@ +google.bigtable.admin.v2.Table.View + */ +class View +{ + /** + * Uses the default view for each method as documented in its request. + * + * Generated from protobuf enum VIEW_UNSPECIFIED = 0; + */ + const VIEW_UNSPECIFIED = 0; + /** + * Only populates `name`. + * + * Generated from protobuf enum NAME_ONLY = 1; + */ + const NAME_ONLY = 1; + /** + * Only populates `name` and fields related to the table's schema. + * + * Generated from protobuf enum SCHEMA_VIEW = 2; + */ + const SCHEMA_VIEW = 2; + /** + * Only populates `name` and fields related to the table's replication + * state. + * + * Generated from protobuf enum REPLICATION_VIEW = 3; + */ + const REPLICATION_VIEW = 3; + /** + * Only populates `name` and fields related to the table's encryption state. + * + * Generated from protobuf enum ENCRYPTION_VIEW = 5; + */ + const ENCRYPTION_VIEW = 5; + /** + * Populates all fields. + * + * Generated from protobuf enum FULL = 4; + */ + const FULL = 4; + + private static $valueToName = [ + self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', + self::NAME_ONLY => 'NAME_ONLY', + self::SCHEMA_VIEW => 'SCHEMA_VIEW', + self::REPLICATION_VIEW => 'REPLICATION_VIEW', + self::ENCRYPTION_VIEW => 'ENCRYPTION_VIEW', + 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(View::class, \Google\Cloud\Bigtable\Admin\V2\Table_View::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type.php new file mode 100644 index 000000000000..f1625dfd8270 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type.php @@ -0,0 +1,458 @@ + INT64(-1)`, but `STRING("-00001") > STRING("00001)`. + * * Self-delimiting: If we concatenate two encoded values, can we always tell + * where the first one ends and the second one begins? + * - Example: If we encode INT64s to fixed-width STRINGs, the first value + * will always contain exactly N digits, possibly preceded by a sign. + * - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have + * no way to tell where the first one ends. + * * Compatibility: Which other systems have matching encoding schemes? For + * example, does this encoding have a GoogleSQL equivalent? HBase? Java? + * + * Generated from protobuf message google.bigtable.admin.v2.Type + */ +class Type extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $bytes_type + * Bytes + * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBString $string_type + * String + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Int64 $int64_type + * Int64 + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Float32 $float32_type + * Float32 + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Float64 $float64_type + * Float64 + * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBBool $bool_type + * Bool + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Timestamp $timestamp_type + * Timestamp + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Date $date_type + * Date + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate $aggregate_type + * Aggregate + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Struct $struct_type + * Struct + * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBArray $array_type + * Array + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Map $map_type + * Map + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Bytes + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes|null + */ + public function getBytesType() + { + return $this->readOneof(1); + } + + public function hasBytesType() + { + return $this->hasOneof(1); + } + + /** + * Bytes + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $var + * @return $this + */ + public function setBytesType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * String + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.String string_type = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBString|null + */ + public function getStringType() + { + return $this->readOneof(2); + } + + public function hasStringType() + { + return $this->hasOneof(2); + } + + /** + * String + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.String string_type = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBString $var + * @return $this + */ + public function setStringType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBString::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Int64 + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Int64|null + */ + public function getInt64Type() + { + return $this->readOneof(5); + } + + public function hasInt64Type() + { + return $this->hasOneof(5); + } + + /** + * Int64 + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Int64 $var + * @return $this + */ + public function setInt64Type($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Int64::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Float32 + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Float32|null + */ + public function getFloat32Type() + { + return $this->readOneof(12); + } + + public function hasFloat32Type() + { + return $this->hasOneof(12); + } + + /** + * Float32 + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Float32 $var + * @return $this + */ + public function setFloat32Type($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Float32::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Float64 + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Float64|null + */ + public function getFloat64Type() + { + return $this->readOneof(9); + } + + public function hasFloat64Type() + { + return $this->hasOneof(9); + } + + /** + * Float64 + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Float64 $var + * @return $this + */ + public function setFloat64Type($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Float64::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Bool + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBBool|null + */ + public function getBoolType() + { + return $this->readOneof(8); + } + + public function hasBoolType() + { + return $this->hasOneof(8); + } + + /** + * Bool + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBBool $var + * @return $this + */ + public function setBoolType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBBool::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Timestamp + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Timestamp|null + */ + public function getTimestampType() + { + return $this->readOneof(10); + } + + public function hasTimestampType() + { + return $this->hasOneof(10); + } + + /** + * Timestamp + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Timestamp $var + * @return $this + */ + public function setTimestampType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Timestamp::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Date + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Date date_type = 11; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Date|null + */ + public function getDateType() + { + return $this->readOneof(11); + } + + public function hasDateType() + { + return $this->hasOneof(11); + } + + /** + * Date + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Date date_type = 11; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Date $var + * @return $this + */ + public function setDateType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Date::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Aggregate + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate|null + */ + public function getAggregateType() + { + return $this->readOneof(6); + } + + public function hasAggregateType() + { + return $this->hasOneof(6); + } + + /** + * Aggregate + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate $var + * @return $this + */ + public function setAggregateType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Struct + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Struct|null + */ + public function getStructType() + { + return $this->readOneof(7); + } + + public function hasStructType() + { + return $this->hasOneof(7); + } + + /** + * Struct + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Struct $var + * @return $this + */ + public function setStructType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Struct::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Array + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Array array_type = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBArray|null + */ + public function getArrayType() + { + return $this->readOneof(3); + } + + public function hasArrayType() + { + return $this->hasOneof(3); + } + + /** + * Array + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Array array_type = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBArray $var + * @return $this + */ + public function setArrayType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBArray::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Map + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Map map_type = 4; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Map|null + */ + public function getMapType() + { + return $this->readOneof(4); + } + + public function hasMapType() + { + return $this->hasOneof(4); + } + + /** + * Map + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Map map_type = 4; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Map $var + * @return $this + */ + public function setMapType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Map::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate.php new file mode 100644 index 000000000000..9c28110eabb3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate.php @@ -0,0 +1,284 @@ +google.bigtable.admin.v2.Type.Aggregate + */ +class Aggregate extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type input_type = 1; + */ + protected $input_type = null; + /** + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_type = null; + protected $aggregator; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type $input_type + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * @type \Google\Cloud\Bigtable\Admin\V2\Type $state_type + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum $sum + * Sum aggregator. + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount $hllpp_unique_count + * HyperLogLogPlusPlusUniqueCount aggregator. + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Max $max + * Max aggregator. + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Min $min + * Min aggregator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type input_type = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getInputType() + { + return $this->input_type; + } + + public function hasInputType() + { + return isset($this->input_type); + } + + public function clearInputType() + { + unset($this->input_type); + } + + /** + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type input_type = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setInputType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->input_type = $var; + + return $this; + } + + /** + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getStateType() + { + return $this->state_type; + } + + public function hasStateType() + { + return isset($this->state_type); + } + + public function clearStateType() + { + unset($this->state_type); + } + + /** + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setStateType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->state_type = $var; + + return $this; + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum|null + */ + public function getSum() + { + return $this->readOneof(4); + } + + public function hasSum() + { + return $this->hasOneof(4); + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum $var + * @return $this + */ + public function setSum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * HyperLogLogPlusPlusUniqueCount aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount|null + */ + public function getHllppUniqueCount() + { + return $this->readOneof(5); + } + + public function hasHllppUniqueCount() + { + return $this->hasOneof(5); + } + + /** + * HyperLogLogPlusPlusUniqueCount aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount $var + * @return $this + */ + public function setHllppUniqueCount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Max aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Max|null + */ + public function getMax() + { + return $this->readOneof(6); + } + + public function hasMax() + { + return $this->hasOneof(6); + } + + /** + * Max aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Max $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Max::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Min aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Min|null + */ + public function getMin() + { + return $this->readOneof(7); + } + + public function hasMin() + { + return $this->hasOneof(7); + } + + /** + * Min aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Min $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Min::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getAggregator() + { + return $this->whichOneof("aggregator"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aggregate::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php new file mode 100644 index 000000000000..1c9423fe762e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php @@ -0,0 +1,42 @@ +google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + */ +class HyperLogLogPlusPlusUniqueCount extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HyperLogLogPlusPlusUniqueCount::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate_HyperLogLogPlusPlusUniqueCount::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Max.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Max.php new file mode 100644 index 000000000000..a1ebe235ad1e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Max.php @@ -0,0 +1,38 @@ +google.bigtable.admin.v2.Type.Aggregate.Max + */ +class Max extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Max::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate_Max::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Min.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Min.php new file mode 100644 index 000000000000..a9adbf1cddd1 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Min.php @@ -0,0 +1,38 @@ +google.bigtable.admin.v2.Type.Aggregate.Min + */ +class Min extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Min::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate_Min::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Sum.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Sum.php new file mode 100644 index 000000000000..209569e18bcc --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Sum.php @@ -0,0 +1,38 @@ +google.bigtable.admin.v2.Type.Aggregate.Sum + */ +class Sum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Sum::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate_Sum::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes.php new file mode 100644 index 000000000000..8bd21135affc --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes.php @@ -0,0 +1,81 @@ +google.bigtable.admin.v2.Type.Bytes + */ +class Bytes extends \Google\Protobuf\Internal\Message +{ + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; + */ + protected $encoding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding $encoding + * The encoding to use when converting to/from lower level types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding|null + */ + public function getEncoding() + { + return $this->encoding; + } + + public function hasEncoding() + { + return isset($this->encoding); + } + + public function clearEncoding() + { + unset($this->encoding); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding::class); + $this->encoding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Bytes::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bytes::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding.php new file mode 100644 index 000000000000..4f4ea68391c9 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding.php @@ -0,0 +1,78 @@ +google.bigtable.admin.v2.Type.Bytes.Encoding + */ +class Encoding extends \Google\Protobuf\Internal\Message +{ + protected $encoding; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw $raw + * Use `Raw` encoding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Use `Raw` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding.Raw raw = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw|null + */ + public function getRaw() + { + return $this->readOneof(1); + } + + public function hasRaw() + { + return $this->hasOneof(1); + } + + /** + * Use `Raw` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding.Raw raw = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw $var + * @return $this + */ + public function setRaw($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncoding() + { + return $this->whichOneof("encoding"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Encoding::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bytes_Encoding::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding/Raw.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding/Raw.php new file mode 100644 index 000000000000..11d29486138a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding/Raw.php @@ -0,0 +1,39 @@ +google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + */ +class Raw extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Raw::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bytes_Encoding_Raw::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Date.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Date.php new file mode 100644 index 000000000000..45c6dfa345e8 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Date.php @@ -0,0 +1,37 @@ +google.bigtable.admin.v2.Type.Date + */ +class Date extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Date::class, \Google\Cloud\Bigtable\Admin\V2\Type_Date::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float32.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float32.php new file mode 100644 index 000000000000..adedacc80961 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float32.php @@ -0,0 +1,37 @@ +google.bigtable.admin.v2.Type.Float32 + */ +class Float32 extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Float32::class, \Google\Cloud\Bigtable\Admin\V2\Type_Float32::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float64.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float64.php new file mode 100644 index 000000000000..d28be7adc3a9 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float64.php @@ -0,0 +1,37 @@ +google.bigtable.admin.v2.Type.Float64 + */ +class Float64 extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Float64::class, \Google\Cloud\Bigtable\Admin\V2\Type_Float64::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64.php new file mode 100644 index 000000000000..90641966f566 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64.php @@ -0,0 +1,81 @@ +google.bigtable.admin.v2.Type.Int64 + */ +class Int64 extends \Google\Protobuf\Internal\Message +{ + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + protected $encoding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding $encoding + * The encoding to use when converting to/from lower level types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding|null + */ + public function getEncoding() + { + return $this->encoding; + } + + public function hasEncoding() + { + return isset($this->encoding); + } + + public function clearEncoding() + { + unset($this->encoding); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding::class); + $this->encoding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Int64::class, \Google\Cloud\Bigtable\Admin\V2\Type_Int64::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding.php new file mode 100644 index 000000000000..6a18aa7783f8 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding.php @@ -0,0 +1,78 @@ +google.bigtable.admin.v2.Type.Int64.Encoding + */ +class Encoding extends \Google\Protobuf\Internal\Message +{ + protected $encoding; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes $big_endian_bytes + * Use `BigEndianBytes` encoding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Use `BigEndianBytes` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes|null + */ + public function getBigEndianBytes() + { + return $this->readOneof(1); + } + + public function hasBigEndianBytes() + { + return $this->hasOneof(1); + } + + /** + * Use `BigEndianBytes` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes $var + * @return $this + */ + public function setBigEndianBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncoding() + { + return $this->whichOneof("encoding"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Encoding::class, \Google\Cloud\Bigtable\Admin\V2\Type_Int64_Encoding::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php new file mode 100644 index 000000000000..15ae9f8b2857 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php @@ -0,0 +1,87 @@ +google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + */ +class BigEndianBytes extends \Google\Protobuf\Internal\Message +{ + /** + * Deprecated: ignored if set. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + protected $bytes_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $bytes_type + * Deprecated: ignored if set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Deprecated: ignored if set. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes|null + */ + public function getBytesType() + { + return $this->bytes_type; + } + + public function hasBytesType() + { + return isset($this->bytes_type); + } + + public function clearBytesType() + { + unset($this->bytes_type); + } + + /** + * Deprecated: ignored if set. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $var + * @return $this + */ + public function setBytesType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes::class); + $this->bytes_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigEndianBytes::class, \Google\Cloud\Bigtable\Admin\V2\Type_Int64_Encoding_BigEndianBytes::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Map.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Map.php new file mode 100644 index 000000000000..a5090f55b29d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Map.php @@ -0,0 +1,134 @@ +google.bigtable.admin.v2.Type.Map + */ +class Map extends \Google\Protobuf\Internal\Message +{ + /** + * The type of a map key. + * Only `Bytes`, `String`, and `Int64` are allowed as key types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type key_type = 1; + */ + protected $key_type = null; + /** + * The type of the values in a map. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 2; + */ + protected $value_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type $key_type + * The type of a map key. + * Only `Bytes`, `String`, and `Int64` are allowed as key types. + * @type \Google\Cloud\Bigtable\Admin\V2\Type $value_type + * The type of the values in a map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The type of a map key. + * Only `Bytes`, `String`, and `Int64` are allowed as key types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type key_type = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getKeyType() + { + return $this->key_type; + } + + public function hasKeyType() + { + return isset($this->key_type); + } + + public function clearKeyType() + { + unset($this->key_type); + } + + /** + * The type of a map key. + * Only `Bytes`, `String`, and `Int64` are allowed as key types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type key_type = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setKeyType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->key_type = $var; + + return $this; + } + + /** + * The type of the values in a map. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getValueType() + { + return $this->value_type; + } + + public function hasValueType() + { + return isset($this->value_type); + } + + public function clearValueType() + { + unset($this->value_type); + } + + /** + * The type of the values in a map. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setValueType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->value_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Map::class, \Google\Cloud\Bigtable\Admin\V2\Type_Map::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBArray.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBArray.php new file mode 100644 index 000000000000..92cf7364257f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBArray.php @@ -0,0 +1,81 @@ +google.bigtable.admin.v2.Type.Array + */ +class PBArray extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the elements in the array. This must not be `Array`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type element_type = 1; + */ + protected $element_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type $element_type + * The type of the elements in the array. This must not be `Array`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The type of the elements in the array. This must not be `Array`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type element_type = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getElementType() + { + return $this->element_type; + } + + public function hasElementType() + { + return isset($this->element_type); + } + + public function clearElementType() + { + unset($this->element_type); + } + + /** + * The type of the elements in the array. This must not be `Array`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type element_type = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setElementType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->element_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBArray::class, \Google\Cloud\Bigtable\Admin\V2\Type_Array::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBBool.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBBool.php new file mode 100644 index 000000000000..562251784d1c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBBool.php @@ -0,0 +1,37 @@ +google.bigtable.admin.v2.Type.Bool + */ +class PBBool extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBBool::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bool::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString.php new file mode 100644 index 000000000000..dec7bacd8182 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString.php @@ -0,0 +1,81 @@ +google.bigtable.admin.v2.Type.String + */ +class PBString extends \Google\Protobuf\Internal\Message +{ + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + */ + protected $encoding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding $encoding + * The encoding to use when converting to/from lower level types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding|null + */ + public function getEncoding() + { + return $this->encoding; + } + + public function hasEncoding() + { + return isset($this->encoding); + } + + public function clearEncoding() + { + unset($this->encoding); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding::class); + $this->encoding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBString::class, \Google\Cloud\Bigtable\Admin\V2\Type_String::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding.php new file mode 100644 index 000000000000..1206cfff3b46 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding.php @@ -0,0 +1,116 @@ +google.bigtable.admin.v2.Type.String.Encoding + */ +class Encoding extends \Google\Protobuf\Internal\Message +{ + protected $encoding; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Raw $utf8_raw + * Deprecated: if set, converts to an empty `utf8_bytes`. + * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Bytes $utf8_bytes + * Use `Utf8Bytes` encoding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Deprecated: if set, converts to an empty `utf8_bytes`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Raw|null + * @deprecated + */ + public function getUtf8Raw() + { + @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); + return $this->readOneof(1); + } + + public function hasUtf8Raw() + { + @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); + return $this->hasOneof(1); + } + + /** + * Deprecated: if set, converts to an empty `utf8_bytes`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Raw $var + * @return $this + * @deprecated + */ + public function setUtf8Raw($var) + { + @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Raw::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Use `Utf8Bytes` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Bytes|null + */ + public function getUtf8Bytes() + { + return $this->readOneof(2); + } + + public function hasUtf8Bytes() + { + return $this->hasOneof(2); + } + + /** + * Use `Utf8Bytes` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Bytes $var + * @return $this + */ + public function setUtf8Bytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Bytes::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncoding() + { + return $this->whichOneof("encoding"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Encoding::class, \Google\Cloud\Bigtable\Admin\V2\Type_String_Encoding::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Bytes.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Bytes.php new file mode 100644 index 000000000000..ec44fa10181f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Bytes.php @@ -0,0 +1,42 @@ +google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + */ +class Utf8Bytes extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Utf8Bytes::class, \Google\Cloud\Bigtable\Admin\V2\Type_String_Encoding_Utf8Bytes::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Raw.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Raw.php new file mode 100644 index 000000000000..810e88c04499 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Raw.php @@ -0,0 +1,37 @@ +google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + */ +class Utf8Raw extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Utf8Raw::class, \Google\Cloud\Bigtable\Admin\V2\Type_String_Encoding_Utf8Raw::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct.php new file mode 100644 index 000000000000..5a3904002a62 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct.php @@ -0,0 +1,73 @@ +google.bigtable.admin.v2.Type.Struct + */ +class Struct extends \Google\Protobuf\Internal\Message +{ + /** + * The names and types of the fields in this struct. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $fields + * The names and types of the fields in this struct. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The names and types of the fields in this struct. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The names and types of the fields in this struct. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Type\Struct\Field::class); + $this->fields = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Struct::class, \Google\Cloud\Bigtable\Admin\V2\Type_Struct::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct/Field.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct/Field.php new file mode 100644 index 000000000000..e90bceae51ec --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct/Field.php @@ -0,0 +1,118 @@ +google.bigtable.admin.v2.Type.Struct.Field + */ +class Field extends \Google\Protobuf\Internal\Message +{ + /** + * The field name (optional). Fields without a `field_name` are considered + * anonymous and cannot be referenced by name. + * + * Generated from protobuf field string field_name = 1; + */ + protected $field_name = ''; + /** + * The type of values in this field. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type type = 2; + */ + protected $type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_name + * The field name (optional). Fields without a `field_name` are considered + * anonymous and cannot be referenced by name. + * @type \Google\Cloud\Bigtable\Admin\V2\Type $type + * The type of values in this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The field name (optional). Fields without a `field_name` are considered + * anonymous and cannot be referenced by name. + * + * Generated from protobuf field string field_name = 1; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * The field name (optional). Fields without a `field_name` are considered + * anonymous and cannot be referenced by name. + * + * Generated from protobuf field string field_name = 1; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * The type of values in this field. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type type = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getType() + { + return $this->type; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * The type of values in this field. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type type = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Field::class, \Google\Cloud\Bigtable\Admin\V2\Type_Struct_Field::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Timestamp.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Timestamp.php new file mode 100644 index 000000000000..9f62002a7216 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Timestamp.php @@ -0,0 +1,37 @@ +google.bigtable.admin.v2.Type.Timestamp + */ +class Timestamp extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Timestamp::class, \Google\Cloud\Bigtable\Admin\V2\Type_Timestamp::class); + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php new file mode 100644 index 000000000000..b847a234a946 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php @@ -0,0 +1,156 @@ +google.bigtable.admin.v2.UndeleteTableMetadata + */ +class UndeleteTableMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the table being restored. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time at which this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * If set, the time at which this operation finished or was cancelled. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the table being restored. + * @type \Google\Protobuf\Timestamp $start_time + * The time at which this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * If set, the time at which this operation finished or was cancelled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The name of the table being restored. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the table being restored. + * + * 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 time at which this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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 at which this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * If set, the time at which this operation finished or was cancelled. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @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); + } + + /** + * If set, the time at which this operation finished or was cancelled. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php new file mode 100644 index 000000000000..d3ead7ced6a2 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php @@ -0,0 +1,92 @@ +google.bigtable.admin.v2.UndeleteTableRequest + */ +class UndeleteTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the table to be restored. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The unique name of the table to be restored. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\UndeleteTableRequest + * + * @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 unique name of the table to be restored. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the table to be restored. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the table to be restored. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php new file mode 100644 index 000000000000..aa4ccbf47fe0 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php @@ -0,0 +1,33 @@ +google.bigtable.admin.v2.UpdateAppProfileMetadata + */ +class UpdateAppProfileMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php new file mode 100644 index 000000000000..5933bed32b54 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php @@ -0,0 +1,175 @@ +google.bigtable.admin.v2.UpdateAppProfileRequest + */ +class UpdateAppProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The app profile which will (partially) replace the current value. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $app_profile = null; + /** + * Required. The subset of app profile fields which should be replaced. + * If unset, all fields will be replaced. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * If true, ignore safety checks when updating the app profile. + * + * Generated from protobuf field bool ignore_warnings = 3; + */ + protected $ignore_warnings = false; + + /** + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile Required. The app profile which will (partially) replace the current value. + * @param \Google\Protobuf\FieldMask $updateMask Required. The subset of app profile fields which should be replaced. + * If unset, all fields will be replaced. + * + * @return \Google\Cloud\Bigtable\Admin\V2\UpdateAppProfileRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAppProfile($appProfile) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile $app_profile + * Required. The app profile which will (partially) replace the current value. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The subset of app profile fields which should be replaced. + * If unset, all fields will be replaced. + * @type bool $ignore_warnings + * If true, ignore safety checks when updating the app profile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The app profile which will (partially) replace the current value. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile|null + */ + public function getAppProfile() + { + return $this->app_profile; + } + + public function hasAppProfile() + { + return isset($this->app_profile); + } + + public function clearAppProfile() + { + unset($this->app_profile); + } + + /** + * Required. The app profile which will (partially) replace the current value. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $var + * @return $this + */ + public function setAppProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile::class); + $this->app_profile = $var; + + return $this; + } + + /** + * Required. The subset of app profile fields which should be replaced. + * If unset, all fields will be replaced. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The subset of app profile fields which should be replaced. + * If unset, all fields will be replaced. + * + * 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; + } + + /** + * If true, ignore safety checks when updating the app profile. + * + * Generated from protobuf field bool ignore_warnings = 3; + * @return bool + */ + public function getIgnoreWarnings() + { + return $this->ignore_warnings; + } + + /** + * If true, ignore safety checks when updating the app profile. + * + * Generated from protobuf field bool ignore_warnings = 3; + * @param bool $var + * @return $this + */ + public function setIgnoreWarnings($var) + { + GPBUtil::checkBool($var); + $this->ignore_warnings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewMetadata.php new file mode 100644 index 000000000000..1457fd96929c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewMetadata.php @@ -0,0 +1,170 @@ +google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + */ +class UpdateAuthorizedViewMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this UpdateAuthorizedView + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; + */ + protected $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + protected $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + protected $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest $original_request + * The request that prompted the initiation of this UpdateAuthorizedView + * operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this UpdateAuthorizedView + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this UpdateAuthorizedView + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewRequest.php new file mode 100644 index 000000000000..c5ba84b2314f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewRequest.php @@ -0,0 +1,220 @@ +google.bigtable.admin.v2.UpdateAuthorizedViewRequest + */ +class UpdateAuthorizedViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorized_view = null; + /** + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ignore_warnings = false; + + /** + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * + * @return \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAuthorizedView($authorizedView) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorized_view + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * @type bool $ignore_warnings + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView|null + */ + public function getAuthorizedView() + { + return $this->authorized_view; + } + + public function hasAuthorizedView() + { + return isset($this->authorized_view); + } + + public function clearAuthorizedView() + { + unset($this->authorized_view); + } + + /** + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $var + * @return $this + */ + public function setAuthorizedView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView::class); + $this->authorized_view = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreWarnings() + { + return $this->ignore_warnings; + } + + /** + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreWarnings($var) + { + GPBUtil::checkBool($var); + $this->ignore_warnings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php new file mode 100644 index 000000000000..b450460b852b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php @@ -0,0 +1,173 @@ +google.bigtable.admin.v2.UpdateBackupRequest + */ +class UpdateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup to update. `backup.name`, and the fields to be updated + * as specified by `update_mask` are required. Other fields are ignored. + * Update is only supported for the following fields: + * * `backup.expire_time`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup = null; + /** + * Required. A mask specifying which fields (e.g. `expire_time`) in the + * Backup resource should be updated. This mask is relative to the Backup + * resource, not to the request message. The field mask must always be + * specified; this prevents any future fields from being erased accidentally + * by clients that do not know about them. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Bigtable\Admin\V2\Backup $backup Required. The backup to update. `backup.name`, and the fields to be updated + * as specified by `update_mask` are required. Other fields are ignored. + * Update is only supported for the following fields: + * + * * `backup.expire_time`. + * @param \Google\Protobuf\FieldMask $updateMask Required. A mask specifying which fields (e.g. `expire_time`) in the + * Backup resource should be updated. This mask is relative to the Backup + * resource, not to the request message. The field mask must always be + * specified; this prevents any future fields from being erased accidentally + * by clients that do not know about them. + * + * @return \Google\Cloud\Bigtable\Admin\V2\UpdateBackupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Bigtable\Admin\V2\Backup $backup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackup($backup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Backup $backup + * Required. The backup to update. `backup.name`, and the fields to be updated + * as specified by `update_mask` are required. Other fields are ignored. + * Update is only supported for the following fields: + * * `backup.expire_time`. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. A mask specifying which fields (e.g. `expire_time`) in the + * Backup resource should be updated. This mask is relative to the Backup + * resource, not to the request message. The field mask must always be + * specified; this prevents any future fields from being erased accidentally + * by clients that do not know about them. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup to update. `backup.name`, and the fields to be updated + * as specified by `update_mask` are required. Other fields are ignored. + * Update is only supported for the following fields: + * * `backup.expire_time`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\Backup|null + */ + public function getBackup() + { + return $this->backup; + } + + public function hasBackup() + { + return isset($this->backup); + } + + public function clearBackup() + { + unset($this->backup); + } + + /** + * Required. The backup to update. `backup.name`, and the fields to be updated + * as specified by `update_mask` are required. Other fields are ignored. + * Update is only supported for the following fields: + * * `backup.expire_time`. + * + * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Backup::class); + $this->backup = $var; + + return $this; + } + + /** + * Required. A mask specifying which fields (e.g. `expire_time`) in the + * Backup resource should be updated. This mask is relative to the Backup + * resource, not to the request message. The field mask must always be + * specified; this prevents any future fields from being erased accidentally + * by clients that do not know about them. + * + * 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. A mask specifying which fields (e.g. `expire_time`) in the + * Backup resource should be updated. This mask is relative to the Backup + * resource, not to the request message. The field mask must always be + * specified; this prevents any future fields from being erased accidentally + * by clients that do not know about them. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php new file mode 100644 index 000000000000..09fcde08400d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php @@ -0,0 +1,165 @@ +google.bigtable.admin.v2.UpdateClusterMetadata + */ +class UpdateClusterMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this UpdateCluster operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster original_request = 1; + */ + protected $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + protected $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + protected $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Cluster $original_request + * The request that prompted the initiation of this UpdateCluster operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this UpdateCluster operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Cluster|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this UpdateCluster operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php new file mode 100644 index 000000000000..5caa3d20f2a2 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php @@ -0,0 +1,165 @@ +google.bigtable.admin.v2.UpdateInstanceMetadata + */ +class UpdateInstanceMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this UpdateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; + */ + protected $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + protected $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + protected $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest $original_request + * The request that prompted the initiation of this UpdateInstance operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this UpdateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this UpdateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php new file mode 100644 index 000000000000..ab407c9bfd1b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php @@ -0,0 +1,156 @@ +google.bigtable.admin.v2.UpdateTableMetadata + */ +class UpdateTableMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the table being updated. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time at which this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * If set, the time at which this operation finished or was canceled. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the table being updated. + * @type \Google\Protobuf\Timestamp $start_time + * The time at which this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * If set, the time at which this operation finished or was canceled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The name of the table being updated. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the table being updated. + * + * 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 time at which this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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 at which this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * If set, the time at which this operation finished or was canceled. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @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); + } + + /** + * If set, the time at which this operation finished or was canceled. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php new file mode 100644 index 000000000000..17d6cb5e06e6 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php @@ -0,0 +1,189 @@ +google.bigtable.admin.v2.UpdateTableRequest + */ +class UpdateTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The table to update. + * The table's `name` field is used to identify the table to update. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table = null; + /** + * Required. The list of fields to update. + * A mask specifying which fields (e.g. `change_stream_config`) in the `table` + * field should be updated. This mask is relative to the `table` field, not to + * the request message. The wildcard (*) path is currently not supported. + * Currently UpdateTable is only supported for the following fields: + * * `change_stream_config` + * * `change_stream_config.retention_period` + * * `deletion_protection` + * If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Bigtable\Admin\V2\Table $table Required. The table to update. + * The table's `name` field is used to identify the table to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * A mask specifying which fields (e.g. `change_stream_config`) in the `table` + * field should be updated. This mask is relative to the `table` field, not to + * the request message. The wildcard (*) path is currently not supported. + * Currently UpdateTable is only supported for the following fields: + * + * * `change_stream_config` + * * `change_stream_config.retention_period` + * * `deletion_protection` + * + * If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + * + * @return \Google\Cloud\Bigtable\Admin\V2\UpdateTableRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Bigtable\Admin\V2\Table $table, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTable($table) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Table $table + * Required. The table to update. + * The table's `name` field is used to identify the table to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * A mask specifying which fields (e.g. `change_stream_config`) in the `table` + * field should be updated. This mask is relative to the `table` field, not to + * the request message. The wildcard (*) path is currently not supported. + * Currently UpdateTable is only supported for the following fields: + * * `change_stream_config` + * * `change_stream_config.retention_period` + * * `deletion_protection` + * If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The table to update. + * The table's `name` field is used to identify the table to update. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\Table|null + */ + public function getTable() + { + return $this->table; + } + + public function hasTable() + { + return isset($this->table); + } + + public function clearTable() + { + unset($this->table); + } + + /** + * Required. The table to update. + * The table's `name` field is used to identify the table to update. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\Table $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table::class); + $this->table = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * A mask specifying which fields (e.g. `change_stream_config`) in the `table` + * field should be updated. This mask is relative to the `table` field, not to + * the request message. The wildcard (*) path is currently not supported. + * Currently UpdateTable is only supported for the following fields: + * * `change_stream_config` + * * `change_stream_config.retention_period` + * * `deletion_protection` + * If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. + * A mask specifying which fields (e.g. `change_stream_config`) in the `table` + * field should be updated. This mask is relative to the `table` field, not to + * the request message. The wildcard (*) path is currently not supported. + * Currently UpdateTable is only supported for the following fields: + * * `change_stream_config` + * * `change_stream_config.retention_period` + * * `deletion_protection` + * If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php new file mode 100644 index 000000000000..4cba3a4e581b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setAppProfileId($appProfileId) + ->setAppProfile($appProfile); + + // Call the API and handle any network failures. + try { + /** @var AppProfile $response */ + $response = $bigtableInstanceAdminClient->createAppProfile($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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + $appProfileId = '[APP_PROFILE_ID]'; + + create_app_profile_sample($formattedParent, $appProfileId); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php new file mode 100644 index 000000000000..45ebd1a21640 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php @@ -0,0 +1,97 @@ +setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableInstanceAdminClient->createCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + $clusterId = '[CLUSTER_ID]'; + + create_cluster_sample($formattedParent, $clusterId); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php new file mode 100644 index 000000000000..1abf64ae014f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php @@ -0,0 +1,107 @@ +setDisplayName($instanceDisplayName); + $clusters = []; + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance) + ->setClusters($clusters); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableInstanceAdminClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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 = BigtableInstanceAdminClient::projectName('[PROJECT]'); + $instanceId = '[INSTANCE_ID]'; + $instanceDisplayName = '[DISPLAY_NAME]'; + + create_instance_sample($formattedParent, $instanceId, $instanceDisplayName); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php new file mode 100644 index 000000000000..70ac8bd03282 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php @@ -0,0 +1,78 @@ +setName($formattedName) + ->setIgnoreWarnings($ignoreWarnings); + + // Call the API and handle any network failures. + try { + $bigtableInstanceAdminClient->deleteAppProfile($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 = BigtableInstanceAdminClient::appProfileName( + '[PROJECT]', + '[INSTANCE]', + '[APP_PROFILE]' + ); + $ignoreWarnings = false; + + delete_app_profile_sample($formattedName, $ignoreWarnings); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php new file mode 100644 index 000000000000..c4b929dbc4e9 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $bigtableInstanceAdminClient->deleteCluster($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 = BigtableInstanceAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + + delete_cluster_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php new file mode 100644 index 000000000000..5b62ae7912cb --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $bigtableInstanceAdminClient->deleteInstance($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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php new file mode 100644 index 000000000000..506431b3c320 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AppProfile $response */ + $response = $bigtableInstanceAdminClient->getAppProfile($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 = BigtableInstanceAdminClient::appProfileName( + '[PROJECT]', + '[INSTANCE]', + '[APP_PROFILE]' + ); + + get_app_profile_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php new file mode 100644 index 000000000000..4a2a93b3f47b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Cluster $response */ + $response = $bigtableInstanceAdminClient->getCluster($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 = BigtableInstanceAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + + get_cluster_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php new file mode 100644 index 000000000000..a4dfa0fec4aa --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $bigtableInstanceAdminClient->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 bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php new file mode 100644 index 000000000000..52c1a06c2788 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $bigtableInstanceAdminClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php new file mode 100644 index 000000000000..6270226f235f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bigtableInstanceAdminClient->listAppProfiles($request); + + /** @var AppProfile $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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + + list_app_profiles_sample($formattedParent); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php new file mode 100644 index 000000000000..9c30512f61c7 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListClustersResponse $response */ + $response = $bigtableInstanceAdminClient->listClusters($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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + + list_clusters_sample($formattedParent); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php new file mode 100644 index 000000000000..bbbd046338d5 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bigtableInstanceAdminClient->listHotTablets($request); + + /** @var HotTablet $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 = BigtableInstanceAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + + list_hot_tablets_sample($formattedParent); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php new file mode 100644 index 000000000000..e9130a75ef95 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php @@ -0,0 +1,72 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListInstancesResponse $response */ + $response = $bigtableInstanceAdminClient->listInstances($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 = BigtableInstanceAdminClient::projectName('[PROJECT]'); + + list_instances_sample($formattedParent); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php new file mode 100644 index 000000000000..11b8850d5686 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php @@ -0,0 +1,85 @@ +setCluster($cluster) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableInstanceAdminClient->partialUpdateCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $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 bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php new file mode 100644 index 000000000000..b88c9a4ebdab --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php @@ -0,0 +1,90 @@ +setDisplayName($instanceDisplayName); + $updateMask = new FieldMask(); + $request = (new PartialUpdateInstanceRequest()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableInstanceAdminClient->partialUpdateInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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 +{ + $instanceDisplayName = '[DISPLAY_NAME]'; + + partial_update_instance_sample($instanceDisplayName); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php new file mode 100644 index 000000000000..842f6943766b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php @@ -0,0 +1,74 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $bigtableInstanceAdminClient->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 bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php new file mode 100644 index 000000000000..a312340f36f4 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php @@ -0,0 +1,78 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $bigtableInstanceAdminClient->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 bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php new file mode 100644 index 000000000000..e20dab7c6699 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php @@ -0,0 +1,74 @@ +setAppProfile($appProfile) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableInstanceAdminClient->updateAppProfile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AppProfile $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 bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php new file mode 100644 index 000000000000..99de20c472fd --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php @@ -0,0 +1,90 @@ +setName($name) + ->setServeNodes($serveNodes); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableInstanceAdminClient->updateCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $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 +{ + $name = '[NAME]'; + $serveNodes = 0; + + update_cluster_sample($name, $serveNodes); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php new file mode 100644 index 000000000000..80667f033185 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php @@ -0,0 +1,83 @@ +setName($name) + ->setDisplayName($displayName) + ->setType($type) + ->setLabels($labels); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $bigtableInstanceAdminClient->updateInstance($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 +{ + $name = '[NAME]'; + $displayName = '[DISPLAY_NAME]'; + $type = Type::TYPE_UNSPECIFIED; + + update_instance_sample($name, $displayName, $type); +} +// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php new file mode 100644 index 000000000000..fc2182469283 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php @@ -0,0 +1,78 @@ +setName($formattedName) + ->setConsistencyToken($consistencyToken); + + // Call the API and handle any network failures. + try { + /** @var CheckConsistencyResponse $response */ + $response = $bigtableTableAdminClient->checkConsistency($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $consistencyToken = '[CONSISTENCY_TOKEN]'; + + check_consistency_sample($formattedName, $consistencyToken); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php new file mode 100644 index 000000000000..230a80427499 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php @@ -0,0 +1,115 @@ +/instances//clusters//backups/`. Please see + * {@see BigtableTableAdminClient::backupName()} for help formatting this field. + */ +function copy_backup_sample( + string $formattedParent, + string $backupId, + string $formattedSourceBackup +): void { + // Create a client. + $bigtableTableAdminClient = new BigtableTableAdminClient(); + + // Prepare the request message. + $expireTime = new Timestamp(); + $request = (new CopyBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setSourceBackup($formattedSourceBackup) + ->setExpireTime($expireTime); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableTableAdminClient->copyBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Backup $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $backupId = '[BACKUP_ID]'; + $formattedSourceBackup = BigtableTableAdminClient::backupName( + '[PROJECT]', + '[INSTANCE]', + '[CLUSTER]', + '[BACKUP]' + ); + + copy_backup_sample($formattedParent, $backupId, $formattedSourceBackup); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_authorized_view.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_authorized_view.php new file mode 100644 index 000000000000..312f73588d01 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_authorized_view.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setAuthorizedViewId($authorizedViewId) + ->setAuthorizedView($authorizedView); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableTableAdminClient->createAuthorizedView($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuthorizedView $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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $authorizedViewId = '[AUTHORIZED_VIEW_ID]'; + + create_authorized_view_sample($formattedParent, $authorizedViewId); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php new file mode 100644 index 000000000000..c19f78fe3afd --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php @@ -0,0 +1,113 @@ +setSourceTable($backupSourceTable) + ->setExpireTime($backupExpireTime); + $request = (new CreateBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setBackup($backup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableTableAdminClient->createBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Backup $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $backupId = '[BACKUP_ID]'; + $backupSourceTable = '[SOURCE_TABLE]'; + + create_backup_sample($formattedParent, $backupId, $backupSourceTable); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php new file mode 100644 index 000000000000..c9e8e72ab85f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php @@ -0,0 +1,81 @@ +setParent($formattedParent) + ->setTableId($tableId) + ->setTable($table); + + // Call the API and handle any network failures. + try { + /** @var Table $response */ + $response = $bigtableTableAdminClient->createTable($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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + $tableId = '[TABLE_ID]'; + + create_table_sample($formattedParent, $tableId); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php new file mode 100644 index 000000000000..6c08c6d4ec0c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php @@ -0,0 +1,110 @@ +setParent($formattedParent) + ->setTableId($tableId) + ->setSourceSnapshot($formattedSourceSnapshot); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableTableAdminClient->createTableFromSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Table $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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + $tableId = '[TABLE_ID]'; + $formattedSourceSnapshot = BigtableTableAdminClient::snapshotName( + '[PROJECT]', + '[INSTANCE]', + '[CLUSTER]', + '[SNAPSHOT]' + ); + + create_table_from_snapshot_sample($formattedParent, $tableId, $formattedSourceSnapshot); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_authorized_view.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_authorized_view.php new file mode 100644 index 000000000000..085616ad9754 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_authorized_view.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $bigtableTableAdminClient->deleteAuthorizedView($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 = BigtableTableAdminClient::authorizedViewName( + '[PROJECT]', + '[INSTANCE]', + '[TABLE]', + '[AUTHORIZED_VIEW]' + ); + + delete_authorized_view_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php new file mode 100644 index 000000000000..4cc770fe8a9a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $bigtableTableAdminClient->deleteBackup($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 = BigtableTableAdminClient::backupName( + '[PROJECT]', + '[INSTANCE]', + '[CLUSTER]', + '[BACKUP]' + ); + + delete_backup_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php new file mode 100644 index 000000000000..512babb6e5d3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $bigtableTableAdminClient->deleteSnapshot($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 = BigtableTableAdminClient::snapshotName( + '[PROJECT]', + '[INSTANCE]', + '[CLUSTER]', + '[SNAPSHOT]' + ); + + delete_snapshot_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php new file mode 100644 index 000000000000..a8650aa538b4 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $bigtableTableAdminClient->deleteTable($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + delete_table_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php new file mode 100644 index 000000000000..5a506dbf0a0e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $bigtableTableAdminClient->dropRowRange($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + drop_row_range_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php new file mode 100644 index 000000000000..13a43860b82b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GenerateConsistencyTokenResponse $response */ + $response = $bigtableTableAdminClient->generateConsistencyToken($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + generate_consistency_token_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_authorized_view.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_authorized_view.php new file mode 100644 index 000000000000..5ff1ce4a3a4b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_authorized_view.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AuthorizedView $response */ + $response = $bigtableTableAdminClient->getAuthorizedView($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 = BigtableTableAdminClient::authorizedViewName( + '[PROJECT]', + '[INSTANCE]', + '[TABLE]', + '[AUTHORIZED_VIEW]' + ); + + get_authorized_view_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php new file mode 100644 index 000000000000..5c7fc10e0993 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Backup $response */ + $response = $bigtableTableAdminClient->getBackup($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 = BigtableTableAdminClient::backupName( + '[PROJECT]', + '[INSTANCE]', + '[CLUSTER]', + '[BACKUP]' + ); + + get_backup_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php new file mode 100644 index 000000000000..7ff9af1261b9 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php @@ -0,0 +1,73 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $bigtableTableAdminClient->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 bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php new file mode 100644 index 000000000000..61234e7fbe69 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Snapshot $response */ + $response = $bigtableTableAdminClient->getSnapshot($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 = BigtableTableAdminClient::snapshotName( + '[PROJECT]', + '[INSTANCE]', + '[CLUSTER]', + '[SNAPSHOT]' + ); + + get_snapshot_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php new file mode 100644 index 000000000000..dfda57e6a47f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Table $response */ + $response = $bigtableTableAdminClient->getTable($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + get_table_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_authorized_views.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_authorized_views.php new file mode 100644 index 000000000000..ef36a650e70a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_authorized_views.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bigtableTableAdminClient->listAuthorizedViews($request); + + /** @var AuthorizedView $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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + list_authorized_views_sample($formattedParent); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php new file mode 100644 index 000000000000..94400498e37f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bigtableTableAdminClient->listBackups($request); + + /** @var Backup $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + + list_backups_sample($formattedParent); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php new file mode 100644 index 000000000000..73c2aff1f7aa --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php @@ -0,0 +1,86 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bigtableTableAdminClient->listSnapshots($request); + + /** @var Snapshot $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + + list_snapshots_sample($formattedParent); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php new file mode 100644 index 000000000000..ff3b49bd0d04 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $bigtableTableAdminClient->listTables($request); + + /** @var Table $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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + + list_tables_sample($formattedParent); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php new file mode 100644 index 000000000000..e8f6e7b9b825 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php @@ -0,0 +1,79 @@ +setName($formattedName) + ->setModifications($modifications); + + // Call the API and handle any network failures. + try { + /** @var Table $response */ + $response = $bigtableTableAdminClient->modifyColumnFamilies($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + modify_column_families_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php new file mode 100644 index 000000000000..d73f60a89edf --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php @@ -0,0 +1,96 @@ +/instances/`. Please see + * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. + * @param string $tableId The id of the table to create and restore to. This + * table must not already exist. The `table_id` appended to + * `parent` forms the full table name of the form + * `projects//instances//tables/`. + */ +function restore_table_sample(string $formattedParent, string $tableId): void +{ + // Create a client. + $bigtableTableAdminClient = new BigtableTableAdminClient(); + + // Prepare the request message. + $request = (new RestoreTableRequest()) + ->setParent($formattedParent) + ->setTableId($tableId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableTableAdminClient->restoreTable($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Table $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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); + $tableId = '[TABLE_ID]'; + + restore_table_sample($formattedParent, $tableId); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php new file mode 100644 index 000000000000..c51797c13213 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php @@ -0,0 +1,74 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $bigtableTableAdminClient->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 bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php new file mode 100644 index 000000000000..7d7b542a82ef --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php @@ -0,0 +1,107 @@ +setName($formattedName) + ->setCluster($formattedCluster) + ->setSnapshotId($snapshotId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableTableAdminClient->snapshotTable($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Snapshot $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 +{ + $formattedName = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $formattedCluster = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $snapshotId = '[SNAPSHOT_ID]'; + + snapshot_table_sample($formattedName, $formattedCluster, $snapshotId); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php new file mode 100644 index 000000000000..042ceb981136 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php @@ -0,0 +1,79 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $bigtableTableAdminClient->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 bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php new file mode 100644 index 000000000000..3448b8fedff0 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableTableAdminClient->undeleteTable($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Table $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 +{ + $formattedName = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + undelete_table_sample($formattedName); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_authorized_view.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_authorized_view.php new file mode 100644 index 000000000000..ab69b8924270 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_authorized_view.php @@ -0,0 +1,71 @@ +setAuthorizedView($authorizedView); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableTableAdminClient->updateAuthorizedView($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuthorizedView $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 bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php new file mode 100644 index 000000000000..575ccfa3be08 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php @@ -0,0 +1,80 @@ +setSourceTable($backupSourceTable) + ->setExpireTime($backupExpireTime); + $updateMask = new FieldMask(); + $request = (new UpdateBackupRequest()) + ->setBackup($backup) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Backup $response */ + $response = $bigtableTableAdminClient->updateBackup($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 +{ + $backupSourceTable = '[SOURCE_TABLE]'; + + update_backup_sample($backupSourceTable); +} +// [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php new file mode 100644 index 000000000000..9d335ba140ec --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php @@ -0,0 +1,74 @@ +setTable($table) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $bigtableTableAdminClient->updateTable($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Table $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 bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableInstanceAdminClient.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableInstanceAdminClient.php new file mode 100644 index 000000000000..b45bb6498897 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableInstanceAdminClient.php @@ -0,0 +1,1020 @@ + createAppProfileAsync(CreateAppProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAppProfileAsync(DeleteAppProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAppProfileAsync(GetAppProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAppProfilesAsync(ListAppProfilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHotTabletsAsync(ListHotTabletsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface partialUpdateClusterAsync(PartialUpdateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface partialUpdateInstanceAsync(PartialUpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAppProfileAsync(UpdateAppProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClusterAsync(Cluster $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(Instance $request, array $optionalArgs = []) + */ +final class BigtableInstanceAdminClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.bigtable.admin.v2.BigtableInstanceAdmin'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigtableadmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigtableadmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigtable.admin', + 'https://www.googleapis.com/auth/bigtable.admin.cluster', + 'https://www.googleapis.com/auth/bigtable.admin.instance', + 'https://www.googleapis.com/auth/cloud-bigtable.admin', + 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/bigtable_instance_admin_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a app_profile + * resource. + * + * @param string $project + * @param string $instance + * @param string $appProfile + * + * @return string The formatted app_profile resource. + */ + public static function appProfileName(string $project, string $instance, string $appProfile): string + { + return self::getPathTemplate('appProfile')->render([ + 'project' => $project, + 'instance' => $instance, + 'app_profile' => $appProfile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $instance + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $instance, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'instance' => $instance, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'instance' => $instance, + ]); + } + + /** + * 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 project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - appProfile: projects/{project}/instances/{instance}/appProfiles/{app_profile} + * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - instance: projects/{project}/instances/{instance} + * - location: projects/{project}/locations/{location} + * - project: projects/{project} + * + * 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. + * + * Setting the "BIGTABLE_EMULATOR_HOST" environment variable will automatically set + * the API Endpoint to the value specified in the variable, as well as ensure that + * empty credentials are used in the transport layer. + * + * @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 'bigtableadmin.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 = []) + { + $options = $this->setDefaultEmulatorConfig($options); + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an app profile within an instance. + * + * The async variant is {@see BigtableInstanceAdminClient::createAppProfileAsync()} + * . + * + * @example samples/V2/BigtableInstanceAdminClient/create_app_profile.php + * + * @param CreateAppProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AppProfile + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAppProfile(CreateAppProfileRequest $request, array $callOptions = []): AppProfile + { + return $this->startApiCall('CreateAppProfile', $request, $callOptions)->wait(); + } + + /** + * Creates a cluster within an instance. + * + * Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If + * serve_nodes is set to non-zero, then the cluster is manually scaled. If + * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + * enabled. + * + * The async variant is {@see BigtableInstanceAdminClient::createClusterAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/create_cluster.php + * + * @param CreateClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); + } + + /** + * Create an instance within a project. + * + * Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If + * serve_nodes is set to non-zero, then the cluster is manually scaled. If + * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + * enabled. + * + * The async variant is {@see BigtableInstanceAdminClient::createInstanceAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/create_instance.php + * + * @param CreateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes an app profile from an instance. + * + * The async variant is {@see BigtableInstanceAdminClient::deleteAppProfileAsync()} + * . + * + * @example samples/V2/BigtableInstanceAdminClient/delete_app_profile.php + * + * @param DeleteAppProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteAppProfile(DeleteAppProfileRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAppProfile', $request, $callOptions)->wait(); + } + + /** + * Deletes a cluster from an instance. + * + * The async variant is {@see BigtableInstanceAdminClient::deleteClusterAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/delete_cluster.php + * + * @param DeleteClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteCluster(DeleteClusterRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); + } + + /** + * Delete an instance from a project. + * + * The async variant is {@see BigtableInstanceAdminClient::deleteInstanceAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/delete_instance.php + * + * @param DeleteInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Gets information about an app profile. + * + * The async variant is {@see BigtableInstanceAdminClient::getAppProfileAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/get_app_profile.php + * + * @param GetAppProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AppProfile + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAppProfile(GetAppProfileRequest $request, array $callOptions = []): AppProfile + { + return $this->startApiCall('GetAppProfile', $request, $callOptions)->wait(); + } + + /** + * Gets information about a cluster. + * + * The async variant is {@see BigtableInstanceAdminClient::getClusterAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/get_cluster.php + * + * @param GetClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Cluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster + { + return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for an instance resource. Returns an empty + * policy if an instance exists but does not have a policy set. + * + * The async variant is {@see BigtableInstanceAdminClient::getIamPolicyAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/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(); + } + + /** + * Gets information about an instance. + * + * The async variant is {@see BigtableInstanceAdminClient::getInstanceAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/get_instance.php + * + * @param GetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Lists information about app profiles in an instance. + * + * The async variant is {@see BigtableInstanceAdminClient::listAppProfilesAsync()} + * . + * + * @example samples/V2/BigtableInstanceAdminClient/list_app_profiles.php + * + * @param ListAppProfilesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAppProfiles(ListAppProfilesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAppProfiles', $request, $callOptions); + } + + /** + * Lists information about clusters in an instance. + * + * The async variant is {@see BigtableInstanceAdminClient::listClustersAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/list_clusters.php + * + * @param ListClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListClustersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listClusters(ListClustersRequest $request, array $callOptions = []): ListClustersResponse + { + return $this->startApiCall('ListClusters', $request, $callOptions)->wait(); + } + + /** + * Lists hot tablets in a cluster, within the time range provided. Hot + * tablets are ordered based on CPU usage. + * + * The async variant is {@see BigtableInstanceAdminClient::listHotTabletsAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php + * + * @param ListHotTabletsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listHotTablets(ListHotTabletsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListHotTablets', $request, $callOptions); + } + + /** + * Lists information about instances in a project. + * + * The async variant is {@see BigtableInstanceAdminClient::listInstancesAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/list_instances.php + * + * @param ListInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListInstancesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): ListInstancesResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions)->wait(); + } + + /** + * Partially updates a cluster within a project. This method is the preferred + * way to update a Cluster. + * + * To enable and update autoscaling, set + * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, + * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it + * are ignored. Note that an update cannot simultaneously set serve_nodes to + * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and + * also specify both in the update_mask. + * + * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, + * and explicitly set a serve_node count via the update_mask. + * + * The async variant is + * {@see BigtableInstanceAdminClient::partialUpdateClusterAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php + * + * @param PartialUpdateClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 partialUpdateCluster(PartialUpdateClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('PartialUpdateCluster', $request, $callOptions)->wait(); + } + + /** + * Partially updates an instance within a project. This method can modify all + * fields of an Instance and is the preferred way to update an Instance. + * + * The async variant is + * {@see BigtableInstanceAdminClient::partialUpdateInstanceAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/partial_update_instance.php + * + * @param PartialUpdateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 partialUpdateInstance(PartialUpdateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('PartialUpdateInstance', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on an instance resource. Replaces any + * existing policy. + * + * The async variant is {@see BigtableInstanceAdminClient::setIamPolicyAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/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 the caller has on the specified instance resource. + * + * The async variant is + * {@see BigtableInstanceAdminClient::testIamPermissionsAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/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(); + } + + /** + * Updates an app profile within an instance. + * + * The async variant is {@see BigtableInstanceAdminClient::updateAppProfileAsync()} + * . + * + * @example samples/V2/BigtableInstanceAdminClient/update_app_profile.php + * + * @param UpdateAppProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateAppProfile(UpdateAppProfileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAppProfile', $request, $callOptions)->wait(); + } + + /** + * Updates a cluster within an instance. + * + * Note that UpdateCluster does not support updating + * cluster_config.cluster_autoscaling_config. In order to update it, you + * must use PartialUpdateCluster. + * + * The async variant is {@see BigtableInstanceAdminClient::updateClusterAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/update_cluster.php + * + * @param Cluster $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateCluster(Cluster $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); + } + + /** + * Updates an instance within a project. This method updates only the display + * name and type for an Instance. To update other Instance properties, such as + * labels, use PartialUpdateInstance. + * + * The async variant is {@see BigtableInstanceAdminClient::updateInstanceAsync()} . + * + * @example samples/V2/BigtableInstanceAdminClient/update_instance.php + * + * @param Instance $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInstance(Instance $request, array $callOptions = []): Instance + { + return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); + } + + /** Configure the gapic configuration to use a service emulator. */ + private function setDefaultEmulatorConfig(array $options): array + { + $emulatorHost = getenv('BIGTABLE_EMULATOR_HOST'); + if (empty($emulatorHost)) { + return $options; + } + + if ($scheme = parse_url($emulatorHost, PHP_URL_SCHEME)) { + $search = $scheme . '://'; + $emulatorHost = str_replace($search, '', $emulatorHost); + } + + $options['apiEndpoint'] ??= $emulatorHost; + $options['transportConfig']['grpc']['stubOpts']['credentials'] ??= ChannelCredentials::createInsecure(); + $options['credentials'] ??= new InsecureCredentialsWrapper(); + return $options; + } +} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php new file mode 100644 index 000000000000..854d55554863 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php @@ -0,0 +1,1339 @@ + checkConsistencyAsync(CheckConsistencyRequest $request, array $optionalArgs = []) + * @method PromiseInterface copyBackupAsync(CopyBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAuthorizedViewAsync(CreateAuthorizedViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface
createTableAsync(CreateTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTableFromSnapshotAsync(CreateTableFromSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAuthorizedViewAsync(DeleteAuthorizedViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSnapshotAsync(DeleteSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTableAsync(DeleteTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface dropRowRangeAsync(DropRowRangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateConsistencyTokenAsync(GenerateConsistencyTokenRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuthorizedViewAsync(GetAuthorizedViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSnapshotAsync(GetSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface
getTableAsync(GetTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuthorizedViewsAsync(ListAuthorizedViewsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSnapshotsAsync(ListSnapshotsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTablesAsync(ListTablesRequest $request, array $optionalArgs = []) + * @method PromiseInterface
modifyColumnFamiliesAsync(ModifyColumnFamiliesRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreTableAsync(RestoreTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface snapshotTableAsync(SnapshotTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeleteTableAsync(UndeleteTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAuthorizedViewAsync(UpdateAuthorizedViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTableAsync(UpdateTableRequest $request, array $optionalArgs = []) + */ +final class BigtableTableAdminClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.bigtable.admin.v2.BigtableTableAdmin'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigtableadmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigtableadmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigtable.admin', + 'https://www.googleapis.com/auth/bigtable.admin.table', + 'https://www.googleapis.com/auth/cloud-bigtable.admin', + 'https://www.googleapis.com/auth/cloud-bigtable.admin.table', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/bigtable_table_admin_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * authorized_view resource. + * + * @param string $project + * @param string $instance + * @param string $table + * @param string $authorizedView + * + * @return string The formatted authorized_view resource. + */ + public static function authorizedViewName(string $project, string $instance, string $table, string $authorizedView): string + { + return self::getPathTemplate('authorizedView')->render([ + 'project' => $project, + 'instance' => $instance, + 'table' => $table, + 'authorized_view' => $authorizedView, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a backup + * resource. + * + * @param string $project + * @param string $instance + * @param string $cluster + * @param string $backup + * + * @return string The formatted backup resource. + */ + public static function backupName(string $project, string $instance, string $cluster, string $backup): string + { + return self::getPathTemplate('backup')->render([ + 'project' => $project, + 'instance' => $instance, + 'cluster' => $cluster, + 'backup' => $backup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $instance + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $instance, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'instance' => $instance, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * crypto_key_version resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * @param string $cryptoKeyVersion + * + * @return string The formatted crypto_key_version resource. + */ + public static function cryptoKeyVersionName(string $project, string $location, string $keyRing, string $cryptoKey, string $cryptoKeyVersion): string + { + return self::getPathTemplate('cryptoKeyVersion')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + 'crypto_key_version' => $cryptoKeyVersion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a snapshot + * resource. + * + * @param string $project + * @param string $instance + * @param string $cluster + * @param string $snapshot + * + * @return string The formatted snapshot resource. + */ + public static function snapshotName(string $project, string $instance, string $cluster, string $snapshot): string + { + return self::getPathTemplate('snapshot')->render([ + 'project' => $project, + 'instance' => $instance, + 'cluster' => $cluster, + 'snapshot' => $snapshot, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a table + * resource. + * + * @param string $project + * @param string $instance + * @param string $table + * + * @return string The formatted table resource. + */ + public static function tableName(string $project, string $instance, string $table): string + { + return self::getPathTemplate('table')->render([ + 'project' => $project, + 'instance' => $instance, + 'table' => $table, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - authorizedView: projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view} + * - backup: projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup} + * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} + * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} + * - instance: projects/{project}/instances/{instance} + * - snapshot: projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot} + * - table: projects/{project}/instances/{instance}/tables/{table} + * + * 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. + * + * Setting the "BIGTABLE_EMULATOR_HOST" environment variable will automatically set + * the API Endpoint to the value specified in the variable, as well as ensure that + * empty credentials are used in the transport layer. + * + * @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 'bigtableadmin.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 = []) + { + $options = $this->setDefaultEmulatorConfig($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); + } + + /** + * Checks replication consistency based on a consistency token, that is, if + * replication has caught up based on the conditions specified in the token + * and the check request. + * + * The async variant is {@see BigtableTableAdminClient::checkConsistencyAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/check_consistency.php + * + * @param CheckConsistencyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CheckConsistencyResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function checkConsistency(CheckConsistencyRequest $request, array $callOptions = []): CheckConsistencyResponse + { + return $this->startApiCall('CheckConsistency', $request, $callOptions)->wait(); + } + + /** + * Copy a Cloud Bigtable backup to a new backup in the destination cluster + * located in the destination instance and project. + * + * The async variant is {@see BigtableTableAdminClient::copyBackupAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/copy_backup.php + * + * @param CopyBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 copyBackup(CopyBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CopyBackup', $request, $callOptions)->wait(); + } + + /** + * Creates a new AuthorizedView in a table. + * + * The async variant is + * {@see BigtableTableAdminClient::createAuthorizedViewAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/create_authorized_view.php + * + * @param CreateAuthorizedViewRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createAuthorizedView(CreateAuthorizedViewRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAuthorizedView', $request, $callOptions)->wait(); + } + + /** + * Starts creating a new Cloud Bigtable Backup. The returned backup + * [long-running operation][google.longrunning.Operation] can be used to + * track creation of the backup. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the + * returned operation will stop the creation and delete the backup. + * + * The async variant is {@see BigtableTableAdminClient::createBackupAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/create_backup.php + * + * @param CreateBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createBackup(CreateBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBackup', $request, $callOptions)->wait(); + } + + /** + * Creates a new table in the specified instance. + * The table can be created with a full set of initial column families, + * specified in the request. + * + * The async variant is {@see BigtableTableAdminClient::createTableAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/create_table.php + * + * @param CreateTableRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Table + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTable(CreateTableRequest $request, array $callOptions = []): Table + { + return $this->startApiCall('CreateTable', $request, $callOptions)->wait(); + } + + /** + * Creates a new table from the specified snapshot. The target table must + * not exist. The snapshot and the table must be in the same instance. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * The async variant is + * {@see BigtableTableAdminClient::createTableFromSnapshotAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php + * + * @param CreateTableFromSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createTableFromSnapshot(CreateTableFromSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateTableFromSnapshot', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes a specified AuthorizedView. + * + * The async variant is + * {@see BigtableTableAdminClient::deleteAuthorizedViewAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/delete_authorized_view.php + * + * @param DeleteAuthorizedViewRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteAuthorizedView(DeleteAuthorizedViewRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAuthorizedView', $request, $callOptions)->wait(); + } + + /** + * Deletes a pending or completed Cloud Bigtable backup. + * + * The async variant is {@see BigtableTableAdminClient::deleteBackupAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/delete_backup.php + * + * @param DeleteBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteBackup(DeleteBackupRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes the specified snapshot. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * The async variant is {@see BigtableTableAdminClient::deleteSnapshotAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/delete_snapshot.php + * + * @param DeleteSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteSnapshot(DeleteSnapshotRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSnapshot', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes a specified table and all of its data. + * + * The async variant is {@see BigtableTableAdminClient::deleteTableAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/delete_table.php + * + * @param DeleteTableRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteTable(DeleteTableRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTable', $request, $callOptions)->wait(); + } + + /** + * Permanently drop/delete a row range from a specified table. The request can + * specify whether to delete all rows in a table, or only those that match a + * particular prefix. + * + * The async variant is {@see BigtableTableAdminClient::dropRowRangeAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/drop_row_range.php + * + * @param DropRowRangeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 dropRowRange(DropRowRangeRequest $request, array $callOptions = []): void + { + $this->startApiCall('DropRowRange', $request, $callOptions)->wait(); + } + + /** + * Generates a consistency token for a Table, which can be used in + * CheckConsistency to check whether mutations to the table that finished + * before this call started have been replicated. The tokens will be available + * for 90 days. + * + * The async variant is + * {@see BigtableTableAdminClient::generateConsistencyTokenAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/generate_consistency_token.php + * + * @param GenerateConsistencyTokenRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateConsistencyTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateConsistencyToken(GenerateConsistencyTokenRequest $request, array $callOptions = []): GenerateConsistencyTokenResponse + { + return $this->startApiCall('GenerateConsistencyToken', $request, $callOptions)->wait(); + } + + /** + * Gets information from a specified AuthorizedView. + * + * The async variant is {@see BigtableTableAdminClient::getAuthorizedViewAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/get_authorized_view.php + * + * @param GetAuthorizedViewRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AuthorizedView + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuthorizedView(GetAuthorizedViewRequest $request, array $callOptions = []): AuthorizedView + { + return $this->startApiCall('GetAuthorizedView', $request, $callOptions)->wait(); + } + + /** + * Gets metadata on a pending or completed Cloud Bigtable Backup. + * + * The async variant is {@see BigtableTableAdminClient::getBackupAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/get_backup.php + * + * @param GetBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Backup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup + { + return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a Table or Backup resource. + * Returns an empty policy if the resource exists but does not have a policy + * set. + * + * The async variant is {@see BigtableTableAdminClient::getIamPolicyAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/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(); + } + + /** + * Gets metadata information about the specified snapshot. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * The async variant is {@see BigtableTableAdminClient::getSnapshotAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/get_snapshot.php + * + * @param GetSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Snapshot + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSnapshot(GetSnapshotRequest $request, array $callOptions = []): Snapshot + { + return $this->startApiCall('GetSnapshot', $request, $callOptions)->wait(); + } + + /** + * Gets metadata information about the specified table. + * + * The async variant is {@see BigtableTableAdminClient::getTableAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/get_table.php + * + * @param GetTableRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Table + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTable(GetTableRequest $request, array $callOptions = []): Table + { + return $this->startApiCall('GetTable', $request, $callOptions)->wait(); + } + + /** + * Lists all AuthorizedViews from a specific table. + * + * The async variant is {@see BigtableTableAdminClient::listAuthorizedViewsAsync()} + * . + * + * @example samples/V2/BigtableTableAdminClient/list_authorized_views.php + * + * @param ListAuthorizedViewsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAuthorizedViews(ListAuthorizedViewsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAuthorizedViews', $request, $callOptions); + } + + /** + * Lists Cloud Bigtable backups. Returns both completed and pending + * backups. + * + * The async variant is {@see BigtableTableAdminClient::listBackupsAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/list_backups.php + * + * @param ListBackupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackups', $request, $callOptions); + } + + /** + * Lists all snapshots associated with the specified cluster. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * The async variant is {@see BigtableTableAdminClient::listSnapshotsAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/list_snapshots.php + * + * @param ListSnapshotsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSnapshots(ListSnapshotsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSnapshots', $request, $callOptions); + } + + /** + * Lists all tables served from a specified instance. + * + * The async variant is {@see BigtableTableAdminClient::listTablesAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/list_tables.php + * + * @param ListTablesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTables(ListTablesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTables', $request, $callOptions); + } + + /** + * Performs a series of column family modifications on the specified table. + * Either all or none of the modifications will occur before this method + * returns, but data requests received prior to that point may see a table + * where only some modifications have taken effect. + * + * The async variant is + * {@see BigtableTableAdminClient::modifyColumnFamiliesAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/modify_column_families.php + * + * @param ModifyColumnFamiliesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Table + * + * @throws ApiException Thrown if the API call fails. + */ + public function modifyColumnFamilies(ModifyColumnFamiliesRequest $request, array $callOptions = []): Table + { + return $this->startApiCall('ModifyColumnFamilies', $request, $callOptions)->wait(); + } + + /** + * Create a new table by restoring from a completed backup. The + * returned table [long-running operation][google.longrunning.Operation] can + * be used to track the progress of the operation, and to cancel it. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The + * [response][google.longrunning.Operation.response] type is + * [Table][google.bigtable.admin.v2.Table], if successful. + * + * The async variant is {@see BigtableTableAdminClient::restoreTableAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/restore_table.php + * + * @param RestoreTableRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 restoreTable(RestoreTableRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RestoreTable', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on a Table or Backup resource. + * Replaces any existing policy. + * + * The async variant is {@see BigtableTableAdminClient::setIamPolicyAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/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(); + } + + /** + * Creates a new snapshot in the specified cluster from the specified + * source table. The cluster and the table must be in the same instance. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * The async variant is {@see BigtableTableAdminClient::snapshotTableAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/snapshot_table.php + * + * @param SnapshotTableRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 snapshotTable(SnapshotTableRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SnapshotTable', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that the caller has on the specified Table or Backup + * resource. + * + * The async variant is {@see BigtableTableAdminClient::testIamPermissionsAsync()} + * . + * + * @example samples/V2/BigtableTableAdminClient/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(); + } + + /** + * Restores a specified table which was accidentally deleted. + * + * The async variant is {@see BigtableTableAdminClient::undeleteTableAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/undelete_table.php + * + * @param UndeleteTableRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 undeleteTable(UndeleteTableRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UndeleteTable', $request, $callOptions)->wait(); + } + + /** + * Updates an AuthorizedView in a table. + * + * The async variant is + * {@see BigtableTableAdminClient::updateAuthorizedViewAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/update_authorized_view.php + * + * @param UpdateAuthorizedViewRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateAuthorizedView(UpdateAuthorizedViewRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAuthorizedView', $request, $callOptions)->wait(); + } + + /** + * Updates a pending or completed Cloud Bigtable Backup. + * + * The async variant is {@see BigtableTableAdminClient::updateBackupAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/update_backup.php + * + * @param UpdateBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Backup + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackup(UpdateBackupRequest $request, array $callOptions = []): Backup + { + return $this->startApiCall('UpdateBackup', $request, $callOptions)->wait(); + } + + /** + * Updates a specified table. + * + * The async variant is {@see BigtableTableAdminClient::updateTableAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/update_table.php + * + * @param UpdateTableRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateTable(UpdateTableRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateTable', $request, $callOptions)->wait(); + } + + /** Configure the gapic configuration to use a service emulator. */ + private function setDefaultEmulatorConfig(array $options): array + { + $emulatorHost = getenv('BIGTABLE_EMULATOR_HOST'); + if (empty($emulatorHost)) { + return $options; + } + + if ($scheme = parse_url($emulatorHost, PHP_URL_SCHEME)) { + $search = $scheme . '://'; + $emulatorHost = str_replace($search, '', $emulatorHost); + } + + $options['apiEndpoint'] ??= $emulatorHost; + $options['transportConfig']['grpc']['stubOpts']['credentials'] ??= ChannelCredentials::createInsecure(); + $options['credentials'] ??= new InsecureCredentialsWrapper(); + return $options; + } +} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json b/owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..fecd9cc3d7ed --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json @@ -0,0 +1,282 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.bigtable.admin.v2", + "libraryPackage": "Google\\Cloud\\Bigtable\\Admin\\V2", + "services": { + "BigtableInstanceAdmin": { + "clients": { + "grpc": { + "libraryClient": "BigtableInstanceAdminGapicClient", + "rpcs": { + "CreateAppProfile": { + "methods": [ + "createAppProfile" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteAppProfile": { + "methods": [ + "deleteAppProfile" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetAppProfile": { + "methods": [ + "getAppProfile" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListAppProfiles": { + "methods": [ + "listAppProfiles" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "ListHotTablets": { + "methods": [ + "listHotTablets" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "PartialUpdateCluster": { + "methods": [ + "partialUpdateCluster" + ] + }, + "PartialUpdateInstance": { + "methods": [ + "partialUpdateInstance" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateAppProfile": { + "methods": [ + "updateAppProfile" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + } + } + } + } + }, + "BigtableTableAdmin": { + "clients": { + "grpc": { + "libraryClient": "BigtableTableAdminGapicClient", + "rpcs": { + "CheckConsistency": { + "methods": [ + "checkConsistency" + ] + }, + "CopyBackup": { + "methods": [ + "copyBackup" + ] + }, + "CreateAuthorizedView": { + "methods": [ + "createAuthorizedView" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "CreateTable": { + "methods": [ + "createTable" + ] + }, + "CreateTableFromSnapshot": { + "methods": [ + "createTableFromSnapshot" + ] + }, + "DeleteAuthorizedView": { + "methods": [ + "deleteAuthorizedView" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "DeleteTable": { + "methods": [ + "deleteTable" + ] + }, + "DropRowRange": { + "methods": [ + "dropRowRange" + ] + }, + "GenerateConsistencyToken": { + "methods": [ + "generateConsistencyToken" + ] + }, + "GetAuthorizedView": { + "methods": [ + "getAuthorizedView" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "GetTable": { + "methods": [ + "getTable" + ] + }, + "ListAuthorizedViews": { + "methods": [ + "listAuthorizedViews" + ] + }, + "ListBackups": { + "methods": [ + "listBackups" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots" + ] + }, + "ListTables": { + "methods": [ + "listTables" + ] + }, + "ModifyColumnFamilies": { + "methods": [ + "modifyColumnFamilies" + ] + }, + "RestoreTable": { + "methods": [ + "restoreTable" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "SnapshotTable": { + "methods": [ + "snapshotTable" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UndeleteTable": { + "methods": [ + "undeleteTable" + ] + }, + "UpdateAuthorizedView": { + "methods": [ + "updateAuthorizedView" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "UpdateTable": { + "methods": [ + "updateTable" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json new file mode 100644 index 000000000000..536c98a6fb2b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json @@ -0,0 +1,131 @@ +{ + "interfaces": { + "google.bigtable.admin.v2.BigtableInstanceAdmin": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateAppProfile": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAppProfile": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteInstance": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAppProfile": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetCluster": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListAppProfiles": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListClusters": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListHotTablets": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "PartialUpdateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PartialUpdateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAppProfile": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php new file mode 100644 index 000000000000..4232256b1ba6 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php @@ -0,0 +1,349 @@ + [ + 'google.bigtable.admin.v2.BigtableInstanceAdmin' => [ + 'CreateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata', + 'initialPollDelayMillis' => '5000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '60000', + 'totalPollTimeoutMillis' => '21600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateInstanceMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'PartialUpdateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'cluster.name', + 'fieldAccessors' => [ + 'getCluster', + 'getName', + ], + ], + ], + ], + 'PartialUpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateInstanceMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance.name', + 'fieldAccessors' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + 'UpdateAppProfile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AppProfile', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateAppProfileMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'app_profile.name', + 'fieldAccessors' => [ + 'getAppProfile', + 'getName', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateClusterMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateAppProfile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\AppProfile', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAppProfile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAppProfile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\AppProfile', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Cluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAppProfiles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAppProfiles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListAppProfilesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListClusters' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListHotTablets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getHotTablets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListHotTabletsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListInstancesResponse', + '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', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'appProfile' => 'projects/{project}/instances/{instance}/appProfiles/{app_profile}', + 'cluster' => 'projects/{project}/instances/{instance}/clusters/{cluster}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'instance' => 'projects/{project}/instances/{instance}', + 'location' => 'projects/{project}/locations/{location}', + 'project' => 'projects/{project}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php new file mode 100644 index 000000000000..a92f99ec26d8 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php @@ -0,0 +1,338 @@ + [ + 'google.bigtable.admin.v2.BigtableInstanceAdmin' => [ + 'CreateAppProfile' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/appProfiles', + 'body' => 'app_profile', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'app_profile_id', + ], + ], + 'CreateCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/clusters', + 'body' => 'cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cluster_id', + ], + ], + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/instances', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAppProfile' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/appProfiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'ignore_warnings', + ], + ], + 'DeleteCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAppProfile' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/appProfiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/instances/*}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAppProfiles' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/appProfiles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/clusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListHotTablets' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/hotTablets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PartialUpdateCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{cluster.name=projects/*/instances/*/clusters/*}', + 'body' => 'cluster', + 'placeholders' => [ + 'cluster.name' => [ + 'getters' => [ + 'getCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'PartialUpdateInstance' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{instance.name=projects/*/instances/*}', + 'body' => 'instance', + 'placeholders' => [ + 'instance.name' => [ + 'getters' => [ + 'getInstance', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/instances/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/instances/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateAppProfile' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}', + 'body' => 'app_profile', + 'placeholders' => [ + 'app_profile.name' => [ + 'getters' => [ + 'getAppProfile', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateCluster' => [ + 'method' => 'put', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*}', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'method' => 'put', + 'uriTemplate' => '/v2/{name=projects/*/instances/*}', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=operations/**}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=operations/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=operations/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=operations/projects/**}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json new file mode 100644 index 000000000000..47b0c167c97c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json @@ -0,0 +1,176 @@ +{ + "interfaces": { + "google.bigtable.admin.v2.BigtableTableAdmin": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CheckConsistency": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CopyBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAuthorizedView": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateTable": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateTableFromSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAuthorizedView": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTable": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DropRowRange": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GenerateConsistencyToken": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAuthorizedView": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetTable": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListAuthorizedViews": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListSnapshots": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListTables": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ModifyColumnFamilies": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestoreTable": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SnapshotTable": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UndeleteTable": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAuthorizedView": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTable": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php new file mode 100644 index 000000000000..c2ada4e51105 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php @@ -0,0 +1,495 @@ + [ + 'google.bigtable.admin.v2.BigtableTableAdmin' => [ + 'CopyBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Backup', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CopyBackupMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAuthorizedView' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AuthorizedView', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Backup', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateBackupMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTableFromSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotMetadata', + 'initialPollDelayMillis' => '5000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '60000', + 'totalPollTimeoutMillis' => '3600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RestoreTable' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\RestoreTableMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SnapshotTable' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Snapshot', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\SnapshotTableMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '600000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UndeleteTable' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UndeleteTableMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAuthorizedView' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AuthorizedView', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'authorized_view.name', + 'fieldAccessors' => [ + 'getAuthorizedView', + 'getName', + ], + ], + ], + ], + 'UpdateTable' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateTableMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'table.name', + 'fieldAccessors' => [ + 'getTable', + 'getName', + ], + ], + ], + ], + 'CheckConsistency' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\CheckConsistencyResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateTable' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Table', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAuthorizedView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSnapshot' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTable' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DropRowRange' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GenerateConsistencyToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAuthorizedView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\AuthorizedView', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Backup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetSnapshot' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Snapshot', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTable' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Table', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAuthorizedViews' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAuthorizedViews', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListBackupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSnapshots' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSnapshots', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListSnapshotsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTables' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTables', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListTablesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ModifyColumnFamilies' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Table', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + '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', + ], + ], + ], + ], + 'UpdateBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Backup', + 'headerParams' => [ + [ + 'keyName' => 'backup.name', + 'fieldAccessors' => [ + 'getBackup', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'authorizedView' => 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}', + 'backup' => 'projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}', + 'cluster' => 'projects/{project}/instances/{instance}/clusters/{cluster}', + 'cryptoKeyVersion' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}', + 'instance' => 'projects/{project}/instances/{instance}', + 'snapshot' => 'projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}', + 'table' => 'projects/{project}/instances/{instance}/tables/{table}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php new file mode 100644 index 000000000000..70910ee9a916 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php @@ -0,0 +1,459 @@ + [ + 'google.bigtable.admin.v2.BigtableTableAdmin' => [ + 'CheckConsistency' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:checkConsistency', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CopyBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups:copy', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAuthorizedView' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews', + 'body' => 'authorized_view', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'authorized_view_id', + ], + ], + 'CreateBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups', + 'body' => 'backup', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backup_id', + ], + ], + 'CreateTable' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTableFromSnapshot' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAuthorizedView' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSnapshot' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTable' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DropRowRange' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:dropRowRange', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateConsistencyToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAuthorizedView' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetSnapshot' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTable' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAuthorizedViews' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSnapshots' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/snapshots', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTables' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ModifyColumnFamilies' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RestoreTable' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables:restore', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SnapshotTable' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:snapshot', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UndeleteTable' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:undelete', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAuthorizedView' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}', + 'body' => 'authorized_view', + 'placeholders' => [ + 'authorized_view.name' => [ + 'getters' => [ + 'getAuthorizedView', + 'getName', + ], + ], + ], + ], + 'UpdateBackup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}', + 'body' => 'backup', + 'placeholders' => [ + 'backup.name' => [ + 'getters' => [ + 'getBackup', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateTable' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{table.name=projects/*/instances/*/tables/*}', + 'body' => 'table', + 'placeholders' => [ + 'table.name' => [ + 'getters' => [ + 'getTable', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=operations/**}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=operations/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=operations/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=operations/projects/**}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php new file mode 100644 index 000000000000..7b5c8c4fb05f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php @@ -0,0 +1,2070 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BigtableInstanceAdminClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BigtableInstanceAdminClient($options); + } + + /** @test */ + public function createAppProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new AppProfile(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $appProfileId = 'appProfileId1262094415'; + $appProfile = new AppProfile(); + $request = (new CreateAppProfileRequest()) + ->setParent($formattedParent) + ->setAppProfileId($appProfileId) + ->setAppProfile($appProfile); + $response = $gapicClient->createAppProfile($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAppProfileId(); + $this->assertProtobufEquals($appProfileId, $actualValue); + $actualValue = $actualRequestObject->getAppProfile(); + $this->assertProtobufEquals($appProfile, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAppProfileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $appProfileId = 'appProfileId1262094415'; + $appProfile = new AppProfile(); + $request = (new CreateAppProfileRequest()) + ->setParent($formattedParent) + ->setAppProfileId($appProfileId) + ->setAppProfile($appProfile); + try { + $gapicClient->createAppProfile($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createClusterTest() + { + $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/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $location = 'location1901043637'; + $serveNodes = 1288838783; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setLocation($location); + $expectedResponse->setServeNodes($serveNodes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $clusterName = 'clusterName-1141738587'; + $cluster->setName($clusterName); + $clusterServeNodes = 1434304124; + $cluster->setServeNodes($clusterServeNodes); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createCluster($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.bigtable.admin.v2.BigtableInstanceAdmin/CreateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClusterId(); + $this->assertProtobufEquals($clusterId, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + $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 createClusterExceptionTest() + { + $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/createClusterTest'); + $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->instanceName('[PROJECT]', '[INSTANCE]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $clusterName = 'clusterName-1141738587'; + $cluster->setName($clusterName); + $clusterServeNodes = 1434304124; + $cluster->setServeNodes($clusterServeNodes); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + 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 createInstanceTest() + { + $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/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $satisfiesPzs = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $instanceName = 'instanceName-737857344'; + $instance->setName($instanceName); + $instanceDisplayName = 'instanceDisplayName1824500376'; + $instance->setDisplayName($instanceDisplayName); + $instanceType = Type::TYPE_UNSPECIFIED; + $instance->setType($instanceType); + $labelsValue = 'labelsValue950036658'; + $instanceLabels = [ + 'labelsKey' => $labelsValue, + ]; + $instance->setLabels($instanceLabels); + $clustersValue = new Cluster(); + $valueName = 'valueName-765894756'; + $clustersValue->setName($valueName); + $valueServeNodes = 370436813; + $clustersValue->setServeNodes($valueServeNodes); + $clusters = [ + 'clustersKey' => $clustersValue, + ]; + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance) + ->setClusters($clusters); + $response = $gapicClient->createInstance($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.bigtable.admin.v2.BigtableInstanceAdmin/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualApiRequestObject->getClusters(); + $this->assertProtobufEquals($clusters, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $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 createInstanceExceptionTest() + { + $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/createInstanceTest'); + $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->projectName('[PROJECT]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $instanceName = 'instanceName-737857344'; + $instance->setName($instanceName); + $instanceDisplayName = 'instanceDisplayName1824500376'; + $instance->setDisplayName($instanceDisplayName); + $instanceType = Type::TYPE_UNSPECIFIED; + $instance->setType($instanceType); + $labelsValue = 'labelsValue950036658'; + $instanceLabels = [ + 'labelsKey' => $labelsValue, + ]; + $instance->setLabels($instanceLabels); + $clustersValue = new Cluster(); + $valueName = 'valueName-765894756'; + $clustersValue->setName($valueName); + $valueServeNodes = 370436813; + $clustersValue->setServeNodes($valueServeNodes); + $clusters = [ + 'clustersKey' => $clustersValue, + ]; + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance) + ->setClusters($clusters); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + 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 deleteAppProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); + $ignoreWarnings = true; + $request = (new DeleteAppProfileRequest()) + ->setName($formattedName) + ->setIgnoreWarnings($ignoreWarnings); + $gapicClient->deleteAppProfile($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteAppProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getIgnoreWarnings(); + $this->assertProtobufEquals($ignoreWarnings, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAppProfileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); + $ignoreWarnings = true; + $request = (new DeleteAppProfileRequest()) + ->setName($formattedName) + ->setIgnoreWarnings($ignoreWarnings); + try { + $gapicClient->deleteAppProfile($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + $gapicClient->deleteCluster($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $gapicClient->deleteInstance($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAppProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new AppProfile(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); + $request = (new GetAppProfileRequest()) + ->setName($formattedName); + $response = $gapicClient->getAppProfile($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetAppProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAppProfileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); + $request = (new GetAppProfileRequest()) + ->setName($formattedName); + try { + $gapicClient->getAppProfile($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $location = 'location1901043637'; + $serveNodes = 1288838783; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setLocation($location); + $expectedResponse->setServeNodes($serveNodes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new GetClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getCluster($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new GetClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigtable.admin.v2.BigtableInstanceAdmin/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 getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $satisfiesPzs = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAppProfilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $appProfilesElement = new AppProfile(); + $appProfiles = [ + $appProfilesElement, + ]; + $expectedResponse = new ListAppProfilesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAppProfiles($appProfiles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new ListAppProfilesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAppProfiles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAppProfiles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListAppProfiles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAppProfilesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new ListAppProfilesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAppProfiles($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new ListClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new ListClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClusters($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new ListClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHotTabletsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $hotTabletsElement = new HotTablet(); + $hotTablets = [ + $hotTabletsElement, + ]; + $expectedResponse = new ListHotTabletsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHotTablets($hotTablets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new ListHotTabletsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listHotTablets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHotTablets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListHotTablets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHotTabletsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new ListHotTabletsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listHotTablets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->projectName('[PROJECT]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function partialUpdateClusterTest() + { + $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/partialUpdateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $location = 'location1901043637'; + $serveNodes = 1288838783; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setLocation($location); + $expectedResponse->setServeNodes($serveNodes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/partialUpdateClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $cluster = new Cluster(); + $clusterName = 'clusterName-1141738587'; + $cluster->setName($clusterName); + $clusterServeNodes = 1434304124; + $cluster->setServeNodes($clusterServeNodes); + $updateMask = new FieldMask(); + $request = (new PartialUpdateClusterRequest()) + ->setCluster($cluster) + ->setUpdateMask($updateMask); + $response = $gapicClient->partialUpdateCluster($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.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/partialUpdateClusterTest'); + $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 partialUpdateClusterExceptionTest() + { + $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/partialUpdateClusterTest'); + $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 + $cluster = new Cluster(); + $clusterName = 'clusterName-1141738587'; + $cluster->setName($clusterName); + $clusterServeNodes = 1434304124; + $cluster->setServeNodes($clusterServeNodes); + $updateMask = new FieldMask(); + $request = (new PartialUpdateClusterRequest()) + ->setCluster($cluster) + ->setUpdateMask($updateMask); + $response = $gapicClient->partialUpdateCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/partialUpdateClusterTest'); + 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 partialUpdateInstanceTest() + { + $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/partialUpdateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $satisfiesPzs = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/partialUpdateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instance = new Instance(); + $instanceName = 'instanceName-737857344'; + $instance->setName($instanceName); + $instanceDisplayName = 'instanceDisplayName1824500376'; + $instance->setDisplayName($instanceDisplayName); + $instanceType = Type::TYPE_UNSPECIFIED; + $instance->setType($instanceType); + $labelsValue = 'labelsValue950036658'; + $instanceLabels = [ + 'labelsKey' => $labelsValue, + ]; + $instance->setLabels($instanceLabels); + $updateMask = new FieldMask(); + $request = (new PartialUpdateInstanceRequest()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + $response = $gapicClient->partialUpdateInstance($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.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); + $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 partialUpdateInstanceExceptionTest() + { + $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/partialUpdateInstanceTest'); + $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 + $instance = new Instance(); + $instanceName = 'instanceName-737857344'; + $instance->setName($instanceName); + $instanceDisplayName = 'instanceDisplayName1824500376'; + $instance->setDisplayName($instanceDisplayName); + $instanceType = Type::TYPE_UNSPECIFIED; + $instance->setType($instanceType); + $labelsValue = 'labelsValue950036658'; + $instanceLabels = [ + 'labelsKey' => $labelsValue, + ]; + $instance->setLabels($instanceLabels); + $updateMask = new FieldMask(); + $request = (new PartialUpdateInstanceRequest()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + $response = $gapicClient->partialUpdateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); + 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 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.bigtable.admin.v2.BigtableInstanceAdmin/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.bigtable.admin.v2.BigtableInstanceAdmin/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 updateAppProfileTest() + { + $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/updateAppProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new AppProfile(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAppProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $appProfile = new AppProfile(); + $updateMask = new FieldMask(); + $request = (new UpdateAppProfileRequest()) + ->setAppProfile($appProfile) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAppProfile($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.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAppProfile(); + $this->assertProtobufEquals($appProfile, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); + $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 updateAppProfileExceptionTest() + { + $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/updateAppProfileTest'); + $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 + $appProfile = new AppProfile(); + $updateMask = new FieldMask(); + $request = (new UpdateAppProfileRequest()) + ->setAppProfile($appProfile) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAppProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); + 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 updateClusterTest() + { + $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/updateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $location2 = 'location21541837352'; + $serveNodes2 = 1623486220; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setLocation($location2); + $expectedResponse->setServeNodes($serveNodes2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $serveNodes = 1288838783; + $request = (new Cluster()) + ->setName($name) + ->setServeNodes($serveNodes); + $response = $gapicClient->updateCluster($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.bigtable.admin.v2.BigtableInstanceAdmin/UpdateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualApiRequestObject->getServeNodes(); + $this->assertProtobufEquals($serveNodes, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + $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 updateClusterExceptionTest() + { + $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/updateClusterTest'); + $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 + $name = 'name3373707'; + $serveNodes = 1288838783; + $request = (new Cluster()) + ->setName($name) + ->setServeNodes($serveNodes); + $response = $gapicClient->updateCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + 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 updateInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName2 = 'displayName21615000987'; + $satisfiesPzs2 = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName2); + $expectedResponse->setSatisfiesPzs($satisfiesPzs2); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $type = Type::TYPE_UNSPECIFIED; + $labelsValue = 'labelsValue950036658'; + $labels = [ + 'labelsKey' => $labelsValue, + ]; + $request = (new Instance()) + ->setName($name) + ->setDisplayName($displayName) + ->setType($type) + ->setLabels($labels); + $response = $gapicClient->updateInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getDisplayName(); + $this->assertProtobufEquals($displayName, $actualValue); + $actualValue = $actualRequestObject->getType(); + $this->assertProtobufEquals($type, $actualValue); + $actualValue = $actualRequestObject->getLabels(); + $this->assertProtobufEquals($labels, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $type = Type::TYPE_UNSPECIFIED; + $labelsValue = 'labelsValue950036658'; + $labels = [ + 'labelsKey' => $labelsValue, + ]; + $request = (new Instance()) + ->setName($name) + ->setDisplayName($displayName) + ->setType($type) + ->setLabels($labels); + try { + $gapicClient->updateInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAppProfileAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new AppProfile(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $appProfileId = 'appProfileId1262094415'; + $appProfile = new AppProfile(); + $request = (new CreateAppProfileRequest()) + ->setParent($formattedParent) + ->setAppProfileId($appProfileId) + ->setAppProfile($appProfile); + $response = $gapicClient->createAppProfileAsync($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.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAppProfileId(); + $this->assertProtobufEquals($appProfileId, $actualValue); + $actualValue = $actualRequestObject->getAppProfile(); + $this->assertProtobufEquals($appProfile, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php new file mode 100644 index 000000000000..f2439bbf284a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php @@ -0,0 +1,2806 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BigtableTableAdminClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BigtableTableAdminClient($options); + } + + /** @test */ + public function checkConsistencyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $consistent = true; + $expectedResponse = new CheckConsistencyResponse(); + $expectedResponse->setConsistent($consistent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $consistencyToken = 'consistencyToken-1090516718'; + $request = (new CheckConsistencyRequest()) + ->setName($formattedName) + ->setConsistencyToken($consistencyToken); + $response = $gapicClient->checkConsistency($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CheckConsistency', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getConsistencyToken(); + $this->assertProtobufEquals($consistencyToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function checkConsistencyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $consistencyToken = 'consistencyToken-1090516718'; + $request = (new CheckConsistencyRequest()) + ->setName($formattedName) + ->setConsistencyToken($consistencyToken); + try { + $gapicClient->checkConsistency($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function copyBackupTest() + { + $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/copyBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceTable = 'sourceTable1670858410'; + $sourceBackup2 = 'sourceBackup2889376921'; + $sizeBytes = 1796325715; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setSourceTable($sourceTable); + $expectedResponse->setSourceBackup($sourceBackup2); + $expectedResponse->setSizeBytes($sizeBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/copyBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $backupId = 'backupId1355353272'; + $formattedSourceBackup = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); + $expireTime = new Timestamp(); + $request = (new CopyBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setSourceBackup($formattedSourceBackup) + ->setExpireTime($expireTime); + $response = $gapicClient->copyBackup($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.bigtable.admin.v2.BigtableTableAdmin/CopyBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackupId(); + $this->assertProtobufEquals($backupId, $actualValue); + $actualValue = $actualApiRequestObject->getSourceBackup(); + $this->assertProtobufEquals($formattedSourceBackup, $actualValue); + $actualValue = $actualApiRequestObject->getExpireTime(); + $this->assertProtobufEquals($expireTime, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/copyBackupTest'); + $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 copyBackupExceptionTest() + { + $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/copyBackupTest'); + $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $backupId = 'backupId1355353272'; + $formattedSourceBackup = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); + $expireTime = new Timestamp(); + $request = (new CopyBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setSourceBackup($formattedSourceBackup) + ->setExpireTime($expireTime); + $response = $gapicClient->copyBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/copyBackupTest'); + 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 createAuthorizedViewTest() + { + $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/createAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $deletionProtection = true; + $expectedResponse = new AuthorizedView(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAuthorizedViewTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $authorizedViewId = 'authorizedViewId1171901009'; + $authorizedView = new AuthorizedView(); + $request = (new CreateAuthorizedViewRequest()) + ->setParent($formattedParent) + ->setAuthorizedViewId($authorizedViewId) + ->setAuthorizedView($authorizedView); + $response = $gapicClient->createAuthorizedView($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.bigtable.admin.v2.BigtableTableAdmin/CreateAuthorizedView', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizedViewId(); + $this->assertProtobufEquals($authorizedViewId, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizedView(); + $this->assertProtobufEquals($authorizedView, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizedViewTest'); + $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 createAuthorizedViewExceptionTest() + { + $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/createAuthorizedViewTest'); + $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $authorizedViewId = 'authorizedViewId1171901009'; + $authorizedView = new AuthorizedView(); + $request = (new CreateAuthorizedViewRequest()) + ->setParent($formattedParent) + ->setAuthorizedViewId($authorizedViewId) + ->setAuthorizedView($authorizedView); + $response = $gapicClient->createAuthorizedView($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizedViewTest'); + 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 createBackupTest() + { + $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/createBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceTable = 'sourceTable1670858410'; + $sourceBackup = 'sourceBackup-258292122'; + $sizeBytes = 1796325715; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setSourceTable($sourceTable); + $expectedResponse->setSourceBackup($sourceBackup); + $expectedResponse->setSizeBytes($sizeBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $backupId = 'backupId1355353272'; + $backup = new Backup(); + $backupSourceTable = 'backupSourceTable1043210577'; + $backup->setSourceTable($backupSourceTable); + $backupExpireTime = new Timestamp(); + $backup->setExpireTime($backupExpireTime); + $request = (new CreateBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setBackup($backup); + $response = $gapicClient->createBackup($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.bigtable.admin.v2.BigtableTableAdmin/CreateBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackupId(); + $this->assertProtobufEquals($backupId, $actualValue); + $actualValue = $actualApiRequestObject->getBackup(); + $this->assertProtobufEquals($backup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupTest'); + $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 createBackupExceptionTest() + { + $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/createBackupTest'); + $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $backupId = 'backupId1355353272'; + $backup = new Backup(); + $backupSourceTable = 'backupSourceTable1043210577'; + $backup->setSourceTable($backupSourceTable); + $backupExpireTime = new Timestamp(); + $backup->setExpireTime($backupExpireTime); + $request = (new CreateBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setBackup($backup); + $response = $gapicClient->createBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupTest'); + 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 createTableTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $deletionProtection = true; + $expectedResponse = new Table(); + $expectedResponse->setName($name); + $expectedResponse->setDeletionProtection($deletionProtection); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $tableId = 'tableId-895419604'; + $table = new Table(); + $request = (new CreateTableRequest()) + ->setParent($formattedParent) + ->setTableId($tableId) + ->setTable($table); + $response = $gapicClient->createTable($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CreateTable', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTableId(); + $this->assertProtobufEquals($tableId, $actualValue); + $actualValue = $actualRequestObject->getTable(); + $this->assertProtobufEquals($table, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTableExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $tableId = 'tableId-895419604'; + $table = new Table(); + $request = (new CreateTableRequest()) + ->setParent($formattedParent) + ->setTableId($tableId) + ->setTable($table); + try { + $gapicClient->createTable($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTableFromSnapshotTest() + { + $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/createTableFromSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $deletionProtection = true; + $expectedResponse = new Table(); + $expectedResponse->setName($name); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTableFromSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $tableId = 'tableId-895419604'; + $formattedSourceSnapshot = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); + $request = (new CreateTableFromSnapshotRequest()) + ->setParent($formattedParent) + ->setTableId($tableId) + ->setSourceSnapshot($formattedSourceSnapshot); + $response = $gapicClient->createTableFromSnapshot($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.bigtable.admin.v2.BigtableTableAdmin/CreateTableFromSnapshot', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTableId(); + $this->assertProtobufEquals($tableId, $actualValue); + $actualValue = $actualApiRequestObject->getSourceSnapshot(); + $this->assertProtobufEquals($formattedSourceSnapshot, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTableFromSnapshotTest'); + $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 createTableFromSnapshotExceptionTest() + { + $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/createTableFromSnapshotTest'); + $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->instanceName('[PROJECT]', '[INSTANCE]'); + $tableId = 'tableId-895419604'; + $formattedSourceSnapshot = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); + $request = (new CreateTableFromSnapshotRequest()) + ->setParent($formattedParent) + ->setTableId($tableId) + ->setSourceSnapshot($formattedSourceSnapshot); + $response = $gapicClient->createTableFromSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTableFromSnapshotTest'); + 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 deleteAuthorizedViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $request = (new DeleteAuthorizedViewRequest()) + ->setName($formattedName); + $gapicClient->deleteAuthorizedView($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteAuthorizedView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAuthorizedViewExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $request = (new DeleteAuthorizedViewRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAuthorizedView($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + $gapicClient->deleteBackup($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSnapshotTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); + $request = (new DeleteSnapshotRequest()) + ->setName($formattedName); + $gapicClient->deleteSnapshot($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteSnapshot', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSnapshotExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); + $request = (new DeleteSnapshotRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSnapshot($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTableTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new DeleteTableRequest()) + ->setName($formattedName); + $gapicClient->deleteTable($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteTable', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTableExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new DeleteTableRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTable($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function dropRowRangeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new DropRowRangeRequest()) + ->setName($formattedName); + $gapicClient->dropRowRange($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DropRowRange', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function dropRowRangeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new DropRowRangeRequest()) + ->setName($formattedName); + try { + $gapicClient->dropRowRange($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateConsistencyTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $consistencyToken = 'consistencyToken-1090516718'; + $expectedResponse = new GenerateConsistencyTokenResponse(); + $expectedResponse->setConsistencyToken($consistencyToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new GenerateConsistencyTokenRequest()) + ->setName($formattedName); + $response = $gapicClient->generateConsistencyToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GenerateConsistencyToken', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateConsistencyTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new GenerateConsistencyTokenRequest()) + ->setName($formattedName); + try { + $gapicClient->generateConsistencyToken($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthorizedViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $deletionProtection = true; + $expectedResponse = new AuthorizedView(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeletionProtection($deletionProtection); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $request = (new GetAuthorizedViewRequest()) + ->setName($formattedName); + $response = $gapicClient->getAuthorizedView($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetAuthorizedView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthorizedViewExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $request = (new GetAuthorizedViewRequest()) + ->setName($formattedName); + try { + $gapicClient->getAuthorizedView($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sourceTable = 'sourceTable1670858410'; + $sourceBackup = 'sourceBackup-258292122'; + $sizeBytes = 1796325715; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setSourceTable($sourceTable); + $expectedResponse->setSourceBackup($sourceBackup); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.bigtable.admin.v2.BigtableTableAdmin/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 getSnapshotTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dataSizeBytes = 2110122398; + $description = 'description-1724546052'; + $expectedResponse = new Snapshot(); + $expectedResponse->setName($name2); + $expectedResponse->setDataSizeBytes($dataSizeBytes); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); + $request = (new GetSnapshotRequest()) + ->setName($formattedName); + $response = $gapicClient->getSnapshot($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetSnapshot', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSnapshotExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); + $request = (new GetSnapshotRequest()) + ->setName($formattedName); + try { + $gapicClient->getSnapshot($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTableTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $deletionProtection = true; + $expectedResponse = new Table(); + $expectedResponse->setName($name2); + $expectedResponse->setDeletionProtection($deletionProtection); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new GetTableRequest()) + ->setName($formattedName); + $response = $gapicClient->getTable($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetTable', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTableExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new GetTableRequest()) + ->setName($formattedName); + try { + $gapicClient->getTable($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthorizedViewsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $authorizedViewsElement = new AuthorizedView(); + $authorizedViews = [ + $authorizedViewsElement, + ]; + $expectedResponse = new ListAuthorizedViewsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuthorizedViews($authorizedViews); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new ListAuthorizedViewsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAuthorizedViews($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuthorizedViews()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListAuthorizedViews', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthorizedViewsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new ListAuthorizedViewsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAuthorizedViews($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupsElement = new Backup(); + $backups = [ + $backupsElement, + ]; + $expectedResponse = new ListBackupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackups($backups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListBackups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnapshotsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $snapshotsElement = new Snapshot(); + $snapshots = [ + $snapshotsElement, + ]; + $expectedResponse = new ListSnapshotsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSnapshots($snapshots); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new ListSnapshotsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSnapshots($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListSnapshots', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnapshotsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $request = (new ListSnapshotsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSnapshots($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTablesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tablesElement = new Table(); + $tables = [ + $tablesElement, + ]; + $expectedResponse = new ListTablesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTables($tables); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new ListTablesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTables($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTables()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListTables', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTablesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new ListTablesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTables($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyColumnFamiliesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $deletionProtection = true; + $expectedResponse = new Table(); + $expectedResponse->setName($name2); + $expectedResponse->setDeletionProtection($deletionProtection); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $modifications = []; + $request = (new ModifyColumnFamiliesRequest()) + ->setName($formattedName) + ->setModifications($modifications); + $response = $gapicClient->modifyColumnFamilies($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ModifyColumnFamilies', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getModifications(); + $this->assertProtobufEquals($modifications, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyColumnFamiliesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $modifications = []; + $request = (new ModifyColumnFamiliesRequest()) + ->setName($formattedName) + ->setModifications($modifications); + try { + $gapicClient->modifyColumnFamilies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreTableTest() + { + $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/restoreTableTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $deletionProtection = true; + $expectedResponse = new Table(); + $expectedResponse->setName($name); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/restoreTableTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $tableId = 'tableId-895419604'; + $request = (new RestoreTableRequest()) + ->setParent($formattedParent) + ->setTableId($tableId); + $response = $gapicClient->restoreTable($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.bigtable.admin.v2.BigtableTableAdmin/RestoreTable', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTableId(); + $this->assertProtobufEquals($tableId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreTableTest'); + $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 restoreTableExceptionTest() + { + $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/restoreTableTest'); + $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->instanceName('[PROJECT]', '[INSTANCE]'); + $tableId = 'tableId-895419604'; + $request = (new RestoreTableRequest()) + ->setParent($formattedParent) + ->setTableId($tableId); + $response = $gapicClient->restoreTable($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreTableTest'); + 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 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.bigtable.admin.v2.BigtableTableAdmin/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 snapshotTableTest() + { + $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/snapshotTableTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $dataSizeBytes = 2110122398; + $description2 = 'description2568623279'; + $expectedResponse = new Snapshot(); + $expectedResponse->setName($name2); + $expectedResponse->setDataSizeBytes($dataSizeBytes); + $expectedResponse->setDescription($description2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/snapshotTableTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $formattedCluster = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $snapshotId = 'snapshotId-168585866'; + $request = (new SnapshotTableRequest()) + ->setName($formattedName) + ->setCluster($formattedCluster) + ->setSnapshotId($snapshotId); + $response = $gapicClient->snapshotTable($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.bigtable.admin.v2.BigtableTableAdmin/SnapshotTable', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($formattedCluster, $actualValue); + $actualValue = $actualApiRequestObject->getSnapshotId(); + $this->assertProtobufEquals($snapshotId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); + $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 snapshotTableExceptionTest() + { + $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/snapshotTableTest'); + $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $formattedCluster = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); + $snapshotId = 'snapshotId-168585866'; + $request = (new SnapshotTableRequest()) + ->setName($formattedName) + ->setCluster($formattedCluster) + ->setSnapshotId($snapshotId); + $response = $gapicClient->snapshotTable($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); + 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 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.bigtable.admin.v2.BigtableTableAdmin/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 undeleteTableTest() + { + $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/undeleteTableTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $deletionProtection = true; + $expectedResponse = new Table(); + $expectedResponse->setName($name2); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeleteTableTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new UndeleteTableRequest()) + ->setName($formattedName); + $response = $gapicClient->undeleteTable($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.bigtable.admin.v2.BigtableTableAdmin/UndeleteTable', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeleteTableTest'); + $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 undeleteTableExceptionTest() + { + $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/undeleteTableTest'); + $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new UndeleteTableRequest()) + ->setName($formattedName); + $response = $gapicClient->undeleteTable($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeleteTableTest'); + 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 updateAuthorizedViewTest() + { + $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/updateAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $deletionProtection = true; + $expectedResponse = new AuthorizedView(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAuthorizedViewTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $authorizedView = new AuthorizedView(); + $request = (new UpdateAuthorizedViewRequest()) + ->setAuthorizedView($authorizedView); + $response = $gapicClient->updateAuthorizedView($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.bigtable.admin.v2.BigtableTableAdmin/UpdateAuthorizedView', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAuthorizedView(); + $this->assertProtobufEquals($authorizedView, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizedViewTest'); + $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 updateAuthorizedViewExceptionTest() + { + $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/updateAuthorizedViewTest'); + $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 + $authorizedView = new AuthorizedView(); + $request = (new UpdateAuthorizedViewRequest()) + ->setAuthorizedView($authorizedView); + $response = $gapicClient->updateAuthorizedView($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizedViewTest'); + 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 updateBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $sourceTable = 'sourceTable1670858410'; + $sourceBackup = 'sourceBackup-258292122'; + $sizeBytes = 1796325715; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setSourceTable($sourceTable); + $expectedResponse->setSourceBackup($sourceBackup); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $backup = new Backup(); + $backupSourceTable = 'backupSourceTable1043210577'; + $backup->setSourceTable($backupSourceTable); + $backupExpireTime = new Timestamp(); + $backup->setExpireTime($backupExpireTime); + $updateMask = new FieldMask(); + $request = (new UpdateBackupRequest()) + ->setBackup($backup) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateBackup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/UpdateBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getBackup(); + $this->assertProtobufEquals($backup, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $backup = new Backup(); + $backupSourceTable = 'backupSourceTable1043210577'; + $backup->setSourceTable($backupSourceTable); + $backupExpireTime = new Timestamp(); + $backup->setExpireTime($backupExpireTime); + $updateMask = new FieldMask(); + $request = (new UpdateBackupRequest()) + ->setBackup($backup) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTableTest() + { + $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/updateTableTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $deletionProtection = true; + $expectedResponse = new Table(); + $expectedResponse->setName($name); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTableTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $table = new Table(); + $updateMask = new FieldMask(); + $request = (new UpdateTableRequest()) + ->setTable($table) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateTable($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.bigtable.admin.v2.BigtableTableAdmin/UpdateTable', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getTable(); + $this->assertProtobufEquals($table, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTableTest'); + $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 updateTableExceptionTest() + { + $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/updateTableTest'); + $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 + $table = new Table(); + $updateMask = new FieldMask(); + $request = (new UpdateTableRequest()) + ->setTable($table) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateTable($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTableTest'); + 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 checkConsistencyAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $consistent = true; + $expectedResponse = new CheckConsistencyResponse(); + $expectedResponse->setConsistent($consistent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $consistencyToken = 'consistencyToken-1090516718'; + $request = (new CheckConsistencyRequest()) + ->setName($formattedName) + ->setConsistencyToken($consistencyToken); + $response = $gapicClient->checkConsistencyAsync($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.bigtable.admin.v2.BigtableTableAdmin/CheckConsistency', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getConsistencyToken(); + $this->assertProtobufEquals($consistencyToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Bigtable.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Bigtable.php new file mode 100644 index 0000000000000000000000000000000000000000..625f960720165017efc773f5f9617be40ddb1e66 GIT binary patch literal 12271 zcmds7Pf#1z8TU#+&;xApaAKkSlQ(vZV-P7x?L>~9t^fmx0~jz)Tus$w^#of>T4i@- zLOmRsO!_A?J#;$lO#kJY>7VH|x6X8W=%GF2*7ndDa>*gnLk>BmJ>=Bydw*6dw1DK` zgX@dMzVChSegD7jxBKEtwT&8iGCjkp%r$*hOs{RF{SB6`xsLBxPC30+FO`^^wwy}M zE;BciPEReQ=NDGe(^GRRCt<7S)Ln~Z)9a42US{KK_PTGb!H?S$!S4*`Mo87HFt27> zEIqTBdzJZS(e%yy4Bwc~$&LBdiHn3-Wz+N0>KVC1((tcVUn|>I+Vf2x{ySxR1-okd zwpq5n4L84(E}3PI!RA)lQoU;Vwo^^xhJ~udM$V=MPozCnb3oEdX?2xF6dnZ6&sBZq zR?TvLig}i6*L=ra1k!AFo%w;v@X5$oc`UNCOX(4D$85Icl9$rHTW8_Z(`lFab+>wv z-y0ch2fy+WiZW_;-l$d`)Phs>ve|}A4HkQCoGja{>UXy1ip|Q!9NRE&+m74W)+Hw0 zqoYeMId$KzuD5@b@)Pi#{1o`q-R)drZ`7IRFN0z`&}!f;Q+0?Sut@ud2U}Nc2n^q> z)b3*M4cDyInA^dPmuglXg{<$fhlj)1Wm`JGQ7i_&eg$&CNZ_65t7pi+R>{c&gP&4C zl2Q2~b9*9nLT)o__PE6zQ)G(N6QP9?dS78px}PK%4iUK0$K+Bnyd)e+t~@4J)D;k>h6F-*8;ap@rKv+Z3D!{jKqWC7$afx8s!VzL{V z(Gk++!p)O0_^WRsCGQjVhzv-!%zQdVdSEN$-ejE9KDGxfxFZlzN(eG8l*5_BQU%fgQ(?5vgLCWr4 z4YEE1!}nMl_3AATj2;JlX7(3K?8;2Ca(NQB(MQQ~sIh**v&?E0Ob;3?++thYI{owl z8E8_UG(qX+b42|6tHNQgnpSkv`Yl(do5-?PWqiv3H7vwhTu*V*MATr zgRj;hgP{&&q};QFg`s_D@^fW^odfShh4km*9~&|H97$AAC~UqUEHL&02Uckks#}Ij z4n%yHK13c2sY2*c|9dR-^qzYN&%%f0A()sG)F2N)JL%fotyIN##@>(6II_VKLUY13w_(AoDG>FwdN6BDe z*XjDpWT5F3dY1G+8)!R4&bV)4STPEcs%lUvcLdEp04d_9zp!VuEp^H!|!E!fDx1x-8k#vRn!7)f%Ul{o_ zcK-~sOc=3#eNne!`Pm@>J;tL)(zMG|H}6lNw-@sLxvN% zK7U39mQp4r``z-x29fu3B(-}DYoRpkDH6xV0!`UBaUznjv#EbqBco~rn-hq~tw9Wdr0}tlSED3PD=S?l$5&!(SH#q zCs1u+G4HW(wCS#5?r7((^cg}RZd|{BT_^7}L&Hswd{@*E2>s(LWXN)=0CCiL7g6w? zTMT*$k(46qlF-j&XwwSc1I$KAFRK>C;aK7KJsh$V-C%IpHD>w+HMsI#cfX2(y{(Y3 zb(hCkmCze!{u3^IEp^|?j{c+G_P6NA-jFdg88CAtI=+EX2!(8Mppxnd&$ zlTfd!MN$*{HlC^1VHCrg@XaYg`L%G$$Dv0|Ie5KpoCTZLL^ID1>BhN;Pl}v`tE@Nm zw>TjUGtrkxm%mjL_`}hO7dw)+!6vf;JSY@90U8#pa@~XZ9uWkdf5I&y253L@;)8M$ z3r4~b=p%=*s z!1`>c;$Vp~4BeaX%dMF1tt2@peDy`r#dUO?46eMsIK2y3=p|j(m#3Emk}zW|<&2r> z!sNo$tJ9M!a|`o>F*->4Cl}^d=H{;({7F3ZBaI}22%$6JB%vfDGLwwq$ku+3#I&E3 zXv%$)RO*i!=?g_!s7Dsj6wxEo+31`q#)b~BezXcGSWvfA;curH8oRyG~oRM_RBp9x2#+XyE7FfXujCJZ2NT9|2&e zpVy>9$pNPmXj$LH6H(s2h_6Aea56}p!=xXOka~qlr$8`-PsAGNz6Z2rRy-&q*y%nS z#VtY!8R%SKS7;cVC4Hf1w2#CQl0vH^d??Wx;XuKB6K=ye0+fwCujK}084_aZKLt3Z z`3ACFy#P5?zKN24emd&*(6QCaK46pTwH0XO0>A_Ov4S*DMePK6@D)|S0FWYrNTN7@ z;#a3gZ%)4Yq94UcFIGhym1(5Esa5GlsmLQ6MB)$_@OF$4OuS?=)`HK*#Swgl9DRS)2?s;c0Xv%3+#F zl%3DEK`D*>PKU;RPotMRHntarHgD$h^yZ=3yNUh%Yw@?bNP@Qp2!7GXSPhnyr6bc% zh)P=deX#PQjqn_WF%seX(TV~qc8qiTEk}j@FEu^eu_y2YQ9g|Ouj{La>IY%w_o*9D zcxy)j`+0PK`>GK>^;A^AH`qWq;je-8pMW3GkfE7?V|R>`tq-GY{+^~^ynCB_X!Lwu zzj1G@j_mJKvqQfBZx?y61=FLE^L-1M$_8UmZV*8&z2WVy9U~Vqyvhm<^iTkxqs_qP z=q|)^$GG<8nM8Tp?=(Hvv9|%**$hpi(^>jA4%O$P4!KWVkA4R8QwXS~k+~#9pqwol z+H4|}e)dCc$KVL_jxmHlbCj*m=}&PB;rbp8({{E7*tH7s7wBmLThqtx?6)bReS5zP zUa7Z0&@?i7TIrPhd%i;7jciLTd;qyO84)NPF5UsaeXq4Bb^Tt`Cp!)e?75pShp|!A z3x^sTk*D0R!SSaUIo%eBO}`eEd)wNo9Lo3-9HfuE3z62z=%zZbhU@JSd!fl~U4H$! z@4E$XEU0P!*2JeMVPKv{!YdeNVJfAQ$okhxEXA*PCjAxNxT_cnUsMSC+ZgE&0|qoY zIfhA;gppHSGoh63uVCCEHBECEXp{psJBA+dG%9Pns9)d$H<9mQ@$D=N0Z}UJ<^Wc1 zhN3!7zt3o?k76GhCjum<`Af5Z7=Mm!_joR98V#yi)DRu_1*LpFd7-v=|K2%HjJYUN< zzSf3MZapqfJ}Gfuk8@nbVoV)_NPWZ-`3ZS=i6kc zlA%D6fdBWj&c1nk?d}e0!Mb+CP1|cdz}a`6JrjI&J1V{)4}EYBujb%`_=u0qIi>h0 Je4A_&@;`5!XF31? literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Data.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Data.php new file mode 100644 index 0000000000000000000000000000000000000000..b349402a17050566c9fa70058ba77a01f7f689f9 GIT binary patch literal 5521 zcmdT|TW{mW6<)1vSvr(&wCgC^OBlwgKU}5i#d7=bZV@W#;i$(Rl

EF0n*|3VBs$s^?c8@l9Z+Rx8o&_7kH`1eD8N?@e^yn{Dh<6b>6`!a8oY~EE0GX zxP14%C3O<-P86btPb_W55jl+xcfScz9tX_t9`MACy(kUiBV=v2&v=@JidJ^-t8Gc0 zH?Vf4jqUa|BcE7lJmUG?Ei2~fC=MP8yGg;@?5kT4q-T-WJ@mNW@9=YW>4kB-J@IOy zq)0Ru-|opc;>o*)Nfh~yGE%{r`S0dR(% z8;6O|wP3Em(k1gp933N9SE1~)9!J#+=xEjc&rMi5CA#?uEK;oM%gAT63b!O+n43_I z*&9bHt&q|eH_W@RMT^&Ls3Ls<=|2LaH%@t?#Dp!lybZM^jlJMZtuG*Z71wbOgqK<@ zD;-+^J=(a@G%R{xY>Yp%Se?+qhzAk@NWrM{pf6;^Iz_$q zqC^sUUFjmPkkT=rn(69PVOg=+zl1W{@|vgSI#lBD4e69V)Xbj%&`L~(Y9QY(@=JST z|DyzkObY4UCKw_u$4)NGEZCN&WJ#kP*PucyUggNSDX>cRUz1nPnzzB6rVHsM6^ad5 zyQ00b1}jqn_P4N_fl9h^S6e*+W(*ncSjh|`zK&_HQ|z>IcZlrlWs z3=@(%b@E7~ZKmX|oPJJ9pZ*FMx%~(XnG*Y76{z9?V&TWuYyK4L);aS60Yano(TwAk z+|7MrMT?&Th-Tt*b}8$W(b}CaDmuO3NBPH4b;F>KqeU2CS)(lP-kUGKulZ4Y6&4dO zxTvqABvq96VJ*T*#$mqi41{0x4MoEE_59Gi$kR+kqY@}Hz=`=8|E-plQM_T^f(@c4 z*ou9wiK{3~<;sS74(ihi2zgW#u{Pb24JL=(sja9|QZ;@Gn~G6npWaMX_7938lS@04 zKY;BC5~oy9y*FBRk&0==qZWjz1k;p_)Dg(W#~GChgf?+a=r1gzr_`lH0-*HAa7#2u zC*rX~VGRd^gr`~!HHRf++kwV3o9_+1jEi~&af!fEyA|40D71)FaiD# zmj1p3)eQIMLs*Yu-uGPUb_(WHLX6gYBg_^UG!knWs!;z^<^j~iu&;$=lFr|#Q-QLy z%l^Ism6s#BMudU+B~<97>0DKr*(r*e=5Jzmq7ey?<_Q?Ak3}|=!jxA=>yx>{INY9u zO8gnD;6Wo+wE{}F8I>yA{Uu3cDt-ZGpZlC59*09mLQV8#qxJb*Lk@)4Axg)yvu_byUZJ`@DfnXik^z%>@m#Tg(WYDMyZO@Y|h5taH`3n;Qzql zF|1#OTd~!%PxA`^3Z|U?R5ahAYc#MF=k}K9EZn<+L)XMe1YZZBGE_Cf{zC~ik2&kV z4Ex?-{9Wv&{CMQk-Q@>i5(j0h<=L?SiWpBPoC_O*M?hs=C1xpK=W6k=?8XZsX3j(IZjQ>;{(IS-*GE`&}ZG%L>wXC>j6 zGyu;VyOb2MF>->0U`%p1I{Bb5yFl1Gu$swrSn8geCf;=E!@;X46Q1`0mTTqKJ6qu;;?8GGp2e&PJGV<`;cwZ`Y5`3}~rEaOS zijg9KFkkH2`Fjbr@tLszew`}bm6_P|sPwBZ@lHAFYc`bFI}0bzjx6%<internalAddGeneratedFile( + ' +£ +&google/bigtable/v2/feature_flags.protogoogle.bigtable.v2"ž + FeatureFlags + reverse_scans ( +mutate_rows_rate_limit ( +mutate_rows_rate_limit2 (" +last_scanned_row_responses ( +routing_cookie ( + +retry_info (# +client_side_metrics_enabled ( +traffic_director_enabled ( +direct_access_requested + (B» +com.google.bigtable.v2BFeatureFlagsProtoPZ8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepbªGoogle.Cloud.Bigtable.V2ÊGoogle\\Cloud\\Bigtable\\V2êGoogle::Cloud::Bigtable::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/RequestStats.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/RequestStats.php new file mode 100644 index 0000000000000000000000000000000000000000..e0ba5ca1e11e5c20eda32c7b797367e3114dea6b GIT binary patch literal 1345 zcma)6-A)rh6t4m-NWY0O@`M&e_{AG5U!9%pqQl^MzF^VpbK4mCVQcEfY zii#v*3Q>8Malw>_Q1=kMKRiae-Gk!?CN!6Yq70*flmo%GB0kV0GLNCZrP!x}(bmDb|Qxw=lgkqA(t-8iP1dPhRj!!mBtQG2SyRZI5!;j2rOl2CV;IFPqKM&#Qax z4gJ>F1~iWti4RP{94Xhg<}%z;@;nc7#?p|=BGoGm)M(E(S7Ff^O6e@Fj5E%-0=Fp> z;;*n-XSokcrRATv>(<)(0E^Ysyfs6e(u_5%a@H%j^%`!XK;D$%?7^LSRVqFejIF|) zA8bs=amzI+uti~ha$B0au#_0iq2p*LF%O4^c17>eG}tQ|-(2g=1B`<^KN@h?oP#OB zorTHlZajO9lV?=OBCg#{lP2bklYB>BeaAAD62*vAI?*r&G4pd6v6%36}tW0DQu{ A3;+NC literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/ResponseParams.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/ResponseParams.php new file mode 100644 index 0000000000000000000000000000000000000000..932fb13c6dee0f42c50f85259a8169fc148fe696 GIT binary patch literal 904 zcma)4%Z}496eV5oFoH!vFw$%;Fw$fsNTskrE*(TDlvzM4H0oj$DRLY)V=1*Q+Zl;L z-SaK{13$oLu;eRnoTi;og+w;7e9t-e`kwRpjXGE88BCa9npjpq{uS&w1Er;vR92AJ ziv`m_rr7IB1U@}WSF-rT6jU+xw2Bv92Db{+0Fi%oA7Aewvpot2-_Jk-WhTPR@dxmcL2?7t;NvK-3Y8UCqLPX zW4@l_ZBcC6esJD|8(>2_M8A6|{9jZ0{T3N@_C*)*(=&Ac`sVu&(XC4sWxsqO`+!tfh!~k-OkqdPl(qYw0$AE`NV|`z;Y;U&Xki fVmy!Yn?BAj4>xOn-nx0k{C^tnk*&uov_j}Fj?E-( literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Types.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Types.php new file mode 100644 index 0000000000000000000000000000000000000000..a7a31f2675de559c80b47807b38e18eaaae236e9 GIT binary patch literal 2982 zcmb7`Pj4GV6u|2^f9#h~ReM0z0%0hnaiMIA8$#GLAaDM;5+PBWMgpy5jn`vm)b;MN zJDWD3+_>@)_yU|bAn^@2@BujY%$+-LW_InQ>Bdf!$P>@|y+8Bjy?Kwmj*cVvknFO6 z#Z<5^>6{XA%t#c6BJ@I^bkbgr#l#B-5%*ba5wf*UzTH10+gpzhKR`4I)7WD+>4#z8 zXUiSl7qo+mlg6?*jaXtSRR94Uuq2`$BfAIA9uu@n1$B27C15gdurZwwDH;;9)={upfA=evfFKQua<1 zVvHLk_v1i@jUl^_1Hs~e`tBA>yqHHKj1N%Mw);#B4@-Vizn7Vn>UfXTwU4%a$;k~O z;*_1YPDso|8VBpjZ>ivHxN_fcO3jG7JDmAlhaJ-s9>%skifW`p1@-AyJPV=O?G8QO z!5r3yHl)QR_{V_7tCMFKdf&>EYn?Q1zq$p}GDXG;K<8Ajq%G53E0I!tzOiUsCM+p! zIa0KB!&rs+M8rJkYivqk?-ycEl`L{-4Fg+U(b&uwYnaB>6{OZ+q34HGJZxxgL2;ze z+>RDLN9Go*laR`01F9XoAlhI>Veb_hbWjqlJ%XEpW1R>(h%^Wayj=($=Hf`BMJy_& z!TB*3w@^}Br2T%(`a^JbjKyXyjIrRgPN7$35oM9XEYdipry46OtoY6}r6^Jl zpfaG@xlAkO-NJL(qfzUI`D+Pg)QvN~gbEA1u!}b?yQA(>A*>K^w!!VKOao0 z$a;pL^l_?I!UJysC{3!qYq~}o*V2`hyZIK(WvXpdZO%hg{;PH`oX3BdFjchIOPE4N z$MO65<9GtMuy3_l(B(8}>rix;S}hFaqCN|sr)`Dj;cUUpi{D}GUAqfj2z(Z%We+f` zFqbu-;c|6Fp4YI@O%#>IYyMnPcLyuV_#9??@?l8uVwSQ0epDD4-W&uh^^BOCFryZR z0igJ{e5KXpt{Qh?T6J`t_F9of^9z_!1!`EZz2A?^SwoMk zr|AHTtPRGo??+KP4fqcjnir;lsOgujIf0fIKCAIJVIO}F{4|k&&y=Q3sR#|AUjzEG zru+INe(lkh8ODQ}?&%X@JkU)J=J{dT&E*hT?uVmUltvuK(R_M|I_sn5Z&NirgIb$P1D3U# zU#+9Y-}#p7sy%l!rsACX@6a~r IXK)7aKlodoX8-^I literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ArrayValue.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ArrayValue.php new file mode 100644 index 000000000000..cb872d55e982 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ArrayValue.php @@ -0,0 +1,67 @@ +google.bigtable.v2.ArrayValue + */ +class ArrayValue extends \Google\Protobuf\Internal\Message +{ + /** + * The ordered elements in the array. + * + * Generated from protobuf field repeated .google.bigtable.v2.Value values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\V2\Value>|\Google\Protobuf\Internal\RepeatedField $values + * The ordered elements in the array. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The ordered elements in the array. + * + * Generated from protobuf field repeated .google.bigtable.v2.Value values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The ordered elements in the array. + * + * Generated from protobuf field repeated .google.bigtable.v2.Value values = 1; + * @param array<\Google\Cloud\Bigtable\V2\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Value::class); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Cell.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Cell.php new file mode 100644 index 000000000000..ae97f1e167af --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Cell.php @@ -0,0 +1,163 @@ +google.bigtable.v2.Cell + */ +class Cell extends \Google\Protobuf\Internal\Message +{ + /** + * The cell's stored timestamp, which also uniquely identifies it within + * its column. + * Values are always expressed in microseconds, but individual tables may set + * a coarser granularity to further restrict the allowed values. For + * example, a table which specifies millisecond granularity will only allow + * values of `timestamp_micros` which are multiples of 1000. + * + * Generated from protobuf field int64 timestamp_micros = 1; + */ + protected $timestamp_micros = 0; + /** + * The value stored in the cell. + * May contain any byte string, including the empty string, up to 100MiB in + * length. + * + * Generated from protobuf field bytes value = 2; + */ + protected $value = ''; + /** + * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. + * + * Generated from protobuf field repeated string labels = 3; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $timestamp_micros + * The cell's stored timestamp, which also uniquely identifies it within + * its column. + * Values are always expressed in microseconds, but individual tables may set + * a coarser granularity to further restrict the allowed values. For + * example, a table which specifies millisecond granularity will only allow + * values of `timestamp_micros` which are multiples of 1000. + * @type string $value + * The value stored in the cell. + * May contain any byte string, including the empty string, up to 100MiB in + * length. + * @type array|\Google\Protobuf\Internal\RepeatedField $labels + * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The cell's stored timestamp, which also uniquely identifies it within + * its column. + * Values are always expressed in microseconds, but individual tables may set + * a coarser granularity to further restrict the allowed values. For + * example, a table which specifies millisecond granularity will only allow + * values of `timestamp_micros` which are multiples of 1000. + * + * Generated from protobuf field int64 timestamp_micros = 1; + * @return int|string + */ + public function getTimestampMicros() + { + return $this->timestamp_micros; + } + + /** + * The cell's stored timestamp, which also uniquely identifies it within + * its column. + * Values are always expressed in microseconds, but individual tables may set + * a coarser granularity to further restrict the allowed values. For + * example, a table which specifies millisecond granularity will only allow + * values of `timestamp_micros` which are multiples of 1000. + * + * Generated from protobuf field int64 timestamp_micros = 1; + * @param int|string $var + * @return $this + */ + public function setTimestampMicros($var) + { + GPBUtil::checkInt64($var); + $this->timestamp_micros = $var; + + return $this; + } + + /** + * The value stored in the cell. + * May contain any byte string, including the empty string, up to 100MiB in + * length. + * + * Generated from protobuf field bytes value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value stored in the cell. + * May contain any byte string, including the empty string, up to 100MiB in + * length. + * + * Generated from protobuf field bytes value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, False); + $this->value = $var; + + return $this; + } + + /** + * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. + * + * Generated from protobuf field repeated string labels = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. + * + * Generated from protobuf field repeated string labels = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php new file mode 100644 index 000000000000..71dc9e6065dd --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php @@ -0,0 +1,436 @@ +google.bigtable.v2.CheckAndMutateRowRequest + */ +class CheckAndMutateRowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/

`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $authorized_view_name = ''; + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 7; + */ + protected $app_profile_id = ''; + /** + * Required. The key of the row to which the conditional mutation should be + * applied. + * + * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $row_key = ''; + /** + * The filter to be applied to the contents of the specified row. Depending + * on whether or not any results are yielded, either `true_mutations` or + * `false_mutations` will be executed. If unset, checks that the row contains + * any values at all. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 6; + */ + protected $predicate_filter = null; + /** + * Changes to be atomically applied to the specified row if `predicate_filter` + * yields at least one cell when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `false_mutations` is empty, and at most + * 100000. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation true_mutations = 4; + */ + private $true_mutations; + /** + * Changes to be atomically applied to the specified row if `predicate_filter` + * does not yield any cells when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `true_mutations` is empty, and at most + * 100000. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation false_mutations = 5; + */ + private $false_mutations; + + /** + * @param string $tableName Optional. The unique name of the table to which the conditional mutation + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $rowKey Required. The key of the row to which the conditional mutation should be + * applied. + * @param \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter The filter to be applied to the contents of the specified row. Depending + * on whether or not any results are yielded, either `true_mutations` or + * `false_mutations` will be executed. If unset, checks that the row contains + * any values at all. + * @param \Google\Cloud\Bigtable\V2\Mutation[] $trueMutations Changes to be atomically applied to the specified row if `predicate_filter` + * yields at least one cell when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `false_mutations` is empty, and at most + * 100000. + * @param \Google\Cloud\Bigtable\V2\Mutation[] $falseMutations Changes to be atomically applied to the specified row if `predicate_filter` + * does not yield any cells when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `true_mutations` is empty, and at most + * 100000. + * + * @return \Google\Cloud\Bigtable\V2\CheckAndMutateRowRequest + * + * @experimental + */ + public static function build(string $tableName, string $rowKey, \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter, array $trueMutations, array $falseMutations): self + { + return (new self()) + ->setTableName($tableName) + ->setRowKey($rowKey) + ->setPredicateFilter($predicateFilter) + ->setTrueMutations($trueMutations) + ->setFalseMutations($falseMutations); + } + + /** + * @param string $tableName Optional. The unique name of the table to which the conditional mutation + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $rowKey Required. The key of the row to which the conditional mutation should be + * applied. + * @param \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter The filter to be applied to the contents of the specified row. Depending + * on whether or not any results are yielded, either `true_mutations` or + * `false_mutations` will be executed. If unset, checks that the row contains + * any values at all. + * @param \Google\Cloud\Bigtable\V2\Mutation[] $trueMutations Changes to be atomically applied to the specified row if `predicate_filter` + * yields at least one cell when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `false_mutations` is empty, and at most + * 100000. + * @param \Google\Cloud\Bigtable\V2\Mutation[] $falseMutations Changes to be atomically applied to the specified row if `predicate_filter` + * does not yield any cells when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `true_mutations` is empty, and at most + * 100000. + * @param string $appProfileId This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * @return \Google\Cloud\Bigtable\V2\CheckAndMutateRowRequest + * + * @experimental + */ + public static function buildFromTableNameRowKeyPredicateFilterTrueMutationsFalseMutationsAppProfileId(string $tableName, string $rowKey, \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter, array $trueMutations, array $falseMutations, string $appProfileId): self + { + return (new self()) + ->setTableName($tableName) + ->setRowKey($rowKey) + ->setPredicateFilter($predicateFilter) + ->setTrueMutations($trueMutations) + ->setFalseMutations($falseMutations) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table_name + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @type string $app_profile_id + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @type string $row_key + * Required. The key of the row to which the conditional mutation should be + * applied. + * @type \Google\Cloud\Bigtable\V2\RowFilter $predicate_filter + * The filter to be applied to the contents of the specified row. Depending + * on whether or not any results are yielded, either `true_mutations` or + * `false_mutations` will be executed. If unset, checks that the row contains + * any values at all. + * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $true_mutations + * Changes to be atomically applied to the specified row if `predicate_filter` + * yields at least one cell when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `false_mutations` is empty, and at most + * 100000. + * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $false_mutations + * Changes to be atomically applied to the specified row if `predicate_filter` + * does not yield any cells when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `true_mutations` is empty, and at most + * 100000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTableName() + { + return $this->table_name; + } + + /** + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTableName($var) + { + GPBUtil::checkString($var, True); + $this->table_name = $var; + + return $this; + } + + /** + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 7; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 7; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + + /** + * Required. The key of the row to which the conditional mutation should be + * applied. + * + * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRowKey() + { + return $this->row_key; + } + + /** + * Required. The key of the row to which the conditional mutation should be + * applied. + * + * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRowKey($var) + { + GPBUtil::checkString($var, False); + $this->row_key = $var; + + return $this; + } + + /** + * The filter to be applied to the contents of the specified row. Depending + * on whether or not any results are yielded, either `true_mutations` or + * `false_mutations` will be executed. If unset, checks that the row contains + * any values at all. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 6; + * @return \Google\Cloud\Bigtable\V2\RowFilter|null + */ + public function getPredicateFilter() + { + return $this->predicate_filter; + } + + public function hasPredicateFilter() + { + return isset($this->predicate_filter); + } + + public function clearPredicateFilter() + { + unset($this->predicate_filter); + } + + /** + * The filter to be applied to the contents of the specified row. Depending + * on whether or not any results are yielded, either `true_mutations` or + * `false_mutations` will be executed. If unset, checks that the row contains + * any values at all. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 6; + * @param \Google\Cloud\Bigtable\V2\RowFilter $var + * @return $this + */ + public function setPredicateFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); + $this->predicate_filter = $var; + + return $this; + } + + /** + * Changes to be atomically applied to the specified row if `predicate_filter` + * yields at least one cell when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `false_mutations` is empty, and at most + * 100000. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation true_mutations = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrueMutations() + { + return $this->true_mutations; + } + + /** + * Changes to be atomically applied to the specified row if `predicate_filter` + * yields at least one cell when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `false_mutations` is empty, and at most + * 100000. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation true_mutations = 4; + * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrueMutations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); + $this->true_mutations = $arr; + + return $this; + } + + /** + * Changes to be atomically applied to the specified row if `predicate_filter` + * does not yield any cells when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `true_mutations` is empty, and at most + * 100000. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation false_mutations = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFalseMutations() + { + return $this->false_mutations; + } + + /** + * Changes to be atomically applied to the specified row if `predicate_filter` + * does not yield any cells when applied to `row_key`. Entries are applied in + * order, meaning that earlier mutations can be masked by later ones. + * Must contain at least one entry if `true_mutations` is empty, and at most + * 100000. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation false_mutations = 5; + * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFalseMutations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); + $this->false_mutations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php new file mode 100644 index 000000000000..ea562f574e70 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php @@ -0,0 +1,71 @@ +google.bigtable.v2.CheckAndMutateRowResponse + */ +class CheckAndMutateRowResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Whether or not the request's `predicate_filter` yielded any results for + * the specified row. + * + * Generated from protobuf field bool predicate_matched = 1; + */ + protected $predicate_matched = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $predicate_matched + * Whether or not the request's `predicate_filter` yielded any results for + * the specified row. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Whether or not the request's `predicate_filter` yielded any results for + * the specified row. + * + * Generated from protobuf field bool predicate_matched = 1; + * @return bool + */ + public function getPredicateMatched() + { + return $this->predicate_matched; + } + + /** + * Whether or not the request's `predicate_filter` yielded any results for + * the specified row. + * + * Generated from protobuf field bool predicate_matched = 1; + * @param bool $var + * @return $this + */ + public function setPredicateMatched($var) + { + GPBUtil::checkBool($var); + $this->predicate_matched = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php new file mode 100644 index 000000000000..b2f46bdf290b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php @@ -0,0 +1,118 @@ +google.bigtable.v2.Column + */ +class Column extends \Google\Protobuf\Internal\Message +{ + /** + * The unique key which identifies this column within its family. This is the + * same key that's used to identify the column in, for example, a RowFilter + * which sets its `column_qualifier_regex_filter` field. + * May contain any byte string, including the empty string, up to 16kiB in + * length. + * + * Generated from protobuf field bytes qualifier = 1; + */ + protected $qualifier = ''; + /** + * Must not be empty. Sorted in order of decreasing "timestamp_micros". + * + * Generated from protobuf field repeated .google.bigtable.v2.Cell cells = 2; + */ + private $cells; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $qualifier + * The unique key which identifies this column within its family. This is the + * same key that's used to identify the column in, for example, a RowFilter + * which sets its `column_qualifier_regex_filter` field. + * May contain any byte string, including the empty string, up to 16kiB in + * length. + * @type array<\Google\Cloud\Bigtable\V2\Cell>|\Google\Protobuf\Internal\RepeatedField $cells + * Must not be empty. Sorted in order of decreasing "timestamp_micros". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The unique key which identifies this column within its family. This is the + * same key that's used to identify the column in, for example, a RowFilter + * which sets its `column_qualifier_regex_filter` field. + * May contain any byte string, including the empty string, up to 16kiB in + * length. + * + * Generated from protobuf field bytes qualifier = 1; + * @return string + */ + public function getQualifier() + { + return $this->qualifier; + } + + /** + * The unique key which identifies this column within its family. This is the + * same key that's used to identify the column in, for example, a RowFilter + * which sets its `column_qualifier_regex_filter` field. + * May contain any byte string, including the empty string, up to 16kiB in + * length. + * + * Generated from protobuf field bytes qualifier = 1; + * @param string $var + * @return $this + */ + public function setQualifier($var) + { + GPBUtil::checkString($var, False); + $this->qualifier = $var; + + return $this; + } + + /** + * Must not be empty. Sorted in order of decreasing "timestamp_micros". + * + * Generated from protobuf field repeated .google.bigtable.v2.Cell cells = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCells() + { + return $this->cells; + } + + /** + * Must not be empty. Sorted in order of decreasing "timestamp_micros". + * + * Generated from protobuf field repeated .google.bigtable.v2.Cell cells = 2; + * @param array<\Google\Cloud\Bigtable\V2\Cell>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCells($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Cell::class); + $this->cells = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnMetadata.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnMetadata.php new file mode 100644 index 000000000000..35f3c975b0f7 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnMetadata.php @@ -0,0 +1,111 @@ +google.bigtable.v2.ColumnMetadata + */ +class ColumnMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the column. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The type of the column. + * + * Generated from protobuf field .google.bigtable.v2.Type type = 2; + */ + protected $type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the column. + * @type \Google\Cloud\Bigtable\V2\Type $type + * The type of the column. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The name of the column. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the column. + * + * 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 type of the column. + * + * Generated from protobuf field .google.bigtable.v2.Type type = 2; + * @return \Google\Cloud\Bigtable\V2\Type|null + */ + public function getType() + { + return $this->type; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * The type of the column. + * + * Generated from protobuf field .google.bigtable.v2.Type type = 2; + * @param \Google\Cloud\Bigtable\V2\Type $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php new file mode 100644 index 000000000000..d5ff522b00d6 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php @@ -0,0 +1,220 @@ +google.bigtable.v2.ColumnRange + */ +class ColumnRange extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the column family within which this range falls. + * + * Generated from protobuf field string family_name = 1; + */ + protected $family_name = ''; + protected $start_qualifier; + protected $end_qualifier; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_name + * The name of the column family within which this range falls. + * @type string $start_qualifier_closed + * Used when giving an inclusive lower bound for the range. + * @type string $start_qualifier_open + * Used when giving an exclusive lower bound for the range. + * @type string $end_qualifier_closed + * Used when giving an inclusive upper bound for the range. + * @type string $end_qualifier_open + * Used when giving an exclusive upper bound for the range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The name of the column family within which this range falls. + * + * Generated from protobuf field string family_name = 1; + * @return string + */ + public function getFamilyName() + { + return $this->family_name; + } + + /** + * The name of the column family within which this range falls. + * + * Generated from protobuf field string family_name = 1; + * @param string $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkString($var, True); + $this->family_name = $var; + + return $this; + } + + /** + * Used when giving an inclusive lower bound for the range. + * + * Generated from protobuf field bytes start_qualifier_closed = 2; + * @return string + */ + public function getStartQualifierClosed() + { + return $this->readOneof(2); + } + + public function hasStartQualifierClosed() + { + return $this->hasOneof(2); + } + + /** + * Used when giving an inclusive lower bound for the range. + * + * Generated from protobuf field bytes start_qualifier_closed = 2; + * @param string $var + * @return $this + */ + public function setStartQualifierClosed($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Used when giving an exclusive lower bound for the range. + * + * Generated from protobuf field bytes start_qualifier_open = 3; + * @return string + */ + public function getStartQualifierOpen() + { + return $this->readOneof(3); + } + + public function hasStartQualifierOpen() + { + return $this->hasOneof(3); + } + + /** + * Used when giving an exclusive lower bound for the range. + * + * Generated from protobuf field bytes start_qualifier_open = 3; + * @param string $var + * @return $this + */ + public function setStartQualifierOpen($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Used when giving an inclusive upper bound for the range. + * + * Generated from protobuf field bytes end_qualifier_closed = 4; + * @return string + */ + public function getEndQualifierClosed() + { + return $this->readOneof(4); + } + + public function hasEndQualifierClosed() + { + return $this->hasOneof(4); + } + + /** + * Used when giving an inclusive upper bound for the range. + * + * Generated from protobuf field bytes end_qualifier_closed = 4; + * @param string $var + * @return $this + */ + public function setEndQualifierClosed($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Used when giving an exclusive upper bound for the range. + * + * Generated from protobuf field bytes end_qualifier_open = 5; + * @return string + */ + public function getEndQualifierOpen() + { + return $this->readOneof(5); + } + + public function hasEndQualifierOpen() + { + return $this->hasOneof(5); + } + + /** + * Used when giving an exclusive upper bound for the range. + * + * Generated from protobuf field bytes end_qualifier_open = 5; + * @param string $var + * @return $this + */ + public function setEndQualifierOpen($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getStartQualifier() + { + return $this->whichOneof("start_qualifier"); + } + + /** + * @return string + */ + public function getEndQualifier() + { + return $this->whichOneof("end_qualifier"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryRequest.php new file mode 100644 index 000000000000..e51a31680124 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryRequest.php @@ -0,0 +1,383 @@ +google.bigtable.v2.ExecuteQueryRequest + */ +class ExecuteQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + * + * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $instance_name = ''; + /** + * Optional. This value specifies routing for replication. If not specified, + * the `default` application profile will be used. + * + * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $app_profile_id = ''; + /** + * Required. The query string. + * + * Generated from protobuf field string query = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Optional. If this request is resuming a previously interrupted query + * execution, `resume_token` should be copied from the last + * PartialResultSet yielded before the interruption. Doing this + * enables the query execution to resume where the last one left + * off. + * The rest of the request parameters must exactly match the + * request that yielded this token. Otherwise the request will fail. + * + * Generated from protobuf field bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resume_token = ''; + /** + * Required. params contains string type keys and Bigtable type values that + * bind to placeholders in the query string. In query string, a parameter + * placeholder consists of the + * `@` character followed by the parameter name (for example, `@firstName`) in + * the query string. + * For example, if + * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * In case of Value.kind is not set, it will be set to corresponding null + * value in googlesql. + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. + * Value.type should always be set and no inference of type will be made from + * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT + * error. + * + * Generated from protobuf field map params = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + private $params; + protected $data_format; + + /** + * @param string $instanceName Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + * Please see {@see BigtableClient::instanceName()} for help formatting this field. + * @param string $query Required. The query string. + * + * @return \Google\Cloud\Bigtable\V2\ExecuteQueryRequest + * + * @experimental + */ + public static function build(string $instanceName, string $query): self + { + return (new self()) + ->setInstanceName($instanceName) + ->setQuery($query); + } + + /** + * @param string $instanceName Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + * Please see {@see BigtableClient::instanceName()} for help formatting this field. + * @param string $query Required. The query string. + * @param string $appProfileId Optional. This value specifies routing for replication. If not specified, + * the `default` application profile will be used. + * + * @return \Google\Cloud\Bigtable\V2\ExecuteQueryRequest + * + * @experimental + */ + public static function buildFromInstanceNameQueryAppProfileId(string $instanceName, string $query, string $appProfileId): self + { + return (new self()) + ->setInstanceName($instanceName) + ->setQuery($query) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_name + * Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + * @type string $app_profile_id + * Optional. This value specifies routing for replication. If not specified, + * the `default` application profile will be used. + * @type string $query + * Required. The query string. + * @type \Google\Cloud\Bigtable\V2\ProtoFormat $proto_format + * Protocol buffer format as described by ProtoSchema and ProtoRows + * messages. + * @type string $resume_token + * Optional. If this request is resuming a previously interrupted query + * execution, `resume_token` should be copied from the last + * PartialResultSet yielded before the interruption. Doing this + * enables the query execution to resume where the last one left + * off. + * The rest of the request parameters must exactly match the + * request that yielded this token. Otherwise the request will fail. + * @type array|\Google\Protobuf\Internal\MapField $params + * Required. params contains string type keys and Bigtable type values that + * bind to placeholders in the query string. In query string, a parameter + * placeholder consists of the + * `@` character followed by the parameter name (for example, `@firstName`) in + * the query string. + * For example, if + * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * In case of Value.kind is not set, it will be set to corresponding null + * value in googlesql. + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. + * Value.type should always be set and no inference of type will be made from + * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT + * error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + * + * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getInstanceName() + { + return $this->instance_name; + } + + /** + * Required. The unique name of the instance against which the query should be + * executed. + * Values are of the form `projects//instances/` + * + * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->instance_name = $var; + + return $this; + } + + /** + * Optional. This value specifies routing for replication. If not specified, + * the `default` application profile will be used. + * + * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * Optional. This value specifies routing for replication. If not specified, + * the `default` application profile will be used. + * + * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + + /** + * Required. The query string. + * + * Generated from protobuf field string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. The query string. + * + * Generated from protobuf field string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Protocol buffer format as described by ProtoSchema and ProtoRows + * messages. + * + * Generated from protobuf field .google.bigtable.v2.ProtoFormat proto_format = 4; + * @return \Google\Cloud\Bigtable\V2\ProtoFormat|null + */ + public function getProtoFormat() + { + return $this->readOneof(4); + } + + public function hasProtoFormat() + { + return $this->hasOneof(4); + } + + /** + * Protocol buffer format as described by ProtoSchema and ProtoRows + * messages. + * + * Generated from protobuf field .google.bigtable.v2.ProtoFormat proto_format = 4; + * @param \Google\Cloud\Bigtable\V2\ProtoFormat $var + * @return $this + */ + public function setProtoFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ProtoFormat::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. If this request is resuming a previously interrupted query + * execution, `resume_token` should be copied from the last + * PartialResultSet yielded before the interruption. Doing this + * enables the query execution to resume where the last one left + * off. + * The rest of the request parameters must exactly match the + * request that yielded this token. Otherwise the request will fail. + * + * Generated from protobuf field bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getResumeToken() + { + return $this->resume_token; + } + + /** + * Optional. If this request is resuming a previously interrupted query + * execution, `resume_token` should be copied from the last + * PartialResultSet yielded before the interruption. Doing this + * enables the query execution to resume where the last one left + * off. + * The rest of the request parameters must exactly match the + * request that yielded this token. Otherwise the request will fail. + * + * Generated from protobuf field bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setResumeToken($var) + { + GPBUtil::checkString($var, False); + $this->resume_token = $var; + + return $this; + } + + /** + * Required. params contains string type keys and Bigtable type values that + * bind to placeholders in the query string. In query string, a parameter + * placeholder consists of the + * `@` character followed by the parameter name (for example, `@firstName`) in + * the query string. + * For example, if + * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * In case of Value.kind is not set, it will be set to corresponding null + * value in googlesql. + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. + * Value.type should always be set and no inference of type will be made from + * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT + * error. + * + * Generated from protobuf field map params = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParams() + { + return $this->params; + } + + /** + * Required. params contains string type keys and Bigtable type values that + * bind to placeholders in the query string. In query string, a parameter + * placeholder consists of the + * `@` character followed by the parameter name (for example, `@firstName`) in + * the query string. + * For example, if + * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * In case of Value.kind is not set, it will be set to corresponding null + * value in googlesql. + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. + * Value.type should always be set and no inference of type will be made from + * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT + * error. + * + * Generated from protobuf field map params = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParams($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Value::class); + $this->params = $arr; + + return $this; + } + + /** + * @return string + */ + public function getDataFormat() + { + return $this->whichOneof("data_format"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryResponse.php new file mode 100644 index 000000000000..d007d3387015 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryResponse.php @@ -0,0 +1,117 @@ +google.bigtable.v2.ExecuteQueryResponse + */ +class ExecuteQueryResponse extends \Google\Protobuf\Internal\Message +{ + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\ResultSetMetadata $metadata + * Structure of rows in this response stream. The first (and only the first) + * response streamed from the server will be of this type. + * @type \Google\Cloud\Bigtable\V2\PartialResultSet $results + * A partial result set with row data potentially including additional + * instructions on how recent past and future partial responses should be + * interpreted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Structure of rows in this response stream. The first (and only the first) + * response streamed from the server will be of this type. + * + * Generated from protobuf field .google.bigtable.v2.ResultSetMetadata metadata = 1; + * @return \Google\Cloud\Bigtable\V2\ResultSetMetadata|null + */ + public function getMetadata() + { + return $this->readOneof(1); + } + + public function hasMetadata() + { + return $this->hasOneof(1); + } + + /** + * Structure of rows in this response stream. The first (and only the first) + * response streamed from the server will be of this type. + * + * Generated from protobuf field .google.bigtable.v2.ResultSetMetadata metadata = 1; + * @param \Google\Cloud\Bigtable\V2\ResultSetMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ResultSetMetadata::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A partial result set with row data potentially including additional + * instructions on how recent past and future partial responses should be + * interpreted. + * + * Generated from protobuf field .google.bigtable.v2.PartialResultSet results = 2; + * @return \Google\Cloud\Bigtable\V2\PartialResultSet|null + */ + public function getResults() + { + return $this->readOneof(2); + } + + public function hasResults() + { + return $this->hasOneof(2); + } + + /** + * A partial result set with row data potentially including additional + * instructions on how recent past and future partial responses should be + * interpreted. + * + * Generated from protobuf field .google.bigtable.v2.PartialResultSet results = 2; + * @param \Google\Cloud\Bigtable\V2\PartialResultSet $var + * @return $this + */ + public function setResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\PartialResultSet::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php new file mode 100644 index 000000000000..429023c4587d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php @@ -0,0 +1,122 @@ +google.bigtable.v2.Family + */ +class Family extends \Google\Protobuf\Internal\Message +{ + /** + * The unique key which identifies this family within its row. This is the + * same key that's used to identify the family in, for example, a RowFilter + * which sets its "family_name_regex_filter" field. + * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may + * produce cells in a sentinel family with an empty name. + * Must be no greater than 64 characters in length. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Must not be empty. Sorted in order of increasing "qualifier". + * + * Generated from protobuf field repeated .google.bigtable.v2.Column columns = 2; + */ + private $columns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique key which identifies this family within its row. This is the + * same key that's used to identify the family in, for example, a RowFilter + * which sets its "family_name_regex_filter" field. + * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may + * produce cells in a sentinel family with an empty name. + * Must be no greater than 64 characters in length. + * @type array<\Google\Cloud\Bigtable\V2\Column>|\Google\Protobuf\Internal\RepeatedField $columns + * Must not be empty. Sorted in order of increasing "qualifier". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The unique key which identifies this family within its row. This is the + * same key that's used to identify the family in, for example, a RowFilter + * which sets its "family_name_regex_filter" field. + * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may + * produce cells in a sentinel family with an empty name. + * Must be no greater than 64 characters in length. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique key which identifies this family within its row. This is the + * same key that's used to identify the family in, for example, a RowFilter + * which sets its "family_name_regex_filter" field. + * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may + * produce cells in a sentinel family with an empty name. + * Must be no greater than 64 characters in length. + * + * 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; + } + + /** + * Must not be empty. Sorted in order of increasing "qualifier". + * + * Generated from protobuf field repeated .google.bigtable.v2.Column columns = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumns() + { + return $this->columns; + } + + /** + * Must not be empty. Sorted in order of increasing "qualifier". + * + * Generated from protobuf field repeated .google.bigtable.v2.Column columns = 2; + * @param array<\Google\Cloud\Bigtable\V2\Column>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Column::class); + $this->columns = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php new file mode 100644 index 000000000000..51c17b64d53f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php @@ -0,0 +1,378 @@ +google.bigtable.v2.FeatureFlags + */ +class FeatureFlags extends \Google\Protobuf\Internal\Message +{ + /** + * Notify the server that the client supports reverse scans. The server will + * reject ReadRowsRequests with the reverse bit set when this is absent. + * + * Generated from protobuf field bool reverse_scans = 1; + */ + protected $reverse_scans = false; + /** + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, + * this disables partial retries. + * + * Generated from protobuf field bool mutate_rows_rate_limit = 3; + */ + protected $mutate_rows_rate_limit = false; + /** + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. With partial retries + * enabled. + * + * Generated from protobuf field bool mutate_rows_rate_limit2 = 5; + */ + protected $mutate_rows_rate_limit2 = false; + /** + * Notify the server that the client supports the last_scanned_row field + * in ReadRowsResponse for long-running scans. + * + * Generated from protobuf field bool last_scanned_row_responses = 4; + */ + protected $last_scanned_row_responses = false; + /** + * Notify the server that the client supports using encoded routing cookie + * strings to retry requests with. + * + * Generated from protobuf field bool routing_cookie = 6; + */ + protected $routing_cookie = false; + /** + * Notify the server that the client supports using retry info back off + * durations to retry requests with. + * + * Generated from protobuf field bool retry_info = 7; + */ + protected $retry_info = false; + /** + * Notify the server that the client has client side metrics enabled. + * + * Generated from protobuf field bool client_side_metrics_enabled = 8; + */ + protected $client_side_metrics_enabled = false; + /** + * Notify the server that the client using Traffic Director endpoint. + * + * Generated from protobuf field bool traffic_director_enabled = 9; + */ + protected $traffic_director_enabled = false; + /** + * Notify the server that the client explicitly opted in for Direct Access. + * + * Generated from protobuf field bool direct_access_requested = 10; + */ + protected $direct_access_requested = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $reverse_scans + * Notify the server that the client supports reverse scans. The server will + * reject ReadRowsRequests with the reverse bit set when this is absent. + * @type bool $mutate_rows_rate_limit + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, + * this disables partial retries. + * @type bool $mutate_rows_rate_limit2 + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. With partial retries + * enabled. + * @type bool $last_scanned_row_responses + * Notify the server that the client supports the last_scanned_row field + * in ReadRowsResponse for long-running scans. + * @type bool $routing_cookie + * Notify the server that the client supports using encoded routing cookie + * strings to retry requests with. + * @type bool $retry_info + * Notify the server that the client supports using retry info back off + * durations to retry requests with. + * @type bool $client_side_metrics_enabled + * Notify the server that the client has client side metrics enabled. + * @type bool $traffic_director_enabled + * Notify the server that the client using Traffic Director endpoint. + * @type bool $direct_access_requested + * Notify the server that the client explicitly opted in for Direct Access. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\FeatureFlags::initOnce(); + parent::__construct($data); + } + + /** + * Notify the server that the client supports reverse scans. The server will + * reject ReadRowsRequests with the reverse bit set when this is absent. + * + * Generated from protobuf field bool reverse_scans = 1; + * @return bool + */ + public function getReverseScans() + { + return $this->reverse_scans; + } + + /** + * Notify the server that the client supports reverse scans. The server will + * reject ReadRowsRequests with the reverse bit set when this is absent. + * + * Generated from protobuf field bool reverse_scans = 1; + * @param bool $var + * @return $this + */ + public function setReverseScans($var) + { + GPBUtil::checkBool($var); + $this->reverse_scans = $var; + + return $this; + } + + /** + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, + * this disables partial retries. + * + * Generated from protobuf field bool mutate_rows_rate_limit = 3; + * @return bool + */ + public function getMutateRowsRateLimit() + { + return $this->mutate_rows_rate_limit; + } + + /** + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, + * this disables partial retries. + * + * Generated from protobuf field bool mutate_rows_rate_limit = 3; + * @param bool $var + * @return $this + */ + public function setMutateRowsRateLimit($var) + { + GPBUtil::checkBool($var); + $this->mutate_rows_rate_limit = $var; + + return $this; + } + + /** + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. With partial retries + * enabled. + * + * Generated from protobuf field bool mutate_rows_rate_limit2 = 5; + * @return bool + */ + public function getMutateRowsRateLimit2() + { + return $this->mutate_rows_rate_limit2; + } + + /** + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. With partial retries + * enabled. + * + * Generated from protobuf field bool mutate_rows_rate_limit2 = 5; + * @param bool $var + * @return $this + */ + public function setMutateRowsRateLimit2($var) + { + GPBUtil::checkBool($var); + $this->mutate_rows_rate_limit2 = $var; + + return $this; + } + + /** + * Notify the server that the client supports the last_scanned_row field + * in ReadRowsResponse for long-running scans. + * + * Generated from protobuf field bool last_scanned_row_responses = 4; + * @return bool + */ + public function getLastScannedRowResponses() + { + return $this->last_scanned_row_responses; + } + + /** + * Notify the server that the client supports the last_scanned_row field + * in ReadRowsResponse for long-running scans. + * + * Generated from protobuf field bool last_scanned_row_responses = 4; + * @param bool $var + * @return $this + */ + public function setLastScannedRowResponses($var) + { + GPBUtil::checkBool($var); + $this->last_scanned_row_responses = $var; + + return $this; + } + + /** + * Notify the server that the client supports using encoded routing cookie + * strings to retry requests with. + * + * Generated from protobuf field bool routing_cookie = 6; + * @return bool + */ + public function getRoutingCookie() + { + return $this->routing_cookie; + } + + /** + * Notify the server that the client supports using encoded routing cookie + * strings to retry requests with. + * + * Generated from protobuf field bool routing_cookie = 6; + * @param bool $var + * @return $this + */ + public function setRoutingCookie($var) + { + GPBUtil::checkBool($var); + $this->routing_cookie = $var; + + return $this; + } + + /** + * Notify the server that the client supports using retry info back off + * durations to retry requests with. + * + * Generated from protobuf field bool retry_info = 7; + * @return bool + */ + public function getRetryInfo() + { + return $this->retry_info; + } + + /** + * Notify the server that the client supports using retry info back off + * durations to retry requests with. + * + * Generated from protobuf field bool retry_info = 7; + * @param bool $var + * @return $this + */ + public function setRetryInfo($var) + { + GPBUtil::checkBool($var); + $this->retry_info = $var; + + return $this; + } + + /** + * Notify the server that the client has client side metrics enabled. + * + * Generated from protobuf field bool client_side_metrics_enabled = 8; + * @return bool + */ + public function getClientSideMetricsEnabled() + { + return $this->client_side_metrics_enabled; + } + + /** + * Notify the server that the client has client side metrics enabled. + * + * Generated from protobuf field bool client_side_metrics_enabled = 8; + * @param bool $var + * @return $this + */ + public function setClientSideMetricsEnabled($var) + { + GPBUtil::checkBool($var); + $this->client_side_metrics_enabled = $var; + + return $this; + } + + /** + * Notify the server that the client using Traffic Director endpoint. + * + * Generated from protobuf field bool traffic_director_enabled = 9; + * @return bool + */ + public function getTrafficDirectorEnabled() + { + return $this->traffic_director_enabled; + } + + /** + * Notify the server that the client using Traffic Director endpoint. + * + * Generated from protobuf field bool traffic_director_enabled = 9; + * @param bool $var + * @return $this + */ + public function setTrafficDirectorEnabled($var) + { + GPBUtil::checkBool($var); + $this->traffic_director_enabled = $var; + + return $this; + } + + /** + * Notify the server that the client explicitly opted in for Direct Access. + * + * Generated from protobuf field bool direct_access_requested = 10; + * @return bool + */ + public function getDirectAccessRequested() + { + return $this->direct_access_requested; + } + + /** + * Notify the server that the client explicitly opted in for Direct Access. + * + * Generated from protobuf field bool direct_access_requested = 10; + * @param bool $var + * @return $this + */ + public function setDirectAccessRequested($var) + { + GPBUtil::checkBool($var); + $this->direct_access_requested = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php new file mode 100644 index 000000000000..3376ecb5017e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php @@ -0,0 +1,137 @@ +google.bigtable.v2.FullReadStatsView + */ +class FullReadStatsView extends \Google\Protobuf\Internal\Message +{ + /** + * Iteration stats describe how efficient the read is, e.g. comparing + * rows seen vs. rows returned or cells seen vs cells returned can provide an + * indication of read efficiency (the higher the ratio of seen to retuned the + * better). + * + * Generated from protobuf field .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + protected $read_iteration_stats = null; + /** + * Request latency stats describe the time taken to complete a request, from + * the server side. + * + * Generated from protobuf field .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + protected $request_latency_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\ReadIterationStats $read_iteration_stats + * Iteration stats describe how efficient the read is, e.g. comparing + * rows seen vs. rows returned or cells seen vs cells returned can provide an + * indication of read efficiency (the higher the ratio of seen to retuned the + * better). + * @type \Google\Cloud\Bigtable\V2\RequestLatencyStats $request_latency_stats + * Request latency stats describe the time taken to complete a request, from + * the server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); + parent::__construct($data); + } + + /** + * Iteration stats describe how efficient the read is, e.g. comparing + * rows seen vs. rows returned or cells seen vs cells returned can provide an + * indication of read efficiency (the higher the ratio of seen to retuned the + * better). + * + * Generated from protobuf field .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + * @return \Google\Cloud\Bigtable\V2\ReadIterationStats|null + */ + public function getReadIterationStats() + { + return $this->read_iteration_stats; + } + + public function hasReadIterationStats() + { + return isset($this->read_iteration_stats); + } + + public function clearReadIterationStats() + { + unset($this->read_iteration_stats); + } + + /** + * Iteration stats describe how efficient the read is, e.g. comparing + * rows seen vs. rows returned or cells seen vs cells returned can provide an + * indication of read efficiency (the higher the ratio of seen to retuned the + * better). + * + * Generated from protobuf field .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + * @param \Google\Cloud\Bigtable\V2\ReadIterationStats $var + * @return $this + */ + public function setReadIterationStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadIterationStats::class); + $this->read_iteration_stats = $var; + + return $this; + } + + /** + * Request latency stats describe the time taken to complete a request, from + * the server side. + * + * Generated from protobuf field .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + * @return \Google\Cloud\Bigtable\V2\RequestLatencyStats|null + */ + public function getRequestLatencyStats() + { + return $this->request_latency_stats; + } + + public function hasRequestLatencyStats() + { + return isset($this->request_latency_stats); + } + + public function clearRequestLatencyStats() + { + unset($this->request_latency_stats); + } + + /** + * Request latency stats describe the time taken to complete a request, from + * the server side. + * + * Generated from protobuf field .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + * @param \Google\Cloud\Bigtable\V2\RequestLatencyStats $var + * @return $this + */ + public function setRequestLatencyStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RequestLatencyStats::class); + $this->request_latency_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php new file mode 100644 index 000000000000..67233adb93bf --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php @@ -0,0 +1,160 @@ +google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + */ +class GenerateInitialChangeStreamPartitionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the table from which to get change stream + * partitions. Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $table_name = ''; + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * + * Generated from protobuf field string app_profile_id = 2; + */ + protected $app_profile_id = ''; + + /** + * @param string $tableName Required. The unique name of the table from which to get change stream + * partitions. Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\V2\GenerateInitialChangeStreamPartitionsRequest + * + * @experimental + */ + public static function build(string $tableName): self + { + return (new self()) + ->setTableName($tableName); + } + + /** + * @param string $tableName Required. The unique name of the table from which to get change stream + * partitions. Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $appProfileId This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * + * @return \Google\Cloud\Bigtable\V2\GenerateInitialChangeStreamPartitionsRequest + * + * @experimental + */ + public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self + { + return (new self()) + ->setTableName($tableName) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table_name + * Required. The unique name of the table from which to get change stream + * partitions. Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + * @type string $app_profile_id + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the table from which to get change stream + * partitions. Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTableName() + { + return $this->table_name; + } + + /** + * Required. The unique name of the table from which to get change stream + * partitions. Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTableName($var) + { + GPBUtil::checkString($var, True); + $this->table_name = $var; + + return $this; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * + * Generated from protobuf field string app_profile_id = 2; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * + * Generated from protobuf field string app_profile_id = 2; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php new file mode 100644 index 000000000000..26f241b3bd8c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php @@ -0,0 +1,78 @@ +google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + */ +class GenerateInitialChangeStreamPartitionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A partition of the change stream. + * + * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; + */ + protected $partition = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\StreamPartition $partition + * A partition of the change stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * A partition of the change stream. + * + * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; + * @return \Google\Cloud\Bigtable\V2\StreamPartition|null + */ + public function getPartition() + { + return $this->partition; + } + + public function hasPartition() + { + return isset($this->partition); + } + + public function clearPartition() + { + unset($this->partition); + } + + /** + * A partition of the change stream. + * + * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; + * @param \Google\Cloud\Bigtable\V2\StreamPartition $var + * @return $this + */ + public function setPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamPartition::class); + $this->partition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php new file mode 100644 index 000000000000..50e64e6e0217 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php @@ -0,0 +1,290 @@ +google.bigtable.v2.MutateRowRequest + */ +class MutateRowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $authorized_view_name = ''; + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 4; + */ + protected $app_profile_id = ''; + /** + * Required. The key of the row to which the mutation should be applied. + * + * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $row_key = ''; + /** + * Required. Changes to be atomically applied to the specified row. Entries + * are applied in order, meaning that earlier mutations can be masked by later + * ones. Must contain at least one entry and at most 100000. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $mutations; + + /** + * @param string $tableName Optional. The unique name of the table to which the mutation should be + * applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $rowKey Required. The key of the row to which the mutation should be applied. + * @param \Google\Cloud\Bigtable\V2\Mutation[] $mutations Required. Changes to be atomically applied to the specified row. Entries + * are applied in order, meaning that earlier mutations can be masked by later + * ones. Must contain at least one entry and at most 100000. + * + * @return \Google\Cloud\Bigtable\V2\MutateRowRequest + * + * @experimental + */ + public static function build(string $tableName, string $rowKey, array $mutations): self + { + return (new self()) + ->setTableName($tableName) + ->setRowKey($rowKey) + ->setMutations($mutations); + } + + /** + * @param string $tableName Optional. The unique name of the table to which the mutation should be + * applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $rowKey Required. The key of the row to which the mutation should be applied. + * @param \Google\Cloud\Bigtable\V2\Mutation[] $mutations Required. Changes to be atomically applied to the specified row. Entries + * are applied in order, meaning that earlier mutations can be masked by later + * ones. Must contain at least one entry and at most 100000. + * @param string $appProfileId This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * @return \Google\Cloud\Bigtable\V2\MutateRowRequest + * + * @experimental + */ + public static function buildFromTableNameRowKeyMutationsAppProfileId(string $tableName, string $rowKey, array $mutations, string $appProfileId): self + { + return (new self()) + ->setTableName($tableName) + ->setRowKey($rowKey) + ->setMutations($mutations) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table_name + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @type string $app_profile_id + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @type string $row_key + * Required. The key of the row to which the mutation should be applied. + * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $mutations + * Required. Changes to be atomically applied to the specified row. Entries + * are applied in order, meaning that earlier mutations can be masked by later + * ones. Must contain at least one entry and at most 100000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTableName() + { + return $this->table_name; + } + + /** + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTableName($var) + { + GPBUtil::checkString($var, True); + $this->table_name = $var; + + return $this; + } + + /** + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 4; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 4; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + + /** + * Required. The key of the row to which the mutation should be applied. + * + * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRowKey() + { + return $this->row_key; + } + + /** + * Required. The key of the row to which the mutation should be applied. + * + * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRowKey($var) + { + GPBUtil::checkString($var, False); + $this->row_key = $var; + + return $this; + } + + /** + * Required. Changes to be atomically applied to the specified row. Entries + * are applied in order, meaning that earlier mutations can be masked by later + * ones. Must contain at least one entry and at most 100000. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMutations() + { + return $this->mutations; + } + + /** + * Required. Changes to be atomically applied to the specified row. Entries + * are applied in order, meaning that earlier mutations can be masked by later + * ones. Must contain at least one entry and at most 100000. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMutations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); + $this->mutations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php new file mode 100644 index 000000000000..2a2cc243d6aa --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php @@ -0,0 +1,33 @@ +google.bigtable.v2.MutateRowResponse + */ +class MutateRowResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php new file mode 100644 index 000000000000..64ce09021ece --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php @@ -0,0 +1,264 @@ +google.bigtable.v2.MutateRowsRequest + */ +class MutateRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique name of the table to which the mutations should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $authorized_view_name = ''; + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 3; + */ + protected $app_profile_id = ''; + /** + * Required. The row keys and corresponding mutations to be applied in bulk. + * Each entry is applied as an atomic mutation, but the entries may be + * applied in arbitrary order (even between entries for the same row). + * At least one entry must be specified, and in total the entries can + * contain at most 100000 mutations. + * + * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entries; + + /** + * @param string $tableName Optional. The unique name of the table to which the mutations should be + * applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. + * Each entry is applied as an atomic mutation, but the entries may be + * applied in arbitrary order (even between entries for the same row). + * At least one entry must be specified, and in total the entries can + * contain at most 100000 mutations. + * + * @return \Google\Cloud\Bigtable\V2\MutateRowsRequest + * + * @experimental + */ + public static function build(string $tableName, array $entries): self + { + return (new self()) + ->setTableName($tableName) + ->setEntries($entries); + } + + /** + * @param string $tableName Optional. The unique name of the table to which the mutations should be + * applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. + * Each entry is applied as an atomic mutation, but the entries may be + * applied in arbitrary order (even between entries for the same row). + * At least one entry must be specified, and in total the entries can + * contain at most 100000 mutations. + * @param string $appProfileId This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * @return \Google\Cloud\Bigtable\V2\MutateRowsRequest + * + * @experimental + */ + public static function buildFromTableNameEntriesAppProfileId(string $tableName, array $entries, string $appProfileId): self + { + return (new self()) + ->setTableName($tableName) + ->setEntries($entries) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table_name + * Optional. The unique name of the table to which the mutations should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @type string $app_profile_id + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @type array<\Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry>|\Google\Protobuf\Internal\RepeatedField $entries + * Required. The row keys and corresponding mutations to be applied in bulk. + * Each entry is applied as an atomic mutation, but the entries may be + * applied in arbitrary order (even between entries for the same row). + * At least one entry must be specified, and in total the entries can + * contain at most 100000 mutations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique name of the table to which the mutations should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTableName() + { + return $this->table_name; + } + + /** + * Optional. The unique name of the table to which the mutations should be + * applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTableName($var) + { + GPBUtil::checkString($var, True); + $this->table_name = $var; + + return $this; + } + + /** + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 3; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 3; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + + /** + * Required. The row keys and corresponding mutations to be applied in bulk. + * Each entry is applied as an atomic mutation, but the entries may be + * applied in arbitrary order (even between entries for the same row). + * At least one entry must be specified, and in total the entries can + * contain at most 100000 mutations. + * + * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Required. The row keys and corresponding mutations to be applied in bulk. + * Each entry is applied as an atomic mutation, but the entries may be + * applied in arbitrary order (even between entries for the same row). + * At least one entry must be specified, and in total the entries can + * contain at most 100000 mutations. + * + * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php new file mode 100644 index 000000000000..96659f4574ed --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php @@ -0,0 +1,112 @@ +google.bigtable.v2.MutateRowsRequest.Entry + */ +class Entry extends \Google\Protobuf\Internal\Message +{ + /** + * The key of the row to which the `mutations` should be applied. + * + * Generated from protobuf field bytes row_key = 1; + */ + protected $row_key = ''; + /** + * Required. Changes to be atomically applied to the specified row. + * Mutations are applied in order, meaning that earlier mutations can be + * masked by later ones. You must specify at least one mutation. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $mutations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $row_key + * The key of the row to which the `mutations` should be applied. + * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $mutations + * Required. Changes to be atomically applied to the specified row. + * Mutations are applied in order, meaning that earlier mutations can be + * masked by later ones. You must specify at least one mutation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * The key of the row to which the `mutations` should be applied. + * + * Generated from protobuf field bytes row_key = 1; + * @return string + */ + public function getRowKey() + { + return $this->row_key; + } + + /** + * The key of the row to which the `mutations` should be applied. + * + * Generated from protobuf field bytes row_key = 1; + * @param string $var + * @return $this + */ + public function setRowKey($var) + { + GPBUtil::checkString($var, False); + $this->row_key = $var; + + return $this; + } + + /** + * Required. Changes to be atomically applied to the specified row. + * Mutations are applied in order, meaning that earlier mutations can be + * masked by later ones. You must specify at least one mutation. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMutations() + { + return $this->mutations; + } + + /** + * Required. Changes to be atomically applied to the specified row. + * Mutations are applied in order, meaning that earlier mutations can be + * masked by later ones. You must specify at least one mutation. + * + * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMutations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); + $this->mutations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Entry::class, \Google\Cloud\Bigtable\V2\MutateRowsRequest_Entry::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php new file mode 100644 index 000000000000..9467b61e1b39 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php @@ -0,0 +1,119 @@ +google.bigtable.v2.MutateRowsResponse + */ +class MutateRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * One or more results for Entries from the batch request. + * + * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; + */ + private $entries; + /** + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + * + * Generated from protobuf field optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; + */ + protected $rate_limit_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\V2\MutateRowsResponse\Entry>|\Google\Protobuf\Internal\RepeatedField $entries + * One or more results for Entries from the batch request. + * @type \Google\Cloud\Bigtable\V2\RateLimitInfo $rate_limit_info + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * One or more results for Entries from the batch request. + * + * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * One or more results for Entries from the batch request. + * + * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; + * @param array<\Google\Cloud\Bigtable\V2\MutateRowsResponse\Entry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\MutateRowsResponse\Entry::class); + $this->entries = $arr; + + return $this; + } + + /** + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + * + * Generated from protobuf field optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; + * @return \Google\Cloud\Bigtable\V2\RateLimitInfo|null + */ + public function getRateLimitInfo() + { + return $this->rate_limit_info; + } + + public function hasRateLimitInfo() + { + return isset($this->rate_limit_info); + } + + public function clearRateLimitInfo() + { + unset($this->rate_limit_info); + } + + /** + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + * + * Generated from protobuf field optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; + * @param \Google\Cloud\Bigtable\V2\RateLimitInfo $var + * @return $this + */ + public function setRateLimitInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RateLimitInfo::class); + $this->rate_limit_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php new file mode 100644 index 000000000000..a6049b0d0792 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php @@ -0,0 +1,130 @@ +google.bigtable.v2.MutateRowsResponse.Entry + */ +class Entry extends \Google\Protobuf\Internal\Message +{ + /** + * The index into the original request's `entries` list of the Entry + * for which a result is being reported. + * + * Generated from protobuf field int64 index = 1; + */ + protected $index = 0; + /** + * The result of the request Entry identified by `index`. + * Depending on how requests are batched during execution, it is possible + * for one Entry to fail due to an error with another Entry. In the event + * that this occurs, the same error will be reported for both entries. + * + * Generated from protobuf field .google.rpc.Status status = 2; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $index + * The index into the original request's `entries` list of the Entry + * for which a result is being reported. + * @type \Google\Rpc\Status $status + * The result of the request Entry identified by `index`. + * Depending on how requests are batched during execution, it is possible + * for one Entry to fail due to an error with another Entry. In the event + * that this occurs, the same error will be reported for both entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * The index into the original request's `entries` list of the Entry + * for which a result is being reported. + * + * Generated from protobuf field int64 index = 1; + * @return int|string + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index into the original request's `entries` list of the Entry + * for which a result is being reported. + * + * Generated from protobuf field int64 index = 1; + * @param int|string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt64($var); + $this->index = $var; + + return $this; + } + + /** + * The result of the request Entry identified by `index`. + * Depending on how requests are batched during execution, it is possible + * for one Entry to fail due to an error with another Entry. In the event + * that this occurs, the same error will be reported for both entries. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The result of the request Entry identified by `index`. + * Depending on how requests are batched during execution, it is possible + * for one Entry to fail due to an error with another Entry. In the event + * that this occurs, the same error will be reported for both entries. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Entry::class, \Google\Cloud\Bigtable\V2\MutateRowsResponse_Entry::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php new file mode 100644 index 000000000000..24f7bf5f7d59 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php @@ -0,0 +1,240 @@ +google.bigtable.v2.Mutation + */ +class Mutation extends \Google\Protobuf\Internal\Message +{ + protected $mutation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Mutation\SetCell $set_cell + * Set a cell's value. + * @type \Google\Cloud\Bigtable\V2\Mutation\AddToCell $add_to_cell + * Incrementally updates an `Aggregate` cell. + * @type \Google\Cloud\Bigtable\V2\Mutation\MergeToCell $merge_to_cell + * Merges accumulated state to an `Aggregate` cell. + * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn $delete_from_column + * Deletes cells from a column. + * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily $delete_from_family + * Deletes cells from a column family. + * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow $delete_from_row + * Deletes cells from the entire row. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Set a cell's value. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.SetCell set_cell = 1; + * @return \Google\Cloud\Bigtable\V2\Mutation\SetCell|null + */ + public function getSetCell() + { + return $this->readOneof(1); + } + + public function hasSetCell() + { + return $this->hasOneof(1); + } + + /** + * Set a cell's value. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.SetCell set_cell = 1; + * @param \Google\Cloud\Bigtable\V2\Mutation\SetCell $var + * @return $this + */ + public function setSetCell($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\SetCell::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Incrementally updates an `Aggregate` cell. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.AddToCell add_to_cell = 5; + * @return \Google\Cloud\Bigtable\V2\Mutation\AddToCell|null + */ + public function getAddToCell() + { + return $this->readOneof(5); + } + + public function hasAddToCell() + { + return $this->hasOneof(5); + } + + /** + * Incrementally updates an `Aggregate` cell. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.AddToCell add_to_cell = 5; + * @param \Google\Cloud\Bigtable\V2\Mutation\AddToCell $var + * @return $this + */ + public function setAddToCell($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\AddToCell::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Merges accumulated state to an `Aggregate` cell. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + * @return \Google\Cloud\Bigtable\V2\Mutation\MergeToCell|null + */ + public function getMergeToCell() + { + return $this->readOneof(6); + } + + public function hasMergeToCell() + { + return $this->hasOneof(6); + } + + /** + * Merges accumulated state to an `Aggregate` cell. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + * @param \Google\Cloud\Bigtable\V2\Mutation\MergeToCell $var + * @return $this + */ + public function setMergeToCell($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\MergeToCell::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Deletes cells from a column. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromColumn delete_from_column = 2; + * @return \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn|null + */ + public function getDeleteFromColumn() + { + return $this->readOneof(2); + } + + public function hasDeleteFromColumn() + { + return $this->hasOneof(2); + } + + /** + * Deletes cells from a column. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromColumn delete_from_column = 2; + * @param \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn $var + * @return $this + */ + public function setDeleteFromColumn($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Deletes cells from a column family. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromFamily delete_from_family = 3; + * @return \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily|null + */ + public function getDeleteFromFamily() + { + return $this->readOneof(3); + } + + public function hasDeleteFromFamily() + { + return $this->hasOneof(3); + } + + /** + * Deletes cells from a column family. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromFamily delete_from_family = 3; + * @param \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily $var + * @return $this + */ + public function setDeleteFromFamily($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Deletes cells from the entire row. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromRow delete_from_row = 4; + * @return \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow|null + */ + public function getDeleteFromRow() + { + return $this->readOneof(4); + } + + public function hasDeleteFromRow() + { + return $this->hasOneof(4); + } + + /** + * Deletes cells from the entire row. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromRow delete_from_row = 4; + * @param \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow $var + * @return $this + */ + public function setDeleteFromRow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getMutation() + { + return $this->whichOneof("mutation"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/AddToCell.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/AddToCell.php new file mode 100644 index 000000000000..2ef613a1e015 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/AddToCell.php @@ -0,0 +1,222 @@ +google.bigtable.v2.Mutation.AddToCell + */ +class AddToCell extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + */ + protected $family_name = ''; + /** + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * + * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; + */ + protected $column_qualifier = null; + /** + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * + * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; + */ + protected $timestamp = null; + /** + * The input value to be accumulated into the specified cell. This must be + * compatible with the family's `value_type.input_type`. + * + * Generated from protobuf field .google.bigtable.v2.Value input = 4; + */ + protected $input = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_name + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * @type \Google\Cloud\Bigtable\V2\Value $column_qualifier + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * @type \Google\Cloud\Bigtable\V2\Value $timestamp + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * @type \Google\Cloud\Bigtable\V2\Value $input + * The input value to be accumulated into the specified cell. This must be + * compatible with the family's `value_type.input_type`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @return string + */ + public function getFamilyName() + { + return $this->family_name; + } + + /** + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @param string $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkString($var, True); + $this->family_name = $var; + + return $this; + } + + /** + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * + * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; + * @return \Google\Cloud\Bigtable\V2\Value|null + */ + public function getColumnQualifier() + { + return $this->column_qualifier; + } + + public function hasColumnQualifier() + { + return isset($this->column_qualifier); + } + + public function clearColumnQualifier() + { + unset($this->column_qualifier); + } + + /** + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * + * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; + * @param \Google\Cloud\Bigtable\V2\Value $var + * @return $this + */ + public function setColumnQualifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); + $this->column_qualifier = $var; + + return $this; + } + + /** + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * + * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; + * @return \Google\Cloud\Bigtable\V2\Value|null + */ + public function getTimestamp() + { + return $this->timestamp; + } + + public function hasTimestamp() + { + return isset($this->timestamp); + } + + public function clearTimestamp() + { + unset($this->timestamp); + } + + /** + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * + * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; + * @param \Google\Cloud\Bigtable\V2\Value $var + * @return $this + */ + public function setTimestamp($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); + $this->timestamp = $var; + + return $this; + } + + /** + * The input value to be accumulated into the specified cell. This must be + * compatible with the family's `value_type.input_type`. + * + * Generated from protobuf field .google.bigtable.v2.Value input = 4; + * @return \Google\Cloud\Bigtable\V2\Value|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * The input value to be accumulated into the specified cell. This must be + * compatible with the family's `value_type.input_type`. + * + * Generated from protobuf field .google.bigtable.v2.Value input = 4; + * @param \Google\Cloud\Bigtable\V2\Value $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); + $this->input = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AddToCell::class, \Google\Cloud\Bigtable\V2\Mutation_AddToCell::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php new file mode 100644 index 000000000000..a91638edfa4a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php @@ -0,0 +1,157 @@ +google.bigtable.v2.Mutation.DeleteFromColumn + */ +class DeleteFromColumn extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the family from which cells should be deleted. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + */ + protected $family_name = ''; + /** + * The qualifier of the column from which cells should be deleted. + * Can be any byte string, including the empty string. + * + * Generated from protobuf field bytes column_qualifier = 2; + */ + protected $column_qualifier = ''; + /** + * The range of timestamps within which cells should be deleted. + * + * Generated from protobuf field .google.bigtable.v2.TimestampRange time_range = 3; + */ + protected $time_range = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_name + * The name of the family from which cells should be deleted. + * Must match `[-_.a-zA-Z0-9]+` + * @type string $column_qualifier + * The qualifier of the column from which cells should be deleted. + * Can be any byte string, including the empty string. + * @type \Google\Cloud\Bigtable\V2\TimestampRange $time_range + * The range of timestamps within which cells should be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The name of the family from which cells should be deleted. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @return string + */ + public function getFamilyName() + { + return $this->family_name; + } + + /** + * The name of the family from which cells should be deleted. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @param string $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkString($var, True); + $this->family_name = $var; + + return $this; + } + + /** + * The qualifier of the column from which cells should be deleted. + * Can be any byte string, including the empty string. + * + * Generated from protobuf field bytes column_qualifier = 2; + * @return string + */ + public function getColumnQualifier() + { + return $this->column_qualifier; + } + + /** + * The qualifier of the column from which cells should be deleted. + * Can be any byte string, including the empty string. + * + * Generated from protobuf field bytes column_qualifier = 2; + * @param string $var + * @return $this + */ + public function setColumnQualifier($var) + { + GPBUtil::checkString($var, False); + $this->column_qualifier = $var; + + return $this; + } + + /** + * The range of timestamps within which cells should be deleted. + * + * Generated from protobuf field .google.bigtable.v2.TimestampRange time_range = 3; + * @return \Google\Cloud\Bigtable\V2\TimestampRange|null + */ + public function getTimeRange() + { + return $this->time_range; + } + + public function hasTimeRange() + { + return isset($this->time_range); + } + + public function clearTimeRange() + { + unset($this->time_range); + } + + /** + * The range of timestamps within which cells should be deleted. + * + * Generated from protobuf field .google.bigtable.v2.TimestampRange time_range = 3; + * @param \Google\Cloud\Bigtable\V2\TimestampRange $var + * @return $this + */ + public function setTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\TimestampRange::class); + $this->time_range = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeleteFromColumn::class, \Google\Cloud\Bigtable\V2\Mutation_DeleteFromColumn::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php new file mode 100644 index 000000000000..66cdb291bf3c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php @@ -0,0 +1,74 @@ +google.bigtable.v2.Mutation.DeleteFromFamily + */ +class DeleteFromFamily extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the family from which cells should be deleted. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + */ + protected $family_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_name + * The name of the family from which cells should be deleted. + * Must match `[-_.a-zA-Z0-9]+` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The name of the family from which cells should be deleted. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @return string + */ + public function getFamilyName() + { + return $this->family_name; + } + + /** + * The name of the family from which cells should be deleted. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @param string $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkString($var, True); + $this->family_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeleteFromFamily::class, \Google\Cloud\Bigtable\V2\Mutation_DeleteFromFamily::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php new file mode 100644 index 000000000000..9200902a1780 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php @@ -0,0 +1,36 @@ +google.bigtable.v2.Mutation.DeleteFromRow + */ +class DeleteFromRow extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeleteFromRow::class, \Google\Cloud\Bigtable\V2\Mutation_DeleteFromRow::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/MergeToCell.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/MergeToCell.php new file mode 100644 index 000000000000..391e80f1aeea --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/MergeToCell.php @@ -0,0 +1,227 @@ +google.bigtable.v2.Mutation.MergeToCell + */ +class MergeToCell extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + */ + protected $family_name = ''; + /** + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * + * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; + */ + protected $column_qualifier = null; + /** + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * + * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; + */ + protected $timestamp = null; + /** + * The input value to be merged into the specified cell. This must be + * compatible with the family's `value_type.state_type`. Merging `NULL` is + * allowed, but has no effect. + * + * Generated from protobuf field .google.bigtable.v2.Value input = 4; + */ + protected $input = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_name + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * @type \Google\Cloud\Bigtable\V2\Value $column_qualifier + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * @type \Google\Cloud\Bigtable\V2\Value $timestamp + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * @type \Google\Cloud\Bigtable\V2\Value $input + * The input value to be merged into the specified cell. This must be + * compatible with the family's `value_type.state_type`. Merging `NULL` is + * allowed, but has no effect. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @return string + */ + public function getFamilyName() + { + return $this->family_name; + } + + /** + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @param string $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkString($var, True); + $this->family_name = $var; + + return $this; + } + + /** + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * + * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; + * @return \Google\Cloud\Bigtable\V2\Value|null + */ + public function getColumnQualifier() + { + return $this->column_qualifier; + } + + public function hasColumnQualifier() + { + return isset($this->column_qualifier); + } + + public function clearColumnQualifier() + { + unset($this->column_qualifier); + } + + /** + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * + * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; + * @param \Google\Cloud\Bigtable\V2\Value $var + * @return $this + */ + public function setColumnQualifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); + $this->column_qualifier = $var; + + return $this; + } + + /** + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * + * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; + * @return \Google\Cloud\Bigtable\V2\Value|null + */ + public function getTimestamp() + { + return $this->timestamp; + } + + public function hasTimestamp() + { + return isset($this->timestamp); + } + + public function clearTimestamp() + { + unset($this->timestamp); + } + + /** + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * + * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; + * @param \Google\Cloud\Bigtable\V2\Value $var + * @return $this + */ + public function setTimestamp($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); + $this->timestamp = $var; + + return $this; + } + + /** + * The input value to be merged into the specified cell. This must be + * compatible with the family's `value_type.state_type`. Merging `NULL` is + * allowed, but has no effect. + * + * Generated from protobuf field .google.bigtable.v2.Value input = 4; + * @return \Google\Cloud\Bigtable\V2\Value|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * The input value to be merged into the specified cell. This must be + * compatible with the family's `value_type.state_type`. Merging `NULL` is + * allowed, but has no effect. + * + * Generated from protobuf field .google.bigtable.v2.Value input = 4; + * @param \Google\Cloud\Bigtable\V2\Value $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); + $this->input = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MergeToCell::class, \Google\Cloud\Bigtable\V2\Mutation_MergeToCell::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php new file mode 100644 index 000000000000..b156e5d5d564 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php @@ -0,0 +1,196 @@ +google.bigtable.v2.Mutation.SetCell + */ +class SetCell extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the family into which new data should be written. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + */ + protected $family_name = ''; + /** + * The qualifier of the column into which new data should be written. + * Can be any byte string, including the empty string. + * + * Generated from protobuf field bytes column_qualifier = 2; + */ + protected $column_qualifier = ''; + /** + * The timestamp of the cell into which new data should be written. + * Use -1 for current Bigtable server time. + * Otherwise, the client should set this value itself, noting that the + * default value is a timestamp of zero if the field is left unspecified. + * Values must match the granularity of the table (e.g. micros, millis). + * + * Generated from protobuf field int64 timestamp_micros = 3; + */ + protected $timestamp_micros = 0; + /** + * The value to be written into the specified cell. + * + * Generated from protobuf field bytes value = 4; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_name + * The name of the family into which new data should be written. + * Must match `[-_.a-zA-Z0-9]+` + * @type string $column_qualifier + * The qualifier of the column into which new data should be written. + * Can be any byte string, including the empty string. + * @type int|string $timestamp_micros + * The timestamp of the cell into which new data should be written. + * Use -1 for current Bigtable server time. + * Otherwise, the client should set this value itself, noting that the + * default value is a timestamp of zero if the field is left unspecified. + * Values must match the granularity of the table (e.g. micros, millis). + * @type string $value + * The value to be written into the specified cell. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The name of the family into which new data should be written. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @return string + */ + public function getFamilyName() + { + return $this->family_name; + } + + /** + * The name of the family into which new data should be written. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @param string $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkString($var, True); + $this->family_name = $var; + + return $this; + } + + /** + * The qualifier of the column into which new data should be written. + * Can be any byte string, including the empty string. + * + * Generated from protobuf field bytes column_qualifier = 2; + * @return string + */ + public function getColumnQualifier() + { + return $this->column_qualifier; + } + + /** + * The qualifier of the column into which new data should be written. + * Can be any byte string, including the empty string. + * + * Generated from protobuf field bytes column_qualifier = 2; + * @param string $var + * @return $this + */ + public function setColumnQualifier($var) + { + GPBUtil::checkString($var, False); + $this->column_qualifier = $var; + + return $this; + } + + /** + * The timestamp of the cell into which new data should be written. + * Use -1 for current Bigtable server time. + * Otherwise, the client should set this value itself, noting that the + * default value is a timestamp of zero if the field is left unspecified. + * Values must match the granularity of the table (e.g. micros, millis). + * + * Generated from protobuf field int64 timestamp_micros = 3; + * @return int|string + */ + public function getTimestampMicros() + { + return $this->timestamp_micros; + } + + /** + * The timestamp of the cell into which new data should be written. + * Use -1 for current Bigtable server time. + * Otherwise, the client should set this value itself, noting that the + * default value is a timestamp of zero if the field is left unspecified. + * Values must match the granularity of the table (e.g. micros, millis). + * + * Generated from protobuf field int64 timestamp_micros = 3; + * @param int|string $var + * @return $this + */ + public function setTimestampMicros($var) + { + GPBUtil::checkInt64($var); + $this->timestamp_micros = $var; + + return $this; + } + + /** + * The value to be written into the specified cell. + * + * Generated from protobuf field bytes value = 4; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value to be written into the specified cell. + * + * Generated from protobuf field bytes value = 4; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, False); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SetCell::class, \Google\Cloud\Bigtable\V2\Mutation_SetCell::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PartialResultSet.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PartialResultSet.php new file mode 100644 index 000000000000..321757c77992 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PartialResultSet.php @@ -0,0 +1,225 @@ +google.bigtable.v2.PartialResultSet + */ +class PartialResultSet extends \Google\Protobuf\Internal\Message +{ + /** + * An opaque token sent by the server to allow query resumption and signal + * the client to accumulate `partial_rows` since the last non-empty + * `resume_token`. On resumption, the resumed query will return the remaining + * rows for this query. + * If there is a batch in progress, a non-empty `resume_token` + * means that that the batch of `partial_rows` will be complete after merging + * the `partial_rows` from this response. The client must only yield + * completed batches to the application, and must ensure that any future + * retries send the latest token to avoid returning duplicate data. + * The server may set 'resume_token' without a 'partial_rows'. If there is a + * batch in progress the client should yield it. + * The server will also send a sentinel `resume_token` when last batch of + * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with + * the sentinel `resume_token`, the server will emit it again without any + * `partial_rows`, then return OK. + * + * Generated from protobuf field bytes resume_token = 5; + */ + protected $resume_token = ''; + /** + * Estimated size of a new batch. The server will always set this when + * returning the first `partial_rows` of a batch, and will not set it at any + * other time. + * The client can use this estimate to allocate an initial buffer for the + * batched results. This helps minimize the number of allocations required, + * though the buffer size may still need to be increased if the estimate is + * too low. + * + * Generated from protobuf field int32 estimated_batch_size = 4; + */ + protected $estimated_batch_size = 0; + protected $partial_rows; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\ProtoRowsBatch $proto_rows_batch + * Partial rows in serialized ProtoRows format. + * @type string $resume_token + * An opaque token sent by the server to allow query resumption and signal + * the client to accumulate `partial_rows` since the last non-empty + * `resume_token`. On resumption, the resumed query will return the remaining + * rows for this query. + * If there is a batch in progress, a non-empty `resume_token` + * means that that the batch of `partial_rows` will be complete after merging + * the `partial_rows` from this response. The client must only yield + * completed batches to the application, and must ensure that any future + * retries send the latest token to avoid returning duplicate data. + * The server may set 'resume_token' without a 'partial_rows'. If there is a + * batch in progress the client should yield it. + * The server will also send a sentinel `resume_token` when last batch of + * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with + * the sentinel `resume_token`, the server will emit it again without any + * `partial_rows`, then return OK. + * @type int $estimated_batch_size + * Estimated size of a new batch. The server will always set this when + * returning the first `partial_rows` of a batch, and will not set it at any + * other time. + * The client can use this estimate to allocate an initial buffer for the + * batched results. This helps minimize the number of allocations required, + * though the buffer size may still need to be increased if the estimate is + * too low. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Partial rows in serialized ProtoRows format. + * + * Generated from protobuf field .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + * @return \Google\Cloud\Bigtable\V2\ProtoRowsBatch|null + */ + public function getProtoRowsBatch() + { + return $this->readOneof(3); + } + + public function hasProtoRowsBatch() + { + return $this->hasOneof(3); + } + + /** + * Partial rows in serialized ProtoRows format. + * + * Generated from protobuf field .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + * @param \Google\Cloud\Bigtable\V2\ProtoRowsBatch $var + * @return $this + */ + public function setProtoRowsBatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ProtoRowsBatch::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * An opaque token sent by the server to allow query resumption and signal + * the client to accumulate `partial_rows` since the last non-empty + * `resume_token`. On resumption, the resumed query will return the remaining + * rows for this query. + * If there is a batch in progress, a non-empty `resume_token` + * means that that the batch of `partial_rows` will be complete after merging + * the `partial_rows` from this response. The client must only yield + * completed batches to the application, and must ensure that any future + * retries send the latest token to avoid returning duplicate data. + * The server may set 'resume_token' without a 'partial_rows'. If there is a + * batch in progress the client should yield it. + * The server will also send a sentinel `resume_token` when last batch of + * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with + * the sentinel `resume_token`, the server will emit it again without any + * `partial_rows`, then return OK. + * + * Generated from protobuf field bytes resume_token = 5; + * @return string + */ + public function getResumeToken() + { + return $this->resume_token; + } + + /** + * An opaque token sent by the server to allow query resumption and signal + * the client to accumulate `partial_rows` since the last non-empty + * `resume_token`. On resumption, the resumed query will return the remaining + * rows for this query. + * If there is a batch in progress, a non-empty `resume_token` + * means that that the batch of `partial_rows` will be complete after merging + * the `partial_rows` from this response. The client must only yield + * completed batches to the application, and must ensure that any future + * retries send the latest token to avoid returning duplicate data. + * The server may set 'resume_token' without a 'partial_rows'. If there is a + * batch in progress the client should yield it. + * The server will also send a sentinel `resume_token` when last batch of + * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with + * the sentinel `resume_token`, the server will emit it again without any + * `partial_rows`, then return OK. + * + * Generated from protobuf field bytes resume_token = 5; + * @param string $var + * @return $this + */ + public function setResumeToken($var) + { + GPBUtil::checkString($var, False); + $this->resume_token = $var; + + return $this; + } + + /** + * Estimated size of a new batch. The server will always set this when + * returning the first `partial_rows` of a batch, and will not set it at any + * other time. + * The client can use this estimate to allocate an initial buffer for the + * batched results. This helps minimize the number of allocations required, + * though the buffer size may still need to be increased if the estimate is + * too low. + * + * Generated from protobuf field int32 estimated_batch_size = 4; + * @return int + */ + public function getEstimatedBatchSize() + { + return $this->estimated_batch_size; + } + + /** + * Estimated size of a new batch. The server will always set this when + * returning the first `partial_rows` of a batch, and will not set it at any + * other time. + * The client can use this estimate to allocate an initial buffer for the + * batched results. This helps minimize the number of allocations required, + * though the buffer size may still need to be increased if the estimate is + * too low. + * + * Generated from protobuf field int32 estimated_batch_size = 4; + * @param int $var + * @return $this + */ + public function setEstimatedBatchSize($var) + { + GPBUtil::checkInt32($var); + $this->estimated_batch_size = $var; + + return $this; + } + + /** + * @return string + */ + public function getPartialRows() + { + return $this->whichOneof("partial_rows"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php new file mode 100644 index 000000000000..4daf892b444f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php @@ -0,0 +1,148 @@ +google.bigtable.v2.PingAndWarmRequest + */ +class PingAndWarmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the instance to check permissions for as well + * as respond. Values are of the form + * `projects//instances/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 2; + */ + protected $app_profile_id = ''; + + /** + * @param string $name Required. The unique name of the instance to check permissions for as well + * as respond. Values are of the form + * `projects//instances/`. Please see + * {@see BigtableClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\V2\PingAndWarmRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * @param string $name Required. The unique name of the instance to check permissions for as well + * as respond. Values are of the form + * `projects//instances/`. Please see + * {@see BigtableClient::instanceName()} for help formatting this field. + * @param string $appProfileId This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * @return \Google\Cloud\Bigtable\V2\PingAndWarmRequest + * + * @experimental + */ + public static function buildFromNameAppProfileId(string $name, string $appProfileId): self + { + return (new self()) + ->setName($name) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique name of the instance to check permissions for as well + * as respond. Values are of the form + * `projects//instances/`. + * @type string $app_profile_id + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the instance to check permissions for as well + * as respond. Values are of the form + * `projects//instances/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the instance to check permissions for as well + * as respond. Values are of the form + * `projects//instances/`. + * + * 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; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 2; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 2; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php new file mode 100644 index 000000000000..a14857274660 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php @@ -0,0 +1,33 @@ +google.bigtable.v2.PingAndWarmResponse + */ +class PingAndWarmResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoFormat.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoFormat.php new file mode 100644 index 000000000000..3317d0383327 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoFormat.php @@ -0,0 +1,34 @@ +google.bigtable.v2.ProtoFormat + */ +class ProtoFormat extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRows.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRows.php new file mode 100644 index 000000000000..42447f5b08bf --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRows.php @@ -0,0 +1,78 @@ +google.bigtable.v2.ProtoRows + */ +class ProtoRows extends \Google\Protobuf\Internal\Message +{ + /** + * A proto rows message consists of a list of values. Every N complete values + * defines a row, where N is equal to the number of entries in the + * `metadata.proto_schema.columns` value received in the first response. + * + * Generated from protobuf field repeated .google.bigtable.v2.Value values = 2; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\V2\Value>|\Google\Protobuf\Internal\RepeatedField $values + * A proto rows message consists of a list of values. Every N complete values + * defines a row, where N is equal to the number of entries in the + * `metadata.proto_schema.columns` value received in the first response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * A proto rows message consists of a list of values. Every N complete values + * defines a row, where N is equal to the number of entries in the + * `metadata.proto_schema.columns` value received in the first response. + * + * Generated from protobuf field repeated .google.bigtable.v2.Value values = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * A proto rows message consists of a list of values. Every N complete values + * defines a row, where N is equal to the number of entries in the + * `metadata.proto_schema.columns` value received in the first response. + * + * Generated from protobuf field repeated .google.bigtable.v2.Value values = 2; + * @param array<\Google\Cloud\Bigtable\V2\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Value::class); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRowsBatch.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRowsBatch.php new file mode 100644 index 000000000000..3c7ea10177e7 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRowsBatch.php @@ -0,0 +1,71 @@ +google.bigtable.v2.ProtoRowsBatch + */ +class ProtoRowsBatch extends \Google\Protobuf\Internal\Message +{ + /** + * Merge partial results by concatenating these bytes, then parsing the + * overall value as a `ProtoRows` message. + * + * Generated from protobuf field bytes batch_data = 1; + */ + protected $batch_data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $batch_data + * Merge partial results by concatenating these bytes, then parsing the + * overall value as a `ProtoRows` message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Merge partial results by concatenating these bytes, then parsing the + * overall value as a `ProtoRows` message. + * + * Generated from protobuf field bytes batch_data = 1; + * @return string + */ + public function getBatchData() + { + return $this->batch_data; + } + + /** + * Merge partial results by concatenating these bytes, then parsing the + * overall value as a `ProtoRows` message. + * + * Generated from protobuf field bytes batch_data = 1; + * @param string $var + * @return $this + */ + public function setBatchData($var) + { + GPBUtil::checkString($var, False); + $this->batch_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoSchema.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoSchema.php new file mode 100644 index 000000000000..efd883b7c5e2 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoSchema.php @@ -0,0 +1,67 @@ +google.bigtable.v2.ProtoSchema + */ +class ProtoSchema extends \Google\Protobuf\Internal\Message +{ + /** + * The columns in the result set. + * + * Generated from protobuf field repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + private $columns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\V2\ColumnMetadata>|\Google\Protobuf\Internal\RepeatedField $columns + * The columns in the result set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The columns in the result set. + * + * Generated from protobuf field repeated .google.bigtable.v2.ColumnMetadata columns = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumns() + { + return $this->columns; + } + + /** + * The columns in the result set. + * + * Generated from protobuf field repeated .google.bigtable.v2.ColumnMetadata columns = 1; + * @param array<\Google\Cloud\Bigtable\V2\ColumnMetadata>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ColumnMetadata::class); + $this->columns = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php new file mode 100644 index 000000000000..db1f756b6be9 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php @@ -0,0 +1,159 @@ +google.bigtable.v2.RateLimitInfo + */ +class RateLimitInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + * + * Generated from protobuf field .google.protobuf.Duration period = 1; + */ + protected $period = null; + /** + * If it has been at least one `period` since the last load adjustment, the + * client should multiply the current load by this value to get the new target + * load. For example, if the current load is 100 and `factor` is 0.8, the new + * target load should be 80. After adjusting, the client should ignore + * `factor` until another `period` has passed. + * The client can measure its load using any unit that's comparable over time + * For example, QPS can be used as long as each request involves a similar + * amount of work. + * + * Generated from protobuf field double factor = 2; + */ + protected $factor = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $period + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + * @type float $factor + * If it has been at least one `period` since the last load adjustment, the + * client should multiply the current load by this value to get the new target + * load. For example, if the current load is 100 and `factor` is 0.8, the new + * target load should be 80. After adjusting, the client should ignore + * `factor` until another `period` has passed. + * The client can measure its load using any unit that's comparable over time + * For example, QPS can be used as long as each request involves a similar + * amount of work. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + * + * Generated from protobuf field .google.protobuf.Duration period = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getPeriod() + { + return $this->period; + } + + public function hasPeriod() + { + return isset($this->period); + } + + public function clearPeriod() + { + unset($this->period); + } + + /** + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + * + * Generated from protobuf field .google.protobuf.Duration period = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->period = $var; + + return $this; + } + + /** + * If it has been at least one `period` since the last load adjustment, the + * client should multiply the current load by this value to get the new target + * load. For example, if the current load is 100 and `factor` is 0.8, the new + * target load should be 80. After adjusting, the client should ignore + * `factor` until another `period` has passed. + * The client can measure its load using any unit that's comparable over time + * For example, QPS can be used as long as each request involves a similar + * amount of work. + * + * Generated from protobuf field double factor = 2; + * @return float + */ + public function getFactor() + { + return $this->factor; + } + + /** + * If it has been at least one `period` since the last load adjustment, the + * client should multiply the current load by this value to get the new target + * load. For example, if the current load is 100 and `factor` is 0.8, the new + * target load should be 80. After adjusting, the client should ignore + * `factor` until another `period` has passed. + * The client can measure its load using any unit that's comparable over time + * For example, QPS can be used as long as each request involves a similar + * amount of work. + * + * Generated from protobuf field double factor = 2; + * @param float $var + * @return $this + */ + public function setFactor($var) + { + GPBUtil::checkDouble($var); + $this->factor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php new file mode 100644 index 000000000000..cac57eea1345 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php @@ -0,0 +1,412 @@ +google.bigtable.v2.ReadChangeStreamRequest + */ +class ReadChangeStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the table from which to read a change stream. + * Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $table_name = ''; + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * + * Generated from protobuf field string app_profile_id = 2; + */ + protected $app_profile_id = ''; + /** + * The partition to read changes from. + * + * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 3; + */ + protected $partition = null; + /** + * If specified, OK will be returned when the stream advances beyond + * this time. Otherwise, changes will be continuously delivered on the stream. + * This value is inclusive and will be truncated to microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + */ + protected $end_time = null; + /** + * If specified, the duration between `Heartbeat` messages on the stream. + * Otherwise, defaults to 5 seconds. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_duration = 7; + */ + protected $heartbeat_duration = null; + protected $start_from; + + /** + * @param string $tableName Required. The unique name of the table from which to read a change stream. + * Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamRequest + * + * @experimental + */ + public static function build(string $tableName): self + { + return (new self()) + ->setTableName($tableName); + } + + /** + * @param string $tableName Required. The unique name of the table from which to read a change stream. + * Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $appProfileId This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * + * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamRequest + * + * @experimental + */ + public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self + { + return (new self()) + ->setTableName($tableName) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table_name + * Required. The unique name of the table from which to read a change stream. + * Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + * @type string $app_profile_id + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * @type \Google\Cloud\Bigtable\V2\StreamPartition $partition + * The partition to read changes from. + * @type \Google\Protobuf\Timestamp $start_time + * Start reading the stream at the specified timestamp. This timestamp must + * be within the change stream retention period, less than or equal to the + * current time, and after change stream creation, whichever is greater. + * This value is inclusive and will be truncated to microsecond granularity. + * @type \Google\Cloud\Bigtable\V2\StreamContinuationTokens $continuation_tokens + * Tokens that describe how to resume reading a stream where reading + * previously left off. If specified, changes will be read starting at the + * the position. Tokens are delivered on the stream as part of `Heartbeat` + * and `CloseStream` messages. + * If a single token is provided, the token’s partition must exactly match + * the request’s partition. If multiple tokens are provided, as in the case + * of a partition merge, the union of the token partitions must exactly + * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * returned. + * @type \Google\Protobuf\Timestamp $end_time + * If specified, OK will be returned when the stream advances beyond + * this time. Otherwise, changes will be continuously delivered on the stream. + * This value is inclusive and will be truncated to microsecond granularity. + * @type \Google\Protobuf\Duration $heartbeat_duration + * If specified, the duration between `Heartbeat` messages on the stream. + * Otherwise, defaults to 5 seconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the table from which to read a change stream. + * Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTableName() + { + return $this->table_name; + } + + /** + * Required. The unique name of the table from which to read a change stream. + * Values are of the form + * `projects//instances//tables/
`. + * Change streaming must be enabled on the table. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTableName($var) + { + GPBUtil::checkString($var, True); + $this->table_name = $var; + + return $this; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * + * Generated from protobuf field string app_profile_id = 2; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * Single cluster routing must be configured on the profile. + * + * Generated from protobuf field string app_profile_id = 2; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + + /** + * The partition to read changes from. + * + * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 3; + * @return \Google\Cloud\Bigtable\V2\StreamPartition|null + */ + public function getPartition() + { + return $this->partition; + } + + public function hasPartition() + { + return isset($this->partition); + } + + public function clearPartition() + { + unset($this->partition); + } + + /** + * The partition to read changes from. + * + * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 3; + * @param \Google\Cloud\Bigtable\V2\StreamPartition $var + * @return $this + */ + public function setPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamPartition::class); + $this->partition = $var; + + return $this; + } + + /** + * Start reading the stream at the specified timestamp. This timestamp must + * be within the change stream retention period, less than or equal to the + * current time, and after change stream creation, whichever is greater. + * This value is inclusive and will be truncated to microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->readOneof(4); + } + + public function hasStartTime() + { + return $this->hasOneof(4); + } + + /** + * Start reading the stream at the specified timestamp. This timestamp must + * be within the change stream retention period, less than or equal to the + * current time, and after change stream creation, whichever is greater. + * This value is inclusive and will be truncated to microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Tokens that describe how to resume reading a stream where reading + * previously left off. If specified, changes will be read starting at the + * the position. Tokens are delivered on the stream as part of `Heartbeat` + * and `CloseStream` messages. + * If a single token is provided, the token’s partition must exactly match + * the request’s partition. If multiple tokens are provided, as in the case + * of a partition merge, the union of the token partitions must exactly + * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * returned. + * + * Generated from protobuf field .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + * @return \Google\Cloud\Bigtable\V2\StreamContinuationTokens|null + */ + public function getContinuationTokens() + { + return $this->readOneof(6); + } + + public function hasContinuationTokens() + { + return $this->hasOneof(6); + } + + /** + * Tokens that describe how to resume reading a stream where reading + * previously left off. If specified, changes will be read starting at the + * the position. Tokens are delivered on the stream as part of `Heartbeat` + * and `CloseStream` messages. + * If a single token is provided, the token’s partition must exactly match + * the request’s partition. If multiple tokens are provided, as in the case + * of a partition merge, the union of the token partitions must exactly + * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * returned. + * + * Generated from protobuf field .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + * @param \Google\Cloud\Bigtable\V2\StreamContinuationTokens $var + * @return $this + */ + public function setContinuationTokens($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamContinuationTokens::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * If specified, OK will be returned when the stream advances beyond + * this time. Otherwise, changes will be continuously delivered on the stream. + * This value is inclusive and will be truncated to microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + * @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); + } + + /** + * If specified, OK will be returned when the stream advances beyond + * this time. Otherwise, changes will be continuously delivered on the stream. + * This value is inclusive and will be truncated to microsecond granularity. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * If specified, the duration between `Heartbeat` messages on the stream. + * Otherwise, defaults to 5 seconds. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getHeartbeatDuration() + { + return $this->heartbeat_duration; + } + + public function hasHeartbeatDuration() + { + return isset($this->heartbeat_duration); + } + + public function clearHeartbeatDuration() + { + unset($this->heartbeat_duration); + } + + /** + * If specified, the duration between `Heartbeat` messages on the stream. + * Otherwise, defaults to 5 seconds. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setHeartbeatDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->heartbeat_duration = $var; + + return $this; + } + + /** + * @return string + */ + public function getStartFrom() + { + return $this->whichOneof("start_from"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php new file mode 100644 index 000000000000..bdacae25dce3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php @@ -0,0 +1,142 @@ +google.bigtable.v2.ReadChangeStreamResponse + */ +class ReadChangeStreamResponse extends \Google\Protobuf\Internal\Message +{ + protected $stream_record; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange $data_change + * A mutation to the partition. + * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat $heartbeat + * A periodic heartbeat message. + * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream $close_stream + * An indication that the stream should be closed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * A mutation to the partition. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange|null + */ + public function getDataChange() + { + return $this->readOneof(1); + } + + public function hasDataChange() + { + return $this->hasOneof(1); + } + + /** + * A mutation to the partition. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange $var + * @return $this + */ + public function setDataChange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A periodic heartbeat message. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat|null + */ + public function getHeartbeat() + { + return $this->readOneof(2); + } + + public function hasHeartbeat() + { + return $this->hasOneof(2); + } + + /** + * A periodic heartbeat message. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat $var + * @return $this + */ + public function setHeartbeat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * An indication that the stream should be closed. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream|null + */ + public function getCloseStream() + { + return $this->readOneof(3); + } + + public function hasCloseStream() + { + return $this->hasOneof(3); + } + + /** + * An indication that the stream should be closed. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream $var + * @return $this + */ + public function setCloseStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getStreamRecord() + { + return $this->whichOneof("stream_record"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php new file mode 100644 index 000000000000..4551bb34ed65 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php @@ -0,0 +1,179 @@ +google.bigtable.v2.ReadChangeStreamResponse.CloseStream + */ +class CloseStream extends \Google\Protobuf\Internal\Message +{ + /** + * The status of the stream. + * + * Generated from protobuf field .google.rpc.Status status = 1; + */ + protected $status = null; + /** + * If non-empty, contains the information needed to resume reading their + * associated partitions. + * + * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + private $continuation_tokens; + /** + * If non-empty, contains the new partitions to start reading from, which + * are related to but not necessarily identical to the partitions for the + * above `continuation_tokens`. + * + * Generated from protobuf field repeated .google.bigtable.v2.StreamPartition new_partitions = 3; + */ + private $new_partitions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\Status $status + * The status of the stream. + * @type array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $continuation_tokens + * If non-empty, contains the information needed to resume reading their + * associated partitions. + * @type array<\Google\Cloud\Bigtable\V2\StreamPartition>|\Google\Protobuf\Internal\RepeatedField $new_partitions + * If non-empty, contains the new partitions to start reading from, which + * are related to but not necessarily identical to the partitions for the + * above `continuation_tokens`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * The status of the stream. + * + * Generated from protobuf field .google.rpc.Status status = 1; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The status of the stream. + * + * Generated from protobuf field .google.rpc.Status status = 1; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + + /** + * If non-empty, contains the information needed to resume reading their + * associated partitions. + * + * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContinuationTokens() + { + return $this->continuation_tokens; + } + + /** + * If non-empty, contains the information needed to resume reading their + * associated partitions. + * + * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + * @param array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContinuationTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\StreamContinuationToken::class); + $this->continuation_tokens = $arr; + + return $this; + } + + /** + * If non-empty, contains the new partitions to start reading from, which + * are related to but not necessarily identical to the partitions for the + * above `continuation_tokens`. + * + * Generated from protobuf field repeated .google.bigtable.v2.StreamPartition new_partitions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNewPartitions() + { + return $this->new_partitions; + } + + /** + * If non-empty, contains the new partitions to start reading from, which + * are related to but not necessarily identical to the partitions for the + * above `continuation_tokens`. + * + * Generated from protobuf field repeated .google.bigtable.v2.StreamPartition new_partitions = 3; + * @param array<\Google\Cloud\Bigtable\V2\StreamPartition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNewPartitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\StreamPartition::class); + $this->new_partitions = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloseStream::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_CloseStream::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php new file mode 100644 index 000000000000..9bb24720fb1a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php @@ -0,0 +1,439 @@ +google.bigtable.v2.ReadChangeStreamResponse.DataChange + */ +class DataChange extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the mutation. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + */ + protected $type = 0; + /** + * The cluster where the mutation was applied. + * Not set when `type` is `GARBAGE_COLLECTION`. + * + * Generated from protobuf field string source_cluster_id = 2; + */ + protected $source_cluster_id = ''; + /** + * The row key for all mutations that are part of this `DataChange`. + * If the `DataChange` is chunked across multiple messages, then this field + * will only be set for the first message. + * + * Generated from protobuf field bytes row_key = 3; + */ + protected $row_key = ''; + /** + * The timestamp at which the mutation was applied on the Bigtable server. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_timestamp = 4; + */ + protected $commit_timestamp = null; + /** + * A value that lets stream consumers reconstruct Bigtable's + * conflict resolution semantics. + * https://cloud.google.com/bigtable/docs/writes#conflict-resolution + * In the event that the same row key, column family, column qualifier, + * timestamp are modified on different clusters at the same + * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the + * one chosen for the eventually consistent state of the system. + * + * Generated from protobuf field int32 tiebreaker = 5; + */ + protected $tiebreaker = 0; + /** + * The mutations associated with this change to the partition. + * May contain complete mutations or chunks of a multi-message chunked + * `DataChange` record. + * + * Generated from protobuf field repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + private $chunks; + /** + * When true, indicates that the entire `DataChange` has been read + * and the client can safely process the message. + * + * Generated from protobuf field bool done = 8; + */ + protected $done = false; + /** + * An encoded position for this stream's partition to restart reading from. + * This token is for the StreamPartition from the request. + * + * Generated from protobuf field string token = 9; + */ + protected $token = ''; + /** + * An estimate of the commit timestamp that is usually lower than or equal + * to any timestamp for a record that will be delivered in the future on the + * stream. It is possible that, under particular circumstances that a future + * record has a timestamp is is lower than a previously seen timestamp. For + * an example usage see + * https://beam.apache.org/documentation/basics/#watermarks + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 10; + */ + protected $estimated_low_watermark = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of the mutation. + * @type string $source_cluster_id + * The cluster where the mutation was applied. + * Not set when `type` is `GARBAGE_COLLECTION`. + * @type string $row_key + * The row key for all mutations that are part of this `DataChange`. + * If the `DataChange` is chunked across multiple messages, then this field + * will only be set for the first message. + * @type \Google\Protobuf\Timestamp $commit_timestamp + * The timestamp at which the mutation was applied on the Bigtable server. + * @type int $tiebreaker + * A value that lets stream consumers reconstruct Bigtable's + * conflict resolution semantics. + * https://cloud.google.com/bigtable/docs/writes#conflict-resolution + * In the event that the same row key, column family, column qualifier, + * timestamp are modified on different clusters at the same + * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the + * one chosen for the eventually consistent state of the system. + * @type array<\Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk>|\Google\Protobuf\Internal\RepeatedField $chunks + * The mutations associated with this change to the partition. + * May contain complete mutations or chunks of a multi-message chunked + * `DataChange` record. + * @type bool $done + * When true, indicates that the entire `DataChange` has been read + * and the client can safely process the message. + * @type string $token + * An encoded position for this stream's partition to restart reading from. + * This token is for the StreamPartition from the request. + * @type \Google\Protobuf\Timestamp $estimated_low_watermark + * An estimate of the commit timestamp that is usually lower than or equal + * to any timestamp for a record that will be delivered in the future on the + * stream. It is possible that, under particular circumstances that a future + * record has a timestamp is is lower than a previously seen timestamp. For + * an example usage see + * https://beam.apache.org/documentation/basics/#watermarks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * The type of the mutation. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the mutation. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The cluster where the mutation was applied. + * Not set when `type` is `GARBAGE_COLLECTION`. + * + * Generated from protobuf field string source_cluster_id = 2; + * @return string + */ + public function getSourceClusterId() + { + return $this->source_cluster_id; + } + + /** + * The cluster where the mutation was applied. + * Not set when `type` is `GARBAGE_COLLECTION`. + * + * Generated from protobuf field string source_cluster_id = 2; + * @param string $var + * @return $this + */ + public function setSourceClusterId($var) + { + GPBUtil::checkString($var, True); + $this->source_cluster_id = $var; + + return $this; + } + + /** + * The row key for all mutations that are part of this `DataChange`. + * If the `DataChange` is chunked across multiple messages, then this field + * will only be set for the first message. + * + * Generated from protobuf field bytes row_key = 3; + * @return string + */ + public function getRowKey() + { + return $this->row_key; + } + + /** + * The row key for all mutations that are part of this `DataChange`. + * If the `DataChange` is chunked across multiple messages, then this field + * will only be set for the first message. + * + * Generated from protobuf field bytes row_key = 3; + * @param string $var + * @return $this + */ + public function setRowKey($var) + { + GPBUtil::checkString($var, False); + $this->row_key = $var; + + return $this; + } + + /** + * The timestamp at which the mutation was applied on the Bigtable server. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_timestamp = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTimestamp() + { + return $this->commit_timestamp; + } + + public function hasCommitTimestamp() + { + return isset($this->commit_timestamp); + } + + public function clearCommitTimestamp() + { + unset($this->commit_timestamp); + } + + /** + * The timestamp at which the mutation was applied on the Bigtable server. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_timestamp = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTimestamp($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_timestamp = $var; + + return $this; + } + + /** + * A value that lets stream consumers reconstruct Bigtable's + * conflict resolution semantics. + * https://cloud.google.com/bigtable/docs/writes#conflict-resolution + * In the event that the same row key, column family, column qualifier, + * timestamp are modified on different clusters at the same + * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the + * one chosen for the eventually consistent state of the system. + * + * Generated from protobuf field int32 tiebreaker = 5; + * @return int + */ + public function getTiebreaker() + { + return $this->tiebreaker; + } + + /** + * A value that lets stream consumers reconstruct Bigtable's + * conflict resolution semantics. + * https://cloud.google.com/bigtable/docs/writes#conflict-resolution + * In the event that the same row key, column family, column qualifier, + * timestamp are modified on different clusters at the same + * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the + * one chosen for the eventually consistent state of the system. + * + * Generated from protobuf field int32 tiebreaker = 5; + * @param int $var + * @return $this + */ + public function setTiebreaker($var) + { + GPBUtil::checkInt32($var); + $this->tiebreaker = $var; + + return $this; + } + + /** + * The mutations associated with this change to the partition. + * May contain complete mutations or chunks of a multi-message chunked + * `DataChange` record. + * + * Generated from protobuf field repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChunks() + { + return $this->chunks; + } + + /** + * The mutations associated with this change to the partition. + * May contain complete mutations or chunks of a multi-message chunked + * `DataChange` record. + * + * Generated from protobuf field repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * @param array<\Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChunks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk::class); + $this->chunks = $arr; + + return $this; + } + + /** + * When true, indicates that the entire `DataChange` has been read + * and the client can safely process the message. + * + * Generated from protobuf field bool done = 8; + * @return bool + */ + public function getDone() + { + return $this->done; + } + + /** + * When true, indicates that the entire `DataChange` has been read + * and the client can safely process the message. + * + * Generated from protobuf field bool done = 8; + * @param bool $var + * @return $this + */ + public function setDone($var) + { + GPBUtil::checkBool($var); + $this->done = $var; + + return $this; + } + + /** + * An encoded position for this stream's partition to restart reading from. + * This token is for the StreamPartition from the request. + * + * Generated from protobuf field string token = 9; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * An encoded position for this stream's partition to restart reading from. + * This token is for the StreamPartition from the request. + * + * Generated from protobuf field string token = 9; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + + /** + * An estimate of the commit timestamp that is usually lower than or equal + * to any timestamp for a record that will be delivered in the future on the + * stream. It is possible that, under particular circumstances that a future + * record has a timestamp is is lower than a previously seen timestamp. For + * an example usage see + * https://beam.apache.org/documentation/basics/#watermarks + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEstimatedLowWatermark() + { + return $this->estimated_low_watermark; + } + + public function hasEstimatedLowWatermark() + { + return isset($this->estimated_low_watermark); + } + + public function clearEstimatedLowWatermark() + { + unset($this->estimated_low_watermark); + } + + /** + * An estimate of the commit timestamp that is usually lower than or equal + * to any timestamp for a record that will be delivered in the future on the + * stream. It is possible that, under particular circumstances that a future + * record has a timestamp is is lower than a previously seen timestamp. For + * an example usage see + * https://beam.apache.org/documentation/basics/#watermarks + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEstimatedLowWatermark($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->estimated_low_watermark = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataChange::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_DataChange::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php new file mode 100644 index 000000000000..0eb4b8204f45 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php @@ -0,0 +1,72 @@ +google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type + */ +class Type +{ + /** + * The type is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * A user-initiated mutation. + * + * Generated from protobuf enum USER = 1; + */ + const USER = 1; + /** + * A system-initiated mutation as part of garbage collection. + * https://cloud.google.com/bigtable/docs/garbage-collection + * + * Generated from protobuf enum GARBAGE_COLLECTION = 2; + */ + const GARBAGE_COLLECTION = 2; + /** + * This is a continuation of a multi-message change. + * + * Generated from protobuf enum CONTINUATION = 3; + */ + const CONTINUATION = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::USER => 'USER', + self::GARBAGE_COLLECTION => 'GARBAGE_COLLECTION', + self::CONTINUATION => 'CONTINUATION', + ]; + + 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\Bigtable\V2\ReadChangeStreamResponse_DataChange_Type::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php new file mode 100644 index 000000000000..e20a2f711230 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php @@ -0,0 +1,149 @@ +google.bigtable.v2.ReadChangeStreamResponse.Heartbeat + */ +class Heartbeat extends \Google\Protobuf\Internal\Message +{ + /** + * A token that can be provided to a subsequent `ReadChangeStream` call + * to pick up reading at the current stream position. + * + * Generated from protobuf field .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + protected $continuation_token = null; + /** + * An estimate of the commit timestamp that is usually lower than or equal + * to any timestamp for a record that will be delivered in the future on the + * stream. It is possible that, under particular circumstances that a future + * record has a timestamp is is lower than a previously seen timestamp. For + * an example usage see + * https://beam.apache.org/documentation/basics/#watermarks + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 2; + */ + protected $estimated_low_watermark = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\StreamContinuationToken $continuation_token + * A token that can be provided to a subsequent `ReadChangeStream` call + * to pick up reading at the current stream position. + * @type \Google\Protobuf\Timestamp $estimated_low_watermark + * An estimate of the commit timestamp that is usually lower than or equal + * to any timestamp for a record that will be delivered in the future on the + * stream. It is possible that, under particular circumstances that a future + * record has a timestamp is is lower than a previously seen timestamp. For + * an example usage see + * https://beam.apache.org/documentation/basics/#watermarks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * A token that can be provided to a subsequent `ReadChangeStream` call + * to pick up reading at the current stream position. + * + * Generated from protobuf field .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + * @return \Google\Cloud\Bigtable\V2\StreamContinuationToken|null + */ + public function getContinuationToken() + { + return $this->continuation_token; + } + + public function hasContinuationToken() + { + return isset($this->continuation_token); + } + + public function clearContinuationToken() + { + unset($this->continuation_token); + } + + /** + * A token that can be provided to a subsequent `ReadChangeStream` call + * to pick up reading at the current stream position. + * + * Generated from protobuf field .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + * @param \Google\Cloud\Bigtable\V2\StreamContinuationToken $var + * @return $this + */ + public function setContinuationToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamContinuationToken::class); + $this->continuation_token = $var; + + return $this; + } + + /** + * An estimate of the commit timestamp that is usually lower than or equal + * to any timestamp for a record that will be delivered in the future on the + * stream. It is possible that, under particular circumstances that a future + * record has a timestamp is is lower than a previously seen timestamp. For + * an example usage see + * https://beam.apache.org/documentation/basics/#watermarks + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEstimatedLowWatermark() + { + return $this->estimated_low_watermark; + } + + public function hasEstimatedLowWatermark() + { + return isset($this->estimated_low_watermark); + } + + public function clearEstimatedLowWatermark() + { + unset($this->estimated_low_watermark); + } + + /** + * An estimate of the commit timestamp that is usually lower than or equal + * to any timestamp for a record that will be delivered in the future on the + * stream. It is possible that, under particular circumstances that a future + * record has a timestamp is is lower than a previously seen timestamp. For + * an example usage see + * https://beam.apache.org/documentation/basics/#watermarks + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEstimatedLowWatermark($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->estimated_low_watermark = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Heartbeat::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_Heartbeat::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php new file mode 100644 index 000000000000..861921c6235d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php @@ -0,0 +1,136 @@ +google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + */ +class MutationChunk extends \Google\Protobuf\Internal\Message +{ + /** + * If set, then the mutation is a `SetCell` with a chunked value across + * multiple messages. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + */ + protected $chunk_info = null; + /** + * If this is a continuation of a chunked message (`chunked_value_offset` > + * 0), ignore all fields except the `SetCell`'s value and merge it with + * the previous message by concatenating the value fields. + * + * Generated from protobuf field .google.bigtable.v2.Mutation mutation = 2; + */ + protected $mutation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo $chunk_info + * If set, then the mutation is a `SetCell` with a chunked value across + * multiple messages. + * @type \Google\Cloud\Bigtable\V2\Mutation $mutation + * If this is a continuation of a chunked message (`chunked_value_offset` > + * 0), ignore all fields except the `SetCell`'s value and merge it with + * the previous message by concatenating the value fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * If set, then the mutation is a `SetCell` with a chunked value across + * multiple messages. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo|null + */ + public function getChunkInfo() + { + return $this->chunk_info; + } + + public function hasChunkInfo() + { + return isset($this->chunk_info); + } + + public function clearChunkInfo() + { + unset($this->chunk_info); + } + + /** + * If set, then the mutation is a `SetCell` with a chunked value across + * multiple messages. + * + * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo $var + * @return $this + */ + public function setChunkInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo::class); + $this->chunk_info = $var; + + return $this; + } + + /** + * If this is a continuation of a chunked message (`chunked_value_offset` > + * 0), ignore all fields except the `SetCell`'s value and merge it with + * the previous message by concatenating the value fields. + * + * Generated from protobuf field .google.bigtable.v2.Mutation mutation = 2; + * @return \Google\Cloud\Bigtable\V2\Mutation|null + */ + public function getMutation() + { + return $this->mutation; + } + + public function hasMutation() + { + return isset($this->mutation); + } + + public function clearMutation() + { + unset($this->mutation); + } + + /** + * If this is a continuation of a chunked message (`chunked_value_offset` > + * 0), ignore all fields except the `SetCell`'s value and merge it with + * the previous message by concatenating the value fields. + * + * Generated from protobuf field .google.bigtable.v2.Mutation mutation = 2; + * @param \Google\Cloud\Bigtable\V2\Mutation $var + * @return $this + */ + public function setMutation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation::class); + $this->mutation = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MutationChunk::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_MutationChunk::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php new file mode 100644 index 000000000000..f8a6c673c8bf --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php @@ -0,0 +1,144 @@ +google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + */ +class ChunkInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The total value size of all the chunks that make up the `SetCell`. + * + * Generated from protobuf field int32 chunked_value_size = 1; + */ + protected $chunked_value_size = 0; + /** + * The byte offset of this chunk into the total value size of the + * mutation. + * + * Generated from protobuf field int32 chunked_value_offset = 2; + */ + protected $chunked_value_offset = 0; + /** + * When true, this is the last chunk of a chunked `SetCell`. + * + * Generated from protobuf field bool last_chunk = 3; + */ + protected $last_chunk = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $chunked_value_size + * The total value size of all the chunks that make up the `SetCell`. + * @type int $chunked_value_offset + * The byte offset of this chunk into the total value size of the + * mutation. + * @type bool $last_chunk + * When true, this is the last chunk of a chunked `SetCell`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * The total value size of all the chunks that make up the `SetCell`. + * + * Generated from protobuf field int32 chunked_value_size = 1; + * @return int + */ + public function getChunkedValueSize() + { + return $this->chunked_value_size; + } + + /** + * The total value size of all the chunks that make up the `SetCell`. + * + * Generated from protobuf field int32 chunked_value_size = 1; + * @param int $var + * @return $this + */ + public function setChunkedValueSize($var) + { + GPBUtil::checkInt32($var); + $this->chunked_value_size = $var; + + return $this; + } + + /** + * The byte offset of this chunk into the total value size of the + * mutation. + * + * Generated from protobuf field int32 chunked_value_offset = 2; + * @return int + */ + public function getChunkedValueOffset() + { + return $this->chunked_value_offset; + } + + /** + * The byte offset of this chunk into the total value size of the + * mutation. + * + * Generated from protobuf field int32 chunked_value_offset = 2; + * @param int $var + * @return $this + */ + public function setChunkedValueOffset($var) + { + GPBUtil::checkInt32($var); + $this->chunked_value_offset = $var; + + return $this; + } + + /** + * When true, this is the last chunk of a chunked `SetCell`. + * + * Generated from protobuf field bool last_chunk = 3; + * @return bool + */ + public function getLastChunk() + { + return $this->last_chunk; + } + + /** + * When true, this is the last chunk of a chunked `SetCell`. + * + * Generated from protobuf field bool last_chunk = 3; + * @param bool $var + * @return $this + */ + public function setLastChunk($var) + { + GPBUtil::checkBool($var); + $this->last_chunk = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ChunkInfo::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_MutationChunk_ChunkInfo::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php new file mode 100644 index 000000000000..f226aa85abc9 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php @@ -0,0 +1,179 @@ +google.bigtable.v2.ReadIterationStats + */ +class ReadIterationStats extends \Google\Protobuf\Internal\Message +{ + /** + * The rows seen (scanned) as part of the request. This includes the count of + * rows returned, as captured below. + * + * Generated from protobuf field int64 rows_seen_count = 1; + */ + protected $rows_seen_count = 0; + /** + * The rows returned as part of the request. + * + * Generated from protobuf field int64 rows_returned_count = 2; + */ + protected $rows_returned_count = 0; + /** + * The cells seen (scanned) as part of the request. This includes the count of + * cells returned, as captured below. + * + * Generated from protobuf field int64 cells_seen_count = 3; + */ + protected $cells_seen_count = 0; + /** + * The cells returned as part of the request. + * + * Generated from protobuf field int64 cells_returned_count = 4; + */ + protected $cells_returned_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $rows_seen_count + * The rows seen (scanned) as part of the request. This includes the count of + * rows returned, as captured below. + * @type int|string $rows_returned_count + * The rows returned as part of the request. + * @type int|string $cells_seen_count + * The cells seen (scanned) as part of the request. This includes the count of + * cells returned, as captured below. + * @type int|string $cells_returned_count + * The cells returned as part of the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); + parent::__construct($data); + } + + /** + * The rows seen (scanned) as part of the request. This includes the count of + * rows returned, as captured below. + * + * Generated from protobuf field int64 rows_seen_count = 1; + * @return int|string + */ + public function getRowsSeenCount() + { + return $this->rows_seen_count; + } + + /** + * The rows seen (scanned) as part of the request. This includes the count of + * rows returned, as captured below. + * + * Generated from protobuf field int64 rows_seen_count = 1; + * @param int|string $var + * @return $this + */ + public function setRowsSeenCount($var) + { + GPBUtil::checkInt64($var); + $this->rows_seen_count = $var; + + return $this; + } + + /** + * The rows returned as part of the request. + * + * Generated from protobuf field int64 rows_returned_count = 2; + * @return int|string + */ + public function getRowsReturnedCount() + { + return $this->rows_returned_count; + } + + /** + * The rows returned as part of the request. + * + * Generated from protobuf field int64 rows_returned_count = 2; + * @param int|string $var + * @return $this + */ + public function setRowsReturnedCount($var) + { + GPBUtil::checkInt64($var); + $this->rows_returned_count = $var; + + return $this; + } + + /** + * The cells seen (scanned) as part of the request. This includes the count of + * cells returned, as captured below. + * + * Generated from protobuf field int64 cells_seen_count = 3; + * @return int|string + */ + public function getCellsSeenCount() + { + return $this->cells_seen_count; + } + + /** + * The cells seen (scanned) as part of the request. This includes the count of + * cells returned, as captured below. + * + * Generated from protobuf field int64 cells_seen_count = 3; + * @param int|string $var + * @return $this + */ + public function setCellsSeenCount($var) + { + GPBUtil::checkInt64($var); + $this->cells_seen_count = $var; + + return $this; + } + + /** + * The cells returned as part of the request. + * + * Generated from protobuf field int64 cells_returned_count = 4; + * @return int|string + */ + public function getCellsReturnedCount() + { + return $this->cells_returned_count; + } + + /** + * The cells returned as part of the request. + * + * Generated from protobuf field int64 cells_returned_count = 4; + * @param int|string $var + * @return $this + */ + public function setCellsReturnedCount($var) + { + GPBUtil::checkInt64($var); + $this->cells_returned_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php new file mode 100644 index 000000000000..ab877a010aab --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php @@ -0,0 +1,296 @@ +google.bigtable.v2.ReadModifyWriteRowRequest + */ +class ReadModifyWriteRowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $authorized_view_name = ''; + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 4; + */ + protected $app_profile_id = ''; + /** + * Required. The key of the row to which the read/modify/write rules should be + * applied. + * + * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $row_key = ''; + /** + * Required. Rules specifying how the specified row's contents are to be + * transformed into writes. Entries are applied in order, meaning that earlier + * rules will affect the results of later ones. + * + * Generated from protobuf field repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $rules; + + /** + * @param string $tableName Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be + * applied. + * @param \Google\Cloud\Bigtable\V2\ReadModifyWriteRule[] $rules Required. Rules specifying how the specified row's contents are to be + * transformed into writes. Entries are applied in order, meaning that earlier + * rules will affect the results of later ones. + * + * @return \Google\Cloud\Bigtable\V2\ReadModifyWriteRowRequest + * + * @experimental + */ + public static function build(string $tableName, string $rowKey, array $rules): self + { + return (new self()) + ->setTableName($tableName) + ->setRowKey($rowKey) + ->setRules($rules); + } + + /** + * @param string $tableName Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be + * applied. + * @param \Google\Cloud\Bigtable\V2\ReadModifyWriteRule[] $rules Required. Rules specifying how the specified row's contents are to be + * transformed into writes. Entries are applied in order, meaning that earlier + * rules will affect the results of later ones. + * @param string $appProfileId This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * @return \Google\Cloud\Bigtable\V2\ReadModifyWriteRowRequest + * + * @experimental + */ + public static function buildFromTableNameRowKeyRulesAppProfileId(string $tableName, string $rowKey, array $rules, string $appProfileId): self + { + return (new self()) + ->setTableName($tableName) + ->setRowKey($rowKey) + ->setRules($rules) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table_name + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form + * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @type string $app_profile_id + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @type string $row_key + * Required. The key of the row to which the read/modify/write rules should be + * applied. + * @type array<\Google\Cloud\Bigtable\V2\ReadModifyWriteRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Required. Rules specifying how the specified row's contents are to be + * transformed into writes. Entries are applied in order, meaning that earlier + * rules will affect the results of later ones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTableName() + { + return $this->table_name; + } + + /** + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTableName($var) + { + GPBUtil::checkString($var, True); + $this->table_name = $var; + + return $this; + } + + /** + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 4; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 4; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + + /** + * Required. The key of the row to which the read/modify/write rules should be + * applied. + * + * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRowKey() + { + return $this->row_key; + } + + /** + * Required. The key of the row to which the read/modify/write rules should be + * applied. + * + * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRowKey($var) + { + GPBUtil::checkString($var, False); + $this->row_key = $var; + + return $this; + } + + /** + * Required. Rules specifying how the specified row's contents are to be + * transformed into writes. Entries are applied in order, meaning that earlier + * rules will affect the results of later ones. + * + * Generated from protobuf field repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Required. Rules specifying how the specified row's contents are to be + * transformed into writes. Entries are applied in order, meaning that earlier + * rules will affect the results of later ones. + * + * Generated from protobuf field repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Bigtable\V2\ReadModifyWriteRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadModifyWriteRule::class); + $this->rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php new file mode 100644 index 000000000000..1b1c1cdac4a9 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php @@ -0,0 +1,77 @@ +google.bigtable.v2.ReadModifyWriteRowResponse + */ +class ReadModifyWriteRowResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A Row containing the new contents of all cells modified by the request. + * + * Generated from protobuf field .google.bigtable.v2.Row row = 1; + */ + protected $row = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Row $row + * A Row containing the new contents of all cells modified by the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * A Row containing the new contents of all cells modified by the request. + * + * Generated from protobuf field .google.bigtable.v2.Row row = 1; + * @return \Google\Cloud\Bigtable\V2\Row|null + */ + public function getRow() + { + return $this->row; + } + + public function hasRow() + { + return isset($this->row); + } + + public function clearRow() + { + unset($this->row); + } + + /** + * A Row containing the new contents of all cells modified by the request. + * + * Generated from protobuf field .google.bigtable.v2.Row row = 1; + * @param \Google\Cloud\Bigtable\V2\Row $var + * @return $this + */ + public function setRow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Row::class); + $this->row = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php new file mode 100644 index 000000000000..1afafb1f597a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php @@ -0,0 +1,204 @@ +google.bigtable.v2.ReadModifyWriteRule + */ +class ReadModifyWriteRule extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the family to which the read/modify/write should be applied. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + */ + protected $family_name = ''; + /** + * The qualifier of the column to which the read/modify/write should be + * applied. + * Can be any byte string, including the empty string. + * + * Generated from protobuf field bytes column_qualifier = 2; + */ + protected $column_qualifier = ''; + protected $rule; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_name + * The name of the family to which the read/modify/write should be applied. + * Must match `[-_.a-zA-Z0-9]+` + * @type string $column_qualifier + * The qualifier of the column to which the read/modify/write should be + * applied. + * Can be any byte string, including the empty string. + * @type string $append_value + * Rule specifying that `append_value` be appended to the existing value. + * If the targeted cell is unset, it will be treated as containing the + * empty string. + * @type int|string $increment_amount + * Rule specifying that `increment_amount` be added to the existing value. + * If the targeted cell is unset, it will be treated as containing a zero. + * Otherwise, the targeted cell must contain an 8-byte value (interpreted + * as a 64-bit big-endian signed integer), or the entire request will fail. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The name of the family to which the read/modify/write should be applied. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @return string + */ + public function getFamilyName() + { + return $this->family_name; + } + + /** + * The name of the family to which the read/modify/write should be applied. + * Must match `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @param string $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkString($var, True); + $this->family_name = $var; + + return $this; + } + + /** + * The qualifier of the column to which the read/modify/write should be + * applied. + * Can be any byte string, including the empty string. + * + * Generated from protobuf field bytes column_qualifier = 2; + * @return string + */ + public function getColumnQualifier() + { + return $this->column_qualifier; + } + + /** + * The qualifier of the column to which the read/modify/write should be + * applied. + * Can be any byte string, including the empty string. + * + * Generated from protobuf field bytes column_qualifier = 2; + * @param string $var + * @return $this + */ + public function setColumnQualifier($var) + { + GPBUtil::checkString($var, False); + $this->column_qualifier = $var; + + return $this; + } + + /** + * Rule specifying that `append_value` be appended to the existing value. + * If the targeted cell is unset, it will be treated as containing the + * empty string. + * + * Generated from protobuf field bytes append_value = 3; + * @return string + */ + public function getAppendValue() + { + return $this->readOneof(3); + } + + public function hasAppendValue() + { + return $this->hasOneof(3); + } + + /** + * Rule specifying that `append_value` be appended to the existing value. + * If the targeted cell is unset, it will be treated as containing the + * empty string. + * + * Generated from protobuf field bytes append_value = 3; + * @param string $var + * @return $this + */ + public function setAppendValue($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Rule specifying that `increment_amount` be added to the existing value. + * If the targeted cell is unset, it will be treated as containing a zero. + * Otherwise, the targeted cell must contain an 8-byte value (interpreted + * as a 64-bit big-endian signed integer), or the entire request will fail. + * + * Generated from protobuf field int64 increment_amount = 4; + * @return int|string + */ + public function getIncrementAmount() + { + return $this->readOneof(4); + } + + public function hasIncrementAmount() + { + return $this->hasOneof(4); + } + + /** + * Rule specifying that `increment_amount` be added to the existing value. + * If the targeted cell is unset, it will be treated as containing a zero. + * Otherwise, the targeted cell must contain an 8-byte value (interpreted + * as a 64-bit big-endian signed integer), or the entire request will fail. + * + * Generated from protobuf field int64 increment_amount = 4; + * @param int|string $var + * @return $this + */ + public function setIncrementAmount($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getRule() + { + return $this->whichOneof("rule"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php new file mode 100644 index 000000000000..d8401d3e4c46 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php @@ -0,0 +1,426 @@ +google.bigtable.v2.ReadRowsRequest + */ +class ReadRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique name of the table from which to read. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $authorized_view_name = ''; + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 5; + */ + protected $app_profile_id = ''; + /** + * The row keys and/or ranges to read sequentially. If not specified, reads + * from all rows. + * + * Generated from protobuf field .google.bigtable.v2.RowSet rows = 2; + */ + protected $rows = null; + /** + * The filter to apply to the contents of the specified row(s). If unset, + * reads the entirety of each row. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter filter = 3; + */ + protected $filter = null; + /** + * The read will stop after committing to N rows' worth of results. The + * default (zero) is to return all results. + * + * Generated from protobuf field int64 rows_limit = 4; + */ + protected $rows_limit = 0; + /** + * The view into RequestStats, as described above. + * + * Generated from protobuf field .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + */ + protected $request_stats_view = 0; + /** + * Experimental API - Please note that this API is currently experimental + * and can change in the future. + * Return rows in lexiographical descending order of the row keys. The row + * contents will not be affected by this flag. + * Example result set: + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] + * + * Generated from protobuf field bool reversed = 7; + */ + protected $reversed = false; + + /** + * @param string $tableName Optional. The unique name of the table from which to read. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\V2\ReadRowsRequest + * + * @experimental + */ + public static function build(string $tableName): self + { + return (new self()) + ->setTableName($tableName); + } + + /** + * @param string $tableName Optional. The unique name of the table from which to read. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $appProfileId This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * @return \Google\Cloud\Bigtable\V2\ReadRowsRequest + * + * @experimental + */ + public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self + { + return (new self()) + ->setTableName($tableName) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table_name + * Optional. The unique name of the table from which to read. + * Values are of the form + * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @type string $app_profile_id + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @type \Google\Cloud\Bigtable\V2\RowSet $rows + * The row keys and/or ranges to read sequentially. If not specified, reads + * from all rows. + * @type \Google\Cloud\Bigtable\V2\RowFilter $filter + * The filter to apply to the contents of the specified row(s). If unset, + * reads the entirety of each row. + * @type int|string $rows_limit + * The read will stop after committing to N rows' worth of results. The + * default (zero) is to return all results. + * @type int $request_stats_view + * The view into RequestStats, as described above. + * @type bool $reversed + * Experimental API - Please note that this API is currently experimental + * and can change in the future. + * Return rows in lexiographical descending order of the row keys. The row + * contents will not be affected by this flag. + * Example result set: + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique name of the table from which to read. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTableName() + { + return $this->table_name; + } + + /** + * Optional. The unique name of the table from which to read. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTableName($var) + { + GPBUtil::checkString($var, True); + $this->table_name = $var; + + return $this; + } + + /** + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 5; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 5; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + + /** + * The row keys and/or ranges to read sequentially. If not specified, reads + * from all rows. + * + * Generated from protobuf field .google.bigtable.v2.RowSet rows = 2; + * @return \Google\Cloud\Bigtable\V2\RowSet|null + */ + public function getRows() + { + return $this->rows; + } + + public function hasRows() + { + return isset($this->rows); + } + + public function clearRows() + { + unset($this->rows); + } + + /** + * The row keys and/or ranges to read sequentially. If not specified, reads + * from all rows. + * + * Generated from protobuf field .google.bigtable.v2.RowSet rows = 2; + * @param \Google\Cloud\Bigtable\V2\RowSet $var + * @return $this + */ + public function setRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowSet::class); + $this->rows = $var; + + return $this; + } + + /** + * The filter to apply to the contents of the specified row(s). If unset, + * reads the entirety of each row. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter filter = 3; + * @return \Google\Cloud\Bigtable\V2\RowFilter|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * The filter to apply to the contents of the specified row(s). If unset, + * reads the entirety of each row. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter filter = 3; + * @param \Google\Cloud\Bigtable\V2\RowFilter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); + $this->filter = $var; + + return $this; + } + + /** + * The read will stop after committing to N rows' worth of results. The + * default (zero) is to return all results. + * + * Generated from protobuf field int64 rows_limit = 4; + * @return int|string + */ + public function getRowsLimit() + { + return $this->rows_limit; + } + + /** + * The read will stop after committing to N rows' worth of results. The + * default (zero) is to return all results. + * + * Generated from protobuf field int64 rows_limit = 4; + * @param int|string $var + * @return $this + */ + public function setRowsLimit($var) + { + GPBUtil::checkInt64($var); + $this->rows_limit = $var; + + return $this; + } + + /** + * The view into RequestStats, as described above. + * + * Generated from protobuf field .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * @return int + */ + public function getRequestStatsView() + { + return $this->request_stats_view; + } + + /** + * The view into RequestStats, as described above. + * + * Generated from protobuf field .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * @param int $var + * @return $this + */ + public function setRequestStatsView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\V2\ReadRowsRequest\RequestStatsView::class); + $this->request_stats_view = $var; + + return $this; + } + + /** + * Experimental API - Please note that this API is currently experimental + * and can change in the future. + * Return rows in lexiographical descending order of the row keys. The row + * contents will not be affected by this flag. + * Example result set: + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] + * + * Generated from protobuf field bool reversed = 7; + * @return bool + */ + public function getReversed() + { + return $this->reversed; + } + + /** + * Experimental API - Please note that this API is currently experimental + * and can change in the future. + * Return rows in lexiographical descending order of the row keys. The row + * contents will not be affected by this flag. + * Example result set: + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] + * + * Generated from protobuf field bool reversed = 7; + * @param bool $var + * @return $this + */ + public function setReversed($var) + { + GPBUtil::checkBool($var); + $this->reversed = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php new file mode 100644 index 000000000000..9dd641bbd6dc --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php @@ -0,0 +1,67 @@ +google.bigtable.v2.ReadRowsRequest.RequestStatsView + */ +class RequestStatsView +{ + /** + * The default / unset value. The API will default to the NONE option below. + * + * Generated from protobuf enum REQUEST_STATS_VIEW_UNSPECIFIED = 0; + */ + const REQUEST_STATS_VIEW_UNSPECIFIED = 0; + /** + * Do not include any RequestStats in the response. This will leave the + * RequestStats embedded message unset in the response. + * + * Generated from protobuf enum REQUEST_STATS_NONE = 1; + */ + const REQUEST_STATS_NONE = 1; + /** + * Include the full set of available RequestStats in the response, + * applicable to this read. + * + * Generated from protobuf enum REQUEST_STATS_FULL = 2; + */ + const REQUEST_STATS_FULL = 2; + + private static $valueToName = [ + self::REQUEST_STATS_VIEW_UNSPECIFIED => 'REQUEST_STATS_VIEW_UNSPECIFIED', + self::REQUEST_STATS_NONE => 'REQUEST_STATS_NONE', + self::REQUEST_STATS_FULL => 'REQUEST_STATS_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(RequestStatsView::class, \Google\Cloud\Bigtable\V2\ReadRowsRequest_RequestStatsView::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php new file mode 100644 index 000000000000..024cc02abc0c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php @@ -0,0 +1,233 @@ +google.bigtable.v2.ReadRowsResponse + */ +class ReadRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A collection of a row's contents as part of the read request. + * + * Generated from protobuf field repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; + */ + private $chunks; + /** + * Optionally the server might return the row key of the last row it + * has scanned. The client can use this to construct a more + * efficient retry request if needed: any row keys or portions of + * ranges less than this row key can be dropped from the request. + * This is primarily useful for cases where the server has read a + * lot of data that was filtered out since the last committed row + * key, allowing the client to skip that work on a retry. + * + * Generated from protobuf field bytes last_scanned_row_key = 2; + */ + protected $last_scanned_row_key = ''; + /** + * If requested, provide enhanced query performance statistics. The semantics + * dictate: + * * request_stats is empty on every (streamed) response, except + * * request_stats has non-empty information after all chunks have been + * streamed, where the ReadRowsResponse message only contains + * request_stats. + * * For example, if a read request would have returned an empty + * response instead a single ReadRowsResponse is streamed with empty + * chunks and request_stats filled. + * Visually, response messages will stream as follows: + * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} + * \______________________/ \________________________________/ + * Primary response Trailer of RequestStats info + * Or if the read did not return any values: + * {chunks: [], request_stats: {...}} + * \________________________________/ + * Trailer of RequestStats info + * + * Generated from protobuf field .google.bigtable.v2.RequestStats request_stats = 3; + */ + protected $request_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk>|\Google\Protobuf\Internal\RepeatedField $chunks + * A collection of a row's contents as part of the read request. + * @type string $last_scanned_row_key + * Optionally the server might return the row key of the last row it + * has scanned. The client can use this to construct a more + * efficient retry request if needed: any row keys or portions of + * ranges less than this row key can be dropped from the request. + * This is primarily useful for cases where the server has read a + * lot of data that was filtered out since the last committed row + * key, allowing the client to skip that work on a retry. + * @type \Google\Cloud\Bigtable\V2\RequestStats $request_stats + * If requested, provide enhanced query performance statistics. The semantics + * dictate: + * * request_stats is empty on every (streamed) response, except + * * request_stats has non-empty information after all chunks have been + * streamed, where the ReadRowsResponse message only contains + * request_stats. + * * For example, if a read request would have returned an empty + * response instead a single ReadRowsResponse is streamed with empty + * chunks and request_stats filled. + * Visually, response messages will stream as follows: + * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} + * \______________________/ \________________________________/ + * Primary response Trailer of RequestStats info + * Or if the read did not return any values: + * {chunks: [], request_stats: {...}} + * \________________________________/ + * Trailer of RequestStats info + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * A collection of a row's contents as part of the read request. + * + * Generated from protobuf field repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChunks() + { + return $this->chunks; + } + + /** + * A collection of a row's contents as part of the read request. + * + * Generated from protobuf field repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; + * @param array<\Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChunks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk::class); + $this->chunks = $arr; + + return $this; + } + + /** + * Optionally the server might return the row key of the last row it + * has scanned. The client can use this to construct a more + * efficient retry request if needed: any row keys or portions of + * ranges less than this row key can be dropped from the request. + * This is primarily useful for cases where the server has read a + * lot of data that was filtered out since the last committed row + * key, allowing the client to skip that work on a retry. + * + * Generated from protobuf field bytes last_scanned_row_key = 2; + * @return string + */ + public function getLastScannedRowKey() + { + return $this->last_scanned_row_key; + } + + /** + * Optionally the server might return the row key of the last row it + * has scanned. The client can use this to construct a more + * efficient retry request if needed: any row keys or portions of + * ranges less than this row key can be dropped from the request. + * This is primarily useful for cases where the server has read a + * lot of data that was filtered out since the last committed row + * key, allowing the client to skip that work on a retry. + * + * Generated from protobuf field bytes last_scanned_row_key = 2; + * @param string $var + * @return $this + */ + public function setLastScannedRowKey($var) + { + GPBUtil::checkString($var, False); + $this->last_scanned_row_key = $var; + + return $this; + } + + /** + * If requested, provide enhanced query performance statistics. The semantics + * dictate: + * * request_stats is empty on every (streamed) response, except + * * request_stats has non-empty information after all chunks have been + * streamed, where the ReadRowsResponse message only contains + * request_stats. + * * For example, if a read request would have returned an empty + * response instead a single ReadRowsResponse is streamed with empty + * chunks and request_stats filled. + * Visually, response messages will stream as follows: + * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} + * \______________________/ \________________________________/ + * Primary response Trailer of RequestStats info + * Or if the read did not return any values: + * {chunks: [], request_stats: {...}} + * \________________________________/ + * Trailer of RequestStats info + * + * Generated from protobuf field .google.bigtable.v2.RequestStats request_stats = 3; + * @return \Google\Cloud\Bigtable\V2\RequestStats|null + */ + public function getRequestStats() + { + return $this->request_stats; + } + + public function hasRequestStats() + { + return isset($this->request_stats); + } + + public function clearRequestStats() + { + unset($this->request_stats); + } + + /** + * If requested, provide enhanced query performance statistics. The semantics + * dictate: + * * request_stats is empty on every (streamed) response, except + * * request_stats has non-empty information after all chunks have been + * streamed, where the ReadRowsResponse message only contains + * request_stats. + * * For example, if a read request would have returned an empty + * response instead a single ReadRowsResponse is streamed with empty + * chunks and request_stats filled. + * Visually, response messages will stream as follows: + * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} + * \______________________/ \________________________________/ + * Primary response Trailer of RequestStats info + * Or if the read did not return any values: + * {chunks: [], request_stats: {...}} + * \________________________________/ + * Trailer of RequestStats info + * + * Generated from protobuf field .google.bigtable.v2.RequestStats request_stats = 3; + * @param \Google\Cloud\Bigtable\V2\RequestStats $var + * @return $this + */ + public function setRequestStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RequestStats::class); + $this->request_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php new file mode 100644 index 000000000000..0ff8217f7de4 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php @@ -0,0 +1,560 @@ +google.bigtable.v2.ReadRowsResponse.CellChunk + */ +class CellChunk extends \Google\Protobuf\Internal\Message +{ + /** + * The row key for this chunk of data. If the row key is empty, + * this CellChunk is a continuation of the same row as the previous + * CellChunk in the response stream, even if that CellChunk was in a + * previous ReadRowsResponse message. + * + * Generated from protobuf field bytes row_key = 1; + */ + protected $row_key = ''; + /** + * The column family name for this chunk of data. If this message + * is not present this CellChunk is a continuation of the same column + * family as the previous CellChunk. The empty string can occur as a + * column family name in a response so clients must check + * explicitly for the presence of this message, not just for + * `family_name.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.StringValue family_name = 2; + */ + protected $family_name = null; + /** + * The column qualifier for this chunk of data. If this message + * is not present, this CellChunk is a continuation of the same column + * as the previous CellChunk. Column qualifiers may be empty so + * clients must check for the presence of this message, not just + * for `qualifier.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; + */ + protected $qualifier = null; + /** + * The cell's stored timestamp, which also uniquely identifies it + * within its column. Values are always expressed in + * microseconds, but individual tables may set a coarser + * granularity to further restrict the allowed values. For + * example, a table which specifies millisecond granularity will + * only allow values of `timestamp_micros` which are multiples of + * 1000. Timestamps are only set in the first CellChunk per cell + * (for cells split into multiple chunks). + * + * Generated from protobuf field int64 timestamp_micros = 4; + */ + protected $timestamp_micros = 0; + /** + * Labels applied to the cell by a + * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set + * on the first CellChunk per cell. + * + * Generated from protobuf field repeated string labels = 5; + */ + private $labels; + /** + * The value stored in the cell. Cell values can be split across + * multiple CellChunks. In that case only the value field will be + * set in CellChunks after the first: the timestamp and labels + * will only be present in the first CellChunk, even if the first + * CellChunk came in a previous ReadRowsResponse. + * + * Generated from protobuf field bytes value = 6; + */ + protected $value = ''; + /** + * If this CellChunk is part of a chunked cell value and this is + * not the final chunk of that cell, value_size will be set to the + * total length of the cell value. The client can use this size + * to pre-allocate memory to hold the full cell value. + * + * Generated from protobuf field int32 value_size = 7; + */ + protected $value_size = 0; + protected $row_status; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $row_key + * The row key for this chunk of data. If the row key is empty, + * this CellChunk is a continuation of the same row as the previous + * CellChunk in the response stream, even if that CellChunk was in a + * previous ReadRowsResponse message. + * @type \Google\Protobuf\StringValue $family_name + * The column family name for this chunk of data. If this message + * is not present this CellChunk is a continuation of the same column + * family as the previous CellChunk. The empty string can occur as a + * column family name in a response so clients must check + * explicitly for the presence of this message, not just for + * `family_name.value` being non-empty. + * @type \Google\Protobuf\BytesValue $qualifier + * The column qualifier for this chunk of data. If this message + * is not present, this CellChunk is a continuation of the same column + * as the previous CellChunk. Column qualifiers may be empty so + * clients must check for the presence of this message, not just + * for `qualifier.value` being non-empty. + * @type int|string $timestamp_micros + * The cell's stored timestamp, which also uniquely identifies it + * within its column. Values are always expressed in + * microseconds, but individual tables may set a coarser + * granularity to further restrict the allowed values. For + * example, a table which specifies millisecond granularity will + * only allow values of `timestamp_micros` which are multiples of + * 1000. Timestamps are only set in the first CellChunk per cell + * (for cells split into multiple chunks). + * @type array|\Google\Protobuf\Internal\RepeatedField $labels + * Labels applied to the cell by a + * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set + * on the first CellChunk per cell. + * @type string $value + * The value stored in the cell. Cell values can be split across + * multiple CellChunks. In that case only the value field will be + * set in CellChunks after the first: the timestamp and labels + * will only be present in the first CellChunk, even if the first + * CellChunk came in a previous ReadRowsResponse. + * @type int $value_size + * If this CellChunk is part of a chunked cell value and this is + * not the final chunk of that cell, value_size will be set to the + * total length of the cell value. The client can use this size + * to pre-allocate memory to hold the full cell value. + * @type bool $reset_row + * Indicates that the client should drop all previous chunks for + * `row_key`, as it will be re-read from the beginning. + * @type bool $commit_row + * Indicates that the client can safely process all previous chunks for + * `row_key`, as its data has been fully read. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * The row key for this chunk of data. If the row key is empty, + * this CellChunk is a continuation of the same row as the previous + * CellChunk in the response stream, even if that CellChunk was in a + * previous ReadRowsResponse message. + * + * Generated from protobuf field bytes row_key = 1; + * @return string + */ + public function getRowKey() + { + return $this->row_key; + } + + /** + * The row key for this chunk of data. If the row key is empty, + * this CellChunk is a continuation of the same row as the previous + * CellChunk in the response stream, even if that CellChunk was in a + * previous ReadRowsResponse message. + * + * Generated from protobuf field bytes row_key = 1; + * @param string $var + * @return $this + */ + public function setRowKey($var) + { + GPBUtil::checkString($var, False); + $this->row_key = $var; + + return $this; + } + + /** + * The column family name for this chunk of data. If this message + * is not present this CellChunk is a continuation of the same column + * family as the previous CellChunk. The empty string can occur as a + * column family name in a response so clients must check + * explicitly for the presence of this message, not just for + * `family_name.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.StringValue family_name = 2; + * @return \Google\Protobuf\StringValue|null + */ + public function getFamilyName() + { + return $this->family_name; + } + + public function hasFamilyName() + { + return isset($this->family_name); + } + + public function clearFamilyName() + { + unset($this->family_name); + } + + /** + * Returns the unboxed value from getFamilyName() + + * The column family name for this chunk of data. If this message + * is not present this CellChunk is a continuation of the same column + * family as the previous CellChunk. The empty string can occur as a + * column family name in a response so clients must check + * explicitly for the presence of this message, not just for + * `family_name.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.StringValue family_name = 2; + * @return string|null + */ + public function getFamilyNameUnwrapped() + { + return $this->readWrapperValue("family_name"); + } + + /** + * The column family name for this chunk of data. If this message + * is not present this CellChunk is a continuation of the same column + * family as the previous CellChunk. The empty string can occur as a + * column family name in a response so clients must check + * explicitly for the presence of this message, not just for + * `family_name.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.StringValue family_name = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->family_name = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * The column family name for this chunk of data. If this message + * is not present this CellChunk is a continuation of the same column + * family as the previous CellChunk. The empty string can occur as a + * column family name in a response so clients must check + * explicitly for the presence of this message, not just for + * `family_name.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.StringValue family_name = 2; + * @param string|null $var + * @return $this + */ + public function setFamilyNameUnwrapped($var) + { + $this->writeWrapperValue("family_name", $var); + return $this;} + + /** + * The column qualifier for this chunk of data. If this message + * is not present, this CellChunk is a continuation of the same column + * as the previous CellChunk. Column qualifiers may be empty so + * clients must check for the presence of this message, not just + * for `qualifier.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; + * @return \Google\Protobuf\BytesValue|null + */ + public function getQualifier() + { + return $this->qualifier; + } + + public function hasQualifier() + { + return isset($this->qualifier); + } + + public function clearQualifier() + { + unset($this->qualifier); + } + + /** + * Returns the unboxed value from getQualifier() + + * The column qualifier for this chunk of data. If this message + * is not present, this CellChunk is a continuation of the same column + * as the previous CellChunk. Column qualifiers may be empty so + * clients must check for the presence of this message, not just + * for `qualifier.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; + * @return string|null + */ + public function getQualifierUnwrapped() + { + return $this->readWrapperValue("qualifier"); + } + + /** + * The column qualifier for this chunk of data. If this message + * is not present, this CellChunk is a continuation of the same column + * as the previous CellChunk. Column qualifiers may be empty so + * clients must check for the presence of this message, not just + * for `qualifier.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; + * @param \Google\Protobuf\BytesValue $var + * @return $this + */ + public function setQualifier($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BytesValue::class); + $this->qualifier = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BytesValue object. + + * The column qualifier for this chunk of data. If this message + * is not present, this CellChunk is a continuation of the same column + * as the previous CellChunk. Column qualifiers may be empty so + * clients must check for the presence of this message, not just + * for `qualifier.value` being non-empty. + * + * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; + * @param string|null $var + * @return $this + */ + public function setQualifierUnwrapped($var) + { + $this->writeWrapperValue("qualifier", $var); + return $this;} + + /** + * The cell's stored timestamp, which also uniquely identifies it + * within its column. Values are always expressed in + * microseconds, but individual tables may set a coarser + * granularity to further restrict the allowed values. For + * example, a table which specifies millisecond granularity will + * only allow values of `timestamp_micros` which are multiples of + * 1000. Timestamps are only set in the first CellChunk per cell + * (for cells split into multiple chunks). + * + * Generated from protobuf field int64 timestamp_micros = 4; + * @return int|string + */ + public function getTimestampMicros() + { + return $this->timestamp_micros; + } + + /** + * The cell's stored timestamp, which also uniquely identifies it + * within its column. Values are always expressed in + * microseconds, but individual tables may set a coarser + * granularity to further restrict the allowed values. For + * example, a table which specifies millisecond granularity will + * only allow values of `timestamp_micros` which are multiples of + * 1000. Timestamps are only set in the first CellChunk per cell + * (for cells split into multiple chunks). + * + * Generated from protobuf field int64 timestamp_micros = 4; + * @param int|string $var + * @return $this + */ + public function setTimestampMicros($var) + { + GPBUtil::checkInt64($var); + $this->timestamp_micros = $var; + + return $this; + } + + /** + * Labels applied to the cell by a + * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set + * on the first CellChunk per cell. + * + * Generated from protobuf field repeated string labels = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels applied to the cell by a + * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set + * on the first CellChunk per cell. + * + * Generated from protobuf field repeated string labels = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * The value stored in the cell. Cell values can be split across + * multiple CellChunks. In that case only the value field will be + * set in CellChunks after the first: the timestamp and labels + * will only be present in the first CellChunk, even if the first + * CellChunk came in a previous ReadRowsResponse. + * + * Generated from protobuf field bytes value = 6; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value stored in the cell. Cell values can be split across + * multiple CellChunks. In that case only the value field will be + * set in CellChunks after the first: the timestamp and labels + * will only be present in the first CellChunk, even if the first + * CellChunk came in a previous ReadRowsResponse. + * + * Generated from protobuf field bytes value = 6; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, False); + $this->value = $var; + + return $this; + } + + /** + * If this CellChunk is part of a chunked cell value and this is + * not the final chunk of that cell, value_size will be set to the + * total length of the cell value. The client can use this size + * to pre-allocate memory to hold the full cell value. + * + * Generated from protobuf field int32 value_size = 7; + * @return int + */ + public function getValueSize() + { + return $this->value_size; + } + + /** + * If this CellChunk is part of a chunked cell value and this is + * not the final chunk of that cell, value_size will be set to the + * total length of the cell value. The client can use this size + * to pre-allocate memory to hold the full cell value. + * + * Generated from protobuf field int32 value_size = 7; + * @param int $var + * @return $this + */ + public function setValueSize($var) + { + GPBUtil::checkInt32($var); + $this->value_size = $var; + + return $this; + } + + /** + * Indicates that the client should drop all previous chunks for + * `row_key`, as it will be re-read from the beginning. + * + * Generated from protobuf field bool reset_row = 8; + * @return bool + */ + public function getResetRow() + { + return $this->readOneof(8); + } + + public function hasResetRow() + { + return $this->hasOneof(8); + } + + /** + * Indicates that the client should drop all previous chunks for + * `row_key`, as it will be re-read from the beginning. + * + * Generated from protobuf field bool reset_row = 8; + * @param bool $var + * @return $this + */ + public function setResetRow($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Indicates that the client can safely process all previous chunks for + * `row_key`, as its data has been fully read. + * + * Generated from protobuf field bool commit_row = 9; + * @return bool + */ + public function getCommitRow() + { + return $this->readOneof(9); + } + + public function hasCommitRow() + { + return $this->hasOneof(9); + } + + /** + * Indicates that the client can safely process all previous chunks for + * `row_key`, as its data has been fully read. + * + * Generated from protobuf field bool commit_row = 9; + * @param bool $var + * @return $this + */ + public function setCommitRow($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getRowStatus() + { + return $this->whichOneof("row_status"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CellChunk::class, \Google\Cloud\Bigtable\V2\ReadRowsResponse_CellChunk::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php new file mode 100644 index 000000000000..26a852ba8ea8 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php @@ -0,0 +1,135 @@ +google.bigtable.v2.RequestLatencyStats + */ +class RequestLatencyStats extends \Google\Protobuf\Internal\Message +{ + /** + * The latency measured by the frontend server handling this request, from + * when the request was received, to when this value is sent back in the + * response. For more context on the component that is measuring this latency, + * see: https://cloud.google.com/bigtable/docs/overview + * Note: This value may be slightly shorter than the value reported into + * aggregate latency metrics in Monitoring for this request + * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value + * needs to be sent in the response before the latency measurement including + * that transmission is finalized. + * Note: This value includes the end-to-end latency of contacting nodes in + * the targeted cluster, e.g. measuring from when the first byte arrives at + * the frontend server, to when this value is sent back as the last value in + * the response, including any latency incurred by contacting nodes, waiting + * for results from nodes, and finally sending results from nodes back to the + * caller. + * + * Generated from protobuf field .google.protobuf.Duration frontend_server_latency = 1; + */ + protected $frontend_server_latency = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $frontend_server_latency + * The latency measured by the frontend server handling this request, from + * when the request was received, to when this value is sent back in the + * response. For more context on the component that is measuring this latency, + * see: https://cloud.google.com/bigtable/docs/overview + * Note: This value may be slightly shorter than the value reported into + * aggregate latency metrics in Monitoring for this request + * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value + * needs to be sent in the response before the latency measurement including + * that transmission is finalized. + * Note: This value includes the end-to-end latency of contacting nodes in + * the targeted cluster, e.g. measuring from when the first byte arrives at + * the frontend server, to when this value is sent back as the last value in + * the response, including any latency incurred by contacting nodes, waiting + * for results from nodes, and finally sending results from nodes back to the + * caller. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); + parent::__construct($data); + } + + /** + * The latency measured by the frontend server handling this request, from + * when the request was received, to when this value is sent back in the + * response. For more context on the component that is measuring this latency, + * see: https://cloud.google.com/bigtable/docs/overview + * Note: This value may be slightly shorter than the value reported into + * aggregate latency metrics in Monitoring for this request + * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value + * needs to be sent in the response before the latency measurement including + * that transmission is finalized. + * Note: This value includes the end-to-end latency of contacting nodes in + * the targeted cluster, e.g. measuring from when the first byte arrives at + * the frontend server, to when this value is sent back as the last value in + * the response, including any latency incurred by contacting nodes, waiting + * for results from nodes, and finally sending results from nodes back to the + * caller. + * + * Generated from protobuf field .google.protobuf.Duration frontend_server_latency = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getFrontendServerLatency() + { + return $this->frontend_server_latency; + } + + public function hasFrontendServerLatency() + { + return isset($this->frontend_server_latency); + } + + public function clearFrontendServerLatency() + { + unset($this->frontend_server_latency); + } + + /** + * The latency measured by the frontend server handling this request, from + * when the request was received, to when this value is sent back in the + * response. For more context on the component that is measuring this latency, + * see: https://cloud.google.com/bigtable/docs/overview + * Note: This value may be slightly shorter than the value reported into + * aggregate latency metrics in Monitoring for this request + * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value + * needs to be sent in the response before the latency measurement including + * that transmission is finalized. + * Note: This value includes the end-to-end latency of contacting nodes in + * the targeted cluster, e.g. measuring from when the first byte arrives at + * the frontend server, to when this value is sent back as the last value in + * the response, including any latency incurred by contacting nodes, waiting + * for results from nodes, and finally sending results from nodes back to the + * caller. + * + * Generated from protobuf field .google.protobuf.Duration frontend_server_latency = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setFrontendServerLatency($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->frontend_server_latency = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php new file mode 100644 index 000000000000..9726ac0d3f26 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php @@ -0,0 +1,81 @@ +google.bigtable.v2.RequestStats + */ +class RequestStats extends \Google\Protobuf\Internal\Message +{ + protected $stats_view; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\FullReadStatsView $full_read_stats_view + * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL + * view, see package google.bigtable.v2. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); + parent::__construct($data); + } + + /** + * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL + * view, see package google.bigtable.v2. + * + * Generated from protobuf field .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + * @return \Google\Cloud\Bigtable\V2\FullReadStatsView|null + */ + public function getFullReadStatsView() + { + return $this->readOneof(1); + } + + public function hasFullReadStatsView() + { + return $this->hasOneof(1); + } + + /** + * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL + * view, see package google.bigtable.v2. + * + * Generated from protobuf field .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + * @param \Google\Cloud\Bigtable\V2\FullReadStatsView $var + * @return $this + */ + public function setFullReadStatsView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\FullReadStatsView::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getStatsView() + { + return $this->whichOneof("stats_view"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php new file mode 100644 index 000000000000..08a68a68ff05 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php @@ -0,0 +1,128 @@ +google.bigtable.v2.ResponseParams + */ +class ResponseParams extends \Google\Protobuf\Internal\Message +{ + /** + * The cloud bigtable zone associated with the cluster. + * + * Generated from protobuf field optional string zone_id = 1; + */ + protected $zone_id = null; + /** + * Identifier for a cluster that represents set of + * bigtable resources. + * + * Generated from protobuf field optional string cluster_id = 2; + */ + protected $cluster_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $zone_id + * The cloud bigtable zone associated with the cluster. + * @type string $cluster_id + * Identifier for a cluster that represents set of + * bigtable resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\ResponseParams::initOnce(); + parent::__construct($data); + } + + /** + * The cloud bigtable zone associated with the cluster. + * + * Generated from protobuf field optional string zone_id = 1; + * @return string + */ + public function getZoneId() + { + return isset($this->zone_id) ? $this->zone_id : ''; + } + + public function hasZoneId() + { + return isset($this->zone_id); + } + + public function clearZoneId() + { + unset($this->zone_id); + } + + /** + * The cloud bigtable zone associated with the cluster. + * + * Generated from protobuf field optional string zone_id = 1; + * @param string $var + * @return $this + */ + public function setZoneId($var) + { + GPBUtil::checkString($var, True); + $this->zone_id = $var; + + return $this; + } + + /** + * Identifier for a cluster that represents set of + * bigtable resources. + * + * Generated from protobuf field optional string cluster_id = 2; + * @return string + */ + public function getClusterId() + { + return isset($this->cluster_id) ? $this->cluster_id : ''; + } + + public function hasClusterId() + { + return isset($this->cluster_id); + } + + public function clearClusterId() + { + unset($this->cluster_id); + } + + /** + * Identifier for a cluster that represents set of + * bigtable resources. + * + * Generated from protobuf field optional string cluster_id = 2; + * @param string $var + * @return $this + */ + public function setClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cluster_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResultSetMetadata.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResultSetMetadata.php new file mode 100644 index 000000000000..9e61567a09bd --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResultSetMetadata.php @@ -0,0 +1,75 @@ +google.bigtable.v2.ResultSetMetadata + */ +class ResultSetMetadata extends \Google\Protobuf\Internal\Message +{ + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\ProtoSchema $proto_schema + * Schema in proto format + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Schema in proto format + * + * Generated from protobuf field .google.bigtable.v2.ProtoSchema proto_schema = 1; + * @return \Google\Cloud\Bigtable\V2\ProtoSchema|null + */ + public function getProtoSchema() + { + return $this->readOneof(1); + } + + public function hasProtoSchema() + { + return $this->hasOneof(1); + } + + /** + * Schema in proto format + * + * Generated from protobuf field .google.bigtable.v2.ProtoSchema proto_schema = 1; + * @param \Google\Cloud\Bigtable\V2\ProtoSchema $var + * @return $this + */ + public function setProtoSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ProtoSchema::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php new file mode 100644 index 000000000000..ad1d56187e7a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php @@ -0,0 +1,114 @@ +google.bigtable.v2.Row + */ +class Row extends \Google\Protobuf\Internal\Message +{ + /** + * The unique key which identifies this row within its table. This is the same + * key that's used to identify the row in, for example, a MutateRowRequest. + * May contain any non-empty byte string up to 4KiB in length. + * + * Generated from protobuf field bytes key = 1; + */ + protected $key = ''; + /** + * May be empty, but only if the entire row is empty. + * The mutual ordering of column families is not specified. + * + * Generated from protobuf field repeated .google.bigtable.v2.Family families = 2; + */ + private $families; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The unique key which identifies this row within its table. This is the same + * key that's used to identify the row in, for example, a MutateRowRequest. + * May contain any non-empty byte string up to 4KiB in length. + * @type array<\Google\Cloud\Bigtable\V2\Family>|\Google\Protobuf\Internal\RepeatedField $families + * May be empty, but only if the entire row is empty. + * The mutual ordering of column families is not specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The unique key which identifies this row within its table. This is the same + * key that's used to identify the row in, for example, a MutateRowRequest. + * May contain any non-empty byte string up to 4KiB in length. + * + * Generated from protobuf field bytes key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The unique key which identifies this row within its table. This is the same + * key that's used to identify the row in, for example, a MutateRowRequest. + * May contain any non-empty byte string up to 4KiB in length. + * + * Generated from protobuf field bytes key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, False); + $this->key = $var; + + return $this; + } + + /** + * May be empty, but only if the entire row is empty. + * The mutual ordering of column families is not specified. + * + * Generated from protobuf field repeated .google.bigtable.v2.Family families = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFamilies() + { + return $this->families; + } + + /** + * May be empty, but only if the entire row is empty. + * The mutual ordering of column families is not specified. + * + * Generated from protobuf field repeated .google.bigtable.v2.Family families = 2; + * @param array<\Google\Cloud\Bigtable\V2\Family>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFamilies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Family::class); + $this->families = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php new file mode 100644 index 000000000000..3d05e40a7922 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php @@ -0,0 +1,990 @@ +google.bigtable.v2.RowFilter + */ +class RowFilter extends \Google\Protobuf\Internal\Message +{ + protected $filter; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\RowFilter\Chain $chain + * Applies several RowFilters to the data in sequence, progressively + * narrowing the results. + * @type \Google\Cloud\Bigtable\V2\RowFilter\Interleave $interleave + * Applies several RowFilters to the data in parallel and combines the + * results. + * @type \Google\Cloud\Bigtable\V2\RowFilter\Condition $condition + * Applies one of two possible RowFilters to the data based on the output of + * a predicate RowFilter. + * @type bool $sink + * ADVANCED USE ONLY. + * Hook for introspection into the RowFilter. Outputs all cells directly to + * the output of the read rather than to any parent filter. Consider the + * following example: + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched + * Despite being excluded by the qualifier filter, a copy of every cell + * that reaches the sink is present in the final result. + * As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], + * duplicate cells are possible, and appear in an unspecified mutual order. + * In this case we have a duplicate with column "A:B" and timestamp 2, + * because one copy passed through the all filter while the other was + * passed through the label and sink. Note that one copy has label "foo", + * while the other does not. + * Cannot be used within the `predicate_filter`, `true_filter`, or + * `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. + * @type bool $pass_all_filter + * Matches all cells, regardless of input. Functionally equivalent to + * leaving `filter` unset, but included for completeness. + * @type bool $block_all_filter + * Does not match any cells, regardless of input. Useful for temporarily + * disabling just part of a filter. + * @type string $row_key_regex_filter + * Matches only cells from rows whose keys satisfy the given RE2 regex. In + * other words, passes through the entire row when the key matches, and + * otherwise produces an empty row. + * Note that, since row keys can contain arbitrary bytes, the `\C` escape + * sequence must be used if a true wildcard is desired. The `.` character + * will not match the new line character `\n`, which may be present in a + * binary key. + * @type float $row_sample_filter + * Matches all cells from a row with probability p, and matches no cells + * from the row with probability 1-p. + * @type string $family_name_regex_filter + * Matches only cells from columns whose families satisfy the given RE2 + * regex. For technical reasons, the regex must not contain the `:` + * character, even if it is not being used as a literal. + * Note that, since column families cannot contain the new line character + * `\n`, it is sufficient to use `.` as a full wildcard when matching + * column family names. + * @type string $column_qualifier_regex_filter + * Matches only cells from columns whose qualifiers satisfy the given RE2 + * regex. + * Note that, since column qualifiers can contain arbitrary bytes, the `\C` + * escape sequence must be used if a true wildcard is desired. The `.` + * character will not match the new line character `\n`, which may be + * present in a binary qualifier. + * @type \Google\Cloud\Bigtable\V2\ColumnRange $column_range_filter + * Matches only cells from columns within the given range. + * @type \Google\Cloud\Bigtable\V2\TimestampRange $timestamp_range_filter + * Matches only cells with timestamps within the given range. + * @type string $value_regex_filter + * Matches only cells with values that satisfy the given regular expression. + * Note that, since cell values can contain arbitrary bytes, the `\C` escape + * sequence must be used if a true wildcard is desired. The `.` character + * will not match the new line character `\n`, which may be present in a + * binary value. + * @type \Google\Cloud\Bigtable\V2\ValueRange $value_range_filter + * Matches only cells with values that fall within the given range. + * @type int $cells_per_row_offset_filter + * Skips the first N cells of each row, matching all subsequent cells. + * If duplicate cells are present, as is possible when using an Interleave, + * each copy of the cell is counted separately. + * @type int $cells_per_row_limit_filter + * Matches only the first N cells of each row. + * If duplicate cells are present, as is possible when using an Interleave, + * each copy of the cell is counted separately. + * @type int $cells_per_column_limit_filter + * Matches only the most recent N cells within each column. For example, + * if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, + * skip all earlier cells in `foo:bar`, and then begin matching again in + * column `foo:bar2`. + * If duplicate cells are present, as is possible when using an Interleave, + * each copy of the cell is counted separately. + * @type bool $strip_value_transformer + * Replaces each cell's value with the empty string. + * @type string $apply_label_transformer + * Applies the given label to all cells in the output row. This allows + * the client to determine which results were produced from which part of + * the filter. + * Values must be at most 15 characters in length, and match the RE2 + * pattern `[a-z0-9\\-]+` + * Due to a technical limitation, it is not currently possible to apply + * multiple labels to a cell. As a result, a Chain may have no more than + * one sub-filter which contains a `apply_label_transformer`. It is okay for + * an Interleave to contain multiple `apply_label_transformers`, as they + * will be applied to separate copies of the input. This may be relaxed in + * the future. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Applies several RowFilters to the data in sequence, progressively + * narrowing the results. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter.Chain chain = 1; + * @return \Google\Cloud\Bigtable\V2\RowFilter\Chain|null + */ + public function getChain() + { + return $this->readOneof(1); + } + + public function hasChain() + { + return $this->hasOneof(1); + } + + /** + * Applies several RowFilters to the data in sequence, progressively + * narrowing the results. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter.Chain chain = 1; + * @param \Google\Cloud\Bigtable\V2\RowFilter\Chain $var + * @return $this + */ + public function setChain($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter\Chain::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Applies several RowFilters to the data in parallel and combines the + * results. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter.Interleave interleave = 2; + * @return \Google\Cloud\Bigtable\V2\RowFilter\Interleave|null + */ + public function getInterleave() + { + return $this->readOneof(2); + } + + public function hasInterleave() + { + return $this->hasOneof(2); + } + + /** + * Applies several RowFilters to the data in parallel and combines the + * results. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter.Interleave interleave = 2; + * @param \Google\Cloud\Bigtable\V2\RowFilter\Interleave $var + * @return $this + */ + public function setInterleave($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter\Interleave::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Applies one of two possible RowFilters to the data based on the output of + * a predicate RowFilter. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter.Condition condition = 3; + * @return \Google\Cloud\Bigtable\V2\RowFilter\Condition|null + */ + public function getCondition() + { + return $this->readOneof(3); + } + + public function hasCondition() + { + return $this->hasOneof(3); + } + + /** + * Applies one of two possible RowFilters to the data based on the output of + * a predicate RowFilter. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter.Condition condition = 3; + * @param \Google\Cloud\Bigtable\V2\RowFilter\Condition $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter\Condition::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * ADVANCED USE ONLY. + * Hook for introspection into the RowFilter. Outputs all cells directly to + * the output of the read rather than to any parent filter. Consider the + * following example: + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched + * Despite being excluded by the qualifier filter, a copy of every cell + * that reaches the sink is present in the final result. + * As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], + * duplicate cells are possible, and appear in an unspecified mutual order. + * In this case we have a duplicate with column "A:B" and timestamp 2, + * because one copy passed through the all filter while the other was + * passed through the label and sink. Note that one copy has label "foo", + * while the other does not. + * Cannot be used within the `predicate_filter`, `true_filter`, or + * `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. + * + * Generated from protobuf field bool sink = 16; + * @return bool + */ + public function getSink() + { + return $this->readOneof(16); + } + + public function hasSink() + { + return $this->hasOneof(16); + } + + /** + * ADVANCED USE ONLY. + * Hook for introspection into the RowFilter. Outputs all cells directly to + * the output of the read rather than to any parent filter. Consider the + * following example: + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched + * Despite being excluded by the qualifier filter, a copy of every cell + * that reaches the sink is present in the final result. + * As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], + * duplicate cells are possible, and appear in an unspecified mutual order. + * In this case we have a duplicate with column "A:B" and timestamp 2, + * because one copy passed through the all filter while the other was + * passed through the label and sink. Note that one copy has label "foo", + * while the other does not. + * Cannot be used within the `predicate_filter`, `true_filter`, or + * `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. + * + * Generated from protobuf field bool sink = 16; + * @param bool $var + * @return $this + */ + public function setSink($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Matches all cells, regardless of input. Functionally equivalent to + * leaving `filter` unset, but included for completeness. + * + * Generated from protobuf field bool pass_all_filter = 17; + * @return bool + */ + public function getPassAllFilter() + { + return $this->readOneof(17); + } + + public function hasPassAllFilter() + { + return $this->hasOneof(17); + } + + /** + * Matches all cells, regardless of input. Functionally equivalent to + * leaving `filter` unset, but included for completeness. + * + * Generated from protobuf field bool pass_all_filter = 17; + * @param bool $var + * @return $this + */ + public function setPassAllFilter($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Does not match any cells, regardless of input. Useful for temporarily + * disabling just part of a filter. + * + * Generated from protobuf field bool block_all_filter = 18; + * @return bool + */ + public function getBlockAllFilter() + { + return $this->readOneof(18); + } + + public function hasBlockAllFilter() + { + return $this->hasOneof(18); + } + + /** + * Does not match any cells, regardless of input. Useful for temporarily + * disabling just part of a filter. + * + * Generated from protobuf field bool block_all_filter = 18; + * @param bool $var + * @return $this + */ + public function setBlockAllFilter($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Matches only cells from rows whose keys satisfy the given RE2 regex. In + * other words, passes through the entire row when the key matches, and + * otherwise produces an empty row. + * Note that, since row keys can contain arbitrary bytes, the `\C` escape + * sequence must be used if a true wildcard is desired. The `.` character + * will not match the new line character `\n`, which may be present in a + * binary key. + * + * Generated from protobuf field bytes row_key_regex_filter = 4; + * @return string + */ + public function getRowKeyRegexFilter() + { + return $this->readOneof(4); + } + + public function hasRowKeyRegexFilter() + { + return $this->hasOneof(4); + } + + /** + * Matches only cells from rows whose keys satisfy the given RE2 regex. In + * other words, passes through the entire row when the key matches, and + * otherwise produces an empty row. + * Note that, since row keys can contain arbitrary bytes, the `\C` escape + * sequence must be used if a true wildcard is desired. The `.` character + * will not match the new line character `\n`, which may be present in a + * binary key. + * + * Generated from protobuf field bytes row_key_regex_filter = 4; + * @param string $var + * @return $this + */ + public function setRowKeyRegexFilter($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Matches all cells from a row with probability p, and matches no cells + * from the row with probability 1-p. + * + * Generated from protobuf field double row_sample_filter = 14; + * @return float + */ + public function getRowSampleFilter() + { + return $this->readOneof(14); + } + + public function hasRowSampleFilter() + { + return $this->hasOneof(14); + } + + /** + * Matches all cells from a row with probability p, and matches no cells + * from the row with probability 1-p. + * + * Generated from protobuf field double row_sample_filter = 14; + * @param float $var + * @return $this + */ + public function setRowSampleFilter($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Matches only cells from columns whose families satisfy the given RE2 + * regex. For technical reasons, the regex must not contain the `:` + * character, even if it is not being used as a literal. + * Note that, since column families cannot contain the new line character + * `\n`, it is sufficient to use `.` as a full wildcard when matching + * column family names. + * + * Generated from protobuf field string family_name_regex_filter = 5; + * @return string + */ + public function getFamilyNameRegexFilter() + { + return $this->readOneof(5); + } + + public function hasFamilyNameRegexFilter() + { + return $this->hasOneof(5); + } + + /** + * Matches only cells from columns whose families satisfy the given RE2 + * regex. For technical reasons, the regex must not contain the `:` + * character, even if it is not being used as a literal. + * Note that, since column families cannot contain the new line character + * `\n`, it is sufficient to use `.` as a full wildcard when matching + * column family names. + * + * Generated from protobuf field string family_name_regex_filter = 5; + * @param string $var + * @return $this + */ + public function setFamilyNameRegexFilter($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Matches only cells from columns whose qualifiers satisfy the given RE2 + * regex. + * Note that, since column qualifiers can contain arbitrary bytes, the `\C` + * escape sequence must be used if a true wildcard is desired. The `.` + * character will not match the new line character `\n`, which may be + * present in a binary qualifier. + * + * Generated from protobuf field bytes column_qualifier_regex_filter = 6; + * @return string + */ + public function getColumnQualifierRegexFilter() + { + return $this->readOneof(6); + } + + public function hasColumnQualifierRegexFilter() + { + return $this->hasOneof(6); + } + + /** + * Matches only cells from columns whose qualifiers satisfy the given RE2 + * regex. + * Note that, since column qualifiers can contain arbitrary bytes, the `\C` + * escape sequence must be used if a true wildcard is desired. The `.` + * character will not match the new line character `\n`, which may be + * present in a binary qualifier. + * + * Generated from protobuf field bytes column_qualifier_regex_filter = 6; + * @param string $var + * @return $this + */ + public function setColumnQualifierRegexFilter($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Matches only cells from columns within the given range. + * + * Generated from protobuf field .google.bigtable.v2.ColumnRange column_range_filter = 7; + * @return \Google\Cloud\Bigtable\V2\ColumnRange|null + */ + public function getColumnRangeFilter() + { + return $this->readOneof(7); + } + + public function hasColumnRangeFilter() + { + return $this->hasOneof(7); + } + + /** + * Matches only cells from columns within the given range. + * + * Generated from protobuf field .google.bigtable.v2.ColumnRange column_range_filter = 7; + * @param \Google\Cloud\Bigtable\V2\ColumnRange $var + * @return $this + */ + public function setColumnRangeFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ColumnRange::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Matches only cells with timestamps within the given range. + * + * Generated from protobuf field .google.bigtable.v2.TimestampRange timestamp_range_filter = 8; + * @return \Google\Cloud\Bigtable\V2\TimestampRange|null + */ + public function getTimestampRangeFilter() + { + return $this->readOneof(8); + } + + public function hasTimestampRangeFilter() + { + return $this->hasOneof(8); + } + + /** + * Matches only cells with timestamps within the given range. + * + * Generated from protobuf field .google.bigtable.v2.TimestampRange timestamp_range_filter = 8; + * @param \Google\Cloud\Bigtable\V2\TimestampRange $var + * @return $this + */ + public function setTimestampRangeFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\TimestampRange::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Matches only cells with values that satisfy the given regular expression. + * Note that, since cell values can contain arbitrary bytes, the `\C` escape + * sequence must be used if a true wildcard is desired. The `.` character + * will not match the new line character `\n`, which may be present in a + * binary value. + * + * Generated from protobuf field bytes value_regex_filter = 9; + * @return string + */ + public function getValueRegexFilter() + { + return $this->readOneof(9); + } + + public function hasValueRegexFilter() + { + return $this->hasOneof(9); + } + + /** + * Matches only cells with values that satisfy the given regular expression. + * Note that, since cell values can contain arbitrary bytes, the `\C` escape + * sequence must be used if a true wildcard is desired. The `.` character + * will not match the new line character `\n`, which may be present in a + * binary value. + * + * Generated from protobuf field bytes value_regex_filter = 9; + * @param string $var + * @return $this + */ + public function setValueRegexFilter($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Matches only cells with values that fall within the given range. + * + * Generated from protobuf field .google.bigtable.v2.ValueRange value_range_filter = 15; + * @return \Google\Cloud\Bigtable\V2\ValueRange|null + */ + public function getValueRangeFilter() + { + return $this->readOneof(15); + } + + public function hasValueRangeFilter() + { + return $this->hasOneof(15); + } + + /** + * Matches only cells with values that fall within the given range. + * + * Generated from protobuf field .google.bigtable.v2.ValueRange value_range_filter = 15; + * @param \Google\Cloud\Bigtable\V2\ValueRange $var + * @return $this + */ + public function setValueRangeFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ValueRange::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Skips the first N cells of each row, matching all subsequent cells. + * If duplicate cells are present, as is possible when using an Interleave, + * each copy of the cell is counted separately. + * + * Generated from protobuf field int32 cells_per_row_offset_filter = 10; + * @return int + */ + public function getCellsPerRowOffsetFilter() + { + return $this->readOneof(10); + } + + public function hasCellsPerRowOffsetFilter() + { + return $this->hasOneof(10); + } + + /** + * Skips the first N cells of each row, matching all subsequent cells. + * If duplicate cells are present, as is possible when using an Interleave, + * each copy of the cell is counted separately. + * + * Generated from protobuf field int32 cells_per_row_offset_filter = 10; + * @param int $var + * @return $this + */ + public function setCellsPerRowOffsetFilter($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Matches only the first N cells of each row. + * If duplicate cells are present, as is possible when using an Interleave, + * each copy of the cell is counted separately. + * + * Generated from protobuf field int32 cells_per_row_limit_filter = 11; + * @return int + */ + public function getCellsPerRowLimitFilter() + { + return $this->readOneof(11); + } + + public function hasCellsPerRowLimitFilter() + { + return $this->hasOneof(11); + } + + /** + * Matches only the first N cells of each row. + * If duplicate cells are present, as is possible when using an Interleave, + * each copy of the cell is counted separately. + * + * Generated from protobuf field int32 cells_per_row_limit_filter = 11; + * @param int $var + * @return $this + */ + public function setCellsPerRowLimitFilter($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Matches only the most recent N cells within each column. For example, + * if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, + * skip all earlier cells in `foo:bar`, and then begin matching again in + * column `foo:bar2`. + * If duplicate cells are present, as is possible when using an Interleave, + * each copy of the cell is counted separately. + * + * Generated from protobuf field int32 cells_per_column_limit_filter = 12; + * @return int + */ + public function getCellsPerColumnLimitFilter() + { + return $this->readOneof(12); + } + + public function hasCellsPerColumnLimitFilter() + { + return $this->hasOneof(12); + } + + /** + * Matches only the most recent N cells within each column. For example, + * if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, + * skip all earlier cells in `foo:bar`, and then begin matching again in + * column `foo:bar2`. + * If duplicate cells are present, as is possible when using an Interleave, + * each copy of the cell is counted separately. + * + * Generated from protobuf field int32 cells_per_column_limit_filter = 12; + * @param int $var + * @return $this + */ + public function setCellsPerColumnLimitFilter($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Replaces each cell's value with the empty string. + * + * Generated from protobuf field bool strip_value_transformer = 13; + * @return bool + */ + public function getStripValueTransformer() + { + return $this->readOneof(13); + } + + public function hasStripValueTransformer() + { + return $this->hasOneof(13); + } + + /** + * Replaces each cell's value with the empty string. + * + * Generated from protobuf field bool strip_value_transformer = 13; + * @param bool $var + * @return $this + */ + public function setStripValueTransformer($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Applies the given label to all cells in the output row. This allows + * the client to determine which results were produced from which part of + * the filter. + * Values must be at most 15 characters in length, and match the RE2 + * pattern `[a-z0-9\\-]+` + * Due to a technical limitation, it is not currently possible to apply + * multiple labels to a cell. As a result, a Chain may have no more than + * one sub-filter which contains a `apply_label_transformer`. It is okay for + * an Interleave to contain multiple `apply_label_transformers`, as they + * will be applied to separate copies of the input. This may be relaxed in + * the future. + * + * Generated from protobuf field string apply_label_transformer = 19; + * @return string + */ + public function getApplyLabelTransformer() + { + return $this->readOneof(19); + } + + public function hasApplyLabelTransformer() + { + return $this->hasOneof(19); + } + + /** + * Applies the given label to all cells in the output row. This allows + * the client to determine which results were produced from which part of + * the filter. + * Values must be at most 15 characters in length, and match the RE2 + * pattern `[a-z0-9\\-]+` + * Due to a technical limitation, it is not currently possible to apply + * multiple labels to a cell. As a result, a Chain may have no more than + * one sub-filter which contains a `apply_label_transformer`. It is okay for + * an Interleave to contain multiple `apply_label_transformers`, as they + * will be applied to separate copies of the input. This may be relaxed in + * the future. + * + * Generated from protobuf field string apply_label_transformer = 19; + * @param string $var + * @return $this + */ + public function setApplyLabelTransformer($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * @return string + */ + public function getFilter() + { + return $this->whichOneof("filter"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php new file mode 100644 index 000000000000..5d9a60a3cea2 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php @@ -0,0 +1,78 @@ +google.bigtable.v2.RowFilter.Chain + */ +class Chain extends \Google\Protobuf\Internal\Message +{ + /** + * The elements of "filters" are chained together to process the input row: + * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row + * The full chain is executed atomically. + * + * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; + */ + private $filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $filters + * The elements of "filters" are chained together to process the input row: + * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row + * The full chain is executed atomically. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The elements of "filters" are chained together to process the input row: + * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row + * The full chain is executed atomically. + * + * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilters() + { + return $this->filters; + } + + /** + * The elements of "filters" are chained together to process the input row: + * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row + * The full chain is executed atomically. + * + * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; + * @param array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\RowFilter::class); + $this->filters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Chain::class, \Google\Cloud\Bigtable\V2\RowFilter_Chain::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php new file mode 100644 index 000000000000..f7e66bf81817 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php @@ -0,0 +1,189 @@ +google.bigtable.v2.RowFilter.Condition + */ +class Condition extends \Google\Protobuf\Internal\Message +{ + /** + * If `predicate_filter` outputs any cells, then `true_filter` will be + * evaluated on the input row. Otherwise, `false_filter` will be evaluated. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 1; + */ + protected $predicate_filter = null; + /** + * The filter to apply to the input row if `predicate_filter` returns any + * results. If not provided, no results will be returned in the true case. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter true_filter = 2; + */ + protected $true_filter = null; + /** + * The filter to apply to the input row if `predicate_filter` does not + * return any results. If not provided, no results will be returned in the + * false case. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter false_filter = 3; + */ + protected $false_filter = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\RowFilter $predicate_filter + * If `predicate_filter` outputs any cells, then `true_filter` will be + * evaluated on the input row. Otherwise, `false_filter` will be evaluated. + * @type \Google\Cloud\Bigtable\V2\RowFilter $true_filter + * The filter to apply to the input row if `predicate_filter` returns any + * results. If not provided, no results will be returned in the true case. + * @type \Google\Cloud\Bigtable\V2\RowFilter $false_filter + * The filter to apply to the input row if `predicate_filter` does not + * return any results. If not provided, no results will be returned in the + * false case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * If `predicate_filter` outputs any cells, then `true_filter` will be + * evaluated on the input row. Otherwise, `false_filter` will be evaluated. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 1; + * @return \Google\Cloud\Bigtable\V2\RowFilter|null + */ + public function getPredicateFilter() + { + return $this->predicate_filter; + } + + public function hasPredicateFilter() + { + return isset($this->predicate_filter); + } + + public function clearPredicateFilter() + { + unset($this->predicate_filter); + } + + /** + * If `predicate_filter` outputs any cells, then `true_filter` will be + * evaluated on the input row. Otherwise, `false_filter` will be evaluated. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 1; + * @param \Google\Cloud\Bigtable\V2\RowFilter $var + * @return $this + */ + public function setPredicateFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); + $this->predicate_filter = $var; + + return $this; + } + + /** + * The filter to apply to the input row if `predicate_filter` returns any + * results. If not provided, no results will be returned in the true case. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter true_filter = 2; + * @return \Google\Cloud\Bigtable\V2\RowFilter|null + */ + public function getTrueFilter() + { + return $this->true_filter; + } + + public function hasTrueFilter() + { + return isset($this->true_filter); + } + + public function clearTrueFilter() + { + unset($this->true_filter); + } + + /** + * The filter to apply to the input row if `predicate_filter` returns any + * results. If not provided, no results will be returned in the true case. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter true_filter = 2; + * @param \Google\Cloud\Bigtable\V2\RowFilter $var + * @return $this + */ + public function setTrueFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); + $this->true_filter = $var; + + return $this; + } + + /** + * The filter to apply to the input row if `predicate_filter` does not + * return any results. If not provided, no results will be returned in the + * false case. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter false_filter = 3; + * @return \Google\Cloud\Bigtable\V2\RowFilter|null + */ + public function getFalseFilter() + { + return $this->false_filter; + } + + public function hasFalseFilter() + { + return isset($this->false_filter); + } + + public function clearFalseFilter() + { + unset($this->false_filter); + } + + /** + * The filter to apply to the input row if `predicate_filter` does not + * return any results. If not provided, no results will be returned in the + * false case. + * + * Generated from protobuf field .google.bigtable.v2.RowFilter false_filter = 3; + * @param \Google\Cloud\Bigtable\V2\RowFilter $var + * @return $this + */ + public function setFalseFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); + $this->false_filter = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Condition::class, \Google\Cloud\Bigtable\V2\RowFilter_Condition::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php new file mode 100644 index 000000000000..92485f18e91d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php @@ -0,0 +1,159 @@ +google.bigtable.v2.RowFilter.Interleave + */ +class Interleave extends \Google\Protobuf\Internal\Message +{ + /** + * The elements of "filters" all process a copy of the input row, and the + * results are pooled, sorted, and combined into a single output row. + * If multiple cells are produced with the same column and timestamp, + * they will all appear in the output row in an unspecified mutual order. + * Consider the following example, with three filters: + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 + * All interleaved filters are executed atomically. + * + * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; + */ + private $filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $filters + * The elements of "filters" all process a copy of the input row, and the + * results are pooled, sorted, and combined into a single output row. + * If multiple cells are produced with the same column and timestamp, + * they will all appear in the output row in an unspecified mutual order. + * Consider the following example, with three filters: + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 + * All interleaved filters are executed atomically. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The elements of "filters" all process a copy of the input row, and the + * results are pooled, sorted, and combined into a single output row. + * If multiple cells are produced with the same column and timestamp, + * they will all appear in the output row in an unspecified mutual order. + * Consider the following example, with three filters: + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 + * All interleaved filters are executed atomically. + * + * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilters() + { + return $this->filters; + } + + /** + * The elements of "filters" all process a copy of the input row, and the + * results are pooled, sorted, and combined into a single output row. + * If multiple cells are produced with the same column and timestamp, + * they will all appear in the output row in an unspecified mutual order. + * Consider the following example, with three filters: + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 + * All interleaved filters are executed atomically. + * + * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; + * @param array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\RowFilter::class); + $this->filters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Interleave::class, \Google\Cloud\Bigtable\V2\RowFilter_Interleave::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php new file mode 100644 index 000000000000..f4782f92295a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php @@ -0,0 +1,183 @@ +google.bigtable.v2.RowRange + */ +class RowRange extends \Google\Protobuf\Internal\Message +{ + protected $start_key; + protected $end_key; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_key_closed + * Used when giving an inclusive lower bound for the range. + * @type string $start_key_open + * Used when giving an exclusive lower bound for the range. + * @type string $end_key_open + * Used when giving an exclusive upper bound for the range. + * @type string $end_key_closed + * Used when giving an inclusive upper bound for the range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Used when giving an inclusive lower bound for the range. + * + * Generated from protobuf field bytes start_key_closed = 1; + * @return string + */ + public function getStartKeyClosed() + { + return $this->readOneof(1); + } + + public function hasStartKeyClosed() + { + return $this->hasOneof(1); + } + + /** + * Used when giving an inclusive lower bound for the range. + * + * Generated from protobuf field bytes start_key_closed = 1; + * @param string $var + * @return $this + */ + public function setStartKeyClosed($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Used when giving an exclusive lower bound for the range. + * + * Generated from protobuf field bytes start_key_open = 2; + * @return string + */ + public function getStartKeyOpen() + { + return $this->readOneof(2); + } + + public function hasStartKeyOpen() + { + return $this->hasOneof(2); + } + + /** + * Used when giving an exclusive lower bound for the range. + * + * Generated from protobuf field bytes start_key_open = 2; + * @param string $var + * @return $this + */ + public function setStartKeyOpen($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Used when giving an exclusive upper bound for the range. + * + * Generated from protobuf field bytes end_key_open = 3; + * @return string + */ + public function getEndKeyOpen() + { + return $this->readOneof(3); + } + + public function hasEndKeyOpen() + { + return $this->hasOneof(3); + } + + /** + * Used when giving an exclusive upper bound for the range. + * + * Generated from protobuf field bytes end_key_open = 3; + * @param string $var + * @return $this + */ + public function setEndKeyOpen($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Used when giving an inclusive upper bound for the range. + * + * Generated from protobuf field bytes end_key_closed = 4; + * @return string + */ + public function getEndKeyClosed() + { + return $this->readOneof(4); + } + + public function hasEndKeyClosed() + { + return $this->hasOneof(4); + } + + /** + * Used when giving an inclusive upper bound for the range. + * + * Generated from protobuf field bytes end_key_closed = 4; + * @param string $var + * @return $this + */ + public function setEndKeyClosed($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getStartKey() + { + return $this->whichOneof("start_key"); + } + + /** + * @return string + */ + public function getEndKey() + { + return $this->whichOneof("end_key"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php new file mode 100644 index 000000000000..5c8335823bb8 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php @@ -0,0 +1,101 @@ +google.bigtable.v2.RowSet + */ +class RowSet extends \Google\Protobuf\Internal\Message +{ + /** + * Single rows included in the set. + * + * Generated from protobuf field repeated bytes row_keys = 1; + */ + private $row_keys; + /** + * Contiguous row ranges included in the set. + * + * Generated from protobuf field repeated .google.bigtable.v2.RowRange row_ranges = 2; + */ + private $row_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $row_keys + * Single rows included in the set. + * @type array<\Google\Cloud\Bigtable\V2\RowRange>|\Google\Protobuf\Internal\RepeatedField $row_ranges + * Contiguous row ranges included in the set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Single rows included in the set. + * + * Generated from protobuf field repeated bytes row_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRowKeys() + { + return $this->row_keys; + } + + /** + * Single rows included in the set. + * + * Generated from protobuf field repeated bytes row_keys = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRowKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->row_keys = $arr; + + return $this; + } + + /** + * Contiguous row ranges included in the set. + * + * Generated from protobuf field repeated .google.bigtable.v2.RowRange row_ranges = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRowRanges() + { + return $this->row_ranges; + } + + /** + * Contiguous row ranges included in the set. + * + * Generated from protobuf field repeated .google.bigtable.v2.RowRange row_ranges = 2; + * @param array<\Google\Cloud\Bigtable\V2\RowRange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRowRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\RowRange::class); + $this->row_ranges = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php new file mode 100644 index 000000000000..de1a618ad0bc --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php @@ -0,0 +1,196 @@ +google.bigtable.v2.SampleRowKeysRequest + */ +class SampleRowKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique name of the table from which to sample row keys. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $authorized_view_name = ''; + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 2; + */ + protected $app_profile_id = ''; + + /** + * @param string $tableName Optional. The unique name of the table from which to sample row keys. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\V2\SampleRowKeysRequest + * + * @experimental + */ + public static function build(string $tableName): self + { + return (new self()) + ->setTableName($tableName); + } + + /** + * @param string $tableName Optional. The unique name of the table from which to sample row keys. + * + * Values are of the form + * `projects//instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $appProfileId This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * @return \Google\Cloud\Bigtable\V2\SampleRowKeysRequest + * + * @experimental + */ + public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self + { + return (new self()) + ->setTableName($tableName) + ->setAppProfileId($appProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table_name + * Optional. The unique name of the table from which to sample row keys. + * Values are of the form + * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * @type string $app_profile_id + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique name of the table from which to sample row keys. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTableName() + { + return $this->table_name; + } + + /** + * Optional. The unique name of the table from which to sample row keys. + * Values are of the form + * `projects//instances//tables/
`. + * + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTableName($var) + { + GPBUtil::checkString($var, True); + $this->table_name = $var; + + return $this; + } + + /** + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 2; + * @return string + */ + public function getAppProfileId() + { + return $this->app_profile_id; + } + + /** + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * + * Generated from protobuf field string app_profile_id = 2; + * @param string $var + * @return $this + */ + public function setAppProfileId($var) + { + GPBUtil::checkString($var, True); + $this->app_profile_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php new file mode 100644 index 000000000000..1c38c831d343 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php @@ -0,0 +1,137 @@ +google.bigtable.v2.SampleRowKeysResponse + */ +class SampleRowKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Sorted streamed sequence of sample row keys in the table. The table might + * have contents before the first row key in the list and after the last one, + * but a key containing the empty string indicates "end of table" and will be + * the last response given, if present. + * Note that row keys in this list may not have ever been written to or read + * from, and users should therefore not make any assumptions about the row key + * structure that are specific to their use case. + * + * Generated from protobuf field bytes row_key = 1; + */ + protected $row_key = ''; + /** + * Approximate total storage space used by all rows in the table which precede + * `row_key`. Buffering the contents of all rows between two subsequent + * samples would require space roughly equal to the difference in their + * `offset_bytes` fields. + * + * Generated from protobuf field int64 offset_bytes = 2; + */ + protected $offset_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $row_key + * Sorted streamed sequence of sample row keys in the table. The table might + * have contents before the first row key in the list and after the last one, + * but a key containing the empty string indicates "end of table" and will be + * the last response given, if present. + * Note that row keys in this list may not have ever been written to or read + * from, and users should therefore not make any assumptions about the row key + * structure that are specific to their use case. + * @type int|string $offset_bytes + * Approximate total storage space used by all rows in the table which precede + * `row_key`. Buffering the contents of all rows between two subsequent + * samples would require space roughly equal to the difference in their + * `offset_bytes` fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); + parent::__construct($data); + } + + /** + * Sorted streamed sequence of sample row keys in the table. The table might + * have contents before the first row key in the list and after the last one, + * but a key containing the empty string indicates "end of table" and will be + * the last response given, if present. + * Note that row keys in this list may not have ever been written to or read + * from, and users should therefore not make any assumptions about the row key + * structure that are specific to their use case. + * + * Generated from protobuf field bytes row_key = 1; + * @return string + */ + public function getRowKey() + { + return $this->row_key; + } + + /** + * Sorted streamed sequence of sample row keys in the table. The table might + * have contents before the first row key in the list and after the last one, + * but a key containing the empty string indicates "end of table" and will be + * the last response given, if present. + * Note that row keys in this list may not have ever been written to or read + * from, and users should therefore not make any assumptions about the row key + * structure that are specific to their use case. + * + * Generated from protobuf field bytes row_key = 1; + * @param string $var + * @return $this + */ + public function setRowKey($var) + { + GPBUtil::checkString($var, False); + $this->row_key = $var; + + return $this; + } + + /** + * Approximate total storage space used by all rows in the table which precede + * `row_key`. Buffering the contents of all rows between two subsequent + * samples would require space roughly equal to the difference in their + * `offset_bytes` fields. + * + * Generated from protobuf field int64 offset_bytes = 2; + * @return int|string + */ + public function getOffsetBytes() + { + return $this->offset_bytes; + } + + /** + * Approximate total storage space used by all rows in the table which precede + * `row_key`. Buffering the contents of all rows between two subsequent + * samples would require space roughly equal to the difference in their + * `offset_bytes` fields. + * + * Generated from protobuf field int64 offset_bytes = 2; + * @param int|string $var + * @return $this + */ + public function setOffsetBytes($var) + { + GPBUtil::checkInt64($var); + $this->offset_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php new file mode 100644 index 000000000000..9a623c62ebaa --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php @@ -0,0 +1,113 @@ +google.bigtable.v2.StreamContinuationToken + */ +class StreamContinuationToken extends \Google\Protobuf\Internal\Message +{ + /** + * The partition that this token applies to. + * + * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; + */ + protected $partition = null; + /** + * An encoded position in the stream to restart reading from. + * + * Generated from protobuf field string token = 2; + */ + protected $token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\StreamPartition $partition + * The partition that this token applies to. + * @type string $token + * An encoded position in the stream to restart reading from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The partition that this token applies to. + * + * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; + * @return \Google\Cloud\Bigtable\V2\StreamPartition|null + */ + public function getPartition() + { + return $this->partition; + } + + public function hasPartition() + { + return isset($this->partition); + } + + public function clearPartition() + { + unset($this->partition); + } + + /** + * The partition that this token applies to. + * + * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; + * @param \Google\Cloud\Bigtable\V2\StreamPartition $var + * @return $this + */ + public function setPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamPartition::class); + $this->partition = $var; + + return $this; + } + + /** + * An encoded position in the stream to restart reading from. + * + * Generated from protobuf field string token = 2; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * An encoded position in the stream to restart reading from. + * + * Generated from protobuf field string token = 2; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php new file mode 100644 index 000000000000..471a816ecaeb --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php @@ -0,0 +1,69 @@ +google.bigtable.v2.StreamContinuationTokens + */ +class StreamContinuationTokens extends \Google\Protobuf\Internal\Message +{ + /** + * List of continuation tokens. + * + * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + private $tokens; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $tokens + * List of continuation tokens. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * List of continuation tokens. + * + * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * List of continuation tokens. + * + * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + * @param array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\StreamContinuationToken::class); + $this->tokens = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php new file mode 100644 index 000000000000..2efb7f58fd23 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php @@ -0,0 +1,82 @@ +google.bigtable.v2.StreamPartition + */ +class StreamPartition extends \Google\Protobuf\Internal\Message +{ + /** + * The row range covered by this partition and is specified by + * [`start_key_closed`, `end_key_open`). + * + * Generated from protobuf field .google.bigtable.v2.RowRange row_range = 1; + */ + protected $row_range = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\RowRange $row_range + * The row range covered by this partition and is specified by + * [`start_key_closed`, `end_key_open`). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The row range covered by this partition and is specified by + * [`start_key_closed`, `end_key_open`). + * + * Generated from protobuf field .google.bigtable.v2.RowRange row_range = 1; + * @return \Google\Cloud\Bigtable\V2\RowRange|null + */ + public function getRowRange() + { + return $this->row_range; + } + + public function hasRowRange() + { + return isset($this->row_range); + } + + public function clearRowRange() + { + unset($this->row_range); + } + + /** + * The row range covered by this partition and is specified by + * [`start_key_closed`, `end_key_open`). + * + * Generated from protobuf field .google.bigtable.v2.RowRange row_range = 1; + * @param \Google\Cloud\Bigtable\V2\RowRange $var + * @return $this + */ + public function setRowRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowRange::class); + $this->row_range = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php new file mode 100644 index 000000000000..ddd1bcea30d4 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php @@ -0,0 +1,101 @@ +google.bigtable.v2.TimestampRange + */ +class TimestampRange extends \Google\Protobuf\Internal\Message +{ + /** + * Inclusive lower bound. If left empty, interpreted as 0. + * + * Generated from protobuf field int64 start_timestamp_micros = 1; + */ + protected $start_timestamp_micros = 0; + /** + * Exclusive upper bound. If left empty, interpreted as infinity. + * + * Generated from protobuf field int64 end_timestamp_micros = 2; + */ + protected $end_timestamp_micros = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $start_timestamp_micros + * Inclusive lower bound. If left empty, interpreted as 0. + * @type int|string $end_timestamp_micros + * Exclusive upper bound. If left empty, interpreted as infinity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Inclusive lower bound. If left empty, interpreted as 0. + * + * Generated from protobuf field int64 start_timestamp_micros = 1; + * @return int|string + */ + public function getStartTimestampMicros() + { + return $this->start_timestamp_micros; + } + + /** + * Inclusive lower bound. If left empty, interpreted as 0. + * + * Generated from protobuf field int64 start_timestamp_micros = 1; + * @param int|string $var + * @return $this + */ + public function setStartTimestampMicros($var) + { + GPBUtil::checkInt64($var); + $this->start_timestamp_micros = $var; + + return $this; + } + + /** + * Exclusive upper bound. If left empty, interpreted as infinity. + * + * Generated from protobuf field int64 end_timestamp_micros = 2; + * @return int|string + */ + public function getEndTimestampMicros() + { + return $this->end_timestamp_micros; + } + + /** + * Exclusive upper bound. If left empty, interpreted as infinity. + * + * Generated from protobuf field int64 end_timestamp_micros = 2; + * @param int|string $var + * @return $this + */ + public function setEndTimestampMicros($var) + { + GPBUtil::checkInt64($var); + $this->end_timestamp_micros = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type.php new file mode 100644 index 000000000000..0000b3ed8eba --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type.php @@ -0,0 +1,458 @@ + INT64(-1)`, but `STRING("-00001") > STRING("00001)`. + * * Self-delimiting: If we concatenate two encoded values, can we always tell + * where the first one ends and the second one begins? + * - Example: If we encode INT64s to fixed-width STRINGs, the first value + * will always contain exactly N digits, possibly preceded by a sign. + * - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have + * no way to tell where the first one ends. + * * Compatibility: Which other systems have matching encoding schemes? For + * example, does this encoding have a GoogleSQL equivalent? HBase? Java? + * + * Generated from protobuf message google.bigtable.v2.Type + */ +class Type extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type\Bytes $bytes_type + * Bytes + * @type \Google\Cloud\Bigtable\V2\Type\PBString $string_type + * String + * @type \Google\Cloud\Bigtable\V2\Type\Int64 $int64_type + * Int64 + * @type \Google\Cloud\Bigtable\V2\Type\Float32 $float32_type + * Float32 + * @type \Google\Cloud\Bigtable\V2\Type\Float64 $float64_type + * Float64 + * @type \Google\Cloud\Bigtable\V2\Type\PBBool $bool_type + * Bool + * @type \Google\Cloud\Bigtable\V2\Type\Timestamp $timestamp_type + * Timestamp + * @type \Google\Cloud\Bigtable\V2\Type\Date $date_type + * Date + * @type \Google\Cloud\Bigtable\V2\Type\Aggregate $aggregate_type + * Aggregate + * @type \Google\Cloud\Bigtable\V2\Type\Struct $struct_type + * Struct + * @type \Google\Cloud\Bigtable\V2\Type\PBArray $array_type + * Array + * @type \Google\Cloud\Bigtable\V2\Type\Map $map_type + * Map + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Bytes + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; + * @return \Google\Cloud\Bigtable\V2\Type\Bytes|null + */ + public function getBytesType() + { + return $this->readOneof(1); + } + + public function hasBytesType() + { + return $this->hasOneof(1); + } + + /** + * Bytes + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; + * @param \Google\Cloud\Bigtable\V2\Type\Bytes $var + * @return $this + */ + public function setBytesType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Bytes::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * String + * + * Generated from protobuf field .google.bigtable.v2.Type.String string_type = 2; + * @return \Google\Cloud\Bigtable\V2\Type\PBString|null + */ + public function getStringType() + { + return $this->readOneof(2); + } + + public function hasStringType() + { + return $this->hasOneof(2); + } + + /** + * String + * + * Generated from protobuf field .google.bigtable.v2.Type.String string_type = 2; + * @param \Google\Cloud\Bigtable\V2\Type\PBString $var + * @return $this + */ + public function setStringType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBString::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Int64 + * + * Generated from protobuf field .google.bigtable.v2.Type.Int64 int64_type = 5; + * @return \Google\Cloud\Bigtable\V2\Type\Int64|null + */ + public function getInt64Type() + { + return $this->readOneof(5); + } + + public function hasInt64Type() + { + return $this->hasOneof(5); + } + + /** + * Int64 + * + * Generated from protobuf field .google.bigtable.v2.Type.Int64 int64_type = 5; + * @param \Google\Cloud\Bigtable\V2\Type\Int64 $var + * @return $this + */ + public function setInt64Type($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Int64::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Float32 + * + * Generated from protobuf field .google.bigtable.v2.Type.Float32 float32_type = 12; + * @return \Google\Cloud\Bigtable\V2\Type\Float32|null + */ + public function getFloat32Type() + { + return $this->readOneof(12); + } + + public function hasFloat32Type() + { + return $this->hasOneof(12); + } + + /** + * Float32 + * + * Generated from protobuf field .google.bigtable.v2.Type.Float32 float32_type = 12; + * @param \Google\Cloud\Bigtable\V2\Type\Float32 $var + * @return $this + */ + public function setFloat32Type($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Float32::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Float64 + * + * Generated from protobuf field .google.bigtable.v2.Type.Float64 float64_type = 9; + * @return \Google\Cloud\Bigtable\V2\Type\Float64|null + */ + public function getFloat64Type() + { + return $this->readOneof(9); + } + + public function hasFloat64Type() + { + return $this->hasOneof(9); + } + + /** + * Float64 + * + * Generated from protobuf field .google.bigtable.v2.Type.Float64 float64_type = 9; + * @param \Google\Cloud\Bigtable\V2\Type\Float64 $var + * @return $this + */ + public function setFloat64Type($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Float64::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Bool + * + * Generated from protobuf field .google.bigtable.v2.Type.Bool bool_type = 8; + * @return \Google\Cloud\Bigtable\V2\Type\PBBool|null + */ + public function getBoolType() + { + return $this->readOneof(8); + } + + public function hasBoolType() + { + return $this->hasOneof(8); + } + + /** + * Bool + * + * Generated from protobuf field .google.bigtable.v2.Type.Bool bool_type = 8; + * @param \Google\Cloud\Bigtable\V2\Type\PBBool $var + * @return $this + */ + public function setBoolType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBBool::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Timestamp + * + * Generated from protobuf field .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * @return \Google\Cloud\Bigtable\V2\Type\Timestamp|null + */ + public function getTimestampType() + { + return $this->readOneof(10); + } + + public function hasTimestampType() + { + return $this->hasOneof(10); + } + + /** + * Timestamp + * + * Generated from protobuf field .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * @param \Google\Cloud\Bigtable\V2\Type\Timestamp $var + * @return $this + */ + public function setTimestampType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Timestamp::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Date + * + * Generated from protobuf field .google.bigtable.v2.Type.Date date_type = 11; + * @return \Google\Cloud\Bigtable\V2\Type\Date|null + */ + public function getDateType() + { + return $this->readOneof(11); + } + + public function hasDateType() + { + return $this->hasOneof(11); + } + + /** + * Date + * + * Generated from protobuf field .google.bigtable.v2.Type.Date date_type = 11; + * @param \Google\Cloud\Bigtable\V2\Type\Date $var + * @return $this + */ + public function setDateType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Date::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Aggregate + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * @return \Google\Cloud\Bigtable\V2\Type\Aggregate|null + */ + public function getAggregateType() + { + return $this->readOneof(6); + } + + public function hasAggregateType() + { + return $this->hasOneof(6); + } + + /** + * Aggregate + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * @param \Google\Cloud\Bigtable\V2\Type\Aggregate $var + * @return $this + */ + public function setAggregateType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Struct + * + * Generated from protobuf field .google.bigtable.v2.Type.Struct struct_type = 7; + * @return \Google\Cloud\Bigtable\V2\Type\Struct|null + */ + public function getStructType() + { + return $this->readOneof(7); + } + + public function hasStructType() + { + return $this->hasOneof(7); + } + + /** + * Struct + * + * Generated from protobuf field .google.bigtable.v2.Type.Struct struct_type = 7; + * @param \Google\Cloud\Bigtable\V2\Type\Struct $var + * @return $this + */ + public function setStructType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Struct::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Array + * + * Generated from protobuf field .google.bigtable.v2.Type.Array array_type = 3; + * @return \Google\Cloud\Bigtable\V2\Type\PBArray|null + */ + public function getArrayType() + { + return $this->readOneof(3); + } + + public function hasArrayType() + { + return $this->hasOneof(3); + } + + /** + * Array + * + * Generated from protobuf field .google.bigtable.v2.Type.Array array_type = 3; + * @param \Google\Cloud\Bigtable\V2\Type\PBArray $var + * @return $this + */ + public function setArrayType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBArray::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Map + * + * Generated from protobuf field .google.bigtable.v2.Type.Map map_type = 4; + * @return \Google\Cloud\Bigtable\V2\Type\Map|null + */ + public function getMapType() + { + return $this->readOneof(4); + } + + public function hasMapType() + { + return $this->hasOneof(4); + } + + /** + * Map + * + * Generated from protobuf field .google.bigtable.v2.Type.Map map_type = 4; + * @param \Google\Cloud\Bigtable\V2\Type\Map $var + * @return $this + */ + public function setMapType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Map::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate.php new file mode 100644 index 000000000000..efd66b84d05b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate.php @@ -0,0 +1,284 @@ +google.bigtable.v2.Type.Aggregate + */ +class Aggregate extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * + * Generated from protobuf field .google.bigtable.v2.Type input_type = 1; + */ + protected $input_type = null; + /** + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * + * Generated from protobuf field .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_type = null; + protected $aggregator; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type $input_type + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * @type \Google\Cloud\Bigtable\V2\Type $state_type + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * @type \Google\Cloud\Bigtable\V2\Type\Aggregate\Sum $sum + * Sum aggregator. + * @type \Google\Cloud\Bigtable\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount $hllpp_unique_count + * HyperLogLogPlusPlusUniqueCount aggregator. + * @type \Google\Cloud\Bigtable\V2\Type\Aggregate\Max $max + * Max aggregator. + * @type \Google\Cloud\Bigtable\V2\Type\Aggregate\Min $min + * Min aggregator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * + * Generated from protobuf field .google.bigtable.v2.Type input_type = 1; + * @return \Google\Cloud\Bigtable\V2\Type|null + */ + public function getInputType() + { + return $this->input_type; + } + + public function hasInputType() + { + return isset($this->input_type); + } + + public function clearInputType() + { + unset($this->input_type); + } + + /** + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * + * Generated from protobuf field .google.bigtable.v2.Type input_type = 1; + * @param \Google\Cloud\Bigtable\V2\Type $var + * @return $this + */ + public function setInputType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); + $this->input_type = $var; + + return $this; + } + + /** + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * + * Generated from protobuf field .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Bigtable\V2\Type|null + */ + public function getStateType() + { + return $this->state_type; + } + + public function hasStateType() + { + return isset($this->state_type); + } + + public function clearStateType() + { + unset($this->state_type); + } + + /** + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * + * Generated from protobuf field .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Bigtable\V2\Type $var + * @return $this + */ + public function setStateType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); + $this->state_type = $var; + + return $this; + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + * @return \Google\Cloud\Bigtable\V2\Type\Aggregate\Sum|null + */ + public function getSum() + { + return $this->readOneof(4); + } + + public function hasSum() + { + return $this->hasOneof(4); + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + * @param \Google\Cloud\Bigtable\V2\Type\Aggregate\Sum $var + * @return $this + */ + public function setSum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate\Sum::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * HyperLogLogPlusPlusUniqueCount aggregator. + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * @return \Google\Cloud\Bigtable\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount|null + */ + public function getHllppUniqueCount() + { + return $this->readOneof(5); + } + + public function hasHllppUniqueCount() + { + return $this->hasOneof(5); + } + + /** + * HyperLogLogPlusPlusUniqueCount aggregator. + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * @param \Google\Cloud\Bigtable\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount $var + * @return $this + */ + public function setHllppUniqueCount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Max aggregator. + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Max max = 6; + * @return \Google\Cloud\Bigtable\V2\Type\Aggregate\Max|null + */ + public function getMax() + { + return $this->readOneof(6); + } + + public function hasMax() + { + return $this->hasOneof(6); + } + + /** + * Max aggregator. + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Max max = 6; + * @param \Google\Cloud\Bigtable\V2\Type\Aggregate\Max $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate\Max::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Min aggregator. + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Min min = 7; + * @return \Google\Cloud\Bigtable\V2\Type\Aggregate\Min|null + */ + public function getMin() + { + return $this->readOneof(7); + } + + public function hasMin() + { + return $this->hasOneof(7); + } + + /** + * Min aggregator. + * + * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Min min = 7; + * @param \Google\Cloud\Bigtable\V2\Type\Aggregate\Min $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate\Min::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getAggregator() + { + return $this->whichOneof("aggregator"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aggregate::class, \Google\Cloud\Bigtable\V2\Type_Aggregate::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php new file mode 100644 index 000000000000..4c4bfed012b3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php @@ -0,0 +1,42 @@ +google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + */ +class HyperLogLogPlusPlusUniqueCount extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HyperLogLogPlusPlusUniqueCount::class, \Google\Cloud\Bigtable\V2\Type_Aggregate_HyperLogLogPlusPlusUniqueCount::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Max.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Max.php new file mode 100644 index 000000000000..eb735d381cdf --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Max.php @@ -0,0 +1,38 @@ +google.bigtable.v2.Type.Aggregate.Max + */ +class Max extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Max::class, \Google\Cloud\Bigtable\V2\Type_Aggregate_Max::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Min.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Min.php new file mode 100644 index 000000000000..13500014fafb --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Min.php @@ -0,0 +1,38 @@ +google.bigtable.v2.Type.Aggregate.Min + */ +class Min extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Min::class, \Google\Cloud\Bigtable\V2\Type_Aggregate_Min::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Sum.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Sum.php new file mode 100644 index 000000000000..df53d9cbe95f --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Sum.php @@ -0,0 +1,38 @@ +google.bigtable.v2.Type.Aggregate.Sum + */ +class Sum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Sum::class, \Google\Cloud\Bigtable\V2\Type_Aggregate_Sum::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes.php new file mode 100644 index 000000000000..d917db5a3ce1 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes.php @@ -0,0 +1,81 @@ +google.bigtable.v2.Type.Bytes + */ +class Bytes extends \Google\Protobuf\Internal\Message +{ + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + */ + protected $encoding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding $encoding + * The encoding to use when converting to/from lower level types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + * @return \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding|null + */ + public function getEncoding() + { + return $this->encoding; + } + + public function hasEncoding() + { + return isset($this->encoding); + } + + public function clearEncoding() + { + unset($this->encoding); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + * @param \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding::class); + $this->encoding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Bytes::class, \Google\Cloud\Bigtable\V2\Type_Bytes::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding.php new file mode 100644 index 000000000000..c42a574fe96a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding.php @@ -0,0 +1,78 @@ +google.bigtable.v2.Type.Bytes.Encoding + */ +class Encoding extends \Google\Protobuf\Internal\Message +{ + protected $encoding; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding\Raw $raw + * Use `Raw` encoding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Use `Raw` encoding. + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + * @return \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding\Raw|null + */ + public function getRaw() + { + return $this->readOneof(1); + } + + public function hasRaw() + { + return $this->hasOneof(1); + } + + /** + * Use `Raw` encoding. + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + * @param \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding\Raw $var + * @return $this + */ + public function setRaw($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding\Raw::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncoding() + { + return $this->whichOneof("encoding"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Encoding::class, \Google\Cloud\Bigtable\V2\Type_Bytes_Encoding::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding/Raw.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding/Raw.php new file mode 100644 index 000000000000..ac7f617bb59c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding/Raw.php @@ -0,0 +1,39 @@ +google.bigtable.v2.Type.Bytes.Encoding.Raw + */ +class Raw extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Raw::class, \Google\Cloud\Bigtable\V2\Type_Bytes_Encoding_Raw::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Date.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Date.php new file mode 100644 index 000000000000..fdcf13439190 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Date.php @@ -0,0 +1,37 @@ +google.bigtable.v2.Type.Date + */ +class Date extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Date::class, \Google\Cloud\Bigtable\V2\Type_Date::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float32.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float32.php new file mode 100644 index 000000000000..fb0d845917a3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float32.php @@ -0,0 +1,37 @@ +google.bigtable.v2.Type.Float32 + */ +class Float32 extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Float32::class, \Google\Cloud\Bigtable\V2\Type_Float32::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float64.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float64.php new file mode 100644 index 000000000000..d8e9770f447a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float64.php @@ -0,0 +1,37 @@ +google.bigtable.v2.Type.Float64 + */ +class Float64 extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Float64::class, \Google\Cloud\Bigtable\V2\Type_Float64::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64.php new file mode 100644 index 000000000000..f535202b8c73 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64.php @@ -0,0 +1,81 @@ +google.bigtable.v2.Type.Int64 + */ +class Int64 extends \Google\Protobuf\Internal\Message +{ + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ + protected $encoding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type\Int64\Encoding $encoding + * The encoding to use when converting to/from lower level types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + * @return \Google\Cloud\Bigtable\V2\Type\Int64\Encoding|null + */ + public function getEncoding() + { + return $this->encoding; + } + + public function hasEncoding() + { + return isset($this->encoding); + } + + public function clearEncoding() + { + unset($this->encoding); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + * @param \Google\Cloud\Bigtable\V2\Type\Int64\Encoding $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Int64\Encoding::class); + $this->encoding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Int64::class, \Google\Cloud\Bigtable\V2\Type_Int64::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding.php new file mode 100644 index 000000000000..e9cf46b73553 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding.php @@ -0,0 +1,78 @@ +google.bigtable.v2.Type.Int64.Encoding + */ +class Encoding extends \Google\Protobuf\Internal\Message +{ + protected $encoding; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type\Int64\Encoding\BigEndianBytes $big_endian_bytes + * Use `BigEndianBytes` encoding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Use `BigEndianBytes` encoding. + * + * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * @return \Google\Cloud\Bigtable\V2\Type\Int64\Encoding\BigEndianBytes|null + */ + public function getBigEndianBytes() + { + return $this->readOneof(1); + } + + public function hasBigEndianBytes() + { + return $this->hasOneof(1); + } + + /** + * Use `BigEndianBytes` encoding. + * + * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * @param \Google\Cloud\Bigtable\V2\Type\Int64\Encoding\BigEndianBytes $var + * @return $this + */ + public function setBigEndianBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Int64\Encoding\BigEndianBytes::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncoding() + { + return $this->whichOneof("encoding"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Encoding::class, \Google\Cloud\Bigtable\V2\Type_Int64_Encoding::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding/BigEndianBytes.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding/BigEndianBytes.php new file mode 100644 index 000000000000..50020d3b2248 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding/BigEndianBytes.php @@ -0,0 +1,87 @@ +google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + */ +class BigEndianBytes extends \Google\Protobuf\Internal\Message +{ + /** + * Deprecated: ignored if set. + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + protected $bytes_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type\Bytes $bytes_type + * Deprecated: ignored if set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Deprecated: ignored if set. + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; + * @return \Google\Cloud\Bigtable\V2\Type\Bytes|null + */ + public function getBytesType() + { + return $this->bytes_type; + } + + public function hasBytesType() + { + return isset($this->bytes_type); + } + + public function clearBytesType() + { + unset($this->bytes_type); + } + + /** + * Deprecated: ignored if set. + * + * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; + * @param \Google\Cloud\Bigtable\V2\Type\Bytes $var + * @return $this + */ + public function setBytesType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Bytes::class); + $this->bytes_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigEndianBytes::class, \Google\Cloud\Bigtable\V2\Type_Int64_Encoding_BigEndianBytes::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Map.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Map.php new file mode 100644 index 000000000000..3e1ca5948521 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Map.php @@ -0,0 +1,134 @@ +google.bigtable.v2.Type.Map + */ +class Map extends \Google\Protobuf\Internal\Message +{ + /** + * The type of a map key. + * Only `Bytes`, `String`, and `Int64` are allowed as key types. + * + * Generated from protobuf field .google.bigtable.v2.Type key_type = 1; + */ + protected $key_type = null; + /** + * The type of the values in a map. + * + * Generated from protobuf field .google.bigtable.v2.Type value_type = 2; + */ + protected $value_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type $key_type + * The type of a map key. + * Only `Bytes`, `String`, and `Int64` are allowed as key types. + * @type \Google\Cloud\Bigtable\V2\Type $value_type + * The type of the values in a map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The type of a map key. + * Only `Bytes`, `String`, and `Int64` are allowed as key types. + * + * Generated from protobuf field .google.bigtable.v2.Type key_type = 1; + * @return \Google\Cloud\Bigtable\V2\Type|null + */ + public function getKeyType() + { + return $this->key_type; + } + + public function hasKeyType() + { + return isset($this->key_type); + } + + public function clearKeyType() + { + unset($this->key_type); + } + + /** + * The type of a map key. + * Only `Bytes`, `String`, and `Int64` are allowed as key types. + * + * Generated from protobuf field .google.bigtable.v2.Type key_type = 1; + * @param \Google\Cloud\Bigtable\V2\Type $var + * @return $this + */ + public function setKeyType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); + $this->key_type = $var; + + return $this; + } + + /** + * The type of the values in a map. + * + * Generated from protobuf field .google.bigtable.v2.Type value_type = 2; + * @return \Google\Cloud\Bigtable\V2\Type|null + */ + public function getValueType() + { + return $this->value_type; + } + + public function hasValueType() + { + return isset($this->value_type); + } + + public function clearValueType() + { + unset($this->value_type); + } + + /** + * The type of the values in a map. + * + * Generated from protobuf field .google.bigtable.v2.Type value_type = 2; + * @param \Google\Cloud\Bigtable\V2\Type $var + * @return $this + */ + public function setValueType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); + $this->value_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Map::class, \Google\Cloud\Bigtable\V2\Type_Map::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBArray.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBArray.php new file mode 100644 index 000000000000..71bbb92cadac --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBArray.php @@ -0,0 +1,81 @@ +google.bigtable.v2.Type.Array + */ +class PBArray extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the elements in the array. This must not be `Array`. + * + * Generated from protobuf field .google.bigtable.v2.Type element_type = 1; + */ + protected $element_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type $element_type + * The type of the elements in the array. This must not be `Array`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The type of the elements in the array. This must not be `Array`. + * + * Generated from protobuf field .google.bigtable.v2.Type element_type = 1; + * @return \Google\Cloud\Bigtable\V2\Type|null + */ + public function getElementType() + { + return $this->element_type; + } + + public function hasElementType() + { + return isset($this->element_type); + } + + public function clearElementType() + { + unset($this->element_type); + } + + /** + * The type of the elements in the array. This must not be `Array`. + * + * Generated from protobuf field .google.bigtable.v2.Type element_type = 1; + * @param \Google\Cloud\Bigtable\V2\Type $var + * @return $this + */ + public function setElementType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); + $this->element_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBArray::class, \Google\Cloud\Bigtable\V2\Type_Array::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBBool.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBBool.php new file mode 100644 index 000000000000..9de6cd8f9cab --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBBool.php @@ -0,0 +1,37 @@ +google.bigtable.v2.Type.Bool + */ +class PBBool extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBBool::class, \Google\Cloud\Bigtable\V2\Type_Bool::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString.php new file mode 100644 index 000000000000..fbb2f0da8c4a --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString.php @@ -0,0 +1,81 @@ +google.bigtable.v2.Type.String + */ +class PBString extends \Google\Protobuf\Internal\Message +{ + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding encoding = 1; + */ + protected $encoding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type\PBString\Encoding $encoding + * The encoding to use when converting to/from lower level types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding encoding = 1; + * @return \Google\Cloud\Bigtable\V2\Type\PBString\Encoding|null + */ + public function getEncoding() + { + return $this->encoding; + } + + public function hasEncoding() + { + return isset($this->encoding); + } + + public function clearEncoding() + { + unset($this->encoding); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding encoding = 1; + * @param \Google\Cloud\Bigtable\V2\Type\PBString\Encoding $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBString\Encoding::class); + $this->encoding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBString::class, \Google\Cloud\Bigtable\V2\Type_String::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding.php new file mode 100644 index 000000000000..a1c87729cc70 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding.php @@ -0,0 +1,116 @@ +google.bigtable.v2.Type.String.Encoding + */ +class Encoding extends \Google\Protobuf\Internal\Message +{ + protected $encoding; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Raw $utf8_raw + * Deprecated: if set, converts to an empty `utf8_bytes`. + * @type \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Bytes $utf8_bytes + * Use `Utf8Bytes` encoding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Deprecated: if set, converts to an empty `utf8_bytes`. + * + * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * @return \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Raw|null + * @deprecated + */ + public function getUtf8Raw() + { + @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); + return $this->readOneof(1); + } + + public function hasUtf8Raw() + { + @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); + return $this->hasOneof(1); + } + + /** + * Deprecated: if set, converts to an empty `utf8_bytes`. + * + * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * @param \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Raw $var + * @return $this + * @deprecated + */ + public function setUtf8Raw($var) + { + @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Raw::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Use `Utf8Bytes` encoding. + * + * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * @return \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Bytes|null + */ + public function getUtf8Bytes() + { + return $this->readOneof(2); + } + + public function hasUtf8Bytes() + { + return $this->hasOneof(2); + } + + /** + * Use `Utf8Bytes` encoding. + * + * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * @param \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Bytes $var + * @return $this + */ + public function setUtf8Bytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Bytes::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncoding() + { + return $this->whichOneof("encoding"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Encoding::class, \Google\Cloud\Bigtable\V2\Type_String_Encoding::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Bytes.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Bytes.php new file mode 100644 index 000000000000..998216c290b9 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Bytes.php @@ -0,0 +1,42 @@ +google.bigtable.v2.Type.String.Encoding.Utf8Bytes + */ +class Utf8Bytes extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Utf8Bytes::class, \Google\Cloud\Bigtable\V2\Type_String_Encoding_Utf8Bytes::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Raw.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Raw.php new file mode 100644 index 000000000000..22a1bf75dcaa --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Raw.php @@ -0,0 +1,37 @@ +google.bigtable.v2.Type.String.Encoding.Utf8Raw + */ +class Utf8Raw extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Utf8Raw::class, \Google\Cloud\Bigtable\V2\Type_String_Encoding_Utf8Raw::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct.php new file mode 100644 index 000000000000..01b9fbc598fa --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct.php @@ -0,0 +1,73 @@ +google.bigtable.v2.Type.Struct + */ +class Struct extends \Google\Protobuf\Internal\Message +{ + /** + * The names and types of the fields in this struct. + * + * Generated from protobuf field repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $fields + * The names and types of the fields in this struct. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The names and types of the fields in this struct. + * + * Generated from protobuf field repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The names and types of the fields in this struct. + * + * Generated from protobuf field repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * @param array<\Google\Cloud\Bigtable\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Type\Struct\Field::class); + $this->fields = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Struct::class, \Google\Cloud\Bigtable\V2\Type_Struct::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct/Field.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct/Field.php new file mode 100644 index 000000000000..0aa221b2a746 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct/Field.php @@ -0,0 +1,118 @@ +google.bigtable.v2.Type.Struct.Field + */ +class Field extends \Google\Protobuf\Internal\Message +{ + /** + * The field name (optional). Fields without a `field_name` are considered + * anonymous and cannot be referenced by name. + * + * Generated from protobuf field string field_name = 1; + */ + protected $field_name = ''; + /** + * The type of values in this field. + * + * Generated from protobuf field .google.bigtable.v2.Type type = 2; + */ + protected $type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_name + * The field name (optional). Fields without a `field_name` are considered + * anonymous and cannot be referenced by name. + * @type \Google\Cloud\Bigtable\V2\Type $type + * The type of values in this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The field name (optional). Fields without a `field_name` are considered + * anonymous and cannot be referenced by name. + * + * Generated from protobuf field string field_name = 1; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * The field name (optional). Fields without a `field_name` are considered + * anonymous and cannot be referenced by name. + * + * Generated from protobuf field string field_name = 1; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * The type of values in this field. + * + * Generated from protobuf field .google.bigtable.v2.Type type = 2; + * @return \Google\Cloud\Bigtable\V2\Type|null + */ + public function getType() + { + return $this->type; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * The type of values in this field. + * + * Generated from protobuf field .google.bigtable.v2.Type type = 2; + * @param \Google\Cloud\Bigtable\V2\Type $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Field::class, \Google\Cloud\Bigtable\V2\Type_Struct_Field::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Timestamp.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Timestamp.php new file mode 100644 index 000000000000..3c437f884597 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Timestamp.php @@ -0,0 +1,37 @@ +google.bigtable.v2.Type.Timestamp + */ +class Timestamp extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Timestamp::class, \Google\Cloud\Bigtable\V2\Type_Timestamp::class); + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Value.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Value.php new file mode 100644 index 000000000000..d35a8ede4c5b --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Value.php @@ -0,0 +1,477 @@ +google.bigtable.v2.Value + */ +class Value extends \Google\Protobuf\Internal\Message +{ + /** + * The verified `Type` of this `Value`, if it cannot be inferred. + * Read results will never specify the encoding for `type` since the value + * will already have been decoded by the server. Furthermore, the `type` will + * be omitted entirely if it can be inferred from a previous response. The + * exact semantics for inferring `type` will vary, and are therefore + * documented separately for each read method. + * When using composite types (Struct, Array, Map) only the outermost `Value` + * will specify the `type`. This top-level `type` will define the types for + * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. + * If a nested `Value` provides a `type` on write, the request will be + * rejected with INVALID_ARGUMENT. + * + * Generated from protobuf field .google.bigtable.v2.Type type = 7; + */ + protected $type = null; + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\V2\Type $type + * The verified `Type` of this `Value`, if it cannot be inferred. + * Read results will never specify the encoding for `type` since the value + * will already have been decoded by the server. Furthermore, the `type` will + * be omitted entirely if it can be inferred from a previous response. The + * exact semantics for inferring `type` will vary, and are therefore + * documented separately for each read method. + * When using composite types (Struct, Array, Map) only the outermost `Value` + * will specify the `type`. This top-level `type` will define the types for + * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. + * If a nested `Value` provides a `type` on write, the request will be + * rejected with INVALID_ARGUMENT. + * @type string $raw_value + * Represents a raw byte sequence with no type information. + * The `type` field must be omitted. + * @type int|string $raw_timestamp_micros + * Represents a raw cell timestamp with no type information. + * The `type` field must be omitted. + * @type string $bytes_value + * Represents a typed value transported as a byte sequence. + * @type string $string_value + * Represents a typed value transported as a string. + * @type int|string $int_value + * Represents a typed value transported as an integer. + * @type bool $bool_value + * Represents a typed value transported as a boolean. + * @type float $float_value + * Represents a typed value transported as a floating point number. + * @type \Google\Protobuf\Timestamp $timestamp_value + * Represents a typed value transported as a timestamp. + * @type \Google\Type\Date $date_value + * Represents a typed value transported as a date. + * @type \Google\Cloud\Bigtable\V2\ArrayValue $array_value + * Represents a typed value transported as a sequence of values. + * To differentiate between `Struct`, `Array`, and `Map`, the outermost + * `Value` must provide an explicit `type` on write. This `type` will + * apply recursively to the nested `Struct` fields, `Array` elements, + * or `Map` key/value pairs, which *must not* supply their own `type`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The verified `Type` of this `Value`, if it cannot be inferred. + * Read results will never specify the encoding for `type` since the value + * will already have been decoded by the server. Furthermore, the `type` will + * be omitted entirely if it can be inferred from a previous response. The + * exact semantics for inferring `type` will vary, and are therefore + * documented separately for each read method. + * When using composite types (Struct, Array, Map) only the outermost `Value` + * will specify the `type`. This top-level `type` will define the types for + * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. + * If a nested `Value` provides a `type` on write, the request will be + * rejected with INVALID_ARGUMENT. + * + * Generated from protobuf field .google.bigtable.v2.Type type = 7; + * @return \Google\Cloud\Bigtable\V2\Type|null + */ + public function getType() + { + return $this->type; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * The verified `Type` of this `Value`, if it cannot be inferred. + * Read results will never specify the encoding for `type` since the value + * will already have been decoded by the server. Furthermore, the `type` will + * be omitted entirely if it can be inferred from a previous response. The + * exact semantics for inferring `type` will vary, and are therefore + * documented separately for each read method. + * When using composite types (Struct, Array, Map) only the outermost `Value` + * will specify the `type`. This top-level `type` will define the types for + * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. + * If a nested `Value` provides a `type` on write, the request will be + * rejected with INVALID_ARGUMENT. + * + * Generated from protobuf field .google.bigtable.v2.Type type = 7; + * @param \Google\Cloud\Bigtable\V2\Type $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Represents a raw byte sequence with no type information. + * The `type` field must be omitted. + * + * Generated from protobuf field bytes raw_value = 8; + * @return string + */ + public function getRawValue() + { + return $this->readOneof(8); + } + + public function hasRawValue() + { + return $this->hasOneof(8); + } + + /** + * Represents a raw byte sequence with no type information. + * The `type` field must be omitted. + * + * Generated from protobuf field bytes raw_value = 8; + * @param string $var + * @return $this + */ + public function setRawValue($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Represents a raw cell timestamp with no type information. + * The `type` field must be omitted. + * + * Generated from protobuf field int64 raw_timestamp_micros = 9; + * @return int|string + */ + public function getRawTimestampMicros() + { + return $this->readOneof(9); + } + + public function hasRawTimestampMicros() + { + return $this->hasOneof(9); + } + + /** + * Represents a raw cell timestamp with no type information. + * The `type` field must be omitted. + * + * Generated from protobuf field int64 raw_timestamp_micros = 9; + * @param int|string $var + * @return $this + */ + public function setRawTimestampMicros($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Represents a typed value transported as a byte sequence. + * + * Generated from protobuf field bytes bytes_value = 2; + * @return string + */ + public function getBytesValue() + { + return $this->readOneof(2); + } + + public function hasBytesValue() + { + return $this->hasOneof(2); + } + + /** + * Represents a typed value transported as a byte sequence. + * + * Generated from protobuf field bytes bytes_value = 2; + * @param string $var + * @return $this + */ + public function setBytesValue($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Represents a typed value transported as a string. + * + * Generated from protobuf field string string_value = 3; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(3); + } + + public function hasStringValue() + { + return $this->hasOneof(3); + } + + /** + * Represents a typed value transported as a string. + * + * Generated from protobuf field string string_value = 3; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Represents a typed value transported as an integer. + * + * Generated from protobuf field int64 int_value = 6; + * @return int|string + */ + public function getIntValue() + { + return $this->readOneof(6); + } + + public function hasIntValue() + { + return $this->hasOneof(6); + } + + /** + * Represents a typed value transported as an integer. + * + * Generated from protobuf field int64 int_value = 6; + * @param int|string $var + * @return $this + */ + public function setIntValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Represents a typed value transported as a boolean. + * + * Generated from protobuf field bool bool_value = 10; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(10); + } + + public function hasBoolValue() + { + return $this->hasOneof(10); + } + + /** + * Represents a typed value transported as a boolean. + * + * Generated from protobuf field bool bool_value = 10; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Represents a typed value transported as a floating point number. + * + * Generated from protobuf field double float_value = 11; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(11); + } + + public function hasFloatValue() + { + return $this->hasOneof(11); + } + + /** + * Represents a typed value transported as a floating point number. + * + * Generated from protobuf field double float_value = 11; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Represents a typed value transported as a timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 12; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimestampValue() + { + return $this->readOneof(12); + } + + public function hasTimestampValue() + { + return $this->hasOneof(12); + } + + /** + * Represents a typed value transported as a timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 12; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimestampValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Represents a typed value transported as a date. + * + * Generated from protobuf field .google.type.Date date_value = 13; + * @return \Google\Type\Date|null + */ + public function getDateValue() + { + return $this->readOneof(13); + } + + public function hasDateValue() + { + return $this->hasOneof(13); + } + + /** + * Represents a typed value transported as a date. + * + * Generated from protobuf field .google.type.Date date_value = 13; + * @param \Google\Type\Date $var + * @return $this + */ + public function setDateValue($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Represents a typed value transported as a sequence of values. + * To differentiate between `Struct`, `Array`, and `Map`, the outermost + * `Value` must provide an explicit `type` on write. This `type` will + * apply recursively to the nested `Struct` fields, `Array` elements, + * or `Map` key/value pairs, which *must not* supply their own `type`. + * + * Generated from protobuf field .google.bigtable.v2.ArrayValue array_value = 4; + * @return \Google\Cloud\Bigtable\V2\ArrayValue|null + */ + public function getArrayValue() + { + return $this->readOneof(4); + } + + public function hasArrayValue() + { + return $this->hasOneof(4); + } + + /** + * Represents a typed value transported as a sequence of values. + * To differentiate between `Struct`, `Array`, and `Map`, the outermost + * `Value` must provide an explicit `type` on write. This `type` will + * apply recursively to the nested `Struct` fields, `Array` elements, + * or `Map` key/value pairs, which *must not* supply their own `type`. + * + * Generated from protobuf field .google.bigtable.v2.ArrayValue array_value = 4; + * @param \Google\Cloud\Bigtable\V2\ArrayValue $var + * @return $this + */ + public function setArrayValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ArrayValue::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php new file mode 100644 index 000000000000..a3dc913e427c --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php @@ -0,0 +1,183 @@ +google.bigtable.v2.ValueRange + */ +class ValueRange extends \Google\Protobuf\Internal\Message +{ + protected $start_value; + protected $end_value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_value_closed + * Used when giving an inclusive lower bound for the range. + * @type string $start_value_open + * Used when giving an exclusive lower bound for the range. + * @type string $end_value_closed + * Used when giving an inclusive upper bound for the range. + * @type string $end_value_open + * Used when giving an exclusive upper bound for the range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Used when giving an inclusive lower bound for the range. + * + * Generated from protobuf field bytes start_value_closed = 1; + * @return string + */ + public function getStartValueClosed() + { + return $this->readOneof(1); + } + + public function hasStartValueClosed() + { + return $this->hasOneof(1); + } + + /** + * Used when giving an inclusive lower bound for the range. + * + * Generated from protobuf field bytes start_value_closed = 1; + * @param string $var + * @return $this + */ + public function setStartValueClosed($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Used when giving an exclusive lower bound for the range. + * + * Generated from protobuf field bytes start_value_open = 2; + * @return string + */ + public function getStartValueOpen() + { + return $this->readOneof(2); + } + + public function hasStartValueOpen() + { + return $this->hasOneof(2); + } + + /** + * Used when giving an exclusive lower bound for the range. + * + * Generated from protobuf field bytes start_value_open = 2; + * @param string $var + * @return $this + */ + public function setStartValueOpen($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Used when giving an inclusive upper bound for the range. + * + * Generated from protobuf field bytes end_value_closed = 3; + * @return string + */ + public function getEndValueClosed() + { + return $this->readOneof(3); + } + + public function hasEndValueClosed() + { + return $this->hasOneof(3); + } + + /** + * Used when giving an inclusive upper bound for the range. + * + * Generated from protobuf field bytes end_value_closed = 3; + * @param string $var + * @return $this + */ + public function setEndValueClosed($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Used when giving an exclusive upper bound for the range. + * + * Generated from protobuf field bytes end_value_open = 4; + * @return string + */ + public function getEndValueOpen() + { + return $this->readOneof(4); + } + + public function hasEndValueOpen() + { + return $this->hasOneof(4); + } + + /** + * Used when giving an exclusive upper bound for the range. + * + * Generated from protobuf field bytes end_value_open = 4; + * @param string $var + * @return $this + */ + public function setEndValueOpen($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getStartValue() + { + return $this->whichOneof("start_value"); + } + + /** + * @return string + */ + public function getEndValue() + { + return $this->whichOneof("end_value"); + } + +} + diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php new file mode 100644 index 000000000000..a82003186c39 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php @@ -0,0 +1,79 @@ +/instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $rowKey The key of the row to which the conditional mutation should be + * applied. + */ +function check_and_mutate_row_sample(string $formattedTableName, string $rowKey): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $request = (new CheckAndMutateRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey); + + // Call the API and handle any network failures. + try { + /** @var CheckAndMutateRowResponse $response */ + $response = $bigtableClient->checkAndMutateRow($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 +{ + $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '...'; + + check_and_mutate_row_sample($formattedTableName, $rowKey); +} +// [END bigtable_v2_generated_Bigtable_CheckAndMutateRow_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/execute_query.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/execute_query.php new file mode 100644 index 000000000000..166de231d987 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/execute_query.php @@ -0,0 +1,83 @@ +/instances/` + * Please see {@see BigtableClient::instanceName()} for help formatting this field. + * @param string $query The query string. + */ +function execute_query_sample(string $formattedInstanceName, string $query): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $params = []; + $request = (new ExecuteQueryRequest()) + ->setInstanceName($formattedInstanceName) + ->setQuery($query) + ->setParams($params); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $bigtableClient->executeQuery($request); + + /** @var ExecuteQueryResponse $element */ + foreach ($stream->readAll() 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 +{ + $formattedInstanceName = BigtableClient::instanceName('[PROJECT]', '[INSTANCE]'); + $query = '[QUERY]'; + + execute_query_sample($formattedInstanceName, $query); +} +// [END bigtable_v2_generated_Bigtable_ExecuteQuery_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php new file mode 100644 index 000000000000..9c2f00e074a3 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php @@ -0,0 +1,82 @@ +/instances//tables/
`. + * Change streaming must be enabled on the table. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + */ +function generate_initial_change_stream_partitions_sample(string $formattedTableName): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $request = (new GenerateInitialChangeStreamPartitionsRequest()) + ->setTableName($formattedTableName); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $bigtableClient->generateInitialChangeStreamPartitions($request); + + /** @var GenerateInitialChangeStreamPartitionsResponse $element */ + foreach ($stream->readAll() 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 +{ + $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + generate_initial_change_stream_partitions_sample($formattedTableName); +} +// [END bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php new file mode 100644 index 000000000000..68cd97f0b50e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php @@ -0,0 +1,82 @@ +/instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $rowKey The key of the row to which the mutation should be applied. + */ +function mutate_row_sample(string $formattedTableName, string $rowKey): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $mutations = [new Mutation()]; + $request = (new MutateRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey) + ->setMutations($mutations); + + // Call the API and handle any network failures. + try { + /** @var MutateRowResponse $response */ + $response = $bigtableClient->mutateRow($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 +{ + $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '...'; + + mutate_row_sample($formattedTableName, $rowKey); +} +// [END bigtable_v2_generated_Bigtable_MutateRow_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php new file mode 100644 index 000000000000..de9db55dbba0 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php @@ -0,0 +1,89 @@ +/instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + */ +function mutate_rows_sample(string $formattedTableName): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $entriesMutations = [new Mutation()]; + $entry = (new Entry()) + ->setMutations($entriesMutations); + $entries = [$entry,]; + $request = (new MutateRowsRequest()) + ->setTableName($formattedTableName) + ->setEntries($entries); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $bigtableClient->mutateRows($request); + + /** @var MutateRowsResponse $element */ + foreach ($stream->readAll() 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 +{ + $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + mutate_rows_sample($formattedTableName); +} +// [END bigtable_v2_generated_Bigtable_MutateRows_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php new file mode 100644 index 000000000000..314ad63bb531 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php @@ -0,0 +1,74 @@ +/instances/`. Please see + * {@see BigtableClient::instanceName()} for help formatting this field. + */ +function ping_and_warm_sample(string $formattedName): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $request = (new PingAndWarmRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PingAndWarmResponse $response */ + $response = $bigtableClient->pingAndWarm($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 = BigtableClient::instanceName('[PROJECT]', '[INSTANCE]'); + + ping_and_warm_sample($formattedName); +} +// [END bigtable_v2_generated_Bigtable_PingAndWarm_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php new file mode 100644 index 000000000000..243f166d9131 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php @@ -0,0 +1,82 @@ +/instances//tables/
`. + * Change streaming must be enabled on the table. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + */ +function read_change_stream_sample(string $formattedTableName): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $request = (new ReadChangeStreamRequest()) + ->setTableName($formattedTableName); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $bigtableClient->readChangeStream($request); + + /** @var ReadChangeStreamResponse $element */ + foreach ($stream->readAll() 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 +{ + $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + read_change_stream_sample($formattedTableName); +} +// [END bigtable_v2_generated_Bigtable_ReadChangeStream_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php new file mode 100644 index 000000000000..9c80a76b634e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php @@ -0,0 +1,86 @@ +/instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + * @param string $rowKey The key of the row to which the read/modify/write rules should be + * applied. + */ +function read_modify_write_row_sample(string $formattedTableName, string $rowKey): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $rules = [new ReadModifyWriteRule()]; + $request = (new ReadModifyWriteRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey) + ->setRules($rules); + + // Call the API and handle any network failures. + try { + /** @var ReadModifyWriteRowResponse $response */ + $response = $bigtableClient->readModifyWriteRow($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 +{ + $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '...'; + + read_modify_write_row_sample($formattedTableName, $rowKey); +} +// [END bigtable_v2_generated_Bigtable_ReadModifyWriteRow_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php new file mode 100644 index 000000000000..1811a00c41f5 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php @@ -0,0 +1,83 @@ +/instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + */ +function read_rows_sample(string $formattedTableName): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $request = (new ReadRowsRequest()) + ->setTableName($formattedTableName); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $bigtableClient->readRows($request); + + /** @var ReadRowsResponse $element */ + foreach ($stream->readAll() 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 +{ + $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + read_rows_sample($formattedTableName); +} +// [END bigtable_v2_generated_Bigtable_ReadRows_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php new file mode 100644 index 000000000000..f15be7dc6929 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php @@ -0,0 +1,82 @@ +/instances//tables/
`. Please see + * {@see BigtableClient::tableName()} for help formatting this field. + */ +function sample_row_keys_sample(string $formattedTableName): void +{ + // Create a client. + $bigtableClient = new BigtableClient(); + + // Prepare the request message. + $request = (new SampleRowKeysRequest()) + ->setTableName($formattedTableName); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $bigtableClient->sampleRowKeys($request); + + /** @var SampleRowKeysResponse $element */ + foreach ($stream->readAll() 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 +{ + $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + + sample_row_keys_sample($formattedTableName); +} +// [END bigtable_v2_generated_Bigtable_SampleRowKeys_sync] diff --git a/owl-bot-staging/Bigtable/v2/src/V2/Client/BigtableClient.php b/owl-bot-staging/Bigtable/v2/src/V2/Client/BigtableClient.php new file mode 100644 index 000000000000..24c6994dd499 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/src/V2/Client/BigtableClient.php @@ -0,0 +1,559 @@ + checkAndMutateRowAsync(CheckAndMutateRowRequest $request, array $optionalArgs = []) + * @method PromiseInterface mutateRowAsync(MutateRowRequest $request, array $optionalArgs = []) + * @method PromiseInterface pingAndWarmAsync(PingAndWarmRequest $request, array $optionalArgs = []) + * @method PromiseInterface readModifyWriteRowAsync(ReadModifyWriteRowRequest $request, array $optionalArgs = []) + */ +final class BigtableClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.bigtable.v2.Bigtable'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigtable.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigtable.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigtable.data', + 'https://www.googleapis.com/auth/bigtable.data.readonly', + 'https://www.googleapis.com/auth/cloud-bigtable.data', + 'https://www.googleapis.com/auth/cloud-bigtable.data.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/bigtable_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * authorized_view resource. + * + * @param string $project + * @param string $instance + * @param string $table + * @param string $authorizedView + * + * @return string The formatted authorized_view resource. + */ + public static function authorizedViewName(string $project, string $instance, string $table, string $authorizedView): string + { + return self::getPathTemplate('authorizedView')->render([ + 'project' => $project, + 'instance' => $instance, + 'table' => $table, + 'authorized_view' => $authorizedView, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a table + * resource. + * + * @param string $project + * @param string $instance + * @param string $table + * + * @return string The formatted table resource. + */ + public static function tableName(string $project, string $instance, string $table): string + { + return self::getPathTemplate('table')->render([ + 'project' => $project, + 'instance' => $instance, + 'table' => $table, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - authorizedView: projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view} + * - instance: projects/{project}/instances/{instance} + * - table: projects/{project}/instances/{instance}/tables/{table} + * + * 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. + * + * Setting the "BIGTABLE_EMULATOR_HOST" environment variable will automatically set + * the API Endpoint to the value specified in the variable, as well as ensure that + * empty credentials are used in the transport layer. + * + * @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 'bigtable.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 = []) + { + $options = $this->setDefaultEmulatorConfig($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); + } + + /** + * Mutates a row atomically based on the output of a predicate Reader filter. + * + * The async variant is {@see BigtableClient::checkAndMutateRowAsync()} . + * + * @example samples/V2/BigtableClient/check_and_mutate_row.php + * + * @param CheckAndMutateRowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CheckAndMutateRowResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function checkAndMutateRow(CheckAndMutateRowRequest $request, array $callOptions = []): CheckAndMutateRowResponse + { + return $this->startApiCall('CheckAndMutateRow', $request, $callOptions)->wait(); + } + + /** + * Executes a BTQL query against a particular Cloud Bigtable instance. + * + * @example samples/V2/BigtableClient/execute_query.php + * + * @param ExecuteQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function executeQuery(ExecuteQueryRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('ExecuteQuery', $request, $callOptions); + } + + /** + * NOTE: This API is intended to be used by Apache Beam BigtableIO. + * Returns the current list of partitions that make up the table's + * change stream. The union of partitions will cover the entire keyspace. + * Partitions can be read with `ReadChangeStream`. + * + * @example samples/V2/BigtableClient/generate_initial_change_stream_partitions.php + * + * @param GenerateInitialChangeStreamPartitionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateInitialChangeStreamPartitions(GenerateInitialChangeStreamPartitionsRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('GenerateInitialChangeStreamPartitions', $request, $callOptions); + } + + /** + * Mutates a row atomically. Cells already present in the row are left + * unchanged unless explicitly changed by `mutation`. + * + * The async variant is {@see BigtableClient::mutateRowAsync()} . + * + * @example samples/V2/BigtableClient/mutate_row.php + * + * @param MutateRowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MutateRowResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function mutateRow(MutateRowRequest $request, array $callOptions = []): MutateRowResponse + { + return $this->startApiCall('MutateRow', $request, $callOptions)->wait(); + } + + /** + * Mutates multiple rows in a batch. Each individual row is mutated + * atomically as in MutateRow, but the entire batch is not executed + * atomically. + * + * @example samples/V2/BigtableClient/mutate_rows.php + * + * @param MutateRowsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function mutateRows(MutateRowsRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('MutateRows', $request, $callOptions); + } + + /** + * Warm up associated instance metadata for this connection. + * This call is not required but may be useful for connection keep-alive. + * + * The async variant is {@see BigtableClient::pingAndWarmAsync()} . + * + * @example samples/V2/BigtableClient/ping_and_warm.php + * + * @param PingAndWarmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PingAndWarmResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function pingAndWarm(PingAndWarmRequest $request, array $callOptions = []): PingAndWarmResponse + { + return $this->startApiCall('PingAndWarm', $request, $callOptions)->wait(); + } + + /** + * NOTE: This API is intended to be used by Apache Beam BigtableIO. + * Reads changes from a table's change stream. Changes will + * reflect both user-initiated mutations and mutations that are caused by + * garbage collection. + * + * @example samples/V2/BigtableClient/read_change_stream.php + * + * @param ReadChangeStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function readChangeStream(ReadChangeStreamRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('ReadChangeStream', $request, $callOptions); + } + + /** + * Modifies a row atomically on the server. The method reads the latest + * existing timestamp and value from the specified columns and writes a new + * entry based on pre-defined read/modify/write rules. The new value for the + * timestamp is the greater of the existing timestamp or the current server + * time. The method returns the new contents of all modified cells. + * + * The async variant is {@see BigtableClient::readModifyWriteRowAsync()} . + * + * @example samples/V2/BigtableClient/read_modify_write_row.php + * + * @param ReadModifyWriteRowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReadModifyWriteRowResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function readModifyWriteRow(ReadModifyWriteRowRequest $request, array $callOptions = []): ReadModifyWriteRowResponse + { + return $this->startApiCall('ReadModifyWriteRow', $request, $callOptions)->wait(); + } + + /** + * Streams back the contents of all requested rows in key order, optionally + * applying the same Reader filter to each. Depending on their size, + * rows and cells may be broken up across multiple responses, but + * atomicity of each row will still be preserved. See the + * ReadRowsResponse documentation for details. + * + * @example samples/V2/BigtableClient/read_rows.php + * + * @param ReadRowsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function readRows(ReadRowsRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('ReadRows', $request, $callOptions); + } + + /** + * Returns a sample of row keys in the table. The returned row keys will + * delimit contiguous sections of the table of approximately equal size, + * which can be used to break up the data for distributed tasks like + * mapreduces. + * + * @example samples/V2/BigtableClient/sample_row_keys.php + * + * @param SampleRowKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function sampleRowKeys(SampleRowKeysRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('SampleRowKeys', $request, $callOptions); + } + + /** Configure the gapic configuration to use a service emulator. */ + private function setDefaultEmulatorConfig(array $options): array + { + $emulatorHost = getenv('BIGTABLE_EMULATOR_HOST'); + if (empty($emulatorHost)) { + return $options; + } + + if ($scheme = parse_url($emulatorHost, PHP_URL_SCHEME)) { + $search = $scheme . '://'; + $emulatorHost = str_replace($search, '', $emulatorHost); + } + + $options['apiEndpoint'] ??= $emulatorHost; + $options['transportConfig']['grpc']['stubOpts']['credentials'] ??= ChannelCredentials::createInsecure(); + $options['credentials'] ??= new InsecureCredentialsWrapper(); + return $options; + } +} diff --git a/owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..fe7b9844ea9d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.bigtable.v2", + "libraryPackage": "Google\\Cloud\\Bigtable\\V2", + "services": { + "Bigtable": { + "clients": { + "grpc": { + "libraryClient": "BigtableGapicClient", + "rpcs": { + "CheckAndMutateRow": { + "methods": [ + "checkAndMutateRow" + ] + }, + "ExecuteQuery": { + "methods": [ + "executeQuery" + ] + }, + "GenerateInitialChangeStreamPartitions": { + "methods": [ + "generateInitialChangeStreamPartitions" + ] + }, + "MutateRow": { + "methods": [ + "mutateRow" + ] + }, + "MutateRows": { + "methods": [ + "mutateRows" + ] + }, + "PingAndWarm": { + "methods": [ + "pingAndWarm" + ] + }, + "ReadChangeStream": { + "methods": [ + "readChangeStream" + ] + }, + "ReadModifyWriteRow": { + "methods": [ + "readModifyWriteRow" + ] + }, + "ReadRows": { + "methods": [ + "readRows" + ] + }, + "SampleRowKeys": { + "methods": [ + "sampleRowKeys" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json new file mode 100644 index 000000000000..ee5dae96485d --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.bigtable.v2.Bigtable": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CheckAndMutateRow": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteQuery": { + "timeout_millis": 60000 + }, + "GenerateInitialChangeStreamPartitions": { + "timeout_millis": 60000 + }, + "MutateRow": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MutateRows": { + "timeout_millis": 60000 + }, + "PingAndWarm": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadChangeStream": { + "timeout_millis": 60000 + }, + "ReadModifyWriteRow": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadRows": { + "timeout_millis": 60000 + }, + "SampleRowKeys": { + "timeout_millis": 60000 + } + } + } + } +} diff --git a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php new file mode 100644 index 000000000000..77b7d119b420 --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php @@ -0,0 +1,297 @@ + [ + 'google.bigtable.v2.Bigtable' => [ + 'CheckAndMutateRow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\CheckAndMutateRowResponse', + 'headerParams' => [ + [ + 'keyName' => 'table_name', + 'fieldAccessors' => [ + 'getTableName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', + ], + ], + [ + 'keyName' => 'app_profile_id', + 'fieldAccessors' => [ + 'getAppProfileId', + ], + ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], + ], + ], + 'ExecuteQuery' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\ExecuteQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getInstanceName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+)$/', + ], + ], + [ + 'keyName' => 'app_profile_id', + 'fieldAccessors' => [ + 'getAppProfileId', + ], + ], + ], + ], + 'GenerateInitialChangeStreamPartitions' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\GenerateInitialChangeStreamPartitionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'table_name', + 'fieldAccessors' => [ + 'getTableName', + ], + ], + ], + ], + 'MutateRow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\MutateRowResponse', + 'headerParams' => [ + [ + 'keyName' => 'table_name', + 'fieldAccessors' => [ + 'getTableName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', + ], + ], + [ + 'keyName' => 'app_profile_id', + 'fieldAccessors' => [ + 'getAppProfileId', + ], + ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], + ], + ], + 'MutateRows' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\MutateRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'table_name', + 'fieldAccessors' => [ + 'getTableName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', + ], + ], + [ + 'keyName' => 'app_profile_id', + 'fieldAccessors' => [ + 'getAppProfileId', + ], + ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], + ], + ], + 'PingAndWarm' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\PingAndWarmResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+)$/', + ], + ], + [ + 'keyName' => 'app_profile_id', + 'fieldAccessors' => [ + 'getAppProfileId', + ], + ], + ], + ], + 'ReadChangeStream' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\ReadChangeStreamResponse', + 'headerParams' => [ + [ + 'keyName' => 'table_name', + 'fieldAccessors' => [ + 'getTableName', + ], + ], + ], + ], + 'ReadModifyWriteRow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\ReadModifyWriteRowResponse', + 'headerParams' => [ + [ + 'keyName' => 'table_name', + 'fieldAccessors' => [ + 'getTableName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', + ], + ], + [ + 'keyName' => 'app_profile_id', + 'fieldAccessors' => [ + 'getAppProfileId', + ], + ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], + ], + ], + 'ReadRows' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\ReadRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'table_name', + 'fieldAccessors' => [ + 'getTableName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', + ], + ], + [ + 'keyName' => 'app_profile_id', + 'fieldAccessors' => [ + 'getAppProfileId', + ], + ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], + ], + ], + 'SampleRowKeys' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Bigtable\V2\SampleRowKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'table_name', + 'fieldAccessors' => [ + 'getTableName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', + ], + ], + [ + 'keyName' => 'app_profile_id', + 'fieldAccessors' => [ + 'getAppProfileId', + ], + ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], + ], + ], + 'templateMap' => [ + 'authorizedView' => 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}', + 'instance' => 'projects/{project}/instances/{instance}', + 'table' => 'projects/{project}/instances/{instance}/tables/{table}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php new file mode 100644 index 000000000000..33dbd11ee56e --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php @@ -0,0 +1,219 @@ + [ + 'google.bigtable.v2.Bigtable' => [ + 'CheckAndMutateRow' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], + 'table_name' => [ + 'getters' => [ + 'getTableName', + ], + ], + ], + ], + 'ExecuteQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{instance_name=projects/*/instances/*}:executeQuery', + 'body' => '*', + 'placeholders' => [ + 'instance_name' => [ + 'getters' => [ + 'getInstanceName', + ], + ], + ], + ], + 'GenerateInitialChangeStreamPartitions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions', + 'body' => '*', + 'placeholders' => [ + 'table_name' => [ + 'getters' => [ + 'getTableName', + ], + ], + ], + ], + 'MutateRow' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], + 'table_name' => [ + 'getters' => [ + 'getTableName', + ], + ], + ], + ], + 'MutateRows' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], + 'table_name' => [ + 'getters' => [ + 'getTableName', + ], + ], + ], + ], + 'PingAndWarm' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/instances/*}:ping', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ReadChangeStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream', + 'body' => '*', + 'placeholders' => [ + 'table_name' => [ + 'getters' => [ + 'getTableName', + ], + ], + ], + ], + 'ReadModifyWriteRow' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], + 'table_name' => [ + 'getters' => [ + 'getTableName', + ], + ], + ], + ], + 'ReadRows' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readRows', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], + 'table_name' => [ + 'getters' => [ + 'getTableName', + ], + ], + ], + ], + 'SampleRowKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys', + ], + ], + 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], + 'table_name' => [ + 'getters' => [ + 'getTableName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php b/owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php new file mode 100644 index 000000000000..087592d15bce --- /dev/null +++ b/owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php @@ -0,0 +1,881 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BigtableClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BigtableClient($options); + } + + /** @test */ + public function checkAndMutateRowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $predicateMatched = true; + $expectedResponse = new CheckAndMutateRowResponse(); + $expectedResponse->setPredicateMatched($predicateMatched); + $transport->addResponse($expectedResponse); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '122'; + $request = (new CheckAndMutateRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey); + $response = $gapicClient->checkAndMutateRow($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/CheckAndMutateRow', $actualFuncCall); + $actualValue = $actualRequestObject->getTableName(); + $this->assertProtobufEquals($formattedTableName, $actualValue); + $actualValue = $actualRequestObject->getRowKey(); + $this->assertProtobufEquals($rowKey, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function checkAndMutateRowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '122'; + $request = (new CheckAndMutateRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey); + try { + $gapicClient->checkAndMutateRow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executeQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ExecuteQueryResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new ExecuteQueryResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new ExecuteQueryResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedInstanceName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $query = 'query107944136'; + $paramsValue = new Value(); + $params = [ + 'paramsKey' => $paramsValue, + ]; + $request = (new ExecuteQueryRequest()) + ->setInstanceName($formattedInstanceName) + ->setQuery($query) + ->setParams($params); + $serverStream = $gapicClient->executeQuery($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/ExecuteQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getInstanceName(); + $this->assertProtobufEquals($formattedInstanceName, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $actualValue = $actualRequestObject->getParams(); + $this->assertProtobufEquals($params, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executeQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $formattedInstanceName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $query = 'query107944136'; + $paramsValue = new Value(); + $params = [ + 'paramsKey' => $paramsValue, + ]; + $request = (new ExecuteQueryRequest()) + ->setInstanceName($formattedInstanceName) + ->setQuery($query) + ->setParams($params); + $serverStream = $gapicClient->executeQuery($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateInitialChangeStreamPartitionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateInitialChangeStreamPartitionsResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new GenerateInitialChangeStreamPartitionsResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new GenerateInitialChangeStreamPartitionsResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new GenerateInitialChangeStreamPartitionsRequest()) + ->setTableName($formattedTableName); + $serverStream = $gapicClient->generateInitialChangeStreamPartitions($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/GenerateInitialChangeStreamPartitions', $actualFuncCall); + $actualValue = $actualRequestObject->getTableName(); + $this->assertProtobufEquals($formattedTableName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateInitialChangeStreamPartitionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new GenerateInitialChangeStreamPartitionsRequest()) + ->setTableName($formattedTableName); + $serverStream = $gapicClient->generateInitialChangeStreamPartitions($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function mutateRowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new MutateRowResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '122'; + $mutations = []; + $request = (new MutateRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey) + ->setMutations($mutations); + $response = $gapicClient->mutateRow($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/MutateRow', $actualFuncCall); + $actualValue = $actualRequestObject->getTableName(); + $this->assertProtobufEquals($formattedTableName, $actualValue); + $actualValue = $actualRequestObject->getRowKey(); + $this->assertProtobufEquals($rowKey, $actualValue); + $actualValue = $actualRequestObject->getMutations(); + $this->assertProtobufEquals($mutations, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function mutateRowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '122'; + $mutations = []; + $request = (new MutateRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey) + ->setMutations($mutations); + try { + $gapicClient->mutateRow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function mutateRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new MutateRowsResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new MutateRowsResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new MutateRowsResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $entries = []; + $request = (new MutateRowsRequest()) + ->setTableName($formattedTableName) + ->setEntries($entries); + $serverStream = $gapicClient->mutateRows($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/MutateRows', $actualFuncCall); + $actualValue = $actualRequestObject->getTableName(); + $this->assertProtobufEquals($formattedTableName, $actualValue); + $actualValue = $actualRequestObject->getEntries(); + $this->assertProtobufEquals($entries, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function mutateRowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $entries = []; + $request = (new MutateRowsRequest()) + ->setTableName($formattedTableName) + ->setEntries($entries); + $serverStream = $gapicClient->mutateRows($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pingAndWarmTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new PingAndWarmResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new PingAndWarmRequest()) + ->setName($formattedName); + $response = $gapicClient->pingAndWarm($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/PingAndWarm', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pingAndWarmExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new PingAndWarmRequest()) + ->setName($formattedName); + try { + $gapicClient->pingAndWarm($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readChangeStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReadChangeStreamResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new ReadChangeStreamResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new ReadChangeStreamResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new ReadChangeStreamRequest()) + ->setTableName($formattedTableName); + $serverStream = $gapicClient->readChangeStream($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/ReadChangeStream', $actualFuncCall); + $actualValue = $actualRequestObject->getTableName(); + $this->assertProtobufEquals($formattedTableName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readChangeStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new ReadChangeStreamRequest()) + ->setTableName($formattedTableName); + $serverStream = $gapicClient->readChangeStream($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readModifyWriteRowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReadModifyWriteRowResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '122'; + $rules = []; + $request = (new ReadModifyWriteRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey) + ->setRules($rules); + $response = $gapicClient->readModifyWriteRow($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/ReadModifyWriteRow', $actualFuncCall); + $actualValue = $actualRequestObject->getTableName(); + $this->assertProtobufEquals($formattedTableName, $actualValue); + $actualValue = $actualRequestObject->getRowKey(); + $this->assertProtobufEquals($rowKey, $actualValue); + $actualValue = $actualRequestObject->getRules(); + $this->assertProtobufEquals($rules, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readModifyWriteRowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '122'; + $rules = []; + $request = (new ReadModifyWriteRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey) + ->setRules($rules); + try { + $gapicClient->readModifyWriteRow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $lastScannedRowKey = '-126'; + $expectedResponse = new ReadRowsResponse(); + $expectedResponse->setLastScannedRowKey($lastScannedRowKey); + $transport->addResponse($expectedResponse); + $lastScannedRowKey2 = '-75'; + $expectedResponse2 = new ReadRowsResponse(); + $expectedResponse2->setLastScannedRowKey($lastScannedRowKey2); + $transport->addResponse($expectedResponse2); + $lastScannedRowKey3 = '-74'; + $expectedResponse3 = new ReadRowsResponse(); + $expectedResponse3->setLastScannedRowKey($lastScannedRowKey3); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new ReadRowsRequest()) + ->setTableName($formattedTableName); + $serverStream = $gapicClient->readRows($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/ReadRows', $actualFuncCall); + $actualValue = $actualRequestObject->getTableName(); + $this->assertProtobufEquals($formattedTableName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readRowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new ReadRowsRequest()) + ->setTableName($formattedTableName); + $serverStream = $gapicClient->readRows($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sampleRowKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $rowKey = '122'; + $offsetBytes = 889884095; + $expectedResponse = new SampleRowKeysResponse(); + $expectedResponse->setRowKey($rowKey); + $expectedResponse->setOffsetBytes($offsetBytes); + $transport->addResponse($expectedResponse); + $rowKey2 = '-83'; + $offsetBytes2 = 480126386; + $expectedResponse2 = new SampleRowKeysResponse(); + $expectedResponse2->setRowKey($rowKey2); + $expectedResponse2->setOffsetBytes($offsetBytes2); + $transport->addResponse($expectedResponse2); + $rowKey3 = '-82'; + $offsetBytes3 = 480126387; + $expectedResponse3 = new SampleRowKeysResponse(); + $expectedResponse3->setRowKey($rowKey3); + $expectedResponse3->setOffsetBytes($offsetBytes3); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new SampleRowKeysRequest()) + ->setTableName($formattedTableName); + $serverStream = $gapicClient->sampleRowKeys($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.v2.Bigtable/SampleRowKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getTableName(); + $this->assertProtobufEquals($formattedTableName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sampleRowKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new SampleRowKeysRequest()) + ->setTableName($formattedTableName); + $serverStream = $gapicClient->sampleRowKeys($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function checkAndMutateRowAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $predicateMatched = true; + $expectedResponse = new CheckAndMutateRowResponse(); + $expectedResponse->setPredicateMatched($predicateMatched); + $transport->addResponse($expectedResponse); + // Mock request + $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $rowKey = '122'; + $request = (new CheckAndMutateRowRequest()) + ->setTableName($formattedTableName) + ->setRowKey($rowKey); + $response = $gapicClient->checkAndMutateRowAsync($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.bigtable.v2.Bigtable/CheckAndMutateRow', $actualFuncCall); + $actualValue = $actualRequestObject->getTableName(); + $this->assertProtobufEquals($formattedTableName, $actualValue); + $actualValue = $actualRequestObject->getRowKey(); + $this->assertProtobufEquals($rowKey, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Billing/v1/proto/src/GPBMetadata/Google/Cloud/Billing/V1/CloudBilling.php b/owl-bot-staging/Billing/v1/proto/src/GPBMetadata/Google/Cloud/Billing/V1/CloudBilling.php new file mode 100644 index 0000000000000000000000000000000000000000..f20152be253e5205f20a09485a5998d67409ccb8 GIT binary patch literal 5856 zcmcIo%WoS+7-yXlnrYOMN!q$jNVnTU(!{YFr-ia@+OE?!1W^*TDTiRmTH9l1>3VnB zU8kf`1VSKH;#hIxLJ!=KkbpCsx$wFm9}ov5ME``In3l1D$W~oc6D!-IyNN{0HeIu7>SCo;uOnNmnoUd7k)0F8>#O3MtLx&8>nrQ0 zFsoy>>?)GQhG{l*l&|V$tCp{5x~>_G{MNkpq0Bzys9XRHwTT={ts-%Gt#}K$YE5<3 z(lQlMS|TD!MNdTOt@%p;RCU#HM0&u!gB>8^e^#raYgN&4RTux9(VVhoXs)K}+5>FN zqF7gT2VntW+Iq{Vx|(T-gkjaFqUp1uCzH^gu}p0IqR26=5r1G`lvWHE*@mi@t|O;v zYnE%;YnW7)8_4Z=k$jmx%hVEaT3wv>Fv@ZWE#%iOiZ*gvwsDE#CIWUlf0ZIU zrdV1@F$|M}Zl5X=;;{E&eH6 z)ZOen(|g`?#*3d;H?9(RJl2S^)83!*SRR4n|V3_Mk` zV1`=DjrDY5bDSLRK>2`#5pck?kdaPd2?vV!M?S^V-54=jv z@A&__%ll?L|ICqqio)UE57N&9fH;BQK~=Ztwa^u#ZbIxUpSP*6jst)LMhMGVjXH72 zbK(RT3*h!Ua{_P-Wn`!o9o488y#UB}o+xX;OIao(7YJemxJiZsJB^c#YQ z!C+m}agL?Eoa^Qk%`xIxLD~l6k(wL}w`~L!@O;4W4%Rp@eW*~HVr~p|gB*)8^9no; zju_}Yw;TjWbT8Qm5BXjOZsv_{SXEXWq%sqzCMKp}*KSglG@}IRM*)oAweXOSQ6B0A zNn;2X!E+oo(VG}{9vo^>fMwFPXbcY(GTiAnE9v;pbtZ!JPyjEGSccP?d-T5>)suR} ztYGTVRFgguz+@a0mRT!cj8#^r1!}mmSa!{FJAzSawX$klqI;y)=r~5^8iQ7-zhfC`pW$z81iVTjtjPmd5J<)^JnP z3_2fh5!0#URnkT3u>v^PkH=PhW2W%=C>UNMTQw_v_?ZAkLJbwp$EHDumc=yFcVCib z+X|gPAO8C1qtqmvAWOy$8A*$*<*^3l-yOD!gYK#}GMgK%6#)RmzaK=v`5JxziR)u>5;*1-MYMn6NtSEBs zjQ#_5xvdP7_+(jMr7kE<750pr%)2oBDFw!&=FJ|sqsWuv{tXANv!O8TZRHqqGvCCr zUbLuDUkFlEVCA5cjjK|kNQVV1N(n+AVu#-e;8=8{hcEA$WAM|N>s*9Ne^c5`Kn|~KTI&S2^i?NX7 zSpF62x7*4IT8Ru~&j_a({Ay-@Q{>1E0DdBXVeH_}?HWqlD0~IXZO!NWhaCRV0F8IU zmaesxgM5-xTzNQ0UCcj5^m_7e(pCN`MsvsiA&AC*xDT4waUbA{v)+A`f+|S+gK~Tr zWMKw=k8f4$crX*B$Zl$mLmpb-bifZ`5{~g~AC#=J?zWY&F7B>23jU(Bu&+nm5Kv;m z-`Irk>H-TKSZMbP6LVwwA0k^6v?ck{Gd%C)Cf=wp#EsYBO=?_t1qx5qxZQyY%X};R zpo~+Cm^x-9e@gg8c_eJQuI0%2{Qdj)1E+blkkb1&_!w;uW@dTeev6h+ZfenL;3T|P|Pkzv;ti@US4Gv9pk?e6Lq)}95o zg%UA{t+=EqGSuV`)0EML}4r3Y*oMP+Tk5ZsAhL^lX*n zgtlq6b&^qa(`#lLnyza`JJVhE2V_-o72Rx$%rAhUbckaqDiKOs`3>SKO`NZnn2UOW zx~S)U7xmrc6#!LN97kXi1>Y0A0s;Rluc2$I;JAv5|K>GE)(p+n6kYoUlX)bx6x|`{ z;G}KKGgMbI4S_DG8Y)@1EBHRC?Yw1T@{fctrY(vGVo@&}F0lk1nI&{%*VL{i3;ht~Jx<>S7p6n@I&9u+AbejZ>IdhN^_B9Pz<0>8N>^s(a z7O8KT2I+lx4Xg9g=UPxzso9K*xQ={Zh+wBhxC6hY;Ql#?&d>VBBI^n<=nApBJQqx4 z6idSnp#|_;WA0|)o=&tV%5o!sIWV{qGq3|JkF8}*hGfmSAz*<)xT}k(WI7ZTeD09&~=-bva7r_4YSirjj~|- zyDky47TD$r@1-x{=Bel+de=`Pn?V36(EHv&x&xyT09ed0)+43%NrCW$)RS9EN7H)& zGcLnKG|{$A&kBlwEb<(sO=QYER)(?kw+Tqb;mN`T!LtTMxr=tlT*km;b}j@rq_r67 z06z&Mj@RiZSX-Z(>%fQgAulbA#R-{^%-#zf9q&dl2%{LS;PWu0wA)yFrl@|cefBK$ z^&%ZEVD%OtrFyna47De#rqLxf4MwKtEV7AP;L>jsFnx0G2rLgzrl1W|FcsF}xu>x1 zVi|LM8OB|W*rdrEI|w*seL zU}#M$SDyM#H>#Vpuka(0{+WYhOr!YEV32h`m5_<--M-+&)`&H%DsA#mgcDSR(~n`0 zP0YYl?dewWSegLCrAjp~RWP7&7)3}B5d2EuSvIlpq*5!((bzzG6)sjZ$KCPIIA@zY z_wbHEscuoda_}C>crrv!LN?@@`^50&CauEE(bbNHX9eN2FdAwtuBHts^vyTenw~iZ zd5QF9IvLyKJqMF)7nJHSz7-g@6qJ@gAM*GAk`n()AD``n74b}GO~zD~3g_u6y9lGi zX!@E=8F;$&CHN>Nd(A-Zk0MIN<2a&BG16bd)M2gxn)hIk9#a95*ZL!gXIwuNvwsf2 zc!9nwf(HcunuGCp@%Y8Qj^k!Q1?HB{Xzk~ao_!}>`0njLZxR#yIDHm{^x%KsU^L8_ z?|-<2CgJw|`{&Ry*m~)m6p)1laD%@_19;{0=TR6)=H3Cj49xw;{VrWS}5 z>3H?on_`Q5_Ng!W;e`;dp=~pIy<$!XRFH+$Sc!i9lo%;g)(W*s>6gT8iM?7y=3UJD kuU2t)xiQS{D-Z5OPl!eTofmr+_I(mEOaJM100#j70s2@5asU7T literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo.php new file mode 100644 index 000000000000..d8930f249f8d --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo.php @@ -0,0 +1,129 @@ +google.cloud.billing.v1.AggregationInfo + */ +class AggregationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1; + */ + protected $aggregation_level = 0; + /** + * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2; + */ + protected $aggregation_interval = 0; + /** + * The number of intervals to aggregate over. + * Example: If aggregation_level is "DAILY" and aggregation_count is 14, + * aggregation will be over 14 days. + * + * Generated from protobuf field int32 aggregation_count = 3; + */ + protected $aggregation_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $aggregation_level + * @type int $aggregation_interval + * @type int $aggregation_count + * The number of intervals to aggregate over. + * Example: If aggregation_level is "DAILY" and aggregation_count is 14, + * aggregation will be over 14 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1; + * @return int + */ + public function getAggregationLevel() + { + return $this->aggregation_level; + } + + /** + * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1; + * @param int $var + * @return $this + */ + public function setAggregationLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Billing\V1\AggregationInfo\AggregationLevel::class); + $this->aggregation_level = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2; + * @return int + */ + public function getAggregationInterval() + { + return $this->aggregation_interval; + } + + /** + * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2; + * @param int $var + * @return $this + */ + public function setAggregationInterval($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Billing\V1\AggregationInfo\AggregationInterval::class); + $this->aggregation_interval = $var; + + return $this; + } + + /** + * The number of intervals to aggregate over. + * Example: If aggregation_level is "DAILY" and aggregation_count is 14, + * aggregation will be over 14 days. + * + * Generated from protobuf field int32 aggregation_count = 3; + * @return int + */ + public function getAggregationCount() + { + return $this->aggregation_count; + } + + /** + * The number of intervals to aggregate over. + * Example: If aggregation_level is "DAILY" and aggregation_count is 14, + * aggregation will be over 14 days. + * + * Generated from protobuf field int32 aggregation_count = 3; + * @param int $var + * @return $this + */ + public function setAggregationCount($var) + { + GPBUtil::checkInt32($var); + $this->aggregation_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationInterval.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationInterval.php new file mode 100644 index 000000000000..f2b1053e1ddd --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationInterval.php @@ -0,0 +1,60 @@ +google.cloud.billing.v1.AggregationInfo.AggregationInterval + */ +class AggregationInterval +{ + /** + * Generated from protobuf enum AGGREGATION_INTERVAL_UNSPECIFIED = 0; + */ + const AGGREGATION_INTERVAL_UNSPECIFIED = 0; + /** + * Generated from protobuf enum DAILY = 1; + */ + const DAILY = 1; + /** + * Generated from protobuf enum MONTHLY = 2; + */ + const MONTHLY = 2; + + private static $valueToName = [ + self::AGGREGATION_INTERVAL_UNSPECIFIED => 'AGGREGATION_INTERVAL_UNSPECIFIED', + self::DAILY => 'DAILY', + self::MONTHLY => 'MONTHLY', + ]; + + 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(AggregationInterval::class, \Google\Cloud\Billing\V1\AggregationInfo_AggregationInterval::class); + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationLevel.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationLevel.php new file mode 100644 index 000000000000..f1a3ae2babba --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationLevel.php @@ -0,0 +1,60 @@ +google.cloud.billing.v1.AggregationInfo.AggregationLevel + */ +class AggregationLevel +{ + /** + * Generated from protobuf enum AGGREGATION_LEVEL_UNSPECIFIED = 0; + */ + const AGGREGATION_LEVEL_UNSPECIFIED = 0; + /** + * Generated from protobuf enum ACCOUNT = 1; + */ + const ACCOUNT = 1; + /** + * Generated from protobuf enum PROJECT = 2; + */ + const PROJECT = 2; + + private static $valueToName = [ + self::AGGREGATION_LEVEL_UNSPECIFIED => 'AGGREGATION_LEVEL_UNSPECIFIED', + self::ACCOUNT => 'ACCOUNT', + self::PROJECT => 'PROJECT', + ]; + + 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(AggregationLevel::class, \Google\Cloud\Billing\V1\AggregationInfo_AggregationLevel::class); + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/BillingAccount.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/BillingAccount.php new file mode 100644 index 000000000000..b0a029317d58 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/BillingAccount.php @@ -0,0 +1,277 @@ +google.cloud.billing.v1.BillingAccount + */ +class BillingAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the billing account. The resource name + * has the form `billingAccounts/{billing_account_id}`. For example, + * `billingAccounts/012345-567890-ABCDEF` would be the resource name for + * billing account `012345-567890-ABCDEF`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. True if the billing account is open, and will therefore be + * charged for any usage on associated projects. False if the billing account + * is closed, and therefore projects associated with it are unable to use paid + * services. + * + * Generated from protobuf field bool open = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $open = false; + /** + * The display name given to the billing account, such as `My Billing + * Account`. This name is displayed in the Google Cloud Console. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * If this account is a + * [subaccount](https://cloud.google.com/billing/docs/concepts), then this + * will be the resource name of the parent billing account that it is being + * resold through. + * Otherwise this will be empty. + * + * Generated from protobuf field string master_billing_account = 4; + */ + protected $master_billing_account = ''; + /** + * Output only. The billing account's parent resource identifier. + * Use the `MoveBillingAccount` method to update the account's parent resource + * if it is a organization. + * Format: + * - `organizations/{organization_id}`, for example, + * `organizations/12345678` + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * Generated from protobuf field string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the billing account. The resource name + * has the form `billingAccounts/{billing_account_id}`. For example, + * `billingAccounts/012345-567890-ABCDEF` would be the resource name for + * billing account `012345-567890-ABCDEF`. + * @type bool $open + * Output only. True if the billing account is open, and will therefore be + * charged for any usage on associated projects. False if the billing account + * is closed, and therefore projects associated with it are unable to use paid + * services. + * @type string $display_name + * The display name given to the billing account, such as `My Billing + * Account`. This name is displayed in the Google Cloud Console. + * @type string $master_billing_account + * If this account is a + * [subaccount](https://cloud.google.com/billing/docs/concepts), then this + * will be the resource name of the parent billing account that it is being + * resold through. + * Otherwise this will be empty. + * @type string $parent + * Output only. The billing account's parent resource identifier. + * Use the `MoveBillingAccount` method to update the account's parent resource + * if it is a organization. + * Format: + * - `organizations/{organization_id}`, for example, + * `organizations/12345678` + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the billing account. The resource name + * has the form `billingAccounts/{billing_account_id}`. For example, + * `billingAccounts/012345-567890-ABCDEF` would be the resource name for + * billing account `012345-567890-ABCDEF`. + * + * 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 billing account. The resource name + * has the form `billingAccounts/{billing_account_id}`. For example, + * `billingAccounts/012345-567890-ABCDEF` would be the resource name for + * billing account `012345-567890-ABCDEF`. + * + * 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. True if the billing account is open, and will therefore be + * charged for any usage on associated projects. False if the billing account + * is closed, and therefore projects associated with it are unable to use paid + * services. + * + * Generated from protobuf field bool open = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getOpen() + { + return $this->open; + } + + /** + * Output only. True if the billing account is open, and will therefore be + * charged for any usage on associated projects. False if the billing account + * is closed, and therefore projects associated with it are unable to use paid + * services. + * + * Generated from protobuf field bool open = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setOpen($var) + { + GPBUtil::checkBool($var); + $this->open = $var; + + return $this; + } + + /** + * The display name given to the billing account, such as `My Billing + * Account`. This name is displayed in the Google Cloud Console. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name given to the billing account, such as `My Billing + * Account`. This name is displayed in the Google Cloud Console. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * If this account is a + * [subaccount](https://cloud.google.com/billing/docs/concepts), then this + * will be the resource name of the parent billing account that it is being + * resold through. + * Otherwise this will be empty. + * + * Generated from protobuf field string master_billing_account = 4; + * @return string + */ + public function getMasterBillingAccount() + { + return $this->master_billing_account; + } + + /** + * If this account is a + * [subaccount](https://cloud.google.com/billing/docs/concepts), then this + * will be the resource name of the parent billing account that it is being + * resold through. + * Otherwise this will be empty. + * + * Generated from protobuf field string master_billing_account = 4; + * @param string $var + * @return $this + */ + public function setMasterBillingAccount($var) + { + GPBUtil::checkString($var, True); + $this->master_billing_account = $var; + + return $this; + } + + /** + * Output only. The billing account's parent resource identifier. + * Use the `MoveBillingAccount` method to update the account's parent resource + * if it is a organization. + * Format: + * - `organizations/{organization_id}`, for example, + * `organizations/12345678` + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * Generated from protobuf field string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Output only. The billing account's parent resource identifier. + * Use the `MoveBillingAccount` method to update the account's parent resource + * if it is a organization. + * Format: + * - `organizations/{organization_id}`, for example, + * `organizations/12345678` + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * Generated from protobuf field string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Category.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Category.php new file mode 100644 index 000000000000..85efb2d9828d --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Category.php @@ -0,0 +1,181 @@ +google.cloud.billing.v1.Category + */ +class Category extends \Google\Protobuf\Internal\Message +{ + /** + * The display name of the service this SKU belongs to. + * + * Generated from protobuf field string service_display_name = 1; + */ + protected $service_display_name = ''; + /** + * The type of product the SKU refers to. + * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. + * + * Generated from protobuf field string resource_family = 2; + */ + protected $resource_family = ''; + /** + * A group classification for related SKUs. + * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. + * + * Generated from protobuf field string resource_group = 3; + */ + protected $resource_group = ''; + /** + * Represents how the SKU is consumed. + * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. + * + * Generated from protobuf field string usage_type = 4; + */ + protected $usage_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_display_name + * The display name of the service this SKU belongs to. + * @type string $resource_family + * The type of product the SKU refers to. + * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. + * @type string $resource_group + * A group classification for related SKUs. + * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. + * @type string $usage_type + * Represents how the SKU is consumed. + * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * The display name of the service this SKU belongs to. + * + * Generated from protobuf field string service_display_name = 1; + * @return string + */ + public function getServiceDisplayName() + { + return $this->service_display_name; + } + + /** + * The display name of the service this SKU belongs to. + * + * Generated from protobuf field string service_display_name = 1; + * @param string $var + * @return $this + */ + public function setServiceDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->service_display_name = $var; + + return $this; + } + + /** + * The type of product the SKU refers to. + * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. + * + * Generated from protobuf field string resource_family = 2; + * @return string + */ + public function getResourceFamily() + { + return $this->resource_family; + } + + /** + * The type of product the SKU refers to. + * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. + * + * Generated from protobuf field string resource_family = 2; + * @param string $var + * @return $this + */ + public function setResourceFamily($var) + { + GPBUtil::checkString($var, True); + $this->resource_family = $var; + + return $this; + } + + /** + * A group classification for related SKUs. + * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. + * + * Generated from protobuf field string resource_group = 3; + * @return string + */ + public function getResourceGroup() + { + return $this->resource_group; + } + + /** + * A group classification for related SKUs. + * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. + * + * Generated from protobuf field string resource_group = 3; + * @param string $var + * @return $this + */ + public function setResourceGroup($var) + { + GPBUtil::checkString($var, True); + $this->resource_group = $var; + + return $this; + } + + /** + * Represents how the SKU is consumed. + * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. + * + * Generated from protobuf field string usage_type = 4; + * @return string + */ + public function getUsageType() + { + return $this->usage_type; + } + + /** + * Represents how the SKU is consumed. + * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. + * + * Generated from protobuf field string usage_type = 4; + * @param string $var + * @return $this + */ + public function setUsageType($var) + { + GPBUtil::checkString($var, True); + $this->usage_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/CreateBillingAccountRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/CreateBillingAccountRequest.php new file mode 100644 index 000000000000..f4908a58e921 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/CreateBillingAccountRequest.php @@ -0,0 +1,172 @@ +google.cloud.billing.v1.CreateBillingAccountRequest + */ +class CreateBillingAccountRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The billing account resource to create. + * Currently CreateBillingAccount only supports subaccount creation, so + * any created billing accounts must be under a provided parent billing + * account. + * + * Generated from protobuf field .google.cloud.billing.v1.BillingAccount billing_account = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $billing_account = null; + /** + * Optional. The parent to create a billing account from. + * Format: + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parent = ''; + + /** + * @param \Google\Cloud\Billing\V1\BillingAccount $billingAccount Required. The billing account resource to create. + * Currently CreateBillingAccount only supports subaccount creation, so + * any created billing accounts must be under a provided parent billing + * account. + * + * @return \Google\Cloud\Billing\V1\CreateBillingAccountRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Billing\V1\BillingAccount $billingAccount): self + { + return (new self()) + ->setBillingAccount($billingAccount); + } + + /** + * @param \Google\Cloud\Billing\V1\BillingAccount $billingAccount Required. The billing account resource to create. + * Currently CreateBillingAccount only supports subaccount creation, so + * any created billing accounts must be under a provided parent billing + * account. + * @param string $parent Optional. The parent to create a billing account from. + * Format: + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * @return \Google\Cloud\Billing\V1\CreateBillingAccountRequest + * + * @experimental + */ + public static function buildFromBillingAccountParent(\Google\Cloud\Billing\V1\BillingAccount $billingAccount, string $parent): self + { + return (new self()) + ->setBillingAccount($billingAccount) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Billing\V1\BillingAccount $billing_account + * Required. The billing account resource to create. + * Currently CreateBillingAccount only supports subaccount creation, so + * any created billing accounts must be under a provided parent billing + * account. + * @type string $parent + * Optional. The parent to create a billing account from. + * Format: + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Required. The billing account resource to create. + * Currently CreateBillingAccount only supports subaccount creation, so + * any created billing accounts must be under a provided parent billing + * account. + * + * Generated from protobuf field .google.cloud.billing.v1.BillingAccount billing_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Billing\V1\BillingAccount|null + */ + public function getBillingAccount() + { + return $this->billing_account; + } + + public function hasBillingAccount() + { + return isset($this->billing_account); + } + + public function clearBillingAccount() + { + unset($this->billing_account); + } + + /** + * Required. The billing account resource to create. + * Currently CreateBillingAccount only supports subaccount creation, so + * any created billing accounts must be under a provided parent billing + * account. + * + * Generated from protobuf field .google.cloud.billing.v1.BillingAccount billing_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Billing\V1\BillingAccount $var + * @return $this + */ + public function setBillingAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\BillingAccount::class); + $this->billing_account = $var; + + return $this; + } + + /** + * Optional. The parent to create a billing account from. + * Format: + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. The parent to create a billing account from. + * Format: + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy.php new file mode 100644 index 000000000000..62a3391e2bd0 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy.php @@ -0,0 +1,105 @@ +google.cloud.billing.v1.GeoTaxonomy + */ +class GeoTaxonomy extends \Google\Protobuf\Internal\Message +{ + /** + * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + * + * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + */ + protected $type = 0; + /** + * The list of regions associated with a sku. Empty for Global skus, which are + * associated with all Google Cloud regions. + * + * Generated from protobuf field repeated string regions = 2; + */ + private $regions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + * @type array|\Google\Protobuf\Internal\RepeatedField $regions + * The list of regions associated with a sku. Empty for Global skus, which are + * associated with all Google Cloud regions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + * + * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + * + * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Billing\V1\GeoTaxonomy\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The list of regions associated with a sku. Empty for Global skus, which are + * associated with all Google Cloud regions. + * + * Generated from protobuf field repeated string regions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegions() + { + return $this->regions; + } + + /** + * The list of regions associated with a sku. Empty for Global skus, which are + * associated with all Google Cloud regions. + * + * Generated from protobuf field repeated string regions = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->regions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy/Type.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy/Type.php new file mode 100644 index 000000000000..8374985261bb --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy/Type.php @@ -0,0 +1,77 @@ +google.cloud.billing.v1.GeoTaxonomy.Type + */ +class Type +{ + /** + * The type is not specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * The sku is global in nature, e.g. a license sku. Global skus are + * available in all regions, and so have an empty region list. + * + * Generated from protobuf enum GLOBAL = 1; + */ + const PBGLOBAL = 1; + /** + * The sku is available in a specific region, e.g. "us-west2". + * + * Generated from protobuf enum REGIONAL = 2; + */ + const REGIONAL = 2; + /** + * The sku is associated with multiple regions, e.g. "us-west2" and + * "us-east1". + * + * Generated from protobuf enum MULTI_REGIONAL = 3; + */ + const MULTI_REGIONAL = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::PBGLOBAL => 'GLOBAL', + self::REGIONAL => 'REGIONAL', + self::MULTI_REGIONAL => 'MULTI_REGIONAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Billing\V1\GeoTaxonomy_Type::class); + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetBillingAccountRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetBillingAccountRequest.php new file mode 100644 index 000000000000..b98ae19f16c9 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetBillingAccountRequest.php @@ -0,0 +1,86 @@ +google.cloud.billing.v1.GetBillingAccountRequest + */ +class GetBillingAccountRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the billing account to retrieve. For + * example, `billingAccounts/012345-567890-ABCDEF`. + * + * 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 billing account to retrieve. For + * example, `billingAccounts/012345-567890-ABCDEF`. Please see + * {@see CloudBillingClient::billingAccountName()} for help formatting this field. + * + * @return \Google\Cloud\Billing\V1\GetBillingAccountRequest + * + * @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 billing account to retrieve. For + * example, `billingAccounts/012345-567890-ABCDEF`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the billing account to retrieve. For + * example, `billingAccounts/012345-567890-ABCDEF`. + * + * 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 billing account to retrieve. For + * example, `billingAccounts/012345-567890-ABCDEF`. + * + * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetProjectBillingInfoRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetProjectBillingInfoRequest.php new file mode 100644 index 000000000000..80d4f29f30bc --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetProjectBillingInfoRequest.php @@ -0,0 +1,86 @@ +google.cloud.billing.v1.GetProjectBillingInfoRequest + */ +class GetProjectBillingInfoRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the project for which billing information is + * retrieved. For example, `projects/tokyo-rain-123`. + * + * 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 project for which billing information is + * retrieved. For example, `projects/tokyo-rain-123`. Please see + * {@see CloudBillingClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Billing\V1\GetProjectBillingInfoRequest + * + * @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 project for which billing information is + * retrieved. For example, `projects/tokyo-rain-123`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the project for which billing information is + * retrieved. For example, `projects/tokyo-rain-123`. + * + * 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 project for which billing information is + * retrieved. For example, `projects/tokyo-rain-123`. + * + * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsRequest.php new file mode 100644 index 000000000000..8a5225f250ca --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsRequest.php @@ -0,0 +1,243 @@ +google.cloud.billing.v1.ListBillingAccountsRequest + */ +class ListBillingAccountsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Requested page size. The maximum page size is 100; this is also the + * default. + * + * Generated from protobuf field int32 page_size = 1; + */ + protected $page_size = 0; + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListBillingAccounts` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * Options for how to filter the returned billing accounts. + * This only supports filtering for + * [subaccounts](https://cloud.google.com/billing/docs/concepts) under a + * single provided parent billing account. + * (for example, + * `master_billing_account=billingAccounts/012345-678901-ABCDEF`). + * Boolean algebra and other fields are not currently supported. + * + * Generated from protobuf field string filter = 3; + */ + protected $filter = ''; + /** + * Optional. The parent resource to list billing accounts from. + * Format: + * - `organizations/{organization_id}`, for example, + * `organizations/12345678` + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parent = ''; + + /** + * @param string $parent Optional. The parent resource to list billing accounts from. + * Format: + * - `organizations/{organization_id}`, for example, + * `organizations/12345678` + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * @return \Google\Cloud\Billing\V1\ListBillingAccountsRequest + * + * @experimental + */ + public static function buildFromParent(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * Requested page size. The maximum page size is 100; this is also the + * default. + * @type string $page_token + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListBillingAccounts` + * call. If unspecified, the first page of results is returned. + * @type string $filter + * Options for how to filter the returned billing accounts. + * This only supports filtering for + * [subaccounts](https://cloud.google.com/billing/docs/concepts) under a + * single provided parent billing account. + * (for example, + * `master_billing_account=billingAccounts/012345-678901-ABCDEF`). + * Boolean algebra and other fields are not currently supported. + * @type string $parent + * Optional. The parent resource to list billing accounts from. + * Format: + * - `organizations/{organization_id}`, for example, + * `organizations/12345678` + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Requested page size. The maximum page size is 100; this is also the + * default. + * + * Generated from protobuf field int32 page_size = 1; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The maximum page size is 100; this is also the + * default. + * + * Generated from protobuf field int32 page_size = 1; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListBillingAccounts` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListBillingAccounts` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Options for how to filter the returned billing accounts. + * This only supports filtering for + * [subaccounts](https://cloud.google.com/billing/docs/concepts) under a + * single provided parent billing account. + * (for example, + * `master_billing_account=billingAccounts/012345-678901-ABCDEF`). + * Boolean algebra and other fields are not currently supported. + * + * Generated from protobuf field string filter = 3; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Options for how to filter the returned billing accounts. + * This only supports filtering for + * [subaccounts](https://cloud.google.com/billing/docs/concepts) under a + * single provided parent billing account. + * (for example, + * `master_billing_account=billingAccounts/012345-678901-ABCDEF`). + * Boolean algebra and other fields are not currently supported. + * + * Generated from protobuf field string filter = 3; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The parent resource to list billing accounts from. + * Format: + * - `organizations/{organization_id}`, for example, + * `organizations/12345678` + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. The parent resource to list billing accounts from. + * Format: + * - `organizations/{organization_id}`, for example, + * `organizations/12345678` + * - `billingAccounts/{billing_account_id}`, for example, + * `billingAccounts/012345-567890-ABCDEF` + * + * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsResponse.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsResponse.php new file mode 100644 index 000000000000..f5588f486fbc --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsResponse.php @@ -0,0 +1,109 @@ +google.cloud.billing.v1.ListBillingAccountsResponse + */ +class ListBillingAccountsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of billing accounts. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.BillingAccount billing_accounts = 1; + */ + private $billing_accounts; + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListBillingAccounts` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * 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\Billing\V1\BillingAccount>|\Google\Protobuf\Internal\RepeatedField $billing_accounts + * A list of billing accounts. + * @type string $next_page_token + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListBillingAccounts` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * A list of billing accounts. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.BillingAccount billing_accounts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBillingAccounts() + { + return $this->billing_accounts; + } + + /** + * A list of billing accounts. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.BillingAccount billing_accounts = 1; + * @param array<\Google\Cloud\Billing\V1\BillingAccount>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBillingAccounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\BillingAccount::class); + $this->billing_accounts = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListBillingAccounts` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListBillingAccounts` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoRequest.php new file mode 100644 index 000000000000..30ca6e1f929f --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoRequest.php @@ -0,0 +1,171 @@ +google.cloud.billing.v1.ListProjectBillingInfoRequest + */ +class ListProjectBillingInfoRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the billing account associated with the + * projects that you want to list. For example, + * `billingAccounts/012345-567890-ABCDEF`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Requested page size. The maximum page size is 100; this is also the + * default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous `ListProjectBillingInfo` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The resource name of the billing account associated with the + * projects that you want to list. For example, + * `billingAccounts/012345-567890-ABCDEF`. Please see + * {@see CloudBillingClient::billingAccountName()} for help formatting this field. + * + * @return \Google\Cloud\Billing\V1\ListProjectBillingInfoRequest + * + * @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 billing account associated with the + * projects that you want to list. For example, + * `billingAccounts/012345-567890-ABCDEF`. + * @type int $page_size + * Requested page size. The maximum page size is 100; this is also the + * default. + * @type string $page_token + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous `ListProjectBillingInfo` + * call. If unspecified, the first page of results is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the billing account associated with the + * projects that you want to list. For example, + * `billingAccounts/012345-567890-ABCDEF`. + * + * 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 billing account associated with the + * projects that you want to list. For example, + * `billingAccounts/012345-567890-ABCDEF`. + * + * 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; + } + + /** + * Requested page size. The maximum page size is 100; this is also the + * default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The maximum page size is 100; this is also the + * default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous `ListProjectBillingInfo` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous `ListProjectBillingInfo` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoResponse.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoResponse.php new file mode 100644 index 000000000000..f2a9c1eb6519 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoResponse.php @@ -0,0 +1,113 @@ +google.cloud.billing.v1.ListProjectBillingInfoResponse + */ +class ListProjectBillingInfoResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of `ProjectBillingInfo` resources representing the projects + * associated with the billing account. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 1; + */ + private $project_billing_info; + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListProjectBillingInfo` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * 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\Billing\V1\ProjectBillingInfo>|\Google\Protobuf\Internal\RepeatedField $project_billing_info + * A list of `ProjectBillingInfo` resources representing the projects + * associated with the billing account. + * @type string $next_page_token + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListProjectBillingInfo` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * A list of `ProjectBillingInfo` resources representing the projects + * associated with the billing account. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProjectBillingInfo() + { + return $this->project_billing_info; + } + + /** + * A list of `ProjectBillingInfo` resources representing the projects + * associated with the billing account. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 1; + * @param array<\Google\Cloud\Billing\V1\ProjectBillingInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProjectBillingInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\ProjectBillingInfo::class); + $this->project_billing_info = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListProjectBillingInfo` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListProjectBillingInfo` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesRequest.php new file mode 100644 index 000000000000..5588e0ded1a6 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesRequest.php @@ -0,0 +1,109 @@ +google.cloud.billing.v1.ListServicesRequest + */ +class ListServicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Requested page size. Defaults to 5000. + * + * Generated from protobuf field int32 page_size = 1; + */ + protected $page_size = 0; + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListServices` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * Requested page size. Defaults to 5000. + * @type string $page_token + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListServices` + * call. If unspecified, the first page of results is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * Requested page size. Defaults to 5000. + * + * Generated from protobuf field int32 page_size = 1; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Defaults to 5000. + * + * Generated from protobuf field int32 page_size = 1; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListServices` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListServices` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesResponse.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesResponse.php new file mode 100644 index 000000000000..4961aae23306 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesResponse.php @@ -0,0 +1,109 @@ +google.cloud.billing.v1.ListServicesResponse + */ +class ListServicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of services. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.Service services = 1; + */ + private $services; + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListServices` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * 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\Billing\V1\Service>|\Google\Protobuf\Internal\RepeatedField $services + * A list of services. + * @type string $next_page_token + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListServices` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * A list of services. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.Service services = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServices() + { + return $this->services; + } + + /** + * A list of services. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.Service services = 1; + * @param array<\Google\Cloud\Billing\V1\Service>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\Service::class); + $this->services = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListServices` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListServices` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusRequest.php new file mode 100644 index 000000000000..4c0ec5d04aec --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusRequest.php @@ -0,0 +1,332 @@ +google.cloud.billing.v1.ListSkusRequest + */ +class ListSkusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the service. + * Example: "services/6F81-5844-456A" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional inclusive start time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * The time range has to be within a single calendar month in + * America/Los_Angeles timezone. Time range as a whole is optional. If not + * specified, the latest pricing will be returned (up to 12 hours old at + * most). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * Optional exclusive end time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * The time range has to be within a single calendar month in + * America/Los_Angeles timezone. Time range as a whole is optional. If not + * specified, the latest pricing will be returned (up to 12 hours old at + * most). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + /** + * The ISO 4217 currency code for the pricing info in the response proto. + * Will use the conversion rate as of start_time. + * Optional. If not specified USD will be used. + * + * Generated from protobuf field string currency_code = 4; + */ + protected $currency_code = ''; + /** + * Requested page size. Defaults to 5000. + * + * Generated from protobuf field int32 page_size = 5; + */ + protected $page_size = 0; + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListSkus` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 6; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the service. + * Example: "services/6F81-5844-456A" + * Please see {@see CloudCatalogClient::serviceName()} for help formatting this field. + * + * @return \Google\Cloud\Billing\V1\ListSkusRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the service. + * Example: "services/6F81-5844-456A" + * @type \Google\Protobuf\Timestamp $start_time + * Optional inclusive start time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * The time range has to be within a single calendar month in + * America/Los_Angeles timezone. Time range as a whole is optional. If not + * specified, the latest pricing will be returned (up to 12 hours old at + * most). + * @type \Google\Protobuf\Timestamp $end_time + * Optional exclusive end time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * The time range has to be within a single calendar month in + * America/Los_Angeles timezone. Time range as a whole is optional. If not + * specified, the latest pricing will be returned (up to 12 hours old at + * most). + * @type string $currency_code + * The ISO 4217 currency code for the pricing info in the response proto. + * Will use the conversion rate as of start_time. + * Optional. If not specified USD will be used. + * @type int $page_size + * Requested page size. Defaults to 5000. + * @type string $page_token + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListSkus` + * call. If unspecified, the first page of results is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the service. + * Example: "services/6F81-5844-456A" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the service. + * Example: "services/6F81-5844-456A" + * + * 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 inclusive start time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * The time range has to be within a single calendar month in + * America/Los_Angeles timezone. Time range as a whole is optional. If not + * specified, the latest pricing will be returned (up to 12 hours old at + * most). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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 inclusive start time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * The time range has to be within a single calendar month in + * America/Los_Angeles timezone. Time range as a whole is optional. If not + * specified, the latest pricing will be returned (up to 12 hours old at + * most). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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 exclusive end time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * The time range has to be within a single calendar month in + * America/Los_Angeles timezone. Time range as a whole is optional. If not + * specified, the latest pricing will be returned (up to 12 hours old at + * most). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @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); + } + + /** + * Optional exclusive end time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * The time range has to be within a single calendar month in + * America/Los_Angeles timezone. Time range as a whole is optional. If not + * specified, the latest pricing will be returned (up to 12 hours old at + * most). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @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 ISO 4217 currency code for the pricing info in the response proto. + * Will use the conversion rate as of start_time. + * Optional. If not specified USD will be used. + * + * Generated from protobuf field string currency_code = 4; + * @return string + */ + public function getCurrencyCode() + { + return $this->currency_code; + } + + /** + * The ISO 4217 currency code for the pricing info in the response proto. + * Will use the conversion rate as of start_time. + * Optional. If not specified USD will be used. + * + * Generated from protobuf field string currency_code = 4; + * @param string $var + * @return $this + */ + public function setCurrencyCode($var) + { + GPBUtil::checkString($var, True); + $this->currency_code = $var; + + return $this; + } + + /** + * Requested page size. Defaults to 5000. + * + * Generated from protobuf field int32 page_size = 5; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Defaults to 5000. + * + * Generated from protobuf field int32 page_size = 5; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListSkus` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 6; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListSkus` + * call. If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 6; + * @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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusResponse.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusResponse.php new file mode 100644 index 000000000000..64aa6cbc0ee9 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusResponse.php @@ -0,0 +1,109 @@ +google.cloud.billing.v1.ListSkusResponse + */ +class ListSkusResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of public SKUs of the given service. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.Sku skus = 1; + */ + private $skus; + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListSkus` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * 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\Billing\V1\Sku>|\Google\Protobuf\Internal\RepeatedField $skus + * The list of public SKUs of the given service. + * @type string $next_page_token + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListSkus` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * The list of public SKUs of the given service. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.Sku skus = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSkus() + { + return $this->skus; + } + + /** + * The list of public SKUs of the given service. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.Sku skus = 1; + * @param array<\Google\Cloud\Billing\V1\Sku>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSkus($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\Sku::class); + $this->skus = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListSkus` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListSkus` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + * + * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/MoveBillingAccountRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/MoveBillingAccountRequest.php new file mode 100644 index 000000000000..98e023593485 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/MoveBillingAccountRequest.php @@ -0,0 +1,121 @@ +google.cloud.billing.v1.MoveBillingAccountRequest + */ +class MoveBillingAccountRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the billing account to move. + * Must be of the form `billingAccounts/{billing_account_id}`. + * The specified billing account cannot be a subaccount, since a subaccount + * always belongs to the same organization as its parent account. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The resource name of the Organization to move + * the billing account under. + * Must be of the form `organizations/{organization_id}`. + * + * Generated from protobuf field string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $destination_parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the billing account to move. + * Must be of the form `billingAccounts/{billing_account_id}`. + * The specified billing account cannot be a subaccount, since a subaccount + * always belongs to the same organization as its parent account. + * @type string $destination_parent + * Required. The resource name of the Organization to move + * the billing account under. + * Must be of the form `organizations/{organization_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the billing account to move. + * Must be of the form `billingAccounts/{billing_account_id}`. + * The specified billing account cannot be a subaccount, since a subaccount + * always belongs to the same organization as its parent account. + * + * 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 billing account to move. + * Must be of the form `billingAccounts/{billing_account_id}`. + * The specified billing account cannot be a subaccount, since a subaccount + * always belongs to the same organization as its parent account. + * + * 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 resource name of the Organization to move + * the billing account under. + * Must be of the form `organizations/{organization_id}`. + * + * Generated from protobuf field string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDestinationParent() + { + return $this->destination_parent; + } + + /** + * Required. The resource name of the Organization to move + * the billing account under. + * Must be of the form `organizations/{organization_id}`. + * + * Generated from protobuf field string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDestinationParent($var) + { + GPBUtil::checkString($var, True); + $this->destination_parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression.php new file mode 100644 index 000000000000..4b6c2ec6c177 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression.php @@ -0,0 +1,346 @@ +google.cloud.billing.v1.PricingExpression + */ +class PricingExpression extends \Google\Protobuf\Internal\Message +{ + /** + * The short hand for unit of usage this pricing is specified in. + * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". + * + * Generated from protobuf field string usage_unit = 1; + */ + protected $usage_unit = ''; + /** + * The recommended quantity of units for displaying pricing info. When + * displaying pricing info it is recommended to display: + * (unit_price * display_quantity) per display_quantity usage_unit. + * This field does not affect the pricing formula and is for display purposes + * only. + * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and + * the display_quantity is "1000" then the recommended way of displaying the + * pricing info is "0.10 USD per 1000 GB" + * + * Generated from protobuf field double display_quantity = 2; + */ + protected $display_quantity = 0.0; + /** + * The list of tiered rates for this pricing. The total cost is computed by + * applying each of the tiered rates on usage. This repeated list is sorted + * by ascending order of start_usage_amount. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + private $tiered_rates; + /** + * The unit of usage in human readable form. + * Example: "gibi byte". + * + * Generated from protobuf field string usage_unit_description = 4; + */ + protected $usage_unit_description = ''; + /** + * The base unit for the SKU which is the unit used in usage exports. + * Example: "By" + * + * Generated from protobuf field string base_unit = 5; + */ + protected $base_unit = ''; + /** + * The base unit in human readable form. + * Example: "byte". + * + * Generated from protobuf field string base_unit_description = 6; + */ + protected $base_unit_description = ''; + /** + * Conversion factor for converting from price per usage_unit to price per + * base_unit, and start_usage_amount to start_usage_amount in base_unit. + * unit_price / base_unit_conversion_factor = price per base_unit. + * start_usage_amount * base_unit_conversion_factor = start_usage_amount in + * base_unit. + * + * Generated from protobuf field double base_unit_conversion_factor = 7; + */ + protected $base_unit_conversion_factor = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $usage_unit + * The short hand for unit of usage this pricing is specified in. + * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". + * @type float $display_quantity + * The recommended quantity of units for displaying pricing info. When + * displaying pricing info it is recommended to display: + * (unit_price * display_quantity) per display_quantity usage_unit. + * This field does not affect the pricing formula and is for display purposes + * only. + * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and + * the display_quantity is "1000" then the recommended way of displaying the + * pricing info is "0.10 USD per 1000 GB" + * @type array<\Google\Cloud\Billing\V1\PricingExpression\TierRate>|\Google\Protobuf\Internal\RepeatedField $tiered_rates + * The list of tiered rates for this pricing. The total cost is computed by + * applying each of the tiered rates on usage. This repeated list is sorted + * by ascending order of start_usage_amount. + * @type string $usage_unit_description + * The unit of usage in human readable form. + * Example: "gibi byte". + * @type string $base_unit + * The base unit for the SKU which is the unit used in usage exports. + * Example: "By" + * @type string $base_unit_description + * The base unit in human readable form. + * Example: "byte". + * @type float $base_unit_conversion_factor + * Conversion factor for converting from price per usage_unit to price per + * base_unit, and start_usage_amount to start_usage_amount in base_unit. + * unit_price / base_unit_conversion_factor = price per base_unit. + * start_usage_amount * base_unit_conversion_factor = start_usage_amount in + * base_unit. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * The short hand for unit of usage this pricing is specified in. + * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". + * + * Generated from protobuf field string usage_unit = 1; + * @return string + */ + public function getUsageUnit() + { + return $this->usage_unit; + } + + /** + * The short hand for unit of usage this pricing is specified in. + * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". + * + * Generated from protobuf field string usage_unit = 1; + * @param string $var + * @return $this + */ + public function setUsageUnit($var) + { + GPBUtil::checkString($var, True); + $this->usage_unit = $var; + + return $this; + } + + /** + * The recommended quantity of units for displaying pricing info. When + * displaying pricing info it is recommended to display: + * (unit_price * display_quantity) per display_quantity usage_unit. + * This field does not affect the pricing formula and is for display purposes + * only. + * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and + * the display_quantity is "1000" then the recommended way of displaying the + * pricing info is "0.10 USD per 1000 GB" + * + * Generated from protobuf field double display_quantity = 2; + * @return float + */ + public function getDisplayQuantity() + { + return $this->display_quantity; + } + + /** + * The recommended quantity of units for displaying pricing info. When + * displaying pricing info it is recommended to display: + * (unit_price * display_quantity) per display_quantity usage_unit. + * This field does not affect the pricing formula and is for display purposes + * only. + * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and + * the display_quantity is "1000" then the recommended way of displaying the + * pricing info is "0.10 USD per 1000 GB" + * + * Generated from protobuf field double display_quantity = 2; + * @param float $var + * @return $this + */ + public function setDisplayQuantity($var) + { + GPBUtil::checkDouble($var); + $this->display_quantity = $var; + + return $this; + } + + /** + * The list of tiered rates for this pricing. The total cost is computed by + * applying each of the tiered rates on usage. This repeated list is sorted + * by ascending order of start_usage_amount. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTieredRates() + { + return $this->tiered_rates; + } + + /** + * The list of tiered rates for this pricing. The total cost is computed by + * applying each of the tiered rates on usage. This repeated list is sorted + * by ascending order of start_usage_amount. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * @param array<\Google\Cloud\Billing\V1\PricingExpression\TierRate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTieredRates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\PricingExpression\TierRate::class); + $this->tiered_rates = $arr; + + return $this; + } + + /** + * The unit of usage in human readable form. + * Example: "gibi byte". + * + * Generated from protobuf field string usage_unit_description = 4; + * @return string + */ + public function getUsageUnitDescription() + { + return $this->usage_unit_description; + } + + /** + * The unit of usage in human readable form. + * Example: "gibi byte". + * + * Generated from protobuf field string usage_unit_description = 4; + * @param string $var + * @return $this + */ + public function setUsageUnitDescription($var) + { + GPBUtil::checkString($var, True); + $this->usage_unit_description = $var; + + return $this; + } + + /** + * The base unit for the SKU which is the unit used in usage exports. + * Example: "By" + * + * Generated from protobuf field string base_unit = 5; + * @return string + */ + public function getBaseUnit() + { + return $this->base_unit; + } + + /** + * The base unit for the SKU which is the unit used in usage exports. + * Example: "By" + * + * Generated from protobuf field string base_unit = 5; + * @param string $var + * @return $this + */ + public function setBaseUnit($var) + { + GPBUtil::checkString($var, True); + $this->base_unit = $var; + + return $this; + } + + /** + * The base unit in human readable form. + * Example: "byte". + * + * Generated from protobuf field string base_unit_description = 6; + * @return string + */ + public function getBaseUnitDescription() + { + return $this->base_unit_description; + } + + /** + * The base unit in human readable form. + * Example: "byte". + * + * Generated from protobuf field string base_unit_description = 6; + * @param string $var + * @return $this + */ + public function setBaseUnitDescription($var) + { + GPBUtil::checkString($var, True); + $this->base_unit_description = $var; + + return $this; + } + + /** + * Conversion factor for converting from price per usage_unit to price per + * base_unit, and start_usage_amount to start_usage_amount in base_unit. + * unit_price / base_unit_conversion_factor = price per base_unit. + * start_usage_amount * base_unit_conversion_factor = start_usage_amount in + * base_unit. + * + * Generated from protobuf field double base_unit_conversion_factor = 7; + * @return float + */ + public function getBaseUnitConversionFactor() + { + return $this->base_unit_conversion_factor; + } + + /** + * Conversion factor for converting from price per usage_unit to price per + * base_unit, and start_usage_amount to start_usage_amount in base_unit. + * unit_price / base_unit_conversion_factor = price per base_unit. + * start_usage_amount * base_unit_conversion_factor = start_usage_amount in + * base_unit. + * + * Generated from protobuf field double base_unit_conversion_factor = 7; + * @param float $var + * @return $this + */ + public function setBaseUnitConversionFactor($var) + { + GPBUtil::checkDouble($var); + $this->base_unit_conversion_factor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression/TierRate.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression/TierRate.php new file mode 100644 index 000000000000..d5f1471b2652 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression/TierRate.php @@ -0,0 +1,126 @@ +google.cloud.billing.v1.PricingExpression.TierRate + */ +class TierRate extends \Google\Protobuf\Internal\Message +{ + /** + * Usage is priced at this rate only after this amount. + * Example: start_usage_amount of 10 indicates that the usage will be priced + * at the unit_price after the first 10 usage_units. + * + * Generated from protobuf field double start_usage_amount = 1; + */ + protected $start_usage_amount = 0.0; + /** + * The price per unit of usage. + * Example: unit_price of amount $10 indicates that each unit will cost $10. + * + * Generated from protobuf field .google.type.Money unit_price = 2; + */ + protected $unit_price = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $start_usage_amount + * Usage is priced at this rate only after this amount. + * Example: start_usage_amount of 10 indicates that the usage will be priced + * at the unit_price after the first 10 usage_units. + * @type \Google\Type\Money $unit_price + * The price per unit of usage. + * Example: unit_price of amount $10 indicates that each unit will cost $10. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * Usage is priced at this rate only after this amount. + * Example: start_usage_amount of 10 indicates that the usage will be priced + * at the unit_price after the first 10 usage_units. + * + * Generated from protobuf field double start_usage_amount = 1; + * @return float + */ + public function getStartUsageAmount() + { + return $this->start_usage_amount; + } + + /** + * Usage is priced at this rate only after this amount. + * Example: start_usage_amount of 10 indicates that the usage will be priced + * at the unit_price after the first 10 usage_units. + * + * Generated from protobuf field double start_usage_amount = 1; + * @param float $var + * @return $this + */ + public function setStartUsageAmount($var) + { + GPBUtil::checkDouble($var); + $this->start_usage_amount = $var; + + return $this; + } + + /** + * The price per unit of usage. + * Example: unit_price of amount $10 indicates that each unit will cost $10. + * + * Generated from protobuf field .google.type.Money unit_price = 2; + * @return \Google\Type\Money|null + */ + public function getUnitPrice() + { + return $this->unit_price; + } + + public function hasUnitPrice() + { + return isset($this->unit_price); + } + + public function clearUnitPrice() + { + unset($this->unit_price); + } + + /** + * The price per unit of usage. + * Example: unit_price of amount $10 indicates that each unit will cost $10. + * + * Generated from protobuf field .google.type.Money unit_price = 2; + * @param \Google\Type\Money $var + * @return $this + */ + public function setUnitPrice($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->unit_price = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TierRate::class, \Google\Cloud\Billing\V1\PricingExpression_TierRate::class); + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingInfo.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingInfo.php new file mode 100644 index 000000000000..2c7ad6e6c20d --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingInfo.php @@ -0,0 +1,277 @@ +google.cloud.billing.v1.PricingInfo + */ +class PricingInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The timestamp from which this pricing was effective within the requested + * time range. This is guaranteed to be greater than or equal to the + * start_time field in the request and less than the end_time field in the + * request. If a time range was not specified in the request this field will + * be equivalent to a time within the last 12 hours, indicating the latest + * pricing info. + * + * Generated from protobuf field .google.protobuf.Timestamp effective_time = 1; + */ + protected $effective_time = null; + /** + * An optional human readable summary of the pricing information, has a + * maximum length of 256 characters. + * + * Generated from protobuf field string summary = 2; + */ + protected $summary = ''; + /** + * Expresses the pricing formula. See `PricingExpression` for an example. + * + * Generated from protobuf field .google.cloud.billing.v1.PricingExpression pricing_expression = 3; + */ + protected $pricing_expression = null; + /** + * Aggregation Info. This can be left unspecified if the pricing expression + * doesn't require aggregation. + * + * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo aggregation_info = 4; + */ + protected $aggregation_info = null; + /** + * Conversion rate used for currency conversion, from USD to the currency + * specified in the request. This includes any surcharge collected for billing + * in non USD currency. If a currency is not specified in the request this + * defaults to 1.0. + * Example: USD * currency_conversion_rate = JPY + * + * Generated from protobuf field double currency_conversion_rate = 5; + */ + protected $currency_conversion_rate = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $effective_time + * The timestamp from which this pricing was effective within the requested + * time range. This is guaranteed to be greater than or equal to the + * start_time field in the request and less than the end_time field in the + * request. If a time range was not specified in the request this field will + * be equivalent to a time within the last 12 hours, indicating the latest + * pricing info. + * @type string $summary + * An optional human readable summary of the pricing information, has a + * maximum length of 256 characters. + * @type \Google\Cloud\Billing\V1\PricingExpression $pricing_expression + * Expresses the pricing formula. See `PricingExpression` for an example. + * @type \Google\Cloud\Billing\V1\AggregationInfo $aggregation_info + * Aggregation Info. This can be left unspecified if the pricing expression + * doesn't require aggregation. + * @type float $currency_conversion_rate + * Conversion rate used for currency conversion, from USD to the currency + * specified in the request. This includes any surcharge collected for billing + * in non USD currency. If a currency is not specified in the request this + * defaults to 1.0. + * Example: USD * currency_conversion_rate = JPY + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * The timestamp from which this pricing was effective within the requested + * time range. This is guaranteed to be greater than or equal to the + * start_time field in the request and less than the end_time field in the + * request. If a time range was not specified in the request this field will + * be equivalent to a time within the last 12 hours, indicating the latest + * pricing info. + * + * Generated from protobuf field .google.protobuf.Timestamp effective_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEffectiveTime() + { + return $this->effective_time; + } + + public function hasEffectiveTime() + { + return isset($this->effective_time); + } + + public function clearEffectiveTime() + { + unset($this->effective_time); + } + + /** + * The timestamp from which this pricing was effective within the requested + * time range. This is guaranteed to be greater than or equal to the + * start_time field in the request and less than the end_time field in the + * request. If a time range was not specified in the request this field will + * be equivalent to a time within the last 12 hours, indicating the latest + * pricing info. + * + * Generated from protobuf field .google.protobuf.Timestamp effective_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEffectiveTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->effective_time = $var; + + return $this; + } + + /** + * An optional human readable summary of the pricing information, has a + * maximum length of 256 characters. + * + * Generated from protobuf field string summary = 2; + * @return string + */ + public function getSummary() + { + return $this->summary; + } + + /** + * An optional human readable summary of the pricing information, has a + * maximum length of 256 characters. + * + * Generated from protobuf field string summary = 2; + * @param string $var + * @return $this + */ + public function setSummary($var) + { + GPBUtil::checkString($var, True); + $this->summary = $var; + + return $this; + } + + /** + * Expresses the pricing formula. See `PricingExpression` for an example. + * + * Generated from protobuf field .google.cloud.billing.v1.PricingExpression pricing_expression = 3; + * @return \Google\Cloud\Billing\V1\PricingExpression|null + */ + public function getPricingExpression() + { + return $this->pricing_expression; + } + + public function hasPricingExpression() + { + return isset($this->pricing_expression); + } + + public function clearPricingExpression() + { + unset($this->pricing_expression); + } + + /** + * Expresses the pricing formula. See `PricingExpression` for an example. + * + * Generated from protobuf field .google.cloud.billing.v1.PricingExpression pricing_expression = 3; + * @param \Google\Cloud\Billing\V1\PricingExpression $var + * @return $this + */ + public function setPricingExpression($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\PricingExpression::class); + $this->pricing_expression = $var; + + return $this; + } + + /** + * Aggregation Info. This can be left unspecified if the pricing expression + * doesn't require aggregation. + * + * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo aggregation_info = 4; + * @return \Google\Cloud\Billing\V1\AggregationInfo|null + */ + public function getAggregationInfo() + { + return $this->aggregation_info; + } + + public function hasAggregationInfo() + { + return isset($this->aggregation_info); + } + + public function clearAggregationInfo() + { + unset($this->aggregation_info); + } + + /** + * Aggregation Info. This can be left unspecified if the pricing expression + * doesn't require aggregation. + * + * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo aggregation_info = 4; + * @param \Google\Cloud\Billing\V1\AggregationInfo $var + * @return $this + */ + public function setAggregationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\AggregationInfo::class); + $this->aggregation_info = $var; + + return $this; + } + + /** + * Conversion rate used for currency conversion, from USD to the currency + * specified in the request. This includes any surcharge collected for billing + * in non USD currency. If a currency is not specified in the request this + * defaults to 1.0. + * Example: USD * currency_conversion_rate = JPY + * + * Generated from protobuf field double currency_conversion_rate = 5; + * @return float + */ + public function getCurrencyConversionRate() + { + return $this->currency_conversion_rate; + } + + /** + * Conversion rate used for currency conversion, from USD to the currency + * specified in the request. This includes any surcharge collected for billing + * in non USD currency. If a currency is not specified in the request this + * defaults to 1.0. + * Example: USD * currency_conversion_rate = JPY + * + * Generated from protobuf field double currency_conversion_rate = 5; + * @param float $var + * @return $this + */ + public function setCurrencyConversionRate($var) + { + GPBUtil::checkDouble($var); + $this->currency_conversion_rate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ProjectBillingInfo.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ProjectBillingInfo.php new file mode 100644 index 000000000000..27b7019fb7d8 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ProjectBillingInfo.php @@ -0,0 +1,207 @@ +google.cloud.billing.v1.ProjectBillingInfo + */ +class ProjectBillingInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for the `ProjectBillingInfo`; has the form + * `projects/{project_id}/billingInfo`. For example, the resource name for the + * billing information for project `tokyo-rain-123` would be + * `projects/tokyo-rain-123/billingInfo`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The ID of the project that this `ProjectBillingInfo` + * represents, such as `tokyo-rain-123`. This is a convenience field so that + * you don't need to parse the `name` field to obtain a project ID. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $project_id = ''; + /** + * The resource name of the billing account associated with the project, if + * any. For example, `billingAccounts/012345-567890-ABCDEF`. + * + * Generated from protobuf field string billing_account_name = 3; + */ + protected $billing_account_name = ''; + /** + * Output only. True if the project is associated with an open billing + * account, to which usage on the project is charged. False if the project is + * associated with a closed billing account, or no billing account at all, and + * therefore cannot use paid services. + * + * Generated from protobuf field bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $billing_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for the `ProjectBillingInfo`; has the form + * `projects/{project_id}/billingInfo`. For example, the resource name for the + * billing information for project `tokyo-rain-123` would be + * `projects/tokyo-rain-123/billingInfo`. + * @type string $project_id + * Output only. The ID of the project that this `ProjectBillingInfo` + * represents, such as `tokyo-rain-123`. This is a convenience field so that + * you don't need to parse the `name` field to obtain a project ID. + * @type string $billing_account_name + * The resource name of the billing account associated with the project, if + * any. For example, `billingAccounts/012345-567890-ABCDEF`. + * @type bool $billing_enabled + * Output only. True if the project is associated with an open billing + * account, to which usage on the project is charged. False if the project is + * associated with a closed billing account, or no billing account at all, and + * therefore cannot use paid services. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for the `ProjectBillingInfo`; has the form + * `projects/{project_id}/billingInfo`. For example, the resource name for the + * billing information for project `tokyo-rain-123` would be + * `projects/tokyo-rain-123/billingInfo`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name for the `ProjectBillingInfo`; has the form + * `projects/{project_id}/billingInfo`. For example, the resource name for the + * billing information for project `tokyo-rain-123` would be + * `projects/tokyo-rain-123/billingInfo`. + * + * 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. The ID of the project that this `ProjectBillingInfo` + * represents, such as `tokyo-rain-123`. This is a convenience field so that + * you don't need to parse the `name` field to obtain a project ID. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The ID of the project that this `ProjectBillingInfo` + * represents, such as `tokyo-rain-123`. This is a convenience field so that + * you don't need to parse the `name` field to obtain a project ID. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The resource name of the billing account associated with the project, if + * any. For example, `billingAccounts/012345-567890-ABCDEF`. + * + * Generated from protobuf field string billing_account_name = 3; + * @return string + */ + public function getBillingAccountName() + { + return $this->billing_account_name; + } + + /** + * The resource name of the billing account associated with the project, if + * any. For example, `billingAccounts/012345-567890-ABCDEF`. + * + * Generated from protobuf field string billing_account_name = 3; + * @param string $var + * @return $this + */ + public function setBillingAccountName($var) + { + GPBUtil::checkString($var, True); + $this->billing_account_name = $var; + + return $this; + } + + /** + * Output only. True if the project is associated with an open billing + * account, to which usage on the project is charged. False if the project is + * associated with a closed billing account, or no billing account at all, and + * therefore cannot use paid services. + * + * Generated from protobuf field bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getBillingEnabled() + { + return $this->billing_enabled; + } + + /** + * Output only. True if the project is associated with an open billing + * account, to which usage on the project is charged. False if the project is + * associated with a closed billing account, or no billing account at all, and + * therefore cannot use paid services. + * + * Generated from protobuf field bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setBillingEnabled($var) + { + GPBUtil::checkBool($var); + $this->billing_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Service.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Service.php new file mode 100644 index 000000000000..72890292bfc8 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Service.php @@ -0,0 +1,181 @@ +google.cloud.billing.v1.Service + */ +class Service extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the service. + * Example: "services/6F81-5844-456A" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The identifier for the service. + * Example: "6F81-5844-456A" + * + * Generated from protobuf field string service_id = 2; + */ + protected $service_id = ''; + /** + * A human readable display name for this service. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * The business under which the service is offered. + * Ex. "businessEntities/GCP", "businessEntities/Maps" + * + * Generated from protobuf field string business_entity_name = 4; + */ + protected $business_entity_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name for the service. + * Example: "services/6F81-5844-456A" + * @type string $service_id + * The identifier for the service. + * Example: "6F81-5844-456A" + * @type string $display_name + * A human readable display name for this service. + * @type string $business_entity_name + * The business under which the service is offered. + * Ex. "businessEntities/GCP", "businessEntities/Maps" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * The resource name for the service. + * Example: "services/6F81-5844-456A" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the service. + * Example: "services/6F81-5844-456A" + * + * 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 identifier for the service. + * Example: "6F81-5844-456A" + * + * Generated from protobuf field string service_id = 2; + * @return string + */ + public function getServiceId() + { + return $this->service_id; + } + + /** + * The identifier for the service. + * Example: "6F81-5844-456A" + * + * Generated from protobuf field string service_id = 2; + * @param string $var + * @return $this + */ + public function setServiceId($var) + { + GPBUtil::checkString($var, True); + $this->service_id = $var; + + return $this; + } + + /** + * A human readable display name for this service. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A human readable display name for this service. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The business under which the service is offered. + * Ex. "businessEntities/GCP", "businessEntities/Maps" + * + * Generated from protobuf field string business_entity_name = 4; + * @return string + */ + public function getBusinessEntityName() + { + return $this->business_entity_name; + } + + /** + * The business under which the service is offered. + * Ex. "businessEntities/GCP", "businessEntities/Maps" + * + * Generated from protobuf field string business_entity_name = 4; + * @param string $var + * @return $this + */ + public function setBusinessEntityName($var) + { + GPBUtil::checkString($var, True); + $this->business_entity_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Sku.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Sku.php new file mode 100644 index 000000000000..c96446d386ce --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Sku.php @@ -0,0 +1,349 @@ +google.cloud.billing.v1.Sku + */ +class Sku extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the SKU. + * Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The identifier for the SKU. + * Example: "D041-B8A1-6E0B" + * + * Generated from protobuf field string sku_id = 2; + */ + protected $sku_id = ''; + /** + * A human readable description of the SKU, has a maximum length of 256 + * characters. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The category hierarchy of this SKU, purely for organizational purpose. + * + * Generated from protobuf field .google.cloud.billing.v1.Category category = 4; + */ + protected $category = null; + /** + * List of service regions this SKU is offered at. + * Example: "asia-east1" + * Service regions can be found at https://cloud.google.com/about/locations/ + * + * Generated from protobuf field repeated string service_regions = 5; + */ + private $service_regions; + /** + * A timeline of pricing info for this SKU in chronological order. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6; + */ + private $pricing_info; + /** + * Identifies the service provider. + * This is 'Google' for first party services in Google Cloud Platform. + * + * Generated from protobuf field string service_provider_name = 7; + */ + protected $service_provider_name = ''; + /** + * The geographic taxonomy for this sku. + * + * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + protected $geo_taxonomy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name for the SKU. + * Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" + * @type string $sku_id + * The identifier for the SKU. + * Example: "D041-B8A1-6E0B" + * @type string $description + * A human readable description of the SKU, has a maximum length of 256 + * characters. + * @type \Google\Cloud\Billing\V1\Category $category + * The category hierarchy of this SKU, purely for organizational purpose. + * @type array|\Google\Protobuf\Internal\RepeatedField $service_regions + * List of service regions this SKU is offered at. + * Example: "asia-east1" + * Service regions can be found at https://cloud.google.com/about/locations/ + * @type array<\Google\Cloud\Billing\V1\PricingInfo>|\Google\Protobuf\Internal\RepeatedField $pricing_info + * A timeline of pricing info for this SKU in chronological order. + * @type string $service_provider_name + * Identifies the service provider. + * This is 'Google' for first party services in Google Cloud Platform. + * @type \Google\Cloud\Billing\V1\GeoTaxonomy $geo_taxonomy + * The geographic taxonomy for this sku. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); + parent::__construct($data); + } + + /** + * The resource name for the SKU. + * Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the SKU. + * Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" + * + * 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 identifier for the SKU. + * Example: "D041-B8A1-6E0B" + * + * Generated from protobuf field string sku_id = 2; + * @return string + */ + public function getSkuId() + { + return $this->sku_id; + } + + /** + * The identifier for the SKU. + * Example: "D041-B8A1-6E0B" + * + * Generated from protobuf field string sku_id = 2; + * @param string $var + * @return $this + */ + public function setSkuId($var) + { + GPBUtil::checkString($var, True); + $this->sku_id = $var; + + return $this; + } + + /** + * A human readable description of the SKU, has a maximum length of 256 + * characters. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A human readable description of the SKU, has a maximum length of 256 + * characters. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The category hierarchy of this SKU, purely for organizational purpose. + * + * Generated from protobuf field .google.cloud.billing.v1.Category category = 4; + * @return \Google\Cloud\Billing\V1\Category|null + */ + public function getCategory() + { + return $this->category; + } + + public function hasCategory() + { + return isset($this->category); + } + + public function clearCategory() + { + unset($this->category); + } + + /** + * The category hierarchy of this SKU, purely for organizational purpose. + * + * Generated from protobuf field .google.cloud.billing.v1.Category category = 4; + * @param \Google\Cloud\Billing\V1\Category $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\Category::class); + $this->category = $var; + + return $this; + } + + /** + * List of service regions this SKU is offered at. + * Example: "asia-east1" + * Service regions can be found at https://cloud.google.com/about/locations/ + * + * Generated from protobuf field repeated string service_regions = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceRegions() + { + return $this->service_regions; + } + + /** + * List of service regions this SKU is offered at. + * Example: "asia-east1" + * Service regions can be found at https://cloud.google.com/about/locations/ + * + * Generated from protobuf field repeated string service_regions = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->service_regions = $arr; + + return $this; + } + + /** + * A timeline of pricing info for this SKU in chronological order. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPricingInfo() + { + return $this->pricing_info; + } + + /** + * A timeline of pricing info for this SKU in chronological order. + * + * Generated from protobuf field repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6; + * @param array<\Google\Cloud\Billing\V1\PricingInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPricingInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\PricingInfo::class); + $this->pricing_info = $arr; + + return $this; + } + + /** + * Identifies the service provider. + * This is 'Google' for first party services in Google Cloud Platform. + * + * Generated from protobuf field string service_provider_name = 7; + * @return string + */ + public function getServiceProviderName() + { + return $this->service_provider_name; + } + + /** + * Identifies the service provider. + * This is 'Google' for first party services in Google Cloud Platform. + * + * Generated from protobuf field string service_provider_name = 7; + * @param string $var + * @return $this + */ + public function setServiceProviderName($var) + { + GPBUtil::checkString($var, True); + $this->service_provider_name = $var; + + return $this; + } + + /** + * The geographic taxonomy for this sku. + * + * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + * @return \Google\Cloud\Billing\V1\GeoTaxonomy|null + */ + public function getGeoTaxonomy() + { + return $this->geo_taxonomy; + } + + public function hasGeoTaxonomy() + { + return isset($this->geo_taxonomy); + } + + public function clearGeoTaxonomy() + { + unset($this->geo_taxonomy); + } + + /** + * The geographic taxonomy for this sku. + * + * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + * @param \Google\Cloud\Billing\V1\GeoTaxonomy $var + * @return $this + */ + public function setGeoTaxonomy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\GeoTaxonomy::class); + $this->geo_taxonomy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateBillingAccountRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateBillingAccountRequest.php new file mode 100644 index 000000000000..79a12b28f130 --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateBillingAccountRequest.php @@ -0,0 +1,180 @@ +google.cloud.billing.v1.UpdateBillingAccountRequest + */ +class UpdateBillingAccountRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the billing account resource to be updated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The billing account resource to replace the resource on the + * server. + * + * Generated from protobuf field .google.cloud.billing.v1.BillingAccount account = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $account = null; + /** + * The update mask applied to the resource. + * Only "display_name" is currently supported. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * @param string $name Required. The name of the billing account resource to be updated. Please see + * {@see CloudBillingClient::billingAccountName()} for help formatting this field. + * @param \Google\Cloud\Billing\V1\BillingAccount $account Required. The billing account resource to replace the resource on the + * server. + * + * @return \Google\Cloud\Billing\V1\UpdateBillingAccountRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Billing\V1\BillingAccount $account): self + { + return (new self()) + ->setName($name) + ->setAccount($account); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the billing account resource to be updated. + * @type \Google\Cloud\Billing\V1\BillingAccount $account + * Required. The billing account resource to replace the resource on the + * server. + * @type \Google\Protobuf\FieldMask $update_mask + * The update mask applied to the resource. + * Only "display_name" is currently supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the billing account resource to be updated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the billing account resource to be updated. + * + * 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 billing account resource to replace the resource on the + * server. + * + * Generated from protobuf field .google.cloud.billing.v1.BillingAccount account = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Billing\V1\BillingAccount|null + */ + public function getAccount() + { + return $this->account; + } + + public function hasAccount() + { + return isset($this->account); + } + + public function clearAccount() + { + unset($this->account); + } + + /** + * Required. The billing account resource to replace the resource on the + * server. + * + * Generated from protobuf field .google.cloud.billing.v1.BillingAccount account = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Billing\V1\BillingAccount $var + * @return $this + */ + public function setAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\BillingAccount::class); + $this->account = $var; + + return $this; + } + + /** + * The update mask applied to the resource. + * Only "display_name" is currently supported. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The update mask applied to the resource. + * Only "display_name" is currently supported. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateProjectBillingInfoRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateProjectBillingInfoRequest.php new file mode 100644 index 000000000000..3e5bdc3369ac --- /dev/null +++ b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateProjectBillingInfoRequest.php @@ -0,0 +1,146 @@ +google.cloud.billing.v1.UpdateProjectBillingInfoRequest + */ +class UpdateProjectBillingInfoRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the project associated with the billing + * information that you want to update. For example, + * `projects/tokyo-rain-123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The new billing information for the project. Output-only fields are + * ignored; thus, you can leave empty all fields except + * `billing_account_name`. + * + * Generated from protobuf field .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 2; + */ + protected $project_billing_info = null; + + /** + * @param string $name Required. The resource name of the project associated with the billing + * information that you want to update. For example, + * `projects/tokyo-rain-123`. + * @param \Google\Cloud\Billing\V1\ProjectBillingInfo $projectBillingInfo The new billing information for the project. Output-only fields are + * ignored; thus, you can leave empty all fields except + * `billing_account_name`. + * + * @return \Google\Cloud\Billing\V1\UpdateProjectBillingInfoRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Billing\V1\ProjectBillingInfo $projectBillingInfo): self + { + return (new self()) + ->setName($name) + ->setProjectBillingInfo($projectBillingInfo); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the project associated with the billing + * information that you want to update. For example, + * `projects/tokyo-rain-123`. + * @type \Google\Cloud\Billing\V1\ProjectBillingInfo $project_billing_info + * The new billing information for the project. Output-only fields are + * ignored; thus, you can leave empty all fields except + * `billing_account_name`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the project associated with the billing + * information that you want to update. For example, + * `projects/tokyo-rain-123`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the project associated with the billing + * information that you want to update. For example, + * `projects/tokyo-rain-123`. + * + * 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; + } + + /** + * The new billing information for the project. Output-only fields are + * ignored; thus, you can leave empty all fields except + * `billing_account_name`. + * + * Generated from protobuf field .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 2; + * @return \Google\Cloud\Billing\V1\ProjectBillingInfo|null + */ + public function getProjectBillingInfo() + { + return $this->project_billing_info; + } + + public function hasProjectBillingInfo() + { + return isset($this->project_billing_info); + } + + public function clearProjectBillingInfo() + { + unset($this->project_billing_info); + } + + /** + * The new billing information for the project. Output-only fields are + * ignored; thus, you can leave empty all fields except + * `billing_account_name`. + * + * Generated from protobuf field .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 2; + * @param \Google\Cloud\Billing\V1\ProjectBillingInfo $var + * @return $this + */ + public function setProjectBillingInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\ProjectBillingInfo::class); + $this->project_billing_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/create_billing_account.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/create_billing_account.php new file mode 100644 index 000000000000..db22674467c5 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/create_billing_account.php @@ -0,0 +1,73 @@ +setBillingAccount($billingAccount); + + // Call the API and handle any network failures. + try { + /** @var BillingAccount $response */ + $response = $cloudBillingClient->createBillingAccount($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_billing_account.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_billing_account.php new file mode 100644 index 000000000000..fdc26cf0cf42 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_billing_account.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BillingAccount $response */ + $response = $cloudBillingClient->getBillingAccount($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 = CloudBillingClient::billingAccountName('[BILLING_ACCOUNT]'); + + get_billing_account_sample($formattedName); +} +// [END cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_iam_policy.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_iam_policy.php new file mode 100644 index 000000000000..167a07d46372 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_iam_policy.php @@ -0,0 +1,74 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $cloudBillingClient->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 cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_project_billing_info.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_project_billing_info.php new file mode 100644 index 000000000000..0620623c5790 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_project_billing_info.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ProjectBillingInfo $response */ + $response = $cloudBillingClient->getProjectBillingInfo($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 = CloudBillingClient::projectName('[PROJECT]'); + + get_project_billing_info_sample($formattedName); +} +// [END cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_billing_accounts.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_billing_accounts.php new file mode 100644 index 000000000000..f030853f6ca3 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_billing_accounts.php @@ -0,0 +1,64 @@ +listBillingAccounts($request); + + /** @var BillingAccount $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 cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_project_billing_info.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_project_billing_info.php new file mode 100644 index 000000000000..1abfebe31624 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_project_billing_info.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cloudBillingClient->listProjectBillingInfo($request); + + /** @var ProjectBillingInfo $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudBillingClient::billingAccountName('[BILLING_ACCOUNT]'); + + list_project_billing_info_sample($formattedName); +} +// [END cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/move_billing_account.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/move_billing_account.php new file mode 100644 index 000000000000..d20882ff5de1 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/move_billing_account.php @@ -0,0 +1,82 @@ +setName($formattedName) + ->setDestinationParent($formattedDestinationParent); + + // Call the API and handle any network failures. + try { + /** @var BillingAccount $response */ + $response = $cloudBillingClient->moveBillingAccount($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 = CloudBillingClient::billingAccountName('[BILLING_ACCOUNT]'); + $formattedDestinationParent = CloudBillingClient::organizationName('[ORGANIZATION]'); + + move_billing_account_sample($formattedName, $formattedDestinationParent); +} +// [END cloudbilling_v1_generated_CloudBilling_MoveBillingAccount_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/set_iam_policy.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/set_iam_policy.php new file mode 100644 index 000000000000..fafbe488a850 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/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 = $cloudBillingClient->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 cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/test_iam_permissions.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/test_iam_permissions.php new file mode 100644 index 000000000000..61ba0ecaf9cf --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/test_iam_permissions.php @@ -0,0 +1,80 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $cloudBillingClient->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 cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_billing_account.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_billing_account.php new file mode 100644 index 000000000000..b3c0a27b78d1 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_billing_account.php @@ -0,0 +1,78 @@ +setName($formattedName) + ->setAccount($account); + + // Call the API and handle any network failures. + try { + /** @var BillingAccount $response */ + $response = $cloudBillingClient->updateBillingAccount($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 = CloudBillingClient::billingAccountName('[BILLING_ACCOUNT]'); + + update_billing_account_sample($formattedName); +} +// [END cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_project_billing_info.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_project_billing_info.php new file mode 100644 index 000000000000..f18bc819c68a --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_project_billing_info.php @@ -0,0 +1,103 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var ProjectBillingInfo $response */ + $response = $cloudBillingClient->updateProjectBillingInfo($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 +{ + $name = '[NAME]'; + + update_project_billing_info_sample($name); +} +// [END cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_services.php b/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_services.php new file mode 100644 index 000000000000..8aa91e545a29 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_services.php @@ -0,0 +1,62 @@ +listServices($request); + + /** @var Service $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 cloudbilling_v1_generated_CloudCatalog_ListServices_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_skus.php b/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_skus.php new file mode 100644 index 000000000000..3dde886ac7e9 --- /dev/null +++ b/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_skus.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cloudCatalogClient->listSkus($request); + + /** @var Sku $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 = CloudCatalogClient::serviceName('[SERVICE]'); + + list_skus_sample($formattedParent); +} +// [END cloudbilling_v1_generated_CloudCatalog_ListSkus_sync] diff --git a/owl-bot-staging/Billing/v1/src/V1/Client/CloudBillingClient.php b/owl-bot-staging/Billing/v1/src/V1/Client/CloudBillingClient.php new file mode 100644 index 000000000000..8cfa9a134033 --- /dev/null +++ b/owl-bot-staging/Billing/v1/src/V1/Client/CloudBillingClient.php @@ -0,0 +1,659 @@ + createBillingAccountAsync(CreateBillingAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBillingAccountAsync(GetBillingAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProjectBillingInfoAsync(GetProjectBillingInfoRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBillingAccountsAsync(ListBillingAccountsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProjectBillingInfoAsync(ListProjectBillingInfoRequest $request, array $optionalArgs = []) + * @method PromiseInterface moveBillingAccountAsync(MoveBillingAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBillingAccountAsync(UpdateBillingAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest $request, array $optionalArgs = []) + */ +final class CloudBillingClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.billing.v1.CloudBilling'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudbilling.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudbilling.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-billing', + 'https://www.googleapis.com/auth/cloud-billing.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cloud_billing_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_billing_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_billing_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_billing_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account resource. + * + * @param string $billingAccount + * + * @return string The formatted billing_account resource. + */ + public static function billingAccountName(string $billingAccount): string + { + return self::getPathTemplate('billingAccount')->render([ + 'billing_account' => $billingAccount, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_billing_account resource. + * + * @param string $organization + * @param string $billingAccount + * + * @return string The formatted organization_billing_account resource. + */ + public static function organizationBillingAccountName(string $organization, string $billingAccount): string + { + return self::getPathTemplate('organizationBillingAccount')->render([ + 'organization' => $organization, + 'billing_account' => $billingAccount, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_billing_info resource. + * + * @param string $project + * + * @return string The formatted project_billing_info resource. + */ + public static function projectBillingInfoName(string $project): string + { + return self::getPathTemplate('projectBillingInfo')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - billingAccount: billingAccounts/{billing_account} + * - organization: organizations/{organization} + * - organizationBillingAccount: organizations/{organization}/billingAccounts/{billing_account} + * - project: projects/{project} + * - projectBillingInfo: projects/{project}/billingInfo + * + * 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 'cloudbilling.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); + } + + /** + * This method creates [billing + * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). + * + * Google Cloud resellers should use the + * Channel Services APIs, + * [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) + * and + * [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). + * + * When creating a subaccount, the current authenticated user must have the + * `billing.accounts.update` IAM permission on the parent account, which is + * typically given to billing account + * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + * This method will return an error if the parent account has not been + * provisioned for subaccounts. + * + * The async variant is {@see CloudBillingClient::createBillingAccountAsync()} . + * + * @example samples/V1/CloudBillingClient/create_billing_account.php + * + * @param CreateBillingAccountRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BillingAccount + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBillingAccount(CreateBillingAccountRequest $request, array $callOptions = []): BillingAccount + { + return $this->startApiCall('CreateBillingAccount', $request, $callOptions)->wait(); + } + + /** + * Gets information about a billing account. The current authenticated user + * must be a [viewer of the billing + * account](https://cloud.google.com/billing/docs/how-to/billing-access). + * + * The async variant is {@see CloudBillingClient::getBillingAccountAsync()} . + * + * @example samples/V1/CloudBillingClient/get_billing_account.php + * + * @param GetBillingAccountRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BillingAccount + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBillingAccount(GetBillingAccountRequest $request, array $callOptions = []): BillingAccount + { + return $this->startApiCall('GetBillingAccount', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a billing account. + * The caller must have the `billing.accounts.getIamPolicy` permission on the + * account, which is often given to billing account + * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + * + * The async variant is {@see CloudBillingClient::getIamPolicyAsync()} . + * + * @example samples/V1/CloudBillingClient/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(); + } + + /** + * Gets the billing information for a project. The current authenticated user + * must have the `resourcemanager.projects.get` permission for the project, + * which can be granted by assigning the [Project + * Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) + * role. + * + * The async variant is {@see CloudBillingClient::getProjectBillingInfoAsync()} . + * + * @example samples/V1/CloudBillingClient/get_project_billing_info.php + * + * @param GetProjectBillingInfoRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProjectBillingInfo + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProjectBillingInfo(GetProjectBillingInfoRequest $request, array $callOptions = []): ProjectBillingInfo + { + return $this->startApiCall('GetProjectBillingInfo', $request, $callOptions)->wait(); + } + + /** + * Lists the billing accounts that the current authenticated user has + * permission to + * [view](https://cloud.google.com/billing/docs/how-to/billing-access). + * + * The async variant is {@see CloudBillingClient::listBillingAccountsAsync()} . + * + * @example samples/V1/CloudBillingClient/list_billing_accounts.php + * + * @param ListBillingAccountsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBillingAccounts(ListBillingAccountsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBillingAccounts', $request, $callOptions); + } + + /** + * Lists the projects associated with a billing account. The current + * authenticated user must have the `billing.resourceAssociations.list` IAM + * permission, which is often given to billing account + * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + * + * The async variant is {@see CloudBillingClient::listProjectBillingInfoAsync()} . + * + * @example samples/V1/CloudBillingClient/list_project_billing_info.php + * + * @param ListProjectBillingInfoRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listProjectBillingInfo(ListProjectBillingInfoRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProjectBillingInfo', $request, $callOptions); + } + + /** + * Changes which parent organization a billing account belongs to. + * + * The async variant is {@see CloudBillingClient::moveBillingAccountAsync()} . + * + * @example samples/V1/CloudBillingClient/move_billing_account.php + * + * @param MoveBillingAccountRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BillingAccount + * + * @throws ApiException Thrown if the API call fails. + */ + public function moveBillingAccount(MoveBillingAccountRequest $request, array $callOptions = []): BillingAccount + { + return $this->startApiCall('MoveBillingAccount', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy for a billing account. Replaces any existing + * policy. + * The caller must have the `billing.accounts.setIamPolicy` permission on the + * account, which is often given to billing account + * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + * + * The async variant is {@see CloudBillingClient::setIamPolicyAsync()} . + * + * @example samples/V1/CloudBillingClient/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(); + } + + /** + * Tests the access control policy for a billing account. This method takes + * the resource and a set of permissions as input and returns the subset of + * the input permissions that the caller is allowed for that resource. + * + * The async variant is {@see CloudBillingClient::testIamPermissionsAsync()} . + * + * @example samples/V1/CloudBillingClient/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(); + } + + /** + * Updates a billing account's fields. + * Currently the only field that can be edited is `display_name`. + * The current authenticated user must have the `billing.accounts.update` + * IAM permission, which is typically given to the + * [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) + * of the billing account. + * + * The async variant is {@see CloudBillingClient::updateBillingAccountAsync()} . + * + * @example samples/V1/CloudBillingClient/update_billing_account.php + * + * @param UpdateBillingAccountRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BillingAccount + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBillingAccount(UpdateBillingAccountRequest $request, array $callOptions = []): BillingAccount + { + return $this->startApiCall('UpdateBillingAccount', $request, $callOptions)->wait(); + } + + /** + * Sets or updates the billing account associated with a project. You specify + * the new billing account by setting the `billing_account_name` in the + * `ProjectBillingInfo` resource to the resource name of a billing account. + * Associating a project with an open billing account enables billing on the + * project and allows charges for resource usage. If the project already had a + * billing account, this method changes the billing account used for resource + * usage charges. + * + * *Note:* Incurred charges that have not yet been reported in the transaction + * history of the Google Cloud Console might be billed to the new billing + * account, even if the charge occurred before the new billing account was + * assigned to the project. + * + * The current authenticated user must have ownership privileges for both + * the + * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + * ) and the [billing + * account](https://cloud.google.com/billing/docs/how-to/billing-access). + * + * You can disable billing on the project by setting the + * `billing_account_name` field to empty. This action disassociates the + * current billing account from the project. Any billable activity of your + * in-use services will stop, and your application could stop functioning as + * expected. Any unbilled charges to date will be billed to the previously + * associated account. The current authenticated user must be either an owner + * of the project or an owner of the billing account for the project. + * + * Note that associating a project with a *closed* billing account will have + * much the same effect as disabling billing on the project: any paid + * resources used by the project will be shut down. Thus, unless you wish to + * disable billing, you should always call this method with the name of an + * *open* billing account. + * + * The async variant is {@see CloudBillingClient::updateProjectBillingInfoAsync()} + * . + * + * @example samples/V1/CloudBillingClient/update_project_billing_info.php + * + * @param UpdateProjectBillingInfoRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProjectBillingInfo + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateProjectBillingInfo(UpdateProjectBillingInfoRequest $request, array $callOptions = []): ProjectBillingInfo + { + return $this->startApiCall('UpdateProjectBillingInfo', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Billing/v1/src/V1/Client/CloudCatalogClient.php b/owl-bot-staging/Billing/v1/src/V1/Client/CloudCatalogClient.php new file mode 100644 index 000000000000..43ab99307e96 --- /dev/null +++ b/owl-bot-staging/Billing/v1/src/V1/Client/CloudCatalogClient.php @@ -0,0 +1,267 @@ + listServicesAsync(ListServicesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSkusAsync(ListSkusRequest $request, array $optionalArgs = []) + */ +final class CloudCatalogClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.billing.v1.CloudCatalog'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudbilling.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudbilling.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-billing', + 'https://www.googleapis.com/auth/cloud-billing.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cloud_catalog_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_catalog_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_catalog_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_catalog_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a service + * resource. + * + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName(string $service): string + { + return self::getPathTemplate('service')->render([ + 'service' => $service, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - service: services/{service} + * + * 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 'cloudbilling.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); + } + + /** + * Lists all public cloud services. + * + * The async variant is {@see CloudCatalogClient::listServicesAsync()} . + * + * @example samples/V1/CloudCatalogClient/list_services.php + * + * @param ListServicesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listServices(ListServicesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListServices', $request, $callOptions); + } + + /** + * Lists all publicly available SKUs for a given cloud service. + * + * The async variant is {@see CloudCatalogClient::listSkusAsync()} . + * + * @example samples/V1/CloudCatalogClient/list_skus.php + * + * @param ListSkusRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSkus(ListSkusRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSkus', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Billing/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Billing/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..2a4be5d5a8ee --- /dev/null +++ b/owl-bot-staging/Billing/v1/src/V1/gapic_metadata.json @@ -0,0 +1,92 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.billing.v1", + "libraryPackage": "Google\\Cloud\\Billing\\V1", + "services": { + "CloudBilling": { + "clients": { + "grpc": { + "libraryClient": "CloudBillingGapicClient", + "rpcs": { + "CreateBillingAccount": { + "methods": [ + "createBillingAccount" + ] + }, + "GetBillingAccount": { + "methods": [ + "getBillingAccount" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetProjectBillingInfo": { + "methods": [ + "getProjectBillingInfo" + ] + }, + "ListBillingAccounts": { + "methods": [ + "listBillingAccounts" + ] + }, + "ListProjectBillingInfo": { + "methods": [ + "listProjectBillingInfo" + ] + }, + "MoveBillingAccount": { + "methods": [ + "moveBillingAccount" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateBillingAccount": { + "methods": [ + "updateBillingAccount" + ] + }, + "UpdateProjectBillingInfo": { + "methods": [ + "updateProjectBillingInfo" + ] + } + } + } + } + }, + "CloudCatalog": { + "clients": { + "grpc": { + "libraryClient": "CloudCatalogGapicClient", + "rpcs": { + "ListServices": { + "methods": [ + "listServices" + ] + }, + "ListSkus": { + "methods": [ + "listSkus" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_client_config.json b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_client_config.json new file mode 100644 index 000000000000..361a072c3d27 --- /dev/null +++ b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_client_config.json @@ -0,0 +1,100 @@ +{ + "interfaces": { + "google.cloud.billing.v1.CloudBilling": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateBillingAccount": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetBillingAccount": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetProjectBillingInfo": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBillingAccounts": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListProjectBillingInfo": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "MoveBillingAccount": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateBillingAccount": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateProjectBillingInfo": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_descriptor_config.php b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_descriptor_config.php new file mode 100644 index 000000000000..8ca1e982a3d7 --- /dev/null +++ b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_descriptor_config.php @@ -0,0 +1,189 @@ + [ + 'google.cloud.billing.v1.CloudBilling' => [ + 'CreateBillingAccount' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\BillingAccount', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetBillingAccount' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\BillingAccount', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetProjectBillingInfo' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\ProjectBillingInfo', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBillingAccounts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBillingAccounts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\ListBillingAccountsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProjectBillingInfo' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProjectBillingInfo', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\ListProjectBillingInfoResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'MoveBillingAccount' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\BillingAccount', + 'headerParams' => [ + [ + 'keyName' => 'destination_parent', + 'fieldAccessors' => [ + 'getDestinationParent', + ], + ], + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + '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', + ], + ], + ], + ], + 'UpdateBillingAccount' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\BillingAccount', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateProjectBillingInfo' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\ProjectBillingInfo', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'billingAccount' => 'billingAccounts/{billing_account}', + 'organization' => 'organizations/{organization}', + 'organizationBillingAccount' => 'organizations/{organization}/billingAccounts/{billing_account}', + 'project' => 'projects/{project}', + 'projectBillingInfo' => 'projects/{project}/billingInfo', + ], + ], + ], +]; diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_rest_client_config.php b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_rest_client_config.php new file mode 100644 index 000000000000..b2500432e22c --- /dev/null +++ b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_rest_client_config.php @@ -0,0 +1,190 @@ + [ + 'google.cloud.billing.v1.CloudBilling' => [ + 'CreateBillingAccount' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/billingAccounts', + 'body' => 'billing_account', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*}/billingAccounts', + 'body' => 'billing_account', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=billingAccounts/*}/subAccounts', + 'body' => 'billing_account', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetBillingAccount' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=billingAccounts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=billingAccounts/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetProjectBillingInfo' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/billingInfo', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBillingAccounts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/billingAccounts', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*}/billingAccounts', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=billingAccounts/*}/subAccounts', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProjectBillingInfo' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=billingAccounts/*}/projects', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'MoveBillingAccount' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=billingAccounts/*}:move', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{destination_parent=organizations/*}/{name=billingAccounts/*}:move', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'destination_parent' => [ + 'getters' => [ + 'getDestinationParent', + ], + ], + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=billingAccounts/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=billingAccounts/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateBillingAccount' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=billingAccounts/*}', + 'body' => 'account', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateProjectBillingInfo' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/{name=projects/*}/billingInfo', + 'body' => 'project_billing_info', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_client_config.json b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_client_config.json new file mode 100644 index 000000000000..defb23b62279 --- /dev/null +++ b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_client_config.json @@ -0,0 +1,42 @@ +{ + "interfaces": { + "google.cloud.billing.v1.CloudCatalog": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "ListServices": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ListSkus": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_descriptor_config.php b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_descriptor_config.php new file mode 100644 index 000000000000..e4ea2ad57c7c --- /dev/null +++ b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_descriptor_config.php @@ -0,0 +1,63 @@ + [ + 'google.cloud.billing.v1.CloudCatalog' => [ + 'ListServices' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getServices', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\ListServicesResponse', + ], + 'ListSkus' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSkus', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Billing\V1\ListSkusResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'service' => 'services/{service}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_rest_client_config.php b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_rest_client_config.php new file mode 100644 index 000000000000..e4490137b9cb --- /dev/null +++ b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_rest_client_config.php @@ -0,0 +1,44 @@ + [ + 'google.cloud.billing.v1.CloudCatalog' => [ + 'ListServices' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/services', + ], + 'ListSkus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=services/*}/skus', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudBillingClientTest.php b/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudBillingClientTest.php new file mode 100644 index 000000000000..a5b507bfb320 --- /dev/null +++ b/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudBillingClientTest.php @@ -0,0 +1,896 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudBillingClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudBillingClient($options); + } + + /** @test */ + public function createBillingAccountTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $open = true; + $displayName = 'displayName1615086568'; + $masterBillingAccount = 'masterBillingAccount1503143052'; + $parent2 = 'parent21175163357'; + $expectedResponse = new BillingAccount(); + $expectedResponse->setName($name); + $expectedResponse->setOpen($open); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMasterBillingAccount($masterBillingAccount); + $expectedResponse->setParent($parent2); + $transport->addResponse($expectedResponse); + // Mock request + $billingAccount = new BillingAccount(); + $request = (new CreateBillingAccountRequest()) + ->setBillingAccount($billingAccount); + $response = $gapicClient->createBillingAccount($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.billing.v1.CloudBilling/CreateBillingAccount', $actualFuncCall); + $actualValue = $actualRequestObject->getBillingAccount(); + $this->assertProtobufEquals($billingAccount, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBillingAccountExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $billingAccount = new BillingAccount(); + $request = (new CreateBillingAccountRequest()) + ->setBillingAccount($billingAccount); + try { + $gapicClient->createBillingAccount($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBillingAccountTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $open = true; + $displayName = 'displayName1615086568'; + $masterBillingAccount = 'masterBillingAccount1503143052'; + $parent = 'parent-995424086'; + $expectedResponse = new BillingAccount(); + $expectedResponse->setName($name2); + $expectedResponse->setOpen($open); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMasterBillingAccount($masterBillingAccount); + $expectedResponse->setParent($parent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); + $request = (new GetBillingAccountRequest()) + ->setName($formattedName); + $response = $gapicClient->getBillingAccount($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.billing.v1.CloudBilling/GetBillingAccount', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBillingAccountExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); + $request = (new GetBillingAccountRequest()) + ->setName($formattedName); + try { + $gapicClient->getBillingAccount($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.billing.v1.CloudBilling/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 getProjectBillingInfoTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $projectId = 'projectId-1969970175'; + $billingAccountName = 'billingAccountName-1056086879'; + $billingEnabled = false; + $expectedResponse = new ProjectBillingInfo(); + $expectedResponse->setName($name2); + $expectedResponse->setProjectId($projectId); + $expectedResponse->setBillingAccountName($billingAccountName); + $expectedResponse->setBillingEnabled($billingEnabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $request = (new GetProjectBillingInfoRequest()) + ->setName($formattedName); + $response = $gapicClient->getProjectBillingInfo($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.billing.v1.CloudBilling/GetProjectBillingInfo', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProjectBillingInfoExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->projectName('[PROJECT]'); + $request = (new GetProjectBillingInfoRequest()) + ->setName($formattedName); + try { + $gapicClient->getProjectBillingInfo($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBillingAccountsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $billingAccountsElement = new BillingAccount(); + $billingAccounts = [ + $billingAccountsElement, + ]; + $expectedResponse = new ListBillingAccountsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBillingAccounts($billingAccounts); + $transport->addResponse($expectedResponse); + $request = new ListBillingAccountsRequest(); + $response = $gapicClient->listBillingAccounts($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBillingAccounts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.billing.v1.CloudBilling/ListBillingAccounts', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBillingAccountsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 ListBillingAccountsRequest(); + try { + $gapicClient->listBillingAccounts($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProjectBillingInfoTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $projectBillingInfoElement = new ProjectBillingInfo(); + $projectBillingInfo = [ + $projectBillingInfoElement, + ]; + $expectedResponse = new ListProjectBillingInfoResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProjectBillingInfo($projectBillingInfo); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); + $request = (new ListProjectBillingInfoRequest()) + ->setName($formattedName); + $response = $gapicClient->listProjectBillingInfo($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProjectBillingInfo()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.billing.v1.CloudBilling/ListProjectBillingInfo', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProjectBillingInfoExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); + $request = (new ListProjectBillingInfoRequest()) + ->setName($formattedName); + try { + $gapicClient->listProjectBillingInfo($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function moveBillingAccountTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $open = true; + $displayName = 'displayName1615086568'; + $masterBillingAccount = 'masterBillingAccount1503143052'; + $parent = 'parent-995424086'; + $expectedResponse = new BillingAccount(); + $expectedResponse->setName($name2); + $expectedResponse->setOpen($open); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMasterBillingAccount($masterBillingAccount); + $expectedResponse->setParent($parent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); + $formattedDestinationParent = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new MoveBillingAccountRequest()) + ->setName($formattedName) + ->setDestinationParent($formattedDestinationParent); + $response = $gapicClient->moveBillingAccount($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.billing.v1.CloudBilling/MoveBillingAccount', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getDestinationParent(); + $this->assertProtobufEquals($formattedDestinationParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function moveBillingAccountExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); + $formattedDestinationParent = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new MoveBillingAccountRequest()) + ->setName($formattedName) + ->setDestinationParent($formattedDestinationParent); + try { + $gapicClient->moveBillingAccount($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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.billing.v1.CloudBilling/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.billing.v1.CloudBilling/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 updateBillingAccountTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $open = true; + $displayName = 'displayName1615086568'; + $masterBillingAccount = 'masterBillingAccount1503143052'; + $parent = 'parent-995424086'; + $expectedResponse = new BillingAccount(); + $expectedResponse->setName($name2); + $expectedResponse->setOpen($open); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMasterBillingAccount($masterBillingAccount); + $expectedResponse->setParent($parent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); + $account = new BillingAccount(); + $request = (new UpdateBillingAccountRequest()) + ->setName($formattedName) + ->setAccount($account); + $response = $gapicClient->updateBillingAccount($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.billing.v1.CloudBilling/UpdateBillingAccount', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getAccount(); + $this->assertProtobufEquals($account, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBillingAccountExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); + $account = new BillingAccount(); + $request = (new UpdateBillingAccountRequest()) + ->setName($formattedName) + ->setAccount($account); + try { + $gapicClient->updateBillingAccount($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProjectBillingInfoTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $projectId = 'projectId-1969970175'; + $billingAccountName = 'billingAccountName-1056086879'; + $billingEnabled = false; + $expectedResponse = new ProjectBillingInfo(); + $expectedResponse->setName($name2); + $expectedResponse->setProjectId($projectId); + $expectedResponse->setBillingAccountName($billingAccountName); + $expectedResponse->setBillingEnabled($billingEnabled); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new UpdateProjectBillingInfoRequest()) + ->setName($name); + $response = $gapicClient->updateProjectBillingInfo($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.billing.v1.CloudBilling/UpdateProjectBillingInfo', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProjectBillingInfoExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new UpdateProjectBillingInfoRequest()) + ->setName($name); + try { + $gapicClient->updateProjectBillingInfo($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBillingAccountAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $open = true; + $displayName = 'displayName1615086568'; + $masterBillingAccount = 'masterBillingAccount1503143052'; + $parent2 = 'parent21175163357'; + $expectedResponse = new BillingAccount(); + $expectedResponse->setName($name); + $expectedResponse->setOpen($open); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMasterBillingAccount($masterBillingAccount); + $expectedResponse->setParent($parent2); + $transport->addResponse($expectedResponse); + // Mock request + $billingAccount = new BillingAccount(); + $request = (new CreateBillingAccountRequest()) + ->setBillingAccount($billingAccount); + $response = $gapicClient->createBillingAccountAsync($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.billing.v1.CloudBilling/CreateBillingAccount', $actualFuncCall); + $actualValue = $actualRequestObject->getBillingAccount(); + $this->assertProtobufEquals($billingAccount, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudCatalogClientTest.php b/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudCatalogClientTest.php new file mode 100644 index 000000000000..8a0e8144a0d3 --- /dev/null +++ b/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudCatalogClientTest.php @@ -0,0 +1,234 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudCatalogClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudCatalogClient($options); + } + + /** @test */ + public function listServicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $servicesElement = new Service(); + $services = [ + $servicesElement, + ]; + $expectedResponse = new ListServicesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServices($services); + $transport->addResponse($expectedResponse); + $request = new ListServicesRequest(); + $response = $gapicClient->listServices($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.billing.v1.CloudCatalog/ListServices', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServicesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 ListServicesRequest(); + try { + $gapicClient->listServices($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSkusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $skusElement = new Sku(); + $skus = [ + $skusElement, + ]; + $expectedResponse = new ListSkusResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSkus($skus); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->serviceName('[SERVICE]'); + $request = (new ListSkusRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSkus($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSkus()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.billing.v1.CloudCatalog/ListSkus', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSkusExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->serviceName('[SERVICE]'); + $request = (new ListSkusRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSkus($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServicesAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $servicesElement = new Service(); + $services = [ + $servicesElement, + ]; + $expectedResponse = new ListServicesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServices($services); + $transport->addResponse($expectedResponse); + $request = new ListServicesRequest(); + $response = $gapicClient->listServicesAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.billing.v1.CloudCatalog/ListServices', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetModel.php b/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetModel.php new file mode 100644 index 0000000000000000000000000000000000000000..ac3eb139bb539f6bd17418ed957b3d1ae906a580 GIT binary patch literal 3128 zcmb7G&2k$>5RRAV1PDoZ|g#)F;Q2Mj2LY9Oir$|cF)@XNR4Xk#z zc6L>ml%IiD;9)p$U*8a0S$>wLNeHso(5InX;4v~ z1{LLL@M`-7faMU*b+vRL9Ku`B@z0Nj4zqL~k`VtrWZYyf3mI|PubA47J|YgMh(B*T zid-vXo~sK$+qLM{V_o?awhw&|so2qHp>+g1$jqSOhBR=AGpJE+1YA6u2*B+`_?0@-?`CxU$a%yNo(^g^tOT zc|oakn$@Y3%b;Bvm-M|+2^~EQ-3s6Txc;$E2Q}2)2SN@!mmXh?k)?X}4T}p?w(X=2 zyC~qTggL?EBlvF}iXX0AZBtV7D`b6ZfHu8U^VM%p@whq@tN99s_YU^et{ZBcq-G&vLao-`w zrrcT(TUr%XRjlTSIjG=V8kaN0!6QSRa%o-$a)|cAcS@_k5}A0B8|JP{__Hg~D$cS5 z2_Fku6K;iLBxvk8wi!eY<+(*YjjagJ4z-d{CYf_A@%9bUl;)S>If=SfM zNirngDo-c*-&3$MPnBjsmiyGg#Hek?oQoo7irOqIp%+8;#r`#|4H{0!(DZ4*yaXX? zpDAw75SMA!Xd<*Dk*ZSr*DALX!Kl;o8f4!!%m0~z)iXuWK7;ks>S8b!MX`v$Q>ywc z$Y5TsZ4L=%JSPHND}HrlfM*UdDgrC(lHY?x`Ahp4)+^;+qh}trdYyW;vD>KEve&Rd zR;!2IZoSnvak*8?rm#V>yX|hhTJH7hwRm+Q|91-3&&ff%2P=5P@Mvg;p3kh)K1*r$ zVU1g3Iw9ti1{}2~lTmWfo`H@X%kXl*JJFn1sA-Lf>r#hf2c~0nXvC$ixg#06s$ox$L)PCHbeYNnL4+^W-OLg{DKN)S0(lL|T<~{*OgiQZ0-WEyoCs zi6n<_f;O91Cc%4f=2#LAhhb4y$1;a}iXr}o5ePd`!RNW1O zV|8>JZdt@ZwUQuitlY9pt8k^uYK&7|CEa0{eg~^og#1os?rx&HO!4Y5T9v3X&Ndp5 znTuGBBTtQ4v}hQ%pyA}TeRDQ?W-o!vl2lkxDCuqZ8joyz}~g4-8WK>Gsn)vkE= znf=$Dde7{4>*fA|=%%x6b{9Tsw5rX+THP!+o2J6_u-R~<{=@l=1?^L~H$x=-n&8rv zHCTx_IifL9c^g*dInbT};Cm_vO>tq$q%+0!S(b7#ibsaveL>rTWifH2rJ9HrTc)1$ zVC`(-v`x5QEjMv+l)Gl9-fgsN?__=x77yC3{yyfKfg9f+mb?9WH@l!M!}ZtoayOf< z`~nZ~c9_L>*$l2^)%=%_+m3i`c2aM4l=bY2#yjT7JNMGY`zLv9bAR|k-6{ArT$1H} a{wR3?JykEwxrgbck5Xx=o{lGQ0`NZy&f%i~ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetService.php b/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetService.php new file mode 100644 index 000000000000..031bf94e9cfc --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetService.php @@ -0,0 +1,61 @@ +internalAddGeneratedFile( + ' +ä +4google/cloud/billing/budgets/v1/budget_service.protogoogle.cloud.billing.budgets.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/billing/budgets/v1/budget_model.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"‘ +CreateBudgetRequest< +parent ( B,àAúA&$billingbudgets.googleapis.com/Budget< +budget ( 2\'.google.cloud.billing.budgets.v1.BudgetBàA"‰ +UpdateBudgetRequest< +budget ( 2\'.google.cloud.billing.budgets.v1.BudgetBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"N +GetBudgetRequest: +name ( B,àAúA& +$billingbudgets.googleapis.com/Budget"— +ListBudgetsRequest< +parent ( B,àAúA&$billingbudgets.googleapis.com/Budget +scope ( BàA + page_size (BàA + +page_token ( BàA"h +ListBudgetsResponse8 +budgets ( 2\'.google.cloud.billing.budgets.v1.Budget +next_page_token ( "Q +DeleteBudgetRequest: +name ( B,àAúA& +$billingbudgets.googleapis.com/Budget2÷ + BudgetServiceµ + CreateBudget4.google.cloud.billing.budgets.v1.CreateBudgetRequest\'.google.cloud.billing.budgets.v1.Budget"FÚA parent,budget‚Óä“0"&/v1/{parent=billingAccounts/*}/budgets:budgetÁ + UpdateBudget4.google.cloud.billing.budgets.v1.UpdateBudgetRequest\'.google.cloud.billing.budgets.v1.Budget"RÚAbudget,update_mask‚Óä“72-/v1/{budget.name=billingAccounts/*/budgets/*}:budgetž + GetBudget1.google.cloud.billing.budgets.v1.GetBudgetRequest\'.google.cloud.billing.budgets.v1.Budget"5ÚAname‚Óä“(&/v1/{name=billingAccounts/*/budgets/*}± + ListBudgets3.google.cloud.billing.budgets.v1.ListBudgetsRequest4.google.cloud.billing.budgets.v1.ListBudgetsResponse"7ÚAparent‚Óä“(&/v1/{parent=billingAccounts/*}/budgets“ + DeleteBudget4.google.cloud.billing.budgets.v1.DeleteBudgetRequest.google.protobuf.Empty"5ÚAname‚Óä“(*&/v1/{name=billingAccounts/*/budgets/*}ÊAbillingbudgets.googleapis.comÒA\\https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-platformBz +#com.google.cloud.billing.budgets.v1BBudgetServiceProtoPZ=cloud.google.com/go/billing/budgets/apiv1/budgetspb;budgetspbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Budget.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Budget.php new file mode 100644 index 000000000000..0da2acd85199 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Budget.php @@ -0,0 +1,349 @@ +google.cloud.billing.budgets.v1.Budget + */ +class Budget extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the budget. + * The resource name implies the scope of a budget. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * User data for display name in UI. The name must be less than or equal to 60 + * characters. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Optional. Filters that define which resources are used to compute the + * actual spend against the budget amount, such as projects, services, and the + * budget's time period, as well as other filters. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $budget_filter = null; + /** + * Required. Budgeted amount. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $amount = null; + /** + * Optional. Rules that trigger alerts (notifications of thresholds + * being crossed) when spend exceeds the specified percentages of the budget. + * Optional for `pubsubTopic` notifications. + * Required if using email notifications. + * + * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $threshold_rules; + /** + * Optional. Rules to apply to notifications sent based on budget spend and + * thresholds. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $notifications_rule = null; + /** + * Optional. Etag to validate that the object is unchanged for a + * read-modify-write operation. + * An empty etag causes an update to overwrite other changes. + * + * Generated from protobuf field string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Resource name of the budget. + * The resource name implies the scope of a budget. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * @type string $display_name + * User data for display name in UI. The name must be less than or equal to 60 + * characters. + * @type \Google\Cloud\Billing\Budgets\V1\Filter $budget_filter + * Optional. Filters that define which resources are used to compute the + * actual spend against the budget amount, such as projects, services, and the + * budget's time period, as well as other filters. + * @type \Google\Cloud\Billing\Budgets\V1\BudgetAmount $amount + * Required. Budgeted amount. + * @type array<\Google\Cloud\Billing\Budgets\V1\ThresholdRule>|\Google\Protobuf\Internal\RepeatedField $threshold_rules + * Optional. Rules that trigger alerts (notifications of thresholds + * being crossed) when spend exceeds the specified percentages of the budget. + * Optional for `pubsubTopic` notifications. + * Required if using email notifications. + * @type \Google\Cloud\Billing\Budgets\V1\NotificationsRule $notifications_rule + * Optional. Rules to apply to notifications sent based on budget spend and + * thresholds. + * @type string $etag + * Optional. Etag to validate that the object is unchanged for a + * read-modify-write operation. + * An empty etag causes an update to overwrite other changes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of the budget. + * The resource name implies the scope of a budget. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the budget. + * The resource name implies the scope of a budget. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * + * 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; + } + + /** + * User data for display name in UI. The name must be less than or equal to 60 + * characters. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User data for display name in UI. The name must be less than or equal to 60 + * characters. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Filters that define which resources are used to compute the + * actual spend against the budget amount, such as projects, services, and the + * budget's time period, as well as other filters. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Billing\Budgets\V1\Filter|null + */ + public function getBudgetFilter() + { + return $this->budget_filter; + } + + public function hasBudgetFilter() + { + return isset($this->budget_filter); + } + + public function clearBudgetFilter() + { + unset($this->budget_filter); + } + + /** + * Optional. Filters that define which resources are used to compute the + * actual spend against the budget amount, such as projects, services, and the + * budget's time period, as well as other filters. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Billing\Budgets\V1\Filter $var + * @return $this + */ + public function setBudgetFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\Filter::class); + $this->budget_filter = $var; + + return $this; + } + + /** + * Required. Budgeted amount. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Billing\Budgets\V1\BudgetAmount|null + */ + public function getAmount() + { + return $this->amount; + } + + public function hasAmount() + { + return isset($this->amount); + } + + public function clearAmount() + { + unset($this->amount); + } + + /** + * Required. Budgeted amount. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Billing\Budgets\V1\BudgetAmount $var + * @return $this + */ + public function setAmount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\BudgetAmount::class); + $this->amount = $var; + + return $this; + } + + /** + * Optional. Rules that trigger alerts (notifications of thresholds + * being crossed) when spend exceeds the specified percentages of the budget. + * Optional for `pubsubTopic` notifications. + * Required if using email notifications. + * + * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThresholdRules() + { + return $this->threshold_rules; + } + + /** + * Optional. Rules that trigger alerts (notifications of thresholds + * being crossed) when spend exceeds the specified percentages of the budget. + * Optional for `pubsubTopic` notifications. + * Required if using email notifications. + * + * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Billing\Budgets\V1\ThresholdRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThresholdRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\Budgets\V1\ThresholdRule::class); + $this->threshold_rules = $arr; + + return $this; + } + + /** + * Optional. Rules to apply to notifications sent based on budget spend and + * thresholds. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Billing\Budgets\V1\NotificationsRule|null + */ + public function getNotificationsRule() + { + return $this->notifications_rule; + } + + public function hasNotificationsRule() + { + return isset($this->notifications_rule); + } + + public function clearNotificationsRule() + { + unset($this->notifications_rule); + } + + /** + * Optional. Rules to apply to notifications sent based on budget spend and + * thresholds. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Billing\Budgets\V1\NotificationsRule $var + * @return $this + */ + public function setNotificationsRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\NotificationsRule::class); + $this->notifications_rule = $var; + + return $this; + } + + /** + * Optional. Etag to validate that the object is unchanged for a + * read-modify-write operation. + * An empty etag causes an update to overwrite other changes. + * + * Generated from protobuf field string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. Etag to validate that the object is unchanged for a + * read-modify-write operation. + * An empty etag causes an update to overwrite other changes. + * + * Generated from protobuf field string etag = 7 [(.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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/BudgetAmount.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/BudgetAmount.php new file mode 100644 index 000000000000..b63478635cbd --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/BudgetAmount.php @@ -0,0 +1,132 @@ +google.cloud.billing.budgets.v1.BudgetAmount + */ +class BudgetAmount extends \Google\Protobuf\Internal\Message +{ + protected $budget_amount; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Money $specified_amount + * A specified amount to use as the budget. + * `currency_code` is optional. If specified when creating a budget, it must + * match the currency of the billing account. If specified when updating a + * budget, it must match the currency_code of the existing budget. + * The `currency_code` is provided on output. + * @type \Google\Cloud\Billing\Budgets\V1\LastPeriodAmount $last_period_amount + * Use the last period's actual spend as the budget for the present period. + * LastPeriodAmount can only be set when the budget's time period is a + * [Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period]. + * It cannot be set in combination with + * [Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); + parent::__construct($data); + } + + /** + * A specified amount to use as the budget. + * `currency_code` is optional. If specified when creating a budget, it must + * match the currency of the billing account. If specified when updating a + * budget, it must match the currency_code of the existing budget. + * The `currency_code` is provided on output. + * + * Generated from protobuf field .google.type.Money specified_amount = 1; + * @return \Google\Type\Money|null + */ + public function getSpecifiedAmount() + { + return $this->readOneof(1); + } + + public function hasSpecifiedAmount() + { + return $this->hasOneof(1); + } + + /** + * A specified amount to use as the budget. + * `currency_code` is optional. If specified when creating a budget, it must + * match the currency of the billing account. If specified when updating a + * budget, it must match the currency_code of the existing budget. + * The `currency_code` is provided on output. + * + * Generated from protobuf field .google.type.Money specified_amount = 1; + * @param \Google\Type\Money $var + * @return $this + */ + public function setSpecifiedAmount($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Use the last period's actual spend as the budget for the present period. + * LastPeriodAmount can only be set when the budget's time period is a + * [Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period]. + * It cannot be set in combination with + * [Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period]. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2; + * @return \Google\Cloud\Billing\Budgets\V1\LastPeriodAmount|null + */ + public function getLastPeriodAmount() + { + return $this->readOneof(2); + } + + public function hasLastPeriodAmount() + { + return $this->hasOneof(2); + } + + /** + * Use the last period's actual spend as the budget for the present period. + * LastPeriodAmount can only be set when the budget's time period is a + * [Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period]. + * It cannot be set in combination with + * [Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period]. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2; + * @param \Google\Cloud\Billing\Budgets\V1\LastPeriodAmount $var + * @return $this + */ + public function setLastPeriodAmount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\LastPeriodAmount::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getBudgetAmount() + { + return $this->whichOneof("budget_amount"); + } + +} + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CalendarPeriod.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CalendarPeriod.php new file mode 100644 index 000000000000..a517dd6f338e --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CalendarPeriod.php @@ -0,0 +1,74 @@ +google.cloud.billing.budgets.v1.CalendarPeriod + */ +class CalendarPeriod +{ + /** + * Calendar period is unset. This is the default if the budget is for a + * custom time period (CustomPeriod). + * + * Generated from protobuf enum CALENDAR_PERIOD_UNSPECIFIED = 0; + */ + const CALENDAR_PERIOD_UNSPECIFIED = 0; + /** + * A month. Month starts on the first day of each month, such as January 1, + * February 1, March 1, and so on. + * + * Generated from protobuf enum MONTH = 1; + */ + const MONTH = 1; + /** + * A quarter. Quarters start on dates January 1, April 1, July 1, and October + * 1 of each year. + * + * Generated from protobuf enum QUARTER = 2; + */ + const QUARTER = 2; + /** + * A year. Year starts on January 1. + * + * Generated from protobuf enum YEAR = 3; + */ + const YEAR = 3; + + private static $valueToName = [ + self::CALENDAR_PERIOD_UNSPECIFIED => 'CALENDAR_PERIOD_UNSPECIFIED', + self::MONTH => 'MONTH', + self::QUARTER => 'QUARTER', + self::YEAR => 'YEAR', + ]; + + 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CreateBudgetRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CreateBudgetRequest.php new file mode 100644 index 000000000000..a1bb4781c765 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CreateBudgetRequest.php @@ -0,0 +1,132 @@ +google.cloud.billing.budgets.v1.CreateBudgetRequest + */ +class CreateBudgetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the billing account to create the budget in. Values + * are of the form `billingAccounts/{billingAccountId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Budget to create. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $budget = null; + + /** + * @param string $parent Required. The name of the billing account to create the budget in. Values + * are of the form `billingAccounts/{billingAccountId}`. Please see + * {@see BudgetServiceClient::billingAccountName()} for help formatting this field. + * @param \Google\Cloud\Billing\Budgets\V1\Budget $budget Required. Budget to create. + * + * @return \Google\Cloud\Billing\Budgets\V1\CreateBudgetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Billing\Budgets\V1\Budget $budget): self + { + return (new self()) + ->setParent($parent) + ->setBudget($budget); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the billing account to create the budget in. Values + * are of the form `billingAccounts/{billingAccountId}`. + * @type \Google\Cloud\Billing\Budgets\V1\Budget $budget + * Required. Budget to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the billing account to create the budget in. Values + * are of the form `billingAccounts/{billingAccountId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the billing account to create the budget in. Values + * are of the form `billingAccounts/{billingAccountId}`. + * + * 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. Budget to create. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Billing\Budgets\V1\Budget|null + */ + public function getBudget() + { + return $this->budget; + } + + public function hasBudget() + { + return isset($this->budget); + } + + public function clearBudget() + { + unset($this->budget); + } + + /** + * Required. Budget to create. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Billing\Budgets\V1\Budget $var + * @return $this + */ + public function setBudget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\Budget::class); + $this->budget = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CustomPeriod.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CustomPeriod.php new file mode 100644 index 000000000000..e7b18a2688b0 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CustomPeriod.php @@ -0,0 +1,129 @@ +google.cloud.billing.budgets.v1.CustomPeriod + */ +class CustomPeriod extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The start date must be after January 1, 2017. + * + * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_date = null; + /** + * Optional. The end date of the time period. Budgets with elapsed end date + * won't be processed. If unset, specifies to track all usage incurred since + * the start_date. + * + * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $end_date = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Date $start_date + * Required. The start date must be after January 1, 2017. + * @type \Google\Type\Date $end_date + * Optional. The end date of the time period. Budgets with elapsed end date + * won't be processed. If unset, specifies to track all usage incurred since + * the start_date. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The start date must be after January 1, 2017. + * + * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Date|null + */ + public function getStartDate() + { + return $this->start_date; + } + + public function hasStartDate() + { + return isset($this->start_date); + } + + public function clearStartDate() + { + unset($this->start_date); + } + + /** + * Required. The start date must be after January 1, 2017. + * + * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->start_date = $var; + + return $this; + } + + /** + * Optional. The end date of the time period. Budgets with elapsed end date + * won't be processed. If unset, specifies to track all usage incurred since + * the start_date. + * + * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Date|null + */ + public function getEndDate() + { + return $this->end_date; + } + + public function hasEndDate() + { + return isset($this->end_date); + } + + public function clearEndDate() + { + unset($this->end_date); + } + + /** + * Optional. The end date of the time period. Budgets with elapsed end date + * won't be processed. If unset, specifies to track all usage incurred since + * the start_date. + * + * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_date = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/DeleteBudgetRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/DeleteBudgetRequest.php new file mode 100644 index 000000000000..4bdbd4788aa0 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/DeleteBudgetRequest.php @@ -0,0 +1,86 @@ +google.cloud.billing.budgets.v1.DeleteBudgetRequest + */ +class DeleteBudgetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the budget to delete. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the budget to delete. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Please see + * {@see BudgetServiceClient::budgetName()} for help formatting this field. + * + * @return \Google\Cloud\Billing\Budgets\V1\DeleteBudgetRequest + * + * @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. Name of the budget to delete. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the budget to delete. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * + * 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. Name of the budget to delete. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * + * 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter.php new file mode 100644 index 000000000000..a9a8df097c50 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter.php @@ -0,0 +1,496 @@ +google.cloud.billing.budgets.v1.Filter + */ +class Filter extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A set of projects of the form `projects/{project}`, + * specifying that usage from only this set of projects should be + * included in the budget. If omitted, the report includes all usage for + * the billing account, regardless of which project the usage occurred on. + * + * Generated from protobuf field repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $projects; + /** + * Optional. A set of folder and organization names of the form + * `folders/{folderId}` or `organizations/{organizationId}`, specifying that + * usage from only this set of folders and organizations should be included in + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. + * + * Generated from protobuf field repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $resource_ancestors; + /** + * Optional. If + * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] + * is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be + * subtracted from gross cost to determine the spend for threshold + * calculations. See [a list of acceptable credit type + * values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). + * If + * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] + * is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. + * + * Generated from protobuf field repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $credit_types; + /** + * Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment credit_types_treatment = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $credit_types_treatment = 0; + /** + * Optional. A set of services of the form `services/{service_id}`, + * specifying that usage from only this set of services should be + * included in the budget. If omitted, the report includes usage for + * all the services. + * The service names are available through the Catalog API: + * https://cloud.google.com/billing/v1/how-tos/catalog-api. + * + * Generated from protobuf field repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $services; + /** + * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, + * specifying that usage from only this set of subaccounts should be included + * in the budget. If a subaccount is set to the name of the parent account, + * usage from the parent account is included. If the field is omitted, + * the report includes usage from the parent account and all subaccounts, + * if they exist. + * + * Generated from protobuf field repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $subaccounts; + /** + * Optional. A single label and value pair specifying that usage from only + * this set of labeled resources should be included in the budget. If omitted, + * the report includes all labeled and unlabeled usage. + * An object containing a single `"key": value` pair. Example: `{ "name": + * "wrench" }`. + * _Currently, multiple entries or multiple values per entry are not + * allowed._ + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + protected $usage_period; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $projects + * Optional. A set of projects of the form `projects/{project}`, + * specifying that usage from only this set of projects should be + * included in the budget. If omitted, the report includes all usage for + * the billing account, regardless of which project the usage occurred on. + * @type array|\Google\Protobuf\Internal\RepeatedField $resource_ancestors + * Optional. A set of folder and organization names of the form + * `folders/{folderId}` or `organizations/{organizationId}`, specifying that + * usage from only this set of folders and organizations should be included in + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. + * @type array|\Google\Protobuf\Internal\RepeatedField $credit_types + * Optional. If + * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] + * is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be + * subtracted from gross cost to determine the spend for threshold + * calculations. See [a list of acceptable credit type + * values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). + * If + * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] + * is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. + * @type int $credit_types_treatment + * Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. + * @type array|\Google\Protobuf\Internal\RepeatedField $services + * Optional. A set of services of the form `services/{service_id}`, + * specifying that usage from only this set of services should be + * included in the budget. If omitted, the report includes usage for + * all the services. + * The service names are available through the Catalog API: + * https://cloud.google.com/billing/v1/how-tos/catalog-api. + * @type array|\Google\Protobuf\Internal\RepeatedField $subaccounts + * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, + * specifying that usage from only this set of subaccounts should be included + * in the budget. If a subaccount is set to the name of the parent account, + * usage from the parent account is included. If the field is omitted, + * the report includes usage from the parent account and all subaccounts, + * if they exist. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. A single label and value pair specifying that usage from only + * this set of labeled resources should be included in the budget. If omitted, + * the report includes all labeled and unlabeled usage. + * An object containing a single `"key": value` pair. Example: `{ "name": + * "wrench" }`. + * _Currently, multiple entries or multiple values per entry are not + * allowed._ + * @type int $calendar_period + * Optional. Specifies to track usage for recurring calendar period. + * For example, assume that CalendarPeriod.QUARTER is set. The budget + * tracks usage from April 1 to June 30, when the current calendar month is + * April, May, June. After that, it tracks usage from July 1 to + * September 30 when the current calendar month is July, August, September, + * so on. + * @type \Google\Cloud\Billing\Budgets\V1\CustomPeriod $custom_period + * Optional. Specifies to track usage from any start date (required) to any + * end date (optional). This time period is static, it does not recur. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A set of projects of the form `projects/{project}`, + * specifying that usage from only this set of projects should be + * included in the budget. If omitted, the report includes all usage for + * the billing account, regardless of which project the usage occurred on. + * + * Generated from protobuf field repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProjects() + { + return $this->projects; + } + + /** + * Optional. A set of projects of the form `projects/{project}`, + * specifying that usage from only this set of projects should be + * included in the budget. If omitted, the report includes all usage for + * the billing account, regardless of which project the usage occurred on. + * + * Generated from protobuf field repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->projects = $arr; + + return $this; + } + + /** + * Optional. A set of folder and organization names of the form + * `folders/{folderId}` or `organizations/{organizationId}`, specifying that + * usage from only this set of folders and organizations should be included in + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. + * + * Generated from protobuf field repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceAncestors() + { + return $this->resource_ancestors; + } + + /** + * Optional. A set of folder and organization names of the form + * `folders/{folderId}` or `organizations/{organizationId}`, specifying that + * usage from only this set of folders and organizations should be included in + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. + * + * Generated from protobuf field repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceAncestors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_ancestors = $arr; + + return $this; + } + + /** + * Optional. If + * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] + * is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be + * subtracted from gross cost to determine the spend for threshold + * calculations. See [a list of acceptable credit type + * values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). + * If + * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] + * is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. + * + * Generated from protobuf field repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCreditTypes() + { + return $this->credit_types; + } + + /** + * Optional. If + * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] + * is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be + * subtracted from gross cost to determine the spend for threshold + * calculations. See [a list of acceptable credit type + * values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). + * If + * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] + * is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. + * + * Generated from protobuf field repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCreditTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->credit_types = $arr; + + return $this; + } + + /** + * Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment credit_types_treatment = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCreditTypesTreatment() + { + return $this->credit_types_treatment; + } + + /** + * Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment credit_types_treatment = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCreditTypesTreatment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Billing\Budgets\V1\Filter\CreditTypesTreatment::class); + $this->credit_types_treatment = $var; + + return $this; + } + + /** + * Optional. A set of services of the form `services/{service_id}`, + * specifying that usage from only this set of services should be + * included in the budget. If omitted, the report includes usage for + * all the services. + * The service names are available through the Catalog API: + * https://cloud.google.com/billing/v1/how-tos/catalog-api. + * + * Generated from protobuf field repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServices() + { + return $this->services; + } + + /** + * Optional. A set of services of the form `services/{service_id}`, + * specifying that usage from only this set of services should be + * included in the budget. If omitted, the report includes usage for + * all the services. + * The service names are available through the Catalog API: + * https://cloud.google.com/billing/v1/how-tos/catalog-api. + * + * Generated from protobuf field repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->services = $arr; + + return $this; + } + + /** + * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, + * specifying that usage from only this set of subaccounts should be included + * in the budget. If a subaccount is set to the name of the parent account, + * usage from the parent account is included. If the field is omitted, + * the report includes usage from the parent account and all subaccounts, + * if they exist. + * + * Generated from protobuf field repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubaccounts() + { + return $this->subaccounts; + } + + /** + * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, + * specifying that usage from only this set of subaccounts should be included + * in the budget. If a subaccount is set to the name of the parent account, + * usage from the parent account is included. If the field is omitted, + * the report includes usage from the parent account and all subaccounts, + * if they exist. + * + * Generated from protobuf field repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubaccounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subaccounts = $arr; + + return $this; + } + + /** + * Optional. A single label and value pair specifying that usage from only + * this set of labeled resources should be included in the budget. If omitted, + * the report includes all labeled and unlabeled usage. + * An object containing a single `"key": value` pair. Example: `{ "name": + * "wrench" }`. + * _Currently, multiple entries or multiple values per entry are not + * allowed._ + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. A single label and value pair specifying that usage from only + * this set of labeled resources should be included in the budget. If omitted, + * the report includes all labeled and unlabeled usage. + * An object containing a single `"key": value` pair. Example: `{ "name": + * "wrench" }`. + * _Currently, multiple entries or multiple values per entry are not + * allowed._ + * + * 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::MESSAGE, \Google\Protobuf\ListValue::class); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Specifies to track usage for recurring calendar period. + * For example, assume that CalendarPeriod.QUARTER is set. The budget + * tracks usage from April 1 to June 30, when the current calendar month is + * April, May, June. After that, it tracks usage from July 1 to + * September 30 when the current calendar month is July, August, September, + * so on. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.CalendarPeriod calendar_period = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCalendarPeriod() + { + return $this->readOneof(8); + } + + public function hasCalendarPeriod() + { + return $this->hasOneof(8); + } + + /** + * Optional. Specifies to track usage for recurring calendar period. + * For example, assume that CalendarPeriod.QUARTER is set. The budget + * tracks usage from April 1 to June 30, when the current calendar month is + * April, May, June. After that, it tracks usage from July 1 to + * September 30 when the current calendar month is July, August, September, + * so on. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.CalendarPeriod calendar_period = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCalendarPeriod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Billing\Budgets\V1\CalendarPeriod::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Optional. Specifies to track usage from any start date (required) to any + * end date (optional). This time period is static, it does not recur. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.CustomPeriod custom_period = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Billing\Budgets\V1\CustomPeriod|null + */ + public function getCustomPeriod() + { + return $this->readOneof(9); + } + + public function hasCustomPeriod() + { + return $this->hasOneof(9); + } + + /** + * Optional. Specifies to track usage from any start date (required) to any + * end date (optional). This time period is static, it does not recur. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.CustomPeriod custom_period = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Billing\Budgets\V1\CustomPeriod $var + * @return $this + */ + public function setCustomPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\CustomPeriod::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getUsagePeriod() + { + return $this->whichOneof("usage_period"); + } + +} + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter/CreditTypesTreatment.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter/CreditTypesTreatment.php new file mode 100644 index 000000000000..d37364e875dd --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter/CreditTypesTreatment.php @@ -0,0 +1,78 @@ +google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment + */ +class CreditTypesTreatment +{ + /** + * Generated from protobuf enum CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0; + */ + const CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0; + /** + * All types of credit are subtracted from the gross cost to determine the + * spend for threshold calculations. + * + * Generated from protobuf enum INCLUDE_ALL_CREDITS = 1; + */ + const INCLUDE_ALL_CREDITS = 1; + /** + * All types of credit are added to the net cost to determine the spend for + * threshold calculations. + * + * Generated from protobuf enum EXCLUDE_ALL_CREDITS = 2; + */ + const EXCLUDE_ALL_CREDITS = 2; + /** + * [Credit + * types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type) + * specified in the credit_types field are subtracted from the + * gross cost to determine the spend for threshold calculations. + * + * Generated from protobuf enum INCLUDE_SPECIFIED_CREDITS = 3; + */ + const INCLUDE_SPECIFIED_CREDITS = 3; + + private static $valueToName = [ + self::CREDIT_TYPES_TREATMENT_UNSPECIFIED => 'CREDIT_TYPES_TREATMENT_UNSPECIFIED', + self::INCLUDE_ALL_CREDITS => 'INCLUDE_ALL_CREDITS', + self::EXCLUDE_ALL_CREDITS => 'EXCLUDE_ALL_CREDITS', + self::INCLUDE_SPECIFIED_CREDITS => 'INCLUDE_SPECIFIED_CREDITS', + ]; + + 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(CreditTypesTreatment::class, \Google\Cloud\Billing\Budgets\V1\Filter_CreditTypesTreatment::class); + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/GetBudgetRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/GetBudgetRequest.php new file mode 100644 index 000000000000..1c12b459606a --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/GetBudgetRequest.php @@ -0,0 +1,86 @@ +google.cloud.billing.budgets.v1.GetBudgetRequest + */ +class GetBudgetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of budget to get. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of budget to get. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Please see + * {@see BudgetServiceClient::budgetName()} for help formatting this field. + * + * @return \Google\Cloud\Billing\Budgets\V1\GetBudgetRequest + * + * @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. Name of budget to get. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of budget to get. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * + * 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. Name of budget to get. Values are of the form + * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + * + * 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/LastPeriodAmount.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/LastPeriodAmount.php new file mode 100644 index 000000000000..9849a3486905 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/LastPeriodAmount.php @@ -0,0 +1,39 @@ +google.cloud.billing.budgets.v1.LastPeriodAmount + */ +class LastPeriodAmount extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsRequest.php new file mode 100644 index 000000000000..cc94ff1ad6ac --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsRequest.php @@ -0,0 +1,220 @@ +google.cloud.billing.budgets.v1.ListBudgetsRequest + */ +class ListBudgetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of billing account to list budgets under. Values + * are of the form `billingAccounts/{billingAccountId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Set the scope of the budgets to be returned, in the format of the + * resource name. The scope of a budget is the cost that it tracks, such as + * costs for a single project, or the costs for all projects in a folder. Only + * project scope (in the format of "projects/project-id" or "projects/123") is + * supported in this field. When this field is set to a project's resource + * name, the budgets returned are tracking the costs for that project. + * + * Generated from protobuf field string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scope = ''; + /** + * Optional. The maximum number of budgets to return per page. + * The default and maximum value are 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The value returned by the last `ListBudgetsResponse` which + * indicates that this is a continuation of a prior `ListBudgets` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of billing account to list budgets under. Values + * are of the form `billingAccounts/{billingAccountId}`. Please see + * {@see BudgetServiceClient::billingAccountName()} for help formatting this field. + * + * @return \Google\Cloud\Billing\Budgets\V1\ListBudgetsRequest + * + * @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. Name of billing account to list budgets under. Values + * are of the form `billingAccounts/{billingAccountId}`. + * @type string $scope + * Optional. Set the scope of the budgets to be returned, in the format of the + * resource name. The scope of a budget is the cost that it tracks, such as + * costs for a single project, or the costs for all projects in a folder. Only + * project scope (in the format of "projects/project-id" or "projects/123") is + * supported in this field. When this field is set to a project's resource + * name, the budgets returned are tracking the costs for that project. + * @type int $page_size + * Optional. The maximum number of budgets to return per page. + * The default and maximum value are 100. + * @type string $page_token + * Optional. The value returned by the last `ListBudgetsResponse` which + * indicates that this is a continuation of a prior `ListBudgets` call, + * and that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of billing account to list budgets under. Values + * are of the form `billingAccounts/{billingAccountId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of billing account to list budgets under. Values + * are of the form `billingAccounts/{billingAccountId}`. + * + * 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. Set the scope of the budgets to be returned, in the format of the + * resource name. The scope of a budget is the cost that it tracks, such as + * costs for a single project, or the costs for all projects in a folder. Only + * project scope (in the format of "projects/project-id" or "projects/123") is + * supported in this field. When this field is set to a project's resource + * name, the budgets returned are tracking the costs for that project. + * + * Generated from protobuf field string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Optional. Set the scope of the budgets to be returned, in the format of the + * resource name. The scope of a budget is the cost that it tracks, such as + * costs for a single project, or the costs for all projects in a folder. Only + * project scope (in the format of "projects/project-id" or "projects/123") is + * supported in this field. When this field is set to a project's resource + * name, the budgets returned are tracking the costs for that project. + * + * Generated from protobuf field string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. The maximum number of budgets to return per page. + * The default and maximum value are 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of budgets to return per page. + * The default and maximum value are 100. + * + * 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. The value returned by the last `ListBudgetsResponse` which + * indicates that this is a continuation of a prior `ListBudgets` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The value returned by the last `ListBudgetsResponse` which + * indicates that this is a continuation of a prior `ListBudgets` call, + * and that the system should return the next page of data. + * + * 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsResponse.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsResponse.php new file mode 100644 index 000000000000..c00fba71972a --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsResponse.php @@ -0,0 +1,105 @@ +google.cloud.billing.budgets.v1.ListBudgetsResponse + */ +class ListBudgetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of the budgets owned by the requested billing account. + * + * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.Budget budgets = 1; + */ + private $budgets; + /** + * If not empty, indicates that there may be more budgets that match the + * request; this value should be passed in a new `ListBudgetsRequest`. + * + * 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\Billing\Budgets\V1\Budget>|\Google\Protobuf\Internal\RepeatedField $budgets + * List of the budgets owned by the requested billing account. + * @type string $next_page_token + * If not empty, indicates that there may be more budgets that match the + * request; this value should be passed in a new `ListBudgetsRequest`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); + parent::__construct($data); + } + + /** + * List of the budgets owned by the requested billing account. + * + * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.Budget budgets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBudgets() + { + return $this->budgets; + } + + /** + * List of the budgets owned by the requested billing account. + * + * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.Budget budgets = 1; + * @param array<\Google\Cloud\Billing\Budgets\V1\Budget>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBudgets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\Budgets\V1\Budget::class); + $this->budgets = $arr; + + return $this; + } + + /** + * If not empty, indicates that there may be more budgets that match the + * request; this value should be passed in a new `ListBudgetsRequest`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If not empty, indicates that there may be more budgets that match the + * request; this value should be passed in a new `ListBudgetsRequest`. + * + * 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/NotificationsRule.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/NotificationsRule.php new file mode 100644 index 000000000000..cb57f006391a --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/NotificationsRule.php @@ -0,0 +1,416 @@ +google.cloud.billing.budgets.v1.NotificationsRule + */ +class NotificationsRule extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The name of the Pub/Sub topic where budget-related messages are + * published, in the form `projects/{project_id}/topics/{topic_id}`. Updates + * are sent to the topic at regular intervals; the timing of the updates is + * not dependent on the [threshold rules](#thresholdrule) you've set. + * Note that if you want your + * [Pub/Sub JSON + * object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) + * to contain data for `alertThresholdExceeded`, you need at least one + * [alert threshold rule](#thresholdrule). When you set threshold rules, you + * must also enable at least one of the email notification options, either + * using the default IAM recipients or Cloud Monitoring email notification + * channels. + * To use Pub/Sub topics with budgets, you must do the following: + * 1. Create the Pub/Sub topic + * before connecting it to your budget. For guidance, see + * [Manage programmatic budget alert + * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + * 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on + * the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. + * For additional details on Pub/Sub roles and permissions, see + * [Permissions required for this + * task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). + * + * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $pubsub_topic = ''; + /** + * Optional. Required when + * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic] + * is set. The schema version of the notification sent to + * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]. + * Only "1.0" is accepted. It represents the JSON schema as defined in + * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. + * + * Generated from protobuf field string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $schema_version = ''; + /** + * Optional. Email targets to send notifications to when a threshold is + * exceeded. This is in addition to the `DefaultIamRecipients` who receive + * alert emails based on their billing account IAM role. The value is the full + * REST resource name of a Cloud Monitoring email notification channel with + * the form `projects/{project_id}/notificationChannels/{channel_id}`. A + * maximum of 5 email notifications are allowed. + * To customize budget alert email recipients with monitoring notification + * channels, you _must create the monitoring notification channels before + * you link them to a budget_. For guidance on setting up notification + * channels to use with budgets, see + * [Customize budget alert email + * recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). + * For Cloud Billing budget alerts, you _must use email notification + * channels_. The other types of notification channels are _not_ + * supported, such as Slack, SMS, or PagerDuty. If you want to + * [send budget notifications to + * Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), + * use a pubsubTopic and configure + * [programmatic + * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + * + * Generated from protobuf field repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $monitoring_notification_channels; + /** + * Optional. When set to true, disables default notifications sent when a + * threshold is exceeded. Default notifications are sent to those with Billing + * Account Administrator and Billing Account User IAM roles for the target + * account. + * + * Generated from protobuf field bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disable_default_iam_recipients = false; + /** + * Optional. When set to true, and when the budget has a single project + * configured, notifications will be sent to project level recipients of that + * project. This field will be ignored if the budget has multiple or no + * project configured. + * Currently, project level recipients are the users with `Owner` role on a + * cloud project. + * + * Generated from protobuf field bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_project_level_recipients = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pubsub_topic + * Optional. The name of the Pub/Sub topic where budget-related messages are + * published, in the form `projects/{project_id}/topics/{topic_id}`. Updates + * are sent to the topic at regular intervals; the timing of the updates is + * not dependent on the [threshold rules](#thresholdrule) you've set. + * Note that if you want your + * [Pub/Sub JSON + * object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) + * to contain data for `alertThresholdExceeded`, you need at least one + * [alert threshold rule](#thresholdrule). When you set threshold rules, you + * must also enable at least one of the email notification options, either + * using the default IAM recipients or Cloud Monitoring email notification + * channels. + * To use Pub/Sub topics with budgets, you must do the following: + * 1. Create the Pub/Sub topic + * before connecting it to your budget. For guidance, see + * [Manage programmatic budget alert + * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + * 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on + * the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. + * For additional details on Pub/Sub roles and permissions, see + * [Permissions required for this + * task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). + * @type string $schema_version + * Optional. Required when + * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic] + * is set. The schema version of the notification sent to + * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]. + * Only "1.0" is accepted. It represents the JSON schema as defined in + * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. + * @type array|\Google\Protobuf\Internal\RepeatedField $monitoring_notification_channels + * Optional. Email targets to send notifications to when a threshold is + * exceeded. This is in addition to the `DefaultIamRecipients` who receive + * alert emails based on their billing account IAM role. The value is the full + * REST resource name of a Cloud Monitoring email notification channel with + * the form `projects/{project_id}/notificationChannels/{channel_id}`. A + * maximum of 5 email notifications are allowed. + * To customize budget alert email recipients with monitoring notification + * channels, you _must create the monitoring notification channels before + * you link them to a budget_. For guidance on setting up notification + * channels to use with budgets, see + * [Customize budget alert email + * recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). + * For Cloud Billing budget alerts, you _must use email notification + * channels_. The other types of notification channels are _not_ + * supported, such as Slack, SMS, or PagerDuty. If you want to + * [send budget notifications to + * Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), + * use a pubsubTopic and configure + * [programmatic + * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + * @type bool $disable_default_iam_recipients + * Optional. When set to true, disables default notifications sent when a + * threshold is exceeded. Default notifications are sent to those with Billing + * Account Administrator and Billing Account User IAM roles for the target + * account. + * @type bool $enable_project_level_recipients + * Optional. When set to true, and when the budget has a single project + * configured, notifications will be sent to project level recipients of that + * project. This field will be ignored if the budget has multiple or no + * project configured. + * Currently, project level recipients are the users with `Owner` role on a + * cloud project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The name of the Pub/Sub topic where budget-related messages are + * published, in the form `projects/{project_id}/topics/{topic_id}`. Updates + * are sent to the topic at regular intervals; the timing of the updates is + * not dependent on the [threshold rules](#thresholdrule) you've set. + * Note that if you want your + * [Pub/Sub JSON + * object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) + * to contain data for `alertThresholdExceeded`, you need at least one + * [alert threshold rule](#thresholdrule). When you set threshold rules, you + * must also enable at least one of the email notification options, either + * using the default IAM recipients or Cloud Monitoring email notification + * channels. + * To use Pub/Sub topics with budgets, you must do the following: + * 1. Create the Pub/Sub topic + * before connecting it to your budget. For guidance, see + * [Manage programmatic budget alert + * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + * 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on + * the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. + * For additional details on Pub/Sub roles and permissions, see + * [Permissions required for this + * task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). + * + * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPubsubTopic() + { + return $this->pubsub_topic; + } + + /** + * Optional. The name of the Pub/Sub topic where budget-related messages are + * published, in the form `projects/{project_id}/topics/{topic_id}`. Updates + * are sent to the topic at regular intervals; the timing of the updates is + * not dependent on the [threshold rules](#thresholdrule) you've set. + * Note that if you want your + * [Pub/Sub JSON + * object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) + * to contain data for `alertThresholdExceeded`, you need at least one + * [alert threshold rule](#thresholdrule). When you set threshold rules, you + * must also enable at least one of the email notification options, either + * using the default IAM recipients or Cloud Monitoring email notification + * channels. + * To use Pub/Sub topics with budgets, you must do the following: + * 1. Create the Pub/Sub topic + * before connecting it to your budget. For guidance, see + * [Manage programmatic budget alert + * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + * 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on + * the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. + * For additional details on Pub/Sub roles and permissions, see + * [Permissions required for this + * task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). + * + * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic = $var; + + return $this; + } + + /** + * Optional. Required when + * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic] + * is set. The schema version of the notification sent to + * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]. + * Only "1.0" is accepted. It represents the JSON schema as defined in + * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. + * + * Generated from protobuf field string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSchemaVersion() + { + return $this->schema_version; + } + + /** + * Optional. Required when + * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic] + * is set. The schema version of the notification sent to + * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]. + * Only "1.0" is accepted. It represents the JSON schema as defined in + * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. + * + * Generated from protobuf field string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSchemaVersion($var) + { + GPBUtil::checkString($var, True); + $this->schema_version = $var; + + return $this; + } + + /** + * Optional. Email targets to send notifications to when a threshold is + * exceeded. This is in addition to the `DefaultIamRecipients` who receive + * alert emails based on their billing account IAM role. The value is the full + * REST resource name of a Cloud Monitoring email notification channel with + * the form `projects/{project_id}/notificationChannels/{channel_id}`. A + * maximum of 5 email notifications are allowed. + * To customize budget alert email recipients with monitoring notification + * channels, you _must create the monitoring notification channels before + * you link them to a budget_. For guidance on setting up notification + * channels to use with budgets, see + * [Customize budget alert email + * recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). + * For Cloud Billing budget alerts, you _must use email notification + * channels_. The other types of notification channels are _not_ + * supported, such as Slack, SMS, or PagerDuty. If you want to + * [send budget notifications to + * Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), + * use a pubsubTopic and configure + * [programmatic + * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + * + * Generated from protobuf field repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMonitoringNotificationChannels() + { + return $this->monitoring_notification_channels; + } + + /** + * Optional. Email targets to send notifications to when a threshold is + * exceeded. This is in addition to the `DefaultIamRecipients` who receive + * alert emails based on their billing account IAM role. The value is the full + * REST resource name of a Cloud Monitoring email notification channel with + * the form `projects/{project_id}/notificationChannels/{channel_id}`. A + * maximum of 5 email notifications are allowed. + * To customize budget alert email recipients with monitoring notification + * channels, you _must create the monitoring notification channels before + * you link them to a budget_. For guidance on setting up notification + * channels to use with budgets, see + * [Customize budget alert email + * recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). + * For Cloud Billing budget alerts, you _must use email notification + * channels_. The other types of notification channels are _not_ + * supported, such as Slack, SMS, or PagerDuty. If you want to + * [send budget notifications to + * Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), + * use a pubsubTopic and configure + * [programmatic + * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + * + * Generated from protobuf field repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMonitoringNotificationChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->monitoring_notification_channels = $arr; + + return $this; + } + + /** + * Optional. When set to true, disables default notifications sent when a + * threshold is exceeded. Default notifications are sent to those with Billing + * Account Administrator and Billing Account User IAM roles for the target + * account. + * + * Generated from protobuf field bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisableDefaultIamRecipients() + { + return $this->disable_default_iam_recipients; + } + + /** + * Optional. When set to true, disables default notifications sent when a + * threshold is exceeded. Default notifications are sent to those with Billing + * Account Administrator and Billing Account User IAM roles for the target + * account. + * + * Generated from protobuf field bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisableDefaultIamRecipients($var) + { + GPBUtil::checkBool($var); + $this->disable_default_iam_recipients = $var; + + return $this; + } + + /** + * Optional. When set to true, and when the budget has a single project + * configured, notifications will be sent to project level recipients of that + * project. This field will be ignored if the budget has multiple or no + * project configured. + * Currently, project level recipients are the users with `Owner` role on a + * cloud project. + * + * Generated from protobuf field bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableProjectLevelRecipients() + { + return $this->enable_project_level_recipients; + } + + /** + * Optional. When set to true, and when the budget has a single project + * configured, notifications will be sent to project level recipients of that + * project. This field will be ignored if the budget has multiple or no + * project configured. + * Currently, project level recipients are the users with `Owner` role on a + * cloud project. + * + * Generated from protobuf field bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableProjectLevelRecipients($var) + { + GPBUtil::checkBool($var); + $this->enable_project_level_recipients = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule.php new file mode 100644 index 000000000000..fdb59867e7a2 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule.php @@ -0,0 +1,130 @@ +google.cloud.billing.budgets.v1.ThresholdRule + */ +class ThresholdRule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Send an alert when this threshold is exceeded. + * This is a 1.0-based percentage, so 0.5 = 50%. + * Validation: non-negative number. + * + * Generated from protobuf field double threshold_percent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $threshold_percent = 0.0; + /** + * Optional. The type of basis used to determine if spend has passed the + * threshold. Behavior defaults to CURRENT_SPEND if not set. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.ThresholdRule.Basis spend_basis = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $spend_basis = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $threshold_percent + * Required. Send an alert when this threshold is exceeded. + * This is a 1.0-based percentage, so 0.5 = 50%. + * Validation: non-negative number. + * @type int $spend_basis + * Optional. The type of basis used to determine if spend has passed the + * threshold. Behavior defaults to CURRENT_SPEND if not set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. Send an alert when this threshold is exceeded. + * This is a 1.0-based percentage, so 0.5 = 50%. + * Validation: non-negative number. + * + * Generated from protobuf field double threshold_percent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getThresholdPercent() + { + return $this->threshold_percent; + } + + /** + * Required. Send an alert when this threshold is exceeded. + * This is a 1.0-based percentage, so 0.5 = 50%. + * Validation: non-negative number. + * + * Generated from protobuf field double threshold_percent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setThresholdPercent($var) + { + GPBUtil::checkDouble($var); + $this->threshold_percent = $var; + + return $this; + } + + /** + * Optional. The type of basis used to determine if spend has passed the + * threshold. Behavior defaults to CURRENT_SPEND if not set. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.ThresholdRule.Basis spend_basis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSpendBasis() + { + return $this->spend_basis; + } + + /** + * Optional. The type of basis used to determine if spend has passed the + * threshold. Behavior defaults to CURRENT_SPEND if not set. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.ThresholdRule.Basis spend_basis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSpendBasis($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Billing\Budgets\V1\ThresholdRule\Basis::class); + $this->spend_basis = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule/Basis.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule/Basis.php new file mode 100644 index 000000000000..030c1ca09a1b --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule/Basis.php @@ -0,0 +1,69 @@ +google.cloud.billing.budgets.v1.ThresholdRule.Basis + */ +class Basis +{ + /** + * Unspecified threshold basis. + * + * Generated from protobuf enum BASIS_UNSPECIFIED = 0; + */ + const BASIS_UNSPECIFIED = 0; + /** + * Use current spend as the basis for comparison against the threshold. + * + * Generated from protobuf enum CURRENT_SPEND = 1; + */ + const CURRENT_SPEND = 1; + /** + * Use forecasted spend for the period as the basis for comparison against + * the threshold. + * FORECASTED_SPEND can only be set when the budget's time period is a + * [Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period]. + * It cannot be set in combination with + * [Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period]. + * + * Generated from protobuf enum FORECASTED_SPEND = 2; + */ + const FORECASTED_SPEND = 2; + + private static $valueToName = [ + self::BASIS_UNSPECIFIED => 'BASIS_UNSPECIFIED', + self::CURRENT_SPEND => 'CURRENT_SPEND', + self::FORECASTED_SPEND => 'FORECASTED_SPEND', + ]; + + 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(Basis::class, \Google\Cloud\Billing\Budgets\V1\ThresholdRule_Basis::class); + diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/UpdateBudgetRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/UpdateBudgetRequest.php new file mode 100644 index 000000000000..7f5ed69c5deb --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/UpdateBudgetRequest.php @@ -0,0 +1,166 @@ +google.cloud.billing.budgets.v1.UpdateBudgetRequest + */ +class UpdateBudgetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The updated budget object. + * The budget to update is specified by the budget name in the budget. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $budget = null; + /** + * Optional. Indicates which fields in the provided budget to update. + * Read-only fields (such as `name`) cannot be changed. If this is not + * provided, then only fields with non-default values from the request are + * updated. See + * https://developers.google.com/protocol-buffers/docs/proto3#default for more + * details about default values. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Billing\Budgets\V1\Budget $budget Required. The updated budget object. + * The budget to update is specified by the budget name in the budget. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Indicates which fields in the provided budget to update. + * Read-only fields (such as `name`) cannot be changed. If this is not + * provided, then only fields with non-default values from the request are + * updated. See + * https://developers.google.com/protocol-buffers/docs/proto3#default for more + * details about default values. + * + * @return \Google\Cloud\Billing\Budgets\V1\UpdateBudgetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Billing\Budgets\V1\Budget $budget, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBudget($budget) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Billing\Budgets\V1\Budget $budget + * Required. The updated budget object. + * The budget to update is specified by the budget name in the budget. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Indicates which fields in the provided budget to update. + * Read-only fields (such as `name`) cannot be changed. If this is not + * provided, then only fields with non-default values from the request are + * updated. See + * https://developers.google.com/protocol-buffers/docs/proto3#default for more + * details about default values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The updated budget object. + * The budget to update is specified by the budget name in the budget. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Billing\Budgets\V1\Budget|null + */ + public function getBudget() + { + return $this->budget; + } + + public function hasBudget() + { + return isset($this->budget); + } + + public function clearBudget() + { + unset($this->budget); + } + + /** + * Required. The updated budget object. + * The budget to update is specified by the budget name in the budget. + * + * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Billing\Budgets\V1\Budget $var + * @return $this + */ + public function setBudget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\Budget::class); + $this->budget = $var; + + return $this; + } + + /** + * Optional. Indicates which fields in the provided budget to update. + * Read-only fields (such as `name`) cannot be changed. If this is not + * provided, then only fields with non-default values from the request are + * updated. See + * https://developers.google.com/protocol-buffers/docs/proto3#default for more + * details about default values. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Indicates which fields in the provided budget to update. + * Read-only fields (such as `name`) cannot be changed. If this is not + * provided, then only fields with non-default values from the request are + * updated. See + * https://developers.google.com/protocol-buffers/docs/proto3#default for more + * details about default values. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/create_budget.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/create_budget.php new file mode 100644 index 000000000000..b24aaebc7fd2 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/create_budget.php @@ -0,0 +1,79 @@ +setAmount($budgetAmount); + $request = (new CreateBudgetRequest()) + ->setParent($formattedParent) + ->setBudget($budget); + + // Call the API and handle any network failures. + try { + /** @var Budget $response */ + $response = $budgetServiceClient->createBudget($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 = BudgetServiceClient::billingAccountName('[BILLING_ACCOUNT]'); + + create_budget_sample($formattedParent); +} +// [END billingbudgets_v1_generated_BudgetService_CreateBudget_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/delete_budget.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/delete_budget.php new file mode 100644 index 000000000000..95a60fe73613 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/delete_budget.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $budgetServiceClient->deleteBudget($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 = BudgetServiceClient::budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); + + delete_budget_sample($formattedName); +} +// [END billingbudgets_v1_generated_BudgetService_DeleteBudget_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/get_budget.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/get_budget.php new file mode 100644 index 000000000000..9f1da7f3db08 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/get_budget.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Budget $response */ + $response = $budgetServiceClient->getBudget($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 = BudgetServiceClient::budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); + + get_budget_sample($formattedName); +} +// [END billingbudgets_v1_generated_BudgetService_GetBudget_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/list_budgets.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/list_budgets.php new file mode 100644 index 000000000000..ccb583365fad --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/list_budgets.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $budgetServiceClient->listBudgets($request); + + /** @var Budget $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 = BudgetServiceClient::billingAccountName('[BILLING_ACCOUNT]'); + + list_budgets_sample($formattedParent); +} +// [END billingbudgets_v1_generated_BudgetService_ListBudgets_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/update_budget.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/update_budget.php new file mode 100644 index 000000000000..5e9bdda7e2af --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/update_budget.php @@ -0,0 +1,66 @@ +setAmount($budgetAmount); + $request = (new UpdateBudgetRequest()) + ->setBudget($budget); + + // Call the API and handle any network failures. + try { + /** @var Budget $response */ + $response = $budgetServiceClient->updateBudget($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END billingbudgets_v1_generated_BudgetService_UpdateBudget_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/Client/BudgetServiceClient.php b/owl-bot-staging/BillingBudgets/v1/src/V1/Client/BudgetServiceClient.php new file mode 100644 index 000000000000..faf7e8493001 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/src/V1/Client/BudgetServiceClient.php @@ -0,0 +1,382 @@ + createBudgetAsync(CreateBudgetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBudgetAsync(DeleteBudgetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBudgetAsync(GetBudgetRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBudgetsAsync(ListBudgetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBudgetAsync(UpdateBudgetRequest $request, array $optionalArgs = []) + */ +final class BudgetServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.billing.budgets.v1.BudgetService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'billingbudgets.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'billingbudgets.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-billing', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/budget_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/budget_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/budget_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/budget_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account resource. + * + * @param string $billingAccount + * + * @return string The formatted billing_account resource. + */ + public static function billingAccountName(string $billingAccount): string + { + return self::getPathTemplate('billingAccount')->render([ + 'billing_account' => $billingAccount, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a budget + * resource. + * + * @param string $billingAccount + * @param string $budget + * + * @return string The formatted budget resource. + */ + public static function budgetName(string $billingAccount, string $budget): string + { + return self::getPathTemplate('budget')->render([ + 'billing_account' => $billingAccount, + 'budget' => $budget, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - billingAccount: billingAccounts/{billing_account} + * - budget: billingAccounts/{billing_account}/budgets/{budget} + * + * 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 'billingbudgets.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new budget. See + * [Quotas and limits](https://cloud.google.com/billing/quotas) + * for more information on the limits of the number of budgets you can create. + * + * The async variant is {@see BudgetServiceClient::createBudgetAsync()} . + * + * @example samples/V1/BudgetServiceClient/create_budget.php + * + * @param CreateBudgetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Budget + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBudget(CreateBudgetRequest $request, array $callOptions = []): Budget + { + return $this->startApiCall('CreateBudget', $request, $callOptions)->wait(); + } + + /** + * Deletes a budget. Returns successfully if already deleted. + * + * The async variant is {@see BudgetServiceClient::deleteBudgetAsync()} . + * + * @example samples/V1/BudgetServiceClient/delete_budget.php + * + * @param DeleteBudgetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteBudget(DeleteBudgetRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteBudget', $request, $callOptions)->wait(); + } + + /** + * Returns a budget. + * + * WARNING: There are some fields exposed on the Google Cloud Console that + * aren't available on this API. When reading from the API, you will not + * see these fields in the return value, though they may have been set + * in the Cloud Console. + * + * The async variant is {@see BudgetServiceClient::getBudgetAsync()} . + * + * @example samples/V1/BudgetServiceClient/get_budget.php + * + * @param GetBudgetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Budget + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBudget(GetBudgetRequest $request, array $callOptions = []): Budget + { + return $this->startApiCall('GetBudget', $request, $callOptions)->wait(); + } + + /** + * Returns a list of budgets for a billing account. + * + * WARNING: There are some fields exposed on the Google Cloud Console that + * aren't available on this API. When reading from the API, you will not + * see these fields in the return value, though they may have been set + * in the Cloud Console. + * + * The async variant is {@see BudgetServiceClient::listBudgetsAsync()} . + * + * @example samples/V1/BudgetServiceClient/list_budgets.php + * + * @param ListBudgetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBudgets(ListBudgetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBudgets', $request, $callOptions); + } + + /** + * Updates a budget and returns the updated budget. + * + * WARNING: There are some fields exposed on the Google Cloud Console that + * aren't available on this API. Budget fields that are not exposed in + * this API will not be changed by this method. + * + * The async variant is {@see BudgetServiceClient::updateBudgetAsync()} . + * + * @example samples/V1/BudgetServiceClient/update_budget.php + * + * @param UpdateBudgetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Budget + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBudget(UpdateBudgetRequest $request, array $callOptions = []): Budget + { + return $this->startApiCall('UpdateBudget', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BillingBudgets/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..483462dfa32a --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/src/V1/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.billing.budgets.v1", + "libraryPackage": "Google\\Cloud\\Billing\\Budgets\\V1", + "services": { + "BudgetService": { + "clients": { + "grpc": { + "libraryClient": "BudgetServiceGapicClient", + "rpcs": { + "CreateBudget": { + "methods": [ + "createBudget" + ] + }, + "DeleteBudget": { + "methods": [ + "deleteBudget" + ] + }, + "GetBudget": { + "methods": [ + "getBudget" + ] + }, + "ListBudgets": { + "methods": [ + "listBudgets" + ] + }, + "UpdateBudget": { + "methods": [ + "updateBudget" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_client_config.json b/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_client_config.json new file mode 100644 index 000000000000..e874f8e03dc2 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_client_config.json @@ -0,0 +1,70 @@ +{ + "interfaces": { + "google.cloud.billing.budgets.v1.BudgetService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateBudget": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBudget": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetBudget": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBudgets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateBudget": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_descriptor_config.php b/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_descriptor_config.php new file mode 100644 index 000000000000..31788f25dfc6 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_descriptor_config.php @@ -0,0 +1,101 @@ + [ + 'google.cloud.billing.budgets.v1.BudgetService' => [ + 'CreateBudget' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Billing\Budgets\V1\Budget', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBudget' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBudget' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Billing\Budgets\V1\Budget', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBudgets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBudgets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Billing\Budgets\V1\ListBudgetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBudget' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Billing\Budgets\V1\Budget', + 'headerParams' => [ + [ + 'keyName' => 'budget.name', + 'fieldAccessors' => [ + 'getBudget', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'billingAccount' => 'billingAccounts/{billing_account}', + 'budget' => 'billingAccounts/{billing_account}/budgets/{budget}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_rest_client_config.php b/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_rest_client_config.php new file mode 100644 index 000000000000..13ac0525c7a7 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_rest_client_config.php @@ -0,0 +1,87 @@ + [ + 'google.cloud.billing.budgets.v1.BudgetService' => [ + 'CreateBudget' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=billingAccounts/*}/budgets', + 'body' => 'budget', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBudget' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=billingAccounts/*/budgets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBudget' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=billingAccounts/*/budgets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBudgets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=billingAccounts/*}/budgets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBudget' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{budget.name=billingAccounts/*/budgets/*}', + 'body' => 'budget', + 'placeholders' => [ + 'budget.name' => [ + 'getters' => [ + 'getBudget', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/BillingBudgets/v1/tests/Unit/V1/Client/BudgetServiceClientTest.php b/owl-bot-staging/BillingBudgets/v1/tests/Unit/V1/Client/BudgetServiceClientTest.php new file mode 100644 index 000000000000..d5207f2c8781 --- /dev/null +++ b/owl-bot-staging/BillingBudgets/v1/tests/Unit/V1/Client/BudgetServiceClientTest.php @@ -0,0 +1,459 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BudgetServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BudgetServiceClient($options); + } + + /** @test */ + public function createBudgetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $expectedResponse = new Budget(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); + $budget = new Budget(); + $budgetAmount = new BudgetAmount(); + $budget->setAmount($budgetAmount); + $request = (new CreateBudgetRequest()) + ->setParent($formattedParent) + ->setBudget($budget); + $response = $gapicClient->createBudget($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.billing.budgets.v1.BudgetService/CreateBudget', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getBudget(); + $this->assertProtobufEquals($budget, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBudgetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); + $budget = new Budget(); + $budgetAmount = new BudgetAmount(); + $budget->setAmount($budgetAmount); + $request = (new CreateBudgetRequest()) + ->setParent($formattedParent) + ->setBudget($budget); + try { + $gapicClient->createBudget($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBudgetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); + $request = (new DeleteBudgetRequest()) + ->setName($formattedName); + $gapicClient->deleteBudget($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.billing.budgets.v1.BudgetService/DeleteBudget', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBudgetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); + $request = (new DeleteBudgetRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteBudget($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBudgetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $expectedResponse = new Budget(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); + $request = (new GetBudgetRequest()) + ->setName($formattedName); + $response = $gapicClient->getBudget($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.billing.budgets.v1.BudgetService/GetBudget', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBudgetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); + $request = (new GetBudgetRequest()) + ->setName($formattedName); + try { + $gapicClient->getBudget($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBudgetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $budgetsElement = new Budget(); + $budgets = [ + $budgetsElement, + ]; + $expectedResponse = new ListBudgetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBudgets($budgets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); + $request = (new ListBudgetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBudgets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBudgets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.billing.budgets.v1.BudgetService/ListBudgets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBudgetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); + $request = (new ListBudgetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBudgets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBudgetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $expectedResponse = new Budget(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $budget = new Budget(); + $budgetAmount = new BudgetAmount(); + $budget->setAmount($budgetAmount); + $request = (new UpdateBudgetRequest()) + ->setBudget($budget); + $response = $gapicClient->updateBudget($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.billing.budgets.v1.BudgetService/UpdateBudget', $actualFuncCall); + $actualValue = $actualRequestObject->getBudget(); + $this->assertProtobufEquals($budget, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBudgetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $budget = new Budget(); + $budgetAmount = new BudgetAmount(); + $budget->setAmount($budgetAmount); + $request = (new UpdateBudgetRequest()) + ->setBudget($budget); + try { + $gapicClient->updateBudget($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBudgetAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $expectedResponse = new Budget(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); + $budget = new Budget(); + $budgetAmount = new BudgetAmount(); + $budget->setAmount($budgetAmount); + $request = (new CreateBudgetRequest()) + ->setParent($formattedParent) + ->setBudget($budget); + $response = $gapicClient->createBudgetAsync($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.billing.budgets.v1.BudgetService/CreateBudget', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getBudget(); + $this->assertProtobufEquals($budget, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Resources.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Resources.php new file mode 100644 index 0000000000000000000000000000000000000000..ea2ac719c1bbeacd734535236aeaf09946b18369 GIT binary patch literal 4629 zcmcIo&2JM&6ld2E-~|%1d<8?x)*uL_IM{p?Orcua8)MAinKPd)P&aO}+Nt{ultFi7MQ@4h#`_nWuxYvzkD?M)l5 z$VF^oNAqw;Zg0!pCYEi-@+{plFROau5ap$sLU2rO&u@ZkONGnd)2n6Hy+Coxf*j2bxx~fde|{FqgBAJ?hxCv zoElZlW_#EhxRt$Gyb+pZaHK0Q1{|~5F_MpE&++kY>$2=%&v(p6oHqm58T@KZaGhe4 z)-u6HCx~L2@ko}fMPMv<$z#UCOzo@76?a6Do8*e=!q0^L3XW*k{8efZp zU9ml0hhIO2JMR%#(v@IQibrE=LNunf(uoTpvSyP(WCnqmxEzXjn9{GjYJf4gFr^KWMnC*noKm%%FCXxt}10VGatF0Nx=Bp9j(hQ#` z2cxFB=(Oh zX%=G7@ph2Qk^)CqI$@e2?@2T(J`fV$!?o$6>4RARL4cb>^KT8G55i#wTGywHnGaz< z*@49VMN+y2H;UzIPAQ{WwOqxbb*HGH(2-FrB~svoh3WyDHjb( z=S_jiqMwm4nT894Y}i|dr897X)xoH`2a%loHwGsMYgieT5X|pwJ*{zCY+S|P0@J=a68pN^Lwde%dr{yVVficb__dYy^ zP*M96lYN*Q&iw0Ddlo?oqp)^aJsI3wOXpHNNG0JMw5p}T$JWv zHdHOBm5q2TX~VoaN<)(2l3H1=*7NF$T4_#-si8&z<;vCkGo(}sNLi&bHY!((l)wcz zTc~f;S1ZG}s9Gs+#Kq*FA{tQRKkpq`_3u|^xId zS2#44BEk55vjYbMoB)MLGv_LrTcT{ji6%;j~M7 zrbbT>G!cy+J&$>tecsXLGU`;6M+~JJ5tB^pJ$`Y%gpjxAWGPmzOK#iwL=HC4<<3hom+n;A5fyh%a6x_Z2@O~tSO%mKoXX1yY zk0HTqFfyq2EZ<0vm^v~+zT4u=1o>{mM-PxQ`^TiSa7xV=7-zb*i0^U6SIvj4Mg&9s zI}h$MeflpBBl;tPq5i#0n&~sMvm^Su1qm@OB>xiN)L1Oi?s1ehC{~Jx;V#gQCz1{i znd8zmdYEu^LXhV4Er%8jyJw?eX=;@%oRXg%ZpT= zU0$Se{PIHCeGigaOaBvTwZc1&@RDOhuSIV;UW?ZPxNMf=WwR3iv)Q$Ddxrbq&h^3h Y`Lo~-Vb_(zzSj+0Gq@DkfgOPV0hR^sh5!Hn literal 0 HcmV?d00001 diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Service.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Service.php new file mode 100644 index 0000000000000000000000000000000000000000..e9d7a87b50e5a431b20d4799554766233df864cd GIT binary patch literal 5005 zcmcIoO>o;p6h>~zG@JghkT$q~suF0LG%|Ll{3s2r?6_%|Hc1oLop#K4WO# zl(dse51hEcaN^Fu5pE2_iBk_8;Fc4^aN@>+8HN-4qgABDb>-0Jq)k0V{-L_}h2&=L@yC^R#R^;;ReB~@L z_1z9OktVOY?y8M)rtNl`xrXH!c*E!fYc94P7=h(Fx%GU`M|j;bk;=RS;23S>dxnYR zxuxPw6c|k-FluwmQLRKB)rz|v)vEbv08HEPeR+jD1P_5s{=81ZwoKU%$O}z*%<}7& zV+EFBTMtNNGjhwYeMD?`?`?G)lY*3~!J=cL@$)kGN%xL|q*iOR&Mb`hVtp3fc+{TiM{R7%s#b(lR9TWHZ-)*E3m!ws*-HsCO0 z;nKx$si*9PjUO7F2#r`9AUet+N_@C@a+R}7`-QR1E?-qvz|lDrEV)GI8_VdU4j~_2 z0sCnu8IfdZe6X1RP0#$RPlEH^Xy7j<4EQSPXgTgjxdUFl?UCMtl76p(0gt_ic^)cE zs@%LM%_{d%+(%$2KS*G>gc0$~>%_$ZbBXviFv&rP`XWO;1tuAhg0QyX7^|e|?u3oq z50Dwa5irCVa&g^ij$~N;^u=%%91trb`^e*=!c;2o0w#xl2S7r$cqX9h3A!WTDd-lS zl=s0fCtN%czT>!QI`@YAkpy13VfhhqU$}oJtiJ>XJ(88WPo@gv{6z=>V2=X#L*y{R z2Nev4cVO^6(vA_l3I+{U*Dm%+_V@K2Bs>m|IOyY`9(yOty>br>&mtS`F1Kfpv%BCJ zDTb8|KS1rIPX4$4ew4sil}u?WL0%DTbS;`@2NR8$NaSxgR@PkYtlFoA4wxCs$xz{} z8a5Kr`_!&pS&_q&;D{T&s7}Tv;tAxdW8ipfRp_$b!PdzBNN&ns5_s(?0ffmnzyNX5 zvAOOK7jC7JWh&q5GII=v!J#H{$X8FDbROSzcwbN!z(Ba+7=X*=mD@Ke_1g<8OXbr1 zwfXYw(HG!BaG+XV=Ko3XG|1|eN_nNCSLPQN>g1EJ&R6x~jq=e<;dcN|(62M{jrZUt z>r-vg&cY9}Y94+mfx)O%!%L~+jP{2K&-T-DmB}rg4T49%{_$DnG(1Ts$U{0AX2_tS z4b#s}3Ui;oZwdy7>dmp_*SZD zVitQ0<&Ai)j6#liC;K8uQa79MCqjL4Xr-h+X|zYYb6a{u8squR>;&UkVBA$YVu6B> z5&pdd4khLid?yv<2^$eay4u@e$~&P_ph93p!r~D*;E%f34g7-SAUWVt<{)V#;2#r_ ziw{wiodA?%aZEhDII`8py3*KvR1N)$@6BIybu9=yU(4n0-@m_OF-JQoKR!=+wh^>k z+%9~c0f*xwm-N-IC2)k)fBY$&7J>9S0H`~x1Pguj*b8ypoPnpdd#vr6{J^>0WS<)? ze`f#;XCgV`UPrcvFrns?3^>(uRKodGMD_F`XnXHjxC*tfz$9>8DJ3Kw6Tx=xq-tL8 z^{u2y6VHqH;-?vKiJY56E?*Z%D02E*b-UgZ5w(!P-9=4aW4i0p zegoogle.cloud.binaryauthorization.v1.AdmissionRule + */ +class AdmissionRule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. How this admission rule will be evaluated. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $evaluation_mode = 0; + /** + * Optional. The resource names of the attestors that must attest to + * a container image, in the format `projects/*/attestors/*`. Each + * attestor must exist before a policy can reference it. To add an attestor + * to a policy the principal issuing the policy change request must be able + * to read the attestor resource. + * Note: this field must be non-empty when the evaluation_mode field specifies + * REQUIRE_ATTESTATION, otherwise it must be empty. + * + * Generated from protobuf field repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $require_attestations_by; + /** + * Required. The action when a pod creation is denied by the admission rule. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $enforcement_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $evaluation_mode + * Required. How this admission rule will be evaluated. + * @type array|\Google\Protobuf\Internal\RepeatedField $require_attestations_by + * Optional. The resource names of the attestors that must attest to + * a container image, in the format `projects/*/attestors/*`. Each + * attestor must exist before a policy can reference it. To add an attestor + * to a policy the principal issuing the policy change request must be able + * to read the attestor resource. + * Note: this field must be non-empty when the evaluation_mode field specifies + * REQUIRE_ATTESTATION, otherwise it must be empty. + * @type int $enforcement_mode + * Required. The action when a pod creation is denied by the admission rule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. How this admission rule will be evaluated. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getEvaluationMode() + { + return $this->evaluation_mode; + } + + /** + * Required. How this admission rule will be evaluated. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setEvaluationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule\EvaluationMode::class); + $this->evaluation_mode = $var; + + return $this; + } + + /** + * Optional. The resource names of the attestors that must attest to + * a container image, in the format `projects/*/attestors/*`. Each + * attestor must exist before a policy can reference it. To add an attestor + * to a policy the principal issuing the policy change request must be able + * to read the attestor resource. + * Note: this field must be non-empty when the evaluation_mode field specifies + * REQUIRE_ATTESTATION, otherwise it must be empty. + * + * Generated from protobuf field repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequireAttestationsBy() + { + return $this->require_attestations_by; + } + + /** + * Optional. The resource names of the attestors that must attest to + * a container image, in the format `projects/*/attestors/*`. Each + * attestor must exist before a policy can reference it. To add an attestor + * to a policy the principal issuing the policy change request must be able + * to read the attestor resource. + * Note: this field must be non-empty when the evaluation_mode field specifies + * REQUIRE_ATTESTATION, otherwise it must be empty. + * + * Generated from protobuf field repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequireAttestationsBy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->require_attestations_by = $arr; + + return $this; + } + + /** + * Required. The action when a pod creation is denied by the admission rule. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getEnforcementMode() + { + return $this->enforcement_mode; + } + + /** + * Required. The action when a pod creation is denied by the admission rule. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setEnforcementMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule\EnforcementMode::class); + $this->enforcement_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EnforcementMode.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EnforcementMode.php new file mode 100644 index 000000000000..577a398fc23c --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EnforcementMode.php @@ -0,0 +1,66 @@ +google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode + */ +class EnforcementMode +{ + /** + * Do not use. + * + * Generated from protobuf enum ENFORCEMENT_MODE_UNSPECIFIED = 0; + */ + const ENFORCEMENT_MODE_UNSPECIFIED = 0; + /** + * Enforce the admission rule by blocking the pod creation. + * + * Generated from protobuf enum ENFORCED_BLOCK_AND_AUDIT_LOG = 1; + */ + const ENFORCED_BLOCK_AND_AUDIT_LOG = 1; + /** + * Dryrun mode: Audit logging only. This will allow the pod creation as if + * the admission request had specified break-glass. + * + * Generated from protobuf enum DRYRUN_AUDIT_LOG_ONLY = 2; + */ + const DRYRUN_AUDIT_LOG_ONLY = 2; + + private static $valueToName = [ + self::ENFORCEMENT_MODE_UNSPECIFIED => 'ENFORCEMENT_MODE_UNSPECIFIED', + self::ENFORCED_BLOCK_AND_AUDIT_LOG => 'ENFORCED_BLOCK_AND_AUDIT_LOG', + self::DRYRUN_AUDIT_LOG_ONLY => 'DRYRUN_AUDIT_LOG_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EnforcementMode::class, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule_EnforcementMode::class); + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EvaluationMode.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EvaluationMode.php new file mode 100644 index 000000000000..81cc9a636e88 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EvaluationMode.php @@ -0,0 +1,71 @@ +google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode + */ +class EvaluationMode +{ + /** + * Do not use. + * + * Generated from protobuf enum EVALUATION_MODE_UNSPECIFIED = 0; + */ + const EVALUATION_MODE_UNSPECIFIED = 0; + /** + * This rule allows all all pod creations. + * + * Generated from protobuf enum ALWAYS_ALLOW = 1; + */ + const ALWAYS_ALLOW = 1; + /** + * This rule allows a pod creation if all the attestors listed in + * 'require_attestations_by' have valid attestations for all of the + * images in the pod spec. + * + * Generated from protobuf enum REQUIRE_ATTESTATION = 2; + */ + const REQUIRE_ATTESTATION = 2; + /** + * This rule denies all pod creations. + * + * Generated from protobuf enum ALWAYS_DENY = 3; + */ + const ALWAYS_DENY = 3; + + private static $valueToName = [ + self::EVALUATION_MODE_UNSPECIFIED => 'EVALUATION_MODE_UNSPECIFIED', + self::ALWAYS_ALLOW => 'ALWAYS_ALLOW', + self::REQUIRE_ATTESTATION => 'REQUIRE_ATTESTATION', + self::ALWAYS_DENY => 'ALWAYS_DENY', + ]; + + 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(EvaluationMode::class, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule_EvaluationMode::class); + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionWhitelistPattern.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionWhitelistPattern.php new file mode 100644 index 000000000000..7d0e33969045 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionWhitelistPattern.php @@ -0,0 +1,80 @@ +google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern + */ +class AdmissionWhitelistPattern extends \Google\Protobuf\Internal\Message +{ + /** + * An image name pattern to allowlist, in the form `registry/path/to/image`. + * This supports a trailing `*` wildcard, but this is allowed only in + * text after the `registry/` part. This also supports a trailing `**` + * wildcard which matches subdirectories of a given entry. + * + * Generated from protobuf field string name_pattern = 1; + */ + protected $name_pattern = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name_pattern + * An image name pattern to allowlist, in the form `registry/path/to/image`. + * This supports a trailing `*` wildcard, but this is allowed only in + * text after the `registry/` part. This also supports a trailing `**` + * wildcard which matches subdirectories of a given entry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * An image name pattern to allowlist, in the form `registry/path/to/image`. + * This supports a trailing `*` wildcard, but this is allowed only in + * text after the `registry/` part. This also supports a trailing `**` + * wildcard which matches subdirectories of a given entry. + * + * Generated from protobuf field string name_pattern = 1; + * @return string + */ + public function getNamePattern() + { + return $this->name_pattern; + } + + /** + * An image name pattern to allowlist, in the form `registry/path/to/image`. + * This supports a trailing `*` wildcard, but this is allowed only in + * text after the `registry/` part. This also supports a trailing `**` + * wildcard which matches subdirectories of a given entry. + * + * Generated from protobuf field string name_pattern = 1; + * @param string $var + * @return $this + */ + public function setNamePattern($var) + { + GPBUtil::checkString($var, True); + $this->name_pattern = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Attestor.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Attestor.php new file mode 100644 index 000000000000..823512f34ddc --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Attestor.php @@ -0,0 +1,200 @@ +google.cloud.binaryauthorization.v1.Attestor + */ +class Attestor extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name, in the format: + * `projects/*/attestors/*`. This field may not be updated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. A descriptive comment. This field may be updated. + * The field may be displayed in chooser dialogs. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Time when the attestor was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + protected $attestor_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name, in the format: + * `projects/*/attestors/*`. This field may not be updated. + * @type string $description + * Optional. A descriptive comment. This field may be updated. + * The field may be displayed in chooser dialogs. + * @type \Google\Cloud\BinaryAuthorization\V1\UserOwnedGrafeasNote $user_owned_grafeas_note + * This specifies how an attestation will be read, and how it will be used + * during policy enforcement. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time when the attestor was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name, in the format: + * `projects/*/attestors/*`. This field may not be updated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name, in the format: + * `projects/*/attestors/*`. This field may not be updated. + * + * 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. A descriptive comment. This field may be updated. + * The field may be displayed in chooser dialogs. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A descriptive comment. This field may be updated. + * The field may be displayed in chooser dialogs. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * This specifies how an attestation will be read, and how it will be used + * during policy enforcement. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * @return \Google\Cloud\BinaryAuthorization\V1\UserOwnedGrafeasNote|null + */ + public function getUserOwnedGrafeasNote() + { + return $this->readOneof(3); + } + + public function hasUserOwnedGrafeasNote() + { + return $this->hasOneof(3); + } + + /** + * This specifies how an attestation will be read, and how it will be used + * during policy enforcement. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * @param \Google\Cloud\BinaryAuthorization\V1\UserOwnedGrafeasNote $var + * @return $this + */ + public function setUserOwnedGrafeasNote($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\UserOwnedGrafeasNote::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Output only. Time when the attestor 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. Time when the attestor 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; + } + + /** + * @return string + */ + public function getAttestorType() + { + return $this->whichOneof("attestor_type"); + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AttestorPublicKey.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AttestorPublicKey.php new file mode 100644 index 000000000000..e667ea8a3f9c --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AttestorPublicKey.php @@ -0,0 +1,234 @@ +google.cloud.binaryauthorization.v1.AttestorPublicKey + */ +class AttestorPublicKey extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A descriptive comment. This field may be updated. + * + * Generated from protobuf field string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $comment = ''; + /** + * The ID of this public key. + * Signatures verified by BinAuthz must include the ID of the public key that + * can be used to verify them, and that ID must match the contents of this + * field exactly. + * Additional restrictions on this field can be imposed based on which public + * key type is encapsulated. See the documentation on `public_key` cases below + * for details. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + protected $public_key; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $comment + * Optional. A descriptive comment. This field may be updated. + * @type string $id + * The ID of this public key. + * Signatures verified by BinAuthz must include the ID of the public key that + * can be used to verify them, and that ID must match the contents of this + * field exactly. + * Additional restrictions on this field can be imposed based on which public + * key type is encapsulated. See the documentation on `public_key` cases below + * for details. + * @type string $ascii_armored_pgp_public_key + * ASCII-armored representation of a PGP public key, as the entire output by + * the command `gpg --export --armor foo@example.com` (either LF or CRLF + * line endings). + * When using this field, `id` should be left blank. The BinAuthz API + * handlers will calculate the ID and fill it in automatically. BinAuthz + * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as + * upper-case hex. If `id` is provided by the caller, it will be + * overwritten by the API-calculated ID. + * @type \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey $pkix_public_key + * A raw PKIX SubjectPublicKeyInfo format public key. + * NOTE: `id` may be explicitly provided by the caller when using this + * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left + * blank, a default one will be computed based on the digest of the DER + * encoding of the public key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A descriptive comment. This field may be updated. + * + * Generated from protobuf field string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getComment() + { + return $this->comment; + } + + /** + * Optional. A descriptive comment. This field may be updated. + * + * Generated from protobuf field string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkString($var, True); + $this->comment = $var; + + return $this; + } + + /** + * The ID of this public key. + * Signatures verified by BinAuthz must include the ID of the public key that + * can be used to verify them, and that ID must match the contents of this + * field exactly. + * Additional restrictions on this field can be imposed based on which public + * key type is encapsulated. See the documentation on `public_key` cases below + * for details. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of this public key. + * Signatures verified by BinAuthz must include the ID of the public key that + * can be used to verify them, and that ID must match the contents of this + * field exactly. + * Additional restrictions on this field can be imposed based on which public + * key type is encapsulated. See the documentation on `public_key` cases below + * for details. + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * ASCII-armored representation of a PGP public key, as the entire output by + * the command `gpg --export --armor foo@example.com` (either LF or CRLF + * line endings). + * When using this field, `id` should be left blank. The BinAuthz API + * handlers will calculate the ID and fill it in automatically. BinAuthz + * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as + * upper-case hex. If `id` is provided by the caller, it will be + * overwritten by the API-calculated ID. + * + * Generated from protobuf field string ascii_armored_pgp_public_key = 3; + * @return string + */ + public function getAsciiArmoredPgpPublicKey() + { + return $this->readOneof(3); + } + + public function hasAsciiArmoredPgpPublicKey() + { + return $this->hasOneof(3); + } + + /** + * ASCII-armored representation of a PGP public key, as the entire output by + * the command `gpg --export --armor foo@example.com` (either LF or CRLF + * line endings). + * When using this field, `id` should be left blank. The BinAuthz API + * handlers will calculate the ID and fill it in automatically. BinAuthz + * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as + * upper-case hex. If `id` is provided by the caller, it will be + * overwritten by the API-calculated ID. + * + * Generated from protobuf field string ascii_armored_pgp_public_key = 3; + * @param string $var + * @return $this + */ + public function setAsciiArmoredPgpPublicKey($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A raw PKIX SubjectPublicKeyInfo format public key. + * NOTE: `id` may be explicitly provided by the caller when using this + * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left + * blank, a default one will be computed based on the digest of the DER + * encoding of the public key. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + * @return \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey|null + */ + public function getPkixPublicKey() + { + return $this->readOneof(5); + } + + public function hasPkixPublicKey() + { + return $this->hasOneof(5); + } + + /** + * A raw PKIX SubjectPublicKeyInfo format public key. + * NOTE: `id` may be explicitly provided by the caller when using this + * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left + * blank, a default one will be computed based on the digest of the DER + * encoding of the public key. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + * @param \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey $var + * @return $this + */ + public function setPkixPublicKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getPublicKey() + { + return $this->whichOneof("public_key"); + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/CreateAttestorRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/CreateAttestorRequest.php new file mode 100644 index 000000000000..60d6da8c9ebf --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/CreateAttestorRequest.php @@ -0,0 +1,173 @@ +google.cloud.binaryauthorization.v1.CreateAttestorRequest + */ +class CreateAttestorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. + * + * Generated from protobuf field string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attestor_id = ''; + /** + * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, + * in the format `projects/*/attestors/*`. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attestor = null; + + /** + * @param string $parent Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. Please see + * {@see BinauthzManagementServiceV1Client::projectName()} for help formatting this field. + * @param string $attestorId Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. + * @param \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, + * in the format `projects/*/attestors/*`. + * + * @return \Google\Cloud\BinaryAuthorization\V1\CreateAttestorRequest + * + * @experimental + */ + public static function build(string $parent, string $attestorId, \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor): self + { + return (new self()) + ->setParent($parent) + ->setAttestorId($attestorId) + ->setAttestor($attestor); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. + * @type string $attestor_id + * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. + * @type \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor + * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, + * in the format `projects/*/attestors/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. + * + * Generated from protobuf field string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAttestorId() + { + return $this->attestor_id; + } + + /** + * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. + * + * Generated from protobuf field string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAttestorId($var) + { + GPBUtil::checkString($var, True); + $this->attestor_id = $var; + + return $this; + } + + /** + * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, + * in the format `projects/*/attestors/*`. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BinaryAuthorization\V1\Attestor|null + */ + public function getAttestor() + { + return $this->attestor; + } + + public function hasAttestor() + { + return isset($this->attestor); + } + + public function clearAttestor() + { + unset($this->attestor); + } + + /** + * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, + * in the format `projects/*/attestors/*`. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BinaryAuthorization\V1\Attestor $var + * @return $this + */ + public function setAttestor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\Attestor::class); + $this->attestor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/DeleteAttestorRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/DeleteAttestorRequest.php new file mode 100644 index 000000000000..b0df352faa1d --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/DeleteAttestorRequest.php @@ -0,0 +1,86 @@ +google.cloud.binaryauthorization.v1.DeleteAttestorRequest + */ +class DeleteAttestorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format + * `projects/*/attestors/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format + * `projects/*/attestors/*`. Please see + * {@see BinauthzManagementServiceV1Client::attestorName()} for help formatting this field. + * + * @return \Google\Cloud\BinaryAuthorization\V1\DeleteAttestorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format + * `projects/*/attestors/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format + * `projects/*/attestors/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format + * `projects/*/attestors/*`. + * + * 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/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetAttestorRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetAttestorRequest.php new file mode 100644 index 000000000000..1eca782c6323 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetAttestorRequest.php @@ -0,0 +1,86 @@ +google.cloud.binaryauthorization.v1.GetAttestorRequest + */ +class GetAttestorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format + * `projects/*/attestors/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format + * `projects/*/attestors/*`. Please see + * {@see BinauthzManagementServiceV1Client::attestorName()} for help formatting this field. + * + * @return \Google\Cloud\BinaryAuthorization\V1\GetAttestorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format + * `projects/*/attestors/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format + * `projects/*/attestors/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format + * `projects/*/attestors/*`. + * + * 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/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetPolicyRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetPolicyRequest.php new file mode 100644 index 000000000000..be8fcb28d126 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.binaryauthorization.v1.GetPolicyRequest + */ +class GetPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, + * in the format `projects/*/policy`. + * + * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, + * in the format `projects/*/policy`. Please see + * {@see BinauthzManagementServiceV1Client::policyName()} for help formatting this field. + * + * @return \Google\Cloud\BinaryAuthorization\V1\GetPolicyRequest + * + * @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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, + * in the format `projects/*/policy`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, + * in the format `projects/*/policy`. + * + * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, + * in the format `projects/*/policy`. + * + * 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/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetSystemPolicyRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetSystemPolicyRequest.php new file mode 100644 index 000000000000..6a2924097b64 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetSystemPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.binaryauthorization.v1.GetSystemPolicyRequest + */ +class GetSystemPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name, in the format `locations/*/policy`. + * Note that the system policy is not associated with a project. + * + * 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, in the format `locations/*/policy`. + * Note that the system policy is not associated with a project. Please see + * {@see SystemPolicyV1Client::policyName()} for help formatting this field. + * + * @return \Google\Cloud\BinaryAuthorization\V1\GetSystemPolicyRequest + * + * @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, in the format `locations/*/policy`. + * Note that the system policy is not associated with a project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name, in the format `locations/*/policy`. + * Note that the system policy is not associated with a project. + * + * 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, in the format `locations/*/policy`. + * Note that the system policy is not associated with a project. + * + * 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/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsRequest.php new file mode 100644 index 000000000000..0ec66e3b59bb --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsRequest.php @@ -0,0 +1,166 @@ +google.cloud.binaryauthorization.v1.ListAttestorsRequest + */ +class ListAttestorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the project associated with the + * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server may return fewer results than requested. If + * unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. Typically, + * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned + * from the previous call to the `ListAttestors` method. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the project associated with the + * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. Please see + * {@see BinauthzManagementServiceV1Client::projectName()} for help formatting this field. + * + * @return \Google\Cloud\BinaryAuthorization\V1\ListAttestorsRequest + * + * @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 project associated with the + * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. + * @type int $page_size + * Requested page size. The server may return fewer results than requested. If + * unspecified, the server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. Typically, + * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned + * from the previous call to the `ListAttestors` method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the project associated with the + * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. + * + * 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 project associated with the + * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. + * + * 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; + } + + /** + * Requested page size. The server may return fewer results than requested. If + * unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server may return fewer results than requested. If + * unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. Typically, + * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned + * from the previous call to the `ListAttestors` method. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. Typically, + * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned + * from the previous call to the `ListAttestors` method. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsResponse.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsResponse.php new file mode 100644 index 000000000000..190c546198a4 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsResponse.php @@ -0,0 +1,109 @@ +google.cloud.binaryauthorization.v1.ListAttestorsResponse + */ +class ListAttestorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + private $attestors; + /** + * A token to retrieve the next page of results. Pass this value in the + * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the + * `ListAttestors` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BinaryAuthorization\V1\Attestor>|\Google\Protobuf\Internal\RepeatedField $attestors + * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. + * @type string $next_page_token + * A token to retrieve the next page of results. Pass this value in the + * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the + * `ListAttestors` method to retrieve the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttestors() + { + return $this->attestors; + } + + /** + * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + * @param array<\Google\Cloud\BinaryAuthorization\V1\Attestor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttestors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\Attestor::class); + $this->attestors = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Pass this value in the + * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the + * `ListAttestors` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Pass this value in the + * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the + * `ListAttestors` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey.php new file mode 100644 index 000000000000..47ab5f4c9428 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey.php @@ -0,0 +1,124 @@ +google.cloud.binaryauthorization.v1.PkixPublicKey + */ +class PkixPublicKey extends \Google\Protobuf\Internal\Message +{ + /** + * A PEM-encoded public key, as described in + * https://tools.ietf.org/html/rfc7468#section-13 + * + * Generated from protobuf field string public_key_pem = 1; + */ + protected $public_key_pem = ''; + /** + * The signature algorithm used to verify a message against a signature using + * this key. + * These signature algorithm must match the structure and any object + * identifiers encoded in `public_key_pem` (i.e. this algorithm must match + * that of the public key). + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + */ + protected $signature_algorithm = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $public_key_pem + * A PEM-encoded public key, as described in + * https://tools.ietf.org/html/rfc7468#section-13 + * @type int $signature_algorithm + * The signature algorithm used to verify a message against a signature using + * this key. + * These signature algorithm must match the structure and any object + * identifiers encoded in `public_key_pem` (i.e. this algorithm must match + * that of the public key). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A PEM-encoded public key, as described in + * https://tools.ietf.org/html/rfc7468#section-13 + * + * Generated from protobuf field string public_key_pem = 1; + * @return string + */ + public function getPublicKeyPem() + { + return $this->public_key_pem; + } + + /** + * A PEM-encoded public key, as described in + * https://tools.ietf.org/html/rfc7468#section-13 + * + * Generated from protobuf field string public_key_pem = 1; + * @param string $var + * @return $this + */ + public function setPublicKeyPem($var) + { + GPBUtil::checkString($var, True); + $this->public_key_pem = $var; + + return $this; + } + + /** + * The signature algorithm used to verify a message against a signature using + * this key. + * These signature algorithm must match the structure and any object + * identifiers encoded in `public_key_pem` (i.e. this algorithm must match + * that of the public key). + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * @return int + */ + public function getSignatureAlgorithm() + { + return $this->signature_algorithm; + } + + /** + * The signature algorithm used to verify a message against a signature using + * this key. + * These signature algorithm must match the structure and any object + * identifiers encoded in `public_key_pem` (i.e. this algorithm must match + * that of the public key). + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * @param int $var + * @return $this + */ + public function setSignatureAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey\SignatureAlgorithm::class); + $this->signature_algorithm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey/SignatureAlgorithm.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey/SignatureAlgorithm.php new file mode 100644 index 000000000000..9e645d939452 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey/SignatureAlgorithm.php @@ -0,0 +1,153 @@ +google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm + */ +class SignatureAlgorithm +{ + /** + * Not specified. + * + * Generated from protobuf enum SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + */ + const SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + /** + * RSASSA-PSS 2048 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_PSS_2048_SHA256 = 1; + */ + const RSA_PSS_2048_SHA256 = 1; + /** + * RSASSA-PSS 3072 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_PSS_3072_SHA256 = 2; + */ + const RSA_PSS_3072_SHA256 = 2; + /** + * RSASSA-PSS 4096 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_PSS_4096_SHA256 = 3; + */ + const RSA_PSS_4096_SHA256 = 3; + /** + * RSASSA-PSS 4096 bit key with a SHA512 digest. + * + * Generated from protobuf enum RSA_PSS_4096_SHA512 = 4; + */ + const RSA_PSS_4096_SHA512 = 4; + /** + * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_2048_SHA256 = 5; + */ + const RSA_SIGN_PKCS1_2048_SHA256 = 5; + /** + * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_3072_SHA256 = 6; + */ + const RSA_SIGN_PKCS1_3072_SHA256 = 6; + /** + * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA256 = 7; + */ + const RSA_SIGN_PKCS1_4096_SHA256 = 7; + /** + * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA512 = 8; + */ + const RSA_SIGN_PKCS1_4096_SHA512 = 8; + /** + * ECDSA on the NIST P-256 curve with a SHA256 digest. + * + * Generated from protobuf enum ECDSA_P256_SHA256 = 9; + */ + const ECDSA_P256_SHA256 = 9; + /** + * ECDSA on the NIST P-256 curve with a SHA256 digest. + * + * Generated from protobuf enum EC_SIGN_P256_SHA256 = 9; + */ + const EC_SIGN_P256_SHA256 = 9; + /** + * ECDSA on the NIST P-384 curve with a SHA384 digest. + * + * Generated from protobuf enum ECDSA_P384_SHA384 = 10; + */ + const ECDSA_P384_SHA384 = 10; + /** + * ECDSA on the NIST P-384 curve with a SHA384 digest. + * + * Generated from protobuf enum EC_SIGN_P384_SHA384 = 10; + */ + const EC_SIGN_P384_SHA384 = 10; + /** + * ECDSA on the NIST P-521 curve with a SHA512 digest. + * + * Generated from protobuf enum ECDSA_P521_SHA512 = 11; + */ + const ECDSA_P521_SHA512 = 11; + /** + * ECDSA on the NIST P-521 curve with a SHA512 digest. + * + * Generated from protobuf enum EC_SIGN_P521_SHA512 = 11; + */ + const EC_SIGN_P521_SHA512 = 11; + + private static $valueToName = [ + self::SIGNATURE_ALGORITHM_UNSPECIFIED => 'SIGNATURE_ALGORITHM_UNSPECIFIED', + self::RSA_PSS_2048_SHA256 => 'RSA_PSS_2048_SHA256', + self::RSA_PSS_3072_SHA256 => 'RSA_PSS_3072_SHA256', + self::RSA_PSS_4096_SHA256 => 'RSA_PSS_4096_SHA256', + self::RSA_PSS_4096_SHA512 => 'RSA_PSS_4096_SHA512', + self::RSA_SIGN_PKCS1_2048_SHA256 => 'RSA_SIGN_PKCS1_2048_SHA256', + self::RSA_SIGN_PKCS1_3072_SHA256 => 'RSA_SIGN_PKCS1_3072_SHA256', + self::RSA_SIGN_PKCS1_4096_SHA256 => 'RSA_SIGN_PKCS1_4096_SHA256', + self::RSA_SIGN_PKCS1_4096_SHA512 => 'RSA_SIGN_PKCS1_4096_SHA512', + self::ECDSA_P256_SHA256 => 'ECDSA_P256_SHA256', + self::EC_SIGN_P256_SHA256 => 'EC_SIGN_P256_SHA256', + self::ECDSA_P384_SHA384 => 'ECDSA_P384_SHA384', + self::EC_SIGN_P384_SHA384 => 'EC_SIGN_P384_SHA384', + self::ECDSA_P521_SHA512 => 'ECDSA_P521_SHA512', + self::EC_SIGN_P521_SHA512 => 'EC_SIGN_P521_SHA512', + ]; + + 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(SignatureAlgorithm::class, \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey_SignatureAlgorithm::class); + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy.php new file mode 100644 index 000000000000..c7d740cd0928 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy.php @@ -0,0 +1,469 @@ +google.cloud.binaryauthorization.v1.Policy + */ +class Policy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name, in the format `projects/*/policy`. There is + * at most one policy per project. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. A descriptive comment. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Controls the evaluation of a Google-maintained global admission + * policy for common system-level images. Images not covered by the global + * policy will be subject to the project admission policy. This setting + * has no effect when specified inside a global admission policy. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $global_policy_evaluation_mode = 0; + /** + * Optional. Admission policy allowlisting. A matching admission request will + * always be permitted. This feature is typically used to exclude Google or + * third-party infrastructure images from Binary Authorization policies. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $admission_whitelist_patterns; + /** + * Optional. Per-cluster admission rules. Cluster spec format: + * `location.clusterId`. There can be at most one admission rule per cluster + * spec. + * A `location` is either a compute zone (e.g. us-central1-a) or a region + * (e.g. us-central1). + * For `clusterId` syntax restrictions see + * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. + * + * Generated from protobuf field map cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $cluster_admission_rules; + /** + * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + * [a-z.-]+, e.g. 'some-namespace' + * + * Generated from protobuf field map kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $kubernetes_namespace_admission_rules; + /** + * Optional. Per-kubernetes-service-account admission rules. Service account + * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' + * + * Generated from protobuf field map kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $kubernetes_service_account_admission_rules; + /** + * Optional. Per-istio-service-identity admission rules. Istio service + * identity spec format: + * spiffe:///ns//sa/ or + * /ns//sa/ + * e.g. spiffe://example.com/ns/test-ns/sa/default + * + * Generated from protobuf field map istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $istio_service_identity_admission_rules; + /** + * Required. Default admission rule for a cluster without a per-cluster, per- + * kubernetes-service-account, or per-istio-service-identity admission rule. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $default_admission_rule = null; + /** + * Output only. Time when the policy was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name, in the format `projects/*/policy`. There is + * at most one policy per project. + * @type string $description + * Optional. A descriptive comment. + * @type int $global_policy_evaluation_mode + * Optional. Controls the evaluation of a Google-maintained global admission + * policy for common system-level images. Images not covered by the global + * policy will be subject to the project admission policy. This setting + * has no effect when specified inside a global admission policy. + * @type array<\Google\Cloud\BinaryAuthorization\V1\AdmissionWhitelistPattern>|\Google\Protobuf\Internal\RepeatedField $admission_whitelist_patterns + * Optional. Admission policy allowlisting. A matching admission request will + * always be permitted. This feature is typically used to exclude Google or + * third-party infrastructure images from Binary Authorization policies. + * @type array|\Google\Protobuf\Internal\MapField $cluster_admission_rules + * Optional. Per-cluster admission rules. Cluster spec format: + * `location.clusterId`. There can be at most one admission rule per cluster + * spec. + * A `location` is either a compute zone (e.g. us-central1-a) or a region + * (e.g. us-central1). + * For `clusterId` syntax restrictions see + * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. + * @type array|\Google\Protobuf\Internal\MapField $kubernetes_namespace_admission_rules + * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + * [a-z.-]+, e.g. 'some-namespace' + * @type array|\Google\Protobuf\Internal\MapField $kubernetes_service_account_admission_rules + * Optional. Per-kubernetes-service-account admission rules. Service account + * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' + * @type array|\Google\Protobuf\Internal\MapField $istio_service_identity_admission_rules + * Optional. Per-istio-service-identity admission rules. Istio service + * identity spec format: + * spiffe:///ns//sa/ or + * /ns//sa/ + * e.g. spiffe://example.com/ns/test-ns/sa/default + * @type \Google\Cloud\BinaryAuthorization\V1\AdmissionRule $default_admission_rule + * Required. Default admission rule for a cluster without a per-cluster, per- + * kubernetes-service-account, or per-istio-service-identity admission rule. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time when the policy was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name, in the format `projects/*/policy`. There is + * at most one policy per project. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name, in the format `projects/*/policy`. There is + * at most one policy per project. + * + * 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; + } + + /** + * Optional. A descriptive comment. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A descriptive comment. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Controls the evaluation of a Google-maintained global admission + * policy for common system-level images. Images not covered by the global + * policy will be subject to the project admission policy. This setting + * has no effect when specified inside a global admission policy. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getGlobalPolicyEvaluationMode() + { + return $this->global_policy_evaluation_mode; + } + + /** + * Optional. Controls the evaluation of a Google-maintained global admission + * policy for common system-level images. Images not covered by the global + * policy will be subject to the project admission policy. This setting + * has no effect when specified inside a global admission policy. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setGlobalPolicyEvaluationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\Policy\GlobalPolicyEvaluationMode::class); + $this->global_policy_evaluation_mode = $var; + + return $this; + } + + /** + * Optional. Admission policy allowlisting. A matching admission request will + * always be permitted. This feature is typically used to exclude Google or + * third-party infrastructure images from Binary Authorization policies. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdmissionWhitelistPatterns() + { + return $this->admission_whitelist_patterns; + } + + /** + * Optional. Admission policy allowlisting. A matching admission request will + * always be permitted. This feature is typically used to exclude Google or + * third-party infrastructure images from Binary Authorization policies. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\BinaryAuthorization\V1\AdmissionWhitelistPattern>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdmissionWhitelistPatterns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionWhitelistPattern::class); + $this->admission_whitelist_patterns = $arr; + + return $this; + } + + /** + * Optional. Per-cluster admission rules. Cluster spec format: + * `location.clusterId`. There can be at most one admission rule per cluster + * spec. + * A `location` is either a compute zone (e.g. us-central1-a) or a region + * (e.g. us-central1). + * For `clusterId` syntax restrictions see + * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. + * + * Generated from protobuf field map cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getClusterAdmissionRules() + { + return $this->cluster_admission_rules; + } + + /** + * Optional. Per-cluster admission rules. Cluster spec format: + * `location.clusterId`. There can be at most one admission rule per cluster + * spec. + * A `location` is either a compute zone (e.g. us-central1-a) or a region + * (e.g. us-central1). + * For `clusterId` syntax restrictions see + * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. + * + * Generated from protobuf field map cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setClusterAdmissionRules($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); + $this->cluster_admission_rules = $arr; + + return $this; + } + + /** + * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + * [a-z.-]+, e.g. 'some-namespace' + * + * Generated from protobuf field map kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getKubernetesNamespaceAdmissionRules() + { + return $this->kubernetes_namespace_admission_rules; + } + + /** + * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + * [a-z.-]+, e.g. 'some-namespace' + * + * Generated from protobuf field map kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setKubernetesNamespaceAdmissionRules($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); + $this->kubernetes_namespace_admission_rules = $arr; + + return $this; + } + + /** + * Optional. Per-kubernetes-service-account admission rules. Service account + * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' + * + * Generated from protobuf field map kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getKubernetesServiceAccountAdmissionRules() + { + return $this->kubernetes_service_account_admission_rules; + } + + /** + * Optional. Per-kubernetes-service-account admission rules. Service account + * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' + * + * Generated from protobuf field map kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setKubernetesServiceAccountAdmissionRules($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); + $this->kubernetes_service_account_admission_rules = $arr; + + return $this; + } + + /** + * Optional. Per-istio-service-identity admission rules. Istio service + * identity spec format: + * spiffe:///ns//sa/ or + * /ns//sa/ + * e.g. spiffe://example.com/ns/test-ns/sa/default + * + * Generated from protobuf field map istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getIstioServiceIdentityAdmissionRules() + { + return $this->istio_service_identity_admission_rules; + } + + /** + * Optional. Per-istio-service-identity admission rules. Istio service + * identity spec format: + * spiffe:///ns//sa/ or + * /ns//sa/ + * e.g. spiffe://example.com/ns/test-ns/sa/default + * + * Generated from protobuf field map istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setIstioServiceIdentityAdmissionRules($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); + $this->istio_service_identity_admission_rules = $arr; + + return $this; + } + + /** + * Required. Default admission rule for a cluster without a per-cluster, per- + * kubernetes-service-account, or per-istio-service-identity admission rule. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BinaryAuthorization\V1\AdmissionRule|null + */ + public function getDefaultAdmissionRule() + { + return $this->default_admission_rule; + } + + public function hasDefaultAdmissionRule() + { + return isset($this->default_admission_rule); + } + + public function clearDefaultAdmissionRule() + { + unset($this->default_admission_rule); + } + + /** + * Required. Default admission rule for a cluster without a per-cluster, per- + * kubernetes-service-account, or per-istio-service-identity admission rule. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BinaryAuthorization\V1\AdmissionRule $var + * @return $this + */ + public function setDefaultAdmissionRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); + $this->default_admission_rule = $var; + + return $this; + } + + /** + * Output only. Time when the policy 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. Time when the policy 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; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy/GlobalPolicyEvaluationMode.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy/GlobalPolicyEvaluationMode.php new file mode 100644 index 000000000000..5239abed7073 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy/GlobalPolicyEvaluationMode.php @@ -0,0 +1,62 @@ +google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode + */ +class GlobalPolicyEvaluationMode +{ + /** + * Not specified: DISABLE is assumed. + * + * Generated from protobuf enum GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; + */ + const GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; + /** + * Enables system policy evaluation. + * + * Generated from protobuf enum ENABLE = 1; + */ + const ENABLE = 1; + /** + * Disables system policy evaluation. + * + * Generated from protobuf enum DISABLE = 2; + */ + const DISABLE = 2; + + private static $valueToName = [ + self::GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED => 'GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED', + self::ENABLE => 'ENABLE', + self::DISABLE => 'DISABLE', + ]; + + 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(GlobalPolicyEvaluationMode::class, \Google\Cloud\BinaryAuthorization\V1\Policy_GlobalPolicyEvaluationMode::class); + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdateAttestorRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdateAttestorRequest.php new file mode 100644 index 000000000000..370dfb0587a8 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdateAttestorRequest.php @@ -0,0 +1,100 @@ +google.cloud.binaryauthorization.v1.UpdateAttestorRequest + */ +class UpdateAttestorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name + * in the request URL, in the format `projects/*/attestors/*`. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attestor = null; + + /** + * @param \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name + * in the request URL, in the format `projects/*/attestors/*`. + * + * @return \Google\Cloud\BinaryAuthorization\V1\UpdateAttestorRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BinaryAuthorization\V1\Attestor $attestor): self + { + return (new self()) + ->setAttestor($attestor); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor + * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name + * in the request URL, in the format `projects/*/attestors/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name + * in the request URL, in the format `projects/*/attestors/*`. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BinaryAuthorization\V1\Attestor|null + */ + public function getAttestor() + { + return $this->attestor; + } + + public function hasAttestor() + { + return isset($this->attestor); + } + + public function clearAttestor() + { + unset($this->attestor); + } + + /** + * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name + * in the request URL, in the format `projects/*/attestors/*`. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BinaryAuthorization\V1\Attestor $var + * @return $this + */ + public function setAttestor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\Attestor::class); + $this->attestor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdatePolicyRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdatePolicyRequest.php new file mode 100644 index 000000000000..839ecddda32e --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdatePolicyRequest.php @@ -0,0 +1,100 @@ +google.cloud.binaryauthorization.v1.UpdatePolicyRequest + */ +class UpdatePolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will + * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in + * the request URL, in the format `projects/*/policy`. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $policy = null; + + /** + * @param \Google\Cloud\BinaryAuthorization\V1\Policy $policy Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will + * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in + * the request URL, in the format `projects/*/policy`. + * + * @return \Google\Cloud\BinaryAuthorization\V1\UpdatePolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\BinaryAuthorization\V1\Policy $policy): self + { + return (new self()) + ->setPolicy($policy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BinaryAuthorization\V1\Policy $policy + * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will + * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in + * the request URL, in the format `projects/*/policy`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will + * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in + * the request URL, in the format `projects/*/policy`. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BinaryAuthorization\V1\Policy|null + */ + public function getPolicy() + { + return $this->policy; + } + + public function hasPolicy() + { + return isset($this->policy); + } + + public function clearPolicy() + { + unset($this->policy); + } + + /** + * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will + * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in + * the request URL, in the format `projects/*/policy`. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BinaryAuthorization\V1\Policy $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\Policy::class); + $this->policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UserOwnedGrafeasNote.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UserOwnedGrafeasNote.php new file mode 100644 index 000000000000..13b690e61359 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UserOwnedGrafeasNote.php @@ -0,0 +1,208 @@ +google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote + */ +class UserOwnedGrafeasNote extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Grafeas resource name of a Attestation.Authority Note, + * created by the user, in the format: `projects/*/notes/*`. This field may + * not be updated. + * An attestation by this attestor is stored as a Grafeas + * Attestation.Authority Occurrence that names a container image and that + * links to this Note. Grafeas is an external dependency. + * + * Generated from protobuf field string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $note_reference = ''; + /** + * Optional. Public keys that verify attestations signed by this + * attestor. This field may be updated. + * If this field is non-empty, one of the specified public keys must + * verify that an attestation was signed by this attestor for the + * image specified in the admission request. + * If this field is empty, this attestor always returns that no + * valid attestations exist. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $public_keys; + /** + * Output only. This field will contain the service account email address + * that this Attestor will use as the principal when querying Container + * Analysis. Attestor administrators must grant this service account the + * IAM role needed to read attestations from the [note_reference][Note] in + * Container Analysis (`containeranalysis.notes.occurrences.viewer`). + * This email address is fixed for the lifetime of the Attestor, but callers + * should not make any other assumptions about the service account email; + * future versions may use an email based on a different naming pattern. + * + * Generated from protobuf field string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delegation_service_account_email = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $note_reference + * Required. The Grafeas resource name of a Attestation.Authority Note, + * created by the user, in the format: `projects/*/notes/*`. This field may + * not be updated. + * An attestation by this attestor is stored as a Grafeas + * Attestation.Authority Occurrence that names a container image and that + * links to this Note. Grafeas is an external dependency. + * @type array<\Google\Cloud\BinaryAuthorization\V1\AttestorPublicKey>|\Google\Protobuf\Internal\RepeatedField $public_keys + * Optional. Public keys that verify attestations signed by this + * attestor. This field may be updated. + * If this field is non-empty, one of the specified public keys must + * verify that an attestation was signed by this attestor for the + * image specified in the admission request. + * If this field is empty, this attestor always returns that no + * valid attestations exist. + * @type string $delegation_service_account_email + * Output only. This field will contain the service account email address + * that this Attestor will use as the principal when querying Container + * Analysis. Attestor administrators must grant this service account the + * IAM role needed to read attestations from the [note_reference][Note] in + * Container Analysis (`containeranalysis.notes.occurrences.viewer`). + * This email address is fixed for the lifetime of the Attestor, but callers + * should not make any other assumptions about the service account email; + * future versions may use an email based on a different naming pattern. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Grafeas resource name of a Attestation.Authority Note, + * created by the user, in the format: `projects/*/notes/*`. This field may + * not be updated. + * An attestation by this attestor is stored as a Grafeas + * Attestation.Authority Occurrence that names a container image and that + * links to this Note. Grafeas is an external dependency. + * + * Generated from protobuf field string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNoteReference() + { + return $this->note_reference; + } + + /** + * Required. The Grafeas resource name of a Attestation.Authority Note, + * created by the user, in the format: `projects/*/notes/*`. This field may + * not be updated. + * An attestation by this attestor is stored as a Grafeas + * Attestation.Authority Occurrence that names a container image and that + * links to this Note. Grafeas is an external dependency. + * + * Generated from protobuf field string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNoteReference($var) + { + GPBUtil::checkString($var, True); + $this->note_reference = $var; + + return $this; + } + + /** + * Optional. Public keys that verify attestations signed by this + * attestor. This field may be updated. + * If this field is non-empty, one of the specified public keys must + * verify that an attestation was signed by this attestor for the + * image specified in the admission request. + * If this field is empty, this attestor always returns that no + * valid attestations exist. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPublicKeys() + { + return $this->public_keys; + } + + /** + * Optional. Public keys that verify attestations signed by this + * attestor. This field may be updated. + * If this field is non-empty, one of the specified public keys must + * verify that an attestation was signed by this attestor for the + * image specified in the admission request. + * If this field is empty, this attestor always returns that no + * valid attestations exist. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\BinaryAuthorization\V1\AttestorPublicKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPublicKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AttestorPublicKey::class); + $this->public_keys = $arr; + + return $this; + } + + /** + * Output only. This field will contain the service account email address + * that this Attestor will use as the principal when querying Container + * Analysis. Attestor administrators must grant this service account the + * IAM role needed to read attestations from the [note_reference][Note] in + * Container Analysis (`containeranalysis.notes.occurrences.viewer`). + * This email address is fixed for the lifetime of the Attestor, but callers + * should not make any other assumptions about the service account email; + * future versions may use an email based on a different naming pattern. + * + * Generated from protobuf field string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDelegationServiceAccountEmail() + { + return $this->delegation_service_account_email; + } + + /** + * Output only. This field will contain the service account email address + * that this Attestor will use as the principal when querying Container + * Analysis. Attestor administrators must grant this service account the + * IAM role needed to read attestations from the [note_reference][Note] in + * Container Analysis (`containeranalysis.notes.occurrences.viewer`). + * This email address is fixed for the lifetime of the Attestor, but callers + * should not make any other assumptions about the service account email; + * future versions may use an email based on a different naming pattern. + * + * Generated from protobuf field string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDelegationServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->delegation_service_account_email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceRequest.php new file mode 100644 index 000000000000..5f9e80630122 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceRequest.php @@ -0,0 +1,208 @@ +google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest + */ +class ValidateAttestationOccurrenceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the + * [occurrence][grafeas.v1.Occurrence], in the format + * `projects/*/attestors/*`. + * + * Generated from protobuf field string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attestor = ''; + /** + * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to + * be checked that it can be verified by the Attestor. It does not have to be + * an existing entity in Container Analysis. It must otherwise be a valid + * AttestationOccurrence. + * + * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attestation = null; + /** + * Required. The resource name of the [Note][grafeas.v1.Note] to which the + * containing [Occurrence][grafeas.v1.Occurrence] is associated. + * + * Generated from protobuf field string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $occurrence_note = ''; + /** + * Required. The URI of the artifact (e.g. container image) that is the + * subject of the containing [Occurrence][grafeas.v1.Occurrence]. + * + * Generated from protobuf field string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $occurrence_resource_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $attestor + * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the + * [occurrence][grafeas.v1.Occurrence], in the format + * `projects/*/attestors/*`. + * @type \Grafeas\V1\AttestationOccurrence $attestation + * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to + * be checked that it can be verified by the Attestor. It does not have to be + * an existing entity in Container Analysis. It must otherwise be a valid + * AttestationOccurrence. + * @type string $occurrence_note + * Required. The resource name of the [Note][grafeas.v1.Note] to which the + * containing [Occurrence][grafeas.v1.Occurrence] is associated. + * @type string $occurrence_resource_uri + * Required. The URI of the artifact (e.g. container image) that is the + * subject of the containing [Occurrence][grafeas.v1.Occurrence]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the + * [occurrence][grafeas.v1.Occurrence], in the format + * `projects/*/attestors/*`. + * + * Generated from protobuf field string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAttestor() + { + return $this->attestor; + } + + /** + * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the + * [occurrence][grafeas.v1.Occurrence], in the format + * `projects/*/attestors/*`. + * + * Generated from protobuf field string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAttestor($var) + { + GPBUtil::checkString($var, True); + $this->attestor = $var; + + return $this; + } + + /** + * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to + * be checked that it can be verified by the Attestor. It does not have to be + * an existing entity in Container Analysis. It must otherwise be a valid + * AttestationOccurrence. + * + * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Grafeas\V1\AttestationOccurrence|null + */ + public function getAttestation() + { + return $this->attestation; + } + + public function hasAttestation() + { + return isset($this->attestation); + } + + public function clearAttestation() + { + unset($this->attestation); + } + + /** + * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to + * be checked that it can be verified by the Attestor. It does not have to be + * an existing entity in Container Analysis. It must otherwise be a valid + * AttestationOccurrence. + * + * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Grafeas\V1\AttestationOccurrence $var + * @return $this + */ + public function setAttestation($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\AttestationOccurrence::class); + $this->attestation = $var; + + return $this; + } + + /** + * Required. The resource name of the [Note][grafeas.v1.Note] to which the + * containing [Occurrence][grafeas.v1.Occurrence] is associated. + * + * Generated from protobuf field string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOccurrenceNote() + { + return $this->occurrence_note; + } + + /** + * Required. The resource name of the [Note][grafeas.v1.Note] to which the + * containing [Occurrence][grafeas.v1.Occurrence] is associated. + * + * Generated from protobuf field string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOccurrenceNote($var) + { + GPBUtil::checkString($var, True); + $this->occurrence_note = $var; + + return $this; + } + + /** + * Required. The URI of the artifact (e.g. container image) that is the + * subject of the containing [Occurrence][grafeas.v1.Occurrence]. + * + * Generated from protobuf field string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOccurrenceResourceUri() + { + return $this->occurrence_resource_uri; + } + + /** + * Required. The URI of the artifact (e.g. container image) that is the + * subject of the containing [Occurrence][grafeas.v1.Occurrence]. + * + * Generated from protobuf field string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOccurrenceResourceUri($var) + { + GPBUtil::checkString($var, True); + $this->occurrence_resource_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse.php new file mode 100644 index 000000000000..e2ab9e3c1582 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse.php @@ -0,0 +1,102 @@ +google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse + */ +class ValidateAttestationOccurrenceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result of the Attestation validation. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + */ + protected $result = 0; + /** + * The reason for denial if the Attestation couldn't be validated. + * + * Generated from protobuf field string denial_reason = 2; + */ + protected $denial_reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $result + * The result of the Attestation validation. + * @type string $denial_reason + * The reason for denial if the Attestation couldn't be validated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The result of the Attestation validation. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * @return int + */ + public function getResult() + { + return $this->result; + } + + /** + * The result of the Attestation validation. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * @param int $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\ValidateAttestationOccurrenceResponse\Result::class); + $this->result = $var; + + return $this; + } + + /** + * The reason for denial if the Attestation couldn't be validated. + * + * Generated from protobuf field string denial_reason = 2; + * @return string + */ + public function getDenialReason() + { + return $this->denial_reason; + } + + /** + * The reason for denial if the Attestation couldn't be validated. + * + * Generated from protobuf field string denial_reason = 2; + * @param string $var + * @return $this + */ + public function setDenialReason($var) + { + GPBUtil::checkString($var, True); + $this->denial_reason = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse/Result.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse/Result.php new file mode 100644 index 000000000000..d8e6ba122e86 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse/Result.php @@ -0,0 +1,64 @@ +google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result + */ +class Result +{ + /** + * Unspecified. + * + * Generated from protobuf enum RESULT_UNSPECIFIED = 0; + */ + const RESULT_UNSPECIFIED = 0; + /** + * The Attestation was able to verified by the Attestor. + * + * Generated from protobuf enum VERIFIED = 1; + */ + const VERIFIED = 1; + /** + * The Attestation was not able to verified by the Attestor. + * + * Generated from protobuf enum ATTESTATION_NOT_VERIFIABLE = 2; + */ + const ATTESTATION_NOT_VERIFIABLE = 2; + + private static $valueToName = [ + self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', + self::VERIFIED => 'VERIFIED', + self::ATTESTATION_NOT_VERIFIABLE => 'ATTESTATION_NOT_VERIFIABLE', + ]; + + 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\BinaryAuthorization\V1\ValidateAttestationOccurrenceResponse_Result::class); + diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/create_attestor.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/create_attestor.php new file mode 100644 index 000000000000..66a7920a5f31 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/create_attestor.php @@ -0,0 +1,86 @@ +setName($attestorName); + $request = (new CreateAttestorRequest()) + ->setParent($formattedParent) + ->setAttestorId($attestorId) + ->setAttestor($attestor); + + // Call the API and handle any network failures. + try { + /** @var Attestor $response */ + $response = $binauthzManagementServiceV1Client->createAttestor($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 = BinauthzManagementServiceV1Client::projectName('[PROJECT]'); + $attestorId = '[ATTESTOR_ID]'; + $attestorName = '[NAME]'; + + create_attestor_sample($formattedParent, $attestorId, $attestorName); +} +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php new file mode 100644 index 000000000000..eb7275ea89ed --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $binauthzManagementServiceV1Client->deleteAttestor($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 = BinauthzManagementServiceV1Client::attestorName('[PROJECT]', '[ATTESTOR]'); + + delete_attestor_sample($formattedName); +} +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_attestor.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_attestor.php new file mode 100644 index 000000000000..c3b798e2b3bb --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_attestor.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Attestor $response */ + $response = $binauthzManagementServiceV1Client->getAttestor($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 = BinauthzManagementServiceV1Client::attestorName('[PROJECT]', '[ATTESTOR]'); + + get_attestor_sample($formattedName); +} +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_policy.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_policy.php new file mode 100644 index 000000000000..957eb0eca0e6 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_policy.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $binauthzManagementServiceV1Client->getPolicy($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 = BinauthzManagementServiceV1Client::policyName('[PROJECT]'); + + get_policy_sample($formattedName); +} +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/list_attestors.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/list_attestors.php new file mode 100644 index 000000000000..41e9cf1fa30f --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/list_attestors.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $binauthzManagementServiceV1Client->listAttestors($request); + + /** @var Attestor $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 = BinauthzManagementServiceV1Client::projectName('[PROJECT]'); + + list_attestors_sample($formattedParent); +} +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_attestor.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_attestor.php new file mode 100644 index 000000000000..1bda6e56fabb --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_attestor.php @@ -0,0 +1,74 @@ +setName($attestorName); + $request = (new UpdateAttestorRequest()) + ->setAttestor($attestor); + + // Call the API and handle any network failures. + try { + /** @var Attestor $response */ + $response = $binauthzManagementServiceV1Client->updateAttestor($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 +{ + $attestorName = '[NAME]'; + + update_attestor_sample($attestorName); +} +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_policy.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_policy.php new file mode 100644 index 000000000000..75059607354c --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_policy.php @@ -0,0 +1,89 @@ +setEvaluationMode($policyDefaultAdmissionRuleEvaluationMode) + ->setEnforcementMode($policyDefaultAdmissionRuleEnforcementMode); + $policy = (new Policy()) + ->setDefaultAdmissionRule($policyDefaultAdmissionRule); + $request = (new UpdatePolicyRequest()) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $binauthzManagementServiceV1Client->updatePolicy($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 +{ + $policyDefaultAdmissionRuleEvaluationMode = EvaluationMode::EVALUATION_MODE_UNSPECIFIED; + $policyDefaultAdmissionRuleEnforcementMode = EnforcementMode::ENFORCEMENT_MODE_UNSPECIFIED; + + update_policy_sample( + $policyDefaultAdmissionRuleEvaluationMode, + $policyDefaultAdmissionRuleEnforcementMode + ); +} +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/SystemPolicyV1Client/get_system_policy.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/SystemPolicyV1Client/get_system_policy.php new file mode 100644 index 000000000000..8a4ac91afbe2 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/SystemPolicyV1Client/get_system_policy.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $systemPolicyV1Client->getSystemPolicy($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 = SystemPolicyV1Client::policyName('[PROJECT]'); + + get_system_policy_sample($formattedName); +} +// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php new file mode 100644 index 000000000000..c74c501c35ae --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php @@ -0,0 +1,87 @@ +setAttestor($attestor) + ->setAttestation($attestation) + ->setOccurrenceNote($occurrenceNote) + ->setOccurrenceResourceUri($occurrenceResourceUri); + + // Call the API and handle any network failures. + try { + /** @var ValidateAttestationOccurrenceResponse $response */ + $response = $validationHelperV1Client->validateAttestationOccurrence($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 +{ + $attestor = '[ATTESTOR]'; + $occurrenceNote = '[OCCURRENCE_NOTE]'; + $occurrenceResourceUri = '[OCCURRENCE_RESOURCE_URI]'; + + validate_attestation_occurrence_sample($attestor, $occurrenceNote, $occurrenceResourceUri); +} +// [END binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/BinauthzManagementServiceV1Client.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/BinauthzManagementServiceV1Client.php new file mode 100644 index 000000000000..117607386d7a --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/BinauthzManagementServiceV1Client.php @@ -0,0 +1,499 @@ + createAttestorAsync(CreateAttestorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAttestorAsync(DeleteAttestorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAttestorAsync(GetAttestorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPolicyAsync(GetPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAttestorsAsync(ListAttestorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAttestorAsync(UpdateAttestorRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePolicyAsync(UpdatePolicyRequest $request, array $optionalArgs = []) + */ +final class BinauthzManagementServiceV1Client +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'binaryauthorization.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'binaryauthorization.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/binauthz_management_service_v1_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/binauthz_management_service_v1_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/binauthz_management_service_v1_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/binauthz_management_service_v1_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a attestor + * resource. + * + * @param string $project + * @param string $attestor + * + * @return string The formatted attestor resource. + */ + public static function attestorName(string $project, string $attestor): string + { + return self::getPathTemplate('attestor')->render([ + 'project' => $project, + 'attestor' => $attestor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * location_policy resource. + * + * @param string $location + * + * @return string The formatted location_policy resource. + */ + public static function locationPolicyName(string $location): string + { + return self::getPathTemplate('locationPolicy')->render([ + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a policy + * resource. + * + * @param string $project + * + * @return string The formatted policy resource. + */ + public static function policyName(string $project): string + { + return self::getPathTemplate('policy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_policy resource. + * + * @param string $project + * + * @return string The formatted project_policy resource. + */ + public static function projectPolicyName(string $project): string + { + return self::getPathTemplate('projectPolicy')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - attestor: projects/{project}/attestors/{attestor} + * - locationPolicy: locations/{location}/policy + * - policy: projects/{project}/policy + * - project: projects/{project} + * - projectPolicy: projects/{project}/policy + * + * 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 'binaryauthorization.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new + * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, + * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. + * + * The async variant is + * {@see BinauthzManagementServiceV1Client::createAttestorAsync()} . + * + * @example samples/V1/BinauthzManagementServiceV1Client/create_attestor.php + * + * @param CreateAttestorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Attestor + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAttestor(CreateAttestorRequest $request, array $callOptions = []): Attestor + { + return $this->startApiCall('CreateAttestor', $request, $callOptions)->wait(); + } + + /** + * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + * The async variant is + * {@see BinauthzManagementServiceV1Client::deleteAttestorAsync()} . + * + * @example samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php + * + * @param DeleteAttestorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteAttestor(DeleteAttestorRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAttestor', $request, $callOptions)->wait(); + } + + /** + * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. + * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + * The async variant is + * {@see BinauthzManagementServiceV1Client::getAttestorAsync()} . + * + * @example samples/V1/BinauthzManagementServiceV1Client/get_attestor.php + * + * @param GetAttestorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Attestor + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAttestor(GetAttestorRequest $request, array $callOptions = []): Attestor + { + return $this->startApiCall('GetAttestor', $request, $callOptions)->wait(); + } + + /** + * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to + * a container image, before the project is allowed to deploy that + * image. There is at most one policy per project. All image admission + * requests are permitted if a project has no policy. + * + * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default + * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. + * + * The async variant is {@see BinauthzManagementServiceV1Client::getPolicyAsync()} + * . + * + * @example samples/V1/BinauthzManagementServiceV1Client/get_policy.php + * + * @param GetPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 getPolicy(GetPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetPolicy', $request, $callOptions)->wait(); + } + + /** + * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. + * Returns INVALID_ARGUMENT if the project does not exist. + * + * The async variant is + * {@see BinauthzManagementServiceV1Client::listAttestorsAsync()} . + * + * @example samples/V1/BinauthzManagementServiceV1Client/list_attestors.php + * + * @param ListAttestorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAttestors(ListAttestorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAttestors', $request, $callOptions); + } + + /** + * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. + * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + * The async variant is + * {@see BinauthzManagementServiceV1Client::updateAttestorAsync()} . + * + * @example samples/V1/BinauthzManagementServiceV1Client/update_attestor.php + * + * @param UpdateAttestorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Attestor + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAttestor(UpdateAttestorRequest $request, array $callOptions = []): Attestor + { + return $this->startApiCall('UpdateAttestor', $request, $callOptions)->wait(); + } + + /** + * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the + * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race + * conditions with concurrent policy enforcement (or management!) + * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + * if the request is malformed. + * + * The async variant is + * {@see BinauthzManagementServiceV1Client::updatePolicyAsync()} . + * + * @example samples/V1/BinauthzManagementServiceV1Client/update_policy.php + * + * @param UpdatePolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updatePolicy(UpdatePolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('UpdatePolicy', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/SystemPolicyV1Client.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/SystemPolicyV1Client.php new file mode 100644 index 000000000000..5453a006d220 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/SystemPolicyV1Client.php @@ -0,0 +1,267 @@ + getSystemPolicyAsync(GetSystemPolicyRequest $request, array $optionalArgs = []) + */ +final class SystemPolicyV1Client +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.binaryauthorization.v1.SystemPolicyV1'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'binaryauthorization.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'binaryauthorization.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/system_policy_v1_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/system_policy_v1_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/system_policy_v1_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/system_policy_v1_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * location_policy resource. + * + * @param string $location + * + * @return string The formatted location_policy resource. + */ + public static function locationPolicyName(string $location): string + { + return self::getPathTemplate('locationPolicy')->render([ + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a policy + * resource. + * + * @param string $project + * + * @return string The formatted policy resource. + */ + public static function policyName(string $project): string + { + return self::getPathTemplate('policy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_policy resource. + * + * @param string $project + * + * @return string The formatted project_policy resource. + */ + public static function projectPolicyName(string $project): string + { + return self::getPathTemplate('projectPolicy')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - locationPolicy: locations/{location}/policy + * - policy: projects/{project}/policy + * - projectPolicy: projects/{project}/policy + * + * 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 'binaryauthorization.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); + } + + /** + * Gets the current system policy in the specified location. + * + * The async variant is {@see SystemPolicyV1Client::getSystemPolicyAsync()} . + * + * @example samples/V1/SystemPolicyV1Client/get_system_policy.php + * + * @param GetSystemPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 getSystemPolicy(GetSystemPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetSystemPolicy', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/ValidationHelperV1Client.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/ValidationHelperV1Client.php new file mode 100644 index 000000000000..e6334785f64e --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/ValidationHelperV1Client.php @@ -0,0 +1,191 @@ + validateAttestationOccurrenceAsync(ValidateAttestationOccurrenceRequest $request, array $optionalArgs = []) + */ +final class ValidationHelperV1Client +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.binaryauthorization.v1.ValidationHelperV1'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'binaryauthorization.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'binaryauthorization.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/validation_helper_v1_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/validation_helper_v1_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/validation_helper_v1_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/validation_helper_v1_rest_client_config.php', + ], + ], + ]; + } + + /** + * 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 'binaryauthorization.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); + } + + /** + * Returns whether the given Attestation for the given image URI + * was signed by the given Attestor + * + * The async variant is + * {@see ValidationHelperV1Client::validateAttestationOccurrenceAsync()} . + * + * @example samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php + * + * @param ValidateAttestationOccurrenceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ValidateAttestationOccurrenceResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function validateAttestationOccurrence(ValidateAttestationOccurrenceRequest $request, array $callOptions = []): ValidateAttestationOccurrenceResponse + { + return $this->startApiCall('ValidateAttestationOccurrence', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BinaryAuthorization/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..c9a7e431c389 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/gapic_metadata.json @@ -0,0 +1,81 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.binaryauthorization.v1", + "libraryPackage": "Google\\Cloud\\BinaryAuthorization\\V1", + "services": { + "BinauthzManagementServiceV1": { + "clients": { + "grpc": { + "libraryClient": "BinauthzManagementServiceV1GapicClient", + "rpcs": { + "CreateAttestor": { + "methods": [ + "createAttestor" + ] + }, + "DeleteAttestor": { + "methods": [ + "deleteAttestor" + ] + }, + "GetAttestor": { + "methods": [ + "getAttestor" + ] + }, + "GetPolicy": { + "methods": [ + "getPolicy" + ] + }, + "ListAttestors": { + "methods": [ + "listAttestors" + ] + }, + "UpdateAttestor": { + "methods": [ + "updateAttestor" + ] + }, + "UpdatePolicy": { + "methods": [ + "updatePolicy" + ] + } + } + } + } + }, + "SystemPolicyV1": { + "clients": { + "grpc": { + "libraryClient": "SystemPolicyV1GapicClient", + "rpcs": { + "GetSystemPolicy": { + "methods": [ + "getSystemPolicy" + ] + } + } + } + } + }, + "ValidationHelperV1": { + "clients": { + "grpc": { + "libraryClient": "ValidationHelperV1GapicClient", + "rpcs": { + "ValidateAttestationOccurrence": { + "methods": [ + "validateAttestationOccurrence" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_client_config.json b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_client_config.json new file mode 100644 index 000000000000..3cfeb608e755 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_client_config.json @@ -0,0 +1,80 @@ +{ + "interfaces": { + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateAttestor": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAttestor": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAttestor": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAttestors": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAttestor": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdatePolicy": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_descriptor_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_descriptor_config.php new file mode 100644 index 000000000000..bb1b92f5375b --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_descriptor_config.php @@ -0,0 +1,129 @@ + [ + 'google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1' => [ + 'CreateAttestor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Attestor', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAttestor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAttestor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Attestor', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAttestors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAttestors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\ListAttestorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAttestor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Attestor', + 'headerParams' => [ + [ + 'keyName' => 'attestor.name', + 'fieldAccessors' => [ + 'getAttestor', + 'getName', + ], + ], + ], + ], + 'UpdatePolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'policy.name', + 'fieldAccessors' => [ + 'getPolicy', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'attestor' => 'projects/{project}/attestors/{attestor}', + 'locationPolicy' => 'locations/{location}/policy', + 'policy' => 'projects/{project}/policy', + 'project' => 'projects/{project}', + 'projectPolicy' => 'projects/{project}/policy', + ], + ], + ], +]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_rest_client_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_rest_client_config.php new file mode 100644 index 000000000000..af98c0b1d9be --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_rest_client_config.php @@ -0,0 +1,171 @@ + [ + 'google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1' => [ + 'CreateAttestor' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/attestors', + 'body' => 'attestor', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'attestor_id', + ], + ], + 'DeleteAttestor' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/attestors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAttestor' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/attestors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/policy}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAttestors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/attestors', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAttestor' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/{attestor.name=projects/*/attestors/*}', + 'body' => 'attestor', + 'placeholders' => [ + 'attestor.name' => [ + 'getters' => [ + 'getAttestor', + 'getName', + ], + ], + ], + ], + 'UpdatePolicy' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/{policy.name=projects/*/policy}', + 'body' => 'policy', + 'placeholders' => [ + 'policy.name' => [ + 'getters' => [ + 'getPolicy', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/policy}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/policy}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/policy}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_client_config.json b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_client_config.json new file mode 100644 index 000000000000..d4b5bd72fb30 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_client_config.json @@ -0,0 +1,27 @@ +{ + "interfaces": { + "google.cloud.binaryauthorization.v1.SystemPolicyV1": { + "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": { + "GetSystemPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_descriptor_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_descriptor_config.php new file mode 100644 index 000000000000..793669b40206 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_descriptor_config.php @@ -0,0 +1,45 @@ + [ + 'google.cloud.binaryauthorization.v1.SystemPolicyV1' => [ + 'GetSystemPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'locationPolicy' => 'locations/{location}/policy', + 'policy' => 'projects/{project}/policy', + 'projectPolicy' => 'projects/{project}/policy', + ], + ], + ], +]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_rest_client_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_rest_client_config.php new file mode 100644 index 000000000000..ed9921930ee4 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_rest_client_config.php @@ -0,0 +1,97 @@ + [ + 'google.cloud.binaryauthorization.v1.SystemPolicyV1' => [ + 'GetSystemPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=locations/*/policy}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/policy}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/policy}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/policy}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_client_config.json b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_client_config.json new file mode 100644 index 000000000000..1cb08ec3c89a --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_client_config.json @@ -0,0 +1,27 @@ +{ + "interfaces": { + "google.cloud.binaryauthorization.v1.ValidationHelperV1": { + "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": { + "ValidateAttestationOccurrence": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_descriptor_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_descriptor_config.php new file mode 100644 index 000000000000..48f7cbf0f6f2 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_descriptor_config.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.binaryauthorization.v1.ValidationHelperV1' => [ + 'ValidateAttestationOccurrence' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\ValidateAttestationOccurrenceResponse', + 'headerParams' => [ + [ + 'keyName' => 'attestor', + 'fieldAccessors' => [ + 'getAttestor', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_rest_client_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_rest_client_config.php new file mode 100644 index 000000000000..6505b99035b4 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_rest_client_config.php @@ -0,0 +1,98 @@ + [ + 'google.cloud.binaryauthorization.v1.ValidationHelperV1' => [ + 'ValidateAttestationOccurrence' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence', + 'body' => '*', + 'placeholders' => [ + 'attestor' => [ + 'getters' => [ + 'getAttestor', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/policy}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/policy}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/policy}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/BinauthzManagementServiceV1ClientTest.php b/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/BinauthzManagementServiceV1ClientTest.php new file mode 100644 index 000000000000..c82b57c34aab --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/BinauthzManagementServiceV1ClientTest.php @@ -0,0 +1,610 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BinauthzManagementServiceV1Client */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BinauthzManagementServiceV1Client($options); + } + + /** @test */ + public function createAttestorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Attestor(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $attestorId = 'attestorId-696764206'; + $attestor = new Attestor(); + $attestorName = 'attestorName-125367661'; + $attestor->setName($attestorName); + $request = (new CreateAttestorRequest()) + ->setParent($formattedParent) + ->setAttestorId($attestorId) + ->setAttestor($attestor); + $response = $gapicClient->createAttestor($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.binaryauthorization.v1.BinauthzManagementServiceV1/CreateAttestor', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAttestorId(); + $this->assertProtobufEquals($attestorId, $actualValue); + $actualValue = $actualRequestObject->getAttestor(); + $this->assertProtobufEquals($attestor, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAttestorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->projectName('[PROJECT]'); + $attestorId = 'attestorId-696764206'; + $attestor = new Attestor(); + $attestorName = 'attestorName-125367661'; + $attestor->setName($attestorName); + $request = (new CreateAttestorRequest()) + ->setParent($formattedParent) + ->setAttestorId($attestorId) + ->setAttestor($attestor); + try { + $gapicClient->createAttestor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAttestorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attestorName('[PROJECT]', '[ATTESTOR]'); + $request = (new DeleteAttestorRequest()) + ->setName($formattedName); + $gapicClient->deleteAttestor($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/DeleteAttestor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAttestorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->attestorName('[PROJECT]', '[ATTESTOR]'); + $request = (new DeleteAttestorRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAttestor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttestorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new Attestor(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attestorName('[PROJECT]', '[ATTESTOR]'); + $request = (new GetAttestorRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttestor($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.binaryauthorization.v1.BinauthzManagementServiceV1/GetAttestor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttestorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->attestorName('[PROJECT]', '[ATTESTOR]'); + $request = (new GetAttestorRequest()) + ->setName($formattedName); + try { + $gapicClient->getAttestor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyName('[PROJECT]'); + $request = (new GetPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getPolicy($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.binaryauthorization.v1.BinauthzManagementServiceV1/GetPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->policyName('[PROJECT]'); + $request = (new GetPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttestorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attestorsElement = new Attestor(); + $attestors = [ + $attestorsElement, + ]; + $expectedResponse = new ListAttestorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttestors($attestors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListAttestorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAttestors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttestors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/ListAttestors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttestorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->projectName('[PROJECT]'); + $request = (new ListAttestorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAttestors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAttestorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Attestor(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $attestor = new Attestor(); + $attestorName = 'attestorName-125367661'; + $attestor->setName($attestorName); + $request = (new UpdateAttestorRequest()) + ->setAttestor($attestor); + $response = $gapicClient->updateAttestor($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.binaryauthorization.v1.BinauthzManagementServiceV1/UpdateAttestor', $actualFuncCall); + $actualValue = $actualRequestObject->getAttestor(); + $this->assertProtobufEquals($attestor, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAttestorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $attestor = new Attestor(); + $attestorName = 'attestorName-125367661'; + $attestor->setName($attestorName); + $request = (new UpdateAttestorRequest()) + ->setAttestor($attestor); + try { + $gapicClient->updateAttestor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $policy = new Policy(); + $policyDefaultAdmissionRule = new AdmissionRule(); + $defaultAdmissionRuleEvaluationMode = EvaluationMode::EVALUATION_MODE_UNSPECIFIED; + $policyDefaultAdmissionRule->setEvaluationMode($defaultAdmissionRuleEvaluationMode); + $defaultAdmissionRuleEnforcementMode = EnforcementMode::ENFORCEMENT_MODE_UNSPECIFIED; + $policyDefaultAdmissionRule->setEnforcementMode($defaultAdmissionRuleEnforcementMode); + $policy->setDefaultAdmissionRule($policyDefaultAdmissionRule); + $request = (new UpdatePolicyRequest()) + ->setPolicy($policy); + $response = $gapicClient->updatePolicy($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.binaryauthorization.v1.BinauthzManagementServiceV1/UpdatePolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $policy = new Policy(); + $policyDefaultAdmissionRule = new AdmissionRule(); + $defaultAdmissionRuleEvaluationMode = EvaluationMode::EVALUATION_MODE_UNSPECIFIED; + $policyDefaultAdmissionRule->setEvaluationMode($defaultAdmissionRuleEvaluationMode); + $defaultAdmissionRuleEnforcementMode = EnforcementMode::ENFORCEMENT_MODE_UNSPECIFIED; + $policyDefaultAdmissionRule->setEnforcementMode($defaultAdmissionRuleEnforcementMode); + $policy->setDefaultAdmissionRule($policyDefaultAdmissionRule); + $request = (new UpdatePolicyRequest()) + ->setPolicy($policy); + try { + $gapicClient->updatePolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAttestorAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Attestor(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $attestorId = 'attestorId-696764206'; + $attestor = new Attestor(); + $attestorName = 'attestorName-125367661'; + $attestor->setName($attestorName); + $request = (new CreateAttestorRequest()) + ->setParent($formattedParent) + ->setAttestorId($attestorId) + ->setAttestor($attestor); + $response = $gapicClient->createAttestorAsync($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.binaryauthorization.v1.BinauthzManagementServiceV1/CreateAttestor', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAttestorId(); + $this->assertProtobufEquals($attestorId, $actualValue); + $actualValue = $actualRequestObject->getAttestor(); + $this->assertProtobufEquals($attestor, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/SystemPolicyV1ClientTest.php b/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/SystemPolicyV1ClientTest.php new file mode 100644 index 000000000000..4dd82a5b98be --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/SystemPolicyV1ClientTest.php @@ -0,0 +1,159 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SystemPolicyV1Client */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SystemPolicyV1Client($options); + } + + /** @test */ + public function getSystemPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyName('[PROJECT]'); + $request = (new GetSystemPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getSystemPolicy($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.binaryauthorization.v1.SystemPolicyV1/GetSystemPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSystemPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->policyName('[PROJECT]'); + $request = (new GetSystemPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getSystemPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSystemPolicyAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyName('[PROJECT]'); + $request = (new GetSystemPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getSystemPolicyAsync($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.binaryauthorization.v1.SystemPolicyV1/GetSystemPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/ValidationHelperV1ClientTest.php b/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/ValidationHelperV1ClientTest.php new file mode 100644 index 000000000000..4bd275a240a1 --- /dev/null +++ b/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/ValidationHelperV1ClientTest.php @@ -0,0 +1,186 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ValidationHelperV1Client */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ValidationHelperV1Client($options); + } + + /** @test */ + public function validateAttestationOccurrenceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $denialReason = 'denialReason-884241828'; + $expectedResponse = new ValidateAttestationOccurrenceResponse(); + $expectedResponse->setDenialReason($denialReason); + $transport->addResponse($expectedResponse); + // Mock request + $attestor = 'attestor542920680'; + $attestation = new AttestationOccurrence(); + $occurrenceNote = 'occurrenceNote1860303264'; + $occurrenceResourceUri = 'occurrenceResourceUri334806377'; + $request = (new ValidateAttestationOccurrenceRequest()) + ->setAttestor($attestor) + ->setAttestation($attestation) + ->setOccurrenceNote($occurrenceNote) + ->setOccurrenceResourceUri($occurrenceResourceUri); + $response = $gapicClient->validateAttestationOccurrence($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.binaryauthorization.v1.ValidationHelperV1/ValidateAttestationOccurrence', $actualFuncCall); + $actualValue = $actualRequestObject->getAttestor(); + $this->assertProtobufEquals($attestor, $actualValue); + $actualValue = $actualRequestObject->getAttestation(); + $this->assertProtobufEquals($attestation, $actualValue); + $actualValue = $actualRequestObject->getOccurrenceNote(); + $this->assertProtobufEquals($occurrenceNote, $actualValue); + $actualValue = $actualRequestObject->getOccurrenceResourceUri(); + $this->assertProtobufEquals($occurrenceResourceUri, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function validateAttestationOccurrenceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $attestor = 'attestor542920680'; + $attestation = new AttestationOccurrence(); + $occurrenceNote = 'occurrenceNote1860303264'; + $occurrenceResourceUri = 'occurrenceResourceUri334806377'; + $request = (new ValidateAttestationOccurrenceRequest()) + ->setAttestor($attestor) + ->setAttestation($attestation) + ->setOccurrenceNote($occurrenceNote) + ->setOccurrenceResourceUri($occurrenceResourceUri); + try { + $gapicClient->validateAttestationOccurrence($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function validateAttestationOccurrenceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $denialReason = 'denialReason-884241828'; + $expectedResponse = new ValidateAttestationOccurrenceResponse(); + $expectedResponse->setDenialReason($denialReason); + $transport->addResponse($expectedResponse); + // Mock request + $attestor = 'attestor542920680'; + $attestation = new AttestationOccurrence(); + $occurrenceNote = 'occurrenceNote1860303264'; + $occurrenceResourceUri = 'occurrenceResourceUri334806377'; + $request = (new ValidateAttestationOccurrenceRequest()) + ->setAttestor($attestor) + ->setAttestation($attestation) + ->setOccurrenceNote($occurrenceNote) + ->setOccurrenceResourceUri($occurrenceResourceUri); + $response = $gapicClient->validateAttestationOccurrenceAsync($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.binaryauthorization.v1.ValidationHelperV1/ValidateAttestationOccurrence', $actualFuncCall); + $actualValue = $actualRequestObject->getAttestor(); + $this->assertProtobufEquals($attestor, $actualValue); + $actualValue = $actualRequestObject->getAttestation(); + $this->assertProtobufEquals($attestation, $actualValue); + $actualValue = $actualRequestObject->getOccurrenceNote(); + $this->assertProtobufEquals($occurrenceNote, $actualValue); + $actualValue = $actualRequestObject->getOccurrenceResourceUri(); + $this->assertProtobufEquals($occurrenceResourceUri, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateIssuanceConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateIssuanceConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..942ab73cecdc2410125a87d04df07f9d38318b32 GIT binary patch literal 3473 zcmcInOLN;)6t0~|UpR&mli25L8&+mNa+~ZF_w|8xrkn7Z>4&k&d zw+>~#OJ&=!xTRZ$-10gd>d3maZ!?2BMOm(G$d5O+<>gvqdmL3=%X4(9$X(0o8nmPv zme(%n)ZwhdbTqk7Owy%J>0mDTR%5Q~5mTp{ZkZj{EeeMKCfTR1O>`>Po0WCSNtf2VUXKbrGbBh4FL0nf(oHjxiRp9}SK*o>lwG5`qE+-tnCYh@-lW|52_8hZc zk~_q3DOx)#+wn}DGs~2Hg$)dSW>yYt`m&R@g=j6wQLIfLKm<>1n4CH$G1MA$b%)v9 za+)ZrC|$~9*!?#%v!Pqx9P7w4L5zxWCdeh3J04AXmt}`?&oLK8+`fTc{G^_PWZ7ow z3Zq85LU+jlvm8Y^&g$4mKh;edR{hdiF&s4yd4?!n-eIh|&5#?M?Azz-iVEEOjD>iY z+wBH|Y-^A}2kBVVgMAFO? zVPU6YQQTtS48wGb*z%>d@IZPKGB&oc=3<-V(x^QoNdV#%xAv%+8}Kbkw_v!#3?zJR zQ2ZW+5zA>)M{6DChWs~$UsEvkx@cV+L!pum?CW!0bk3r@t&iBmfuO2 z(0T&H25C{l#a8qCpb@#bU=H=~gW{U7wQO?d(5HSoysU621dS{Gm^#^x#N)e`!}wu% zgXe}t++SZUj0Do<$U$&_2b{YPBL?eG0q=F;a4d2d!y8>OfrdH_dAy6oeAAvXvu!=q zY>F$3$#J0NM$pJmAlZSNd-PBvM%T}4cR!cGvs?3DL=OHPu&ea299a~8^1q}Z-#<_3 zWeO&feRT}9OPvE2uS{aPWapn>Exi7LB*_xjVk-zCD9NL1`EOzTJPRkpqy@OH6U|?c z!ilI(i;*}EcWj3pAoFz+W)a^!RpReNm0=j%!a&SQt&= zB?imY8vbt1fBeblpzzvEZ zZoNzw>SC2IR{d2z$*}d{Z$fcr?)OMY4Hy38#vh8QxbnYB-wli@im--X$NvmMIYmLa wvZ}t8Xwt(=7f2A(uSP)WUTYXtx%JU>ykLG9?B|JfzV9k8B!h*!2R(p)05poFSO5S3 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateManager.php b/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateManager.php new file mode 100644 index 0000000000000000000000000000000000000000..e9f8484101f757beb7032795d843c089c510680e GIT binary patch literal 18077 zcmd5^U2Ggz6=v759bdbSbMv=xnr5?UsbeL(&9+wBP26<6UfbK)v1PBV{w%DokchL8)4VfU59-Dg;zW6{x)M0FS&w5Tdjaf(j51MMag65E2r~3!M8iyLWze zJu}`S`ch}+o^#Ldch5cd?p(d5ZE5ISd{(I`x@;8aa^=f>*v9Y1( z@p64zQ>%)ejK`-J<2M!y@!WL2a2807dP6TOnfPYCzFAdLz`#(GsP#|=|9;eQXSMoF!yrYcv}JD~1ld_%4p3b1jH-DuRxrdqGX z3Bh8mtc;zHGoEDZ!&)88Ga0vpTp|_&YZdb~Q_*X3wK%O9WnIx$XXYgee;gu!m}ucC(uB~2|#wOXB6pZX68 zIWcJn3Ee;cBLkFbo>9AR3nX9E)7ji3|r zDx^RQosDJXr3S9vWR{Mv~lH|ppD0jEbYS17&7w|bjp=^f|%WM?$079 z?hfu;&D2$;nT2zXg)MX}b#I;faRi<1AU99V=g^FICaUqZ?{e@ACAPU8FiorI zv@1<1A1ha{+j4c1=IUiMAqej)S1HfLKftG632U3Ndp>;x#RNHN5-Y?;j#PdT9rGN< z6FRIXSXPrT_R4CT%55cJ3BE50LS}g##l5oJCU#e2;|CG+AjzBQnjtmJt-7w>VWp`R ziTgnFt`)K0kD$|Sgyf06gm9&1lw_L+nrk2aI*X20oJMpcZ2=v24dDqJ%FHZV0lZJMY;C8N=e#UU z!_ONsM^$v1kQ16_Yx401u%9JBq%}x0uJ#FzM4Zj1u%f4A`TxjV68w9oN~uSE-cBq|H>V zQY4A>!HfsVUJ$mqCE#Sh&NtRiHi(IT9!7)N*3Ows)!G3Pk_zu35|V?2g!oKUeou8s zg!KrXrY0l1=Z;2TRM$~oRbE%B2Ix+9##j6xiJ(t%o>Eiv#-B$+hEm;t^^i1#E7WX* z>6xG`SAfR?V39_E{sKJ}CiD%|{5FOH#?UDdv zu>s#D-w}aC#!B4l9J12+%uPK*zm}g*^l(SV9Fq zV7=9Jbq99grJKs_)>i+(=pPWmZbRXtsJ~L*mem@oBq^(2yym$qMX3p48R)$)g<1wM z^iU2tdTBJx2Bxx<>m<4&c!h<9&P~~DHVNTl?+g?6y(GyMn)Acyxu9Nf8z{L#__4@n zAPoJ59hCq9w17)Q6Ve?b0aEC~R7(PLq8Xp|RcI~P3WSnu!ugD5!imU69rBT+_={bb z-&ROTY>qrkLA4+K8(_LiLad=afOG?3jzr>cSLATbl3b=!FfWjZg@Yy)(2aKM=+gv1 z9vg&@BfOlGRu*rRR&T5<<+Ayid~SN=Gf)^EkyZMSHg#?tcQT7Ct> zg-O|xDoP}jvW5IwZlq`QA{rFe%t6#c;Fp3kegO6E$W=fJ8m^h>laa&(OiTbD52F6* z+>Eq3Uw{Y&6Xd36bET}5og;xsY&1U)8qUJ}D0J5HR(^LXA5x6@ScY#jD<9Id zA51?TFd0B4Tk-Q88rm#Z*GsIhwCbtJ5L{=0O@WrD3{LMy5NbWcXAx#|l(tM$GfLpA zmw5ou@lYt8K_h&KVO045dYobnC?TY3{H%$9BQZeGI*k~hB~~)8u`^O8^JR30n;V(#mFbpZt#vT&WDJ7Fn~S$ zNh4@C@n#=7Vh?>*9e1q!X;s;s`1e`)uQcPIRsPxFkxKQlB>_eUx9WyTcQ`bqAsClQ z)ozxz;0O=VW#?MhnHCru;5p|w*6W7=8kkDomx3Oq;c074CVQ{p^kaTxTT%2KsOnnv zUce|#q)a-Y+fZ7o_FqMyG~(Ifyx=W#1U8#ci?LfU@JAWWv}tzugkhH~@W8rMvrM^BG{y65IgXL-@^Jd8P-+%n zJty3HN9WOD*F12(Av84Dtni2w0YcGDMv?notlvUM17Eaqz@&2S>%-uKKfQPjUOX72Jf=_Ba=+>MtTt~jnw!q{ts-7UB^_|mswq8mKLWirwEsX zl8e?Qp~TlB_oTSJ1?ld$ekh$~Znz*6^WxvoBd1DVO9XaWM!YwIzZ6A>U8h$5EZ`#Z zX@PI}vw(PPdZE#}H$wHkp1w+hRWMI7faC2p_%lR->j=!B4P0bCZBV@@jiY1iP7%A- z1sBDV^kO0Q3I`#~$C<|iXp8?CK}Q@gKx$>|Ym4PUXesHdaP*|-5HxLvpb7kVKnS90 z{1W_UM-+JM&wnm5OSKSJEfP~A99g>f^b=8pAkw#^=%@=?h&sM(?L}#6vcpe+d!w{1R-prbA*@@*S0N}sl=hsLpqaTXQ<^W(KBI_X9fzVE@)*4o?Y zwp&|rOXu7^xo~hR7VYS^fUob3ZeoeT-R*c}=?YhDj=SKCb^x&CM*(kI%LZX@q9k4r zLC{h;kdwXjCE)lTINuB6nAX0W-9OSHtP zB)Se>mT}s-IBIp=_TeSL-jqO2bsTk_6Q349<)|SE2sgpxp3K6`0CyI_Uz;vnQ z%kti|mS%e(?T;XWAMxl?dco{P4zr+zy{U7-^~5SmpG|~wbjE!f4gV1A#85DtoxEv% z+UeZ@b~^1chpR*_7Sppd16)Hpf+mc%XE&)+Jxuj?s9G4dg)@~mtxr?E6dDsRkF#hA zoI+oTqK6y>r~T%Of%AT&{h#dyD-Mi{c3^x4KkWw?g~i#a=fB|Iuf6EBkHE8j zr0>MRGQ*@FM%mUSK)W1?1ravkn`CA4>-~Y!Im|WqozU2~63EIhuq!Y@k2EW!D%C>##v!@B6Sppt02Pb=V-# z1wU*Mg(o=h3bfi;3JYxgwJBX>mKJ;D`WukzaM&Qu=T$zPZ8w#zT@%u9ZtC9pVpGJ7opAllBoUXEHAw5Z#KXFjUf`|^}HXyZ- z-3+ZG2SFcyW?((v4Xg4nl%kaw@ z_HmPo8rip|GmGHaLC`{1P3tUvx}^Aisj*r!W`FP)H!)oR(}D<^a$`x?nE+C}KU DWh9a; literal 0 HcmV?d00001 diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/TrustConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/TrustConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..96bbcb43930236641b1baecff7bd057e89d83499 GIT binary patch literal 2925 zcmb_ePj4GV6vuXAHP3C6E<$xJB&Kemjzo4zOC{KlBHL*~At6=>5kf0jG z#(@y|%9#r{_yT+cE*!Y=DLD5daN^DEpDeLcC8fD|vpeti-uu1Zd-Fc}I6MsD9@%0( zi>PFM(mNsYkdZJ7WZ(uK>5T^i77;fXh1_G2Nyx@7`FwYuJl%MQ~r$ZK5$E%i%#zJ=8z#s6TsXYMrbi_nRT}HM#tsN$5pGxX% zX)vd)z?}9Jm~*hY2H<*B2(qt0+Zq#2f#6>_?s?oLLQ;u8_qphDpG!_X{sShsP6pHy z4DF}S4#vJKdEgUeu0F&&=nZaE%bq{IJV;FP^LvkE=V~gb(O9^YkoEkIp9+X!PNi2jN9l_ zvfSI$!~ZDBo3NNCtIPYkFbk~`#%X*C*YjU>eXh==#;X5<8GISygq@Yac}GfGFX_m5 zAIqctXvynzDi3RE^;6B8*`$cW8$or0d2D8MucCs+b(q5&W*F03|G5m6TqV`lGm)qi zTwUz0>dXsM$Oe{5p_EHpTd8K6mH0WU&!Ftl9`gito9dIbl&KetpM0N~+uHi6FQXIH z8vW!R!buQ!YnFLgcTXqPl)$TsiRv}&)xN4%P2Lv@qV`@wWz%;LgUGl8iy<3zbNv;! z-Y2iM$}o4t{eJBc+|>8xi1j%NvfaFl(eDL-Gq1*8I%cSLn~s?))2AVm(7%EueZ3@c zbzLg3_^K*TuFB7U^Q)~uC10lsl#bX*%!_dY=8vg2j&-(R7e6T2-#u^2D~>3mjjigoogle.cloud.certificatemanager.v1.Certificate + */ +class Certificate extends \Google\Protobuf\Internal\Message +{ + /** + * A user-defined name of the certificate. Certificate names must be unique + * globally and match pattern `projects/*/locations/*/certificates/*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * One or more paragraphs of text description of a certificate. + * + * Generated from protobuf field string description = 8; + */ + protected $description = ''; + /** + * Output only. The creation timestamp of a Certificate. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of a Certificate. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Set of labels associated with a Certificate. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Output only. The list of Subject Alternative Names of dnsName type defined + * in the certificate (see RFC 5280 4.2.1.6). Managed certificates that + * haven't been provisioned yet have this field populated with a value of the + * managed.domains field. + * + * Generated from protobuf field repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $san_dnsnames; + /** + * Output only. The PEM-encoded certificate chain. + * + * Generated from protobuf field string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pem_certificate = ''; + /** + * Output only. The expiry timestamp of a Certificate. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Immutable. The scope of the certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $scope = 0; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A user-defined name of the certificate. Certificate names must be unique + * globally and match pattern `projects/*/locations/*/certificates/*`. + * @type string $description + * One or more paragraphs of text description of a certificate. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of a Certificate. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of a Certificate. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of labels associated with a Certificate. + * @type \Google\Cloud\CertificateManager\V1\Certificate\SelfManagedCertificate $self_managed + * If set, defines data of a self-managed certificate. + * @type \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate $managed + * If set, contains configuration and state of a managed certificate. + * @type array|\Google\Protobuf\Internal\RepeatedField $san_dnsnames + * Output only. The list of Subject Alternative Names of dnsName type defined + * in the certificate (see RFC 5280 4.2.1.6). Managed certificates that + * haven't been provisioned yet have this field populated with a value of the + * managed.domains field. + * @type string $pem_certificate + * Output only. The PEM-encoded certificate chain. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The expiry timestamp of a Certificate. + * @type int $scope + * Immutable. The scope of the certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * A user-defined name of the certificate. Certificate names must be unique + * globally and match pattern `projects/*/locations/*/certificates/*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A user-defined name of the certificate. Certificate names must be unique + * globally and match pattern `projects/*/locations/*/certificates/*`. + * + * 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; + } + + /** + * One or more paragraphs of text description of a certificate. + * + * Generated from protobuf field string description = 8; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * One or more paragraphs of text description of a certificate. + * + * Generated from protobuf field string description = 8; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The creation timestamp of a Certificate. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a Certificate. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 last update timestamp of a Certificate. + * + * 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. The last update timestamp of a Certificate. + * + * 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; + } + + /** + * Set of labels associated with a Certificate. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of labels associated with a Certificate. + * + * Generated from protobuf field map labels = 4; + * @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; + } + + /** + * If set, defines data of a self-managed certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * @return \Google\Cloud\CertificateManager\V1\Certificate\SelfManagedCertificate|null + */ + public function getSelfManaged() + { + return $this->readOneof(5); + } + + public function hasSelfManaged() + { + return $this->hasOneof(5); + } + + /** + * If set, defines data of a self-managed certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * @param \Google\Cloud\CertificateManager\V1\Certificate\SelfManagedCertificate $var + * @return $this + */ + public function setSelfManaged($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate\SelfManagedCertificate::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * If set, contains configuration and state of a managed certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + * @return \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate|null + */ + public function getManaged() + { + return $this->readOneof(11); + } + + public function hasManaged() + { + return $this->hasOneof(11); + } + + /** + * If set, contains configuration and state of a managed certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + * @param \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate $var + * @return $this + */ + public function setManaged($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Output only. The list of Subject Alternative Names of dnsName type defined + * in the certificate (see RFC 5280 4.2.1.6). Managed certificates that + * haven't been provisioned yet have this field populated with a value of the + * managed.domains field. + * + * Generated from protobuf field repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSanDnsnames() + { + return $this->san_dnsnames; + } + + /** + * Output only. The list of Subject Alternative Names of dnsName type defined + * in the certificate (see RFC 5280 4.2.1.6). Managed certificates that + * haven't been provisioned yet have this field populated with a value of the + * managed.domains field. + * + * Generated from protobuf field repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSanDnsnames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->san_dnsnames = $arr; + + return $this; + } + + /** + * Output only. The PEM-encoded certificate chain. + * + * Generated from protobuf field string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPemCertificate() + { + return $this->pem_certificate; + } + + /** + * Output only. The PEM-encoded certificate chain. + * + * Generated from protobuf field string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPemCertificate($var) + { + GPBUtil::checkString($var, True); + $this->pem_certificate = $var; + + return $this; + } + + /** + * Output only. The expiry timestamp of a Certificate. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. The expiry timestamp of a Certificate. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Immutable. The scope of the certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getScope() + { + return $this->scope; + } + + /** + * Immutable. The scope of the certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\Scope::class); + $this->scope = $var; + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate.php new file mode 100644 index 000000000000..36e90481af0b --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate.php @@ -0,0 +1,296 @@ +google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + */ +class ManagedCertificate extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The domains for which a managed SSL certificate will be + * generated. Wildcard domains are only supported with DNS challenge + * resolution. + * + * Generated from protobuf field repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private $domains; + /** + * Immutable. Authorizations that will be used for performing domain + * authorization. + * + * Generated from protobuf field repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + private $dns_authorizations; + /** + * Immutable. The resource name for a + * [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig] + * used to configure private PKI certificates in the format + * `projects/*/locations/*/certificateIssuanceConfigs/*`. + * If this field is not set, the certificates will instead be publicly + * signed as documented at + * https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. + * + * Generated from protobuf field string issuance_config = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $issuance_config = ''; + /** + * Output only. State of the managed certificate resource. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Information about issues with provisioning a Managed + * Certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $provisioning_issue = null; + /** + * Output only. Detailed state of the latest authorization attempt for each + * domain specified for managed certificate resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $authorization_attempt_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $domains + * Immutable. The domains for which a managed SSL certificate will be + * generated. Wildcard domains are only supported with DNS challenge + * resolution. + * @type array|\Google\Protobuf\Internal\RepeatedField $dns_authorizations + * Immutable. Authorizations that will be used for performing domain + * authorization. + * @type string $issuance_config + * Immutable. The resource name for a + * [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig] + * used to configure private PKI certificates in the format + * `projects/*/locations/*/certificateIssuanceConfigs/*`. + * If this field is not set, the certificates will instead be publicly + * signed as documented at + * https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. + * @type int $state + * Output only. State of the managed certificate resource. + * @type \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue $provisioning_issue + * Output only. Information about issues with provisioning a Managed + * Certificate. + * @type array<\Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo>|\Google\Protobuf\Internal\RepeatedField $authorization_attempt_info + * Output only. Detailed state of the latest authorization attempt for each + * domain specified for managed certificate resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The domains for which a managed SSL certificate will be + * generated. Wildcard domains are only supported with DNS challenge + * resolution. + * + * Generated from protobuf field repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDomains() + { + return $this->domains; + } + + /** + * Immutable. The domains for which a managed SSL certificate will be + * generated. Wildcard domains are only supported with DNS challenge + * resolution. + * + * Generated from protobuf field repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDomains($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->domains = $arr; + + return $this; + } + + /** + * Immutable. Authorizations that will be used for performing domain + * authorization. + * + * Generated from protobuf field repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDnsAuthorizations() + { + return $this->dns_authorizations; + } + + /** + * Immutable. Authorizations that will be used for performing domain + * authorization. + * + * Generated from protobuf field repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDnsAuthorizations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->dns_authorizations = $arr; + + return $this; + } + + /** + * Immutable. The resource name for a + * [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig] + * used to configure private PKI certificates in the format + * `projects/*/locations/*/certificateIssuanceConfigs/*`. + * If this field is not set, the certificates will instead be publicly + * signed as documented at + * https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. + * + * Generated from protobuf field string issuance_config = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getIssuanceConfig() + { + return $this->issuance_config; + } + + /** + * Immutable. The resource name for a + * [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig] + * used to configure private PKI certificates in the format + * `projects/*/locations/*/certificateIssuanceConfigs/*`. + * If this field is not set, the certificates will instead be publicly + * signed as documented at + * https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. + * + * Generated from protobuf field string issuance_config = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIssuanceConfig($var) + { + GPBUtil::checkString($var, True); + $this->issuance_config = $var; + + return $this; + } + + /** + * Output only. State of the managed certificate resource. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the managed certificate resource. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Information about issues with provisioning a Managed + * Certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue|null + */ + public function getProvisioningIssue() + { + return $this->provisioning_issue; + } + + public function hasProvisioningIssue() + { + return isset($this->provisioning_issue); + } + + public function clearProvisioningIssue() + { + unset($this->provisioning_issue); + } + + /** + * Output only. Information about issues with provisioning a Managed + * Certificate. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue $var + * @return $this + */ + public function setProvisioningIssue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue::class); + $this->provisioning_issue = $var; + + return $this; + } + + /** + * Output only. Detailed state of the latest authorization attempt for each + * domain specified for managed certificate resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAuthorizationAttemptInfo() + { + return $this->authorization_attempt_info; + } + + /** + * Output only. Detailed state of the latest authorization attempt for each + * domain specified for managed certificate resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAuthorizationAttemptInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo::class); + $this->authorization_attempt_info = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ManagedCertificate::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo.php new file mode 100644 index 000000000000..7081bd62999f --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo.php @@ -0,0 +1,185 @@ +google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo + */ +class AuthorizationAttemptInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Domain name of the authorization attempt. + * + * Generated from protobuf field string domain = 1; + */ + protected $domain = ''; + /** + * Output only. State of the domain for managed certificate issuance. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Reason for failure of the authorization attempt for the + * domain. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_reason = 0; + /** + * Output only. Human readable explanation for reaching the state. + * Provided to help address the configuration issues. Not guaranteed to be + * stable. For programmatic access use FailureReason enum. + * + * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $details = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain + * Domain name of the authorization attempt. + * @type int $state + * Output only. State of the domain for managed certificate issuance. + * @type int $failure_reason + * Output only. Reason for failure of the authorization attempt for the + * domain. + * @type string $details + * Output only. Human readable explanation for reaching the state. + * Provided to help address the configuration issues. Not guaranteed to be + * stable. For programmatic access use FailureReason enum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Domain name of the authorization attempt. + * + * Generated from protobuf field string domain = 1; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Domain name of the authorization attempt. + * + * Generated from protobuf field string domain = 1; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + + /** + * Output only. State of the domain for managed certificate issuance. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the domain for managed certificate issuance. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Reason for failure of the authorization attempt for the + * domain. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * Output only. Reason for failure of the authorization attempt for the + * domain. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo\FailureReason::class); + $this->failure_reason = $var; + + return $this; + } + + /** + * Output only. Human readable explanation for reaching the state. + * Provided to help address the configuration issues. Not guaranteed to be + * stable. For programmatic access use FailureReason enum. + * + * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDetails() + { + return $this->details; + } + + /** + * Output only. Human readable explanation for reaching the state. + * Provided to help address the configuration issues. Not guaranteed to be + * stable. For programmatic access use FailureReason enum. + * + * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkString($var, True); + $this->details = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AuthorizationAttemptInfo::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_AuthorizationAttemptInfo::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/FailureReason.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/FailureReason.php new file mode 100644 index 000000000000..3cec790c0492 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/FailureReason.php @@ -0,0 +1,74 @@ +google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason + */ +class FailureReason +{ + /** + * FailureReason is unspecified. + * + * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; + */ + const FAILURE_REASON_UNSPECIFIED = 0; + /** + * There was a problem with the user's DNS or load balancer + * configuration for this domain. + * + * Generated from protobuf enum CONFIG = 1; + */ + const CONFIG = 1; + /** + * Certificate issuance forbidden by an explicit CAA record for the + * domain or a failure to check CAA records for the domain. + * + * Generated from protobuf enum CAA = 2; + */ + const CAA = 2; + /** + * Reached a CA or internal rate-limit for the domain, + * e.g. for certificates per top-level private domain. + * + * Generated from protobuf enum RATE_LIMITED = 3; + */ + const RATE_LIMITED = 3; + + private static $valueToName = [ + self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', + self::CONFIG => 'CONFIG', + self::CAA => 'CAA', + self::RATE_LIMITED => 'RATE_LIMITED', + ]; + + 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(FailureReason::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_AuthorizationAttemptInfo_FailureReason::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/State.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/State.php new file mode 100644 index 000000000000..521cf4cb9cfc --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/State.php @@ -0,0 +1,74 @@ +google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State + */ +class State +{ + /** + * State is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Certificate provisioning for this domain is under way. Google Cloud + * will attempt to authorize the domain. + * + * Generated from protobuf enum AUTHORIZING = 1; + */ + const AUTHORIZING = 1; + /** + * A managed certificate can be provisioned, no issues for this domain. + * + * Generated from protobuf enum AUTHORIZED = 6; + */ + const AUTHORIZED = 6; + /** + * Attempt to authorize the domain failed. This prevents the Managed + * Certificate from being issued. + * See `failure_reason` and `details` fields for more information. + * + * Generated from protobuf enum FAILED = 7; + */ + const FAILED = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::AUTHORIZING => 'AUTHORIZING', + self::AUTHORIZED => 'AUTHORIZED', + 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(State::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_AuthorizationAttemptInfo_State::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue.php new file mode 100644 index 000000000000..298111d31843 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue.php @@ -0,0 +1,112 @@ +google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + */ +class ProvisioningIssue extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Reason for provisioning failures. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reason = 0; + /** + * Output only. Human readable explanation about the issue. Provided to + * help address the configuration issues. Not guaranteed to be stable. For + * programmatic access use Reason enum. + * + * Generated from protobuf field string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $details = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reason + * Output only. Reason for provisioning failures. + * @type string $details + * Output only. Human readable explanation about the issue. Provided to + * help address the configuration issues. Not guaranteed to be stable. For + * programmatic access use Reason enum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Reason for provisioning failures. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReason() + { + return $this->reason; + } + + /** + * Output only. Reason for provisioning failures. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue\Reason::class); + $this->reason = $var; + + return $this; + } + + /** + * Output only. Human readable explanation about the issue. Provided to + * help address the configuration issues. Not guaranteed to be stable. For + * programmatic access use Reason enum. + * + * Generated from protobuf field string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDetails() + { + return $this->details; + } + + /** + * Output only. Human readable explanation about the issue. Provided to + * help address the configuration issues. Not guaranteed to be stable. For + * programmatic access use Reason enum. + * + * Generated from protobuf field string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkString($var, True); + $this->details = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProvisioningIssue::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_ProvisioningIssue::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue/Reason.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue/Reason.php new file mode 100644 index 000000000000..fead58541b1c --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue/Reason.php @@ -0,0 +1,68 @@ +google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason + */ +class Reason +{ + /** + * Reason is unspecified. + * + * Generated from protobuf enum REASON_UNSPECIFIED = 0; + */ + const REASON_UNSPECIFIED = 0; + /** + * Certificate provisioning failed due to an issue with one or more of + * the domains on the certificate. + * For details of which domains failed, consult the + * `authorization_attempt_info` field. + * + * Generated from protobuf enum AUTHORIZATION_ISSUE = 1; + */ + const AUTHORIZATION_ISSUE = 1; + /** + * Exceeded Certificate Authority quotas or internal rate limits of the + * system. Provisioning may take longer to complete. + * + * Generated from protobuf enum RATE_LIMITED = 2; + */ + const RATE_LIMITED = 2; + + private static $valueToName = [ + self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', + self::AUTHORIZATION_ISSUE => 'AUTHORIZATION_ISSUE', + self::RATE_LIMITED => 'RATE_LIMITED', + ]; + + 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(Reason::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_ProvisioningIssue_Reason::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/State.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/State.php new file mode 100644 index 000000000000..8cfa7a463eb8 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/State.php @@ -0,0 +1,77 @@ +google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State + */ +class State +{ + /** + * State is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Certificate Manager attempts to provision or renew the certificate. + * If the process takes longer than expected, consult the + * `provisioning_issue` field. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * Multiple certificate provisioning attempts failed and Certificate + * Manager gave up. To try again, delete and create a new managed + * Certificate resource. + * For details see the `provisioning_issue` field. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The certificate management is working, and a certificate has been + * provisioned. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::FAILED => 'FAILED', + self::ACTIVE => 'ACTIVE', + ]; + + 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\CertificateManager\V1\Certificate_ManagedCertificate_State::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/Scope.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/Scope.php new file mode 100644 index 000000000000..0ad044eb2ff1 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/Scope.php @@ -0,0 +1,72 @@ +google.cloud.certificatemanager.v1.Certificate.Scope + */ +class Scope +{ + /** + * Certificates with default scope are served from core Google data centers. + * If unsure, choose this option. + * + * Generated from protobuf enum DEFAULT = 0; + */ + const PBDEFAULT = 0; + /** + * Certificates with scope EDGE_CACHE are special-purposed certificates, + * served from Edge Points of Presence. + * See https://cloud.google.com/vpc/docs/edge-locations. + * + * Generated from protobuf enum EDGE_CACHE = 1; + */ + const EDGE_CACHE = 1; + /** + * Certificates with ALL_REGIONS scope are served from all Google Cloud + * regions. See https://cloud.google.com/compute/docs/regions-zones. + * + * Generated from protobuf enum ALL_REGIONS = 2; + */ + const ALL_REGIONS = 2; + + private static $valueToName = [ + self::PBDEFAULT => 'DEFAULT', + self::EDGE_CACHE => 'EDGE_CACHE', + self::ALL_REGIONS => 'ALL_REGIONS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Scope::class, \Google\Cloud\CertificateManager\V1\Certificate_Scope::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/SelfManagedCertificate.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/SelfManagedCertificate.php new file mode 100644 index 000000000000..86ec18a91142 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/SelfManagedCertificate.php @@ -0,0 +1,110 @@ +google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + */ +class SelfManagedCertificate extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. The PEM-encoded certificate chain. + * Leaf certificate comes first, followed by intermediate ones if any. + * + * Generated from protobuf field string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $pem_certificate = ''; + /** + * Input only. The PEM-encoded private key of the leaf certificate. + * + * Generated from protobuf field string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $pem_private_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pem_certificate + * Input only. The PEM-encoded certificate chain. + * Leaf certificate comes first, followed by intermediate ones if any. + * @type string $pem_private_key + * Input only. The PEM-encoded private key of the leaf certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Input only. The PEM-encoded certificate chain. + * Leaf certificate comes first, followed by intermediate ones if any. + * + * Generated from protobuf field string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPemCertificate() + { + return $this->pem_certificate; + } + + /** + * Input only. The PEM-encoded certificate chain. + * Leaf certificate comes first, followed by intermediate ones if any. + * + * Generated from protobuf field string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPemCertificate($var) + { + GPBUtil::checkString($var, True); + $this->pem_certificate = $var; + + return $this; + } + + /** + * Input only. The PEM-encoded private key of the leaf certificate. + * + * Generated from protobuf field string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPemPrivateKey() + { + return $this->pem_private_key; + } + + /** + * Input only. The PEM-encoded private key of the leaf certificate. + * + * Generated from protobuf field string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPemPrivateKey($var) + { + GPBUtil::checkString($var, True); + $this->pem_private_key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SelfManagedCertificate::class, \Google\Cloud\CertificateManager\V1\Certificate_SelfManagedCertificate::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig.php new file mode 100644 index 000000000000..5152f1515769 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig.php @@ -0,0 +1,399 @@ +google.cloud.certificatemanager.v1.CertificateIssuanceConfig + */ +class CertificateIssuanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * A user-defined name of the certificate issuance config. + * CertificateIssuanceConfig names must be unique globally and match pattern + * `projects/*/locations/*/certificateIssuanceConfigs/*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation timestamp of a CertificateIssuanceConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of a CertificateIssuanceConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Set of labels associated with a CertificateIssuanceConfig. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * One or more paragraphs of text description of a CertificateIssuanceConfig. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Required. The CA that issues the workload certificate. It includes the CA + * address, type, authentication to CA service, etc. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig certificate_authority_config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_authority_config = null; + /** + * Required. Workload certificate lifetime requested. + * + * Generated from protobuf field .google.protobuf.Duration lifetime = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lifetime = null; + /** + * Required. Specifies the percentage of elapsed time of the certificate + * lifetime to wait before renewing the certificate. Must be a number between + * 1-99, inclusive. + * + * Generated from protobuf field int32 rotation_window_percentage = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rotation_window_percentage = 0; + /** + * Required. The key algorithm to use when generating the private key. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm key_algorithm = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_algorithm = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A user-defined name of the certificate issuance config. + * CertificateIssuanceConfig names must be unique globally and match pattern + * `projects/*/locations/*/certificateIssuanceConfigs/*`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of a CertificateIssuanceConfig. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of a CertificateIssuanceConfig. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of labels associated with a CertificateIssuanceConfig. + * @type string $description + * One or more paragraphs of text description of a CertificateIssuanceConfig. + * @type \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig $certificate_authority_config + * Required. The CA that issues the workload certificate. It includes the CA + * address, type, authentication to CA service, etc. + * @type \Google\Protobuf\Duration $lifetime + * Required. Workload certificate lifetime requested. + * @type int $rotation_window_percentage + * Required. Specifies the percentage of elapsed time of the certificate + * lifetime to wait before renewing the certificate. Must be a number between + * 1-99, inclusive. + * @type int $key_algorithm + * Required. The key algorithm to use when generating the private key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * A user-defined name of the certificate issuance config. + * CertificateIssuanceConfig names must be unique globally and match pattern + * `projects/*/locations/*/certificateIssuanceConfigs/*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A user-defined name of the certificate issuance config. + * CertificateIssuanceConfig names must be unique globally and match pattern + * `projects/*/locations/*/certificateIssuanceConfigs/*`. + * + * 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; + } + + /** + * Output only. The creation timestamp of a CertificateIssuanceConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a CertificateIssuanceConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 last update timestamp of a CertificateIssuanceConfig. + * + * 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. The last update timestamp of a CertificateIssuanceConfig. + * + * 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; + } + + /** + * Set of labels associated with a CertificateIssuanceConfig. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of labels associated with a CertificateIssuanceConfig. + * + * Generated from protobuf field map labels = 4; + * @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; + } + + /** + * One or more paragraphs of text description of a CertificateIssuanceConfig. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * One or more paragraphs of text description of a CertificateIssuanceConfig. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. The CA that issues the workload certificate. It includes the CA + * address, type, authentication to CA service, etc. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig certificate_authority_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig|null + */ + public function getCertificateAuthorityConfig() + { + return $this->certificate_authority_config; + } + + public function hasCertificateAuthorityConfig() + { + return isset($this->certificate_authority_config); + } + + public function clearCertificateAuthorityConfig() + { + unset($this->certificate_authority_config); + } + + /** + * Required. The CA that issues the workload certificate. It includes the CA + * address, type, authentication to CA service, etc. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig certificate_authority_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig $var + * @return $this + */ + public function setCertificateAuthorityConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig::class); + $this->certificate_authority_config = $var; + + return $this; + } + + /** + * Required. Workload certificate lifetime requested. + * + * Generated from protobuf field .google.protobuf.Duration lifetime = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getLifetime() + { + return $this->lifetime; + } + + public function hasLifetime() + { + return isset($this->lifetime); + } + + public function clearLifetime() + { + unset($this->lifetime); + } + + /** + * Required. Workload certificate lifetime requested. + * + * Generated from protobuf field .google.protobuf.Duration lifetime = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLifetime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->lifetime = $var; + + return $this; + } + + /** + * Required. Specifies the percentage of elapsed time of the certificate + * lifetime to wait before renewing the certificate. Must be a number between + * 1-99, inclusive. + * + * Generated from protobuf field int32 rotation_window_percentage = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getRotationWindowPercentage() + { + return $this->rotation_window_percentage; + } + + /** + * Required. Specifies the percentage of elapsed time of the certificate + * lifetime to wait before renewing the certificate. Must be a number between + * 1-99, inclusive. + * + * Generated from protobuf field int32 rotation_window_percentage = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setRotationWindowPercentage($var) + { + GPBUtil::checkInt32($var); + $this->rotation_window_percentage = $var; + + return $this; + } + + /** + * Required. The key algorithm to use when generating the private key. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm key_algorithm = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getKeyAlgorithm() + { + return $this->key_algorithm; + } + + /** + * Required. The key algorithm to use when generating the private key. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm key_algorithm = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setKeyAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\KeyAlgorithm::class); + $this->key_algorithm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig.php new file mode 100644 index 000000000000..e060679a5ed1 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig.php @@ -0,0 +1,79 @@ +google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig + */ +class CertificateAuthorityConfig extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig $certificate_authority_service_config + * Defines a CertificateAuthorityServiceConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * Defines a CertificateAuthorityServiceConfig. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig certificate_authority_service_config = 1; + * @return \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig|null + */ + public function getCertificateAuthorityServiceConfig() + { + return $this->readOneof(1); + } + + public function hasCertificateAuthorityServiceConfig() + { + return $this->hasOneof(1); + } + + /** + * Defines a CertificateAuthorityServiceConfig. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig certificate_authority_service_config = 1; + * @param \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig $var + * @return $this + */ + public function setCertificateAuthorityServiceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CertificateAuthorityConfig::class, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig_CertificateAuthorityConfig::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig/CertificateAuthorityServiceConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig/CertificateAuthorityServiceConfig.php new file mode 100644 index 000000000000..caafaa5e49a2 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig/CertificateAuthorityServiceConfig.php @@ -0,0 +1,78 @@ +google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig + */ +class CertificateAuthorityServiceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A CA pool resource used to issue a certificate. + * The CA pool string has a relative resource path following the form + * "projects/{project}/locations/{location}/caPools/{ca_pool}". + * + * Generated from protobuf field string ca_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $ca_pool = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ca_pool + * Required. A CA pool resource used to issue a certificate. + * The CA pool string has a relative resource path following the form + * "projects/{project}/locations/{location}/caPools/{ca_pool}". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A CA pool resource used to issue a certificate. + * The CA pool string has a relative resource path following the form + * "projects/{project}/locations/{location}/caPools/{ca_pool}". + * + * Generated from protobuf field string ca_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCaPool() + { + return $this->ca_pool; + } + + /** + * Required. A CA pool resource used to issue a certificate. + * The CA pool string has a relative resource path following the form + * "projects/{project}/locations/{location}/caPools/{ca_pool}". + * + * Generated from protobuf field string ca_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCaPool($var) + { + GPBUtil::checkString($var, True); + $this->ca_pool = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CertificateAuthorityServiceConfig::class, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthorityServiceConfig::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/KeyAlgorithm.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/KeyAlgorithm.php new file mode 100644 index 000000000000..71f63a4297e3 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/KeyAlgorithm.php @@ -0,0 +1,64 @@ +google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm + */ +class KeyAlgorithm +{ + /** + * Unspecified key algorithm. + * + * Generated from protobuf enum KEY_ALGORITHM_UNSPECIFIED = 0; + */ + const KEY_ALGORITHM_UNSPECIFIED = 0; + /** + * Specifies RSA with a 2048-bit modulus. + * + * Generated from protobuf enum RSA_2048 = 1; + */ + const RSA_2048 = 1; + /** + * Specifies ECDSA with curve P256. + * + * Generated from protobuf enum ECDSA_P256 = 4; + */ + const ECDSA_P256 = 4; + + private static $valueToName = [ + self::KEY_ALGORITHM_UNSPECIFIED => 'KEY_ALGORITHM_UNSPECIFIED', + self::RSA_2048 => 'RSA_2048', + self::ECDSA_P256 => 'ECDSA_P256', + ]; + + 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(KeyAlgorithm::class, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig_KeyAlgorithm::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap.php new file mode 100644 index 000000000000..6d10dbd295df --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap.php @@ -0,0 +1,273 @@ +google.cloud.certificatemanager.v1.CertificateMap + */ +class CertificateMap extends \Google\Protobuf\Internal\Message +{ + /** + * A user-defined name of the Certificate Map. Certificate Map names must be + * unique globally and match pattern + * `projects/*/locations/*/certificateMaps/*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * One or more paragraphs of text description of a certificate map. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Output only. The creation timestamp of a Certificate Map. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp of a Certificate Map. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Set of labels associated with a Certificate Map. + * + * Generated from protobuf field map labels = 3; + */ + private $labels; + /** + * Output only. A list of GCLB targets that use this Certificate Map. + * A Target Proxy is only present on this list if it's attached to a + * Forwarding Rule. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $gclb_targets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A user-defined name of the Certificate Map. Certificate Map names must be + * unique globally and match pattern + * `projects/*/locations/*/certificateMaps/*`. + * @type string $description + * One or more paragraphs of text description of a certificate map. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of a Certificate Map. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp of a Certificate Map. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of labels associated with a Certificate Map. + * @type array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget>|\Google\Protobuf\Internal\RepeatedField $gclb_targets + * Output only. A list of GCLB targets that use this Certificate Map. + * A Target Proxy is only present on this list if it's attached to a + * Forwarding Rule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * A user-defined name of the Certificate Map. Certificate Map names must be + * unique globally and match pattern + * `projects/*/locations/*/certificateMaps/*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A user-defined name of the Certificate Map. Certificate Map names must be + * unique globally and match pattern + * `projects/*/locations/*/certificateMaps/*`. + * + * 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; + } + + /** + * One or more paragraphs of text description of a certificate map. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * One or more paragraphs of text description of a certificate map. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The creation timestamp of a Certificate Map. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a Certificate Map. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 update timestamp of a Certificate Map. + * + * 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 update timestamp of a Certificate Map. + * + * 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; + } + + /** + * Set of labels associated with a Certificate Map. + * + * Generated from protobuf field map labels = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of labels associated with a Certificate Map. + * + * Generated from protobuf field map labels = 3; + * @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. A list of GCLB targets that use this Certificate Map. + * A Target Proxy is only present on this list if it's attached to a + * Forwarding Rule. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGclbTargets() + { + return $this->gclb_targets; + } + + /** + * Output only. A list of GCLB targets that use this Certificate Map. + * A Target Proxy is only present on this list if it's attached to a + * Forwarding Rule. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGclbTargets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget::class); + $this->gclb_targets = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget.php new file mode 100644 index 000000000000..59c43861885a --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget.php @@ -0,0 +1,161 @@ +google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + */ +class GclbTarget extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. IP configurations for this Target Proxy where the + * Certificate Map is serving. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $ip_configs; + protected $target_proxy; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target_https_proxy + * Output only. This field returns the resource name in the following + * format: + * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`. + * @type string $target_ssl_proxy + * Output only. This field returns the resource name in the following + * format: + * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`. + * @type array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget\IpConfig>|\Google\Protobuf\Internal\RepeatedField $ip_configs + * Output only. IP configurations for this Target Proxy where the + * Certificate Map is serving. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. This field returns the resource name in the following + * format: + * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`. + * + * Generated from protobuf field string target_https_proxy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTargetHttpsProxy() + { + return $this->readOneof(1); + } + + public function hasTargetHttpsProxy() + { + return $this->hasOneof(1); + } + + /** + * Output only. This field returns the resource name in the following + * format: + * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`. + * + * Generated from protobuf field string target_https_proxy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTargetHttpsProxy($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Output only. This field returns the resource name in the following + * format: + * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`. + * + * Generated from protobuf field string target_ssl_proxy = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTargetSslProxy() + { + return $this->readOneof(3); + } + + public function hasTargetSslProxy() + { + return $this->hasOneof(3); + } + + /** + * Output only. This field returns the resource name in the following + * format: + * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`. + * + * Generated from protobuf field string target_ssl_proxy = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTargetSslProxy($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Output only. IP configurations for this Target Proxy where the + * Certificate Map is serving. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpConfigs() + { + return $this->ip_configs; + } + + /** + * Output only. IP configurations for this Target Proxy where the + * Certificate Map is serving. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget\IpConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget\IpConfig::class); + $this->ip_configs = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTargetProxy() + { + return $this->whichOneof("target_proxy"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GclbTarget::class, \Google\Cloud\CertificateManager\V1\CertificateMap_GclbTarget::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget/IpConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget/IpConfig.php new file mode 100644 index 000000000000..ab5ed740ef57 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget/IpConfig.php @@ -0,0 +1,104 @@ +google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + */ +class IpConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. An external IP address. + * + * Generated from protobuf field string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ip_address = ''; + /** + * Output only. Ports. + * + * Generated from protobuf field repeated uint32 ports = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $ports; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip_address + * Output only. An external IP address. + * @type array|\Google\Protobuf\Internal\RepeatedField $ports + * Output only. Ports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. An external IP address. + * + * Generated from protobuf field string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * Output only. An external IP address. + * + * Generated from protobuf field string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * Output only. Ports. + * + * Generated from protobuf field repeated uint32 ports = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPorts() + { + return $this->ports; + } + + /** + * Output only. Ports. + * + * Generated from protobuf field repeated uint32 ports = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPorts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); + $this->ports = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IpConfig::class, \Google\Cloud\CertificateManager\V1\CertificateMap_GclbTarget_IpConfig::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry.php new file mode 100644 index 000000000000..4c6b3f1ada5f --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry.php @@ -0,0 +1,388 @@ +google.cloud.certificatemanager.v1.CertificateMapEntry + */ +class CertificateMapEntry extends \Google\Protobuf\Internal\Message +{ + /** + * A user-defined name of the Certificate Map Entry. Certificate Map Entry + * names must be unique globally and match pattern + * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * One or more paragraphs of text description of a certificate map entry. + * + * Generated from protobuf field string description = 9; + */ + protected $description = ''; + /** + * Output only. The creation timestamp of a Certificate Map Entry. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp of a Certificate Map Entry. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Set of labels associated with a Certificate Map Entry. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * A set of Certificates defines for the given `hostname`. There can be + * defined up to four certificates in each Certificate Map Entry. Each + * certificate must match pattern `projects/*/locations/*/certificates/*`. + * + * Generated from protobuf field repeated string certificates = 7 [(.google.api.resource_reference) = { + */ + private $certificates; + /** + * Output only. A serving state of this Certificate Map Entry. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + protected $match; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A user-defined name of the Certificate Map Entry. Certificate Map Entry + * names must be unique globally and match pattern + * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * @type string $description + * One or more paragraphs of text description of a certificate map entry. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of a Certificate Map Entry. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp of a Certificate Map Entry. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of labels associated with a Certificate Map Entry. + * @type string $hostname + * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression + * (`*.example.com`) for a set of hostnames with common suffix. Used as + * Server Name Indication (SNI) for selecting a proper certificate. + * @type int $matcher + * A predefined matcher for particular cases, other than SNI selection. + * @type array|\Google\Protobuf\Internal\RepeatedField $certificates + * A set of Certificates defines for the given `hostname`. There can be + * defined up to four certificates in each Certificate Map Entry. Each + * certificate must match pattern `projects/*/locations/*/certificates/*`. + * @type int $state + * Output only. A serving state of this Certificate Map Entry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * A user-defined name of the Certificate Map Entry. Certificate Map Entry + * names must be unique globally and match pattern + * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A user-defined name of the Certificate Map Entry. Certificate Map Entry + * names must be unique globally and match pattern + * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * + * 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; + } + + /** + * One or more paragraphs of text description of a certificate map entry. + * + * Generated from protobuf field string description = 9; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * One or more paragraphs of text description of a certificate map entry. + * + * Generated from protobuf field string description = 9; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The creation timestamp of a Certificate Map Entry. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a Certificate Map Entry. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 update timestamp of a Certificate Map Entry. + * + * 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. The update timestamp of a Certificate Map Entry. + * + * 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; + } + + /** + * Set of labels associated with a Certificate Map Entry. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of labels associated with a Certificate Map Entry. + * + * Generated from protobuf field map labels = 4; + * @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; + } + + /** + * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression + * (`*.example.com`) for a set of hostnames with common suffix. Used as + * Server Name Indication (SNI) for selecting a proper certificate. + * + * Generated from protobuf field string hostname = 5; + * @return string + */ + public function getHostname() + { + return $this->readOneof(5); + } + + public function hasHostname() + { + return $this->hasOneof(5); + } + + /** + * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression + * (`*.example.com`) for a set of hostnames with common suffix. Used as + * Server Name Indication (SNI) for selecting a proper certificate. + * + * Generated from protobuf field string hostname = 5; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A predefined matcher for particular cases, other than SNI selection. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * @return int + */ + public function getMatcher() + { + return $this->readOneof(10); + } + + public function hasMatcher() + { + return $this->hasOneof(10); + } + + /** + * A predefined matcher for particular cases, other than SNI selection. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * @param int $var + * @return $this + */ + public function setMatcher($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\CertificateMapEntry\Matcher::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * A set of Certificates defines for the given `hostname`. There can be + * defined up to four certificates in each Certificate Map Entry. Each + * certificate must match pattern `projects/*/locations/*/certificates/*`. + * + * Generated from protobuf field repeated string certificates = 7 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCertificates() + { + return $this->certificates; + } + + /** + * A set of Certificates defines for the given `hostname`. There can be + * defined up to four certificates in each Certificate Map Entry. Each + * certificate must match pattern `projects/*/locations/*/certificates/*`. + * + * Generated from protobuf field repeated string certificates = 7 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCertificates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->certificates = $arr; + + return $this; + } + + /** + * Output only. A serving state of this Certificate Map Entry. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. A serving state of this Certificate Map Entry. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\ServingState::class); + $this->state = $var; + + return $this; + } + + /** + * @return string + */ + public function getMatch() + { + return $this->whichOneof("match"); + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry/Matcher.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry/Matcher.php new file mode 100644 index 000000000000..f837e74c7a8b --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry/Matcher.php @@ -0,0 +1,59 @@ +google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher + */ +class Matcher +{ + /** + * A matcher has't been recognized. + * + * Generated from protobuf enum MATCHER_UNSPECIFIED = 0; + */ + const MATCHER_UNSPECIFIED = 0; + /** + * A primary certificate that is served when SNI wasn't specified in the + * request or SNI couldn't be found in the map. + * + * Generated from protobuf enum PRIMARY = 1; + */ + const PRIMARY = 1; + + private static $valueToName = [ + self::MATCHER_UNSPECIFIED => 'MATCHER_UNSPECIFIED', + self::PRIMARY => 'PRIMARY', + ]; + + 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(Matcher::class, \Google\Cloud\CertificateManager\V1\CertificateMapEntry_Matcher::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateIssuanceConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateIssuanceConfigRequest.php new file mode 100644 index 000000000000..6434e2e05757 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateIssuanceConfigRequest.php @@ -0,0 +1,168 @@ +google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest + */ +class CreateCertificateIssuanceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the certificate issuance config. Must be + * in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A user-provided name of the certificate config. + * + * Generated from protobuf field string certificate_issuance_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_issuance_config_id = ''; + /** + * Required. A definition of the certificate issuance config to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_issuance_config = null; + + /** + * @param string $parent Required. The parent resource of the certificate issuance config. Must be + * in the format `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig $certificateIssuanceConfig Required. A definition of the certificate issuance config to create. + * @param string $certificateIssuanceConfigId Required. A user-provided name of the certificate config. + * + * @return \Google\Cloud\CertificateManager\V1\CreateCertificateIssuanceConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig $certificateIssuanceConfig, string $certificateIssuanceConfigId): self + { + return (new self()) + ->setParent($parent) + ->setCertificateIssuanceConfig($certificateIssuanceConfig) + ->setCertificateIssuanceConfigId($certificateIssuanceConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the certificate issuance config. Must be + * in the format `projects/*/locations/*`. + * @type string $certificate_issuance_config_id + * Required. A user-provided name of the certificate config. + * @type \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig $certificate_issuance_config + * Required. A definition of the certificate issuance config to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the certificate issuance config. Must be + * in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the certificate issuance config. Must be + * in the format `projects/*/locations/*`. + * + * 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. A user-provided name of the certificate config. + * + * Generated from protobuf field string certificate_issuance_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCertificateIssuanceConfigId() + { + return $this->certificate_issuance_config_id; + } + + /** + * Required. A user-provided name of the certificate config. + * + * Generated from protobuf field string certificate_issuance_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCertificateIssuanceConfigId($var) + { + GPBUtil::checkString($var, True); + $this->certificate_issuance_config_id = $var; + + return $this; + } + + /** + * Required. A definition of the certificate issuance config to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig|null + */ + public function getCertificateIssuanceConfig() + { + return $this->certificate_issuance_config; + } + + public function hasCertificateIssuanceConfig() + { + return isset($this->certificate_issuance_config); + } + + public function clearCertificateIssuanceConfig() + { + unset($this->certificate_issuance_config); + } + + /** + * Required. A definition of the certificate issuance config to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig $var + * @return $this + */ + public function setCertificateIssuanceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig::class); + $this->certificate_issuance_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapEntryRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapEntryRequest.php new file mode 100644 index 000000000000..7c2df97476f0 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapEntryRequest.php @@ -0,0 +1,168 @@ +google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest + */ +class CreateCertificateMapEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the certificate map entry. Must be in the + * format `projects/*/locations/*/certificateMaps/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A user-provided name of the certificate map entry. + * + * Generated from protobuf field string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_map_entry_id = ''; + /** + * Required. A definition of the certificate map entry to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_map_entry = null; + + /** + * @param string $parent Required. The parent resource of the certificate map entry. Must be in the + * format `projects/*/locations/*/certificateMaps/*`. Please see + * {@see CertificateManagerClient::certificateMapName()} for help formatting this field. + * @param \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificateMapEntry Required. A definition of the certificate map entry to create. + * @param string $certificateMapEntryId Required. A user-provided name of the certificate map entry. + * + * @return \Google\Cloud\CertificateManager\V1\CreateCertificateMapEntryRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificateMapEntry, string $certificateMapEntryId): self + { + return (new self()) + ->setParent($parent) + ->setCertificateMapEntry($certificateMapEntry) + ->setCertificateMapEntryId($certificateMapEntryId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the certificate map entry. Must be in the + * format `projects/*/locations/*/certificateMaps/*`. + * @type string $certificate_map_entry_id + * Required. A user-provided name of the certificate map entry. + * @type \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificate_map_entry + * Required. A definition of the certificate map entry to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the certificate map entry. Must be in the + * format `projects/*/locations/*/certificateMaps/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the certificate map entry. Must be in the + * format `projects/*/locations/*/certificateMaps/*`. + * + * 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. A user-provided name of the certificate map entry. + * + * Generated from protobuf field string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCertificateMapEntryId() + { + return $this->certificate_map_entry_id; + } + + /** + * Required. A user-provided name of the certificate map entry. + * + * Generated from protobuf field string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCertificateMapEntryId($var) + { + GPBUtil::checkString($var, True); + $this->certificate_map_entry_id = $var; + + return $this; + } + + /** + * Required. A definition of the certificate map entry to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\CertificateMapEntry|null + */ + public function getCertificateMapEntry() + { + return $this->certificate_map_entry; + } + + public function hasCertificateMapEntry() + { + return isset($this->certificate_map_entry); + } + + public function clearCertificateMapEntry() + { + unset($this->certificate_map_entry); + } + + /** + * Required. A definition of the certificate map entry to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\CertificateMapEntry $var + * @return $this + */ + public function setCertificateMapEntry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateMapEntry::class); + $this->certificate_map_entry = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapRequest.php new file mode 100644 index 000000000000..8722fd5327e7 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapRequest.php @@ -0,0 +1,168 @@ +google.cloud.certificatemanager.v1.CreateCertificateMapRequest + */ +class CreateCertificateMapRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the certificate map. Must be in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A user-provided name of the certificate map. + * + * Generated from protobuf field string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_map_id = ''; + /** + * Required. A definition of the certificate map to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_map = null; + + /** + * @param string $parent Required. The parent resource of the certificate map. Must be in the format + * `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap Required. A definition of the certificate map to create. + * @param string $certificateMapId Required. A user-provided name of the certificate map. + * + * @return \Google\Cloud\CertificateManager\V1\CreateCertificateMapRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap, string $certificateMapId): self + { + return (new self()) + ->setParent($parent) + ->setCertificateMap($certificateMap) + ->setCertificateMapId($certificateMapId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the certificate map. Must be in the format + * `projects/*/locations/*`. + * @type string $certificate_map_id + * Required. A user-provided name of the certificate map. + * @type \Google\Cloud\CertificateManager\V1\CertificateMap $certificate_map + * Required. A definition of the certificate map to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the certificate map. Must be in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the certificate map. Must be in the format + * `projects/*/locations/*`. + * + * 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. A user-provided name of the certificate map. + * + * Generated from protobuf field string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCertificateMapId() + { + return $this->certificate_map_id; + } + + /** + * Required. A user-provided name of the certificate map. + * + * Generated from protobuf field string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCertificateMapId($var) + { + GPBUtil::checkString($var, True); + $this->certificate_map_id = $var; + + return $this; + } + + /** + * Required. A definition of the certificate map to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\CertificateMap|null + */ + public function getCertificateMap() + { + return $this->certificate_map; + } + + public function hasCertificateMap() + { + return isset($this->certificate_map); + } + + public function clearCertificateMap() + { + unset($this->certificate_map); + } + + /** + * Required. A definition of the certificate map to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\CertificateMap $var + * @return $this + */ + public function setCertificateMap($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateMap::class); + $this->certificate_map = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateRequest.php new file mode 100644 index 000000000000..0c98fd3b8a2b --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateRequest.php @@ -0,0 +1,168 @@ +google.cloud.certificatemanager.v1.CreateCertificateRequest + */ +class CreateCertificateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the certificate. Must be in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A user-provided name of the certificate. + * + * Generated from protobuf field string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_id = ''; + /** + * Required. A definition of the certificate to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate = null; + + /** + * @param string $parent Required. The parent resource of the certificate. Must be in the format + * `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\CertificateManager\V1\Certificate $certificate Required. A definition of the certificate to create. + * @param string $certificateId Required. A user-provided name of the certificate. + * + * @return \Google\Cloud\CertificateManager\V1\CreateCertificateRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\CertificateManager\V1\Certificate $certificate, string $certificateId): self + { + return (new self()) + ->setParent($parent) + ->setCertificate($certificate) + ->setCertificateId($certificateId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the certificate. Must be in the format + * `projects/*/locations/*`. + * @type string $certificate_id + * Required. A user-provided name of the certificate. + * @type \Google\Cloud\CertificateManager\V1\Certificate $certificate + * Required. A definition of the certificate to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the certificate. Must be in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the certificate. Must be in the format + * `projects/*/locations/*`. + * + * 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. A user-provided name of the certificate. + * + * Generated from protobuf field string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCertificateId() + { + return $this->certificate_id; + } + + /** + * Required. A user-provided name of the certificate. + * + * Generated from protobuf field string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCertificateId($var) + { + GPBUtil::checkString($var, True); + $this->certificate_id = $var; + + return $this; + } + + /** + * Required. A definition of the certificate to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\Certificate|null + */ + public function getCertificate() + { + return $this->certificate; + } + + public function hasCertificate() + { + return isset($this->certificate); + } + + public function clearCertificate() + { + unset($this->certificate); + } + + /** + * Required. A definition of the certificate to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\Certificate $var + * @return $this + */ + public function setCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate::class); + $this->certificate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateDnsAuthorizationRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateDnsAuthorizationRequest.php new file mode 100644 index 000000000000..4dea85970ea0 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateDnsAuthorizationRequest.php @@ -0,0 +1,168 @@ +google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + */ +class CreateDnsAuthorizationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the dns authorization. Must be in the + * format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A user-provided name of the dns authorization. + * + * Generated from protobuf field string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dns_authorization_id = ''; + /** + * Required. A definition of the dns authorization to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dns_authorization = null; + + /** + * @param string $parent Required. The parent resource of the dns authorization. Must be in the + * format `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization $dnsAuthorization Required. A definition of the dns authorization to create. + * @param string $dnsAuthorizationId Required. A user-provided name of the dns authorization. + * + * @return \Google\Cloud\CertificateManager\V1\CreateDnsAuthorizationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\CertificateManager\V1\DnsAuthorization $dnsAuthorization, string $dnsAuthorizationId): self + { + return (new self()) + ->setParent($parent) + ->setDnsAuthorization($dnsAuthorization) + ->setDnsAuthorizationId($dnsAuthorizationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the dns authorization. Must be in the + * format `projects/*/locations/*`. + * @type string $dns_authorization_id + * Required. A user-provided name of the dns authorization. + * @type \Google\Cloud\CertificateManager\V1\DnsAuthorization $dns_authorization + * Required. A definition of the dns authorization to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the dns authorization. Must be in the + * format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the dns authorization. Must be in the + * format `projects/*/locations/*`. + * + * 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. A user-provided name of the dns authorization. + * + * Generated from protobuf field string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDnsAuthorizationId() + { + return $this->dns_authorization_id; + } + + /** + * Required. A user-provided name of the dns authorization. + * + * Generated from protobuf field string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDnsAuthorizationId($var) + { + GPBUtil::checkString($var, True); + $this->dns_authorization_id = $var; + + return $this; + } + + /** + * Required. A definition of the dns authorization to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\DnsAuthorization|null + */ + public function getDnsAuthorization() + { + return $this->dns_authorization; + } + + public function hasDnsAuthorization() + { + return isset($this->dns_authorization); + } + + public function clearDnsAuthorization() + { + unset($this->dns_authorization); + } + + /** + * Required. A definition of the dns authorization to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization $var + * @return $this + */ + public function setDnsAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\DnsAuthorization::class); + $this->dns_authorization = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateTrustConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateTrustConfigRequest.php new file mode 100644 index 000000000000..821b07d26099 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateTrustConfigRequest.php @@ -0,0 +1,173 @@ +google.cloud.certificatemanager.v1.CreateTrustConfigRequest + */ +class CreateTrustConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the TrustConfig. Must be in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A user-provided name of the TrustConfig. Must match the regexp + * `[a-z0-9-]{1,63}`. + * + * Generated from protobuf field string trust_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trust_config_id = ''; + /** + * Required. A definition of the TrustConfig to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trust_config = null; + + /** + * @param string $parent Required. The parent resource of the TrustConfig. Must be in the format + * `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\CertificateManager\V1\TrustConfig $trustConfig Required. A definition of the TrustConfig to create. + * @param string $trustConfigId Required. A user-provided name of the TrustConfig. Must match the regexp + * `[a-z0-9-]{1,63}`. + * + * @return \Google\Cloud\CertificateManager\V1\CreateTrustConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\CertificateManager\V1\TrustConfig $trustConfig, string $trustConfigId): self + { + return (new self()) + ->setParent($parent) + ->setTrustConfig($trustConfig) + ->setTrustConfigId($trustConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the TrustConfig. Must be in the format + * `projects/*/locations/*`. + * @type string $trust_config_id + * Required. A user-provided name of the TrustConfig. Must match the regexp + * `[a-z0-9-]{1,63}`. + * @type \Google\Cloud\CertificateManager\V1\TrustConfig $trust_config + * Required. A definition of the TrustConfig to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the TrustConfig. Must be in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the TrustConfig. Must be in the format + * `projects/*/locations/*`. + * + * 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. A user-provided name of the TrustConfig. Must match the regexp + * `[a-z0-9-]{1,63}`. + * + * Generated from protobuf field string trust_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTrustConfigId() + { + return $this->trust_config_id; + } + + /** + * Required. A user-provided name of the TrustConfig. Must match the regexp + * `[a-z0-9-]{1,63}`. + * + * Generated from protobuf field string trust_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTrustConfigId($var) + { + GPBUtil::checkString($var, True); + $this->trust_config_id = $var; + + return $this; + } + + /** + * Required. A definition of the TrustConfig to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\TrustConfig|null + */ + public function getTrustConfig() + { + return $this->trust_config; + } + + public function hasTrustConfig() + { + return isset($this->trust_config); + } + + public function clearTrustConfig() + { + unset($this->trust_config); + } + + /** + * Required. A definition of the TrustConfig to create. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\TrustConfig $var + * @return $this + */ + public function setTrustConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\TrustConfig::class); + $this->trust_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateIssuanceConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateIssuanceConfigRequest.php new file mode 100644 index 000000000000..b2c6e62341d8 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateIssuanceConfigRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest + */ +class DeleteCertificateIssuanceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the certificate issuance config to delete. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the certificate issuance config to delete. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. Please see + * {@see CertificateManagerClient::certificateIssuanceConfigName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\DeleteCertificateIssuanceConfigRequest + * + * @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. A name of the certificate issuance config to delete. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the certificate issuance config to delete. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + * + * 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. A name of the certificate issuance config to delete. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapEntryRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapEntryRequest.php new file mode 100644 index 000000000000..da88e1c8e7bf --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapEntryRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest + */ +class DeleteCertificateMapEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the certificate map entry to delete. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the certificate map entry to delete. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. Please see + * {@see CertificateManagerClient::certificateMapEntryName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\DeleteCertificateMapEntryRequest + * + * @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. A name of the certificate map entry to delete. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the certificate map entry to delete. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * + * 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. A name of the certificate map entry to delete. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapRequest.php new file mode 100644 index 000000000000..af8072648b58 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + */ +class DeleteCertificateMapRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the certificate map to delete. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the certificate map to delete. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. Please see + * {@see CertificateManagerClient::certificateMapName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\DeleteCertificateMapRequest + * + * @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. A name of the certificate map to delete. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the certificate map to delete. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * + * 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. A name of the certificate map to delete. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateRequest.php new file mode 100644 index 000000000000..a9a7e8cfeed0 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.DeleteCertificateRequest + */ +class DeleteCertificateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the certificate to delete. Must be in the format + * `projects/*/locations/*/certificates/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the certificate to delete. Must be in the format + * `projects/*/locations/*/certificates/*`. Please see + * {@see CertificateManagerClient::certificateName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\DeleteCertificateRequest + * + * @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. A name of the certificate to delete. Must be in the format + * `projects/*/locations/*/certificates/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the certificate to delete. Must be in the format + * `projects/*/locations/*/certificates/*`. + * + * 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. A name of the certificate to delete. Must be in the format + * `projects/*/locations/*/certificates/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteDnsAuthorizationRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteDnsAuthorizationRequest.php new file mode 100644 index 000000000000..278f4c74e2f0 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteDnsAuthorizationRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + */ +class DeleteDnsAuthorizationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the dns authorization to delete. Must be in the format + * `projects/*/locations/*/dnsAuthorizations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the dns authorization to delete. Must be in the format + * `projects/*/locations/*/dnsAuthorizations/*`. Please see + * {@see CertificateManagerClient::dnsAuthorizationName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\DeleteDnsAuthorizationRequest + * + * @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. A name of the dns authorization to delete. Must be in the format + * `projects/*/locations/*/dnsAuthorizations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the dns authorization to delete. Must be in the format + * `projects/*/locations/*/dnsAuthorizations/*`. + * + * 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. A name of the dns authorization to delete. Must be in the format + * `projects/*/locations/*/dnsAuthorizations/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteTrustConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteTrustConfigRequest.php new file mode 100644 index 000000000000..ac6965adb38c --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteTrustConfigRequest.php @@ -0,0 +1,128 @@ +google.cloud.certificatemanager.v1.DeleteTrustConfigRequest + */ +class DeleteTrustConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the TrustConfig to delete. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The current etag of the TrustConfig. + * If an etag is provided and does not match the current etag of the resource, + * deletion will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + + /** + * @param string $name Required. A name of the TrustConfig to delete. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. Please see + * {@see CertificateManagerClient::trustConfigName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\DeleteTrustConfigRequest + * + * @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. A name of the TrustConfig to delete. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. + * @type string $etag + * The current etag of the TrustConfig. + * If an etag is provided and does not match the current etag of the resource, + * deletion will be blocked and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the TrustConfig to delete. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. + * + * 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. A name of the TrustConfig to delete. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The current etag of the TrustConfig. + * If an etag is provided and does not match the current etag of the resource, + * deletion will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The current etag of the TrustConfig. + * If an etag is provided and does not match the current etag of the resource, + * deletion will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization.php new file mode 100644 index 000000000000..0b8be3dbfa8e --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization.php @@ -0,0 +1,368 @@ +google.cloud.certificatemanager.v1.DnsAuthorization + */ +class DnsAuthorization extends \Google\Protobuf\Internal\Message +{ + /** + * A user-defined name of the dns authorization. DnsAuthorization names must + * be unique globally and match pattern + * `projects/*/locations/*/dnsAuthorizations/*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation timestamp of a DnsAuthorization. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of a DnsAuthorization. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Set of labels associated with a DnsAuthorization. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * One or more paragraphs of text description of a DnsAuthorization. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Required. Immutable. A domain that is being authorized. A DnsAuthorization + * resource covers a single domain and its wildcard, e.g. authorization for + * `example.com` can be used to issue certificates for `example.com` and + * `*.example.com`. + * + * Generated from protobuf field string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $domain = ''; + /** + * Output only. DNS Resource Record that needs to be added to DNS + * configuration. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dns_resource_record = null; + /** + * Immutable. Type of DnsAuthorization. If unset during resource creation the + * following default will be used: + * - in location global: FIXED_RECORD. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A user-defined name of the dns authorization. DnsAuthorization names must + * be unique globally and match pattern + * `projects/*/locations/*/dnsAuthorizations/*`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of a DnsAuthorization. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of a DnsAuthorization. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of labels associated with a DnsAuthorization. + * @type string $description + * One or more paragraphs of text description of a DnsAuthorization. + * @type string $domain + * Required. Immutable. A domain that is being authorized. A DnsAuthorization + * resource covers a single domain and its wildcard, e.g. authorization for + * `example.com` can be used to issue certificates for `example.com` and + * `*.example.com`. + * @type \Google\Cloud\CertificateManager\V1\DnsAuthorization\DnsResourceRecord $dns_resource_record + * Output only. DNS Resource Record that needs to be added to DNS + * configuration. + * @type int $type + * Immutable. Type of DnsAuthorization. If unset during resource creation the + * following default will be used: + * - in location global: FIXED_RECORD. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * A user-defined name of the dns authorization. DnsAuthorization names must + * be unique globally and match pattern + * `projects/*/locations/*/dnsAuthorizations/*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A user-defined name of the dns authorization. DnsAuthorization names must + * be unique globally and match pattern + * `projects/*/locations/*/dnsAuthorizations/*`. + * + * 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; + } + + /** + * Output only. The creation timestamp of a DnsAuthorization. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a DnsAuthorization. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 last update timestamp of a DnsAuthorization. + * + * 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. The last update timestamp of a DnsAuthorization. + * + * 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; + } + + /** + * Set of labels associated with a DnsAuthorization. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of labels associated with a DnsAuthorization. + * + * Generated from protobuf field map labels = 4; + * @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; + } + + /** + * One or more paragraphs of text description of a DnsAuthorization. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * One or more paragraphs of text description of a DnsAuthorization. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Immutable. A domain that is being authorized. A DnsAuthorization + * resource covers a single domain and its wildcard, e.g. authorization for + * `example.com` can be used to issue certificates for `example.com` and + * `*.example.com`. + * + * Generated from protobuf field string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Required. Immutable. A domain that is being authorized. A DnsAuthorization + * resource covers a single domain and its wildcard, e.g. authorization for + * `example.com` can be used to issue certificates for `example.com` and + * `*.example.com`. + * + * Generated from protobuf field string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + + /** + * Output only. DNS Resource Record that needs to be added to DNS + * configuration. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\CertificateManager\V1\DnsAuthorization\DnsResourceRecord|null + */ + public function getDnsResourceRecord() + { + return $this->dns_resource_record; + } + + public function hasDnsResourceRecord() + { + return isset($this->dns_resource_record); + } + + public function clearDnsResourceRecord() + { + unset($this->dns_resource_record); + } + + /** + * Output only. DNS Resource Record that needs to be added to DNS + * configuration. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization\DnsResourceRecord $var + * @return $this + */ + public function setDnsResourceRecord($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\DnsAuthorization\DnsResourceRecord::class); + $this->dns_resource_record = $var; + + return $this; + } + + /** + * Immutable. Type of DnsAuthorization. If unset during resource creation the + * following default will be used: + * - in location global: FIXED_RECORD. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Immutable. Type of DnsAuthorization. If unset during resource creation the + * following default will be used: + * - in location global: FIXED_RECORD. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\DnsAuthorization\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/DnsResourceRecord.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/DnsResourceRecord.php new file mode 100644 index 000000000000..285655ab9ae8 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/DnsResourceRecord.php @@ -0,0 +1,148 @@ +google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + */ +class DnsResourceRecord extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Fully qualified name of the DNS Resource Record. + * e.g. `_acme-challenge.example.com` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Type of the DNS Resource Record. + * Currently always set to "CNAME". + * + * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = ''; + /** + * Output only. Data of the DNS Resource Record. + * + * Generated from protobuf field string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Fully qualified name of the DNS Resource Record. + * e.g. `_acme-challenge.example.com` + * @type string $type + * Output only. Type of the DNS Resource Record. + * Currently always set to "CNAME". + * @type string $data + * Output only. Data of the DNS Resource Record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Fully qualified name of the DNS Resource Record. + * e.g. `_acme-challenge.example.com` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Fully qualified name of the DNS Resource Record. + * e.g. `_acme-challenge.example.com` + * + * 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. Type of the DNS Resource Record. + * Currently always set to "CNAME". + * + * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. Type of the DNS Resource Record. + * Currently always set to "CNAME". + * + * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Output only. Data of the DNS Resource Record. + * + * Generated from protobuf field string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Output only. Data of the DNS Resource Record. + * + * Generated from protobuf field string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, True); + $this->data = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DnsResourceRecord::class, \Google\Cloud\CertificateManager\V1\DnsAuthorization_DnsResourceRecord::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/Type.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/Type.php new file mode 100644 index 000000000000..94be08ae1970 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/Type.php @@ -0,0 +1,66 @@ +google.cloud.certificatemanager.v1.DnsAuthorization.Type + */ +class Type +{ + /** + * Type is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * FIXED_RECORD DNS authorization uses DNS-01 validation method. + * + * Generated from protobuf enum FIXED_RECORD = 1; + */ + const FIXED_RECORD = 1; + /** + * PER_PROJECT_RECORD DNS authorization allows for independent management + * of Google-managed certificates with DNS authorization across multiple + * projects. + * + * Generated from protobuf enum PER_PROJECT_RECORD = 2; + */ + const PER_PROJECT_RECORD = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::FIXED_RECORD => 'FIXED_RECORD', + self::PER_PROJECT_RECORD => 'PER_PROJECT_RECORD', + ]; + + 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\CertificateManager\V1\DnsAuthorization_Type::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateIssuanceConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateIssuanceConfigRequest.php new file mode 100644 index 000000000000..80b51ae92c5f --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateIssuanceConfigRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest + */ +class GetCertificateIssuanceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the certificate issuance config to describe. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the certificate issuance config to describe. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. Please see + * {@see CertificateManagerClient::certificateIssuanceConfigName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\GetCertificateIssuanceConfigRequest + * + * @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. A name of the certificate issuance config to describe. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the certificate issuance config to describe. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + * + * 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. A name of the certificate issuance config to describe. Must be in + * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapEntryRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapEntryRequest.php new file mode 100644 index 000000000000..8b44fefcef84 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapEntryRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + */ +class GetCertificateMapEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the certificate map entry to describe. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the certificate map entry to describe. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. Please see + * {@see CertificateManagerClient::certificateMapEntryName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\GetCertificateMapEntryRequest + * + * @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. A name of the certificate map entry to describe. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the certificate map entry to describe. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * + * 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. A name of the certificate map entry to describe. Must be in the + * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapRequest.php new file mode 100644 index 000000000000..e71586d22dad --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.GetCertificateMapRequest + */ +class GetCertificateMapRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the certificate map to describe. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the certificate map to describe. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. Please see + * {@see CertificateManagerClient::certificateMapName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\GetCertificateMapRequest + * + * @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. A name of the certificate map to describe. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the certificate map to describe. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * + * 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. A name of the certificate map to describe. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateRequest.php new file mode 100644 index 000000000000..f7653fe02230 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.GetCertificateRequest + */ +class GetCertificateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the certificate to describe. Must be in the format + * `projects/*/locations/*/certificates/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the certificate to describe. Must be in the format + * `projects/*/locations/*/certificates/*`. Please see + * {@see CertificateManagerClient::certificateName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\GetCertificateRequest + * + * @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. A name of the certificate to describe. Must be in the format + * `projects/*/locations/*/certificates/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the certificate to describe. Must be in the format + * `projects/*/locations/*/certificates/*`. + * + * 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. A name of the certificate to describe. Must be in the format + * `projects/*/locations/*/certificates/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetDnsAuthorizationRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetDnsAuthorizationRequest.php new file mode 100644 index 000000000000..31910ab7b79c --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetDnsAuthorizationRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest + */ +class GetDnsAuthorizationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the dns authorization to describe. Must be in the + * format `projects/*/locations/*/dnsAuthorizations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the dns authorization to describe. Must be in the + * format `projects/*/locations/*/dnsAuthorizations/*`. Please see + * {@see CertificateManagerClient::dnsAuthorizationName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\GetDnsAuthorizationRequest + * + * @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. A name of the dns authorization to describe. Must be in the + * format `projects/*/locations/*/dnsAuthorizations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the dns authorization to describe. Must be in the + * format `projects/*/locations/*/dnsAuthorizations/*`. + * + * 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. A name of the dns authorization to describe. Must be in the + * format `projects/*/locations/*/dnsAuthorizations/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetTrustConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetTrustConfigRequest.php new file mode 100644 index 000000000000..d5c38e8cab6b --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetTrustConfigRequest.php @@ -0,0 +1,86 @@ +google.cloud.certificatemanager.v1.GetTrustConfigRequest + */ +class GetTrustConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the TrustConfig to describe. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the TrustConfig to describe. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. Please see + * {@see CertificateManagerClient::trustConfigName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\GetTrustConfigRequest + * + * @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. A name of the TrustConfig to describe. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the TrustConfig to describe. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. + * + * 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. A name of the TrustConfig to describe. Must be in the format + * `projects/*/locations/*/trustConfigs/*`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsRequest.php new file mode 100644 index 000000000000..7a6d6405799e --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsRequest.php @@ -0,0 +1,242 @@ +google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest + */ +class ListCertificateIssuanceConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of certificate configs to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListCertificateIssuanceConfigsResponse`. + * Indicates that this is a continuation of a prior + * `ListCertificateIssuanceConfigs` call, and that the system should return + * the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter expression to restrict the Certificates Configs returned. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * A list of Certificate Config field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\ListCertificateIssuanceConfigsRequest + * + * @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 project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. + * @type int $page_size + * Maximum number of certificate configs to return per call. + * @type string $page_token + * The value returned by the last `ListCertificateIssuanceConfigsResponse`. + * Indicates that this is a continuation of a prior + * `ListCertificateIssuanceConfigs` call, and that the system should return + * the next page of data. + * @type string $filter + * Filter expression to restrict the Certificates Configs returned. + * @type string $order_by + * A list of Certificate Config field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. + * + * 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 project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. + * + * 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; + } + + /** + * Maximum number of certificate configs to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of certificate configs to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListCertificateIssuanceConfigsResponse`. + * Indicates that this is a continuation of a prior + * `ListCertificateIssuanceConfigs` call, and that the system should return + * the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListCertificateIssuanceConfigsResponse`. + * Indicates that this is a continuation of a prior + * `ListCertificateIssuanceConfigs` call, and that the system should return + * the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter expression to restrict the Certificates Configs returned. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter expression to restrict the Certificates Configs returned. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A list of Certificate Config field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * A list of Certificate Config field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsResponse.php new file mode 100644 index 000000000000..8dfe8101b161 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsResponse.php @@ -0,0 +1,143 @@ +google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse + */ +class ListCertificateIssuanceConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of certificate configs for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_configs = 1; + */ + private $certificate_issuance_configs; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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\CertificateManager\V1\CertificateIssuanceConfig>|\Google\Protobuf\Internal\RepeatedField $certificate_issuance_configs + * A list of certificate configs for the parent resource. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * A list of certificate configs for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCertificateIssuanceConfigs() + { + return $this->certificate_issuance_configs; + } + + /** + * A list of certificate configs for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_configs = 1; + * @param array<\Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCertificateIssuanceConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig::class); + $this->certificate_issuance_configs = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesRequest.php new file mode 100644 index 000000000000..cb5af48aa95f --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesRequest.php @@ -0,0 +1,259 @@ +google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest + */ +class ListCertificateMapEntriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project, location and certificate map from which the + * certificate map entries should be listed, specified in the format + * `projects/*/locations/*/certificateMaps/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of certificate map entries to return. The service may return + * fewer than this value. + * If unspecified, at most 50 certificate map entries will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListCertificateMapEntriesResponse`. + * Indicates that this is a continuation of a prior + * `ListCertificateMapEntries` call, and that the system should return the + * next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter expression to restrict the returned Certificate Map Entries. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * A list of Certificate Map Entry field names used to specify + * the order of the returned results. The default sorting order is ascending. + * To specify descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project, location and certificate map from which the + * certificate map entries should be listed, specified in the format + * `projects/*/locations/*/certificateMaps/*`. Please see + * {@see CertificateManagerClient::certificateMapName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\ListCertificateMapEntriesRequest + * + * @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 project, location and certificate map from which the + * certificate map entries should be listed, specified in the format + * `projects/*/locations/*/certificateMaps/*`. + * @type int $page_size + * Maximum number of certificate map entries to return. The service may return + * fewer than this value. + * If unspecified, at most 50 certificate map entries will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * The value returned by the last `ListCertificateMapEntriesResponse`. + * Indicates that this is a continuation of a prior + * `ListCertificateMapEntries` call, and that the system should return the + * next page of data. + * @type string $filter + * Filter expression to restrict the returned Certificate Map Entries. + * @type string $order_by + * A list of Certificate Map Entry field names used to specify + * the order of the returned results. The default sorting order is ascending. + * To specify descending order for a field, add a suffix `" desc"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project, location and certificate map from which the + * certificate map entries should be listed, specified in the format + * `projects/*/locations/*/certificateMaps/*`. + * + * 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 project, location and certificate map from which the + * certificate map entries should be listed, specified in the format + * `projects/*/locations/*/certificateMaps/*`. + * + * 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; + } + + /** + * Maximum number of certificate map entries to return. The service may return + * fewer than this value. + * If unspecified, at most 50 certificate map entries will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of certificate map entries to return. The service may return + * fewer than this value. + * If unspecified, at most 50 certificate map entries will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListCertificateMapEntriesResponse`. + * Indicates that this is a continuation of a prior + * `ListCertificateMapEntries` call, and that the system should return the + * next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListCertificateMapEntriesResponse`. + * Indicates that this is a continuation of a prior + * `ListCertificateMapEntries` call, and that the system should return the + * next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter expression to restrict the returned Certificate Map Entries. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter expression to restrict the returned Certificate Map Entries. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A list of Certificate Map Entry field names used to specify + * the order of the returned results. The default sorting order is ascending. + * To specify descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * A list of Certificate Map Entry field names used to specify + * the order of the returned results. The default sorting order is ascending. + * To specify descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesResponse.php new file mode 100644 index 000000000000..35b8335bce6a --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesResponse.php @@ -0,0 +1,143 @@ +google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + */ +class ListCertificateMapEntriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of certificate map entries for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + */ + private $certificate_map_entries; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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\CertificateManager\V1\CertificateMapEntry>|\Google\Protobuf\Internal\RepeatedField $certificate_map_entries + * A list of certificate map entries for the parent resource. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * A list of certificate map entries for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCertificateMapEntries() + { + return $this->certificate_map_entries; + } + + /** + * A list of certificate map entries for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * @param array<\Google\Cloud\CertificateManager\V1\CertificateMapEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCertificateMapEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateMapEntry::class); + $this->certificate_map_entries = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsRequest.php new file mode 100644 index 000000000000..57e5279d0399 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsRequest.php @@ -0,0 +1,238 @@ +google.cloud.certificatemanager.v1.ListCertificateMapsRequest + */ +class ListCertificateMapsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the certificate maps should + * be listed, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of certificate maps to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListCertificateMapsResponse`. Indicates + * that this is a continuation of a prior `ListCertificateMaps` call, and that + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter expression to restrict the Certificates Maps returned. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * A list of Certificate Map field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location from which the certificate maps should + * be listed, specified in the format `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\ListCertificateMapsRequest + * + * @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 project and location from which the certificate maps should + * be listed, specified in the format `projects/*/locations/*`. + * @type int $page_size + * Maximum number of certificate maps to return per call. + * @type string $page_token + * The value returned by the last `ListCertificateMapsResponse`. Indicates + * that this is a continuation of a prior `ListCertificateMaps` call, and that + * the system should return the next page of data. + * @type string $filter + * Filter expression to restrict the Certificates Maps returned. + * @type string $order_by + * A list of Certificate Map field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the certificate maps should + * be listed, specified in the format `projects/*/locations/*`. + * + * 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 project and location from which the certificate maps should + * be listed, specified in the format `projects/*/locations/*`. + * + * 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; + } + + /** + * Maximum number of certificate maps to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of certificate maps to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListCertificateMapsResponse`. Indicates + * that this is a continuation of a prior `ListCertificateMaps` call, and that + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListCertificateMapsResponse`. Indicates + * that this is a continuation of a prior `ListCertificateMaps` call, and that + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter expression to restrict the Certificates Maps returned. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter expression to restrict the Certificates Maps returned. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A list of Certificate Map field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * A list of Certificate Map field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsResponse.php new file mode 100644 index 000000000000..7d953e5e8fe3 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsResponse.php @@ -0,0 +1,143 @@ +google.cloud.certificatemanager.v1.ListCertificateMapsResponse + */ +class ListCertificateMapsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of certificate maps for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + private $certificate_maps; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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\CertificateManager\V1\CertificateMap>|\Google\Protobuf\Internal\RepeatedField $certificate_maps + * A list of certificate maps for the parent resource. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * A list of certificate maps for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCertificateMaps() + { + return $this->certificate_maps; + } + + /** + * A list of certificate maps for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * @param array<\Google\Cloud\CertificateManager\V1\CertificateMap>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCertificateMaps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateMap::class); + $this->certificate_maps = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesRequest.php new file mode 100644 index 000000000000..b3961d49e241 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesRequest.php @@ -0,0 +1,238 @@ +google.cloud.certificatemanager.v1.ListCertificatesRequest + */ +class ListCertificatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of certificates to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListCertificatesResponse`. Indicates that + * this is a continuation of a prior `ListCertificates` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter expression to restrict the Certificates returned. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * A list of Certificate field names used to specify the order of the returned + * results. The default sorting order is ascending. To specify descending + * order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\ListCertificatesRequest + * + * @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 project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. + * @type int $page_size + * Maximum number of certificates to return per call. + * @type string $page_token + * The value returned by the last `ListCertificatesResponse`. Indicates that + * this is a continuation of a prior `ListCertificates` call, and that the + * system should return the next page of data. + * @type string $filter + * Filter expression to restrict the Certificates returned. + * @type string $order_by + * A list of Certificate field names used to specify the order of the returned + * results. The default sorting order is ascending. To specify descending + * order for a field, add a suffix `" desc"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. + * + * 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 project and location from which the certificate should be + * listed, specified in the format `projects/*/locations/*`. + * + * 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; + } + + /** + * Maximum number of certificates to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of certificates to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListCertificatesResponse`. Indicates that + * this is a continuation of a prior `ListCertificates` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListCertificatesResponse`. Indicates that + * this is a continuation of a prior `ListCertificates` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter expression to restrict the Certificates returned. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter expression to restrict the Certificates returned. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A list of Certificate field names used to specify the order of the returned + * results. The default sorting order is ascending. To specify descending + * order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * A list of Certificate field names used to specify the order of the returned + * results. The default sorting order is ascending. To specify descending + * order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesResponse.php new file mode 100644 index 000000000000..c3a2b6c79ee3 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesResponse.php @@ -0,0 +1,143 @@ +google.cloud.certificatemanager.v1.ListCertificatesResponse + */ +class ListCertificatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of certificates for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + private $certificates; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * A list of 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\CertificateManager\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $certificates + * A list of certificates for the parent resource. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * A list of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * A list of certificates for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCertificates() + { + return $this->certificates; + } + + /** + * A list of certificates for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + * @param array<\Google\Cloud\CertificateManager\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCertificates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\Certificate::class); + $this->certificates = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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; + } + + /** + * A list of 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; + } + + /** + * A list of 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsRequest.php new file mode 100644 index 000000000000..d7f7c2a9dfdc --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsRequest.php @@ -0,0 +1,238 @@ +google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + */ +class ListDnsAuthorizationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the dns authorizations should + * be listed, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of dns authorizations to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates + * that this is a continuation of a prior `ListDnsAuthorizations` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter expression to restrict the Dns Authorizations returned. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * A list of Dns Authorization field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location from which the dns authorizations should + * be listed, specified in the format `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\ListDnsAuthorizationsRequest + * + * @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 project and location from which the dns authorizations should + * be listed, specified in the format `projects/*/locations/*`. + * @type int $page_size + * Maximum number of dns authorizations to return per call. + * @type string $page_token + * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates + * that this is a continuation of a prior `ListDnsAuthorizations` call, and + * that the system should return the next page of data. + * @type string $filter + * Filter expression to restrict the Dns Authorizations returned. + * @type string $order_by + * A list of Dns Authorization field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the dns authorizations should + * be listed, specified in the format `projects/*/locations/*`. + * + * 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 project and location from which the dns authorizations should + * be listed, specified in the format `projects/*/locations/*`. + * + * 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; + } + + /** + * Maximum number of dns authorizations to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of dns authorizations to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates + * that this is a continuation of a prior `ListDnsAuthorizations` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates + * that this is a continuation of a prior `ListDnsAuthorizations` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter expression to restrict the Dns Authorizations returned. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter expression to restrict the Dns Authorizations returned. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A list of Dns Authorization field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * A list of Dns Authorization field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsResponse.php new file mode 100644 index 000000000000..ebe8652bff26 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsResponse.php @@ -0,0 +1,143 @@ +google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + */ +class ListDnsAuthorizationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of dns authorizations for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + */ + private $dns_authorizations; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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\CertificateManager\V1\DnsAuthorization>|\Google\Protobuf\Internal\RepeatedField $dns_authorizations + * A list of dns authorizations for the parent resource. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * A list of dns authorizations for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDnsAuthorizations() + { + return $this->dns_authorizations; + } + + /** + * A list of dns authorizations for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * @param array<\Google\Cloud\CertificateManager\V1\DnsAuthorization>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDnsAuthorizations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\DnsAuthorization::class); + $this->dns_authorizations = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsRequest.php new file mode 100644 index 000000000000..4b021251d28e --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsRequest.php @@ -0,0 +1,238 @@ +google.cloud.certificatemanager.v1.ListTrustConfigsRequest + */ +class ListTrustConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the TrustConfigs should be + * listed, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of TrustConfigs to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListTrustConfigsResponse`. Indicates + * that this is a continuation of a prior `ListTrustConfigs` call, and that + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter expression to restrict the TrustConfigs returned. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * A list of TrustConfig field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location from which the TrustConfigs should be + * listed, specified in the format `projects/*/locations/*`. Please see + * {@see CertificateManagerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\CertificateManager\V1\ListTrustConfigsRequest + * + * @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 project and location from which the TrustConfigs should be + * listed, specified in the format `projects/*/locations/*`. + * @type int $page_size + * Maximum number of TrustConfigs to return per call. + * @type string $page_token + * The value returned by the last `ListTrustConfigsResponse`. Indicates + * that this is a continuation of a prior `ListTrustConfigs` call, and that + * the system should return the next page of data. + * @type string $filter + * Filter expression to restrict the TrustConfigs returned. + * @type string $order_by + * A list of TrustConfig field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the TrustConfigs should be + * listed, specified in the format `projects/*/locations/*`. + * + * 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 project and location from which the TrustConfigs should be + * listed, specified in the format `projects/*/locations/*`. + * + * 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; + } + + /** + * Maximum number of TrustConfigs to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of TrustConfigs to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListTrustConfigsResponse`. Indicates + * that this is a continuation of a prior `ListTrustConfigs` call, and that + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListTrustConfigsResponse`. Indicates + * that this is a continuation of a prior `ListTrustConfigs` call, and that + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter expression to restrict the TrustConfigs returned. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter expression to restrict the TrustConfigs returned. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A list of TrustConfig field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * A list of TrustConfig field names used to specify the order of the + * returned results. The default sorting order is ascending. To specify + * descending order for a field, add a suffix `" desc"`. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsResponse.php new file mode 100644 index 000000000000..74a445f8c490 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsResponse.php @@ -0,0 +1,143 @@ +google.cloud.certificatemanager.v1.ListTrustConfigsResponse + */ +class ListTrustConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of TrustConfigs for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig trust_configs = 1; + */ + private $trust_configs; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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\CertificateManager\V1\TrustConfig>|\Google\Protobuf\Internal\RepeatedField $trust_configs + * A list of TrustConfigs for the parent resource. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * A list of TrustConfigs for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig trust_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrustConfigs() + { + return $this->trust_configs; + } + + /** + * A list of TrustConfigs for the parent resource. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig trust_configs = 1; + * @param array<\Google\Cloud\CertificateManager\V1\TrustConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrustConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\TrustConfig::class); + $this->trust_configs = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/OperationMetadata.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/OperationMetadata.php new file mode 100644 index 000000000000..29a4297349a4 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.certificatemanager.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5; + */ + protected $status_message = ''; + /** + * 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; + */ + protected $requested_cancellation = false; + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Server-defined resource path for the target of the operation. + * @type string $verb + * Name of the verb executed by the operation. + * @type string $status_message + * Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * 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 + * API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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 the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * 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; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * 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; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + * @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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ServingState.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ServingState.php new file mode 100644 index 000000000000..93a9c1284a76 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ServingState.php @@ -0,0 +1,61 @@ +google.cloud.certificatemanager.v1.ServingState + */ +class ServingState +{ + /** + * The status is undefined. + * + * Generated from protobuf enum SERVING_STATE_UNSPECIFIED = 0; + */ + const SERVING_STATE_UNSPECIFIED = 0; + /** + * The configuration is serving. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Update is in progress. Some frontends may serve this configuration. + * + * Generated from protobuf enum PENDING = 2; + */ + const PENDING = 2; + + private static $valueToName = [ + self::SERVING_STATE_UNSPECIFIED => 'SERVING_STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + 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); + } +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig.php new file mode 100644 index 000000000000..1c6979319c90 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig.php @@ -0,0 +1,319 @@ +google.cloud.certificatemanager.v1.TrustConfig + */ +class TrustConfig extends \Google\Protobuf\Internal\Message +{ + /** + * A user-defined name of the trust config. TrustConfig names must be + * unique globally and match pattern + * `projects/*/locations/*/trustConfigs/*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation timestamp of a TrustConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of a TrustConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Set of labels associated with a TrustConfig. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * One or more paragraphs of text description of a TrustConfig. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * 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 = 6; + */ + protected $etag = ''; + /** + * Set of trust stores to perform validation against. + * This field is supported when TrustConfig is configured with Load Balancers, + * currently not supported for SPIFFE certificate validation. + * Only one TrustStore specified is currently allowed. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustStore trust_stores = 8; + */ + private $trust_stores; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A user-defined name of the trust config. TrustConfig names must be + * unique globally and match pattern + * `projects/*/locations/*/trustConfigs/*`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of a TrustConfig. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of a TrustConfig. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of labels associated with a TrustConfig. + * @type string $description + * One or more paragraphs of text description of a TrustConfig. + * @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 array<\Google\Cloud\CertificateManager\V1\TrustConfig\TrustStore>|\Google\Protobuf\Internal\RepeatedField $trust_stores + * Set of trust stores to perform validation against. + * This field is supported when TrustConfig is configured with Load Balancers, + * currently not supported for SPIFFE certificate validation. + * Only one TrustStore specified is currently allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * A user-defined name of the trust config. TrustConfig names must be + * unique globally and match pattern + * `projects/*/locations/*/trustConfigs/*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A user-defined name of the trust config. TrustConfig names must be + * unique globally and match pattern + * `projects/*/locations/*/trustConfigs/*`. + * + * 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; + } + + /** + * Output only. The creation timestamp of a TrustConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a TrustConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 last update timestamp of a TrustConfig. + * + * 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. The last update timestamp of a TrustConfig. + * + * 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; + } + + /** + * Set of labels associated with a TrustConfig. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of labels associated with a TrustConfig. + * + * Generated from protobuf field map labels = 4; + * @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; + } + + /** + * One or more paragraphs of text description of a TrustConfig. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * One or more paragraphs of text description of a TrustConfig. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $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 = 6; + * @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 = 6; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Set of trust stores to perform validation against. + * This field is supported when TrustConfig is configured with Load Balancers, + * currently not supported for SPIFFE certificate validation. + * Only one TrustStore specified is currently allowed. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustStore trust_stores = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrustStores() + { + return $this->trust_stores; + } + + /** + * Set of trust stores to perform validation against. + * This field is supported when TrustConfig is configured with Load Balancers, + * currently not supported for SPIFFE certificate validation. + * Only one TrustStore specified is currently allowed. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustStore trust_stores = 8; + * @param array<\Google\Cloud\CertificateManager\V1\TrustConfig\TrustStore>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrustStores($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\TrustConfig\TrustStore::class); + $this->trust_stores = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/IntermediateCA.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/IntermediateCA.php new file mode 100644 index 000000000000..3632b6bdf690 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/IntermediateCA.php @@ -0,0 +1,84 @@ +google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA + */ +class IntermediateCA extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pem_certificate + * PEM intermediate certificate used for building up paths + * for validation. + * Each certificate provided in PEM format may occupy up to 5kB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * PEM intermediate certificate used for building up paths + * for validation. + * Each certificate provided in PEM format may occupy up to 5kB. + * + * Generated from protobuf field string pem_certificate = 1; + * @return string + */ + public function getPemCertificate() + { + return $this->readOneof(1); + } + + public function hasPemCertificate() + { + return $this->hasOneof(1); + } + + /** + * PEM intermediate certificate used for building up paths + * for validation. + * Each certificate provided in PEM format may occupy up to 5kB. + * + * Generated from protobuf field string pem_certificate = 1; + * @param string $var + * @return $this + */ + public function setPemCertificate($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IntermediateCA::class, \Google\Cloud\CertificateManager\V1\TrustConfig_IntermediateCA::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustAnchor.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustAnchor.php new file mode 100644 index 000000000000..9301931143e1 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustAnchor.php @@ -0,0 +1,81 @@ +google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor + */ +class TrustAnchor extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pem_certificate + * PEM root certificate of the PKI used for validation. + * Each certificate provided in PEM format may occupy up to 5kB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * PEM root certificate of the PKI used for validation. + * Each certificate provided in PEM format may occupy up to 5kB. + * + * Generated from protobuf field string pem_certificate = 1; + * @return string + */ + public function getPemCertificate() + { + return $this->readOneof(1); + } + + public function hasPemCertificate() + { + return $this->hasOneof(1); + } + + /** + * PEM root certificate of the PKI used for validation. + * Each certificate provided in PEM format may occupy up to 5kB. + * + * Generated from protobuf field string pem_certificate = 1; + * @param string $var + * @return $this + */ + public function setPemCertificate($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TrustAnchor::class, \Google\Cloud\CertificateManager\V1\TrustConfig_TrustAnchor::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustStore.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustStore.php new file mode 100644 index 000000000000..d5c8c000c6ae --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustStore.php @@ -0,0 +1,120 @@ +google.cloud.certificatemanager.v1.TrustConfig.TrustStore + */ +class TrustStore extends \Google\Protobuf\Internal\Message +{ + /** + * List of Trust Anchors to be used while performing validation + * against a given TrustStore. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor trust_anchors = 1; + */ + private $trust_anchors; + /** + * Set of intermediate CA certificates used for the path building + * phase of chain validation. + * The field is currently not supported if TrustConfig is used for the + * workload certificate feature. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA intermediate_cas = 2; + */ + private $intermediate_cas; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\CertificateManager\V1\TrustConfig\TrustAnchor>|\Google\Protobuf\Internal\RepeatedField $trust_anchors + * List of Trust Anchors to be used while performing validation + * against a given TrustStore. + * @type array<\Google\Cloud\CertificateManager\V1\TrustConfig\IntermediateCA>|\Google\Protobuf\Internal\RepeatedField $intermediate_cas + * Set of intermediate CA certificates used for the path building + * phase of chain validation. + * The field is currently not supported if TrustConfig is used for the + * workload certificate feature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * List of Trust Anchors to be used while performing validation + * against a given TrustStore. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor trust_anchors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrustAnchors() + { + return $this->trust_anchors; + } + + /** + * List of Trust Anchors to be used while performing validation + * against a given TrustStore. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor trust_anchors = 1; + * @param array<\Google\Cloud\CertificateManager\V1\TrustConfig\TrustAnchor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrustAnchors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\TrustConfig\TrustAnchor::class); + $this->trust_anchors = $arr; + + return $this; + } + + /** + * Set of intermediate CA certificates used for the path building + * phase of chain validation. + * The field is currently not supported if TrustConfig is used for the + * workload certificate feature. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA intermediate_cas = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntermediateCas() + { + return $this->intermediate_cas; + } + + /** + * Set of intermediate CA certificates used for the path building + * phase of chain validation. + * The field is currently not supported if TrustConfig is used for the + * workload certificate feature. + * + * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA intermediate_cas = 2; + * @param array<\Google\Cloud\CertificateManager\V1\TrustConfig\IntermediateCA>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntermediateCas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\TrustConfig\IntermediateCA::class); + $this->intermediate_cas = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TrustStore::class, \Google\Cloud\CertificateManager\V1\TrustConfig_TrustStore::class); + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapEntryRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapEntryRequest.php new file mode 100644 index 000000000000..913b850a98cd --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapEntryRequest.php @@ -0,0 +1,146 @@ +google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest + */ +class UpdateCertificateMapEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A definition of the certificate map entry to create map entry. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_map_entry = null; + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificateMapEntry Required. A definition of the certificate map entry to create map entry. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * @return \Google\Cloud\CertificateManager\V1\UpdateCertificateMapEntryRequest + * + * @experimental + */ + public static function build(\Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificateMapEntry, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCertificateMapEntry($certificateMapEntry) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificate_map_entry + * Required. A definition of the certificate map entry to create map entry. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A definition of the certificate map entry to create map entry. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\CertificateMapEntry|null + */ + public function getCertificateMapEntry() + { + return $this->certificate_map_entry; + } + + public function hasCertificateMapEntry() + { + return isset($this->certificate_map_entry); + } + + public function clearCertificateMapEntry() + { + unset($this->certificate_map_entry); + } + + /** + * Required. A definition of the certificate map entry to create map entry. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\CertificateMapEntry $var + * @return $this + */ + public function setCertificateMapEntry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateMapEntry::class); + $this->certificate_map_entry = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapRequest.php new file mode 100644 index 000000000000..40f59853d238 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapRequest.php @@ -0,0 +1,146 @@ +google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + */ +class UpdateCertificateMapRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A definition of the certificate map to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate_map = null; + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap Required. A definition of the certificate map to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * @return \Google\Cloud\CertificateManager\V1\UpdateCertificateMapRequest + * + * @experimental + */ + public static function build(\Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCertificateMap($certificateMap) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\CertificateManager\V1\CertificateMap $certificate_map + * Required. A definition of the certificate map to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A definition of the certificate map to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\CertificateMap|null + */ + public function getCertificateMap() + { + return $this->certificate_map; + } + + public function hasCertificateMap() + { + return isset($this->certificate_map); + } + + public function clearCertificateMap() + { + unset($this->certificate_map); + } + + /** + * Required. A definition of the certificate map to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\CertificateMap $var + * @return $this + */ + public function setCertificateMap($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateMap::class); + $this->certificate_map = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateRequest.php new file mode 100644 index 000000000000..e83292dc17f9 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateRequest.php @@ -0,0 +1,146 @@ +google.cloud.certificatemanager.v1.UpdateCertificateRequest + */ +class UpdateCertificateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A definition of the certificate to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $certificate = null; + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\CertificateManager\V1\Certificate $certificate Required. A definition of the certificate to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * @return \Google\Cloud\CertificateManager\V1\UpdateCertificateRequest + * + * @experimental + */ + public static function build(\Google\Cloud\CertificateManager\V1\Certificate $certificate, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCertificate($certificate) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\CertificateManager\V1\Certificate $certificate + * Required. A definition of the certificate to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A definition of the certificate to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\Certificate|null + */ + public function getCertificate() + { + return $this->certificate; + } + + public function hasCertificate() + { + return isset($this->certificate); + } + + public function clearCertificate() + { + unset($this->certificate); + } + + /** + * Required. A definition of the certificate to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\Certificate $var + * @return $this + */ + public function setCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate::class); + $this->certificate = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateDnsAuthorizationRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateDnsAuthorizationRequest.php new file mode 100644 index 000000000000..52ae22852837 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateDnsAuthorizationRequest.php @@ -0,0 +1,146 @@ +google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + */ +class UpdateDnsAuthorizationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A definition of the dns authorization to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dns_authorization = null; + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization $dnsAuthorization Required. A definition of the dns authorization to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * @return \Google\Cloud\CertificateManager\V1\UpdateDnsAuthorizationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\CertificateManager\V1\DnsAuthorization $dnsAuthorization, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDnsAuthorization($dnsAuthorization) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\CertificateManager\V1\DnsAuthorization $dns_authorization + * Required. A definition of the dns authorization to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. A definition of the dns authorization to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\DnsAuthorization|null + */ + public function getDnsAuthorization() + { + return $this->dns_authorization; + } + + public function hasDnsAuthorization() + { + return isset($this->dns_authorization); + } + + public function clearDnsAuthorization() + { + unset($this->dns_authorization); + } + + /** + * Required. A definition of the dns authorization to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization $var + * @return $this + */ + public function setDnsAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\DnsAuthorization::class); + $this->dns_authorization = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateTrustConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateTrustConfigRequest.php new file mode 100644 index 000000000000..d4f6811c0ec2 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateTrustConfigRequest.php @@ -0,0 +1,146 @@ +google.cloud.certificatemanager.v1.UpdateTrustConfigRequest + */ +class UpdateTrustConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A definition of the TrustConfig to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trust_config = null; + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\CertificateManager\V1\TrustConfig $trustConfig Required. A definition of the TrustConfig to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * @return \Google\Cloud\CertificateManager\V1\UpdateTrustConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\CertificateManager\V1\TrustConfig $trustConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTrustConfig($trustConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\CertificateManager\V1\TrustConfig $trust_config + * Required. A definition of the TrustConfig to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. A definition of the TrustConfig to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\CertificateManager\V1\TrustConfig|null + */ + public function getTrustConfig() + { + return $this->trust_config; + } + + public function hasTrustConfig() + { + return isset($this->trust_config); + } + + public function clearTrustConfig() + { + unset($this->trust_config); + } + + /** + * Required. A definition of the TrustConfig to update. + * + * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\CertificateManager\V1\TrustConfig $var + * @return $this + */ + public function setTrustConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\TrustConfig::class); + $this->trust_config = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate.php new file mode 100644 index 000000000000..b7b0c10ba8e6 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate.php @@ -0,0 +1,89 @@ +setParent($formattedParent) + ->setCertificateId($certificateId) + ->setCertificate($certificate); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->createCertificate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Certificate $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + $certificateId = '[CERTIFICATE_ID]'; + + create_certificate_sample($formattedParent, $certificateId); +} +// [END certificatemanager_v1_generated_CertificateManager_CreateCertificate_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_issuance_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_issuance_config.php new file mode 100644 index 000000000000..c86e49e703da --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_issuance_config.php @@ -0,0 +1,113 @@ +setCertificateAuthorityConfig($certificateIssuanceConfigCertificateAuthorityConfig) + ->setLifetime($certificateIssuanceConfigLifetime) + ->setRotationWindowPercentage($certificateIssuanceConfigRotationWindowPercentage) + ->setKeyAlgorithm($certificateIssuanceConfigKeyAlgorithm); + $request = (new CreateCertificateIssuanceConfigRequest()) + ->setParent($formattedParent) + ->setCertificateIssuanceConfigId($certificateIssuanceConfigId) + ->setCertificateIssuanceConfig($certificateIssuanceConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->createCertificateIssuanceConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CertificateIssuanceConfig $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + $certificateIssuanceConfigId = '[CERTIFICATE_ISSUANCE_CONFIG_ID]'; + $certificateIssuanceConfigRotationWindowPercentage = 0; + $certificateIssuanceConfigKeyAlgorithm = KeyAlgorithm::KEY_ALGORITHM_UNSPECIFIED; + + create_certificate_issuance_config_sample( + $formattedParent, + $certificateIssuanceConfigId, + $certificateIssuanceConfigRotationWindowPercentage, + $certificateIssuanceConfigKeyAlgorithm + ); +} +// [END certificatemanager_v1_generated_CertificateManager_CreateCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map.php new file mode 100644 index 000000000000..6eb2c0040bdb --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map.php @@ -0,0 +1,89 @@ +setParent($formattedParent) + ->setCertificateMapId($certificateMapId) + ->setCertificateMap($certificateMap); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->createCertificateMap($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CertificateMap $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + $certificateMapId = '[CERTIFICATE_MAP_ID]'; + + create_certificate_map_sample($formattedParent, $certificateMapId); +} +// [END certificatemanager_v1_generated_CertificateManager_CreateCertificateMap_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map_entry.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map_entry.php new file mode 100644 index 000000000000..1c2cd0bfac54 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map_entry.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setCertificateMapEntryId($certificateMapEntryId) + ->setCertificateMapEntry($certificateMapEntry); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->createCertificateMapEntry($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CertificateMapEntry $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 = CertificateManagerClient::certificateMapName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE_MAP]' + ); + $certificateMapEntryId = '[CERTIFICATE_MAP_ENTRY_ID]'; + + create_certificate_map_entry_sample($formattedParent, $certificateMapEntryId); +} +// [END certificatemanager_v1_generated_CertificateManager_CreateCertificateMapEntry_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_dns_authorization.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_dns_authorization.php new file mode 100644 index 000000000000..161fc00f1d55 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_dns_authorization.php @@ -0,0 +1,98 @@ +setDomain($dnsAuthorizationDomain); + $request = (new CreateDnsAuthorizationRequest()) + ->setParent($formattedParent) + ->setDnsAuthorizationId($dnsAuthorizationId) + ->setDnsAuthorization($dnsAuthorization); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->createDnsAuthorization($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DnsAuthorization $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + $dnsAuthorizationId = '[DNS_AUTHORIZATION_ID]'; + $dnsAuthorizationDomain = '[DOMAIN]'; + + create_dns_authorization_sample($formattedParent, $dnsAuthorizationId, $dnsAuthorizationDomain); +} +// [END certificatemanager_v1_generated_CertificateManager_CreateDnsAuthorization_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_trust_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_trust_config.php new file mode 100644 index 000000000000..29b3c05ba3ff --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_trust_config.php @@ -0,0 +1,90 @@ +setParent($formattedParent) + ->setTrustConfigId($trustConfigId) + ->setTrustConfig($trustConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->createTrustConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TrustConfig $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + $trustConfigId = '[TRUST_CONFIG_ID]'; + + create_trust_config_sample($formattedParent, $trustConfigId); +} +// [END certificatemanager_v1_generated_CertificateManager_CreateTrustConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate.php new file mode 100644 index 000000000000..79018921b0aa --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->deleteCertificate($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 = CertificateManagerClient::certificateName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE]' + ); + + delete_certificate_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_DeleteCertificate_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php new file mode 100644 index 000000000000..1a69d0771ac2 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->deleteCertificateIssuanceConfig($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 = CertificateManagerClient::certificateIssuanceConfigName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE_ISSUANCE_CONFIG]' + ); + + delete_certificate_issuance_config_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_DeleteCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map.php new file mode 100644 index 000000000000..b07fe8f2820b --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->deleteCertificateMap($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 = CertificateManagerClient::certificateMapName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE_MAP]' + ); + + delete_certificate_map_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_DeleteCertificateMap_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map_entry.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map_entry.php new file mode 100644 index 000000000000..0f25c54cc822 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map_entry.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->deleteCertificateMapEntry($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 = CertificateManagerClient::certificateMapEntryName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE_MAP]', + '[CERTIFICATE_MAP_ENTRY]' + ); + + delete_certificate_map_entry_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_DeleteCertificateMapEntry_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_dns_authorization.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_dns_authorization.php new file mode 100644 index 000000000000..af0518dc4eed --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_dns_authorization.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->deleteDnsAuthorization($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 = CertificateManagerClient::dnsAuthorizationName( + '[PROJECT]', + '[LOCATION]', + '[DNS_AUTHORIZATION]' + ); + + delete_dns_authorization_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_DeleteDnsAuthorization_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_trust_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_trust_config.php new file mode 100644 index 000000000000..fb85115ae412 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_trust_config.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->deleteTrustConfig($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 = CertificateManagerClient::trustConfigName( + '[PROJECT]', + '[LOCATION]', + '[TRUST_CONFIG]' + ); + + delete_trust_config_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_DeleteTrustConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate.php new file mode 100644 index 000000000000..cb33a097875a --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Certificate $response */ + $response = $certificateManagerClient->getCertificate($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 = CertificateManagerClient::certificateName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE]' + ); + + get_certificate_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_GetCertificate_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_issuance_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_issuance_config.php new file mode 100644 index 000000000000..e19512679664 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_issuance_config.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CertificateIssuanceConfig $response */ + $response = $certificateManagerClient->getCertificateIssuanceConfig($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 = CertificateManagerClient::certificateIssuanceConfigName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE_ISSUANCE_CONFIG]' + ); + + get_certificate_issuance_config_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_GetCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map.php new file mode 100644 index 000000000000..0e749994bd0b --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CertificateMap $response */ + $response = $certificateManagerClient->getCertificateMap($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 = CertificateManagerClient::certificateMapName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE_MAP]' + ); + + get_certificate_map_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_GetCertificateMap_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map_entry.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map_entry.php new file mode 100644 index 000000000000..678dda0c34e5 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map_entry.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CertificateMapEntry $response */ + $response = $certificateManagerClient->getCertificateMapEntry($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 = CertificateManagerClient::certificateMapEntryName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE_MAP]', + '[CERTIFICATE_MAP_ENTRY]' + ); + + get_certificate_map_entry_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_GetCertificateMapEntry_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_dns_authorization.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_dns_authorization.php new file mode 100644 index 000000000000..dd1c2d545bc2 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_dns_authorization.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DnsAuthorization $response */ + $response = $certificateManagerClient->getDnsAuthorization($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 = CertificateManagerClient::dnsAuthorizationName( + '[PROJECT]', + '[LOCATION]', + '[DNS_AUTHORIZATION]' + ); + + get_dns_authorization_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_GetDnsAuthorization_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_location.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_location.php new file mode 100644 index 000000000000..fa41f81535e8 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/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 certificatemanager_v1_generated_CertificateManager_GetLocation_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_trust_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_trust_config.php new file mode 100644 index 000000000000..e791ef35f356 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_trust_config.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TrustConfig $response */ + $response = $certificateManagerClient->getTrustConfig($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 = CertificateManagerClient::trustConfigName( + '[PROJECT]', + '[LOCATION]', + '[TRUST_CONFIG]' + ); + + get_trust_config_sample($formattedName); +} +// [END certificatemanager_v1_generated_CertificateManager_GetTrustConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php new file mode 100644 index 000000000000..f00b6f079e0f --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $certificateManagerClient->listCertificateIssuanceConfigs($request); + + /** @var CertificateIssuanceConfig $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_certificate_issuance_configs_sample($formattedParent); +} +// [END certificatemanager_v1_generated_CertificateManager_ListCertificateIssuanceConfigs_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_map_entries.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_map_entries.php new file mode 100644 index 000000000000..b44956253b5c --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_map_entries.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $certificateManagerClient->listCertificateMapEntries($request); + + /** @var CertificateMapEntry $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 = CertificateManagerClient::certificateMapName( + '[PROJECT]', + '[LOCATION]', + '[CERTIFICATE_MAP]' + ); + + list_certificate_map_entries_sample($formattedParent); +} +// [END certificatemanager_v1_generated_CertificateManager_ListCertificateMapEntries_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_maps.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_maps.php new file mode 100644 index 000000000000..34d88f72fd78 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_maps.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $certificateManagerClient->listCertificateMaps($request); + + /** @var CertificateMap $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_certificate_maps_sample($formattedParent); +} +// [END certificatemanager_v1_generated_CertificateManager_ListCertificateMaps_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificates.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificates.php new file mode 100644 index 000000000000..ae784f16cefc --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificates.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $certificateManagerClient->listCertificates($request); + + /** @var Certificate $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_certificates_sample($formattedParent); +} +// [END certificatemanager_v1_generated_CertificateManager_ListCertificates_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_dns_authorizations.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_dns_authorizations.php new file mode 100644 index 000000000000..33eb22fac0ef --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_dns_authorizations.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $certificateManagerClient->listDnsAuthorizations($request); + + /** @var DnsAuthorization $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_dns_authorizations_sample($formattedParent); +} +// [END certificatemanager_v1_generated_CertificateManager_ListDnsAuthorizations_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_locations.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_locations.php new file mode 100644 index 000000000000..1f0cd8571592 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/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 certificatemanager_v1_generated_CertificateManager_ListLocations_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_trust_configs.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_trust_configs.php new file mode 100644 index 000000000000..e1667ef633d9 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_trust_configs.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $certificateManagerClient->listTrustConfigs($request); + + /** @var TrustConfig $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_trust_configs_sample($formattedParent); +} +// [END certificatemanager_v1_generated_CertificateManager_ListTrustConfigs_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate.php new file mode 100644 index 000000000000..fc7a02ac01cf --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate.php @@ -0,0 +1,74 @@ +setCertificate($certificate) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->updateCertificate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Certificate $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 certificatemanager_v1_generated_CertificateManager_UpdateCertificate_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map.php new file mode 100644 index 000000000000..06886d1314da --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map.php @@ -0,0 +1,74 @@ +setCertificateMap($certificateMap) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->updateCertificateMap($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CertificateMap $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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMap_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map_entry.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map_entry.php new file mode 100644 index 000000000000..f847f1d02dd7 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map_entry.php @@ -0,0 +1,74 @@ +setCertificateMapEntry($certificateMapEntry) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->updateCertificateMapEntry($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CertificateMapEntry $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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMapEntry_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_dns_authorization.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_dns_authorization.php new file mode 100644 index 000000000000..a7040b03f6e8 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_dns_authorization.php @@ -0,0 +1,90 @@ +setDomain($dnsAuthorizationDomain); + $updateMask = new FieldMask(); + $request = (new UpdateDnsAuthorizationRequest()) + ->setDnsAuthorization($dnsAuthorization) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->updateDnsAuthorization($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DnsAuthorization $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 +{ + $dnsAuthorizationDomain = '[DOMAIN]'; + + update_dns_authorization_sample($dnsAuthorizationDomain); +} +// [END certificatemanager_v1_generated_CertificateManager_UpdateDnsAuthorization_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_trust_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_trust_config.php new file mode 100644 index 000000000000..b9ae6d221556 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_trust_config.php @@ -0,0 +1,74 @@ +setTrustConfig($trustConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $certificateManagerClient->updateTrustConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TrustConfig $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 certificatemanager_v1_generated_CertificateManager_UpdateTrustConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/src/V1/Client/CertificateManagerClient.php b/owl-bot-staging/CertificateManager/v1/src/V1/Client/CertificateManagerClient.php new file mode 100644 index 000000000000..1629f878d723 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/src/V1/Client/CertificateManagerClient.php @@ -0,0 +1,1325 @@ + createCertificateAsync(CreateCertificateRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCertificateIssuanceConfigAsync(CreateCertificateIssuanceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCertificateMapAsync(CreateCertificateMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCertificateMapEntryAsync(CreateCertificateMapEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDnsAuthorizationAsync(CreateDnsAuthorizationRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTrustConfigAsync(CreateTrustConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCertificateAsync(DeleteCertificateRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCertificateIssuanceConfigAsync(DeleteCertificateIssuanceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCertificateMapAsync(DeleteCertificateMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCertificateMapEntryAsync(DeleteCertificateMapEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDnsAuthorizationAsync(DeleteDnsAuthorizationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTrustConfigAsync(DeleteTrustConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCertificateAsync(GetCertificateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCertificateIssuanceConfigAsync(GetCertificateIssuanceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCertificateMapAsync(GetCertificateMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCertificateMapEntryAsync(GetCertificateMapEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDnsAuthorizationAsync(GetDnsAuthorizationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTrustConfigAsync(GetTrustConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCertificateIssuanceConfigsAsync(ListCertificateIssuanceConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCertificateMapEntriesAsync(ListCertificateMapEntriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCertificateMapsAsync(ListCertificateMapsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCertificatesAsync(ListCertificatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDnsAuthorizationsAsync(ListDnsAuthorizationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTrustConfigsAsync(ListTrustConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCertificateAsync(UpdateCertificateRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCertificateMapAsync(UpdateCertificateMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCertificateMapEntryAsync(UpdateCertificateMapEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDnsAuthorizationAsync(UpdateDnsAuthorizationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTrustConfigAsync(UpdateTrustConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class CertificateManagerClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.certificatemanager.v1.CertificateManager'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'certificatemanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'certificatemanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/certificate_manager_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/certificate_manager_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/certificate_manager_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/certificate_manager_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a ca_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $caPool + * + * @return string The formatted ca_pool resource. + */ + public static function caPoolName(string $project, string $location, string $caPool): string + { + return self::getPathTemplate('caPool')->render([ + 'project' => $project, + 'location' => $location, + 'ca_pool' => $caPool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a certificate + * resource. + * + * @param string $project + * @param string $location + * @param string $certificate + * + * @return string The formatted certificate resource. + */ + public static function certificateName(string $project, string $location, string $certificate): string + { + return self::getPathTemplate('certificate')->render([ + 'project' => $project, + 'location' => $location, + 'certificate' => $certificate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * certificate_issuance_config resource. + * + * @param string $project + * @param string $location + * @param string $certificateIssuanceConfig + * + * @return string The formatted certificate_issuance_config resource. + */ + public static function certificateIssuanceConfigName(string $project, string $location, string $certificateIssuanceConfig): string + { + return self::getPathTemplate('certificateIssuanceConfig')->render([ + 'project' => $project, + 'location' => $location, + 'certificate_issuance_config' => $certificateIssuanceConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * certificate_map resource. + * + * @param string $project + * @param string $location + * @param string $certificateMap + * + * @return string The formatted certificate_map resource. + */ + public static function certificateMapName(string $project, string $location, string $certificateMap): string + { + return self::getPathTemplate('certificateMap')->render([ + 'project' => $project, + 'location' => $location, + 'certificate_map' => $certificateMap, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * certificate_map_entry resource. + * + * @param string $project + * @param string $location + * @param string $certificateMap + * @param string $certificateMapEntry + * + * @return string The formatted certificate_map_entry resource. + */ + public static function certificateMapEntryName(string $project, string $location, string $certificateMap, string $certificateMapEntry): string + { + return self::getPathTemplate('certificateMapEntry')->render([ + 'project' => $project, + 'location' => $location, + 'certificate_map' => $certificateMap, + 'certificate_map_entry' => $certificateMapEntry, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dns_authorization resource. + * + * @param string $project + * @param string $location + * @param string $dnsAuthorization + * + * @return string The formatted dns_authorization resource. + */ + public static function dnsAuthorizationName(string $project, string $location, string $dnsAuthorization): string + { + return self::getPathTemplate('dnsAuthorization')->render([ + 'project' => $project, + 'location' => $location, + 'dns_authorization' => $dnsAuthorization, + ]); + } + + /** + * 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 trust_config + * resource. + * + * @param string $project + * @param string $location + * @param string $trustConfig + * + * @return string The formatted trust_config resource. + */ + public static function trustConfigName(string $project, string $location, string $trustConfig): string + { + return self::getPathTemplate('trustConfig')->render([ + 'project' => $project, + 'location' => $location, + 'trust_config' => $trustConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} + * - certificate: projects/{project}/locations/{location}/certificates/{certificate} + * - certificateIssuanceConfig: projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config} + * - certificateMap: projects/{project}/locations/{location}/certificateMaps/{certificate_map} + * - certificateMapEntry: projects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry} + * - dnsAuthorization: projects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization} + * - location: projects/{project}/locations/{location} + * - trustConfig: projects/{project}/locations/{location}/trustConfigs/{trust_config} + * + * 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 'certificatemanager.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 new Certificate in a given project and location. + * + * The async variant is {@see CertificateManagerClient::createCertificateAsync()} . + * + * @example samples/V1/CertificateManagerClient/create_certificate.php + * + * @param CreateCertificateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createCertificate(CreateCertificateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCertificate', $request, $callOptions)->wait(); + } + + /** + * Creates a new CertificateIssuanceConfig in a given project and location. + * + * The async variant is + * {@see CertificateManagerClient::createCertificateIssuanceConfigAsync()} . + * + * @example samples/V1/CertificateManagerClient/create_certificate_issuance_config.php + * + * @param CreateCertificateIssuanceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createCertificateIssuanceConfig(CreateCertificateIssuanceConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCertificateIssuanceConfig', $request, $callOptions)->wait(); + } + + /** + * Creates a new CertificateMap in a given project and location. + * + * The async variant is + * {@see CertificateManagerClient::createCertificateMapAsync()} . + * + * @example samples/V1/CertificateManagerClient/create_certificate_map.php + * + * @param CreateCertificateMapRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createCertificateMap(CreateCertificateMapRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCertificateMap', $request, $callOptions)->wait(); + } + + /** + * Creates a new CertificateMapEntry in a given project and location. + * + * The async variant is + * {@see CertificateManagerClient::createCertificateMapEntryAsync()} . + * + * @example samples/V1/CertificateManagerClient/create_certificate_map_entry.php + * + * @param CreateCertificateMapEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createCertificateMapEntry(CreateCertificateMapEntryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCertificateMapEntry', $request, $callOptions)->wait(); + } + + /** + * Creates a new DnsAuthorization in a given project and location. + * + * The async variant is + * {@see CertificateManagerClient::createDnsAuthorizationAsync()} . + * + * @example samples/V1/CertificateManagerClient/create_dns_authorization.php + * + * @param CreateDnsAuthorizationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createDnsAuthorization(CreateDnsAuthorizationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDnsAuthorization', $request, $callOptions)->wait(); + } + + /** + * Creates a new TrustConfig in a given project and location. + * + * The async variant is {@see CertificateManagerClient::createTrustConfigAsync()} . + * + * @example samples/V1/CertificateManagerClient/create_trust_config.php + * + * @param CreateTrustConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createTrustConfig(CreateTrustConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateTrustConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Certificate. + * + * The async variant is {@see CertificateManagerClient::deleteCertificateAsync()} . + * + * @example samples/V1/CertificateManagerClient/delete_certificate.php + * + * @param DeleteCertificateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteCertificate(DeleteCertificateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCertificate', $request, $callOptions)->wait(); + } + + /** + * Deletes a single CertificateIssuanceConfig. + * + * The async variant is + * {@see CertificateManagerClient::deleteCertificateIssuanceConfigAsync()} . + * + * @example samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php + * + * @param DeleteCertificateIssuanceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteCertificateIssuanceConfig(DeleteCertificateIssuanceConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCertificateIssuanceConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a single CertificateMap. A Certificate Map can't be deleted + * if it contains Certificate Map Entries. Remove all the entries from + * the map before calling this method. + * + * The async variant is + * {@see CertificateManagerClient::deleteCertificateMapAsync()} . + * + * @example samples/V1/CertificateManagerClient/delete_certificate_map.php + * + * @param DeleteCertificateMapRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteCertificateMap(DeleteCertificateMapRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCertificateMap', $request, $callOptions)->wait(); + } + + /** + * Deletes a single CertificateMapEntry. + * + * The async variant is + * {@see CertificateManagerClient::deleteCertificateMapEntryAsync()} . + * + * @example samples/V1/CertificateManagerClient/delete_certificate_map_entry.php + * + * @param DeleteCertificateMapEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteCertificateMapEntry(DeleteCertificateMapEntryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCertificateMapEntry', $request, $callOptions)->wait(); + } + + /** + * Deletes a single DnsAuthorization. + * + * The async variant is + * {@see CertificateManagerClient::deleteDnsAuthorizationAsync()} . + * + * @example samples/V1/CertificateManagerClient/delete_dns_authorization.php + * + * @param DeleteDnsAuthorizationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteDnsAuthorization(DeleteDnsAuthorizationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDnsAuthorization', $request, $callOptions)->wait(); + } + + /** + * Deletes a single TrustConfig. + * + * The async variant is {@see CertificateManagerClient::deleteTrustConfigAsync()} . + * + * @example samples/V1/CertificateManagerClient/delete_trust_config.php + * + * @param DeleteTrustConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteTrustConfig(DeleteTrustConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteTrustConfig', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Certificate. + * + * The async variant is {@see CertificateManagerClient::getCertificateAsync()} . + * + * @example samples/V1/CertificateManagerClient/get_certificate.php + * + * @param GetCertificateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Certificate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCertificate(GetCertificateRequest $request, array $callOptions = []): Certificate + { + return $this->startApiCall('GetCertificate', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single CertificateIssuanceConfig. + * + * The async variant is + * {@see CertificateManagerClient::getCertificateIssuanceConfigAsync()} . + * + * @example samples/V1/CertificateManagerClient/get_certificate_issuance_config.php + * + * @param GetCertificateIssuanceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CertificateIssuanceConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCertificateIssuanceConfig(GetCertificateIssuanceConfigRequest $request, array $callOptions = []): CertificateIssuanceConfig + { + return $this->startApiCall('GetCertificateIssuanceConfig', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single CertificateMap. + * + * The async variant is {@see CertificateManagerClient::getCertificateMapAsync()} . + * + * @example samples/V1/CertificateManagerClient/get_certificate_map.php + * + * @param GetCertificateMapRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CertificateMap + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCertificateMap(GetCertificateMapRequest $request, array $callOptions = []): CertificateMap + { + return $this->startApiCall('GetCertificateMap', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single CertificateMapEntry. + * + * The async variant is + * {@see CertificateManagerClient::getCertificateMapEntryAsync()} . + * + * @example samples/V1/CertificateManagerClient/get_certificate_map_entry.php + * + * @param GetCertificateMapEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CertificateMapEntry + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCertificateMapEntry(GetCertificateMapEntryRequest $request, array $callOptions = []): CertificateMapEntry + { + return $this->startApiCall('GetCertificateMapEntry', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single DnsAuthorization. + * + * The async variant is {@see CertificateManagerClient::getDnsAuthorizationAsync()} + * . + * + * @example samples/V1/CertificateManagerClient/get_dns_authorization.php + * + * @param GetDnsAuthorizationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DnsAuthorization + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDnsAuthorization(GetDnsAuthorizationRequest $request, array $callOptions = []): DnsAuthorization + { + return $this->startApiCall('GetDnsAuthorization', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single TrustConfig. + * + * The async variant is {@see CertificateManagerClient::getTrustConfigAsync()} . + * + * @example samples/V1/CertificateManagerClient/get_trust_config.php + * + * @param GetTrustConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TrustConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTrustConfig(GetTrustConfigRequest $request, array $callOptions = []): TrustConfig + { + return $this->startApiCall('GetTrustConfig', $request, $callOptions)->wait(); + } + + /** + * Lists CertificateIssuanceConfigs in a given project and location. + * + * The async variant is + * {@see CertificateManagerClient::listCertificateIssuanceConfigsAsync()} . + * + * @example samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php + * + * @param ListCertificateIssuanceConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCertificateIssuanceConfigs(ListCertificateIssuanceConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCertificateIssuanceConfigs', $request, $callOptions); + } + + /** + * Lists CertificateMapEntries in a given project and location. + * + * The async variant is + * {@see CertificateManagerClient::listCertificateMapEntriesAsync()} . + * + * @example samples/V1/CertificateManagerClient/list_certificate_map_entries.php + * + * @param ListCertificateMapEntriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCertificateMapEntries(ListCertificateMapEntriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCertificateMapEntries', $request, $callOptions); + } + + /** + * Lists CertificateMaps in a given project and location. + * + * The async variant is {@see CertificateManagerClient::listCertificateMapsAsync()} + * . + * + * @example samples/V1/CertificateManagerClient/list_certificate_maps.php + * + * @param ListCertificateMapsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCertificateMaps(ListCertificateMapsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCertificateMaps', $request, $callOptions); + } + + /** + * Lists Certificates in a given project and location. + * + * The async variant is {@see CertificateManagerClient::listCertificatesAsync()} . + * + * @example samples/V1/CertificateManagerClient/list_certificates.php + * + * @param ListCertificatesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCertificates(ListCertificatesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCertificates', $request, $callOptions); + } + + /** + * Lists DnsAuthorizations in a given project and location. + * + * The async variant is + * {@see CertificateManagerClient::listDnsAuthorizationsAsync()} . + * + * @example samples/V1/CertificateManagerClient/list_dns_authorizations.php + * + * @param ListDnsAuthorizationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDnsAuthorizations(ListDnsAuthorizationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDnsAuthorizations', $request, $callOptions); + } + + /** + * Lists TrustConfigs in a given project and location. + * + * The async variant is {@see CertificateManagerClient::listTrustConfigsAsync()} . + * + * @example samples/V1/CertificateManagerClient/list_trust_configs.php + * + * @param ListTrustConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTrustConfigs(ListTrustConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTrustConfigs', $request, $callOptions); + } + + /** + * Updates a Certificate. + * + * The async variant is {@see CertificateManagerClient::updateCertificateAsync()} . + * + * @example samples/V1/CertificateManagerClient/update_certificate.php + * + * @param UpdateCertificateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateCertificate(UpdateCertificateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCertificate', $request, $callOptions)->wait(); + } + + /** + * Updates a CertificateMap. + * + * The async variant is + * {@see CertificateManagerClient::updateCertificateMapAsync()} . + * + * @example samples/V1/CertificateManagerClient/update_certificate_map.php + * + * @param UpdateCertificateMapRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateCertificateMap(UpdateCertificateMapRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCertificateMap', $request, $callOptions)->wait(); + } + + /** + * Updates a CertificateMapEntry. + * + * The async variant is + * {@see CertificateManagerClient::updateCertificateMapEntryAsync()} . + * + * @example samples/V1/CertificateManagerClient/update_certificate_map_entry.php + * + * @param UpdateCertificateMapEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateCertificateMapEntry(UpdateCertificateMapEntryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCertificateMapEntry', $request, $callOptions)->wait(); + } + + /** + * Updates a DnsAuthorization. + * + * The async variant is + * {@see CertificateManagerClient::updateDnsAuthorizationAsync()} . + * + * @example samples/V1/CertificateManagerClient/update_dns_authorization.php + * + * @param UpdateDnsAuthorizationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateDnsAuthorization(UpdateDnsAuthorizationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDnsAuthorization', $request, $callOptions)->wait(); + } + + /** + * Updates a TrustConfig. + * + * The async variant is {@see CertificateManagerClient::updateTrustConfigAsync()} . + * + * @example samples/V1/CertificateManagerClient/update_trust_config.php + * + * @param UpdateTrustConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateTrustConfig(UpdateTrustConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateTrustConfig', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see CertificateManagerClient::getLocationAsync()} . + * + * @example samples/V1/CertificateManagerClient/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 CertificateManagerClient::listLocationsAsync()} . + * + * @example samples/V1/CertificateManagerClient/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/CertificateManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/CertificateManager/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..047c9f1afef5 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/src/V1/gapic_metadata.json @@ -0,0 +1,173 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.certificatemanager.v1", + "libraryPackage": "Google\\Cloud\\CertificateManager\\V1", + "services": { + "CertificateManager": { + "clients": { + "grpc": { + "libraryClient": "CertificateManagerGapicClient", + "rpcs": { + "CreateCertificate": { + "methods": [ + "createCertificate" + ] + }, + "CreateCertificateIssuanceConfig": { + "methods": [ + "createCertificateIssuanceConfig" + ] + }, + "CreateCertificateMap": { + "methods": [ + "createCertificateMap" + ] + }, + "CreateCertificateMapEntry": { + "methods": [ + "createCertificateMapEntry" + ] + }, + "CreateDnsAuthorization": { + "methods": [ + "createDnsAuthorization" + ] + }, + "CreateTrustConfig": { + "methods": [ + "createTrustConfig" + ] + }, + "DeleteCertificate": { + "methods": [ + "deleteCertificate" + ] + }, + "DeleteCertificateIssuanceConfig": { + "methods": [ + "deleteCertificateIssuanceConfig" + ] + }, + "DeleteCertificateMap": { + "methods": [ + "deleteCertificateMap" + ] + }, + "DeleteCertificateMapEntry": { + "methods": [ + "deleteCertificateMapEntry" + ] + }, + "DeleteDnsAuthorization": { + "methods": [ + "deleteDnsAuthorization" + ] + }, + "DeleteTrustConfig": { + "methods": [ + "deleteTrustConfig" + ] + }, + "GetCertificate": { + "methods": [ + "getCertificate" + ] + }, + "GetCertificateIssuanceConfig": { + "methods": [ + "getCertificateIssuanceConfig" + ] + }, + "GetCertificateMap": { + "methods": [ + "getCertificateMap" + ] + }, + "GetCertificateMapEntry": { + "methods": [ + "getCertificateMapEntry" + ] + }, + "GetDnsAuthorization": { + "methods": [ + "getDnsAuthorization" + ] + }, + "GetTrustConfig": { + "methods": [ + "getTrustConfig" + ] + }, + "ListCertificateIssuanceConfigs": { + "methods": [ + "listCertificateIssuanceConfigs" + ] + }, + "ListCertificateMapEntries": { + "methods": [ + "listCertificateMapEntries" + ] + }, + "ListCertificateMaps": { + "methods": [ + "listCertificateMaps" + ] + }, + "ListCertificates": { + "methods": [ + "listCertificates" + ] + }, + "ListDnsAuthorizations": { + "methods": [ + "listDnsAuthorizations" + ] + }, + "ListTrustConfigs": { + "methods": [ + "listTrustConfigs" + ] + }, + "UpdateCertificate": { + "methods": [ + "updateCertificate" + ] + }, + "UpdateCertificateMap": { + "methods": [ + "updateCertificateMap" + ] + }, + "UpdateCertificateMapEntry": { + "methods": [ + "updateCertificateMapEntry" + ] + }, + "UpdateDnsAuthorization": { + "methods": [ + "updateDnsAuthorization" + ] + }, + "UpdateTrustConfig": { + "methods": [ + "updateTrustConfig" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_client_config.json b/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_client_config.json new file mode 100644 index 000000000000..64064d313a3d --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_client_config.json @@ -0,0 +1,189 @@ +{ + "interfaces": { + "google.cloud.certificatemanager.v1.CertificateManager": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateCertificateIssuanceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateCertificateMap": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateCertificateMapEntry": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateDnsAuthorization": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateTrustConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteCertificateIssuanceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteCertificateMap": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteCertificateMapEntry": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDnsAuthorization": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteTrustConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCertificateIssuanceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCertificateMap": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCertificateMapEntry": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDnsAuthorization": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTrustConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListCertificateIssuanceConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCertificateMapEntries": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCertificateMaps": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCertificates": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDnsAuthorizations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTrustConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCertificateMap": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCertificateMapEntry": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDnsAuthorization": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateTrustConfig": { + "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/CertificateManager/v1/src/V1/resources/certificate_manager_descriptor_config.php b/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_descriptor_config.php new file mode 100644 index 000000000000..f125748025cd --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_descriptor_config.php @@ -0,0 +1,592 @@ + [ + 'google.cloud.certificatemanager.v1.CertificateManager' => [ + 'CreateCertificate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\Certificate', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCertificateIssuanceConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCertificateMap' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateMap', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCertificateMapEntry' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateMapEntry', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDnsAuthorization' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\DnsAuthorization', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTrustConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\TrustConfig', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCertificate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCertificateIssuanceConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCertificateMap' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCertificateMapEntry' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDnsAuthorization' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTrustConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCertificate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\Certificate', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'certificate.name', + 'fieldAccessors' => [ + 'getCertificate', + 'getName', + ], + ], + ], + ], + 'UpdateCertificateMap' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateMap', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'certificate_map.name', + 'fieldAccessors' => [ + 'getCertificateMap', + 'getName', + ], + ], + ], + ], + 'UpdateCertificateMapEntry' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateMapEntry', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'certificate_map_entry.name', + 'fieldAccessors' => [ + 'getCertificateMapEntry', + 'getName', + ], + ], + ], + ], + 'UpdateDnsAuthorization' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\DnsAuthorization', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'dns_authorization.name', + 'fieldAccessors' => [ + 'getDnsAuthorization', + 'getName', + ], + ], + ], + ], + 'UpdateTrustConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\TrustConfig', + 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'trust_config.name', + 'fieldAccessors' => [ + 'getTrustConfig', + 'getName', + ], + ], + ], + ], + 'GetCertificate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\Certificate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCertificateIssuanceConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCertificateMap' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\CertificateMap', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCertificateMapEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\CertificateMapEntry', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDnsAuthorization' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\DnsAuthorization', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTrustConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\TrustConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCertificateIssuanceConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCertificateIssuanceConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\ListCertificateIssuanceConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCertificateMapEntries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCertificateMapEntries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\ListCertificateMapEntriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCertificateMaps' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCertificateMaps', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\ListCertificateMapsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCertificates' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCertificates', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\ListCertificatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDnsAuthorizations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDnsAuthorizations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\ListDnsAuthorizationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTrustConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTrustConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\CertificateManager\V1\ListTrustConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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' => [ + 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', + 'certificate' => 'projects/{project}/locations/{location}/certificates/{certificate}', + 'certificateIssuanceConfig' => 'projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config}', + 'certificateMap' => 'projects/{project}/locations/{location}/certificateMaps/{certificate_map}', + 'certificateMapEntry' => 'projects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry}', + 'dnsAuthorization' => 'projects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization}', + 'location' => 'projects/{project}/locations/{location}', + 'trustConfig' => 'projects/{project}/locations/{location}/trustConfigs/{trust_config}', + ], + ], + ], +]; diff --git a/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_rest_client_config.php b/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_rest_client_config.php new file mode 100644 index 000000000000..5036313a7cab --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_rest_client_config.php @@ -0,0 +1,468 @@ + [ + 'google.cloud.certificatemanager.v1.CertificateManager' => [ + 'CreateCertificate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificates', + 'body' => 'certificate', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'certificate_id', + ], + ], + 'CreateCertificateIssuanceConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs', + 'body' => 'certificate_issuance_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'certificate_issuance_config_id', + ], + ], + 'CreateCertificateMap' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificateMaps', + 'body' => 'certificate_map', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'certificate_map_id', + ], + ], + 'CreateCertificateMapEntry' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries', + 'body' => 'certificate_map_entry', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'certificate_map_entry_id', + ], + ], + 'CreateDnsAuthorization' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dnsAuthorizations', + 'body' => 'dns_authorization', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'dns_authorization_id', + ], + ], + 'CreateTrustConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/trustConfigs', + 'body' => 'trust_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'trust_config_id', + ], + ], + 'DeleteCertificate' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCertificateIssuanceConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCertificateMap' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateMaps/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCertificateMapEntry' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDnsAuthorization' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsAuthorizations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTrustConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trustConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCertificate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCertificateIssuanceConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCertificateMap' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateMaps/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCertificateMapEntry' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDnsAuthorization' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsAuthorizations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTrustConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trustConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCertificateIssuanceConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCertificateMapEntries' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCertificateMaps' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificateMaps', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCertificates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificates', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDnsAuthorizations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dnsAuthorizations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTrustConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/trustConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCertificate' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{certificate.name=projects/*/locations/*/certificates/*}', + 'body' => 'certificate', + 'placeholders' => [ + 'certificate.name' => [ + 'getters' => [ + 'getCertificate', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateCertificateMap' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{certificate_map.name=projects/*/locations/*/certificateMaps/*}', + 'body' => 'certificate_map', + 'placeholders' => [ + 'certificate_map.name' => [ + 'getters' => [ + 'getCertificateMap', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateCertificateMapEntry' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{certificate_map_entry.name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}', + 'body' => 'certificate_map_entry', + 'placeholders' => [ + 'certificate_map_entry.name' => [ + 'getters' => [ + 'getCertificateMapEntry', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateDnsAuthorization' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{dns_authorization.name=projects/*/locations/*/dnsAuthorizations/*}', + 'body' => 'dns_authorization', + 'placeholders' => [ + 'dns_authorization.name' => [ + 'getters' => [ + 'getDnsAuthorization', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateTrustConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{trust_config.name=projects/*/locations/*/trustConfigs/*}', + 'body' => 'trust_config', + 'placeholders' => [ + 'trust_config.name' => [ + 'getters' => [ + 'getTrustConfig', + '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.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/CertificateManager/v1/tests/Unit/V1/Client/CertificateManagerClientTest.php b/owl-bot-staging/CertificateManager/v1/tests/Unit/V1/Client/CertificateManagerClientTest.php new file mode 100644 index 000000000000..0e3ede80c9e0 --- /dev/null +++ b/owl-bot-staging/CertificateManager/v1/tests/Unit/V1/Client/CertificateManagerClientTest.php @@ -0,0 +1,3399 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CertificateManagerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CertificateManagerClient($options); + } + + /** @test */ + public function createCertificateTest() + { + $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/createCertificateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $pemCertificate = 'pemCertificate1234463984'; + $expectedResponse = new Certificate(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPemCertificate($pemCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCertificateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $certificateId = 'certificateId1494430915'; + $certificate = new Certificate(); + $request = (new CreateCertificateRequest()) + ->setParent($formattedParent) + ->setCertificateId($certificateId) + ->setCertificate($certificate); + $response = $gapicClient->createCertificate($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.certificatemanager.v1.CertificateManager/CreateCertificate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCertificateId(); + $this->assertProtobufEquals($certificateId, $actualValue); + $actualValue = $actualApiRequestObject->getCertificate(); + $this->assertProtobufEquals($certificate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCertificateTest'); + $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 createCertificateExceptionTest() + { + $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/createCertificateTest'); + $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]'); + $certificateId = 'certificateId1494430915'; + $certificate = new Certificate(); + $request = (new CreateCertificateRequest()) + ->setParent($formattedParent) + ->setCertificateId($certificateId) + ->setCertificate($certificate); + $response = $gapicClient->createCertificate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCertificateTest'); + 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 createCertificateIssuanceConfigTest() + { + $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/createCertificateIssuanceConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $rotationWindowPercentage = 873917384; + $expectedResponse = new CertificateIssuanceConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRotationWindowPercentage($rotationWindowPercentage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCertificateIssuanceConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $certificateIssuanceConfigId = 'certificateIssuanceConfigId635650044'; + $certificateIssuanceConfig = new CertificateIssuanceConfig(); + $certificateIssuanceConfigCertificateAuthorityConfig = new CertificateAuthorityConfig(); + $certificateIssuanceConfig->setCertificateAuthorityConfig($certificateIssuanceConfigCertificateAuthorityConfig); + $certificateIssuanceConfigLifetime = new Duration(); + $certificateIssuanceConfig->setLifetime($certificateIssuanceConfigLifetime); + $certificateIssuanceConfigRotationWindowPercentage = 1410864292; + $certificateIssuanceConfig->setRotationWindowPercentage($certificateIssuanceConfigRotationWindowPercentage); + $certificateIssuanceConfigKeyAlgorithm = KeyAlgorithm::KEY_ALGORITHM_UNSPECIFIED; + $certificateIssuanceConfig->setKeyAlgorithm($certificateIssuanceConfigKeyAlgorithm); + $request = (new CreateCertificateIssuanceConfigRequest()) + ->setParent($formattedParent) + ->setCertificateIssuanceConfigId($certificateIssuanceConfigId) + ->setCertificateIssuanceConfig($certificateIssuanceConfig); + $response = $gapicClient->createCertificateIssuanceConfig($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.certificatemanager.v1.CertificateManager/CreateCertificateIssuanceConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCertificateIssuanceConfigId(); + $this->assertProtobufEquals($certificateIssuanceConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getCertificateIssuanceConfig(); + $this->assertProtobufEquals($certificateIssuanceConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCertificateIssuanceConfigTest'); + $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 createCertificateIssuanceConfigExceptionTest() + { + $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/createCertificateIssuanceConfigTest'); + $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]'); + $certificateIssuanceConfigId = 'certificateIssuanceConfigId635650044'; + $certificateIssuanceConfig = new CertificateIssuanceConfig(); + $certificateIssuanceConfigCertificateAuthorityConfig = new CertificateAuthorityConfig(); + $certificateIssuanceConfig->setCertificateAuthorityConfig($certificateIssuanceConfigCertificateAuthorityConfig); + $certificateIssuanceConfigLifetime = new Duration(); + $certificateIssuanceConfig->setLifetime($certificateIssuanceConfigLifetime); + $certificateIssuanceConfigRotationWindowPercentage = 1410864292; + $certificateIssuanceConfig->setRotationWindowPercentage($certificateIssuanceConfigRotationWindowPercentage); + $certificateIssuanceConfigKeyAlgorithm = KeyAlgorithm::KEY_ALGORITHM_UNSPECIFIED; + $certificateIssuanceConfig->setKeyAlgorithm($certificateIssuanceConfigKeyAlgorithm); + $request = (new CreateCertificateIssuanceConfigRequest()) + ->setParent($formattedParent) + ->setCertificateIssuanceConfigId($certificateIssuanceConfigId) + ->setCertificateIssuanceConfig($certificateIssuanceConfig); + $response = $gapicClient->createCertificateIssuanceConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCertificateIssuanceConfigTest'); + 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 createCertificateMapTest() + { + $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/createCertificateMapTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new CertificateMap(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCertificateMapTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $certificateMapId = 'certificateMapId-2047700346'; + $certificateMap = new CertificateMap(); + $request = (new CreateCertificateMapRequest()) + ->setParent($formattedParent) + ->setCertificateMapId($certificateMapId) + ->setCertificateMap($certificateMap); + $response = $gapicClient->createCertificateMap($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.certificatemanager.v1.CertificateManager/CreateCertificateMap', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCertificateMapId(); + $this->assertProtobufEquals($certificateMapId, $actualValue); + $actualValue = $actualApiRequestObject->getCertificateMap(); + $this->assertProtobufEquals($certificateMap, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCertificateMapTest'); + $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 createCertificateMapExceptionTest() + { + $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/createCertificateMapTest'); + $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]'); + $certificateMapId = 'certificateMapId-2047700346'; + $certificateMap = new CertificateMap(); + $request = (new CreateCertificateMapRequest()) + ->setParent($formattedParent) + ->setCertificateMapId($certificateMapId) + ->setCertificateMap($certificateMap); + $response = $gapicClient->createCertificateMap($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCertificateMapTest'); + 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 createCertificateMapEntryTest() + { + $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/createCertificateMapEntryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CertificateMapEntry(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCertificateMapEntryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); + $certificateMapEntryId = 'certificateMapEntryId78300467'; + $certificateMapEntry = new CertificateMapEntry(); + $request = (new CreateCertificateMapEntryRequest()) + ->setParent($formattedParent) + ->setCertificateMapEntryId($certificateMapEntryId) + ->setCertificateMapEntry($certificateMapEntry); + $response = $gapicClient->createCertificateMapEntry($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.certificatemanager.v1.CertificateManager/CreateCertificateMapEntry', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCertificateMapEntryId(); + $this->assertProtobufEquals($certificateMapEntryId, $actualValue); + $actualValue = $actualApiRequestObject->getCertificateMapEntry(); + $this->assertProtobufEquals($certificateMapEntry, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCertificateMapEntryTest'); + $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 createCertificateMapEntryExceptionTest() + { + $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/createCertificateMapEntryTest'); + $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->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); + $certificateMapEntryId = 'certificateMapEntryId78300467'; + $certificateMapEntry = new CertificateMapEntry(); + $request = (new CreateCertificateMapEntryRequest()) + ->setParent($formattedParent) + ->setCertificateMapEntryId($certificateMapEntryId) + ->setCertificateMapEntry($certificateMapEntry); + $response = $gapicClient->createCertificateMapEntry($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCertificateMapEntryTest'); + 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 createDnsAuthorizationTest() + { + $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/createDnsAuthorizationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $domain = 'domain-1326197564'; + $expectedResponse = new DnsAuthorization(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setDomain($domain); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDnsAuthorizationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dnsAuthorizationId = 'dnsAuthorizationId1795311351'; + $dnsAuthorization = new DnsAuthorization(); + $dnsAuthorizationDomain = 'dnsAuthorizationDomain2013928116'; + $dnsAuthorization->setDomain($dnsAuthorizationDomain); + $request = (new CreateDnsAuthorizationRequest()) + ->setParent($formattedParent) + ->setDnsAuthorizationId($dnsAuthorizationId) + ->setDnsAuthorization($dnsAuthorization); + $response = $gapicClient->createDnsAuthorization($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.certificatemanager.v1.CertificateManager/CreateDnsAuthorization', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDnsAuthorizationId(); + $this->assertProtobufEquals($dnsAuthorizationId, $actualValue); + $actualValue = $actualApiRequestObject->getDnsAuthorization(); + $this->assertProtobufEquals($dnsAuthorization, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDnsAuthorizationTest'); + $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 createDnsAuthorizationExceptionTest() + { + $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/createDnsAuthorizationTest'); + $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]'); + $dnsAuthorizationId = 'dnsAuthorizationId1795311351'; + $dnsAuthorization = new DnsAuthorization(); + $dnsAuthorizationDomain = 'dnsAuthorizationDomain2013928116'; + $dnsAuthorization->setDomain($dnsAuthorizationDomain); + $request = (new CreateDnsAuthorizationRequest()) + ->setParent($formattedParent) + ->setDnsAuthorizationId($dnsAuthorizationId) + ->setDnsAuthorization($dnsAuthorization); + $response = $gapicClient->createDnsAuthorization($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDnsAuthorizationTest'); + 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 createTrustConfigTest() + { + $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/createTrustConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $expectedResponse = new TrustConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTrustConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $trustConfigId = 'trustConfigId-1311884783'; + $trustConfig = new TrustConfig(); + $request = (new CreateTrustConfigRequest()) + ->setParent($formattedParent) + ->setTrustConfigId($trustConfigId) + ->setTrustConfig($trustConfig); + $response = $gapicClient->createTrustConfig($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.certificatemanager.v1.CertificateManager/CreateTrustConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTrustConfigId(); + $this->assertProtobufEquals($trustConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getTrustConfig(); + $this->assertProtobufEquals($trustConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTrustConfigTest'); + $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 createTrustConfigExceptionTest() + { + $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/createTrustConfigTest'); + $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]'); + $trustConfigId = 'trustConfigId-1311884783'; + $trustConfig = new TrustConfig(); + $request = (new CreateTrustConfigRequest()) + ->setParent($formattedParent) + ->setTrustConfigId($trustConfigId) + ->setTrustConfig($trustConfig); + $response = $gapicClient->createTrustConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTrustConfigTest'); + 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 deleteCertificateTest() + { + $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/deleteCertificateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCertificateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->certificateName('[PROJECT]', '[LOCATION]', '[CERTIFICATE]'); + $request = (new DeleteCertificateRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCertificate($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.certificatemanager.v1.CertificateManager/DeleteCertificate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCertificateTest'); + $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 deleteCertificateExceptionTest() + { + $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/deleteCertificateTest'); + $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->certificateName('[PROJECT]', '[LOCATION]', '[CERTIFICATE]'); + $request = (new DeleteCertificateRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCertificate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCertificateTest'); + 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 deleteCertificateIssuanceConfigTest() + { + $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/deleteCertificateIssuanceConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCertificateIssuanceConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->certificateIssuanceConfigName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_ISSUANCE_CONFIG]'); + $request = (new DeleteCertificateIssuanceConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCertificateIssuanceConfig($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.certificatemanager.v1.CertificateManager/DeleteCertificateIssuanceConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCertificateIssuanceConfigTest'); + $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 deleteCertificateIssuanceConfigExceptionTest() + { + $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/deleteCertificateIssuanceConfigTest'); + $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->certificateIssuanceConfigName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_ISSUANCE_CONFIG]'); + $request = (new DeleteCertificateIssuanceConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCertificateIssuanceConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCertificateIssuanceConfigTest'); + 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 deleteCertificateMapTest() + { + $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/deleteCertificateMapTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCertificateMapTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); + $request = (new DeleteCertificateMapRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCertificateMap($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.certificatemanager.v1.CertificateManager/DeleteCertificateMap', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCertificateMapTest'); + $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 deleteCertificateMapExceptionTest() + { + $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/deleteCertificateMapTest'); + $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->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); + $request = (new DeleteCertificateMapRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCertificateMap($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCertificateMapTest'); + 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 deleteCertificateMapEntryTest() + { + $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/deleteCertificateMapEntryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCertificateMapEntryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->certificateMapEntryName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]', '[CERTIFICATE_MAP_ENTRY]'); + $request = (new DeleteCertificateMapEntryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCertificateMapEntry($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.certificatemanager.v1.CertificateManager/DeleteCertificateMapEntry', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCertificateMapEntryTest'); + $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 deleteCertificateMapEntryExceptionTest() + { + $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/deleteCertificateMapEntryTest'); + $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->certificateMapEntryName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]', '[CERTIFICATE_MAP_ENTRY]'); + $request = (new DeleteCertificateMapEntryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCertificateMapEntry($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCertificateMapEntryTest'); + 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 deleteDnsAuthorizationTest() + { + $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/deleteDnsAuthorizationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDnsAuthorizationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dnsAuthorizationName('[PROJECT]', '[LOCATION]', '[DNS_AUTHORIZATION]'); + $request = (new DeleteDnsAuthorizationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDnsAuthorization($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.certificatemanager.v1.CertificateManager/DeleteDnsAuthorization', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDnsAuthorizationTest'); + $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 deleteDnsAuthorizationExceptionTest() + { + $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/deleteDnsAuthorizationTest'); + $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->dnsAuthorizationName('[PROJECT]', '[LOCATION]', '[DNS_AUTHORIZATION]'); + $request = (new DeleteDnsAuthorizationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDnsAuthorization($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDnsAuthorizationTest'); + 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 deleteTrustConfigTest() + { + $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/deleteTrustConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTrustConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->trustConfigName('[PROJECT]', '[LOCATION]', '[TRUST_CONFIG]'); + $request = (new DeleteTrustConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTrustConfig($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.certificatemanager.v1.CertificateManager/DeleteTrustConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTrustConfigTest'); + $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 deleteTrustConfigExceptionTest() + { + $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/deleteTrustConfigTest'); + $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->trustConfigName('[PROJECT]', '[LOCATION]', '[TRUST_CONFIG]'); + $request = (new DeleteTrustConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTrustConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTrustConfigTest'); + 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 getCertificateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $pemCertificate = 'pemCertificate1234463984'; + $expectedResponse = new Certificate(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setPemCertificate($pemCertificate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->certificateName('[PROJECT]', '[LOCATION]', '[CERTIFICATE]'); + $request = (new GetCertificateRequest()) + ->setName($formattedName); + $response = $gapicClient->getCertificate($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.certificatemanager.v1.CertificateManager/GetCertificate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCertificateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->certificateName('[PROJECT]', '[LOCATION]', '[CERTIFICATE]'); + $request = (new GetCertificateRequest()) + ->setName($formattedName); + try { + $gapicClient->getCertificate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCertificateIssuanceConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $rotationWindowPercentage = 873917384; + $expectedResponse = new CertificateIssuanceConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRotationWindowPercentage($rotationWindowPercentage); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->certificateIssuanceConfigName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_ISSUANCE_CONFIG]'); + $request = (new GetCertificateIssuanceConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getCertificateIssuanceConfig($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.certificatemanager.v1.CertificateManager/GetCertificateIssuanceConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCertificateIssuanceConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->certificateIssuanceConfigName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_ISSUANCE_CONFIG]'); + $request = (new GetCertificateIssuanceConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getCertificateIssuanceConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCertificateMapTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new CertificateMap(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); + $request = (new GetCertificateMapRequest()) + ->setName($formattedName); + $response = $gapicClient->getCertificateMap($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.certificatemanager.v1.CertificateManager/GetCertificateMap', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCertificateMapExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); + $request = (new GetCertificateMapRequest()) + ->setName($formattedName); + try { + $gapicClient->getCertificateMap($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCertificateMapEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CertificateMapEntry(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setHostname($hostname); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->certificateMapEntryName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]', '[CERTIFICATE_MAP_ENTRY]'); + $request = (new GetCertificateMapEntryRequest()) + ->setName($formattedName); + $response = $gapicClient->getCertificateMapEntry($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.certificatemanager.v1.CertificateManager/GetCertificateMapEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCertificateMapEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->certificateMapEntryName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]', '[CERTIFICATE_MAP_ENTRY]'); + $request = (new GetCertificateMapEntryRequest()) + ->setName($formattedName); + try { + $gapicClient->getCertificateMapEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDnsAuthorizationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $domain = 'domain-1326197564'; + $expectedResponse = new DnsAuthorization(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setDomain($domain); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dnsAuthorizationName('[PROJECT]', '[LOCATION]', '[DNS_AUTHORIZATION]'); + $request = (new GetDnsAuthorizationRequest()) + ->setName($formattedName); + $response = $gapicClient->getDnsAuthorization($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.certificatemanager.v1.CertificateManager/GetDnsAuthorization', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDnsAuthorizationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dnsAuthorizationName('[PROJECT]', '[LOCATION]', '[DNS_AUTHORIZATION]'); + $request = (new GetDnsAuthorizationRequest()) + ->setName($formattedName); + try { + $gapicClient->getDnsAuthorization($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTrustConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $expectedResponse = new TrustConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->trustConfigName('[PROJECT]', '[LOCATION]', '[TRUST_CONFIG]'); + $request = (new GetTrustConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getTrustConfig($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.certificatemanager.v1.CertificateManager/GetTrustConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTrustConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->trustConfigName('[PROJECT]', '[LOCATION]', '[TRUST_CONFIG]'); + $request = (new GetTrustConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getTrustConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCertificateIssuanceConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $certificateIssuanceConfigsElement = new CertificateIssuanceConfig(); + $certificateIssuanceConfigs = [ + $certificateIssuanceConfigsElement, + ]; + $expectedResponse = new ListCertificateIssuanceConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCertificateIssuanceConfigs($certificateIssuanceConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCertificateIssuanceConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCertificateIssuanceConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCertificateIssuanceConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListCertificateIssuanceConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCertificateIssuanceConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListCertificateIssuanceConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCertificateIssuanceConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCertificateMapEntriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $certificateMapEntriesElement = new CertificateMapEntry(); + $certificateMapEntries = [ + $certificateMapEntriesElement, + ]; + $expectedResponse = new ListCertificateMapEntriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCertificateMapEntries($certificateMapEntries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); + $request = (new ListCertificateMapEntriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCertificateMapEntries($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCertificateMapEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListCertificateMapEntries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCertificateMapEntriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); + $request = (new ListCertificateMapEntriesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCertificateMapEntries($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCertificateMapsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $certificateMapsElement = new CertificateMap(); + $certificateMaps = [ + $certificateMapsElement, + ]; + $expectedResponse = new ListCertificateMapsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCertificateMaps($certificateMaps); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCertificateMapsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCertificateMaps($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCertificateMaps()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListCertificateMaps', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCertificateMapsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListCertificateMapsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCertificateMaps($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCertificatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $certificatesElement = new Certificate(); + $certificates = [ + $certificatesElement, + ]; + $expectedResponse = new ListCertificatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCertificates($certificates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCertificatesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCertificates($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCertificates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListCertificates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCertificatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListCertificatesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCertificates($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDnsAuthorizationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dnsAuthorizationsElement = new DnsAuthorization(); + $dnsAuthorizations = [ + $dnsAuthorizationsElement, + ]; + $expectedResponse = new ListDnsAuthorizationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDnsAuthorizations($dnsAuthorizations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDnsAuthorizationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDnsAuthorizations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDnsAuthorizations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListDnsAuthorizations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDnsAuthorizationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListDnsAuthorizationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDnsAuthorizations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTrustConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $trustConfigsElement = new TrustConfig(); + $trustConfigs = [ + $trustConfigsElement, + ]; + $expectedResponse = new ListTrustConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTrustConfigs($trustConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTrustConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTrustConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTrustConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListTrustConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTrustConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListTrustConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTrustConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCertificateTest() + { + $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/updateCertificateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $pemCertificate = 'pemCertificate1234463984'; + $expectedResponse = new Certificate(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPemCertificate($pemCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateCertificateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $certificate = new Certificate(); + $updateMask = new FieldMask(); + $request = (new UpdateCertificateRequest()) + ->setCertificate($certificate) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCertificate($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.certificatemanager.v1.CertificateManager/UpdateCertificate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getCertificate(); + $this->assertProtobufEquals($certificate, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCertificateTest'); + $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 updateCertificateExceptionTest() + { + $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/updateCertificateTest'); + $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 + $certificate = new Certificate(); + $updateMask = new FieldMask(); + $request = (new UpdateCertificateRequest()) + ->setCertificate($certificate) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCertificate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCertificateTest'); + 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 updateCertificateMapTest() + { + $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/updateCertificateMapTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new CertificateMap(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateCertificateMapTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $certificateMap = new CertificateMap(); + $updateMask = new FieldMask(); + $request = (new UpdateCertificateMapRequest()) + ->setCertificateMap($certificateMap) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCertificateMap($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.certificatemanager.v1.CertificateManager/UpdateCertificateMap', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getCertificateMap(); + $this->assertProtobufEquals($certificateMap, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCertificateMapTest'); + $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 updateCertificateMapExceptionTest() + { + $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/updateCertificateMapTest'); + $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 + $certificateMap = new CertificateMap(); + $updateMask = new FieldMask(); + $request = (new UpdateCertificateMapRequest()) + ->setCertificateMap($certificateMap) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCertificateMap($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCertificateMapTest'); + 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 updateCertificateMapEntryTest() + { + $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/updateCertificateMapEntryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CertificateMapEntry(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateCertificateMapEntryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $certificateMapEntry = new CertificateMapEntry(); + $updateMask = new FieldMask(); + $request = (new UpdateCertificateMapEntryRequest()) + ->setCertificateMapEntry($certificateMapEntry) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCertificateMapEntry($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.certificatemanager.v1.CertificateManager/UpdateCertificateMapEntry', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getCertificateMapEntry(); + $this->assertProtobufEquals($certificateMapEntry, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCertificateMapEntryTest'); + $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 updateCertificateMapEntryExceptionTest() + { + $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/updateCertificateMapEntryTest'); + $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 + $certificateMapEntry = new CertificateMapEntry(); + $updateMask = new FieldMask(); + $request = (new UpdateCertificateMapEntryRequest()) + ->setCertificateMapEntry($certificateMapEntry) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCertificateMapEntry($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCertificateMapEntryTest'); + 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 updateDnsAuthorizationTest() + { + $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/updateDnsAuthorizationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $domain = 'domain-1326197564'; + $expectedResponse = new DnsAuthorization(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setDomain($domain); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDnsAuthorizationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $dnsAuthorization = new DnsAuthorization(); + $dnsAuthorizationDomain = 'dnsAuthorizationDomain2013928116'; + $dnsAuthorization->setDomain($dnsAuthorizationDomain); + $updateMask = new FieldMask(); + $request = (new UpdateDnsAuthorizationRequest()) + ->setDnsAuthorization($dnsAuthorization) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDnsAuthorization($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.certificatemanager.v1.CertificateManager/UpdateDnsAuthorization', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDnsAuthorization(); + $this->assertProtobufEquals($dnsAuthorization, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDnsAuthorizationTest'); + $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 updateDnsAuthorizationExceptionTest() + { + $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/updateDnsAuthorizationTest'); + $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 + $dnsAuthorization = new DnsAuthorization(); + $dnsAuthorizationDomain = 'dnsAuthorizationDomain2013928116'; + $dnsAuthorization->setDomain($dnsAuthorizationDomain); + $updateMask = new FieldMask(); + $request = (new UpdateDnsAuthorizationRequest()) + ->setDnsAuthorization($dnsAuthorization) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDnsAuthorization($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDnsAuthorizationTest'); + 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 updateTrustConfigTest() + { + $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/updateTrustConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $expectedResponse = new TrustConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTrustConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $trustConfig = new TrustConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateTrustConfigRequest()) + ->setTrustConfig($trustConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateTrustConfig($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.certificatemanager.v1.CertificateManager/UpdateTrustConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getTrustConfig(); + $this->assertProtobufEquals($trustConfig, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTrustConfigTest'); + $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 updateTrustConfigExceptionTest() + { + $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/updateTrustConfigTest'); + $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 + $trustConfig = new TrustConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateTrustConfigRequest()) + ->setTrustConfig($trustConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateTrustConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTrustConfigTest'); + 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 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 createCertificateAsyncTest() + { + $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/createCertificateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $pemCertificate = 'pemCertificate1234463984'; + $expectedResponse = new Certificate(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPemCertificate($pemCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCertificateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $certificateId = 'certificateId1494430915'; + $certificate = new Certificate(); + $request = (new CreateCertificateRequest()) + ->setParent($formattedParent) + ->setCertificateId($certificateId) + ->setCertificate($certificate); + $response = $gapicClient->createCertificateAsync($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.certificatemanager.v1.CertificateManager/CreateCertificate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCertificateId(); + $this->assertProtobufEquals($certificateId, $actualValue); + $actualValue = $actualApiRequestObject->getCertificate(); + $this->assertProtobufEquals($certificate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCertificateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From 54f21b49e5ec6b3ae4521b32da7025985e8581bd Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 31 Oct 2024 19:59:23 +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 --- .../src/V2/Client/BareMetalSolutionClient.php | 92 +- Batch/src/V1/Client/BatchServiceClient.php | 16 +- .../V1/Client/AppConnectionsServiceClient.php | 22 +- .../V1/Client/AppConnectorsServiceClient.php | 22 +- .../V1/Client/AppGatewaysServiceClient.php | 18 +- .../ClientConnectorServicesServiceClient.php | 20 +- .../V1/Client/ClientGatewaysServiceClient.php | 18 +- .../V1/Client/AnalyticsHubServiceClient.php | 44 +- .../src/V1/Client/ConnectionServiceClient.php | 16 +- .../Client/AnalyticsHubServiceClient.php | 34 +- .../src/V1/Client/DataPolicyServiceClient.php | 18 +- .../V1/Client/DataTransferServiceClient.php | 36 +- .../src/V2/Client/MigrationServiceClient.php | 14 +- .../V1/Client/ReservationServiceClient.php | 42 +- .../src/V1/Client/BigQueryReadClient.php | 4 +- .../src/V1/Client/BigQueryWriteClient.php | 10 +- .../V2/Client/BigtableInstanceAdminClient.php | 42 +- .../V2/Client/BigtableTableAdminClient.php | 60 +- Bigtable/src/V2/Client/BigtableClient.php | 8 +- Billing/src/V1/Client/CloudBillingClient.php | 22 +- Billing/src/V1/Client/CloudCatalogClient.php | 4 +- .../src/V1/Client/BudgetServiceClient.php | 10 +- .../BinauthzManagementServiceV1Client.php | 14 +- .../src/V1/Client/SystemPolicyV1Client.php | 2 +- .../V1/Client/ValidationHelperV1Client.php | 2 +- .../V1/Client/CertificateManagerClient.php | 62 +- .../V2/Baremetalsolution.php | 113 - .../Cloud/Baremetalsolution/V2/Common.php | Bin 1191 -> 0 bytes .../Cloud/Baremetalsolution/V2/Instance.php | Bin 4926 -> 0 bytes .../Google/Cloud/Baremetalsolution/V2/Lun.php | Bin 2393 -> 0 bytes .../Cloud/Baremetalsolution/V2/Network.php | Bin 4326 -> 0 bytes .../Cloud/Baremetalsolution/V2/NfsShare.php | Bin 3207 -> 0 bytes .../Cloud/Baremetalsolution/V2/Osimage.php | 45 - .../Baremetalsolution/V2/Provisioning.php | Bin 7296 -> 0 bytes .../Cloud/Baremetalsolution/V2/SshKey.php | 52 - .../Cloud/Baremetalsolution/V2/Volume.php | Bin 4056 -> 0 bytes .../Baremetalsolution/V2/VolumeSnapshot.php | Bin 2450 -> 0 bytes .../V2/CreateNfsShareRequest.php | 127 - .../V2/CreateProvisioningConfigRequest.php | 170 - .../V2/CreateSSHKeyRequest.php | 179 - .../V2/CreateVolumeSnapshotRequest.php | 127 - .../V2/DeleteNfsShareRequest.php | 81 - .../V2/DeleteSSHKeyRequest.php | 86 - .../V2/DeleteVolumeSnapshotRequest.php | 81 - .../BareMetalSolution/V2/DetachLunRequest.php | 152 - ...DisableInteractiveSerialConsoleRequest.php | 81 - ...isableInteractiveSerialConsoleResponse.php | 33 - .../EnableInteractiveSerialConsoleRequest.php | 81 - ...EnableInteractiveSerialConsoleResponse.php | 33 - .../BareMetalSolution/V2/EvictLunRequest.php | 81 - .../V2/EvictVolumeRequest.php | 81 - .../V2/GetInstanceRequest.php | 81 - .../BareMetalSolution/V2/GetLunRequest.php | 81 - .../V2/GetNetworkRequest.php | 81 - .../V2/GetNfsShareRequest.php | 81 - .../V2/GetProvisioningConfigRequest.php | 81 - .../BareMetalSolution/V2/GetVolumeRequest.php | 81 - .../V2/GetVolumeSnapshotRequest.php | 81 - .../Cloud/BareMetalSolution/V2/Instance.php | 779 --- .../BareMetalSolution/V2/Instance/State.php | 99 - .../BareMetalSolution/V2/InstanceConfig.php | 549 -- .../V2/InstanceConfig/NetworkAddress.php | 138 - .../V2/InstanceConfig/NetworkConfig.php | 65 - .../BareMetalSolution/V2/InstanceQuota.php | 216 - .../V2/ListInstancesRequest.php | 187 - .../V2/ListInstancesResponse.php | 135 - .../BareMetalSolution/V2/ListLunsRequest.php | 153 - .../BareMetalSolution/V2/ListLunsResponse.php | 135 - .../V2/ListNetworkUsageRequest.php | 81 - .../V2/ListNetworkUsageResponse.php | 67 - .../V2/ListNetworksRequest.php | 187 - .../V2/ListNetworksResponse.php | 135 - .../V2/ListNfsSharesRequest.php | 187 - .../V2/ListNfsSharesResponse.php | 135 - .../V2/ListOSImagesRequest.php | 161 - .../V2/ListOSImagesResponse.php | 105 - .../V2/ListProvisioningQuotasRequest.php | 161 - .../V2/ListProvisioningQuotasResponse.php | 105 - .../V2/ListSSHKeysRequest.php | 154 - .../V2/ListSSHKeysResponse.php | 105 - .../V2/ListVolumeSnapshotsRequest.php | 153 - .../V2/ListVolumeSnapshotsResponse.php | 135 - .../V2/ListVolumesRequest.php | 187 - .../V2/ListVolumesResponse.php | 135 - .../BareMetalSolution/V2/LogicalInterface.php | 151 - .../LogicalNetworkInterface.php | 210 - .../Google/Cloud/BareMetalSolution/V2/Lun.php | 459 -- .../V2/Lun/MultiprotocolType.php | 57 - .../Cloud/BareMetalSolution/V2/Lun/State.php | 85 - .../BareMetalSolution/V2/Lun/StorageType.php | 64 - .../Cloud/BareMetalSolution/V2/Network.php | 611 --- .../BareMetalSolution/V2/Network/State.php | 78 - .../BareMetalSolution/V2/Network/Type.php | 68 - .../V2/NetworkAddressReservation.php | 151 - .../BareMetalSolution/V2/NetworkConfig.php | 423 -- .../V2/NetworkConfig/Bandwidth.php | 78 - .../V2/NetworkConfig/IntakeVlanAttachment.php | 104 - .../V2/NetworkConfig/ServiceCidr.php | 78 - .../V2/NetworkConfig/Type.php | 68 - .../V2/NetworkMountPoint.php | 169 - .../BareMetalSolution/V2/NetworkUsage.php | 111 - .../Cloud/BareMetalSolution/V2/NfsShare.php | 351 -- .../V2/NfsShare/AllowedClient.php | 328 -- .../V2/NfsShare/MountPermissions.php | 64 - .../BareMetalSolution/V2/NfsShare/State.php | 78 - .../V2/NfsShare/StorageType.php | 64 - .../Cloud/BareMetalSolution/V2/OSImage.php | 211 - .../V2/OperationMetadata.php | 307 -- .../V2/ProvisioningConfig.php | 540 -- .../V2/ProvisioningConfig/State.php | 102 - .../V2/ProvisioningQuota.php | 353 -- .../V2/ProvisioningQuota/AssetType.php | 71 - .../V2/RenameInstanceRequest.php | 122 - .../V2/RenameNetworkRequest.php | 122 - .../V2/RenameNfsShareRequest.php | 122 - .../V2/RenameVolumeRequest.php | 122 - .../V2/ResetInstanceRequest.php | 81 - .../V2/ResetInstanceResponse.php | 33 - .../V2/ResizeVolumeRequest.php | 117 - .../V2/RestoreVolumeSnapshotRequest.php | 86 - .../Cloud/BareMetalSolution/V2/SSHKey.php | 105 - .../V2/ServerNetworkTemplate.php | 151 - .../LogicalInterface.php | 154 - .../LogicalInterface/InterfaceType.php | 64 - .../V2/StartInstanceRequest.php | 81 - .../V2/StartInstanceResponse.php | 33 - .../V2/StopInstanceRequest.php | 81 - .../V2/StopInstanceResponse.php | 33 - .../V2/SubmitProvisioningConfigRequest.php | 170 - .../V2/SubmitProvisioningConfigResponse.php | 77 - .../V2/UpdateInstanceRequest.php | 167 - .../V2/UpdateNetworkRequest.php | 157 - .../V2/UpdateNfsShareRequest.php | 162 - .../V2/UpdateProvisioningConfigRequest.php | 174 - .../V2/UpdateVolumeRequest.php | 157 - .../Google/Cloud/BareMetalSolution/V2/VRF.php | 191 - .../BareMetalSolution/V2/VRF/QosPolicy.php | 70 - .../Cloud/BareMetalSolution/V2/VRF/State.php | 64 - .../V2/VRF/VlanAttachment.php | 292 -- .../Cloud/BareMetalSolution/V2/Volume.php | 933 ---- .../BareMetalSolution/V2/Volume/Protocol.php | 65 - .../V2/Volume/SnapshotAutoDeleteBehavior.php | 73 - .../V2/Volume/SnapshotReservationDetail.php | 204 - .../BareMetalSolution/V2/Volume/State.php | 86 - .../V2/Volume/StorageType.php | 64 - .../V2/Volume/WorkloadProfile.php | 64 - .../BareMetalSolution/V2/VolumeConfig.php | 461 -- .../V2/VolumeConfig/LunRange.php | 104 - .../V2/VolumeConfig/NfsExport.php | 292 -- .../V2/VolumeConfig/NfsExport/Permissions.php | 64 - .../V2/VolumeConfig/Protocol.php | 64 - .../V2/VolumeConfig/Type.php | 64 - .../V2/VolumePerformanceTier.php | 68 - .../BareMetalSolution/V2/VolumeSnapshot.php | 251 - .../V2/VolumeSnapshot/SnapshotType.php | 64 - .../BareMetalSolution/V2/WorkloadProfile.php | 61 - .../create_nfs_share.php | 85 - .../create_provisioning_config.php | 74 - .../create_ssh_key.php | 81 - .../create_volume_snapshot.php | 74 - .../delete_nfs_share.php | 80 - .../delete_ssh_key.php | 70 - .../delete_volume_snapshot.php | 75 - .../V2/BareMetalSolutionClient/detach_lun.php | 87 - .../disable_interactive_serial_console.php | 83 - .../enable_interactive_serial_console.php | 83 - .../V2/BareMetalSolutionClient/evict_lun.php | 81 - .../BareMetalSolutionClient/evict_volume.php | 81 - .../BareMetalSolutionClient/get_instance.php | 71 - .../BareMetalSolutionClient/get_location.php | 57 - .../V2/BareMetalSolutionClient/get_lun.php | 71 - .../BareMetalSolutionClient/get_network.php | 71 - .../BareMetalSolutionClient/get_nfs_share.php | 71 - .../get_provisioning_config.php | 75 - .../V2/BareMetalSolutionClient/get_volume.php | 71 - .../get_volume_snapshot.php | 77 - .../list_instances.php | 76 - .../list_locations.php | 62 - .../V2/BareMetalSolutionClient/list_luns.php | 76 - .../list_network_usage.php | 72 - .../BareMetalSolutionClient/list_networks.php | 76 - .../list_nfs_shares.php | 76 - .../list_os_images.php | 76 - .../list_provisioning_quotas.php | 76 - .../BareMetalSolutionClient/list_ssh_keys.php | 78 - .../list_volume_snapshots.php | 78 - .../BareMetalSolutionClient/list_volumes.php | 76 - .../rename_instance.php | 76 - .../rename_network.php | 76 - .../rename_nfs_share.php | 76 - .../BareMetalSolutionClient/rename_volume.php | 76 - .../reset_instance.php | 84 - .../BareMetalSolutionClient/resize_volume.php | 83 - .../restore_volume_snapshot.php | 90 - .../start_instance.php | 83 - .../BareMetalSolutionClient/stop_instance.php | 83 - .../submit_provisioning_config.php | 75 - .../update_instance.php | 71 - .../update_network.php | 71 - .../update_nfs_share.php | 71 - .../update_provisioning_config.php | 62 - .../BareMetalSolutionClient/update_volume.php | 71 - .../src/V2/Client/BareMetalSolutionClient.php | 1856 ------- .../v2/src/V2/gapic_metadata.json | 248 - .../bare_metal_solution_client_config.json | 262 - .../bare_metal_solution_descriptor_config.php | 795 --- ...bare_metal_solution_rest_client_config.php | 572 --- .../V2/Client/BareMetalSolutionClientTest.php | 4556 ----------------- .../Google/Cloud/Batch/V1/Batch.php | 93 - .../GPBMetadata/Google/Cloud/Batch/V1/Job.php | Bin 6031 -> 0 bytes .../Google/Cloud/Batch/V1/Task.php | Bin 3962 -> 0 bytes .../Google/Cloud/Batch/V1/Volume.php | Bin 1026 -> 0 bytes .../Cloud/Batch/V1/AllocationPolicy.php | 400 -- .../Batch/V1/AllocationPolicy/Accelerator.php | 201 - .../V1/AllocationPolicy/AttachedDisk.php | 153 - .../Cloud/Batch/V1/AllocationPolicy/Disk.php | 349 -- .../V1/AllocationPolicy/InstancePolicy.php | 321 -- .../InstancePolicyOrTemplate.php | 316 -- .../V1/AllocationPolicy/LocationPolicy.php | 112 - .../V1/AllocationPolicy/NetworkInterface.php | 202 - .../V1/AllocationPolicy/NetworkPolicy.php | 70 - .../V1/AllocationPolicy/PlacementPolicy.php | 133 - .../V1/AllocationPolicy/ProvisioningModel.php | 75 - .../Google/Cloud/Batch/V1/ComputeResource.php | 248 - .../Cloud/Batch/V1/CreateJobRequest.php | 278 - .../Cloud/Batch/V1/DeleteJobRequest.php | 188 - .../src/Google/Cloud/Batch/V1/Environment.php | 158 - .../Cloud/Batch/V1/Environment/KMSEnvMap.php | 102 - .../proto/src/Google/Cloud/Batch/V1/GCS.php | 71 - .../Google/Cloud/Batch/V1/GetJobRequest.php | 81 - .../Google/Cloud/Batch/V1/GetTaskRequest.php | 81 - .../proto/src/Google/Cloud/Batch/V1/Job.php | 513 -- .../Google/Cloud/Batch/V1/JobNotification.php | 155 - .../Batch/V1/JobNotification/Message.php | 144 - .../Cloud/Batch/V1/JobNotification/Type.php | 64 - .../src/Google/Cloud/Batch/V1/JobStatus.php | 183 - .../Batch/V1/JobStatus/InstanceStatus.php | 182 - .../Google/Cloud/Batch/V1/JobStatus/State.php | 96 - .../Batch/V1/JobStatus/TaskGroupStatus.php | 108 - .../Google/Cloud/Batch/V1/LifecyclePolicy.php | 128 - .../Cloud/Batch/V1/LifecyclePolicy/Action.php | 64 - .../V1/LifecyclePolicy/ActionCondition.php | 82 - .../Google/Cloud/Batch/V1/ListJobsRequest.php | 220 - .../Cloud/Batch/V1/ListJobsResponse.php | 135 - .../Cloud/Batch/V1/ListTasksRequest.php | 201 - .../Cloud/Batch/V1/ListTasksResponse.php | 135 - .../src/Google/Cloud/Batch/V1/LogsPolicy.php | 158 - .../V1/LogsPolicy/CloudLoggingOption.php | 99 - .../Cloud/Batch/V1/LogsPolicy/Destination.php | 64 - .../proto/src/Google/Cloud/Batch/V1/NFS.php | 101 - .../Cloud/Batch/V1/OperationMetadata.php | 307 -- .../src/Google/Cloud/Batch/V1/Runnable.php | 492 -- .../Cloud/Batch/V1/Runnable/Barrier.php | 75 - .../Cloud/Batch/V1/Runnable/Container.php | 562 -- .../Google/Cloud/Batch/V1/Runnable/Script.php | 153 - .../Google/Cloud/Batch/V1/ServiceAccount.php | 101 - .../src/Google/Cloud/Batch/V1/StatusEvent.php | 235 - .../proto/src/Google/Cloud/Batch/V1/Task.php | 123 - .../Google/Cloud/Batch/V1/TaskExecution.php | 100 - .../src/Google/Cloud/Batch/V1/TaskGroup.php | 479 -- .../Batch/V1/TaskGroup/SchedulingPolicy.php | 66 - .../src/Google/Cloud/Batch/V1/TaskSpec.php | 440 -- .../src/Google/Cloud/Batch/V1/TaskStatus.php | 101 - .../Cloud/Batch/V1/TaskStatus/State.php | 92 - .../src/Google/Cloud/Batch/V1/Volume.php | 268 - .../V1/BatchServiceClient/create_job.php | 81 - .../V1/BatchServiceClient/delete_job.php | 66 - .../samples/V1/BatchServiceClient/get_job.php | 71 - .../V1/BatchServiceClient/get_location.php | 57 - .../V1/BatchServiceClient/get_task.php | 77 - .../V1/BatchServiceClient/list_jobs.php | 62 - .../V1/BatchServiceClient/list_locations.php | 62 - .../V1/BatchServiceClient/list_tasks.php | 83 - .../v1/src/V1/Client/BatchServiceClient.php | 558 -- .../Batch/v1/src/V1/gapic_metadata.json | 58 - .../batch_service_client_config.json | 84 - .../batch_service_descriptor_config.php | 163 - .../batch_service_rest_client_config.php | 167 - .../Unit/V1/Client/BatchServiceClientTest.php | 701 --- .../V1/AppConnectionsService.php | Bin 6753 -> 0 bytes .../AppConnections/V1/AppConnection.php | 470 -- .../V1/AppConnection/ApplicationEndpoint.php | 104 - .../V1/AppConnection/Gateway.php | 181 - .../V1/AppConnection/Gateway/Type.php | 57 - .../AppConnections/V1/AppConnection/State.php | 86 - .../AppConnections/V1/AppConnection/Type.php | 59 - .../V1/AppConnectionOperationMetadata.php | 307 -- .../V1/CreateAppConnectionRequest.php | 295 -- .../V1/DeleteAppConnectionRequest.php | 198 - .../V1/GetAppConnectionRequest.php | 86 - .../V1/ListAppConnectionsRequest.php | 258 - .../V1/ListAppConnectionsResponse.php | 139 - .../V1/ResolveAppConnectionsRequest.php | 220 - .../V1/ResolveAppConnectionsResponse.php | 139 - .../AppConnectionDetails.php | 118 - .../V1/UpdateAppConnectionRequest.php | 317 -- .../create_app_connection.php | 114 - .../delete_app_connection.php | 85 - .../get_app_connection.php | 76 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../list_app_connections.php | 77 - .../list_locations.php | 62 - .../resolve_app_connections.php | 91 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_app_connection.php | 110 - .../V1/Client/AppConnectionsServiceClient.php | 668 --- .../v1/src/V1/gapic_metadata.json | 73 - ...app_connections_service_client_config.json | 77 - ..._connections_service_descriptor_config.php | 217 - ...connections_service_rest_client_config.php | 271 - .../AppConnectionsServiceClientTest.php | 1146 ----- .../V1/AppConnectorInstanceConfig.php | Bin 1743 -> 0 bytes .../Appconnectors/V1/AppConnectorsService.php | Bin 6117 -> 0 bytes .../Appconnectors/V1/ResourceInfo.php | Bin 1587 -> 0 bytes .../AppConnectors/V1/AppConnector.php | 395 -- .../V1/AppConnector/PrincipalInfo.php | 78 - .../PrincipalInfo/ServiceAccount.php | 70 - .../AppConnectors/V1/AppConnector/State.php | 86 - .../V1/AppConnectorInstanceConfig.php | 215 - .../V1/AppConnectorOperationMetadata.php | 307 -- .../V1/CreateAppConnectorRequest.php | 296 -- .../V1/DeleteAppConnectorRequest.php | 198 - .../V1/GetAppConnectorRequest.php | 86 - .../AppConnectors/V1/HealthStatus.php | 75 - .../AppConnectors/V1/ImageConfig.php | 109 - .../V1/ListAppConnectorsRequest.php | 258 - .../V1/ListAppConnectorsResponse.php | 139 - .../AppConnectors/V1/NotificationConfig.php | 75 - .../CloudPubSubNotificationConfig.php | 70 - .../AppConnectors/V1/ReportStatusRequest.php | 244 - .../AppConnectors/V1/ResourceInfo.php | 240 - .../V1/UpdateAppConnectorRequest.php | 273 - .../create_app_connector.php | 93 - .../delete_app_connector.php | 85 - .../get_app_connector.php | 76 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../list_app_connectors.php | 77 - .../list_locations.php | 62 - .../report_status.php | 94 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_app_connector.php | 91 - .../V1/Client/AppConnectorsServiceClient.php | 624 --- .../v1/src/V1/gapic_metadata.json | 73 - .../app_connectors_service_client_config.json | 77 - ...p_connectors_service_descriptor_config.php | 214 - ..._connectors_service_rest_client_config.php | 272 - .../Client/AppConnectorsServiceClientTest.php | 1173 ----- .../Appgateways/V1/AppGatewaysService.php | Bin 4655 -> 0 bytes .../BeyondCorp/AppGateways/V1/AppGateway.php | 442 -- .../V1/AppGateway/AllocatedConnection.php | 104 - .../AppGateways/V1/AppGateway/HostType.php | 58 - .../AppGateways/V1/AppGateway/State.php | 86 - .../AppGateways/V1/AppGateway/Type.php | 58 - .../V1/AppGatewayOperationMetadata.php | 307 -- .../V1/CreateAppGatewayRequest.php | 295 -- .../V1/DeleteAppGatewayRequest.php | 198 - .../AppGateways/V1/GetAppGatewayRequest.php | 86 - .../AppGateways/V1/ListAppGatewaysRequest.php | 258 - .../V1/ListAppGatewaysResponse.php | 139 - .../create_app_gateway.php | 102 - .../delete_app_gateway.php | 85 - .../get_app_gateway.php | 76 - .../get_iam_policy.php | 72 - .../AppGatewaysServiceClient/get_location.php | 57 - .../list_app_gateways.php | 77 - .../list_locations.php | 62 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../V1/Client/AppGatewaysServiceClient.php | 564 -- .../v1/src/V1/gapic_metadata.json | 63 - .../app_gateways_service_client_config.json | 67 - ...app_gateways_service_descriptor_config.php | 175 - ...pp_gateways_service_rest_client_config.php | 244 - .../Client/AppGatewaysServiceClientTest.php | 904 ---- .../V1/ClientConnectorServicesService.php | Bin 6575 -> 0 bytes .../V1/ClientConnectorService.php | 327 -- .../V1/ClientConnectorService/Egress.php | 78 - .../Egress/PeeredVpc.php | 70 - .../V1/ClientConnectorService/Ingress.php | 79 - .../ClientConnectorService/Ingress/Config.php | 108 - .../Ingress/Config/DestinationRoute.php | 114 - .../Ingress/Config/TransportProtocol.php | 57 - .../V1/ClientConnectorService/State.php | 94 - ...lientConnectorServiceOperationMetadata.php | 307 -- .../CreateClientConnectorServiceRequest.php | 301 -- .../DeleteClientConnectorServiceRequest.php | 193 - .../V1/GetClientConnectorServiceRequest.php | 81 - .../V1/ListClientConnectorServicesRequest.php | 221 - .../ListClientConnectorServicesResponse.php | 135 - .../UpdateClientConnectorServiceRequest.php | 308 -- .../create_client_connector_service.php | 96 - .../delete_client_connector_service.php | 84 - .../get_client_connector_service.php | 75 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../list_client_connector_services.php | 76 - .../list_locations.php | 62 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_client_connector_service.php | 93 - .../ClientConnectorServicesServiceClient.php | 602 --- .../v1/src/V1/gapic_metadata.json | 68 - ...nector_services_service_client_config.json | 72 - ...tor_services_service_descriptor_config.php | 195 - ...or_services_service_rest_client_config.php | 260 - ...ientConnectorServicesServiceClientTest.php | 1037 ---- .../V1/ClientGatewaysService.php | Bin 4281 -> 0 bytes .../ClientGateways/V1/ClientGateway.php | 265 - .../ClientGateways/V1/ClientGateway/State.php | 93 - .../V1/ClientGatewayOperationMetadata.php | 307 -- .../V1/CreateClientGatewayRequest.php | 290 -- .../V1/DeleteClientGatewayRequest.php | 193 - .../V1/GetClientGatewayRequest.php | 81 - .../V1/ListClientGatewaysRequest.php | 221 - .../V1/ListClientGatewaysResponse.php | 135 - .../create_client_gateway.php | 88 - .../delete_client_gateway.php | 84 - .../get_client_gateway.php | 75 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../list_client_gateways.php | 76 - .../list_locations.php | 62 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../V1/Client/ClientGatewaysServiceClient.php | 565 -- .../v1/src/V1/gapic_metadata.json | 63 - ...client_gateways_service_client_config.json | 67 - ...ent_gateways_service_descriptor_config.php | 175 - ...nt_gateways_service_rest_client_config.php | 244 - .../ClientGatewaysServiceClientTest.php | 884 ---- .../Bigquery/Analyticshub/V1/Analyticshub.php | Bin 16329 -> 0 bytes .../V1/CreateDataExchangeRequest.php | 182 - .../AnalyticsHub/V1/CreateListingRequest.php | 182 - .../BigQuery/AnalyticsHub/V1/DataExchange.php | 421 -- .../BigQuery/AnalyticsHub/V1/DataProvider.php | 105 - .../V1/DeleteDataExchangeRequest.php | 86 - .../AnalyticsHub/V1/DeleteListingRequest.php | 86 - .../V1/DeleteSubscriptionRequest.php | 86 - .../AnalyticsHub/V1/DestinationDataset.php | 311 -- .../V1/DestinationDatasetReference.php | 109 - .../AnalyticsHub/V1/DiscoveryType.php | 65 - .../V1/GetDataExchangeRequest.php | 86 - .../AnalyticsHub/V1/GetListingRequest.php | 86 - .../V1/GetSubscriptionRequest.php | 86 - .../V1/ListDataExchangesRequest.php | 162 - .../V1/ListDataExchangesResponse.php | 101 - .../AnalyticsHub/V1/ListListingsRequest.php | 162 - .../AnalyticsHub/V1/ListListingsResponse.php | 101 - .../V1/ListOrgDataExchangesRequest.php | 162 - .../V1/ListOrgDataExchangesResponse.php | 102 - ...ListSharedResourceSubscriptionsRequest.php | 201 - ...istSharedResourceSubscriptionsResponse.php | 101 - .../V1/ListSubscriptionsRequest.php | 228 - .../V1/ListSubscriptionsResponse.php | 101 - .../BigQuery/AnalyticsHub/V1/Listing.php | 624 --- .../V1/Listing/BigQueryDatasetSource.php | 170 - .../RestrictedExportPolicy.php | 262 - .../SelectedResource.php | 87 - .../AnalyticsHub/V1/Listing/Category.php | 143 - .../V1/Listing/RestrictedExportConfig.php | 147 - .../AnalyticsHub/V1/Listing/State.php | 58 - .../AnalyticsHub/V1/OperationMetadata.php | 307 -- .../BigQuery/AnalyticsHub/V1/Publisher.php | 105 - .../V1/RefreshSubscriptionRequest.php | 86 - .../V1/RefreshSubscriptionResponse.php | 77 - .../V1/RevokeSubscriptionRequest.php | 86 - .../V1/RevokeSubscriptionResponse.php | 33 - .../V1/SharingEnvironmentConfig.php | 109 - .../DcrExchangeConfig.php | 160 - .../DefaultExchangeConfig.php | 36 - .../V1/SubscribeDataExchangeRequest.php | 196 - .../V1/SubscribeDataExchangeResponse.php | 77 - .../V1/SubscribeListingRequest.php | 128 - .../V1/SubscribeListingResponse.php | 77 - .../BigQuery/AnalyticsHub/V1/Subscription.php | 432 -- .../V1/Subscription/LinkedResource.php | 81 - .../AnalyticsHub/V1/Subscription/State.php | 73 - .../V1/UpdateDataExchangeRequest.php | 146 - .../AnalyticsHub/V1/UpdateListingRequest.php | 146 - .../create_data_exchange.php | 90 - .../create_listing.php | 97 - .../delete_data_exchange.php | 74 - .../delete_listing.php | 75 - .../delete_subscription.php | 85 - .../get_data_exchange.php | 76 - .../get_iam_policy.php | 71 - .../AnalyticsHubServiceClient/get_listing.php | 77 - .../get_subscription.php | 76 - .../list_data_exchanges.php | 77 - .../list_listings.php | 81 - .../list_org_data_exchanges.php | 77 - .../list_shared_resource_subscriptions.php | 78 - .../list_subscriptions.php | 77 - .../refresh_subscription.php | 90 - .../revoke_subscription.php | 76 - .../set_iam_policy.php | 73 - .../subscribe_data_exchange.php | 101 - .../subscribe_listing.php | 82 - .../test_iam_permissions.php | 78 - .../update_data_exchange.php | 78 - .../update_listing.php | 81 - .../V1/Client/AnalyticsHubServiceClient.php | 1009 ---- .../v1/src/V1/gapic_metadata.json | 128 - .../analytics_hub_service_client_config.json | 145 - ...nalytics_hub_service_descriptor_config.php | 363 -- ...alytics_hub_service_rest_client_config.php | 332 -- .../Client/AnalyticsHubServiceClientTest.php | 1929 ------- .../Bigquery/Connection/V1/Connection.php | Bin 6926 -> 0 bytes .../BigQuery/Connection/V1/AwsAccessRole.php | 110 - .../Connection/V1/AwsCrossAccountRole.php | 152 - .../BigQuery/Connection/V1/AwsProperties.php | 122 - .../Connection/V1/AzureProperties.php | 287 -- .../Connection/V1/CloudResourceProperties.php | 100 - .../Connection/V1/CloudSpannerProperties.php | 313 -- .../Connection/V1/CloudSqlCredential.php | 101 - .../Connection/V1/CloudSqlProperties.php | 229 - .../V1/CloudSqlProperties/DatabaseType.php | 64 - .../BigQuery/Connection/V1/Connection.php | 488 -- .../Connection/V1/CreateConnectionRequest.php | 169 - .../Connection/V1/DeleteConnectionRequest.php | 86 - .../Connection/V1/GetConnectionRequest.php | 87 - .../Connection/V1/ListConnectionsRequest.php | 155 - .../Connection/V1/ListConnectionsResponse.php | 102 - .../Connection/V1/MetastoreServiceConfig.php | 75 - .../V1/SalesforceDataCloudProperties.php | 140 - .../V1/SparkHistoryServerConfig.php | 79 - .../Connection/V1/SparkProperties.php | 188 - .../Connection/V1/UpdateConnectionRequest.php | 179 - .../create_connection.php | 74 - .../delete_connection.php | 70 - .../get_connection.php | 72 - .../get_iam_policy.php | 73 - .../list_connections.php | 82 - .../set_iam_policy.php | 76 - .../test_iam_permissions.php | 84 - .../update_connection.php | 78 - .../src/V1/Client/ConnectionServiceClient.php | 507 -- .../v1/src/V1/gapic_metadata.json | 58 - .../connection_service_client_config.json | 85 - .../connection_service_descriptor_config.php | 138 - .../connection_service_rest_client_config.php | 128 - .../V1/Client/ConnectionServiceClientTest.php | 702 --- .../Dataexchange/V1Beta1/Dataexchange.php | Bin 10020 -> 0 bytes .../V1beta1/CreateDataExchangeRequest.php | 182 - .../V1beta1/CreateListingRequest.php | 182 - .../DataExchange/V1beta1/DataExchange.php | 329 -- .../DataExchange/V1beta1/DataProvider.php | 105 - .../V1beta1/DeleteDataExchangeRequest.php | 86 - .../V1beta1/DeleteListingRequest.php | 86 - .../V1beta1/DestinationDataset.php | 311 -- .../V1beta1/DestinationDatasetReference.php | 109 - .../V1beta1/GetDataExchangeRequest.php | 86 - .../V1beta1/GetListingRequest.php | 86 - .../V1beta1/ListDataExchangesRequest.php | 162 - .../V1beta1/ListDataExchangesResponse.php | 101 - .../V1beta1/ListListingsRequest.php | 162 - .../V1beta1/ListListingsResponse.php | 101 - .../V1beta1/ListOrgDataExchangesRequest.php | 162 - .../V1beta1/ListOrgDataExchangesResponse.php | 102 - .../BigQuery/DataExchange/V1beta1/Listing.php | 540 -- .../V1beta1/Listing/BigQueryDatasetSource.php | 80 - .../DataExchange/V1beta1/Listing/Category.php | 143 - .../DataExchange/V1beta1/Listing/State.php | 58 - .../DataExchange/V1beta1/Publisher.php | 105 - .../V1beta1/SubscribeListingRequest.php | 128 - .../V1beta1/SubscribeListingResponse.php | 33 - .../V1beta1/UpdateDataExchangeRequest.php | 146 - .../V1beta1/UpdateListingRequest.php | 146 - .../create_data_exchange.php | 91 - .../create_listing.php | 98 - .../delete_data_exchange.php | 74 - .../delete_listing.php | 75 - .../get_data_exchange.php | 76 - .../get_iam_policy.php | 71 - .../AnalyticsHubServiceClient/get_listing.php | 77 - .../get_location.php | 57 - .../list_data_exchanges.php | 77 - .../list_listings.php | 81 - .../list_locations.php | 62 - .../list_org_data_exchanges.php | 77 - .../set_iam_policy.php | 73 - .../subscribe_listing.php | 82 - .../test_iam_permissions.php | 78 - .../update_data_exchange.php | 79 - .../update_listing.php | 82 - .../src/V1beta1/AnalyticsHubServiceClient.php | 36 - .../Client/AnalyticsHubServiceClient.php | 815 --- .../Gapic/AnalyticsHubServiceGapicClient.php | 1305 ----- .../v1beta1/src/V1beta1/gapic_metadata.json | 103 - .../analytics_hub_service_client_config.json | 120 - ...nalytics_hub_service_descriptor_config.php | 274 - ...alytics_hub_service_rest_client_config.php | 260 - .../V1beta1/AnalyticsHubServiceClientTest.php | 1239 ----- .../Client/AnalyticsHubServiceClientTest.php | 1387 ----- .../Bigquery/Datapolicies/V1/Datapolicy.php | Bin 5331 -> 0 bytes .../V1/CreateDataPolicyRequest.php | 137 - .../DataPolicies/V1/DataMaskingPolicy.php | 114 - .../PredefinedExpression.php | 141 - .../BigQuery/DataPolicies/V1/DataPolicy.php | 234 - .../V1/DataPolicy/DataPolicyType.php | 65 - .../V1/DeleteDataPolicyRequest.php | 86 - .../DataPolicies/V1/GetDataPolicyRequest.php | 86 - .../V1/ListDataPoliciesRequest.php | 228 - .../V1/ListDataPoliciesResponse.php | 105 - .../V1/RenameDataPolicyRequest.php | 121 - .../V1/UpdateDataPolicyRequest.php | 168 - .../create_data_policy.php | 75 - .../delete_data_policy.php | 74 - .../get_data_policy.php | 76 - .../get_iam_policy.php | 71 - .../list_data_policies.php | 77 - .../rename_data_policy.php | 74 - .../set_iam_policy.php | 73 - .../test_iam_permissions.php | 78 - .../update_data_policy.php | 60 - .../src/V1/Client/DataPolicyServiceClient.php | 485 -- .../v1/src/V1/gapic_metadata.json | 63 - .../data_policy_service_client_config.json | 79 - .../data_policy_service_descriptor_config.php | 149 - ...data_policy_service_rest_client_config.php | 135 - .../V1/Client/DataPolicyServiceClientTest.php | 734 --- .../Bigquery/Datatransfer/V1/Datatransfer.php | Bin 11719 -> 0 bytes .../Bigquery/Datatransfer/V1/Transfer.php | Bin 4804 -> 0 bytes .../V1/CheckValidCredsRequest.php | 96 - .../V1/CheckValidCredsResponse.php | 67 - .../V1/CreateTransferConfigRequest.php | 403 -- .../BigQuery/DataTransfer/V1/DataSource.php | 721 --- .../V1/DataSource/AuthorizationType.php | 73 - .../V1/DataSource/DataRefreshType.php | 68 - .../DataTransfer/V1/DataSourceParameter.php | 659 --- .../V1/DataSourceParameter/Type.php | 104 - .../V1/DeleteTransferConfigRequest.php | 92 - .../V1/DeleteTransferRunRequest.php | 96 - .../DataTransfer/V1/EmailPreferences.php | 68 - .../V1/EncryptionConfiguration.php | 104 - .../V1/EnrollDataSourcesRequest.php | 110 - .../DataTransfer/V1/EventDrivenSchedule.php | 75 - .../DataTransfer/V1/GetDataSourceRequest.php | 91 - .../V1/GetTransferConfigRequest.php | 91 - .../DataTransfer/V1/GetTransferRunRequest.php | 96 - .../V1/ListDataSourcesRequest.php | 175 - .../V1/ListDataSourcesResponse.php | 113 - .../V1/ListTransferConfigsRequest.php | 209 - .../V1/ListTransferConfigsResponse.php | 113 - .../V1/ListTransferLogsRequest.php | 213 - .../V1/ListTransferLogsResponse.php | 113 - .../V1/ListTransferRunsRequest.php | 248 - .../V1/ListTransferRunsRequest/RunAttempt.php | 57 - .../V1/ListTransferRunsResponse.php | 113 - .../DataTransfer/V1/ManualSchedule.php | 33 - .../DataTransfer/V1/ScheduleOptions.php | 195 - .../DataTransfer/V1/ScheduleOptionsV2.php | 159 - .../V1/ScheduleTransferRunsRequest.php | 193 - .../V1/ScheduleTransferRunsResponse.php | 67 - .../V1/StartManualTransferRunsRequest.php | 168 - .../TimeRange.php | 149 - .../V1/StartManualTransferRunsResponse.php | 67 - .../DataTransfer/V1/TimeBasedSchedule.php | 220 - .../DataTransfer/V1/TransferConfig.php | 980 ---- .../DataTransfer/V1/TransferMessage.php | 145 - .../V1/TransferMessage/MessageSeverity.php | 71 - .../BigQuery/DataTransfer/V1/TransferRun.php | 707 --- .../DataTransfer/V1/TransferState.php | 83 - .../BigQuery/DataTransfer/V1/TransferType.php | 63 - .../V1/UnenrollDataSourcesRequest.php | 110 - .../V1/UpdateTransferConfigRequest.php | 388 -- .../BigQuery/DataTransfer/V1/UserInfo.php | 77 - .../check_valid_creds.php | 74 - .../create_transfer_config.php | 77 - .../delete_transfer_config.php | 72 - .../delete_transfer_run.php | 72 - .../enroll_data_sources.php | 62 - .../get_data_source.php | 73 - .../get_location.php | 57 - .../get_transfer_config.php | 73 - .../get_transfer_run.php | 74 - .../list_data_sources.php | 78 - .../list_locations.php | 62 - .../list_transfer_configs.php | 79 - .../list_transfer_logs.php | 78 - .../list_transfer_runs.php | 79 - .../schedule_transfer_runs.php | 82 - .../start_manual_transfer_runs.php | 60 - .../unenroll_data_sources.php | 59 - .../update_transfer_config.php | 63 - .../V1/Client/DataTransferServiceClient.php | 936 ---- .../v1/src/V1/gapic_metadata.json | 108 - .../data_transfer_service_client_config.json | 135 - ...ata_transfer_service_descriptor_config.php | 300 -- ...ta_transfer_service_rest_client_config.php | 339 -- .../Client/DataTransferServiceClientTest.php | 1373 ----- .../Migration/V2/MigrationEntities.php | Bin 4645 -> 0 bytes .../Migration/V2/MigrationErrorDetails.php | 40 - .../Migration/V2/MigrationMetrics.php | Bin 1890 -> 0 bytes .../Migration/V2/MigrationService.php | 81 - .../Migration/V2/TranslationConfig.php | Bin 4030 -> 0 bytes .../Migration/V2/TranslationDetails.php | Bin 1792 -> 0 bytes .../Migration/V2/TranslationSuggestion.php | Bin 1330 -> 0 bytes .../Migration/V2/TranslationUsability.php | 42 - .../Migration/V2/AzureSynapseDialect.php | 33 - .../BigQuery/Migration/V2/BigQueryDialect.php | 33 - .../V2/CreateMigrationWorkflowRequest.php | 132 - .../BigQuery/Migration/V2/DB2Dialect.php | 33 - .../V2/DeleteMigrationWorkflowRequest.php | 86 - .../Cloud/BigQuery/Migration/V2/Dialect.php | 603 --- .../BigQuery/Migration/V2/ErrorDetail.php | 122 - .../BigQuery/Migration/V2/ErrorLocation.php | 109 - .../Migration/V2/GcsReportLogMessage.php | 415 -- .../V2/GetMigrationSubtaskRequest.php | 130 - .../V2/GetMigrationWorkflowRequest.php | 130 - .../Migration/V2/GreenplumDialect.php | 33 - .../BigQuery/Migration/V2/HiveQLDialect.php | 33 - .../V2/ListMigrationSubtasksRequest.php | 256 - .../V2/ListMigrationSubtasksResponse.php | 105 - .../V2/ListMigrationWorkflowsRequest.php | 214 - .../V2/ListMigrationWorkflowsResponse.php | 105 - .../Cloud/BigQuery/Migration/V2/Literal.php | 142 - .../Migration/V2/MigrationSubtask.php | 449 -- .../Migration/V2/MigrationSubtask/State.php | 94 - .../BigQuery/Migration/V2/MigrationTask.php | 609 --- .../Migration/V2/MigrationTask/State.php | 93 - .../Migration/V2/MigrationTaskResult.php | 75 - .../Migration/V2/MigrationWorkflow.php | 278 - .../Migration/V2/MigrationWorkflow/State.php | 82 - .../BigQuery/Migration/V2/MySQLDialect.php | 33 - .../BigQuery/Migration/V2/NameMappingKey.php | 216 - .../Migration/V2/NameMappingKey/Type.php | 103 - .../Migration/V2/NameMappingValue.php | 182 - .../BigQuery/Migration/V2/NetezzaDialect.php | 33 - .../Migration/V2/ObjectNameMapping.php | 122 - .../Migration/V2/ObjectNameMappingList.php | 68 - .../BigQuery/Migration/V2/OracleDialect.php | 33 - .../Cloud/BigQuery/Migration/V2/Point.php | 153 - .../Migration/V2/PostgresqlDialect.php | 33 - .../BigQuery/Migration/V2/PrestoDialect.php | 33 - .../BigQuery/Migration/V2/RedshiftDialect.php | 33 - .../Migration/V2/ResourceErrorDetail.php | 153 - .../Migration/V2/SQLServerDialect.php | 33 - .../BigQuery/Migration/V2/SQLiteDialect.php | 33 - .../Migration/V2/SnowflakeDialect.php | 33 - .../Cloud/BigQuery/Migration/V2/SourceEnv.php | 163 - .../Migration/V2/SourceEnvironment.php | 163 - .../BigQuery/Migration/V2/SourceSpec.php | 142 - .../Migration/V2/SourceTargetMapping.php | 121 - .../BigQuery/Migration/V2/SparkSQLDialect.php | 33 - .../V2/StartMigrationWorkflowRequest.php | 86 - .../BigQuery/Migration/V2/TargetSpec.php | 75 - .../BigQuery/Migration/V2/TeradataDialect.php | 67 - .../Migration/V2/TeradataDialect/Mode.php | 64 - .../BigQuery/Migration/V2/TimeInterval.php | 131 - .../BigQuery/Migration/V2/TimeSeries.php | 213 - .../Migration/V2/TranslationConfigDetails.php | 372 -- .../Migration/V2/TranslationDetails.php | 234 - .../Migration/V2/TranslationReportRecord.php | 211 - .../V2/TranslationReportRecord/Severity.php | 72 - .../Migration/V2/TranslationTaskResult.php | 101 - .../BigQuery/Migration/V2/TypedValue.php | 213 - .../BigQuery/Migration/V2/VerticaDialect.php | 33 - .../create_migration_workflow.php | 74 - .../delete_migration_workflow.php | 74 - .../get_migration_subtask.php | 77 - .../get_migration_workflow.php | 76 - .../list_migration_subtasks.php | 81 - .../list_migration_workflows.php | 77 - .../start_migration_workflow.php | 77 - .../src/V2/Client/MigrationServiceClient.php | 454 -- .../v2/src/V2/gapic_metadata.json | 53 - .../migration_service_client_config.json | 79 - .../migration_service_descriptor_config.php | 133 - .../migration_service_rest_client_config.php | 107 - .../V2/Client/MigrationServiceClientTest.php | 581 --- .../Bigquery/Reservation/V1/Reservation.php | Bin 13099 -> 0 bytes .../BigQuery/Reservation/V1/Assignment.php | 186 - .../Reservation/V1/Assignment/JobType.php | 80 - .../Reservation/V1/Assignment/State.php | 67 - .../BigQuery/Reservation/V1/BiReservation.php | 187 - .../Reservation/V1/CapacityCommitment.php | 466 -- .../V1/CapacityCommitment/CommitmentPlan.php | 134 - .../V1/CapacityCommitment/State.php | 74 - .../V1/CreateAssignmentRequest.php | 181 - .../V1/CreateCapacityCommitmentRequest.php | 221 - .../V1/CreateReservationRequest.php | 179 - .../V1/DeleteAssignmentRequest.php | 89 - .../V1/DeleteCapacityCommitmentRequest.php | 129 - .../V1/DeleteReservationRequest.php | 87 - .../Cloud/BigQuery/Reservation/V1/Edition.php | 70 - .../V1/GetBiReservationRequest.php | 86 - .../V1/GetCapacityCommitmentRequest.php | 87 - .../Reservation/V1/GetReservationRequest.php | 87 - .../Reservation/V1/ListAssignmentsRequest.php | 168 - .../V1/ListAssignmentsResponse.php | 106 - .../V1/ListCapacityCommitmentsRequest.php | 155 - .../V1/ListCapacityCommitmentsResponse.php | 106 - .../V1/ListReservationsRequest.php | 155 - .../V1/ListReservationsResponse.php | 106 - .../V1/MergeCapacityCommitmentsRequest.php | 142 - .../Reservation/V1/MoveAssignmentRequest.php | 184 - .../BigQuery/Reservation/V1/Reservation.php | 489 -- .../Reservation/V1/Reservation/Autoscale.php | 108 - .../V1/SearchAllAssignmentsRequest.php | 220 - .../V1/SearchAllAssignmentsResponse.php | 106 - .../V1/SearchAssignmentsRequest.php | 220 - .../V1/SearchAssignmentsResponse.php | 106 - .../V1/SplitCapacityCommitmentRequest.php | 123 - .../V1/SplitCapacityCommitmentResponse.php | 122 - .../Reservation/V1/TableReference.php | 136 - .../V1/UpdateAssignmentRequest.php | 137 - .../V1/UpdateBiReservationRequest.php | 136 - .../V1/UpdateCapacityCommitmentRequest.php | 137 - .../V1/UpdateReservationRequest.php | 137 - .../create_assignment.php | 110 - .../create_capacity_commitment.php | 72 - .../create_reservation.php | 72 - .../delete_assignment.php | 89 - .../delete_capacity_commitment.php | 76 - .../delete_reservation.php | 76 - .../get_bi_reservation.php | 72 - .../get_capacity_commitment.php | 76 - .../get_reservation.php | 76 - .../list_assignments.php | 106 - .../list_capacity_commitments.php | 77 - .../list_reservations.php | 77 - .../merge_capacity_commitments.php | 63 - .../move_assignment.php | 82 - .../search_all_assignments.php | 97 - .../search_assignments.php | 100 - .../split_capacity_commitment.php | 83 - .../update_assignment.php | 59 - .../update_bi_reservation.php | 64 - .../update_capacity_commitment.php | 63 - .../update_reservation.php | 57 - .../V1/Client/ReservationServiceClient.php | 1047 ---- .../v1/src/V1/gapic_metadata.json | 123 - .../reservation_service_client_config.json | 150 - .../reservation_service_descriptor_config.php | 331 -- ...reservation_service_rest_client_config.php | 274 - .../Client/ReservationServiceClientTest.php | 1506 ------ .../Cloud/Bigquery/Storage/V1/Annotations.php | 27 - .../Cloud/Bigquery/Storage/V1/Arrow.php | Bin 1165 -> 0 bytes .../Google/Cloud/Bigquery/Storage/V1/Avro.php | 35 - .../Cloud/Bigquery/Storage/V1/Protobuf.php | 31 - .../Cloud/Bigquery/Storage/V1/Storage.php | Bin 8911 -> 0 bytes .../Cloud/Bigquery/Storage/V1/Stream.php | Bin 3971 -> 0 bytes .../Cloud/Bigquery/Storage/V1/Table.php | Bin 1875 -> 0 bytes .../BigQuery/Storage/V1/AppendRowsRequest.php | 547 -- .../V1/AppendRowsRequest/ArrowData.php | 126 - .../MissingValueInterpretation.php | 68 - .../V1/AppendRowsRequest/ProtoData.php | 153 - .../Storage/V1/AppendRowsResponse.php | 279 - .../V1/AppendRowsResponse/AppendResult.php | 113 - .../BigQuery/Storage/V1/ArrowRecordBatch.php | 110 - .../Cloud/BigQuery/Storage/V1/ArrowSchema.php | 71 - .../Storage/V1/ArrowSerializationOptions.php | 71 - .../CompressionCodec.php | 64 - .../Cloud/BigQuery/Storage/V1/AvroRows.php | 110 - .../Cloud/BigQuery/Storage/V1/AvroSchema.php | 71 - .../Storage/V1/AvroSerializationOptions.php | 95 - .../V1/BatchCommitWriteStreamsRequest.php | 120 - .../V1/BatchCommitWriteStreamsResponse.php | 135 - .../Storage/V1/CreateReadSessionRequest.php | 267 - .../Storage/V1/CreateWriteStreamRequest.php | 132 - .../Cloud/BigQuery/Storage/V1/DataFormat.php | 63 - .../Storage/V1/FinalizeWriteStreamRequest.php | 86 - .../V1/FinalizeWriteStreamResponse.php | 67 - .../BigQuery/Storage/V1/FlushRowsRequest.php | 158 - .../BigQuery/Storage/V1/FlushRowsResponse.php | 67 - .../Storage/V1/GetWriteStreamRequest.php | 124 - .../Cloud/BigQuery/Storage/V1/ProtoRows.php | 73 - .../Cloud/BigQuery/Storage/V1/ProtoSchema.php | 105 - .../BigQuery/Storage/V1/ReadRowsRequest.php | 127 - .../BigQuery/Storage/V1/ReadRowsResponse.php | 406 -- .../Cloud/BigQuery/Storage/V1/ReadSession.php | 604 --- .../Storage/V1/ReadSession/TableModifiers.php | 80 - .../V1/ReadSession/TableReadOptions.php | 471 -- .../ResponseCompressionCodec.php | 63 - .../Cloud/BigQuery/Storage/V1/ReadStream.php | 73 - .../Cloud/BigQuery/Storage/V1/RowError.php | 135 - .../Storage/V1/RowError/RowErrorCode.php | 57 - .../Storage/V1/SplitReadStreamRequest.php | 125 - .../Storage/V1/SplitReadStreamResponse.php | 133 - .../BigQuery/Storage/V1/StorageError.php | 138 - .../V1/StorageError/StorageErrorCode.php | 154 - .../Cloud/BigQuery/Storage/V1/StreamStats.php | 77 - .../Storage/V1/StreamStats/Progress.php | 142 - .../BigQuery/Storage/V1/TableFieldSchema.php | 535 -- .../V1/TableFieldSchema/FieldElementType.php | 70 - .../Storage/V1/TableFieldSchema/Mode.php | 63 - .../Storage/V1/TableFieldSchema/Type.php | 160 - .../Cloud/BigQuery/Storage/V1/TableSchema.php | 69 - .../BigQuery/Storage/V1/ThrottleState.php | 71 - .../Cloud/BigQuery/Storage/V1/WriteStream.php | 341 -- .../BigQuery/Storage/V1/WriteStream/Type.php | 72 - .../Storage/V1/WriteStream/WriteMode.php | 58 - .../BigQuery/Storage/V1/WriteStreamView.php | 66 - .../create_read_session.php | 92 - .../V1/BigQueryReadClient/read_rows.php | 87 - .../BigQueryReadClient/split_read_stream.php | 87 - .../V1/BigQueryWriteClient/append_rows.php | 143 - .../batch_commit_write_streams.php | 83 - .../create_write_stream.php | 79 - .../finalize_write_stream.php | 78 - .../V1/BigQueryWriteClient/flush_rows.php | 83 - .../BigQueryWriteClient/get_write_stream.php | 77 - .../v1/src/V1/Client/BigQueryReadClient.php | 388 -- .../v1/src/V1/Client/BigQueryWriteClient.php | 454 -- .../v1/src/V1/gapic_metadata.json | 72 - .../big_query_read_client_config.json | 73 - .../big_query_read_descriptor_config.php | 74 - .../big_query_read_rest_client_config.php | 63 - .../big_query_write_client_config.json | 90 - .../big_query_write_descriptor_config.php | 107 - .../big_query_write_rest_client_config.php | 90 - .../Unit/V1/Client/BigQueryReadClientTest.php | 338 -- .../V1/Client/BigQueryWriteClientTest.php | 537 -- .../Admin/V2/BigtableInstanceAdmin.php | Bin 10449 -> 0 bytes .../Bigtable/Admin/V2/BigtableTableAdmin.php | Bin 15587 -> 0 bytes .../Google/Bigtable/Admin/V2/Common.php | Bin 1093 -> 0 bytes .../Google/Bigtable/Admin/V2/Instance.php | Bin 5007 -> 0 bytes .../Google/Bigtable/Admin/V2/Table.php | Bin 6294 -> 0 bytes .../Google/Bigtable/Admin/V2/Types.php | Bin 3216 -> 0 bytes .../Cloud/Bigtable/Admin/V2/AppProfile.php | 368 -- .../AppProfile/DataBoostIsolationReadOnly.php | 90 - .../ComputeBillingOwner.php | 60 - .../AppProfile/MultiClusterRoutingUseAny.php | 123 - .../MultiClusterRoutingUseAny/RowAffinity.php | 44 - .../Bigtable/Admin/V2/AppProfile/Priority.php | 67 - .../V2/AppProfile/SingleClusterRouting.php | 114 - .../Admin/V2/AppProfile/StandardIsolation.php | 71 - .../Bigtable/Admin/V2/AuthorizedView.php | 203 - .../Admin/V2/AuthorizedView/FamilySubsets.php | 120 - .../Admin/V2/AuthorizedView/ResponseView.php | 72 - .../Admin/V2/AuthorizedView/SubsetView.php | 112 - .../Bigtable/Admin/V2/AutoscalingLimits.php | 101 - .../Bigtable/Admin/V2/AutoscalingTargets.php | 133 - .../Google/Cloud/Bigtable/Admin/V2/Backup.php | 573 --- .../Bigtable/Admin/V2/Backup/BackupType.php | 69 - .../Cloud/Bigtable/Admin/V2/Backup/State.php | 65 - .../Cloud/Bigtable/Admin/V2/BackupInfo.php | 243 - .../Bigtable/Admin/V2/ChangeStreamConfig.php | 93 - .../Admin/V2/CheckConsistencyRequest.php | 215 - .../Admin/V2/CheckConsistencyResponse.php | 72 - .../Cloud/Bigtable/Admin/V2/Cluster.php | 349 -- .../V2/Cluster/ClusterAutoscalingConfig.php | 124 - .../Admin/V2/Cluster/ClusterConfig.php | 80 - .../Admin/V2/Cluster/EncryptionConfig.php | 107 - .../Admin/V2/Cluster/NodeScalingFactor.php | 67 - .../Cloud/Bigtable/Admin/V2/Cluster/State.php | 85 - .../Cloud/Bigtable/Admin/V2/ColumnFamily.php | 157 - .../Bigtable/Admin/V2/CopyBackupMetadata.php | 172 - .../Bigtable/Admin/V2/CopyBackupRequest.php | 286 -- .../Admin/V2/CreateAppProfileRequest.php | 217 - .../Admin/V2/CreateAuthorizedViewMetadata.php | 165 - .../Admin/V2/CreateAuthorizedViewRequest.php | 189 - .../Admin/V2/CreateBackupMetadata.php | 190 - .../Bigtable/Admin/V2/CreateBackupRequest.php | 199 - .../Admin/V2/CreateClusterMetadata.php | 223 - .../CreateClusterMetadata/TableProgress.php | 139 - .../TableProgress/State.php | 76 - .../Admin/V2/CreateClusterRequest.php | 183 - .../Admin/V2/CreateInstanceMetadata.php | 165 - .../Admin/V2/CreateInstanceRequest.php | 239 - .../V2/CreateTableFromSnapshotMetadata.php | 173 - .../V2/CreateTableFromSnapshotRequest.php | 184 - .../Bigtable/Admin/V2/CreateTableRequest.php | 265 - .../Admin/V2/CreateTableRequest/Split.php | 70 - .../Admin/V2/DataBoostReadLocalWrites.php | 34 - .../Admin/V2/DeleteAppProfileRequest.php | 125 - .../Admin/V2/DeleteAuthorizedViewRequest.php | 138 - .../Bigtable/Admin/V2/DeleteBackupRequest.php | 92 - .../Admin/V2/DeleteClusterRequest.php | 86 - .../Admin/V2/DeleteInstanceRequest.php | 86 - .../Admin/V2/DeleteSnapshotRequest.php | 96 - .../Bigtable/Admin/V2/DeleteTableRequest.php | 92 - .../Bigtable/Admin/V2/DropRowRangeRequest.php | 154 - .../Bigtable/Admin/V2/EncryptionInfo.php | 160 - .../V2/EncryptionInfo/EncryptionType.php | 72 - .../Google/Cloud/Bigtable/Admin/V2/GcRule.php | 180 - .../Bigtable/Admin/V2/GcRule/Intersection.php | 70 - .../Cloud/Bigtable/Admin/V2/GcRule/Union.php | 70 - .../V2/GenerateConsistencyTokenRequest.php | 92 - .../V2/GenerateConsistencyTokenResponse.php | 68 - .../Admin/V2/GetAppProfileRequest.php | 86 - .../Admin/V2/GetAuthorizedViewRequest.php | 130 - .../Bigtable/Admin/V2/GetBackupRequest.php | 92 - .../Bigtable/Admin/V2/GetClusterRequest.php | 86 - .../Bigtable/Admin/V2/GetInstanceRequest.php | 86 - .../Bigtable/Admin/V2/GetSnapshotRequest.php | 96 - .../Bigtable/Admin/V2/GetTableRequest.php | 130 - .../Cloud/Bigtable/Admin/V2/HotTablet.php | 315 -- .../Cloud/Bigtable/Admin/V2/Instance.php | 354 -- .../Bigtable/Admin/V2/Instance/State.php | 66 - .../Cloud/Bigtable/Admin/V2/Instance/Type.php | 68 - .../Admin/V2/ListAppProfilesRequest.php | 193 - .../Admin/V2/ListAppProfilesResponse.php | 155 - .../Admin/V2/ListAuthorizedViewsRequest.php | 222 - .../Admin/V2/ListAuthorizedViewsResponse.php | 110 - .../Bigtable/Admin/V2/ListBackupsRequest.php | 429 -- .../Bigtable/Admin/V2/ListBackupsResponse.php | 110 - .../Bigtable/Admin/V2/ListClustersRequest.php | 135 - .../Admin/V2/ListClustersResponse.php | 151 - .../Admin/V2/ListHotTabletsRequest.php | 291 -- .../Admin/V2/ListHotTabletsResponse.php | 125 - .../Admin/V2/ListInstancesRequest.php | 120 - .../Admin/V2/ListInstancesResponse.php | 155 - .../Admin/V2/ListSnapshotsRequest.php | 178 - .../Admin/V2/ListSnapshotsResponse.php | 114 - .../Bigtable/Admin/V2/ListTablesRequest.php | 217 - .../Bigtable/Admin/V2/ListTablesResponse.php | 110 - .../Admin/V2/ModifyColumnFamiliesRequest.php | 177 - .../Modification.php | 239 - .../Bigtable/Admin/V2/OperationProgress.php | 164 - .../V2/OptimizeRestoredTableMetadata.php | 114 - .../Admin/V2/PartialUpdateClusterMetadata.php | 165 - .../Admin/V2/PartialUpdateClusterRequest.php | 141 - .../Admin/V2/PartialUpdateInstanceRequest.php | 141 - .../Cloud/Bigtable/Admin/V2/RestoreInfo.php | 112 - .../Bigtable/Admin/V2/RestoreSourceType.php | 54 - .../Admin/V2/RestoreTableMetadata.php | 257 - .../Bigtable/Admin/V2/RestoreTableRequest.php | 163 - .../Cloud/Bigtable/Admin/V2/Snapshot.php | 334 -- .../Bigtable/Admin/V2/Snapshot/State.php | 66 - .../Admin/V2/SnapshotTableMetadata.php | 169 - .../Admin/V2/SnapshotTableRequest.php | 286 -- .../Admin/V2/StandardReadRemoteWrites.php | 34 - .../Cloud/Bigtable/Admin/V2/StorageType.php | 61 - .../Google/Cloud/Bigtable/Admin/V2/Table.php | 409 -- .../Admin/V2/Table/AutomatedBackupPolicy.php | 132 - .../Bigtable/Admin/V2/Table/ClusterState.php | 120 - .../Table/ClusterState/ReplicationState.php | 93 - .../Admin/V2/Table/TimestampGranularity.php | 59 - .../Cloud/Bigtable/Admin/V2/Table/View.php | 86 - .../Google/Cloud/Bigtable/Admin/V2/Type.php | 458 -- .../Bigtable/Admin/V2/Type/Aggregate.php | 284 - .../HyperLogLogPlusPlusUniqueCount.php | 42 - .../Bigtable/Admin/V2/Type/Aggregate/Max.php | 38 - .../Bigtable/Admin/V2/Type/Aggregate/Min.php | 38 - .../Bigtable/Admin/V2/Type/Aggregate/Sum.php | 38 - .../Cloud/Bigtable/Admin/V2/Type/Bytes.php | 81 - .../Bigtable/Admin/V2/Type/Bytes/Encoding.php | 78 - .../Admin/V2/Type/Bytes/Encoding/Raw.php | 39 - .../Cloud/Bigtable/Admin/V2/Type/Date.php | 37 - .../Cloud/Bigtable/Admin/V2/Type/Float32.php | 37 - .../Cloud/Bigtable/Admin/V2/Type/Float64.php | 37 - .../Cloud/Bigtable/Admin/V2/Type/Int64.php | 81 - .../Bigtable/Admin/V2/Type/Int64/Encoding.php | 78 - .../V2/Type/Int64/Encoding/BigEndianBytes.php | 87 - .../Cloud/Bigtable/Admin/V2/Type/Map.php | 134 - .../Cloud/Bigtable/Admin/V2/Type/PBArray.php | 81 - .../Cloud/Bigtable/Admin/V2/Type/PBBool.php | 37 - .../Cloud/Bigtable/Admin/V2/Type/PBString.php | 81 - .../Admin/V2/Type/PBString/Encoding.php | 116 - .../V2/Type/PBString/Encoding/Utf8Bytes.php | 42 - .../V2/Type/PBString/Encoding/Utf8Raw.php | 37 - .../Cloud/Bigtable/Admin/V2/Type/Struct.php | 73 - .../Bigtable/Admin/V2/Type/Struct/Field.php | 118 - .../Bigtable/Admin/V2/Type/Timestamp.php | 37 - .../Admin/V2/UndeleteTableMetadata.php | 156 - .../Admin/V2/UndeleteTableRequest.php | 92 - .../Admin/V2/UpdateAppProfileMetadata.php | 33 - .../Admin/V2/UpdateAppProfileRequest.php | 175 - .../Admin/V2/UpdateAuthorizedViewMetadata.php | 170 - .../Admin/V2/UpdateAuthorizedViewRequest.php | 220 - .../Bigtable/Admin/V2/UpdateBackupRequest.php | 173 - .../Admin/V2/UpdateClusterMetadata.php | 165 - .../Admin/V2/UpdateInstanceMetadata.php | 165 - .../Bigtable/Admin/V2/UpdateTableMetadata.php | 156 - .../Bigtable/Admin/V2/UpdateTableRequest.php | 189 - .../create_app_profile.php | 79 - .../create_cluster.php | 97 - .../create_instance.php | 107 - .../delete_app_profile.php | 78 - .../delete_cluster.php | 70 - .../delete_instance.php | 70 - .../get_app_profile.php | 76 - .../get_cluster.php | 72 - .../get_iam_policy.php | 72 - .../get_instance.php | 72 - .../list_app_profiles.php | 80 - .../list_clusters.php | 75 - .../list_hot_tablets.php | 79 - .../list_instances.php | 72 - .../partial_update_cluster.php | 85 - .../partial_update_instance.php | 90 - .../set_iam_policy.php | 74 - .../test_iam_permissions.php | 78 - .../update_app_profile.php | 74 - .../update_cluster.php | 90 - .../update_instance.php | 83 - .../check_consistency.php | 78 - .../BigtableTableAdminClient/copy_backup.php | 115 - .../create_authorized_view.php | 93 - .../create_backup.php | 113 - .../BigtableTableAdminClient/create_table.php | 81 - .../create_table_from_snapshot.php | 110 - .../delete_authorized_view.php | 76 - .../delete_backup.php | 76 - .../delete_snapshot.php | 82 - .../BigtableTableAdminClient/delete_table.php | 71 - .../drop_row_range.php | 73 - .../generate_consistency_token.php | 76 - .../get_authorized_view.php | 78 - .../BigtableTableAdminClient/get_backup.php | 78 - .../get_iam_policy.php | 73 - .../BigtableTableAdminClient/get_snapshot.php | 84 - .../V2/BigtableTableAdminClient/get_table.php | 73 - .../list_authorized_views.php | 78 - .../BigtableTableAdminClient/list_backups.php | 80 - .../list_snapshots.php | 86 - .../BigtableTableAdminClient/list_tables.php | 77 - .../modify_column_families.php | 79 - .../restore_table.php | 96 - .../set_iam_policy.php | 74 - .../snapshot_table.php | 107 - .../test_iam_permissions.php | 79 - .../undelete_table.php | 85 - .../update_authorized_view.php | 71 - .../update_backup.php | 80 - .../BigtableTableAdminClient/update_table.php | 74 - .../V2/Client/BigtableInstanceAdminClient.php | 1020 ---- .../V2/Client/BigtableTableAdminClient.php | 1339 ----- .../v2/Admin/src/V2/gapic_metadata.json | 282 - ...bigtable_instance_admin_client_config.json | 131 - ...table_instance_admin_descriptor_config.php | 349 -- ...able_instance_admin_rest_client_config.php | 338 -- .../bigtable_table_admin_client_config.json | 176 - ...bigtable_table_admin_descriptor_config.php | 495 -- ...igtable_table_admin_rest_client_config.php | 459 -- .../BigtableInstanceAdminClientTest.php | 2070 -------- .../Client/BigtableTableAdminClientTest.php | 2806 ---------- .../Google/Bigtable/V2/Bigtable.php | Bin 12271 -> 0 bytes .../GPBMetadata/Google/Bigtable/V2/Data.php | Bin 5521 -> 0 bytes .../Google/Bigtable/V2/FeatureFlags.php | 39 - .../Google/Bigtable/V2/RequestStats.php | Bin 1345 -> 0 bytes .../Google/Bigtable/V2/ResponseParams.php | Bin 904 -> 0 bytes .../GPBMetadata/Google/Bigtable/V2/Types.php | Bin 2982 -> 0 bytes .../Google/Cloud/Bigtable/V2/ArrayValue.php | 67 - .../src/Google/Cloud/Bigtable/V2/Cell.php | 163 - .../Bigtable/V2/CheckAndMutateRowRequest.php | 436 -- .../Bigtable/V2/CheckAndMutateRowResponse.php | 71 - .../src/Google/Cloud/Bigtable/V2/Column.php | 118 - .../Cloud/Bigtable/V2/ColumnMetadata.php | 111 - .../Google/Cloud/Bigtable/V2/ColumnRange.php | 220 - .../Cloud/Bigtable/V2/ExecuteQueryRequest.php | 383 -- .../Bigtable/V2/ExecuteQueryResponse.php | 117 - .../src/Google/Cloud/Bigtable/V2/Family.php | 122 - .../Google/Cloud/Bigtable/V2/FeatureFlags.php | 378 -- .../Cloud/Bigtable/V2/FullReadStatsView.php | 137 - ...teInitialChangeStreamPartitionsRequest.php | 160 - ...eInitialChangeStreamPartitionsResponse.php | 78 - .../Cloud/Bigtable/V2/MutateRowRequest.php | 290 -- .../Cloud/Bigtable/V2/MutateRowResponse.php | 33 - .../Cloud/Bigtable/V2/MutateRowsRequest.php | 264 - .../Bigtable/V2/MutateRowsRequest/Entry.php | 112 - .../Cloud/Bigtable/V2/MutateRowsResponse.php | 119 - .../Bigtable/V2/MutateRowsResponse/Entry.php | 130 - .../src/Google/Cloud/Bigtable/V2/Mutation.php | 240 - .../Cloud/Bigtable/V2/Mutation/AddToCell.php | 222 - .../Bigtable/V2/Mutation/DeleteFromColumn.php | 157 - .../Bigtable/V2/Mutation/DeleteFromFamily.php | 74 - .../Bigtable/V2/Mutation/DeleteFromRow.php | 36 - .../Bigtable/V2/Mutation/MergeToCell.php | 227 - .../Cloud/Bigtable/V2/Mutation/SetCell.php | 196 - .../Cloud/Bigtable/V2/PartialResultSet.php | 225 - .../Cloud/Bigtable/V2/PingAndWarmRequest.php | 148 - .../Cloud/Bigtable/V2/PingAndWarmResponse.php | 33 - .../Google/Cloud/Bigtable/V2/ProtoFormat.php | 34 - .../Google/Cloud/Bigtable/V2/ProtoRows.php | 78 - .../Cloud/Bigtable/V2/ProtoRowsBatch.php | 71 - .../Google/Cloud/Bigtable/V2/ProtoSchema.php | 67 - .../Cloud/Bigtable/V2/RateLimitInfo.php | 159 - .../Bigtable/V2/ReadChangeStreamRequest.php | 412 -- .../Bigtable/V2/ReadChangeStreamResponse.php | 142 - .../ReadChangeStreamResponse/CloseStream.php | 179 - .../ReadChangeStreamResponse/DataChange.php | 439 -- .../DataChange/Type.php | 72 - .../V2/ReadChangeStreamResponse/Heartbeat.php | 149 - .../MutationChunk.php | 136 - .../MutationChunk/ChunkInfo.php | 144 - .../Cloud/Bigtable/V2/ReadIterationStats.php | 179 - .../Bigtable/V2/ReadModifyWriteRowRequest.php | 296 -- .../V2/ReadModifyWriteRowResponse.php | 77 - .../Cloud/Bigtable/V2/ReadModifyWriteRule.php | 204 - .../Cloud/Bigtable/V2/ReadRowsRequest.php | 426 -- .../V2/ReadRowsRequest/RequestStatsView.php | 67 - .../Cloud/Bigtable/V2/ReadRowsResponse.php | 233 - .../V2/ReadRowsResponse/CellChunk.php | 560 -- .../Cloud/Bigtable/V2/RequestLatencyStats.php | 135 - .../Google/Cloud/Bigtable/V2/RequestStats.php | 81 - .../Cloud/Bigtable/V2/ResponseParams.php | 128 - .../Cloud/Bigtable/V2/ResultSetMetadata.php | 75 - .../src/Google/Cloud/Bigtable/V2/Row.php | 114 - .../Google/Cloud/Bigtable/V2/RowFilter.php | 990 ---- .../Cloud/Bigtable/V2/RowFilter/Chain.php | 78 - .../Cloud/Bigtable/V2/RowFilter/Condition.php | 189 - .../Bigtable/V2/RowFilter/Interleave.php | 159 - .../src/Google/Cloud/Bigtable/V2/RowRange.php | 183 - .../src/Google/Cloud/Bigtable/V2/RowSet.php | 101 - .../Bigtable/V2/SampleRowKeysRequest.php | 196 - .../Bigtable/V2/SampleRowKeysResponse.php | 137 - .../Bigtable/V2/StreamContinuationToken.php | 113 - .../Bigtable/V2/StreamContinuationTokens.php | 69 - .../Cloud/Bigtable/V2/StreamPartition.php | 82 - .../Cloud/Bigtable/V2/TimestampRange.php | 101 - .../src/Google/Cloud/Bigtable/V2/Type.php | 458 -- .../Cloud/Bigtable/V2/Type/Aggregate.php | 284 - .../HyperLogLogPlusPlusUniqueCount.php | 42 - .../Cloud/Bigtable/V2/Type/Aggregate/Max.php | 38 - .../Cloud/Bigtable/V2/Type/Aggregate/Min.php | 38 - .../Cloud/Bigtable/V2/Type/Aggregate/Sum.php | 38 - .../Google/Cloud/Bigtable/V2/Type/Bytes.php | 81 - .../Cloud/Bigtable/V2/Type/Bytes/Encoding.php | 78 - .../Bigtable/V2/Type/Bytes/Encoding/Raw.php | 39 - .../Google/Cloud/Bigtable/V2/Type/Date.php | 37 - .../Google/Cloud/Bigtable/V2/Type/Float32.php | 37 - .../Google/Cloud/Bigtable/V2/Type/Float64.php | 37 - .../Google/Cloud/Bigtable/V2/Type/Int64.php | 81 - .../Cloud/Bigtable/V2/Type/Int64/Encoding.php | 78 - .../V2/Type/Int64/Encoding/BigEndianBytes.php | 87 - .../src/Google/Cloud/Bigtable/V2/Type/Map.php | 134 - .../Google/Cloud/Bigtable/V2/Type/PBArray.php | 81 - .../Google/Cloud/Bigtable/V2/Type/PBBool.php | 37 - .../Cloud/Bigtable/V2/Type/PBString.php | 81 - .../Bigtable/V2/Type/PBString/Encoding.php | 116 - .../V2/Type/PBString/Encoding/Utf8Bytes.php | 42 - .../V2/Type/PBString/Encoding/Utf8Raw.php | 37 - .../Google/Cloud/Bigtable/V2/Type/Struct.php | 73 - .../Cloud/Bigtable/V2/Type/Struct/Field.php | 118 - .../Cloud/Bigtable/V2/Type/Timestamp.php | 37 - .../src/Google/Cloud/Bigtable/V2/Value.php | 477 -- .../Google/Cloud/Bigtable/V2/ValueRange.php | 183 - .../BigtableClient/check_and_mutate_row.php | 79 - .../V2/BigtableClient/execute_query.php | 83 - ...erate_initial_change_stream_partitions.php | 82 - .../samples/V2/BigtableClient/mutate_row.php | 82 - .../samples/V2/BigtableClient/mutate_rows.php | 89 - .../V2/BigtableClient/ping_and_warm.php | 74 - .../V2/BigtableClient/read_change_stream.php | 82 - .../BigtableClient/read_modify_write_row.php | 86 - .../samples/V2/BigtableClient/read_rows.php | 83 - .../V2/BigtableClient/sample_row_keys.php | 82 - .../v2/src/V2/Client/BigtableClient.php | 559 -- .../Bigtable/v2/src/V2/gapic_metadata.json | 68 - .../V2/resources/bigtable_client_config.json | 64 - .../resources/bigtable_descriptor_config.php | 297 -- .../resources/bigtable_rest_client_config.php | 219 - .../Unit/V2/Client/BigtableClientTest.php | 881 ---- .../Google/Cloud/Billing/V1/CloudBilling.php | Bin 5856 -> 0 bytes .../Google/Cloud/Billing/V1/CloudCatalog.php | Bin 4008 -> 0 bytes .../Cloud/Billing/V1/AggregationInfo.php | 129 - .../AggregationInfo/AggregationInterval.php | 60 - .../V1/AggregationInfo/AggregationLevel.php | 60 - .../Cloud/Billing/V1/BillingAccount.php | 277 - .../src/Google/Cloud/Billing/V1/Category.php | 181 - .../V1/CreateBillingAccountRequest.php | 172 - .../Google/Cloud/Billing/V1/GeoTaxonomy.php | 105 - .../Cloud/Billing/V1/GeoTaxonomy/Type.php | 77 - .../Billing/V1/GetBillingAccountRequest.php | 86 - .../V1/GetProjectBillingInfoRequest.php | 86 - .../Billing/V1/ListBillingAccountsRequest.php | 243 - .../V1/ListBillingAccountsResponse.php | 109 - .../V1/ListProjectBillingInfoRequest.php | 171 - .../V1/ListProjectBillingInfoResponse.php | 113 - .../Cloud/Billing/V1/ListServicesRequest.php | 109 - .../Cloud/Billing/V1/ListServicesResponse.php | 109 - .../Cloud/Billing/V1/ListSkusRequest.php | 332 -- .../Cloud/Billing/V1/ListSkusResponse.php | 109 - .../Billing/V1/MoveBillingAccountRequest.php | 121 - .../Cloud/Billing/V1/PricingExpression.php | 346 -- .../Billing/V1/PricingExpression/TierRate.php | 126 - .../Google/Cloud/Billing/V1/PricingInfo.php | 277 - .../Cloud/Billing/V1/ProjectBillingInfo.php | 207 - .../src/Google/Cloud/Billing/V1/Service.php | 181 - .../proto/src/Google/Cloud/Billing/V1/Sku.php | 349 -- .../V1/UpdateBillingAccountRequest.php | 180 - .../V1/UpdateProjectBillingInfoRequest.php | 146 - .../create_billing_account.php | 73 - .../get_billing_account.php | 74 - .../V1/CloudBillingClient/get_iam_policy.php | 74 - .../get_project_billing_info.php | 76 - .../list_billing_accounts.php | 64 - .../list_project_billing_info.php | 81 - .../move_billing_account.php | 82 - .../V1/CloudBillingClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 80 - .../update_billing_account.php | 78 - .../update_project_billing_info.php | 103 - .../V1/CloudCatalogClient/list_services.php | 62 - .../V1/CloudCatalogClient/list_skus.php | 77 - .../v1/src/V1/Client/CloudBillingClient.php | 659 --- .../v1/src/V1/Client/CloudCatalogClient.php | 267 - .../Billing/v1/src/V1/gapic_metadata.json | 92 - .../cloud_billing_client_config.json | 100 - .../cloud_billing_descriptor_config.php | 189 - .../cloud_billing_rest_client_config.php | 190 - .../cloud_catalog_client_config.json | 42 - .../cloud_catalog_descriptor_config.php | 63 - .../cloud_catalog_rest_client_config.php | 44 - .../Unit/V1/Client/CloudBillingClientTest.php | 896 ---- .../Unit/V1/Client/CloudCatalogClientTest.php | 234 - .../Cloud/Billing/Budgets/V1/BudgetModel.php | Bin 3128 -> 0 bytes .../Billing/Budgets/V1/BudgetService.php | 61 - .../Cloud/Billing/Budgets/V1/Budget.php | 349 -- .../Cloud/Billing/Budgets/V1/BudgetAmount.php | 132 - .../Billing/Budgets/V1/CalendarPeriod.php | 74 - .../Budgets/V1/CreateBudgetRequest.php | 132 - .../Cloud/Billing/Budgets/V1/CustomPeriod.php | 129 - .../Budgets/V1/DeleteBudgetRequest.php | 86 - .../Cloud/Billing/Budgets/V1/Filter.php | 496 -- .../V1/Filter/CreditTypesTreatment.php | 78 - .../Billing/Budgets/V1/GetBudgetRequest.php | 86 - .../Billing/Budgets/V1/LastPeriodAmount.php | 39 - .../Billing/Budgets/V1/ListBudgetsRequest.php | 220 - .../Budgets/V1/ListBudgetsResponse.php | 105 - .../Billing/Budgets/V1/NotificationsRule.php | 416 -- .../Billing/Budgets/V1/ThresholdRule.php | 130 - .../Budgets/V1/ThresholdRule/Basis.php | 69 - .../Budgets/V1/UpdateBudgetRequest.php | 166 - .../V1/BudgetServiceClient/create_budget.php | 79 - .../V1/BudgetServiceClient/delete_budget.php | 70 - .../V1/BudgetServiceClient/get_budget.php | 77 - .../V1/BudgetServiceClient/list_budgets.php | 82 - .../V1/BudgetServiceClient/update_budget.php | 66 - .../v1/src/V1/Client/BudgetServiceClient.php | 382 -- .../v1/src/V1/gapic_metadata.json | 43 - .../budget_service_client_config.json | 70 - .../budget_service_descriptor_config.php | 101 - .../budget_service_rest_client_config.php | 87 - .../V1/Client/BudgetServiceClientTest.php | 459 -- .../Binaryauthorization/V1/Resources.php | Bin 4629 -> 0 bytes .../Cloud/Binaryauthorization/V1/Service.php | Bin 5005 -> 0 bytes .../BinaryAuthorization/V1/AdmissionRule.php | 164 - .../V1/AdmissionRule/EnforcementMode.php | 66 - .../V1/AdmissionRule/EvaluationMode.php | 71 - .../V1/AdmissionWhitelistPattern.php | 80 - .../Cloud/BinaryAuthorization/V1/Attestor.php | 200 - .../V1/AttestorPublicKey.php | 234 - .../V1/CreateAttestorRequest.php | 173 - .../V1/DeleteAttestorRequest.php | 86 - .../V1/GetAttestorRequest.php | 86 - .../V1/GetPolicyRequest.php | 86 - .../V1/GetSystemPolicyRequest.php | 86 - .../V1/ListAttestorsRequest.php | 166 - .../V1/ListAttestorsResponse.php | 109 - .../BinaryAuthorization/V1/PkixPublicKey.php | 124 - .../V1/PkixPublicKey/SignatureAlgorithm.php | 153 - .../Cloud/BinaryAuthorization/V1/Policy.php | 469 -- .../V1/Policy/GlobalPolicyEvaluationMode.php | 62 - .../V1/UpdateAttestorRequest.php | 100 - .../V1/UpdatePolicyRequest.php | 100 - .../V1/UserOwnedGrafeasNote.php | 208 - .../ValidateAttestationOccurrenceRequest.php | 208 - .../ValidateAttestationOccurrenceResponse.php | 102 - .../Result.php | 64 - .../create_attestor.php | 86 - .../delete_attestor.php | 71 - .../get_attestor.php | 73 - .../get_policy.php | 78 - .../list_attestors.php | 78 - .../update_attestor.php | 74 - .../update_policy.php | 89 - .../get_system_policy.php | 72 - .../validate_attestation_occurrence.php | 87 - .../BinauthzManagementServiceV1Client.php | 499 -- .../v1/src/V1/Client/SystemPolicyV1Client.php | 267 - .../V1/Client/ValidationHelperV1Client.php | 191 - .../v1/src/V1/gapic_metadata.json | 81 - ...z_management_service_v1_client_config.json | 80 - ...anagement_service_v1_descriptor_config.php | 129 - ...nagement_service_v1_rest_client_config.php | 171 - .../system_policy_v1_client_config.json | 27 - .../system_policy_v1_descriptor_config.php | 45 - .../system_policy_v1_rest_client_config.php | 97 - .../validation_helper_v1_client_config.json | 27 - ...validation_helper_v1_descriptor_config.php | 40 - ...alidation_helper_v1_rest_client_config.php | 98 - .../BinauthzManagementServiceV1ClientTest.php | 610 --- .../V1/Client/SystemPolicyV1ClientTest.php | 159 - .../Client/ValidationHelperV1ClientTest.php | 186 - .../V1/CertificateIssuanceConfig.php | Bin 3473 -> 0 bytes .../V1/CertificateManager.php | Bin 18077 -> 0 bytes .../Certificatemanager/V1/TrustConfig.php | Bin 2925 -> 0 bytes .../CertificateManager/V1/Certificate.php | 460 -- .../V1/Certificate/ManagedCertificate.php | 296 -- .../AuthorizationAttemptInfo.php | 185 - .../FailureReason.php | 74 - .../AuthorizationAttemptInfo/State.php | 74 - .../ManagedCertificate/ProvisioningIssue.php | 112 - .../ProvisioningIssue/Reason.php | 68 - .../Certificate/ManagedCertificate/State.php | 77 - .../V1/Certificate/Scope.php | 72 - .../V1/Certificate/SelfManagedCertificate.php | 110 - .../V1/CertificateIssuanceConfig.php | 399 -- .../CertificateAuthorityConfig.php | 79 - .../CertificateAuthorityServiceConfig.php | 78 - .../KeyAlgorithm.php | 64 - .../CertificateManager/V1/CertificateMap.php | 273 - .../V1/CertificateMap/GclbTarget.php | 161 - .../V1/CertificateMap/GclbTarget/IpConfig.php | 104 - .../V1/CertificateMapEntry.php | 388 -- .../V1/CertificateMapEntry/Matcher.php | 59 - ...CreateCertificateIssuanceConfigRequest.php | 168 - .../V1/CreateCertificateMapEntryRequest.php | 168 - .../V1/CreateCertificateMapRequest.php | 168 - .../V1/CreateCertificateRequest.php | 168 - .../V1/CreateDnsAuthorizationRequest.php | 168 - .../V1/CreateTrustConfigRequest.php | 173 - ...DeleteCertificateIssuanceConfigRequest.php | 86 - .../V1/DeleteCertificateMapEntryRequest.php | 86 - .../V1/DeleteCertificateMapRequest.php | 86 - .../V1/DeleteCertificateRequest.php | 86 - .../V1/DeleteDnsAuthorizationRequest.php | 86 - .../V1/DeleteTrustConfigRequest.php | 128 - .../V1/DnsAuthorization.php | 368 -- .../V1/DnsAuthorization/DnsResourceRecord.php | 148 - .../V1/DnsAuthorization/Type.php | 66 - .../GetCertificateIssuanceConfigRequest.php | 86 - .../V1/GetCertificateMapEntryRequest.php | 86 - .../V1/GetCertificateMapRequest.php | 86 - .../V1/GetCertificateRequest.php | 86 - .../V1/GetDnsAuthorizationRequest.php | 86 - .../V1/GetTrustConfigRequest.php | 86 - .../ListCertificateIssuanceConfigsRequest.php | 242 - ...ListCertificateIssuanceConfigsResponse.php | 143 - .../V1/ListCertificateMapEntriesRequest.php | 259 - .../V1/ListCertificateMapEntriesResponse.php | 143 - .../V1/ListCertificateMapsRequest.php | 238 - .../V1/ListCertificateMapsResponse.php | 143 - .../V1/ListCertificatesRequest.php | 238 - .../V1/ListCertificatesResponse.php | 143 - .../V1/ListDnsAuthorizationsRequest.php | 238 - .../V1/ListDnsAuthorizationsResponse.php | 143 - .../V1/ListTrustConfigsRequest.php | 238 - .../V1/ListTrustConfigsResponse.php | 143 - .../V1/OperationMetadata.php | 307 -- .../CertificateManager/V1/ServingState.php | 61 - .../CertificateManager/V1/TrustConfig.php | 319 -- .../V1/TrustConfig/IntermediateCA.php | 84 - .../V1/TrustConfig/TrustAnchor.php | 81 - .../V1/TrustConfig/TrustStore.php | 120 - .../V1/UpdateCertificateMapEntryRequest.php | 146 - .../V1/UpdateCertificateMapRequest.php | 146 - .../V1/UpdateCertificateRequest.php | 146 - .../V1/UpdateDnsAuthorizationRequest.php | 146 - .../V1/UpdateTrustConfigRequest.php | 146 - .../create_certificate.php | 89 - .../create_certificate_issuance_config.php | 113 - .../create_certificate_map.php | 89 - .../create_certificate_map_entry.php | 95 - .../create_dns_authorization.php | 98 - .../create_trust_config.php | 90 - .../delete_certificate.php | 85 - .../delete_certificate_issuance_config.php | 85 - .../delete_certificate_map.php | 87 - .../delete_certificate_map_entry.php | 86 - .../delete_dns_authorization.php | 85 - .../delete_trust_config.php | 85 - .../get_certificate.php | 76 - .../get_certificate_issuance_config.php | 76 - .../get_certificate_map.php | 76 - .../get_certificate_map_entry.php | 77 - .../get_dns_authorization.php | 76 - .../CertificateManagerClient/get_location.php | 57 - .../get_trust_config.php | 76 - .../list_certificate_issuance_configs.php | 77 - .../list_certificate_map_entries.php | 82 - .../list_certificate_maps.php | 77 - .../list_certificates.php | 77 - .../list_dns_authorizations.php | 77 - .../list_locations.php | 62 - .../list_trust_configs.php | 77 - .../update_certificate.php | 74 - .../update_certificate_map.php | 74 - .../update_certificate_map_entry.php | 74 - .../update_dns_authorization.php | 90 - .../update_trust_config.php | 74 - .../V1/Client/CertificateManagerClient.php | 1325 ----- .../v1/src/V1/gapic_metadata.json | 173 - .../certificate_manager_client_config.json | 189 - .../certificate_manager_descriptor_config.php | 592 --- ...certificate_manager_rest_client_config.php | 468 -- .../Client/CertificateManagerClientTest.php | 3399 ------------ 1485 files changed, 326 insertions(+), 237167 deletions(-) delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Baremetalsolution.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Common.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Instance.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Lun.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Network.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/NfsShare.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Osimage.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Provisioning.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/SshKey.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Volume.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/VolumeSnapshot.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateNfsShareRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateProvisioningConfigRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateSSHKeyRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateVolumeSnapshotRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteNfsShareRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteSSHKeyRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteVolumeSnapshotRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DetachLunRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictLunRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictVolumeRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetInstanceRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetLunRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNetworkRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNfsShareRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetProvisioningConfigRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeSnapshotRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance/State.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkAddress.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkConfig.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceQuota.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface/LogicalNetworkInterface.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/MultiprotocolType.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/State.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/StorageType.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/State.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/Type.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkAddressReservation.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Bandwidth.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/IntakeVlanAttachment.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/ServiceCidr.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Type.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkMountPoint.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkUsage.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/AllowedClient.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/MountPermissions.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/State.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/StorageType.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OSImage.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OperationMetadata.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig/State.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota/AssetType.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameInstanceRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNetworkRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNfsShareRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameVolumeRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResizeVolumeRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RestoreVolumeSnapshotRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SSHKey.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface/InterfaceType.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigResponse.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateInstanceRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNetworkRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNfsShareRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateProvisioningConfigRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateVolumeRequest.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/QosPolicy.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/State.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/VlanAttachment.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/Protocol.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotAutoDeleteBehavior.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotReservationDetail.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/State.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/StorageType.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/WorkloadProfile.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/LunRange.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport/Permissions.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Protocol.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Type.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumePerformanceTier.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot/SnapshotType.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/WorkloadProfile.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_nfs_share.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_provisioning_config.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_ssh_key.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_volume_snapshot.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_nfs_share.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_ssh_key.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/detach_lun.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_lun.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_volume.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_instance.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_location.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_lun.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_network.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_nfs_share.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_provisioning_config.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume_snapshot.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_instances.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_locations.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_luns.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_network_usage.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_networks.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_nfs_shares.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_os_images.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_ssh_keys.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volume_snapshots.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volumes.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_instance.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_network.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_nfs_share.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_volume.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/reset_instance.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/resize_volume.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/start_instance.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/stop_instance.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/submit_provisioning_config.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_instance.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_network.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_nfs_share.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_provisioning_config.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_volume.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/Client/BareMetalSolutionClient.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_client_config.json delete mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_descriptor_config.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_rest_client_config.php delete mode 100644 owl-bot-staging/BareMetalSolution/v2/tests/Unit/V2/Client/BareMetalSolutionClientTest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php delete mode 100644 owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php delete mode 100644 owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json delete mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php delete mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php delete mode 100644 owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnections/V1/AppConnectionsService.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/ApplicationEndpoint.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway/Type.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/State.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Type.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnectionOperationMetadata.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/CreateAppConnectionRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/DeleteAppConnectionRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/GetAppConnectionRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsResponse.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse/AppConnectionDetails.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/UpdateAppConnectionRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/create_app_connection.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/delete_app_connection.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_app_connection.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_location.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_app_connections.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_locations.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/resolve_app_connections.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/update_app_connection.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/Client/AppConnectionsServiceClient.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_client_config.json delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_descriptor_config.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_rest_client_config.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnections/v1/tests/Unit/V1/Client/AppConnectionsServiceClientTest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorInstanceConfig.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorsService.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/ResourceInfo.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo/ServiceAccount.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/State.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorInstanceConfig.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorOperationMetadata.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/CreateAppConnectorRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/DeleteAppConnectorRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/GetAppConnectorRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/HealthStatus.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ImageConfig.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsResponse.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig/CloudPubSubNotificationConfig.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ReportStatusRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ResourceInfo.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/UpdateAppConnectorRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/create_app_connector.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/delete_app_connector.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_app_connector.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_location.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_app_connectors.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_locations.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/report_status.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/update_app_connector.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/Client/AppConnectorsServiceClient.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_client_config.json delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_descriptor_config.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_rest_client_config.php delete mode 100644 owl-bot-staging/BeyondCorpAppConnectors/v1/tests/Unit/V1/Client/AppConnectorsServiceClientTest.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appgateways/V1/AppGatewaysService.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/AllocatedConnection.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/HostType.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/State.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/Type.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGatewayOperationMetadata.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/CreateAppGatewayRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/DeleteAppGatewayRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/GetAppGatewayRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysRequest.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysResponse.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/create_app_gateway.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/delete_app_gateway.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_app_gateway.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_location.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_app_gateways.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_locations.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/Client/AppGatewaysServiceClient.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_client_config.json delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_descriptor_config.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_rest_client_config.php delete mode 100644 owl-bot-staging/BeyondCorpAppGateways/v1/tests/Unit/V1/Client/AppGatewaysServiceClientTest.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientconnectorservices/V1/ClientConnectorServicesService.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress/PeeredVpc.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/DestinationRoute.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/TransportProtocol.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/State.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorServiceOperationMetadata.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/CreateClientConnectorServiceRequest.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/DeleteClientConnectorServiceRequest.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/GetClientConnectorServiceRequest.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesRequest.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesResponse.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/UpdateClientConnectorServiceRequest.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_location.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_locations.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/Client/ClientConnectorServicesServiceClient.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_client_config.json delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_descriptor_config.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_rest_client_config.php delete mode 100644 owl-bot-staging/BeyondCorpClientConnectorServices/v1/tests/Unit/V1/Client/ClientConnectorServicesServiceClientTest.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientgateways/V1/ClientGatewaysService.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway/State.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGatewayOperationMetadata.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/CreateClientGatewayRequest.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/DeleteClientGatewayRequest.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/GetClientGatewayRequest.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysRequest.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysResponse.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/create_client_gateway.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_client_gateway.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_location.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_client_gateways.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_locations.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/Client/ClientGatewaysServiceClient.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_client_config.json delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_descriptor_config.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_rest_client_config.php delete mode 100644 owl-bot-staging/BeyondCorpClientGateways/v1/tests/Unit/V1/Client/ClientGatewaysServiceClientTest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Analyticshub/V1/Analyticshub.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateDataExchangeRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateListingRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataExchange.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataProvider.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteDataExchangeRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteListingRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteSubscriptionRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDataset.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDatasetReference.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DiscoveryType.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetDataExchangeRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetListingRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetSubscriptionRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesResponse.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsResponse.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesResponse.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsResponse.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsResponse.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/RestrictedExportPolicy.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/SelectedResource.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/Category.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/RestrictedExportConfig.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/State.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Publisher.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionResponse.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionResponse.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DcrExchangeConfig.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DefaultExchangeConfig.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeResponse.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingResponse.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/LinkedResource.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/State.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateDataExchangeRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateListingRequest.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_data_exchange.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_listing.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_listing.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_subscription.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_data_exchange.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_listing.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_subscription.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_listings.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_subscriptions.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/refresh_subscription.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/revoke_subscription.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_listing.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_data_exchange.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_listing.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/Client/AnalyticsHubServiceClient.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_client_config.json delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryAnalyticsHub/v1/tests/Unit/V1/Client/AnalyticsHubServiceClientTest.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Connection/V1/Connection.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsAccessRole.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsCrossAccountRole.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsProperties.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AzureProperties.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudResourceProperties.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSpannerProperties.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlCredential.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties/DatabaseType.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/Connection.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CreateConnectionRequest.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/DeleteConnectionRequest.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/GetConnectionRequest.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsRequest.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsResponse.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/MetastoreServiceConfig.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SalesforceDataCloudProperties.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkHistoryServerConfig.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkProperties.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/UpdateConnectionRequest.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/create_connection.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/delete_connection.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_connection.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/list_connections.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/update_connection.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/Client/ConnectionServiceClient.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_client_config.json delete mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryConnection/v1/tests/Unit/V1/Client/ConnectionServiceClientTest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Dataexchange/V1Beta1/Dataexchange.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateDataExchangeRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateListingRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataExchange.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataProvider.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteDataExchangeRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteListingRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDataset.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDatasetReference.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetDataExchangeRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetListingRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesResponse.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsResponse.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesResponse.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/BigQueryDatasetSource.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/Category.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/State.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Publisher.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingResponse.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateDataExchangeRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateListingRequest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_listing.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_listing.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_location.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_listings.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_locations.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_listing.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/AnalyticsHubServiceClient.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Client/AnalyticsHubServiceClient.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_client_config.json delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php delete mode 100644 owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/Client/AnalyticsHubServiceClientTest.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datapolicies/V1/Datapolicy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/CreateDataPolicyRequest.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy/PredefinedExpression.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy/DataPolicyType.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DeleteDataPolicyRequest.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/GetDataPolicyRequest.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesRequest.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesResponse.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/RenameDataPolicyRequest.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/UpdateDataPolicyRequest.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/create_data_policy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/delete_data_policy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_data_policy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/list_data_policies.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/rename_data_policy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/update_data_policy.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/Client/DataPolicyServiceClient.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_client_config.json delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryDataPolicies/v1/tests/Unit/V1/Client/DataPolicyServiceClientTest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Datatransfer.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Transfer.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsResponse.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CreateTransferConfigRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/AuthorizationType.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/DataRefreshType.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter/Type.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferConfigRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferRunRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EmailPreferences.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EncryptionConfiguration.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EnrollDataSourcesRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EventDrivenSchedule.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetDataSourceRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferConfigRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferRunRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesResponse.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsResponse.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsResponse.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest/RunAttempt.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsResponse.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ManualSchedule.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptions.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptionsV2.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsResponse.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest/TimeRange.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsResponse.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TimeBasedSchedule.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferConfig.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage/MessageSeverity.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferRun.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferState.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferType.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UnenrollDataSourcesRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UpdateTransferConfigRequest.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UserInfo.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/check_valid_creds.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/create_transfer_config.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_config.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_run.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/enroll_data_sources.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_data_source.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_location.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_config.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_run.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_data_sources.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_locations.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_configs.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_logs.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_runs.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/schedule_transfer_runs.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/unenroll_data_sources.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/update_transfer_config.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/Client/DataTransferServiceClient.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_client_config.json delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryDataTransfer/v1/tests/Unit/V1/Client/DataTransferServiceClientTest.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationEntities.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationErrorDetails.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationMetrics.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationService.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationConfig.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationDetails.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationSuggestion.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationUsability.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/AzureSynapseDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/BigQueryDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/CreateMigrationWorkflowRequest.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DB2Dialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DeleteMigrationWorkflowRequest.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Dialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorDetail.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorLocation.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GcsReportLogMessage.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationSubtaskRequest.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationWorkflowRequest.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GreenplumDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/HiveQLDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksRequest.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksResponse.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsRequest.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsResponse.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Literal.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask/State.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask/State.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTaskResult.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow/State.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MySQLDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey/Type.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingValue.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NetezzaDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMapping.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMappingList.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/OracleDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Point.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PostgresqlDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PrestoDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/RedshiftDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ResourceErrorDetail.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLServerDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLiteDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SnowflakeDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnv.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnvironment.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceSpec.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceTargetMapping.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SparkSQLDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/StartMigrationWorkflowRequest.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TargetSpec.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect/Mode.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeInterval.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeSeries.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationConfigDetails.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationDetails.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord/Severity.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationTaskResult.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TypedValue.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/VerticaDialect.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/create_migration_workflow.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/delete_migration_workflow.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_subtask.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_workflow.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_subtasks.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_workflows.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/start_migration_workflow.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/Client/MigrationServiceClient.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_client_config.json delete mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryMigration/v2/tests/Unit/V2/Client/MigrationServiceClientTest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Reservation/V1/Reservation.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/BiReservation.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateAssignmentRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateCapacityCommitmentRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteAssignmentRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteCapacityCommitmentRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Edition.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetBiReservationRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetCapacityCommitmentRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsResponse.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsResponse.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsResponse.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsResponse.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsResponse.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentResponse.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/TableReference.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateAssignmentRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateBiReservationRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateCapacityCommitmentRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateReservationRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_assignment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_capacity_commitment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_assignment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_capacity_commitment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_bi_reservation.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_capacity_commitment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_assignments.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_capacity_commitments.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservations.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/merge_capacity_commitments.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/move_assignment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_all_assignments.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_assignments.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/split_capacity_commitment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_assignment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_bi_reservation.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_capacity_commitment.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_reservation.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json delete mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableTableAdmin.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Common.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Types.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny/RowAffinity.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/FamilySubsets.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/ResponseView.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/SubsetView.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/BackupType.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/NodeScalingFactor.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DataBoostReadLocalWrites.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAuthorizedViewRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAuthorizedViewRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StandardReadRemoteWrites.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/AutomatedBackupPolicy.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Max.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Min.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Sum.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding/Raw.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Date.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float32.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float64.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Map.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBArray.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBBool.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Bytes.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Raw.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct/Field.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Timestamp.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_authorized_view.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_authorized_view.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_authorized_view.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_authorized_views.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_authorized_view.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableInstanceAdminClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Bigtable.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Data.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/FeatureFlags.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/RequestStats.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/ResponseParams.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Types.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ArrayValue.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Cell.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/AddToCell.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/MergeToCell.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PartialResultSet.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoFormat.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRows.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRowsBatch.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoSchema.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResultSetMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Max.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Min.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Sum.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding/Raw.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Date.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float32.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float64.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding/BigEndianBytes.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Map.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBArray.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBBool.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Bytes.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Raw.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct/Field.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Timestamp.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Value.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/execute_query.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/Client/BigtableClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/GPBMetadata/Google/Cloud/Billing/V1/CloudBilling.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/GPBMetadata/Google/Cloud/Billing/V1/CloudCatalog.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationInterval.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationLevel.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/BillingAccount.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Category.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/CreateBillingAccountRequest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy/Type.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetBillingAccountRequest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetProjectBillingInfoRequest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsRequest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsResponse.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoRequest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoResponse.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesRequest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesResponse.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusRequest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusResponse.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/MoveBillingAccountRequest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression/TierRate.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingInfo.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ProjectBillingInfo.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Service.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Sku.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateBillingAccountRequest.php delete mode 100644 owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateProjectBillingInfoRequest.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/create_billing_account.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_billing_account.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_project_billing_info.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_billing_accounts.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_project_billing_info.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/move_billing_account.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_billing_account.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_project_billing_info.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_services.php delete mode 100644 owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_skus.php delete mode 100644 owl-bot-staging/Billing/v1/src/V1/Client/CloudBillingClient.php delete mode 100644 owl-bot-staging/Billing/v1/src/V1/Client/CloudCatalogClient.php delete mode 100644 owl-bot-staging/Billing/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_client_config.json delete mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_descriptor_config.php delete mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_rest_client_config.php delete mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_client_config.json delete mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_descriptor_config.php delete mode 100644 owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_rest_client_config.php delete mode 100644 owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudBillingClientTest.php delete mode 100644 owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudCatalogClientTest.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetModel.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetService.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Budget.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/BudgetAmount.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CalendarPeriod.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CreateBudgetRequest.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CustomPeriod.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/DeleteBudgetRequest.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter/CreditTypesTreatment.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/GetBudgetRequest.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/LastPeriodAmount.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsRequest.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsResponse.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/NotificationsRule.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule/Basis.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/UpdateBudgetRequest.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/create_budget.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/delete_budget.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/get_budget.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/list_budgets.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/update_budget.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/Client/BudgetServiceClient.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_client_config.json delete mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_descriptor_config.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_rest_client_config.php delete mode 100644 owl-bot-staging/BillingBudgets/v1/tests/Unit/V1/Client/BudgetServiceClientTest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Resources.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Service.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EnforcementMode.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EvaluationMode.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionWhitelistPattern.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Attestor.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AttestorPublicKey.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/CreateAttestorRequest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/DeleteAttestorRequest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetAttestorRequest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetPolicyRequest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetSystemPolicyRequest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsRequest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsResponse.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey/SignatureAlgorithm.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy/GlobalPolicyEvaluationMode.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdateAttestorRequest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdatePolicyRequest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UserOwnedGrafeasNote.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceRequest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse/Result.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/create_attestor.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_attestor.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_policy.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/list_attestors.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_attestor.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_policy.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/SystemPolicyV1Client/get_system_policy.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/BinauthzManagementServiceV1Client.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/SystemPolicyV1Client.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/ValidationHelperV1Client.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_client_config.json delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_descriptor_config.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_rest_client_config.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_client_config.json delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_descriptor_config.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_rest_client_config.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_client_config.json delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_descriptor_config.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_rest_client_config.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/BinauthzManagementServiceV1ClientTest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/SystemPolicyV1ClientTest.php delete mode 100644 owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/ValidationHelperV1ClientTest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateIssuanceConfig.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateManager.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/TrustConfig.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/FailureReason.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/State.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue/Reason.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/State.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/Scope.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/SelfManagedCertificate.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig/CertificateAuthorityServiceConfig.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/KeyAlgorithm.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget/IpConfig.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry/Matcher.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateIssuanceConfigRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapEntryRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateDnsAuthorizationRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateTrustConfigRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateIssuanceConfigRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapEntryRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteDnsAuthorizationRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteTrustConfigRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/DnsResourceRecord.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/Type.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateIssuanceConfigRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapEntryRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetDnsAuthorizationRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetTrustConfigRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsResponse.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesResponse.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsResponse.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesResponse.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsResponse.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsResponse.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ServingState.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/IntermediateCA.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustAnchor.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustStore.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapEntryRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateDnsAuthorizationRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateTrustConfigRequest.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_issuance_config.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map_entry.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_dns_authorization.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_trust_config.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map_entry.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_dns_authorization.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_trust_config.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_issuance_config.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map_entry.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_dns_authorization.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_location.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_trust_config.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_map_entries.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_maps.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificates.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_dns_authorizations.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_locations.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_trust_configs.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map_entry.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_dns_authorization.php delete mode 100644 owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_trust_config.php delete mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/Client/CertificateManagerClient.php delete mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_client_config.json delete mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_descriptor_config.php delete mode 100644 owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_rest_client_config.php delete mode 100644 owl-bot-staging/CertificateManager/v1/tests/Unit/V1/Client/CertificateManagerClientTest.php diff --git a/BareMetalSolution/src/V2/Client/BareMetalSolutionClient.php b/BareMetalSolution/src/V2/Client/BareMetalSolutionClient.php index bd66a99103f1..defe8a098090 100644 --- a/BareMetalSolution/src/V2/Client/BareMetalSolutionClient.php +++ b/BareMetalSolution/src/V2/Client/BareMetalSolutionClient.php @@ -113,52 +113,52 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createNfsShareAsync(CreateNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface createProvisioningConfigAsync(CreateProvisioningConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSSHKeyAsync(CreateSSHKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVolumeSnapshotAsync(CreateVolumeSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNfsShareAsync(DeleteNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSSHKeyAsync(DeleteSSHKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteVolumeSnapshotAsync(DeleteVolumeSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface detachLunAsync(DetachLunRequest $request, array $optionalArgs = []) - * @method PromiseInterface disableInteractiveSerialConsoleAsync(DisableInteractiveSerialConsoleRequest $request, array $optionalArgs = []) - * @method PromiseInterface enableInteractiveSerialConsoleAsync(EnableInteractiveSerialConsoleRequest $request, array $optionalArgs = []) - * @method PromiseInterface evictLunAsync(EvictLunRequest $request, array $optionalArgs = []) - * @method PromiseInterface evictVolumeAsync(EvictVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLunAsync(GetLunRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNetworkAsync(GetNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNfsShareAsync(GetNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProvisioningConfigAsync(GetProvisioningConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVolumeAsync(GetVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVolumeSnapshotAsync(GetVolumeSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLunsAsync(ListLunsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNetworkUsageAsync(ListNetworkUsageRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNetworksAsync(ListNetworksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNfsSharesAsync(ListNfsSharesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOSImagesAsync(ListOSImagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProvisioningQuotasAsync(ListProvisioningQuotasRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSSHKeysAsync(ListSSHKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVolumeSnapshotsAsync(ListVolumeSnapshotsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVolumesAsync(ListVolumesRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameInstanceAsync(RenameInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameNetworkAsync(RenameNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameNfsShareAsync(RenameNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameVolumeAsync(RenameVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetInstanceAsync(ResetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface resizeVolumeAsync(ResizeVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreVolumeSnapshotAsync(RestoreVolumeSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface startInstanceAsync(StartInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopInstanceAsync(StopInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface submitProvisioningConfigAsync(SubmitProvisioningConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNetworkAsync(UpdateNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNfsShareAsync(UpdateNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProvisioningConfigAsync(UpdateProvisioningConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateVolumeAsync(UpdateVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createNfsShareAsync(CreateNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface createProvisioningConfigAsync(CreateProvisioningConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSSHKeyAsync(CreateSSHKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVolumeSnapshotAsync(CreateVolumeSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNfsShareAsync(DeleteNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSSHKeyAsync(DeleteSSHKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteVolumeSnapshotAsync(DeleteVolumeSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface detachLunAsync(DetachLunRequest $request, array $optionalArgs = []) + * @method PromiseInterface disableInteractiveSerialConsoleAsync(DisableInteractiveSerialConsoleRequest $request, array $optionalArgs = []) + * @method PromiseInterface enableInteractiveSerialConsoleAsync(EnableInteractiveSerialConsoleRequest $request, array $optionalArgs = []) + * @method PromiseInterface evictLunAsync(EvictLunRequest $request, array $optionalArgs = []) + * @method PromiseInterface evictVolumeAsync(EvictVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLunAsync(GetLunRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNetworkAsync(GetNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNfsShareAsync(GetNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProvisioningConfigAsync(GetProvisioningConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVolumeAsync(GetVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVolumeSnapshotAsync(GetVolumeSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLunsAsync(ListLunsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNetworkUsageAsync(ListNetworkUsageRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNetworksAsync(ListNetworksRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNfsSharesAsync(ListNfsSharesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOSImagesAsync(ListOSImagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProvisioningQuotasAsync(ListProvisioningQuotasRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSSHKeysAsync(ListSSHKeysRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVolumeSnapshotsAsync(ListVolumeSnapshotsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVolumesAsync(ListVolumesRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameInstanceAsync(RenameInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameNetworkAsync(RenameNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameNfsShareAsync(RenameNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameVolumeAsync(RenameVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetInstanceAsync(ResetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface resizeVolumeAsync(ResizeVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreVolumeSnapshotAsync(RestoreVolumeSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface startInstanceAsync(StartInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopInstanceAsync(StopInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface submitProvisioningConfigAsync(SubmitProvisioningConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNetworkAsync(UpdateNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNfsShareAsync(UpdateNfsShareRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProvisioningConfigAsync(UpdateProvisioningConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateVolumeAsync(UpdateVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class BareMetalSolutionClient { diff --git a/Batch/src/V1/Client/BatchServiceClient.php b/Batch/src/V1/Client/BatchServiceClient.php index ea3a0cc8cb6e..e03594c07663 100644 --- a/Batch/src/V1/Client/BatchServiceClient.php +++ b/Batch/src/V1/Client/BatchServiceClient.php @@ -62,14 +62,14 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createJobAsync(CreateJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createJobAsync(CreateJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class BatchServiceClient { diff --git a/BeyondCorpAppConnections/src/V1/Client/AppConnectionsServiceClient.php b/BeyondCorpAppConnections/src/V1/Client/AppConnectionsServiceClient.php index 9ab45eca4fb5..3003a9688e99 100644 --- a/BeyondCorpAppConnections/src/V1/Client/AppConnectionsServiceClient.php +++ b/BeyondCorpAppConnections/src/V1/Client/AppConnectionsServiceClient.php @@ -77,17 +77,17 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createAppConnectionAsync(CreateAppConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAppConnectionAsync(DeleteAppConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAppConnectionAsync(GetAppConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAppConnectionsAsync(ListAppConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface resolveAppConnectionsAsync(ResolveAppConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAppConnectionAsync(UpdateAppConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAppConnectionAsync(CreateAppConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAppConnectionAsync(DeleteAppConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAppConnectionAsync(GetAppConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAppConnectionsAsync(ListAppConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface resolveAppConnectionsAsync(ResolveAppConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAppConnectionAsync(UpdateAppConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) */ final class AppConnectionsServiceClient { diff --git a/BeyondCorpAppConnectors/src/V1/Client/AppConnectorsServiceClient.php b/BeyondCorpAppConnectors/src/V1/Client/AppConnectorsServiceClient.php index fa1f8d9717f6..7d03a1a245b9 100644 --- a/BeyondCorpAppConnectors/src/V1/Client/AppConnectorsServiceClient.php +++ b/BeyondCorpAppConnectors/src/V1/Client/AppConnectorsServiceClient.php @@ -77,17 +77,17 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createAppConnectorAsync(CreateAppConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAppConnectorAsync(DeleteAppConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAppConnectorAsync(GetAppConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAppConnectorsAsync(ListAppConnectorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface reportStatusAsync(ReportStatusRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAppConnectorAsync(UpdateAppConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAppConnectorAsync(CreateAppConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAppConnectorAsync(DeleteAppConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAppConnectorAsync(GetAppConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAppConnectorsAsync(ListAppConnectorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface reportStatusAsync(ReportStatusRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAppConnectorAsync(UpdateAppConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) */ final class AppConnectorsServiceClient { diff --git a/BeyondCorpAppGateways/src/V1/Client/AppGatewaysServiceClient.php b/BeyondCorpAppGateways/src/V1/Client/AppGatewaysServiceClient.php index 88498369e2ce..636c409e52a9 100644 --- a/BeyondCorpAppGateways/src/V1/Client/AppGatewaysServiceClient.php +++ b/BeyondCorpAppGateways/src/V1/Client/AppGatewaysServiceClient.php @@ -75,15 +75,15 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createAppGatewayAsync(CreateAppGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAppGatewayAsync(DeleteAppGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAppGatewayAsync(GetAppGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAppGatewaysAsync(ListAppGatewaysRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAppGatewayAsync(CreateAppGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAppGatewayAsync(DeleteAppGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAppGatewayAsync(GetAppGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAppGatewaysAsync(ListAppGatewaysRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) */ final class AppGatewaysServiceClient { diff --git a/BeyondCorpClientConnectorServices/src/V1/Client/ClientConnectorServicesServiceClient.php b/BeyondCorpClientConnectorServices/src/V1/Client/ClientConnectorServicesServiceClient.php index 1876632db42d..38d64b4d8dfb 100644 --- a/BeyondCorpClientConnectorServices/src/V1/Client/ClientConnectorServicesServiceClient.php +++ b/BeyondCorpClientConnectorServices/src/V1/Client/ClientConnectorServicesServiceClient.php @@ -73,16 +73,16 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createClientConnectorServiceAsync(CreateClientConnectorServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClientConnectorServiceAsync(DeleteClientConnectorServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClientConnectorServiceAsync(GetClientConnectorServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClientConnectorServicesAsync(ListClientConnectorServicesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClientConnectorServiceAsync(UpdateClientConnectorServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClientConnectorServiceAsync(CreateClientConnectorServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClientConnectorServiceAsync(DeleteClientConnectorServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClientConnectorServiceAsync(GetClientConnectorServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClientConnectorServicesAsync(ListClientConnectorServicesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClientConnectorServiceAsync(UpdateClientConnectorServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) */ final class ClientConnectorServicesServiceClient { diff --git a/BeyondCorpClientGateways/src/V1/Client/ClientGatewaysServiceClient.php b/BeyondCorpClientGateways/src/V1/Client/ClientGatewaysServiceClient.php index d0aeb5edcc21..1416bafbe520 100644 --- a/BeyondCorpClientGateways/src/V1/Client/ClientGatewaysServiceClient.php +++ b/BeyondCorpClientGateways/src/V1/Client/ClientGatewaysServiceClient.php @@ -72,15 +72,15 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createClientGatewayAsync(CreateClientGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClientGatewayAsync(DeleteClientGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClientGatewayAsync(GetClientGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClientGatewaysAsync(ListClientGatewaysRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClientGatewayAsync(CreateClientGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClientGatewayAsync(DeleteClientGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClientGatewayAsync(GetClientGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClientGatewaysAsync(ListClientGatewaysRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) */ final class ClientGatewaysServiceClient { diff --git a/BigQueryAnalyticsHub/src/V1/Client/AnalyticsHubServiceClient.php b/BigQueryAnalyticsHub/src/V1/Client/AnalyticsHubServiceClient.php index be71ede70594..d88f8d7ea3cb 100644 --- a/BigQueryAnalyticsHub/src/V1/Client/AnalyticsHubServiceClient.php +++ b/BigQueryAnalyticsHub/src/V1/Client/AnalyticsHubServiceClient.php @@ -83,28 +83,28 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createDataExchangeAsync(CreateDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface createListingAsync(CreateListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataExchangeAsync(DeleteDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteListingAsync(DeleteListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSubscriptionAsync(DeleteSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataExchangeAsync(GetDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getListingAsync(GetListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSubscriptionAsync(GetSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataExchangesAsync(ListDataExchangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listListingsAsync(ListListingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOrgDataExchangesAsync(ListOrgDataExchangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSharedResourceSubscriptionsAsync(ListSharedResourceSubscriptionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSubscriptionsAsync(ListSubscriptionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface refreshSubscriptionAsync(RefreshSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface revokeSubscriptionAsync(RevokeSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface subscribeDataExchangeAsync(SubscribeDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface subscribeListingAsync(SubscribeListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataExchangeAsync(UpdateDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateListingAsync(UpdateListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDataExchangeAsync(CreateDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface createListingAsync(CreateListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataExchangeAsync(DeleteDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteListingAsync(DeleteListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSubscriptionAsync(DeleteSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataExchangeAsync(GetDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getListingAsync(GetListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSubscriptionAsync(GetSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataExchangesAsync(ListDataExchangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listListingsAsync(ListListingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrgDataExchangesAsync(ListOrgDataExchangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSharedResourceSubscriptionsAsync(ListSharedResourceSubscriptionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSubscriptionsAsync(ListSubscriptionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface refreshSubscriptionAsync(RefreshSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface revokeSubscriptionAsync(RevokeSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface subscribeDataExchangeAsync(SubscribeDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface subscribeListingAsync(SubscribeListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataExchangeAsync(UpdateDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateListingAsync(UpdateListingRequest $request, array $optionalArgs = []) */ final class AnalyticsHubServiceClient { diff --git a/BigQueryConnection/src/V1/Client/ConnectionServiceClient.php b/BigQueryConnection/src/V1/Client/ConnectionServiceClient.php index 524b44419005..9d98978af9a0 100644 --- a/BigQueryConnection/src/V1/Client/ConnectionServiceClient.php +++ b/BigQueryConnection/src/V1/Client/ConnectionServiceClient.php @@ -57,14 +57,14 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createConnectionAsync(CreateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteConnectionAsync(DeleteConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getConnectionAsync(GetConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listConnectionsAsync(ListConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateConnectionAsync(UpdateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createConnectionAsync(CreateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteConnectionAsync(DeleteConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getConnectionAsync(GetConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listConnectionsAsync(ListConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateConnectionAsync(UpdateConnectionRequest $request, array $optionalArgs = []) */ final class ConnectionServiceClient { diff --git a/BigQueryDataExchange/src/V1beta1/Client/AnalyticsHubServiceClient.php b/BigQueryDataExchange/src/V1beta1/Client/AnalyticsHubServiceClient.php index 748d74eb1e97..dfe68c92546b 100644 --- a/BigQueryDataExchange/src/V1beta1/Client/AnalyticsHubServiceClient.php +++ b/BigQueryDataExchange/src/V1beta1/Client/AnalyticsHubServiceClient.php @@ -78,23 +78,23 @@ * * @experimental * - * @method PromiseInterface createDataExchangeAsync(CreateDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface createListingAsync(CreateListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataExchangeAsync(DeleteDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteListingAsync(DeleteListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataExchangeAsync(GetDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getListingAsync(GetListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataExchangesAsync(ListDataExchangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listListingsAsync(ListListingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOrgDataExchangesAsync(ListOrgDataExchangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface subscribeListingAsync(SubscribeListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataExchangeAsync(UpdateDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateListingAsync(UpdateListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDataExchangeAsync(CreateDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface createListingAsync(CreateListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataExchangeAsync(DeleteDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteListingAsync(DeleteListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataExchangeAsync(GetDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getListingAsync(GetListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataExchangesAsync(ListDataExchangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listListingsAsync(ListListingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrgDataExchangesAsync(ListOrgDataExchangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface subscribeListingAsync(SubscribeListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataExchangeAsync(UpdateDataExchangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateListingAsync(UpdateListingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class AnalyticsHubServiceClient { diff --git a/BigQueryDataPolicies/src/V1/Client/DataPolicyServiceClient.php b/BigQueryDataPolicies/src/V1/Client/DataPolicyServiceClient.php index 974a34524c66..dba3a26fbfb7 100644 --- a/BigQueryDataPolicies/src/V1/Client/DataPolicyServiceClient.php +++ b/BigQueryDataPolicies/src/V1/Client/DataPolicyServiceClient.php @@ -58,15 +58,15 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createDataPolicyAsync(CreateDataPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataPolicyAsync(DeleteDataPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataPolicyAsync(GetDataPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataPoliciesAsync(ListDataPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameDataPolicyAsync(RenameDataPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataPolicyAsync(UpdateDataPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDataPolicyAsync(CreateDataPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataPolicyAsync(DeleteDataPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataPolicyAsync(GetDataPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataPoliciesAsync(ListDataPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameDataPolicyAsync(RenameDataPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataPolicyAsync(UpdateDataPolicyRequest $request, array $optionalArgs = []) */ final class DataPolicyServiceClient { diff --git a/BigQueryDataTransfer/src/V1/Client/DataTransferServiceClient.php b/BigQueryDataTransfer/src/V1/Client/DataTransferServiceClient.php index 6b37a511ec15..2573f7174a0e 100644 --- a/BigQueryDataTransfer/src/V1/Client/DataTransferServiceClient.php +++ b/BigQueryDataTransfer/src/V1/Client/DataTransferServiceClient.php @@ -71,24 +71,24 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface checkValidCredsAsync(CheckValidCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTransferConfigAsync(CreateTransferConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTransferConfigAsync(DeleteTransferConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTransferRunAsync(DeleteTransferRunRequest $request, array $optionalArgs = []) - * @method PromiseInterface enrollDataSourcesAsync(EnrollDataSourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataSourceAsync(GetDataSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTransferConfigAsync(GetTransferConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTransferRunAsync(GetTransferRunRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataSourcesAsync(ListDataSourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTransferConfigsAsync(ListTransferConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTransferLogsAsync(ListTransferLogsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTransferRunsAsync(ListTransferRunsRequest $request, array $optionalArgs = []) - * @method PromiseInterface scheduleTransferRunsAsync(ScheduleTransferRunsRequest $request, array $optionalArgs = []) - * @method PromiseInterface startManualTransferRunsAsync(StartManualTransferRunsRequest $request, array $optionalArgs = []) - * @method PromiseInterface unenrollDataSourcesAsync(UnenrollDataSourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTransferConfigAsync(UpdateTransferConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface checkValidCredsAsync(CheckValidCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTransferConfigAsync(CreateTransferConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTransferConfigAsync(DeleteTransferConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTransferRunAsync(DeleteTransferRunRequest $request, array $optionalArgs = []) + * @method PromiseInterface enrollDataSourcesAsync(EnrollDataSourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataSourceAsync(GetDataSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTransferConfigAsync(GetTransferConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTransferRunAsync(GetTransferRunRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataSourcesAsync(ListDataSourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTransferConfigsAsync(ListTransferConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTransferLogsAsync(ListTransferLogsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTransferRunsAsync(ListTransferRunsRequest $request, array $optionalArgs = []) + * @method PromiseInterface scheduleTransferRunsAsync(ScheduleTransferRunsRequest $request, array $optionalArgs = []) + * @method PromiseInterface startManualTransferRunsAsync(StartManualTransferRunsRequest $request, array $optionalArgs = []) + * @method PromiseInterface unenrollDataSourcesAsync(UnenrollDataSourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTransferConfigAsync(UpdateTransferConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class DataTransferServiceClient { diff --git a/BigQueryMigration/src/V2/Client/MigrationServiceClient.php b/BigQueryMigration/src/V2/Client/MigrationServiceClient.php index 73ea0940ca76..244781248cdc 100644 --- a/BigQueryMigration/src/V2/Client/MigrationServiceClient.php +++ b/BigQueryMigration/src/V2/Client/MigrationServiceClient.php @@ -55,13 +55,13 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createMigrationWorkflowAsync(CreateMigrationWorkflowRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMigrationWorkflowAsync(DeleteMigrationWorkflowRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMigrationSubtaskAsync(GetMigrationSubtaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMigrationWorkflowAsync(GetMigrationWorkflowRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMigrationSubtasksAsync(ListMigrationSubtasksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMigrationWorkflowsAsync(ListMigrationWorkflowsRequest $request, array $optionalArgs = []) - * @method PromiseInterface startMigrationWorkflowAsync(StartMigrationWorkflowRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMigrationWorkflowAsync(CreateMigrationWorkflowRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMigrationWorkflowAsync(DeleteMigrationWorkflowRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMigrationSubtaskAsync(GetMigrationSubtaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMigrationWorkflowAsync(GetMigrationWorkflowRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMigrationSubtasksAsync(ListMigrationSubtasksRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMigrationWorkflowsAsync(ListMigrationWorkflowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface startMigrationWorkflowAsync(StartMigrationWorkflowRequest $request, array $optionalArgs = []) */ final class MigrationServiceClient { diff --git a/BigQueryReservation/src/V1/Client/ReservationServiceClient.php b/BigQueryReservation/src/V1/Client/ReservationServiceClient.php index 253e18dcf340..7d898d0ffb1b 100644 --- a/BigQueryReservation/src/V1/Client/ReservationServiceClient.php +++ b/BigQueryReservation/src/V1/Client/ReservationServiceClient.php @@ -86,27 +86,27 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createAssignmentAsync(CreateAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCapacityCommitmentAsync(CreateCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReservationAsync(CreateReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAssignmentAsync(DeleteAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCapacityCommitmentAsync(DeleteCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReservationAsync(DeleteReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBiReservationAsync(GetBiReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCapacityCommitmentAsync(GetCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReservationAsync(GetReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAssignmentsAsync(ListAssignmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCapacityCommitmentsAsync(ListCapacityCommitmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReservationsAsync(ListReservationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface mergeCapacityCommitmentsAsync(MergeCapacityCommitmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface moveAssignmentAsync(MoveAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchAllAssignmentsAsync(SearchAllAssignmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchAssignmentsAsync(SearchAssignmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface splitCapacityCommitmentAsync(SplitCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAssignmentAsync(UpdateAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBiReservationAsync(UpdateBiReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCapacityCommitmentAsync(UpdateCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateReservationAsync(UpdateReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAssignmentAsync(CreateAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCapacityCommitmentAsync(CreateCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReservationAsync(CreateReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAssignmentAsync(DeleteAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCapacityCommitmentAsync(DeleteCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReservationAsync(DeleteReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBiReservationAsync(GetBiReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCapacityCommitmentAsync(GetCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReservationAsync(GetReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAssignmentsAsync(ListAssignmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCapacityCommitmentsAsync(ListCapacityCommitmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReservationsAsync(ListReservationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface mergeCapacityCommitmentsAsync(MergeCapacityCommitmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface moveAssignmentAsync(MoveAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchAllAssignmentsAsync(SearchAllAssignmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchAssignmentsAsync(SearchAssignmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface splitCapacityCommitmentAsync(SplitCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAssignmentAsync(UpdateAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBiReservationAsync(UpdateBiReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCapacityCommitmentAsync(UpdateCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateReservationAsync(UpdateReservationRequest $request, array $optionalArgs = []) */ final class ReservationServiceClient { diff --git a/BigQueryStorage/src/V1/Client/BigQueryReadClient.php b/BigQueryStorage/src/V1/Client/BigQueryReadClient.php index 72cbc19e3681..c08dc6a41419 100644 --- a/BigQueryStorage/src/V1/Client/BigQueryReadClient.php +++ b/BigQueryStorage/src/V1/Client/BigQueryReadClient.php @@ -53,8 +53,8 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createReadSessionAsync(CreateReadSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface splitReadStreamAsync(SplitReadStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReadSessionAsync(CreateReadSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface splitReadStreamAsync(SplitReadStreamRequest $request, array $optionalArgs = []) */ final class BigQueryReadClient { diff --git a/BigQueryStorage/src/V1/Client/BigQueryWriteClient.php b/BigQueryStorage/src/V1/Client/BigQueryWriteClient.php index 33c4e93e8eff..9624c1cf8977 100644 --- a/BigQueryStorage/src/V1/Client/BigQueryWriteClient.php +++ b/BigQueryStorage/src/V1/Client/BigQueryWriteClient.php @@ -60,11 +60,11 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface batchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createWriteStreamAsync(CreateWriteStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface finalizeWriteStreamAsync(FinalizeWriteStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface flushRowsAsync(FlushRowsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getWriteStreamAsync(GetWriteStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createWriteStreamAsync(CreateWriteStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface finalizeWriteStreamAsync(FinalizeWriteStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface flushRowsAsync(FlushRowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getWriteStreamAsync(GetWriteStreamRequest $request, array $optionalArgs = []) */ final class BigQueryWriteClient { diff --git a/Bigtable/src/Admin/V2/Client/BigtableInstanceAdminClient.php b/Bigtable/src/Admin/V2/Client/BigtableInstanceAdminClient.php index 724cfa65908e..b45bb6498897 100644 --- a/Bigtable/src/Admin/V2/Client/BigtableInstanceAdminClient.php +++ b/Bigtable/src/Admin/V2/Client/BigtableInstanceAdminClient.php @@ -79,27 +79,27 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createAppProfileAsync(CreateAppProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAppProfileAsync(DeleteAppProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAppProfileAsync(GetAppProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAppProfilesAsync(ListAppProfilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHotTabletsAsync(ListHotTabletsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface partialUpdateClusterAsync(PartialUpdateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface partialUpdateInstanceAsync(PartialUpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAppProfileAsync(UpdateAppProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClusterAsync(Cluster $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(Instance $request, array $optionalArgs = []) + * @method PromiseInterface createAppProfileAsync(CreateAppProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAppProfileAsync(DeleteAppProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAppProfileAsync(GetAppProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAppProfilesAsync(ListAppProfilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHotTabletsAsync(ListHotTabletsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface partialUpdateClusterAsync(PartialUpdateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface partialUpdateInstanceAsync(PartialUpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAppProfileAsync(UpdateAppProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClusterAsync(Cluster $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(Instance $request, array $optionalArgs = []) */ final class BigtableInstanceAdminClient { diff --git a/Bigtable/src/Admin/V2/Client/BigtableTableAdminClient.php b/Bigtable/src/Admin/V2/Client/BigtableTableAdminClient.php index 6fc04363ca58..854d55554863 100644 --- a/Bigtable/src/Admin/V2/Client/BigtableTableAdminClient.php +++ b/Bigtable/src/Admin/V2/Client/BigtableTableAdminClient.php @@ -95,36 +95,36 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface checkConsistencyAsync(CheckConsistencyRequest $request, array $optionalArgs = []) - * @method PromiseInterface copyBackupAsync(CopyBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAuthorizedViewAsync(CreateAuthorizedViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTableAsync(CreateTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTableFromSnapshotAsync(CreateTableFromSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAuthorizedViewAsync(DeleteAuthorizedViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSnapshotAsync(DeleteSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTableAsync(DeleteTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface dropRowRangeAsync(DropRowRangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateConsistencyTokenAsync(GenerateConsistencyTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAuthorizedViewAsync(GetAuthorizedViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSnapshotAsync(GetSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTableAsync(GetTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAuthorizedViewsAsync(ListAuthorizedViewsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSnapshotsAsync(ListSnapshotsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTablesAsync(ListTablesRequest $request, array $optionalArgs = []) - * @method PromiseInterface modifyColumnFamiliesAsync(ModifyColumnFamiliesRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreTableAsync(RestoreTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface snapshotTableAsync(SnapshotTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeleteTableAsync(UndeleteTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAuthorizedViewAsync(UpdateAuthorizedViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTableAsync(UpdateTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface checkConsistencyAsync(CheckConsistencyRequest $request, array $optionalArgs = []) + * @method PromiseInterface copyBackupAsync(CopyBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAuthorizedViewAsync(CreateAuthorizedViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface
createTableAsync(CreateTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTableFromSnapshotAsync(CreateTableFromSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAuthorizedViewAsync(DeleteAuthorizedViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSnapshotAsync(DeleteSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTableAsync(DeleteTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface dropRowRangeAsync(DropRowRangeRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateConsistencyTokenAsync(GenerateConsistencyTokenRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuthorizedViewAsync(GetAuthorizedViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSnapshotAsync(GetSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface
getTableAsync(GetTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuthorizedViewsAsync(ListAuthorizedViewsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSnapshotsAsync(ListSnapshotsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTablesAsync(ListTablesRequest $request, array $optionalArgs = []) + * @method PromiseInterface
modifyColumnFamiliesAsync(ModifyColumnFamiliesRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreTableAsync(RestoreTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface snapshotTableAsync(SnapshotTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeleteTableAsync(UndeleteTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAuthorizedViewAsync(UpdateAuthorizedViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTableAsync(UpdateTableRequest $request, array $optionalArgs = []) */ final class BigtableTableAdminClient { diff --git a/Bigtable/src/V2/Client/BigtableClient.php b/Bigtable/src/V2/Client/BigtableClient.php index aeb45221a720..24c6994dd499 100644 --- a/Bigtable/src/V2/Client/BigtableClient.php +++ b/Bigtable/src/V2/Client/BigtableClient.php @@ -64,10 +64,10 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface checkAndMutateRowAsync(CheckAndMutateRowRequest $request, array $optionalArgs = []) - * @method PromiseInterface mutateRowAsync(MutateRowRequest $request, array $optionalArgs = []) - * @method PromiseInterface pingAndWarmAsync(PingAndWarmRequest $request, array $optionalArgs = []) - * @method PromiseInterface readModifyWriteRowAsync(ReadModifyWriteRowRequest $request, array $optionalArgs = []) + * @method PromiseInterface checkAndMutateRowAsync(CheckAndMutateRowRequest $request, array $optionalArgs = []) + * @method PromiseInterface mutateRowAsync(MutateRowRequest $request, array $optionalArgs = []) + * @method PromiseInterface pingAndWarmAsync(PingAndWarmRequest $request, array $optionalArgs = []) + * @method PromiseInterface readModifyWriteRowAsync(ReadModifyWriteRowRequest $request, array $optionalArgs = []) */ final class BigtableClient { diff --git a/Billing/src/V1/Client/CloudBillingClient.php b/Billing/src/V1/Client/CloudBillingClient.php index 6be512f2258b..02b89aa97018 100644 --- a/Billing/src/V1/Client/CloudBillingClient.php +++ b/Billing/src/V1/Client/CloudBillingClient.php @@ -62,17 +62,17 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createBillingAccountAsync(CreateBillingAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBillingAccountAsync(GetBillingAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProjectBillingInfoAsync(GetProjectBillingInfoRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBillingAccountsAsync(ListBillingAccountsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProjectBillingInfoAsync(ListProjectBillingInfoRequest $request, array $optionalArgs = []) - * @method PromiseInterface moveBillingAccountAsync(MoveBillingAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBillingAccountAsync(UpdateBillingAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBillingAccountAsync(CreateBillingAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBillingAccountAsync(GetBillingAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProjectBillingInfoAsync(GetProjectBillingInfoRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBillingAccountsAsync(ListBillingAccountsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProjectBillingInfoAsync(ListProjectBillingInfoRequest $request, array $optionalArgs = []) + * @method PromiseInterface moveBillingAccountAsync(MoveBillingAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBillingAccountAsync(UpdateBillingAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest $request, array $optionalArgs = []) */ final class CloudBillingClient { diff --git a/Billing/src/V1/Client/CloudCatalogClient.php b/Billing/src/V1/Client/CloudCatalogClient.php index 6ed99e9057b3..43ab99307e96 100644 --- a/Billing/src/V1/Client/CloudCatalogClient.php +++ b/Billing/src/V1/Client/CloudCatalogClient.php @@ -50,8 +50,8 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface listServicesAsync(ListServicesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSkusAsync(ListSkusRequest $request, array $optionalArgs = []) + * @method PromiseInterface listServicesAsync(ListServicesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSkusAsync(ListSkusRequest $request, array $optionalArgs = []) */ final class CloudCatalogClient { diff --git a/BillingBudgets/src/V1/Client/BudgetServiceClient.php b/BillingBudgets/src/V1/Client/BudgetServiceClient.php index 71f0f5ec9af7..faf7e8493001 100644 --- a/BillingBudgets/src/V1/Client/BudgetServiceClient.php +++ b/BillingBudgets/src/V1/Client/BudgetServiceClient.php @@ -53,11 +53,11 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createBudgetAsync(CreateBudgetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBudgetAsync(DeleteBudgetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBudgetAsync(GetBudgetRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBudgetsAsync(ListBudgetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBudgetAsync(UpdateBudgetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBudgetAsync(CreateBudgetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBudgetAsync(DeleteBudgetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBudgetAsync(GetBudgetRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBudgetsAsync(ListBudgetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBudgetAsync(UpdateBudgetRequest $request, array $optionalArgs = []) */ final class BudgetServiceClient { diff --git a/BinaryAuthorization/src/V1/Client/BinauthzManagementServiceV1Client.php b/BinaryAuthorization/src/V1/Client/BinauthzManagementServiceV1Client.php index cdc693cc4c4b..488eb5f606d4 100644 --- a/BinaryAuthorization/src/V1/Client/BinauthzManagementServiceV1Client.php +++ b/BinaryAuthorization/src/V1/Client/BinauthzManagementServiceV1Client.php @@ -61,13 +61,13 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createAttestorAsync(CreateAttestorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAttestorAsync(DeleteAttestorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAttestorAsync(GetAttestorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPolicyAsync(GetPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAttestorsAsync(ListAttestorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAttestorAsync(UpdateAttestorRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePolicyAsync(UpdatePolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAttestorAsync(CreateAttestorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAttestorAsync(DeleteAttestorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAttestorAsync(GetAttestorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPolicyAsync(GetPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAttestorsAsync(ListAttestorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAttestorAsync(UpdateAttestorRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePolicyAsync(UpdatePolicyRequest $request, array $optionalArgs = []) */ final class BinauthzManagementServiceV1Client { diff --git a/BinaryAuthorization/src/V1/Client/SystemPolicyV1Client.php b/BinaryAuthorization/src/V1/Client/SystemPolicyV1Client.php index 00cb8a0fb7ce..cb6080c475bc 100644 --- a/BinaryAuthorization/src/V1/Client/SystemPolicyV1Client.php +++ b/BinaryAuthorization/src/V1/Client/SystemPolicyV1Client.php @@ -47,7 +47,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface getSystemPolicyAsync(GetSystemPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSystemPolicyAsync(GetSystemPolicyRequest $request, array $optionalArgs = []) */ final class SystemPolicyV1Client { diff --git a/BinaryAuthorization/src/V1/Client/ValidationHelperV1Client.php b/BinaryAuthorization/src/V1/Client/ValidationHelperV1Client.php index 0f65caad2bca..9123dc241ac4 100644 --- a/BinaryAuthorization/src/V1/Client/ValidationHelperV1Client.php +++ b/BinaryAuthorization/src/V1/Client/ValidationHelperV1Client.php @@ -41,7 +41,7 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface validateAttestationOccurrenceAsync(ValidateAttestationOccurrenceRequest $request, array $optionalArgs = []) + * @method PromiseInterface validateAttestationOccurrenceAsync(ValidateAttestationOccurrenceRequest $request, array $optionalArgs = []) */ final class ValidationHelperV1Client { diff --git a/CertificateManager/src/V1/Client/CertificateManagerClient.php b/CertificateManager/src/V1/Client/CertificateManagerClient.php index ecc225cf16ee..2a58a4829c8c 100644 --- a/CertificateManager/src/V1/Client/CertificateManagerClient.php +++ b/CertificateManager/src/V1/Client/CertificateManagerClient.php @@ -112,37 +112,37 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createCertificateAsync(CreateCertificateRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCertificateIssuanceConfigAsync(CreateCertificateIssuanceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCertificateMapAsync(CreateCertificateMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCertificateMapEntryAsync(CreateCertificateMapEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDnsAuthorizationAsync(CreateDnsAuthorizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTrustConfigAsync(CreateTrustConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCertificateAsync(DeleteCertificateRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCertificateIssuanceConfigAsync(DeleteCertificateIssuanceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCertificateMapAsync(DeleteCertificateMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCertificateMapEntryAsync(DeleteCertificateMapEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDnsAuthorizationAsync(DeleteDnsAuthorizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTrustConfigAsync(DeleteTrustConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCertificateAsync(GetCertificateRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCertificateIssuanceConfigAsync(GetCertificateIssuanceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCertificateMapAsync(GetCertificateMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCertificateMapEntryAsync(GetCertificateMapEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDnsAuthorizationAsync(GetDnsAuthorizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTrustConfigAsync(GetTrustConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCertificateIssuanceConfigsAsync(ListCertificateIssuanceConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCertificateMapEntriesAsync(ListCertificateMapEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCertificateMapsAsync(ListCertificateMapsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCertificatesAsync(ListCertificatesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDnsAuthorizationsAsync(ListDnsAuthorizationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTrustConfigsAsync(ListTrustConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCertificateAsync(UpdateCertificateRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCertificateMapAsync(UpdateCertificateMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCertificateMapEntryAsync(UpdateCertificateMapEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDnsAuthorizationAsync(UpdateDnsAuthorizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTrustConfigAsync(UpdateTrustConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCertificateAsync(CreateCertificateRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCertificateIssuanceConfigAsync(CreateCertificateIssuanceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCertificateMapAsync(CreateCertificateMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCertificateMapEntryAsync(CreateCertificateMapEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDnsAuthorizationAsync(CreateDnsAuthorizationRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTrustConfigAsync(CreateTrustConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCertificateAsync(DeleteCertificateRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCertificateIssuanceConfigAsync(DeleteCertificateIssuanceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCertificateMapAsync(DeleteCertificateMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCertificateMapEntryAsync(DeleteCertificateMapEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDnsAuthorizationAsync(DeleteDnsAuthorizationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTrustConfigAsync(DeleteTrustConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCertificateAsync(GetCertificateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCertificateIssuanceConfigAsync(GetCertificateIssuanceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCertificateMapAsync(GetCertificateMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCertificateMapEntryAsync(GetCertificateMapEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDnsAuthorizationAsync(GetDnsAuthorizationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTrustConfigAsync(GetTrustConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCertificateIssuanceConfigsAsync(ListCertificateIssuanceConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCertificateMapEntriesAsync(ListCertificateMapEntriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCertificateMapsAsync(ListCertificateMapsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCertificatesAsync(ListCertificatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDnsAuthorizationsAsync(ListDnsAuthorizationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTrustConfigsAsync(ListTrustConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCertificateAsync(UpdateCertificateRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCertificateMapAsync(UpdateCertificateMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCertificateMapEntryAsync(UpdateCertificateMapEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDnsAuthorizationAsync(UpdateDnsAuthorizationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTrustConfigAsync(UpdateTrustConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class CertificateManagerClient { diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Baremetalsolution.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Baremetalsolution.php deleted file mode 100644 index fa0826e2f624..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Baremetalsolution.php +++ /dev/null @@ -1,113 +0,0 @@ -internalAddGeneratedFile( - ' -¨U -9google/cloud/baremetalsolution/v2/baremetalsolution.proto!google.cloud.baremetalsolution.v2google/api/client.protogoogle/api/field_behavior.proto0google/cloud/baremetalsolution/v2/instance.proto+google/cloud/baremetalsolution/v2/lun.proto/google/cloud/baremetalsolution/v2/network.proto1google/cloud/baremetalsolution/v2/nfs_share.proto/google/cloud/baremetalsolution/v2/osimage.proto4google/cloud/baremetalsolution/v2/provisioning.proto/google/cloud/baremetalsolution/v2/ssh_key.proto.google/cloud/baremetalsolution/v2/volume.proto7google/cloud/baremetalsolution/v2/volume_snapshot.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"€ -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" -ResetInstanceResponse2ºK -BareMetalSolution - ListInstances7.google.cloud.baremetalsolution.v2.ListInstancesRequest8.google.cloud.baremetalsolution.v2.ListInstancesResponse">ÚAparent‚Óä“/-/v2/{parent=projects/*/locations/*}/instances¯ - GetInstance5.google.cloud.baremetalsolution.v2.GetInstanceRequest+.google.cloud.baremetalsolution.v2.Instance"<ÚAname‚Óä“/-/v2/{name=projects/*/locations/*/instances/*}ê -UpdateInstance8.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.google.longrunning.Operation"ÊA -InstanceOperationMetadataÚAinstance,update_mask‚Óä“B26/v2/{instance.name=projects/*/locations/*/instances/*}:instanceÏ -RenameInstance8.google.cloud.baremetalsolution.v2.RenameInstanceRequest+.google.cloud.baremetalsolution.v2.Instance"VÚAname,new_instance_id‚Óä“9"4/v2/{name=projects/*/locations/*/instances/*}:rename:*Û - ResetInstance7.google.cloud.baremetalsolution.v2.ResetInstanceRequest.google.longrunning.Operation"rÊA* -ResetInstanceResponseOperationMetadataÚAname‚Óä“8"3/v2/{name=projects/*/locations/*/instances/*}:reset:*Û - StartInstance7.google.cloud.baremetalsolution.v2.StartInstanceRequest.google.longrunning.Operation"rÊA* -StartInstanceResponseOperationMetadataÚAname‚Óä“8"3/v2/{name=projects/*/locations/*/instances/*}:start:*× - StopInstance6.google.cloud.baremetalsolution.v2.StopInstanceRequest.google.longrunning.Operation"pÊA) -StopInstanceResponseOperationMetadataÚAname‚Óä“7"2/v2/{name=projects/*/locations/*/instances/*}:stop:*¨ -EnableInteractiveSerialConsoleH.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest.google.longrunning.Operation"œÊA; -&EnableInteractiveSerialConsoleResponseOperationMetadataÚAname‚Óä“Q"L/v2/{name=projects/*/locations/*/instances/*}:enableInteractiveSerialConsole:*¬ -DisableInteractiveSerialConsoleI.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest.google.longrunning.Operation"žÊA< -\'DisableInteractiveSerialConsoleResponseOperationMetadataÚAname‚Óä“R"M/v2/{name=projects/*/locations/*/instances/*}:disableInteractiveSerialConsole:*Ö - DetachLun3.google.cloud.baremetalsolution.v2.DetachLunRequest.google.longrunning.Operation"uÊA -InstanceOperationMetadataÚA instance,lun‚Óä“@";/v2/{instance=projects/*/locations/*/instances/*}:detachLun:*º - ListSSHKeys5.google.cloud.baremetalsolution.v2.ListSSHKeysRequest6.google.cloud.baremetalsolution.v2.ListSSHKeysResponse"<ÚAparent‚Óä“-+/v2/{parent=projects/*/locations/*}/sshKeysË - CreateSSHKey6.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest).google.cloud.baremetalsolution.v2.SSHKey"XÚAparent,ssh_key,ssh_key_id‚Óä“6"+/v2/{parent=projects/*/locations/*}/sshKeys:ssh_keyš - DeleteSSHKey6.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest.google.protobuf.Empty":ÚAname‚Óä“-*+/v2/{name=projects/*/locations/*/sshKeys/*}º - ListVolumes5.google.cloud.baremetalsolution.v2.ListVolumesRequest6.google.cloud.baremetalsolution.v2.ListVolumesResponse"<ÚAparent‚Óä“-+/v2/{parent=projects/*/locations/*}/volumes§ - GetVolume3.google.cloud.baremetalsolution.v2.GetVolumeRequest).google.cloud.baremetalsolution.v2.Volume":ÚAname‚Óä“-+/v2/{name=projects/*/locations/*/volumes/*}Ü - UpdateVolume6.google.cloud.baremetalsolution.v2.UpdateVolumeRequest.google.longrunning.Operation"uÊA -VolumeOperationMetadataÚAvolume,update_mask‚Óä“<22/v2/{volume.name=projects/*/locations/*/volumes/*}:volumeÅ - RenameVolume6.google.cloud.baremetalsolution.v2.RenameVolumeRequest).google.cloud.baremetalsolution.v2.Volume"RÚAname,new_volume_id‚Óä“7"2/v2/{name=projects/*/locations/*/volumes/*}:rename:*Õ - EvictVolume5.google.cloud.baremetalsolution.v2.EvictVolumeRequest.google.longrunning.Operation"pÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“6"1/v2/{name=projects/*/locations/*/volumes/*}:evict:*Ö - ResizeVolume6.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.google.longrunning.Operation"oÊA -VolumeOperationMetadataÚAvolume,size_gib‚Óä“9"4/v2/{volume=projects/*/locations/*/volumes/*}:resize:*¾ - ListNetworks6.google.cloud.baremetalsolution.v2.ListNetworksRequest7.google.cloud.baremetalsolution.v2.ListNetworksResponse"=ÚAparent‚Óä“.,/v2/{parent=projects/*/locations/*}/networksß -ListNetworkUsage:.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest;.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse"RÚAlocation‚Óä“A?/v2/{location=projects/*/locations/*}/networks:listNetworkUsage« - -GetNetwork4.google.cloud.baremetalsolution.v2.GetNetworkRequest*.google.cloud.baremetalsolution.v2.Network";ÚAname‚Óä“.,/v2/{name=projects/*/locations/*/networks/*}ã - UpdateNetwork7.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.google.longrunning.Operation"zÊA -NetworkOperationMetadataÚAnetwork,update_mask‚Óä“?24/v2/{network.name=projects/*/locations/*/networks/*}:networkô -CreateVolumeSnapshot>.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest1.google.cloud.baremetalsolution.v2.VolumeSnapshot"iÚAparent,volume_snapshot‚Óä“J"7/v2/{parent=projects/*/locations/*/volumes/*}/snapshots:volume_snapshot• -RestoreVolumeSnapshot?.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest.google.longrunning.Operation"›ÊA# -VolumeSnapshotOperationMetadataÚAvolume_snapshot‚Óä“]"X/v2/{volume_snapshot=projects/*/locations/*/volumes/*/snapshots/*}:restoreVolumeSnapshot:*¶ -DeleteVolumeSnapshot>.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.google.protobuf.Empty"FÚAname‚Óä“9*7/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}Ë -GetVolumeSnapshot;.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest1.google.cloud.baremetalsolution.v2.VolumeSnapshot"FÚAname‚Óä“97/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}Þ -ListVolumeSnapshots=.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest>.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse"HÚAparent‚Óä“97/v2/{parent=projects/*/locations/*/volumes/*}/snapshots¥ -GetLun0.google.cloud.baremetalsolution.v2.GetLunRequest&.google.cloud.baremetalsolution.v2.Lun"AÚAname‚Óä“42/v2/{name=projects/*/locations/*/volumes/*/luns/*}¸ -ListLuns2.google.cloud.baremetalsolution.v2.ListLunsRequest3.google.cloud.baremetalsolution.v2.ListLunsResponse"CÚAparent‚Óä“42/v2/{parent=projects/*/locations/*/volumes/*}/lunsÖ -EvictLun2.google.cloud.baremetalsolution.v2.EvictLunRequest.google.longrunning.Operation"wÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“="8/v2/{name=projects/*/locations/*/volumes/*/luns/*}:evict:*¯ - GetNfsShare5.google.cloud.baremetalsolution.v2.GetNfsShareRequest+.google.cloud.baremetalsolution.v2.NfsShare"<ÚAname‚Óä“/-/v2/{name=projects/*/locations/*/nfsShares/*} - ListNfsShares7.google.cloud.baremetalsolution.v2.ListNfsSharesRequest8.google.cloud.baremetalsolution.v2.ListNfsSharesResponse">ÚAparent‚Óä“/-/v2/{parent=projects/*/locations/*}/nfsSharesî -UpdateNfsShare8.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.google.longrunning.Operation"‚ÊA -NfsShareOperationMetadataÚAnfs_share,update_mask‚Óä“D27/v2/{nfs_share.name=projects/*/locations/*/nfsShares/*}: nfs_shareÞ -CreateNfsShare8.google.cloud.baremetalsolution.v2.CreateNfsShareRequest.google.longrunning.Operation"sÊA -NfsShareOperationMetadataÚAparent,nfs_share‚Óä“:"-/v2/{parent=projects/*/locations/*}/nfsShares: nfs_shareÏ -RenameNfsShare8.google.cloud.baremetalsolution.v2.RenameNfsShareRequest+.google.cloud.baremetalsolution.v2.NfsShare"VÚAname,new_nfsshare_id‚Óä“9"4/v2/{name=projects/*/locations/*/nfsShares/*}:rename:*Ô -DeleteNfsShare8.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest.google.longrunning.Operation"iÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“/*-/v2/{name=projects/*/locations/*/nfsShares/*}æ -ListProvisioningQuotas@.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequestA.google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse"GÚAparent‚Óä“86/v2/{parent=projects/*/locations/*}/provisioningQuotas‹ -SubmitProvisioningConfigB.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequestC.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse"fÚAparent,provisioning_config‚Óä“C">/v2/{parent=projects/*/locations/*}/provisioningConfigs:submit:*× -GetProvisioningConfig?.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest5.google.cloud.baremetalsolution.v2.ProvisioningConfig"FÚAname‚Óä“97/v2/{name=projects/*/locations/*/provisioningConfigs/*}ˆ -CreateProvisioningConfigB.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest5.google.cloud.baremetalsolution.v2.ProvisioningConfig"qÚAparent,provisioning_config‚Óä“N"7/v2/{parent=projects/*/locations/*}/provisioningConfigs:provisioning_config¢ -UpdateProvisioningConfigB.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest5.google.cloud.baremetalsolution.v2.ProvisioningConfig"ŠÚAprovisioning_config,update_mask‚Óä“b2K/v2/{provisioning_config.name=projects/*/locations/*/provisioningConfigs/*}:provisioning_configÊ - RenameNetwork7.google.cloud.baremetalsolution.v2.RenameNetworkRequest*.google.cloud.baremetalsolution.v2.Network"TÚAname,new_network_id‚Óä“8"3/v2/{name=projects/*/locations/*/networks/*}:rename:*¾ - ListOSImages6.google.cloud.baremetalsolution.v2.ListOSImagesRequest7.google.cloud.baremetalsolution.v2.ListOSImagesResponse"=ÚAparent‚Óä“.,/v2/{parent=projects/*/locations/*}/osImagesTÊA baremetalsolution.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB… -%com.google.cloud.baremetalsolution.v2BBareMetalSolutionProtoPZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpbª!Google.Cloud.BareMetalSolution.V2Ê!Google\\Cloud\\BareMetalSolution\\V2ê$Google::Cloud::BareMetalSolution::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Common.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Common.php deleted file mode 100644 index d062cb191bef4d3efad9b232c2e6dfe7051fa46d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1191 zcmb7DQESss7`0V=xIQ=v1C=qpy2`qtDRgg{Q_?o=f?E^Pt^)~_+w`Wpc#|7$ZU!p* zL;ETI6kmPw$(y7tb6ExRl8~J5+>>*@^ZsLe6{9^EkcbE@$sA^1L0%Dv1()3C3}$H% z5CJ|9W6Fro0D3kI?J<}=Yg|{O2~UMjbXah{V5H?Up3Yk{EJ#QsW(jAhq&#X}w_A!M z-e*?=ASqP67eubj%-%E)md9pvG=OHIQP)c%Pe6*4+&vvY5SfbTIMdV;k7OQ=>a@LHazR!UU6ZXe!O(Dp>{@-x>}@@&y+*s6fTL5x zRhUYxfnXEH7>%sKP@$@|UG!=b>U6yI_>iIJmt1^d9M4sbfpVz^Xy?*)Kb_e|Z|b;q z-#Rnz$=g9MN{E3uG+nE!guO)DrLU*P(AcVWepk>Nwed^W|KVciS+UCbZaJ0Dqr&i& z`#fwd_ydK)F;$%^#S+hsA9#0LtryMG@@8pSv$D>y(XyY~r2S)s@s{<=`}Y^hQw984 qZ4^|xo^$DXiA>ig?b*}3=STbNMSNTA_nkUytU`_~w*Cg)AoK?lJA#J* diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Instance.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Instance.php deleted file mode 100644 index 3649273023792f15c534a216d8e06ff9876a65ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4926 zcmcIoOK;mo5UyUfG;$n;i4(?XQd)5wyGf)*DcXe21Ck}X0vt)OWE(965EQktSW_fR zQc7LJmjVTP=%t7Lh5|+ZNc$fO^qgyNK@Xi>KH|tqBsY#P7O9zUznz`=X0(rpQBUX9u~gs@smND_v)|HGMZh&2{I{sulB%nYDr@R@xUa`T z2iXvGK55(O>k1_)P=_iqTwW1eOlrGm8W@Mig3qi*LxW*ymUV|%x~w&e#8xcTbPTJ8 zrlPn6=7_lEO|`kM z60KbzU3s7ymMFg3)hm!Uxo#2fJSX;g^FcM&j9$;sCnxY0sLlS_;8ck7+_3h~gwqb@ zc8^RB6(kNjpJ%dt3L1fLL&c(TElw0=mnepqP*kImx_P58|Ykl81JKk7#GhlKy z19r@wy)Sc2!cYXV9a?Kr4-eC`_{gIWSUCQPxd!P!5)k*Li@N|(DuaAT2rVZHk-zgX z?mUFmHlOrgM7U2OsaOQnS)x#U7{5v8{5ZOx$RrbF28Cf>eG?Vc^NLL7broiMveH#` zbUQE!AN6U(xDv#uZV^6)?`CuNyn}p88f5%!X6n?@<#in{cM;igy11vds_#iems=WX z^HYc$=QdzUlUqcy`Dr178~yw=>ufU5lI~as+(U?BV%U6~!7NPxgCgS|!Bd!aPu=EI z%zI@5Z&wZ|K$Ocv+{-hYPcVd!CqVGT$&FJM(yWSQY)u0q*~G$DCMkxFEtLc@0~#~e zAq8;*dtOi8Bm4|KHZBDb(`fVO=!3hlZAf{%B!~1&jUMML`+D_d{sDY;vY6d$#yYk$ zSeDs3u?EEQh&DV3t_qxH?5PS8WSl$L)NTGe+xYznHooaPvxZ82xhnt^P)E3q!C&w< z5aBiA%-7>(%*+5#uA;IgA4UWzEP64EA?7wt-M|?6;mJJ zdCb(dsypR+xmqb#Hc}xj3DaBK74{IO55>}Ese!f;ZU*ApwPLf-@9mTK3TYcoa-; z_)_%-ucP!fa2v$&!M4aZeQZwL)7M1p-rxD~%lz$AkV^j;f=ipK9RS-t@|E(f z{}6(?Au6_sp&{H8Nce%Ukq*_W+Y{uVA1uuA^E&y~k&aQI(w^WhLb9);I4WJLi^wao zoJjwKJhqvh`v87S3J~{su&A7l2GxZym&GOBW&zkv;juWEtTW;Hqqz_#>GH{8fd~LC;1?C^H-x*~zH{C3EEo)NLe}%y567 z{|f^={1O}4u~`_IMA-yNi+?t^duD6nP>SkKr;G;f8+&rx!nUPaIDpa)5KkB2-0LRS zVZK~xl(yFMYbB}iWo@{v$01s%R*Klpry)`)ucgA`FQFItpF{t9p4y$XDchrtK6~iC zmWD^Yqr$%-xQS!j_+S<=2Ce|(tmGKA&{uW$=bk$cvRQD?7;(>ojTf(aP9(J1S{?E3 zxA4LSyY9)bpZ=Kw_I7#^q}9D^qs&h3Pv55L-3hTvq1UXMcq{ZGyy!xSBEu5J6JVma nlWR?3XdUDJt>B079rw!R*bNQt8*h+C+|Dpd_YUOl5Q0ac(3sgd?)Y)|sxJyoOQu8PFdgj}2X1 z1XI{<1wKZ9KqjPGA|aRztL||cdbVpBG;%@~a6fFJsjd$wpQcf)?Cg%W6>#jF>?9m@ zeTL)#;bBZ~?@mZac^rEClD7aDO`oheDJuueI%3rASLlU3WPYgYH&NYyyw9~w$5p(y z*EAg_!%A}dGMK-kOyjpdvvJbO{r)sZN2sTrX;dP{ZTNQ;9({n2l+DCgm8w%`RHqJ0 z8=sHy?0{+EIL<_d8()n-Nl{{LH9iR@F)04M2pN=`vJMMEv4s>#?c^$%*X4`?kY@b? zhy`UIvZA)MkjB>sr9JgdRw|;Z9pR&_!BT`;?GAc{47z6&6O_x?lTMh4Ty%k* zY4==OSVV+nB@fFz-{)Oy@4}K?c>=4Gy(IT#$-Q(>?wy3DWW5RtFJ54tbAqe#1FX=O z0SjqY6soX-iz}s#3GAeb>Qs_Rr3}b159@;+9u-ze27~?%D|lUg1iN>JT_1ZEZOA6| z`V`hXX4$NEPft3n>S6t;UN!O`DXXx2*shk%`bjOH5^tw1BY8_JImqHC<5@lL;haa@Mr<@9y=;r$pDuVAggB7qi7 z;2y(bfNJ&lxOFuN_<@2CMAL{KmHnMnu=nK>_n%WwHf^prg#69kQGh9+DAxrMDsG)Y zoj#oC^!>9+Oa^$c}HeW_4xp)j~)gg2KrxaHHNx?VR z?RQhHEF;&JI1^i`Upq-ilc|T(V&KoY0^lscTfmICg5Lg|wLjCFHF+IS<#j-U_l z!R_E65*ky_N`Fmktnr;eUK-xAvhddMCcTwF>AJ+y^%*c-KP&YX7 zNI^BMzE)@}4(Sn3Ft*As=t5=@mWliyv)*6Fp zJ)`_L6i`p%gBlGEp(_G-^l$v1yerf zgjtAF`ic`$WMR4zdsB`H08w2NfgT9U5cdvkB1Z9Bx>(4+*Rs41oNuC-fLOXME1HHj zx?+q$UWQ~(QNzQy6hl2vV1kl~h?7jw{R=4CqH@9vOzj(rDWm06Oic>ns;)U=f_-}c zv3;i_PUDwk@$)gzcN(k0Doh$mn;5Q`L?e^Muf~uIp1;lntET513RmEgOPqaOC9ceD zN->)nkV3cM518nd>57+_l1Jk!LGDq%HijTV24c3QiD{~UM{^TWJ*#hevTY$}U2%qK z`EqP!gp09}m7fpRG8wm2Kwk-Z1W z<3343Y>ym@5$1_YFtM)~eNMCKQuOOc?jgh(gXSR9{Jvh5w>P%x)n~QUT6HD!3DRov z*?O(I(ac1IBuv#CwViUanu+FAnBaW40<&99JUbcgB7Y|1N7al9~>xHmDuh^d8#G$4O&~@SWw>nVhf* z8J5P1=PBxLk5I-=F~&X|)0!Qu0_9LTdlROI=$}Hmt(e+@u6et1w{5%Z;gRg0QAnSZ z6Xqag6XM80QK24+(JI4Ek=op?voP&gee9oht|vS`p3;^3Z_3ekkIOxsGA$SzK>EN>?0V8D(%Ymb#Bo-?_hBQST;64%B)NrXp`@Ld_u<<1y%@%@AyYQ`k5upd&BxPBfwtebt)Ay{{4 zLqnr*FvIfUpyePc6i^>SX0sV{OtP2_UJ{IN`EVZ1{Rk=F zh;0{*7nVN41e_ESeV1rhw_H?BpNe(ln7f&ZAoxp=2*P~f@T1w{D6SvM@<=EzFk>cvEB!ea z<{CI7^-dG$BNJ7)25FNV3`?lSjbq%Z{2GJLu-XS?I)9U>1eB`Nb+8`!VT<1l27R1k zy4D$6Fg6cdgh#w-x0lX1dmX*8#|pSab+ zrTK027KbX87*?q?0#+*FweoL~3-&u<`;0lwAzeC~7moOcL4i?Wq*vmF<3Aj0!GrcB g%j5^Q!^Q9}UyhIM(#TWX_0QO&*-gIf4qyQAKR^>?mH+?% diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/NfsShare.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/NfsShare.php deleted file mode 100644 index 057823850ae33e14f4a303d78717bd065a07ff25..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3207 zcmbtWO>^2-6fIz5xFoit#4YipGcrlXxM^TQ7j2X{88DbKV*`V*({z~82=OqAg{0_7 zq;AIBPB&e5)kU}6_Fwc@WSyUo>7w^NeVBkVDGeK>r+3f0_q=mI9zC%~Hry8L#3YXD zl7ZMi6WtLJZO3vg%`(KkHyjd2)U2_s8^kGyVznhUTV1hMZFINLlvzIcT88K9mRX#Xisq0ibcA0D938+^$AsFdM#Or%a){dps;l6WP9(}780>5hMu(HF7K;CECA;E?IXRC+~e(Ir0PcJ`_(|GT(9*|ZZ3?h#9QCj&ZDi-55{Ba%b zFRUqH%Qq=-85ZVbSeTSHZw9EUtrwjjT3?Zyp@_LY@rH{-Mx-*vnEV~N-_wu^WhY#N zB_`o)OpN8zmBj1vvTzfwL^4wRHHOKNPK>+ZVsD}zo^0iN4)wC4HvRs9}@KieDl&4rQOyIWaj;6G{ zc@HwvmzIIVDLM1$60XAXL^V9(2QS6Hjpd%fGFLFdU6Z@zZcRCA%I(@-W4}?Wu785L zl4*BZ#|^pBYT`mnxB{uYPOaQ+H0$ee_IA{+`fmyLR;?Y>__w883)bgi-h$5$TSv{V z(ynz58!|(cXHHDP65_L?Rsq>UC2y{M7RZ6x!dZL>oukOtUc@a3M6Ei zq2R-J)#`d&8owz&hn)|LWnbpKOxVTZ^PFfdExrn#&WnbnVNXK^6kmmp=d7J_3tWs! z&Ux+#ggSAVtRc<1^Rc&&nnzw|+_J{1byOu!DxT@&0k6ay7h- zHX9q;u^(iAbJ*;$4WC$-49u7>I5W@H4ZHvFlC?kMTXjA*7x>s*s9;L6f!dIR`MYpj z`a9gy3ubFRT)(rchtu_&_#Gcgk~o$m&4EeMajBo=3jBII8r#0|N7t!I_q|gt-|5ey I=Wq`2FZ(+NS^xk5 diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Osimage.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Osimage.php deleted file mode 100644 index 8ca039c2d73d..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Osimage.php +++ /dev/null @@ -1,45 +0,0 @@ -internalAddGeneratedFile( - ' -ç -/google/cloud/baremetalsolution/v2/osimage.proto!google.cloud.baremetalsolution.v2google/api/resource.proto"† -OSImage -name ( BàA -code (  - description ( ! -applicable_instance_types ( # -supported_network_templates ( :}êAz -(baremetalsolution.googleapis.com/OsImage;projects/{project}/locations/{location}/osImages/{os_image}*osImages2osImage"w -ListOSImagesRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( - -page_token ( "n -ListOSImagesResponse= - os_images ( 2*.google.cloud.baremetalsolution.v2.OSImage -next_page_token ( Bû -%com.google.cloud.baremetalsolution.v2B OsImageProtoPZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpbª!Google.Cloud.BareMetalSolution.V2Ê!Google\\Cloud\\BareMetalSolution\\V2ê$Google::Cloud::BareMetalSolution::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Provisioning.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Provisioning.php deleted file mode 100644 index 6b8be6c35f8ded3b3845cab2ea75cbdb5246d545..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7296 zcmdT}TXWmS6%Hv;A`fMnf^W3!#4zJdl$n~0X}d}2I0O)sEjqE6wMVTYb!GUJT(S;;gLpVeSEdsw<8o9!$uDZ$ZR=*07^%s_3|ii~rry z99c6oS5tKDmw3O2Vh>M6P{91Ry`iDf!-{l4-B8K)`y!V~zrAIdsE>!De>&XSHBmin z$#98nD0;h09M#q=*R&7t(|o>9+(5B(X8V0_TPjZLiQD{)`TX1=ABwI$B$K;~qD|bP zZ9HJ-rUH(GzuF6QSFp79jz;uuksK)_&9w9R@vX)}PFmU^o?Vw-b+WPAC37$^jpYyU z8c{XkJ~!>B%gYL^#FVkGIA>Yg($Gs?WneAdmwCqRPc_dE3f*pC_8kPxc3>!Kw)fyK zci`Sx&?4OAt1=8@nK_JQM!Bu4o?yk&vbJYKjvu z5!od~9I_R`^Pl+pQ-Bg6$Q4k?@q!?XuL~Pk1_DEBStf;CvG~Co0`(hI!WT0qz zYMm)1oC*nbh)_l$sVGh*au1d`$GoyLO)7#b`4U8RQ$-#%jZ}d1z~?xG!}@xD1JrrOJ*f6GQ3fq?_8n zAER`h-fHN`sA5Oylhir72HL13nToKMgJea{xR_Thv zLRBiG*m5#LhowTTRH;^RxF!Is?Gz;X_j>;O(5u4lLvVKIIO|&i=lnm9r(!DiCcY#<5Y;w9=s5ki5Zq`EI|I#~->*TQ4Uyo4k73Qi zXp26^k@o%%h46n0@4`)gL&tNe;Ote;J%lH40Z%%+Eh3Zp#{DySB6XXvAoza1GB)uD z#FMY$Sm<9wXe>Suz1Ud~l>XN$Y))$L(a?02MeNi7!0ZG8?Y^`KQ$iy5=_!@Kgl7s= zObew57a-nOEuRgLt|$nS69`>pGgsieGD2RU5JKZq!l0BA5x#(g&zSNvdT>T0@!T?u z=hG%T)81Q%y$#ArNKSkQ%0Vl8A>kTqdVDH(kiMR4UH6Ew5&iKJ#1XDGB3SNg9Y!cP zoi-pgzT_5ME;O5!mfZU4U>3Is=ZW8%mBwMEff&9F!sK+T-YD!=5X{r_wMy$rz42vo zCI1J+C2~aWRJi1pu6tlS6)f4(SyVCu92eIi!u~2IV8gSTrfcrY^lw7&c2#qxu*wDf z2w2^Om_@DNU`EWGGlD1sHszX6iNSp<{e1}DIq3`@$R5prj9tb-_Mq|j-dP-8K>sz! z3s;^v4keLT`k!l%@cl3doO5{rKp4XTTY(ODF7S8;M2;B@C`Sk=+dZ<0(#2u~<2DU6 zh$Rz?g#isQJPNnlkWh6E2~qak+QZD}OI&UGtQjw9z~m6~GN(x6_0QqFWosiENPY1X zNb%f{BOc8>M3l;g>7@iLt?;r4e@7>Xwlu&;k;fB0f_da%;XRT2?94azY?XqfFW4mm zOQ(4Xi~g9l2)fzVR7J;14NIvWmV*ukf9gYbm)N$-7qc>quBCQ&oFn-uc`38{5)+1% z?bucW64OSYUhkg?orc9cjQHycw~^;X*Wdzqflx$8@s&n14(3bgI-K)lde?j#u6k5c zs@Ha;-I?42^NA*A7S)P;SS{3$y%GTXkE<<-kHh(2y()YM^Yyc*h9K@vJC`6WOH4i< z_-T=q{D~k>_;(aGX0p@Qg6t}6I)-97N2WXWC90gLP=r+mI|{GFQgkr6afU^`FCdC{ zW4#Cl%0%v?C0t@k4n}OYo|=|Yp4{&+7)OLEfIc*2TQU0RaqGeU~g_6oJ0Q(+P?*_Z$|&Ael?i2(;y1CmH_ zJ<}f05(yJ^VzYeuH2OOj3uxi`t=kX{E{kOOY^WG61}g@f$fR~D{YJL_9ERBV;ES+! z5n!w_4mV6L60oXjU7I5e$6rGnuQJda+B>2}7WJmenN^stBTAf-DHDmz`>%xrZX6uv(UyUnaxpU5Ex= zo`Q>5vb5@@dUfUmyqMv??37RduXp%FZKs(G=U=`mjNtYgQ=>_I36*8ZXEagtBK7cL zKsjWI>loL}}KHqKPJYvq@4t!YU`Ki3sxNRD*HkQLWO zDi~nq;GjoQ%rE1x(^4^@DNo5EiYo-tgbfcIya~|Yc{uG3Fv!sKA(8v!)E8*-7DEYP zH_b4#lQ73HtQ8<2@w2Ns*qM<%7huUkRJaZozZniXrrfh>e>X@mC^bd5K7@-4uf}c5 zqcC!*rD!&dxfsSdHKgyq78qE2m#R{wM(g@GtRFO_LoCt}94f@d2D%EDiiKMFiBxXw z&A4&XovB`Vemz;e^4$CeTp3rder(`1CIx3? zSuIQ-b!jd5*$^+aCbA<|*c_)dxV}rKiZZS+zbKQY8kG-N`{e$aT0pE{Q^EqpCCKbS zUuAl`|CfHvU$OV}m~{+KzRL*>r2nN~!y8EBZYAwRGb&lstqk4=PHa0Be;tOOV8ias z>{^`a65*X)^C0wfllSd8URmd_Z_a1>S(enD1N;~2N+h8G diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/SshKey.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/SshKey.php deleted file mode 100644 index 81b8ace59aae..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/SshKey.php +++ /dev/null @@ -1,52 +0,0 @@ -internalAddGeneratedFile( - ' -÷ -/google/cloud/baremetalsolution/v2/ssh_key.proto!google.cloud.baremetalsolution.v2google/api/resource.proto"˜ -SSHKey -name ( BàA - -public_key ( :gêAd -\'baremetalsolution.googleapis.com/SshKey9projects/{project}/locations/{location}/sshKeys/{ssh_key}"v -ListSSHKeysRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( - -page_token ( "k -ListSSHKeysResponse; -ssh_keys ( 2).google.cloud.baremetalsolution.v2.SSHKey -next_page_tokenZ ( "ª -CreateSSHKeyRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location? -ssh_key ( 2).google.cloud.baremetalsolution.v2.SSHKeyBàA - -ssh_key_id ( BàA"T -DeleteSSHKeyRequest= -name ( B/àAúA) -\'baremetalsolution.googleapis.com/SshKeyBú -%com.google.cloud.baremetalsolution.v2B SshKeyProtoPZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpbª!Google.Cloud.BareMetalSolution.V2Ê!Google\\Cloud\\BareMetalSolution\\V2ê$Google::Cloud::BareMetalSolution::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Volume.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/Volume.php deleted file mode 100644 index 64c919dabd2da05a0ee93a2b6081ab24d818521c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4056 zcmb_f-E!JS6fR(FbFdSr9>?S3SED;J-9>Ti;mhp7WibJ?GoA-#vBq9Jni1s6}1Pr#-QI zDEfO;bX?oFb=wrXqkf;dqHYfz!=!FT6iW@U-e`+*soGveRnH!|I?am%+a8!StDE+y zm+fjU9a3L2J=+}lhHYgJa@hm?9?}el2C%dt^&Cy7Vx?Jlj_bkXxQAOEcxo@!WzZ)m3RE5@`b_R$lHs%K^UBTHuv zicFzl>2!TV3^1AOnqy-QHpQ`DO_ml+NvCT0)U`CTQ=*>k8jf$fO%%=N2h^V=ldY_8 zgk~9>(HGYPAM^P$PHu|6JEF&}i=s>Yk!wBXelvih$yeu`tVxd1DI3)673iLJVAyUx zKaFY%@*&k04bSqzS|2{9PSG9?ZR_F=Oft&@c&>T-|3bHIU`_ej&^ce1pXP%nMtF8o zuQxfWG8XsxB)Kfr_u-uYnafo*Sq>JXC`N_-v~n@ITM30r7y*bH zJt4^!$TL{*u*$UoRsBPU3Q=6WlKVFF`5z+A1o#;x&~BqLc>;0P2ULi0lrkr zap^B3JZ#!iJ#2DyV048U1dEY-aL0Cyfq~s=9;)YvrMQ>?DShO+)bghQalV7#NM7!M zTKeI1?+V|$1`9*&)pT`(R8 zygl1TS3T+;AcNVK+CxG#Oko~{lDXm~(i4JVFORWG9E$A2orxvxY>%4Mr)oFk3L$~E zuH;IWwNDUtArQB0pL)XeaYQpjfz(Ue-8XHmr($S*q$uGAH}>el z#xlDh0!GLH$TyIruN=c=&SSF+h?mTbnI|9xWRlE;NrSjckT5LlSPa?|ZsL(93SS{X zyqCU!jk7ElkPZ@@mqEVDRzpp49p*LP*YrI+#uYRiBz5JF2;5XYShu{@SuwLtXY&H@ z9!63zau;p|O*7dWdH9J(q+?%mii(ppxP3}!+K!Ah7zM@1XK>?`)EI@aN_^!3B#&2S z5@P%GFyKnE2=N2W90i=1$VVSW(wmSx&Ud##P}+@_RFT#8i>9n@*OjJRtd^^CDfJ1N zgP5X}QW5sCRVt;TX$|5E<3~){lG2vir!^K}zSxqbcC}tXwFJcRN9jc>N^qkj*JQpC zW52eWr9f0wv;xyg)4P=ce)Zwe-HEHro%SB)@(J}jUqaCGBZoC zSgsaYvRd4d>UFsmshTKl~hD5S8JyemxQ^BT$fwbB0|l> z48lsOXukhe(xG$zqoo{Pl@GBUf2O+cWnYJ1M_JR>Id$XO`12?nd2uPAlB4vGkg8BW zfN2Fc7}-2=@n+vh(f88E#l1=Y9syD_yb#qJ!#;vp2M1{EgWyKr;J|lbb?lxOvdE-S zYhegD3M3qM(X*R1>>`{6_>yn$Q;YXZg5d0coPvWezj+hs-(dNKAD&}d9wm903&Qu% z6LuSHT$sMdr*PGxuYC2GZ8mr$$TB2HmP?UL*tLKTAt$j+EN?sbkf0|s`~+qL4|pmr z;{c<-D9NHR4$EgNo{{rNb27T79awJRg*80o$A3I&9D5cm`ZBziR2KzV?Xf^u8JtY$(-R3z6fRw~$O!Y3xs62;E4+`uJ-jYHUK@pE;0))FX5=R&n6}5G zH{Lh{`>fAR|XGI$Ukdq1+7+0f5mKQDn diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/VolumeSnapshot.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/GPBMetadata/Google/Cloud/Baremetalsolution/V2/VolumeSnapshot.php deleted file mode 100644 index 342fa243e15aa9ca3642cbe463c02ee1eb9aa9a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2450 zcmcImQE%H+6edYm)YGjk-UC?&;x-gDmB7{l(j=E|vXeBe*qX3pl{Q(59Q!6QIJWV< zt{77!g!UtN;s@};|KL~b4QW4NPaI#{SyHEh7Lk`+9pC$%bH4MPbMMy=gK+?#k{0!7 zXmVTO-;KEAd&+rDImh*c_L*k}Z0vJc_yF+C31xw4QPS$@kMWRga?@xD zIHMlJ8Tv&y~VdPnH#3Vk@_AFZ6CkbY}cQ^2nltYrm*NJ&Tj*JtJ)6g?rqd}P!Isx~?4sKP| z5#=*>V@q{EbsNJuLsCs*RMlLNhlGa_o%c>iNO=@`2O{nmU^-hFOW4x_$2fARYwL7u zo;!Z1s_(LT2XfibCp0bYzdkjiqvv2zxj6}zdlWQ&@xVz*(`ah?$%e{bCD>S0pmY;f zVojF|q)=UxHlgU)<<)qtmtJcn={Bs}sYXy{<)Ya26|7q!#SZMp4$3QNT(51*Y3!MI zc}8mj)q)L%LNiCSpEOtbhVY}HpSRjR7<>7A6G%*z$=K9N61(&*tne2BEx(WFH);nBGi&BoSy62Pj~ z=pVQ1TLtMBtaa&q+wo2Ci5yiM&7=o7H7)KbTw66-@=jL zduYp+({wVSDPeJ{uymTBDO*k}CX`#0FXsJ({t%(irRIFi_4}{2;#=+Bl_RdaD!}$5 zhh1>OGA|EdHNa8m@kCoX)*1a=rOqF~S`f>H;T#mwyCEU-!o>aWsaGz=0;>F4fV)fM zU;$D`rEg#>p=vhG8HQ9s&EC7Rbfgbq)1yD~{#+DEQ(&h=9(IK_HU}=n&`KDZ4R;&V zrJVk+h4=#rsEdYN?&iN&q79oDC=~U$4uf&O6)ORJgaaGL!6nRe@(#s>y0%*NUyAS< z&X9kuxPE()#ZG){b_&nC$$UwtTs)3Oe!j~U>~DNNpj1_0scH^PRnKaJRWYBx+?(B6pC>o> S+(m!sB`google.cloud.baremetalsolution.v2.CreateNfsShareRequest - */ -class CreateNfsShareRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent project and location. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The NfsShare to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $nfs_share = null; - - /** - * @param string $parent Required. The parent project and location. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BareMetalSolution\V2\NfsShare $nfsShare Required. The NfsShare to create. - * - * @return \Google\Cloud\BareMetalSolution\V2\CreateNfsShareRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\NfsShare $nfsShare): self - { - return (new self()) - ->setParent($parent) - ->setNfsShare($nfsShare); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent project and location. - * @type \Google\Cloud\BareMetalSolution\V2\NfsShare $nfs_share - * Required. The NfsShare to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent project and location. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent project and location. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The NfsShare to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\NfsShare|null - */ - public function getNfsShare() - { - return $this->nfs_share; - } - - public function hasNfsShare() - { - return isset($this->nfs_share); - } - - public function clearNfsShare() - { - unset($this->nfs_share); - } - - /** - * Required. The NfsShare to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\NfsShare $var - * @return $this - */ - public function setNfsShare($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\NfsShare::class); - $this->nfs_share = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateProvisioningConfigRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateProvisioningConfigRequest.php deleted file mode 100644 index af131bba0df5..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateProvisioningConfigRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest - */ -class CreateProvisioningConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent project and location containing the - * ProvisioningConfig. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ProvisioningConfig to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $provisioning_config = null; - /** - * Optional. Email provided to send a confirmation with provisioning config - * to. - * - * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $email = ''; - - /** - * @param string $parent Required. The parent project and location containing the - * ProvisioningConfig. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig Required. The ProvisioningConfig to create. - * - * @return \Google\Cloud\BareMetalSolution\V2\CreateProvisioningConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig): self - { - return (new self()) - ->setParent($parent) - ->setProvisioningConfig($provisioningConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent project and location containing the - * ProvisioningConfig. - * @type \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioning_config - * Required. The ProvisioningConfig to create. - * @type string $email - * Optional. Email provided to send a confirmation with provisioning config - * to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent project and location containing the - * ProvisioningConfig. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent project and location containing the - * ProvisioningConfig. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ProvisioningConfig to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig|null - */ - public function getProvisioningConfig() - { - return $this->provisioning_config; - } - - public function hasProvisioningConfig() - { - return isset($this->provisioning_config); - } - - public function clearProvisioningConfig() - { - unset($this->provisioning_config); - } - - /** - * Required. The ProvisioningConfig to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $var - * @return $this - */ - public function setProvisioningConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig::class); - $this->provisioning_config = $var; - - return $this; - } - - /** - * Optional. Email provided to send a confirmation with provisioning config - * to. - * - * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Optional. Email provided to send a confirmation with provisioning config - * to. - * - * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateSSHKeyRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateSSHKeyRequest.php deleted file mode 100644 index cfedc3945247..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateSSHKeyRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.baremetalsolution.v2.CreateSSHKeyRequest - */ -class CreateSSHKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent containing the SSH keys. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The SSH key to register. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.SSHKey ssh_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ssh_key = null; - /** - * Required. The ID to use for the key, which will become the final component - * of the key's resource name. - * This value must match the regex: - * [a-zA-Z0-9@.\-_]{1,64} - * - * Generated from protobuf field string ssh_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ssh_key_id = ''; - - /** - * @param string $parent Required. The parent containing the SSH keys. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BareMetalSolution\V2\SSHKey $sshKey Required. The SSH key to register. - * @param string $sshKeyId Required. The ID to use for the key, which will become the final component - * of the key's resource name. - * - * This value must match the regex: - * [a-zA-Z0-9@.\-_]{1,64} - * - * @return \Google\Cloud\BareMetalSolution\V2\CreateSSHKeyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\SSHKey $sshKey, string $sshKeyId): self - { - return (new self()) - ->setParent($parent) - ->setSshKey($sshKey) - ->setSshKeyId($sshKeyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent containing the SSH keys. - * @type \Google\Cloud\BareMetalSolution\V2\SSHKey $ssh_key - * Required. The SSH key to register. - * @type string $ssh_key_id - * Required. The ID to use for the key, which will become the final component - * of the key's resource name. - * This value must match the regex: - * [a-zA-Z0-9@.\-_]{1,64} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\SshKey::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent containing the SSH keys. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent containing the SSH keys. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The SSH key to register. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.SSHKey ssh_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\SSHKey|null - */ - public function getSshKey() - { - return $this->ssh_key; - } - - public function hasSshKey() - { - return isset($this->ssh_key); - } - - public function clearSshKey() - { - unset($this->ssh_key); - } - - /** - * Required. The SSH key to register. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.SSHKey ssh_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\SSHKey $var - * @return $this - */ - public function setSshKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\SSHKey::class); - $this->ssh_key = $var; - - return $this; - } - - /** - * Required. The ID to use for the key, which will become the final component - * of the key's resource name. - * This value must match the regex: - * [a-zA-Z0-9@.\-_]{1,64} - * - * Generated from protobuf field string ssh_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSshKeyId() - { - return $this->ssh_key_id; - } - - /** - * Required. The ID to use for the key, which will become the final component - * of the key's resource name. - * This value must match the regex: - * [a-zA-Z0-9@.\-_]{1,64} - * - * Generated from protobuf field string ssh_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSshKeyId($var) - { - GPBUtil::checkString($var, True); - $this->ssh_key_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateVolumeSnapshotRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateVolumeSnapshotRequest.php deleted file mode 100644 index 596dbb03246e..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/CreateVolumeSnapshotRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest - */ -class CreateVolumeSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The volume to snapshot. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The snapshot to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $volume_snapshot = null; - - /** - * @param string $parent Required. The volume to snapshot. Please see - * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. - * @param \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot $volumeSnapshot Required. The snapshot to create. - * - * @return \Google\Cloud\BareMetalSolution\V2\CreateVolumeSnapshotRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot $volumeSnapshot): self - { - return (new self()) - ->setParent($parent) - ->setVolumeSnapshot($volumeSnapshot); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The volume to snapshot. - * @type \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot $volume_snapshot - * Required. The snapshot to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. The volume to snapshot. - * - * 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 volume to snapshot. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The snapshot to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot|null - */ - public function getVolumeSnapshot() - { - return $this->volume_snapshot; - } - - public function hasVolumeSnapshot() - { - return isset($this->volume_snapshot); - } - - public function clearVolumeSnapshot() - { - unset($this->volume_snapshot); - } - - /** - * Required. The snapshot to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot $var - * @return $this - */ - public function setVolumeSnapshot($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot::class); - $this->volume_snapshot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteNfsShareRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteNfsShareRequest.php deleted file mode 100644 index f3f766e04791..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteNfsShareRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.DeleteNfsShareRequest - */ -class DeleteNfsShareRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the NFS share to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the NFS share to delete. Please see - * {@see BareMetalSolutionClient::nFSShareName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\DeleteNfsShareRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the NFS share to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the NFS share to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the NFS share to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteSSHKeyRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteSSHKeyRequest.php deleted file mode 100644 index 814572e4b1b5..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteSSHKeyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest - */ -class DeleteSSHKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the SSH key to delete. - * Currently, the only valid value for the location is "global". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the SSH key to delete. - * Currently, the only valid value for the location is "global". Please see - * {@see BareMetalSolutionClient::sshKeyName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\DeleteSSHKeyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the SSH key to delete. - * Currently, the only valid value for the location is "global". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\SshKey::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the SSH key to delete. - * Currently, the only valid value for the location is "global". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the SSH key to delete. - * Currently, the only valid value for the location is "global". - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteVolumeSnapshotRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteVolumeSnapshotRequest.php deleted file mode 100644 index 19119d332bcb..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DeleteVolumeSnapshotRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest - */ -class DeleteVolumeSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the snapshot to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the snapshot to delete. Please see - * {@see BareMetalSolutionClient::volumeSnapshotName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\DeleteVolumeSnapshotRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the snapshot to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the snapshot to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the snapshot to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DetachLunRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DetachLunRequest.php deleted file mode 100644 index 81712c80e095..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DetachLunRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.baremetalsolution.v2.DetachLunRequest - */ -class DetachLunRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the instance. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $instance = ''; - /** - * Required. Name of the Lun to detach. - * - * Generated from protobuf field string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $lun = ''; - /** - * If true, performs lun unmapping without instance reboot. - * - * Generated from protobuf field bool skip_reboot = 3; - */ - protected $skip_reboot = false; - - /** - * @param string $instance Required. Name of the instance. Please see - * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. - * @param string $lun Required. Name of the Lun to detach. Please see - * {@see BareMetalSolutionClient::lunName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\DetachLunRequest - * - * @experimental - */ - public static function build(string $instance, string $lun): self - { - return (new self()) - ->setInstance($instance) - ->setLun($lun); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Required. Name of the instance. - * @type string $lun - * Required. Name of the Lun to detach. - * @type bool $skip_reboot - * If true, performs lun unmapping without instance reboot. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the instance. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Required. Name of the instance. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Required. Name of the Lun to detach. - * - * Generated from protobuf field string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLun() - { - return $this->lun; - } - - /** - * Required. Name of the Lun to detach. - * - * Generated from protobuf field string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLun($var) - { - GPBUtil::checkString($var, True); - $this->lun = $var; - - return $this; - } - - /** - * If true, performs lun unmapping without instance reboot. - * - * Generated from protobuf field bool skip_reboot = 3; - * @return bool - */ - public function getSkipReboot() - { - return $this->skip_reboot; - } - - /** - * If true, performs lun unmapping without instance reboot. - * - * Generated from protobuf field bool skip_reboot = 3; - * @param bool $var - * @return $this - */ - public function setSkipReboot($var) - { - GPBUtil::checkBool($var); - $this->skip_reboot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleRequest.php deleted file mode 100644 index aa3868a802ab..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest - */ -class DisableInteractiveSerialConsoleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\DisableInteractiveSerialConsoleRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleResponse.php deleted file mode 100644 index 737e33fffce2..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/DisableInteractiveSerialConsoleResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse - */ -class DisableInteractiveSerialConsoleResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleRequest.php deleted file mode 100644 index 6f2964df785f..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest - */ -class EnableInteractiveSerialConsoleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\EnableInteractiveSerialConsoleRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleResponse.php deleted file mode 100644 index 26260201b3b4..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EnableInteractiveSerialConsoleResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleResponse - */ -class EnableInteractiveSerialConsoleResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictLunRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictLunRequest.php deleted file mode 100644 index 38c315af1d6c..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictLunRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.EvictLunRequest - */ -class EvictLunRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the lun. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the lun. Please see - * {@see BareMetalSolutionClient::lunName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\EvictLunRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the lun. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the lun. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the lun. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictVolumeRequest.php deleted file mode 100644 index 3f04fee83e53..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/EvictVolumeRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.EvictVolumeRequest - */ -class EvictVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Volume. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the Volume. Please see - * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\EvictVolumeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Volume. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Volume. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Volume. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetInstanceRequest.php deleted file mode 100644 index 7a98047a6e5c..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetInstanceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\GetInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetLunRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetLunRequest.php deleted file mode 100644 index 1b3818ef6068..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetLunRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.GetLunRequest - */ -class GetLunRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::lunName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\GetLunRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNetworkRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNetworkRequest.php deleted file mode 100644 index b176df8e0052..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNetworkRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.GetNetworkRequest - */ -class GetNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::networkName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\GetNetworkRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNfsShareRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNfsShareRequest.php deleted file mode 100644 index 95048183c5a2..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetNfsShareRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.GetNfsShareRequest - */ -class GetNfsShareRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::nFSShareName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\GetNfsShareRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetProvisioningConfigRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetProvisioningConfigRequest.php deleted file mode 100644 index 79256f54066f..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetProvisioningConfigRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest - */ -class GetProvisioningConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the ProvisioningConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the ProvisioningConfig. Please see - * {@see BareMetalSolutionClient::provisioningConfigName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\GetProvisioningConfigRequest - * - * @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. Name of the ProvisioningConfig. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the ProvisioningConfig. - * - * 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. Name of the ProvisioningConfig. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeRequest.php deleted file mode 100644 index 16d3f54aa0b8..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.GetVolumeRequest - */ -class GetVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\GetVolumeRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeSnapshotRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeSnapshotRequest.php deleted file mode 100644 index 49af9dcb744f..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/GetVolumeSnapshotRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest - */ -class GetVolumeSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the snapshot. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the snapshot. Please see - * {@see BareMetalSolutionClient::volumeSnapshotName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\GetVolumeSnapshotRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the snapshot. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the snapshot. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the snapshot. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance.php deleted file mode 100644 index 85e0e58624a5..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance.php +++ /dev/null @@ -1,779 +0,0 @@ -google.cloud.baremetalsolution.v2.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of this `Instance`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. An identifier for the `Instance`, generated by the backend. - * - * Generated from protobuf field string id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * Output only. Create a time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Update a time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Immutable. The server type. - * [Available server - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field string machine_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $machine_type = ''; - /** - * Output only. The state of the server. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * True if you enable hyperthreading for the server, otherwise false. - * The default value is false. - * - * Generated from protobuf field bool hyperthreading_enabled = 6; - */ - protected $hyperthreading_enabled = false; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 7; - */ - private $labels; - /** - * Immutable. List of LUNs associated with this server. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 8 [(.google.api.field_behavior) = IMMUTABLE]; - */ - private $luns; - /** - * Input only. List of Volumes to attach to this Instance on creation. - * This field won't be populated in Get/List responses. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 16 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - private $volumes; - /** - * Output only. List of networks associated with this server. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $networks; - /** - * Output only. True if the interactive serial console feature is enabled for - * the instance, false otherwise. The default value is false. - * - * Generated from protobuf field bool interactive_serial_console_enabled = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $interactive_serial_console_enabled = false; - /** - * The OS image currently installed on the server. - * - * Generated from protobuf field string os_image = 12; - */ - protected $os_image = ''; - /** - * Immutable. Pod name. - * Pod is an independent part of infrastructure. - * Instance can be connected to the assets (networks, volumes) allocated - * in the same pod only. - * - * Generated from protobuf field string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $pod = ''; - /** - * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. - * Generally, the template name follows the syntax of - * "bond" or "nic". - * - * Generated from protobuf field string network_template = 14 [(.google.api.resource_reference) = { - */ - protected $network_template = ''; - /** - * List of logical interfaces for the instance. The number of logical - * interfaces will be the same as number of hardware bond/nic on the chosen - * network template. For the non-multivlan configurations (for eg, existing - * servers) that use existing default network template (bondaa-bondaa), both - * the Instance.networks field and the Instance.logical_interfaces fields will - * be filled to ensure backward compatibility. For the others, only - * Instance.logical_interfaces will be filled. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; - */ - private $logical_interfaces; - /** - * Output only. Text field about info for logging in. - * - * Generated from protobuf field string login_info = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $login_info = ''; - /** - * The workload profile for the instance. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18; - */ - protected $workload_profile = 0; - /** - * Output only. The firmware version for the instance. - * - * Generated from protobuf field string firmware_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $firmware_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of this `Instance`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * @type string $id - * Output only. An identifier for the `Instance`, generated by the backend. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create a time stamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Update a time stamp. - * @type string $machine_type - * Immutable. The server type. - * [Available server - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * @type int $state - * Output only. The state of the server. - * @type bool $hyperthreading_enabled - * True if you enable hyperthreading for the server, otherwise false. - * The default value is false. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type array<\Google\Cloud\BareMetalSolution\V2\Lun>|\Google\Protobuf\Internal\RepeatedField $luns - * Immutable. List of LUNs associated with this server. - * @type array<\Google\Cloud\BareMetalSolution\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * Input only. List of Volumes to attach to this Instance on creation. - * This field won't be populated in Get/List responses. - * @type array<\Google\Cloud\BareMetalSolution\V2\Network>|\Google\Protobuf\Internal\RepeatedField $networks - * Output only. List of networks associated with this server. - * @type bool $interactive_serial_console_enabled - * Output only. True if the interactive serial console feature is enabled for - * the instance, false otherwise. The default value is false. - * @type string $os_image - * The OS image currently installed on the server. - * @type string $pod - * Immutable. Pod name. - * Pod is an independent part of infrastructure. - * Instance can be connected to the assets (networks, volumes) allocated - * in the same pod only. - * @type string $network_template - * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. - * Generally, the template name follows the syntax of - * "bond" or "nic". - * @type array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $logical_interfaces - * List of logical interfaces for the instance. The number of logical - * interfaces will be the same as number of hardware bond/nic on the chosen - * network template. For the non-multivlan configurations (for eg, existing - * servers) that use existing default network template (bondaa-bondaa), both - * the Instance.networks field and the Instance.logical_interfaces fields will - * be filled to ensure backward compatibility. For the others, only - * Instance.logical_interfaces will be filled. - * @type string $login_info - * Output only. Text field about info for logging in. - * @type int $workload_profile - * The workload profile for the instance. - * @type string $firmware_version - * Output only. The firmware version for the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of this `Instance`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The resource name of this `Instance`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * - * 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; - } - - /** - * Output only. An identifier for the `Instance`, generated by the backend. - * - * Generated from protobuf field string id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. An identifier for the `Instance`, generated by the backend. - * - * Generated from protobuf field string id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Output only. Create a time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Create a time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Update a time stamp. - * - * 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. Update a time stamp. - * - * 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; - } - - /** - * Immutable. The server type. - * [Available server - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field string machine_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Immutable. The server type. - * [Available server - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field string machine_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Output only. The state of the server. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the server. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * True if you enable hyperthreading for the server, otherwise false. - * The default value is false. - * - * Generated from protobuf field bool hyperthreading_enabled = 6; - * @return bool - */ - public function getHyperthreadingEnabled() - { - return $this->hyperthreading_enabled; - } - - /** - * True if you enable hyperthreading for the server, otherwise false. - * The default value is false. - * - * Generated from protobuf field bool hyperthreading_enabled = 6; - * @param bool $var - * @return $this - */ - public function setHyperthreadingEnabled($var) - { - GPBUtil::checkBool($var); - $this->hyperthreading_enabled = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 7; - * @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; - } - - /** - * Immutable. List of LUNs associated with this server. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 8 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLuns() - { - return $this->luns; - } - - /** - * Immutable. List of LUNs associated with this server. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 8 [(.google.api.field_behavior) = IMMUTABLE]; - * @param array<\Google\Cloud\BareMetalSolution\V2\Lun>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLuns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Lun::class); - $this->luns = $arr; - - return $this; - } - - /** - * Input only. List of Volumes to attach to this Instance on creation. - * This field won't be populated in Get/List responses. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 16 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * Input only. List of Volumes to attach to this Instance on creation. - * This field won't be populated in Get/List responses. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 16 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param array<\Google\Cloud\BareMetalSolution\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * Output only. List of networks associated with this server. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworks() - { - return $this->networks; - } - - /** - * Output only. List of networks associated with this server. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\BareMetalSolution\V2\Network>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Network::class); - $this->networks = $arr; - - return $this; - } - - /** - * Output only. True if the interactive serial console feature is enabled for - * the instance, false otherwise. The default value is false. - * - * Generated from protobuf field bool interactive_serial_console_enabled = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getInteractiveSerialConsoleEnabled() - { - return $this->interactive_serial_console_enabled; - } - - /** - * Output only. True if the interactive serial console feature is enabled for - * the instance, false otherwise. The default value is false. - * - * Generated from protobuf field bool interactive_serial_console_enabled = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setInteractiveSerialConsoleEnabled($var) - { - GPBUtil::checkBool($var); - $this->interactive_serial_console_enabled = $var; - - return $this; - } - - /** - * The OS image currently installed on the server. - * - * Generated from protobuf field string os_image = 12; - * @return string - */ - public function getOsImage() - { - return $this->os_image; - } - - /** - * The OS image currently installed on the server. - * - * Generated from protobuf field string os_image = 12; - * @param string $var - * @return $this - */ - public function setOsImage($var) - { - GPBUtil::checkString($var, True); - $this->os_image = $var; - - return $this; - } - - /** - * Immutable. Pod name. - * Pod is an independent part of infrastructure. - * Instance can be connected to the assets (networks, volumes) allocated - * in the same pod only. - * - * Generated from protobuf field string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getPod() - { - return $this->pod; - } - - /** - * Immutable. Pod name. - * Pod is an independent part of infrastructure. - * Instance can be connected to the assets (networks, volumes) allocated - * in the same pod only. - * - * Generated from protobuf field string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setPod($var) - { - GPBUtil::checkString($var, True); - $this->pod = $var; - - return $this; - } - - /** - * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. - * Generally, the template name follows the syntax of - * "bond" or "nic". - * - * Generated from protobuf field string network_template = 14 [(.google.api.resource_reference) = { - * @return string - */ - public function getNetworkTemplate() - { - return $this->network_template; - } - - /** - * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. - * Generally, the template name follows the syntax of - * "bond" or "nic". - * - * Generated from protobuf field string network_template = 14 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetworkTemplate($var) - { - GPBUtil::checkString($var, True); - $this->network_template = $var; - - return $this; - } - - /** - * List of logical interfaces for the instance. The number of logical - * interfaces will be the same as number of hardware bond/nic on the chosen - * network template. For the non-multivlan configurations (for eg, existing - * servers) that use existing default network template (bondaa-bondaa), both - * the Instance.networks field and the Instance.logical_interfaces fields will - * be filled to ensure backward compatibility. For the others, only - * Instance.logical_interfaces will be filled. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogicalInterfaces() - { - return $this->logical_interfaces; - } - - /** - * List of logical interfaces for the instance. The number of logical - * interfaces will be the same as number of hardware bond/nic on the chosen - * network template. For the non-multivlan configurations (for eg, existing - * servers) that use existing default network template (bondaa-bondaa), both - * the Instance.networks field and the Instance.logical_interfaces fields will - * be filled to ensure backward compatibility. For the others, only - * Instance.logical_interfaces will be filled. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; - * @param array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogicalInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\LogicalInterface::class); - $this->logical_interfaces = $arr; - - return $this; - } - - /** - * Output only. Text field about info for logging in. - * - * Generated from protobuf field string login_info = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLoginInfo() - { - return $this->login_info; - } - - /** - * Output only. Text field about info for logging in. - * - * Generated from protobuf field string login_info = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLoginInfo($var) - { - GPBUtil::checkString($var, True); - $this->login_info = $var; - - return $this; - } - - /** - * The workload profile for the instance. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18; - * @return int - */ - public function getWorkloadProfile() - { - return $this->workload_profile; - } - - /** - * The workload profile for the instance. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18; - * @param int $var - * @return $this - */ - public function setWorkloadProfile($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\WorkloadProfile::class); - $this->workload_profile = $var; - - return $this; - } - - /** - * Output only. The firmware version for the instance. - * - * Generated from protobuf field string firmware_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFirmwareVersion() - { - return $this->firmware_version; - } - - /** - * Output only. The firmware version for the instance. - * - * Generated from protobuf field string firmware_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFirmwareVersion($var) - { - GPBUtil::checkString($var, True); - $this->firmware_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance/State.php deleted file mode 100644 index 9a746059a3d8..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Instance/State.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.baremetalsolution.v2.Instance.State - */ -class State -{ - /** - * The server is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The server is being provisioned. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The server is running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The server has been deleted. - * - * Generated from protobuf enum DELETED = 3; - */ - const DELETED = 3; - /** - * The server is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * The server is starting. - * - * Generated from protobuf enum STARTING = 5; - */ - const STARTING = 5; - /** - * The server is stopping. - * - * Generated from protobuf enum STOPPING = 6; - */ - const STOPPING = 6; - /** - * The server is shutdown. - * - * Generated from protobuf enum SHUTDOWN = 7; - */ - const SHUTDOWN = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::DELETED => 'DELETED', - self::UPDATING => 'UPDATING', - self::STARTING => 'STARTING', - self::STOPPING => 'STOPPING', - self::SHUTDOWN => 'SHUTDOWN', - ]; - - 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\BareMetalSolution\V2\Instance_State::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig.php deleted file mode 100644 index 1e77b13cf9bf..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig.php +++ /dev/null @@ -1,549 +0,0 @@ -google.cloud.baremetalsolution.v2.InstanceConfig - */ -class InstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the instance config. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * A transient unique identifier to idenfity an instance within an - * ProvisioningConfig request. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - /** - * Instance type. - * [Available - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field string instance_type = 3; - */ - protected $instance_type = ''; - /** - * Whether the instance should be provisioned with Hyperthreading enabled. - * - * Generated from protobuf field bool hyperthreading = 4; - */ - protected $hyperthreading = false; - /** - * OS image to initialize the instance. - * [Available - * images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field string os_image = 5; - */ - protected $os_image = ''; - /** - * Client network address. Filled if InstanceConfig.multivlan_config is false. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true]; - * @deprecated - */ - protected $client_network = null; - /** - * Private network address, if any. Filled if InstanceConfig.multivlan_config - * is false. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true]; - * @deprecated - */ - protected $private_network = null; - /** - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * - * Generated from protobuf field string user_note = 8; - */ - protected $user_note = ''; - /** - * If true networks can be from different projects of the same vendor account. - * - * Generated from protobuf field bool account_networks_enabled = 9; - */ - protected $account_networks_enabled = false; - /** - * The type of network configuration on the instance. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10; - */ - protected $network_config = 0; - /** - * Server network template name. Filled if InstanceConfig.multivlan_config is - * true. - * - * Generated from protobuf field string network_template = 11; - */ - protected $network_template = ''; - /** - * List of logical interfaces for the instance. The number of logical - * interfaces will be the same as number of hardware bond/nic on the chosen - * network template. Filled if InstanceConfig.multivlan_config is true. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12; - */ - private $logical_interfaces; - /** - * List of names of ssh keys used to provision the instance. - * - * Generated from protobuf field repeated string ssh_key_names = 13; - */ - private $ssh_key_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the instance config. - * @type string $id - * A transient unique identifier to idenfity an instance within an - * ProvisioningConfig request. - * @type string $instance_type - * Instance type. - * [Available - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * @type bool $hyperthreading - * Whether the instance should be provisioned with Hyperthreading enabled. - * @type string $os_image - * OS image to initialize the instance. - * [Available - * images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * @type \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress $client_network - * Client network address. Filled if InstanceConfig.multivlan_config is false. - * @type \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress $private_network - * Private network address, if any. Filled if InstanceConfig.multivlan_config - * is false. - * @type string $user_note - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * @type bool $account_networks_enabled - * If true networks can be from different projects of the same vendor account. - * @type int $network_config - * The type of network configuration on the instance. - * @type string $network_template - * Server network template name. Filled if InstanceConfig.multivlan_config is - * true. - * @type array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $logical_interfaces - * List of logical interfaces for the instance. The number of logical - * interfaces will be the same as number of hardware bond/nic on the chosen - * network template. Filled if InstanceConfig.multivlan_config is true. - * @type array|\Google\Protobuf\Internal\RepeatedField $ssh_key_names - * List of names of ssh keys used to provision the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the instance config. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the instance config. - * - * 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; - } - - /** - * A transient unique identifier to idenfity an instance within an - * ProvisioningConfig request. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * A transient unique identifier to idenfity an instance within an - * ProvisioningConfig request. - * - * Generated from protobuf field string id = 2; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Instance type. - * [Available - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field string instance_type = 3; - * @return string - */ - public function getInstanceType() - { - return $this->instance_type; - } - - /** - * Instance type. - * [Available - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field string instance_type = 3; - * @param string $var - * @return $this - */ - public function setInstanceType($var) - { - GPBUtil::checkString($var, True); - $this->instance_type = $var; - - return $this; - } - - /** - * Whether the instance should be provisioned with Hyperthreading enabled. - * - * Generated from protobuf field bool hyperthreading = 4; - * @return bool - */ - public function getHyperthreading() - { - return $this->hyperthreading; - } - - /** - * Whether the instance should be provisioned with Hyperthreading enabled. - * - * Generated from protobuf field bool hyperthreading = 4; - * @param bool $var - * @return $this - */ - public function setHyperthreading($var) - { - GPBUtil::checkBool($var); - $this->hyperthreading = $var; - - return $this; - } - - /** - * OS image to initialize the instance. - * [Available - * images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field string os_image = 5; - * @return string - */ - public function getOsImage() - { - return $this->os_image; - } - - /** - * OS image to initialize the instance. - * [Available - * images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field string os_image = 5; - * @param string $var - * @return $this - */ - public function setOsImage($var) - { - GPBUtil::checkString($var, True); - $this->os_image = $var; - - return $this; - } - - /** - * Client network address. Filled if InstanceConfig.multivlan_config is false. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true]; - * @return \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress|null - * @deprecated - */ - public function getClientNetwork() - { - @trigger_error('client_network is deprecated.', E_USER_DEPRECATED); - return $this->client_network; - } - - public function hasClientNetwork() - { - @trigger_error('client_network is deprecated.', E_USER_DEPRECATED); - return isset($this->client_network); - } - - public function clearClientNetwork() - { - @trigger_error('client_network is deprecated.', E_USER_DEPRECATED); - unset($this->client_network); - } - - /** - * Client network address. Filled if InstanceConfig.multivlan_config is false. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true]; - * @param \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress $var - * @return $this - * @deprecated - */ - public function setClientNetwork($var) - { - @trigger_error('client_network is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress::class); - $this->client_network = $var; - - return $this; - } - - /** - * Private network address, if any. Filled if InstanceConfig.multivlan_config - * is false. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true]; - * @return \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress|null - * @deprecated - */ - public function getPrivateNetwork() - { - @trigger_error('private_network is deprecated.', E_USER_DEPRECATED); - return $this->private_network; - } - - public function hasPrivateNetwork() - { - @trigger_error('private_network is deprecated.', E_USER_DEPRECATED); - return isset($this->private_network); - } - - public function clearPrivateNetwork() - { - @trigger_error('private_network is deprecated.', E_USER_DEPRECATED); - unset($this->private_network); - } - - /** - * Private network address, if any. Filled if InstanceConfig.multivlan_config - * is false. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true]; - * @param \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress $var - * @return $this - * @deprecated - */ - public function setPrivateNetwork($var) - { - @trigger_error('private_network is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkAddress::class); - $this->private_network = $var; - - return $this; - } - - /** - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * - * Generated from protobuf field string user_note = 8; - * @return string - */ - public function getUserNote() - { - return $this->user_note; - } - - /** - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * - * Generated from protobuf field string user_note = 8; - * @param string $var - * @return $this - */ - public function setUserNote($var) - { - GPBUtil::checkString($var, True); - $this->user_note = $var; - - return $this; - } - - /** - * If true networks can be from different projects of the same vendor account. - * - * Generated from protobuf field bool account_networks_enabled = 9; - * @return bool - */ - public function getAccountNetworksEnabled() - { - return $this->account_networks_enabled; - } - - /** - * If true networks can be from different projects of the same vendor account. - * - * Generated from protobuf field bool account_networks_enabled = 9; - * @param bool $var - * @return $this - */ - public function setAccountNetworksEnabled($var) - { - GPBUtil::checkBool($var); - $this->account_networks_enabled = $var; - - return $this; - } - - /** - * The type of network configuration on the instance. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10; - * @return int - */ - public function getNetworkConfig() - { - return $this->network_config; - } - - /** - * The type of network configuration on the instance. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10; - * @param int $var - * @return $this - */ - public function setNetworkConfig($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\InstanceConfig\NetworkConfig::class); - $this->network_config = $var; - - return $this; - } - - /** - * Server network template name. Filled if InstanceConfig.multivlan_config is - * true. - * - * Generated from protobuf field string network_template = 11; - * @return string - */ - public function getNetworkTemplate() - { - return $this->network_template; - } - - /** - * Server network template name. Filled if InstanceConfig.multivlan_config is - * true. - * - * Generated from protobuf field string network_template = 11; - * @param string $var - * @return $this - */ - public function setNetworkTemplate($var) - { - GPBUtil::checkString($var, True); - $this->network_template = $var; - - return $this; - } - - /** - * List of logical interfaces for the instance. The number of logical - * interfaces will be the same as number of hardware bond/nic on the chosen - * network template. Filled if InstanceConfig.multivlan_config is true. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogicalInterfaces() - { - return $this->logical_interfaces; - } - - /** - * List of logical interfaces for the instance. The number of logical - * interfaces will be the same as number of hardware bond/nic on the chosen - * network template. Filled if InstanceConfig.multivlan_config is true. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12; - * @param array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogicalInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\LogicalInterface::class); - $this->logical_interfaces = $arr; - - return $this; - } - - /** - * List of names of ssh keys used to provision the instance. - * - * Generated from protobuf field repeated string ssh_key_names = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSshKeyNames() - { - return $this->ssh_key_names; - } - - /** - * List of names of ssh keys used to provision the instance. - * - * Generated from protobuf field repeated string ssh_key_names = 13; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSshKeyNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ssh_key_names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkAddress.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkAddress.php deleted file mode 100644 index 7ab49c50498c..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkAddress.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress - */ -class NetworkAddress extends \Google\Protobuf\Internal\Message -{ - /** - * Id of the network to use, within the same ProvisioningConfig request. - * - * Generated from protobuf field string network_id = 1; - */ - protected $network_id = ''; - /** - * IPv4 address to be assigned to the server. - * - * Generated from protobuf field string address = 2; - */ - protected $address = ''; - /** - * Name of the existing network to use. - * - * Generated from protobuf field string existing_network_id = 3; - */ - protected $existing_network_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_id - * Id of the network to use, within the same ProvisioningConfig request. - * @type string $address - * IPv4 address to be assigned to the server. - * @type string $existing_network_id - * Name of the existing network to use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Id of the network to use, within the same ProvisioningConfig request. - * - * Generated from protobuf field string network_id = 1; - * @return string - */ - public function getNetworkId() - { - return $this->network_id; - } - - /** - * Id of the network to use, within the same ProvisioningConfig request. - * - * Generated from protobuf field string network_id = 1; - * @param string $var - * @return $this - */ - public function setNetworkId($var) - { - GPBUtil::checkString($var, True); - $this->network_id = $var; - - return $this; - } - - /** - * IPv4 address to be assigned to the server. - * - * Generated from protobuf field string address = 2; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * IPv4 address to be assigned to the server. - * - * Generated from protobuf field string address = 2; - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * Name of the existing network to use. - * - * Generated from protobuf field string existing_network_id = 3; - * @return string - */ - public function getExistingNetworkId() - { - return $this->existing_network_id; - } - - /** - * Name of the existing network to use. - * - * Generated from protobuf field string existing_network_id = 3; - * @param string $var - * @return $this - */ - public function setExistingNetworkId($var) - { - GPBUtil::checkString($var, True); - $this->existing_network_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkAddress::class, \Google\Cloud\BareMetalSolution\V2\InstanceConfig_NetworkAddress::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkConfig.php deleted file mode 100644 index 30f7aa107cdd..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceConfig/NetworkConfig.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig - */ -class NetworkConfig -{ - /** - * The unspecified network configuration. - * - * Generated from protobuf enum NETWORKCONFIG_UNSPECIFIED = 0; - */ - const NETWORKCONFIG_UNSPECIFIED = 0; - /** - * Instance part of single client network and single private network. - * - * Generated from protobuf enum SINGLE_VLAN = 1; - */ - const SINGLE_VLAN = 1; - /** - * Instance part of multiple (or single) client networks and private - * networks. - * - * Generated from protobuf enum MULTI_VLAN = 2; - */ - const MULTI_VLAN = 2; - - private static $valueToName = [ - self::NETWORKCONFIG_UNSPECIFIED => 'NETWORKCONFIG_UNSPECIFIED', - self::SINGLE_VLAN => 'SINGLE_VLAN', - self::MULTI_VLAN => 'MULTI_VLAN', - ]; - - 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(NetworkConfig::class, \Google\Cloud\BareMetalSolution\V2\InstanceConfig_NetworkConfig::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceQuota.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceQuota.php deleted file mode 100644 index 21db20745c70..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/InstanceQuota.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.baremetalsolution.v2.InstanceQuota - */ -class InstanceQuota extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the instance quota. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Instance type. - * Deprecated: use gcp_service. - * - * Generated from protobuf field string instance_type = 2 [deprecated = true]; - * @deprecated - */ - protected $instance_type = ''; - /** - * The gcp service of the provisioning quota. - * - * Generated from protobuf field string gcp_service = 5; - */ - protected $gcp_service = ''; - /** - * Location where the quota applies. - * - * Generated from protobuf field string location = 3; - */ - protected $location = ''; - /** - * Number of machines than can be created for the given location and - * instance_type. - * - * Generated from protobuf field int32 available_machine_count = 4; - */ - protected $available_machine_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the instance quota. - * @type string $instance_type - * Instance type. - * Deprecated: use gcp_service. - * @type string $gcp_service - * The gcp service of the provisioning quota. - * @type string $location - * Location where the quota applies. - * @type int $available_machine_count - * Number of machines than can be created for the given location and - * instance_type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the instance quota. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the instance quota. - * - * 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; - } - - /** - * Instance type. - * Deprecated: use gcp_service. - * - * Generated from protobuf field string instance_type = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getInstanceType() - { - @trigger_error('instance_type is deprecated.', E_USER_DEPRECATED); - return $this->instance_type; - } - - /** - * Instance type. - * Deprecated: use gcp_service. - * - * Generated from protobuf field string instance_type = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setInstanceType($var) - { - @trigger_error('instance_type is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->instance_type = $var; - - return $this; - } - - /** - * The gcp service of the provisioning quota. - * - * Generated from protobuf field string gcp_service = 5; - * @return string - */ - public function getGcpService() - { - return $this->gcp_service; - } - - /** - * The gcp service of the provisioning quota. - * - * Generated from protobuf field string gcp_service = 5; - * @param string $var - * @return $this - */ - public function setGcpService($var) - { - GPBUtil::checkString($var, True); - $this->gcp_service = $var; - - return $this; - } - - /** - * Location where the quota applies. - * - * Generated from protobuf field string location = 3; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location where the quota applies. - * - * Generated from protobuf field string location = 3; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Number of machines than can be created for the given location and - * instance_type. - * - * Generated from protobuf field int32 available_machine_count = 4; - * @return int - */ - public function getAvailableMachineCount() - { - return $this->available_machine_count; - } - - /** - * Number of machines than can be created for the given location and - * instance_type. - * - * Generated from protobuf field int32 available_machine_count = 4; - * @param int $var - * @return $this - */ - public function setAvailableMachineCount($var) - { - GPBUtil::checkInt32($var); - $this->available_machine_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesRequest.php deleted file mode 100644 index b8df2634e290..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.baremetalsolution.v2.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListInstancesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Parent value for ListInstancesRequest. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListInstancesRequest - * - * @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. Parent value for ListInstancesRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results from the server. - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListInstancesRequest. - * - * 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. Parent value for ListInstancesRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesResponse.php deleted file mode 100644 index 7bc39330cdee..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListInstancesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.baremetalsolution.v2.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of servers. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Instance instances = 1; - */ - private $instances; - /** - * A token identifying a page of results from the server. - * - * 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\BareMetalSolution\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * The list of servers. - * @type string $next_page_token - * A token identifying a page of results from the server. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The list of servers. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * The list of servers. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Instance instances = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results from the server. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsRequest.php deleted file mode 100644 index 46a9980f6ad5..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.baremetalsolution.v2.ListLunsRequest - */ -class ListLunsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListLunsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent value for ListLunsRequest. Please see - * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListLunsRequest - * - * @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. Parent value for ListLunsRequest. - * @type int $page_size - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results from the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListLunsRequest. - * - * 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. Parent value for ListLunsRequest. - * - * 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; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsResponse.php deleted file mode 100644 index c15be31a1acd..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListLunsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.baremetalsolution.v2.ListLunsResponse - */ -class ListLunsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of luns. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 1; - */ - private $luns; - /** - * A token identifying a page of results from the server. - * - * 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\BareMetalSolution\V2\Lun>|\Google\Protobuf\Internal\RepeatedField $luns - * The list of luns. - * @type string $next_page_token - * A token identifying a page of results from the server. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); - parent::__construct($data); - } - - /** - * The list of luns. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLuns() - { - return $this->luns; - } - - /** - * The list of luns. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Lun luns = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\Lun>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLuns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Lun::class); - $this->luns = $arr; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results from the server. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageRequest.php deleted file mode 100644 index 6c9b2360d478..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.ListNetworkUsageRequest - */ -class ListNetworkUsageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value (project and location). - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $location = ''; - - /** - * @param string $location Required. Parent value (project and location). Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListNetworkUsageRequest - * - * @experimental - */ - public static function build(string $location): self - { - return (new self()) - ->setLocation($location); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * Required. Parent value (project and location). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value (project and location). - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. Parent value (project and location). - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageResponse.php deleted file mode 100644 index 322b3281df57..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworkUsageResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.baremetalsolution.v2.ListNetworkUsageResponse - */ -class ListNetworkUsageResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Networks with IPs. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; - */ - private $networks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkUsage>|\Google\Protobuf\Internal\RepeatedField $networks - * Networks with IPs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Networks with IPs. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworks() - { - return $this->networks; - } - - /** - * Networks with IPs. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkUsage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkUsage::class); - $this->networks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksRequest.php deleted file mode 100644 index 83913f7e5766..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.baremetalsolution.v2.ListNetworksRequest - */ -class ListNetworksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListNetworksRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Parent value for ListNetworksRequest. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListNetworksRequest - * - * @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. Parent value for ListNetworksRequest. - * @type int $page_size - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results from the server. - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListNetworksRequest. - * - * 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. Parent value for ListNetworksRequest. - * - * 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; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksResponse.php deleted file mode 100644 index 864d99abb0ef..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNetworksResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.baremetalsolution.v2.ListNetworksResponse - */ -class ListNetworksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of networks. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 1; - */ - private $networks; - /** - * A token identifying a page of results from the server. - * - * 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\BareMetalSolution\V2\Network>|\Google\Protobuf\Internal\RepeatedField $networks - * The list of networks. - * @type string $next_page_token - * A token identifying a page of results from the server. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * The list of networks. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworks() - { - return $this->networks; - } - - /** - * The list of networks. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Network networks = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\Network>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Network::class); - $this->networks = $arr; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results from the server. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesRequest.php deleted file mode 100644 index cc06bdec66a2..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.baremetalsolution.v2.ListNfsSharesRequest - */ -class ListNfsSharesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListNfsSharesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Parent value for ListNfsSharesRequest. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListNfsSharesRequest - * - * @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. Parent value for ListNfsSharesRequest. - * @type int $page_size - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results from the server. - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListNfsSharesRequest. - * - * 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. Parent value for ListNfsSharesRequest. - * - * 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; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesResponse.php deleted file mode 100644 index 1af3d5e7c36c..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListNfsSharesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.baremetalsolution.v2.ListNfsSharesResponse - */ -class ListNfsSharesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of NFS shares. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; - */ - private $nfs_shares; - /** - * A token identifying a page of results from the server. - * - * 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\BareMetalSolution\V2\NfsShare>|\Google\Protobuf\Internal\RepeatedField $nfs_shares - * The list of NFS shares. - * @type string $next_page_token - * A token identifying a page of results from the server. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); - parent::__construct($data); - } - - /** - * The list of NFS shares. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNfsShares() - { - return $this->nfs_shares; - } - - /** - * The list of NFS shares. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\NfsShare>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNfsShares($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NfsShare::class); - $this->nfs_shares = $arr; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results from the server. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesRequest.php deleted file mode 100644 index 195fef9c9222..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.baremetalsolution.v2.ListOSImagesRequest - */ -class ListOSImagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListProvisioningQuotasRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * Notice that page_size field is not supported and won't be respected in - * the API request for now, will be updated when pagination is supported. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent value for ListProvisioningQuotasRequest. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListOSImagesRequest - * - * @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. Parent value for ListProvisioningQuotasRequest. - * @type int $page_size - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * Notice that page_size field is not supported and won't be respected in - * the API request for now, will be updated when pagination is supported. - * @type string $page_token - * A token identifying a page of results from the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Osimage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListProvisioningQuotasRequest. - * - * 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. Parent value for ListProvisioningQuotasRequest. - * - * 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; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * Notice that page_size field is not supported and won't be respected in - * the API request for now, will be updated when pagination is supported. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * Notice that page_size field is not supported and won't be respected in - * the API request for now, will be updated when pagination is supported. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesResponse.php deleted file mode 100644 index 92783d7acf49..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListOSImagesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.baremetalsolution.v2.ListOSImagesResponse - */ -class ListOSImagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The OS images available. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.OSImage os_images = 1; - */ - private $os_images; - /** - * 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\BareMetalSolution\V2\OSImage>|\Google\Protobuf\Internal\RepeatedField $os_images - * The OS images available. - * @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\Baremetalsolution\V2\Osimage::initOnce(); - parent::__construct($data); - } - - /** - * The OS images available. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.OSImage os_images = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOsImages() - { - return $this->os_images; - } - - /** - * The OS images available. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.OSImage os_images = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\OSImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOsImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\OSImage::class); - $this->os_images = $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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasRequest.php deleted file mode 100644 index ef418f0024c7..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest - */ -class ListProvisioningQuotasRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListProvisioningQuotasRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * Notice that page_size field is not supported and won't be respected in - * the API request for now, will be updated when pagination is supported. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent value for ListProvisioningQuotasRequest. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListProvisioningQuotasRequest - * - * @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. Parent value for ListProvisioningQuotasRequest. - * @type int $page_size - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * Notice that page_size field is not supported and won't be respected in - * the API request for now, will be updated when pagination is supported. - * @type string $page_token - * A token identifying a page of results from the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListProvisioningQuotasRequest. - * - * 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. Parent value for ListProvisioningQuotasRequest. - * - * 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; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * Notice that page_size field is not supported and won't be respected in - * the API request for now, will be updated when pagination is supported. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * Notice that page_size field is not supported and won't be respected in - * the API request for now, will be updated when pagination is supported. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasResponse.php deleted file mode 100644 index a470f6384160..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListProvisioningQuotasResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse - */ -class ListProvisioningQuotasResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The provisioning quotas registered in this project. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ProvisioningQuota provisioning_quotas = 1; - */ - private $provisioning_quotas; - /** - * 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\BareMetalSolution\V2\ProvisioningQuota>|\Google\Protobuf\Internal\RepeatedField $provisioning_quotas - * The provisioning quotas registered in this project. - * @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\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * The provisioning quotas registered in this project. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ProvisioningQuota provisioning_quotas = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProvisioningQuotas() - { - return $this->provisioning_quotas; - } - - /** - * The provisioning quotas registered in this project. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ProvisioningQuota provisioning_quotas = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\ProvisioningQuota>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProvisioningQuotas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\ProvisioningQuota::class); - $this->provisioning_quotas = $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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysRequest.php deleted file mode 100644 index 9903fca07cad..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.baremetalsolution.v2.ListSSHKeysRequest - */ -class ListSSHKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent containing the SSH keys. - * Currently, the only valid value for the location is "global". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent containing the SSH keys. - * Currently, the only valid value for the location is "global". Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListSSHKeysRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent containing the SSH keys. - * Currently, the only valid value for the location is "global". - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\SshKey::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent containing the SSH keys. - * Currently, the only valid value for the location is "global". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent containing the SSH keys. - * Currently, the only valid value for the location is "global". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysResponse.php deleted file mode 100644 index 149698e30a9c..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListSSHKeysResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.baremetalsolution.v2.ListSSHKeysResponse - */ -class ListSSHKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The SSH keys registered in the project. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.SSHKey ssh_keys = 1; - */ - private $ssh_keys; - /** - * 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 = 90; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BareMetalSolution\V2\SSHKey>|\Google\Protobuf\Internal\RepeatedField $ssh_keys - * The SSH keys registered in the project. - * @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\Baremetalsolution\V2\SshKey::initOnce(); - parent::__construct($data); - } - - /** - * The SSH keys registered in the project. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.SSHKey ssh_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSshKeys() - { - return $this->ssh_keys; - } - - /** - * The SSH keys registered in the project. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.SSHKey ssh_keys = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\SSHKey>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSshKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\SSHKey::class); - $this->ssh_keys = $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 = 90; - * @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 = 90; - * @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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsRequest.php deleted file mode 100644 index a867334d12c0..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest - */ -class ListVolumeSnapshotsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListVolumesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent value for ListVolumesRequest. Please see - * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListVolumeSnapshotsRequest - * - * @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. Parent value for ListVolumesRequest. - * @type int $page_size - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results from the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListVolumesRequest. - * - * 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. Parent value for ListVolumesRequest. - * - * 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; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsResponse.php deleted file mode 100644 index 0905ddc4a4e7..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumeSnapshotsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse - */ -class ListVolumeSnapshotsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of snapshots. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; - */ - private $volume_snapshots; - /** - * A token identifying a page of results from the server. - * - * 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\BareMetalSolution\V2\VolumeSnapshot>|\Google\Protobuf\Internal\RepeatedField $volume_snapshots - * The list of snapshots. - * @type string $next_page_token - * A token identifying a page of results from the server. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); - parent::__construct($data); - } - - /** - * The list of snapshots. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumeSnapshots() - { - return $this->volume_snapshots; - } - - /** - * The list of snapshots. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\VolumeSnapshot>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumeSnapshots($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot::class); - $this->volume_snapshots = $arr; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results from the server. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesRequest.php deleted file mode 100644 index cc4000006dcd..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.baremetalsolution.v2.ListVolumesRequest - */ -class ListVolumesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListVolumesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Parent value for ListVolumesRequest. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ListVolumesRequest - * - * @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. Parent value for ListVolumesRequest. - * @type int $page_size - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results from the server. - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListVolumesRequest. - * - * 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. Parent value for ListVolumesRequest. - * - * 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; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server might return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesResponse.php deleted file mode 100644 index c6df4005c656..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ListVolumesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.baremetalsolution.v2.ListVolumesResponse - */ -class ListVolumesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of storage volumes. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 1; - */ - private $volumes; - /** - * A token identifying a page of results from the server. - * - * 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\BareMetalSolution\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * The list of storage volumes. - * @type string $next_page_token - * A token identifying a page of results from the server. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); - parent::__construct($data); - } - - /** - * The list of storage volumes. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * The list of storage volumes. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.Volume volumes = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * A token identifying a page of results from the server. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results from the server. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface.php deleted file mode 100644 index b5f309a88f6c..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.baremetalsolution.v2.LogicalInterface - */ -class LogicalInterface extends \Google\Protobuf\Internal\Message -{ - /** - * List of logical network interfaces within a logical interface. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; - */ - private $logical_network_interfaces; - /** - * Interface name. This is of syntax or and - * forms part of the network template name. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * The index of the logical interface mapping to the index of the hardware - * bond or nic on the chosen network template. This field is deprecated. - * - * Generated from protobuf field int32 interface_index = 3 [deprecated = true]; - * @deprecated - */ - protected $interface_index = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface\LogicalNetworkInterface>|\Google\Protobuf\Internal\RepeatedField $logical_network_interfaces - * List of logical network interfaces within a logical interface. - * @type string $name - * Interface name. This is of syntax or and - * forms part of the network template name. - * @type int $interface_index - * The index of the logical interface mapping to the index of the hardware - * bond or nic on the chosen network template. This field is deprecated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * List of logical network interfaces within a logical interface. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogicalNetworkInterfaces() - { - return $this->logical_network_interfaces; - } - - /** - * List of logical network interfaces within a logical interface. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; - * @param array<\Google\Cloud\BareMetalSolution\V2\LogicalInterface\LogicalNetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogicalNetworkInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\LogicalInterface\LogicalNetworkInterface::class); - $this->logical_network_interfaces = $arr; - - return $this; - } - - /** - * Interface name. This is of syntax or and - * forms part of the network template name. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Interface name. This is of syntax or and - * forms part of the network template name. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The index of the logical interface mapping to the index of the hardware - * bond or nic on the chosen network template. This field is deprecated. - * - * Generated from protobuf field int32 interface_index = 3 [deprecated = true]; - * @return int - * @deprecated - */ - public function getInterfaceIndex() - { - @trigger_error('interface_index is deprecated.', E_USER_DEPRECATED); - return $this->interface_index; - } - - /** - * The index of the logical interface mapping to the index of the hardware - * bond or nic on the chosen network template. This field is deprecated. - * - * Generated from protobuf field int32 interface_index = 3 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setInterfaceIndex($var) - { - @trigger_error('interface_index is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt32($var); - $this->interface_index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface/LogicalNetworkInterface.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface/LogicalNetworkInterface.php deleted file mode 100644 index f4de9eae30d7..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/LogicalInterface/LogicalNetworkInterface.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface - */ -class LogicalNetworkInterface extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the network - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * IP address in the network - * - * Generated from protobuf field string ip_address = 2; - */ - protected $ip_address = ''; - /** - * Whether this interface is the default gateway for the instance. Only - * one interface can be the default gateway for the instance. - * - * Generated from protobuf field bool default_gateway = 3; - */ - protected $default_gateway = false; - /** - * Type of network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; - */ - protected $network_type = 0; - /** - * An identifier for the `Network`, generated by the backend. - * - * Generated from protobuf field string id = 5; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Name of the network - * @type string $ip_address - * IP address in the network - * @type bool $default_gateway - * Whether this interface is the default gateway for the instance. Only - * one interface can be the default gateway for the instance. - * @type int $network_type - * Type of network. - * @type string $id - * An identifier for the `Network`, generated by the backend. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Name of the network - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Name of the network - * - * Generated from protobuf field string network = 1; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * IP address in the network - * - * Generated from protobuf field string ip_address = 2; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address in the network - * - * Generated from protobuf field string ip_address = 2; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * Whether this interface is the default gateway for the instance. Only - * one interface can be the default gateway for the instance. - * - * Generated from protobuf field bool default_gateway = 3; - * @return bool - */ - public function getDefaultGateway() - { - return $this->default_gateway; - } - - /** - * Whether this interface is the default gateway for the instance. Only - * one interface can be the default gateway for the instance. - * - * Generated from protobuf field bool default_gateway = 3; - * @param bool $var - * @return $this - */ - public function setDefaultGateway($var) - { - GPBUtil::checkBool($var); - $this->default_gateway = $var; - - return $this; - } - - /** - * Type of network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; - * @return int - */ - public function getNetworkType() - { - return $this->network_type; - } - - /** - * Type of network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; - * @param int $var - * @return $this - */ - public function setNetworkType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Network\Type::class); - $this->network_type = $var; - - return $this; - } - - /** - * An identifier for the `Network`, generated by the backend. - * - * Generated from protobuf field string id = 5; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * An identifier for the `Network`, generated by the backend. - * - * Generated from protobuf field string id = 5; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LogicalNetworkInterface::class, \Google\Cloud\BareMetalSolution\V2\LogicalInterface_LogicalNetworkInterface::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun.php deleted file mode 100644 index d7d50ce6f8ba..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun.php +++ /dev/null @@ -1,459 +0,0 @@ -google.cloud.baremetalsolution.v2.Lun - */ -class Lun extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the LUN. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * An identifier for the LUN, generated by the backend. - * - * Generated from protobuf field string id = 10; - */ - protected $id = ''; - /** - * The state of this storage volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.State state = 2; - */ - protected $state = 0; - /** - * The size of this LUN, in gigabytes. - * - * Generated from protobuf field int64 size_gb = 3; - */ - protected $size_gb = 0; - /** - * The LUN multiprotocol type ensures the characteristics of the LUN are - * optimized for each operating system. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4; - */ - protected $multiprotocol_type = 0; - /** - * Display the storage volume for this LUN. - * - * Generated from protobuf field string storage_volume = 5 [(.google.api.resource_reference) = { - */ - protected $storage_volume = ''; - /** - * Display if this LUN can be shared between multiple physical servers. - * - * Generated from protobuf field bool shareable = 6; - */ - protected $shareable = false; - /** - * Display if this LUN is a boot LUN. - * - * Generated from protobuf field bool boot_lun = 7; - */ - protected $boot_lun = false; - /** - * The storage type for this LUN. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8; - */ - protected $storage_type = 0; - /** - * The WWID for this LUN. - * - * Generated from protobuf field string wwid = 9; - */ - protected $wwid = ''; - /** - * Output only. Time after which LUN will be fully deleted. - * It is filled only for LUNs in COOL_OFF state. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. Instances this Lun is attached to. - * - * Generated from protobuf field repeated string instances = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $instances; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the LUN. - * @type string $id - * An identifier for the LUN, generated by the backend. - * @type int $state - * The state of this storage volume. - * @type int|string $size_gb - * The size of this LUN, in gigabytes. - * @type int $multiprotocol_type - * The LUN multiprotocol type ensures the characteristics of the LUN are - * optimized for each operating system. - * @type string $storage_volume - * Display the storage volume for this LUN. - * @type bool $shareable - * Display if this LUN can be shared between multiple physical servers. - * @type bool $boot_lun - * Display if this LUN is a boot LUN. - * @type int $storage_type - * The storage type for this LUN. - * @type string $wwid - * The WWID for this LUN. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. Time after which LUN will be fully deleted. - * It is filled only for LUNs in COOL_OFF state. - * @type array|\Google\Protobuf\Internal\RepeatedField $instances - * Output only. Instances this Lun is attached to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Lun::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the LUN. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the LUN. - * - * 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; - } - - /** - * An identifier for the LUN, generated by the backend. - * - * Generated from protobuf field string id = 10; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * An identifier for the LUN, generated by the backend. - * - * Generated from protobuf field string id = 10; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The state of this storage volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of this storage volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Lun\State::class); - $this->state = $var; - - return $this; - } - - /** - * The size of this LUN, in gigabytes. - * - * Generated from protobuf field int64 size_gb = 3; - * @return int|string - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * The size of this LUN, in gigabytes. - * - * Generated from protobuf field int64 size_gb = 3; - * @param int|string $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->size_gb = $var; - - return $this; - } - - /** - * The LUN multiprotocol type ensures the characteristics of the LUN are - * optimized for each operating system. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4; - * @return int - */ - public function getMultiprotocolType() - { - return $this->multiprotocol_type; - } - - /** - * The LUN multiprotocol type ensures the characteristics of the LUN are - * optimized for each operating system. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4; - * @param int $var - * @return $this - */ - public function setMultiprotocolType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Lun\MultiprotocolType::class); - $this->multiprotocol_type = $var; - - return $this; - } - - /** - * Display the storage volume for this LUN. - * - * Generated from protobuf field string storage_volume = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getStorageVolume() - { - return $this->storage_volume; - } - - /** - * Display the storage volume for this LUN. - * - * Generated from protobuf field string storage_volume = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStorageVolume($var) - { - GPBUtil::checkString($var, True); - $this->storage_volume = $var; - - return $this; - } - - /** - * Display if this LUN can be shared between multiple physical servers. - * - * Generated from protobuf field bool shareable = 6; - * @return bool - */ - public function getShareable() - { - return $this->shareable; - } - - /** - * Display if this LUN can be shared between multiple physical servers. - * - * Generated from protobuf field bool shareable = 6; - * @param bool $var - * @return $this - */ - public function setShareable($var) - { - GPBUtil::checkBool($var); - $this->shareable = $var; - - return $this; - } - - /** - * Display if this LUN is a boot LUN. - * - * Generated from protobuf field bool boot_lun = 7; - * @return bool - */ - public function getBootLun() - { - return $this->boot_lun; - } - - /** - * Display if this LUN is a boot LUN. - * - * Generated from protobuf field bool boot_lun = 7; - * @param bool $var - * @return $this - */ - public function setBootLun($var) - { - GPBUtil::checkBool($var); - $this->boot_lun = $var; - - return $this; - } - - /** - * The storage type for this LUN. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8; - * @return int - */ - public function getStorageType() - { - return $this->storage_type; - } - - /** - * The storage type for this LUN. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8; - * @param int $var - * @return $this - */ - public function setStorageType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Lun\StorageType::class); - $this->storage_type = $var; - - return $this; - } - - /** - * The WWID for this LUN. - * - * Generated from protobuf field string wwid = 9; - * @return string - */ - public function getWwid() - { - return $this->wwid; - } - - /** - * The WWID for this LUN. - * - * Generated from protobuf field string wwid = 9; - * @param string $var - * @return $this - */ - public function setWwid($var) - { - GPBUtil::checkString($var, True); - $this->wwid = $var; - - return $this; - } - - /** - * Output only. Time after which LUN will be fully deleted. - * It is filled only for LUNs in COOL_OFF state. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. Time after which LUN will be fully deleted. - * It is filled only for LUNs in COOL_OFF state. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. Instances this Lun is attached to. - * - * Generated from protobuf field repeated string instances = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * Output only. Instances this Lun is attached to. - * - * Generated from protobuf field repeated string instances = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instances = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/MultiprotocolType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/MultiprotocolType.php deleted file mode 100644 index c9390ce09906..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/MultiprotocolType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.baremetalsolution.v2.Lun.MultiprotocolType - */ -class MultiprotocolType -{ - /** - * Server has no OS specified. - * - * Generated from protobuf enum MULTIPROTOCOL_TYPE_UNSPECIFIED = 0; - */ - const MULTIPROTOCOL_TYPE_UNSPECIFIED = 0; - /** - * Server with Linux OS. - * - * Generated from protobuf enum LINUX = 1; - */ - const LINUX = 1; - - private static $valueToName = [ - self::MULTIPROTOCOL_TYPE_UNSPECIFIED => 'MULTIPROTOCOL_TYPE_UNSPECIFIED', - self::LINUX => 'LINUX', - ]; - - 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(MultiprotocolType::class, \Google\Cloud\BareMetalSolution\V2\Lun_MultiprotocolType::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/State.php deleted file mode 100644 index 0d226c388658..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.baremetalsolution.v2.Lun.State - */ -class State -{ - /** - * The LUN is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The LUN is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The LUN is being updated. - * - * Generated from protobuf enum UPDATING = 2; - */ - const UPDATING = 2; - /** - * The LUN is ready for use. - * - * Generated from protobuf enum READY = 3; - */ - const READY = 3; - /** - * The LUN has been requested to be deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The LUN is in cool off state. It will be deleted after `expire_time`. - * - * Generated from protobuf enum COOL_OFF = 5; - */ - const COOL_OFF = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::COOL_OFF => 'COOL_OFF', - ]; - - 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\BareMetalSolution\V2\Lun_State::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/StorageType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/StorageType.php deleted file mode 100644 index f6896f77e408..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Lun/StorageType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.Lun.StorageType - */ -class StorageType -{ - /** - * The storage type for this LUN is unknown. - * - * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; - */ - const STORAGE_TYPE_UNSPECIFIED = 0; - /** - * This storage type for this LUN is SSD. - * - * Generated from protobuf enum SSD = 1; - */ - const SSD = 1; - /** - * This storage type for this LUN is HDD. - * - * Generated from protobuf enum HDD = 2; - */ - const HDD = 2; - - private static $valueToName = [ - self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', - self::SSD => 'SSD', - self::HDD => 'HDD', - ]; - - 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(StorageType::class, \Google\Cloud\BareMetalSolution\V2\Lun_StorageType::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network.php deleted file mode 100644 index 22f2706398da..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network.php +++ /dev/null @@ -1,611 +0,0 @@ -google.cloud.baremetalsolution.v2.Network - */ -class Network extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this `Network`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/networks/{network}` - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * An identifier for the `Network`, generated by the backend. - * - * Generated from protobuf field string id = 10; - */ - protected $id = ''; - /** - * The type of this network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type type = 2; - */ - protected $type = 0; - /** - * IP address configured. - * - * Generated from protobuf field string ip_address = 3; - */ - protected $ip_address = ''; - /** - * List of physical interfaces. - * - * Generated from protobuf field repeated string mac_address = 4; - */ - private $mac_address; - /** - * The Network state. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.State state = 6; - */ - protected $state = 0; - /** - * The vlan id of the Network. - * - * Generated from protobuf field string vlan_id = 7; - */ - protected $vlan_id = ''; - /** - * The cidr of the Network. - * - * Generated from protobuf field string cidr = 8; - */ - protected $cidr = ''; - /** - * The vrf for the Network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF vrf = 9; - */ - protected $vrf = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 11; - */ - private $labels; - /** - * IP range for reserved for services (e.g. NFS). - * - * Generated from protobuf field string services_cidr = 12; - */ - protected $services_cidr = ''; - /** - * List of IP address reservations in this network. - * When updating this field, an error will be generated if a reservation - * conflicts with an IP address already allocated to a physical server. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; - */ - private $reservations; - /** - * Output only. Pod name. - * - * Generated from protobuf field string pod = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pod = ''; - /** - * Input only. List of mount points to attach the network to. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkMountPoint mount_points = 15 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - private $mount_points; - /** - * Whether network uses standard frames or jumbo ones. - * - * Generated from protobuf field bool jumbo_frames_enabled = 16; - */ - protected $jumbo_frames_enabled = false; - /** - * Output only. Gateway ip address. - * - * Generated from protobuf field string gateway_ip = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $gateway_ip = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this `Network`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/networks/{network}` - * @type string $id - * An identifier for the `Network`, generated by the backend. - * @type int $type - * The type of this network. - * @type string $ip_address - * IP address configured. - * @type array|\Google\Protobuf\Internal\RepeatedField $mac_address - * List of physical interfaces. - * @type int $state - * The Network state. - * @type string $vlan_id - * The vlan id of the Network. - * @type string $cidr - * The cidr of the Network. - * @type \Google\Cloud\BareMetalSolution\V2\VRF $vrf - * The vrf for the Network. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type string $services_cidr - * IP range for reserved for services (e.g. NFS). - * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkAddressReservation>|\Google\Protobuf\Internal\RepeatedField $reservations - * List of IP address reservations in this network. - * When updating this field, an error will be generated if a reservation - * conflicts with an IP address already allocated to a physical server. - * @type string $pod - * Output only. Pod name. - * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkMountPoint>|\Google\Protobuf\Internal\RepeatedField $mount_points - * Input only. List of mount points to attach the network to. - * @type bool $jumbo_frames_enabled - * Whether network uses standard frames or jumbo ones. - * @type string $gateway_ip - * Output only. Gateway ip address. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this `Network`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/networks/{network}` - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of this `Network`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/networks/{network}` - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * An identifier for the `Network`, generated by the backend. - * - * Generated from protobuf field string id = 10; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * An identifier for the `Network`, generated by the backend. - * - * Generated from protobuf field string id = 10; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The type of this network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of this network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Network\Type::class); - $this->type = $var; - - return $this; - } - - /** - * IP address configured. - * - * Generated from protobuf field string ip_address = 3; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address configured. - * - * Generated from protobuf field string ip_address = 3; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * List of physical interfaces. - * - * Generated from protobuf field repeated string mac_address = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMacAddress() - { - return $this->mac_address; - } - - /** - * List of physical interfaces. - * - * Generated from protobuf field repeated string mac_address = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMacAddress($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->mac_address = $arr; - - return $this; - } - - /** - * The Network state. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.State state = 6; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The Network state. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network.State state = 6; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Network\State::class); - $this->state = $var; - - return $this; - } - - /** - * The vlan id of the Network. - * - * Generated from protobuf field string vlan_id = 7; - * @return string - */ - public function getVlanId() - { - return $this->vlan_id; - } - - /** - * The vlan id of the Network. - * - * Generated from protobuf field string vlan_id = 7; - * @param string $var - * @return $this - */ - public function setVlanId($var) - { - GPBUtil::checkString($var, True); - $this->vlan_id = $var; - - return $this; - } - - /** - * The cidr of the Network. - * - * Generated from protobuf field string cidr = 8; - * @return string - */ - public function getCidr() - { - return $this->cidr; - } - - /** - * The cidr of the Network. - * - * Generated from protobuf field string cidr = 8; - * @param string $var - * @return $this - */ - public function setCidr($var) - { - GPBUtil::checkString($var, True); - $this->cidr = $var; - - return $this; - } - - /** - * The vrf for the Network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF vrf = 9; - * @return \Google\Cloud\BareMetalSolution\V2\VRF|null - */ - public function getVrf() - { - return $this->vrf; - } - - public function hasVrf() - { - return isset($this->vrf); - } - - public function clearVrf() - { - unset($this->vrf); - } - - /** - * The vrf for the Network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF vrf = 9; - * @param \Google\Cloud\BareMetalSolution\V2\VRF $var - * @return $this - */ - public function setVrf($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\VRF::class); - $this->vrf = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 11; - * @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; - } - - /** - * IP range for reserved for services (e.g. NFS). - * - * Generated from protobuf field string services_cidr = 12; - * @return string - */ - public function getServicesCidr() - { - return $this->services_cidr; - } - - /** - * IP range for reserved for services (e.g. NFS). - * - * Generated from protobuf field string services_cidr = 12; - * @param string $var - * @return $this - */ - public function setServicesCidr($var) - { - GPBUtil::checkString($var, True); - $this->services_cidr = $var; - - return $this; - } - - /** - * List of IP address reservations in this network. - * When updating this field, an error will be generated if a reservation - * conflicts with an IP address already allocated to a physical server. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReservations() - { - return $this->reservations; - } - - /** - * List of IP address reservations in this network. - * When updating this field, an error will be generated if a reservation - * conflicts with an IP address already allocated to a physical server. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; - * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkAddressReservation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReservations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkAddressReservation::class); - $this->reservations = $arr; - - return $this; - } - - /** - * Output only. Pod name. - * - * Generated from protobuf field string pod = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPod() - { - return $this->pod; - } - - /** - * Output only. Pod name. - * - * Generated from protobuf field string pod = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPod($var) - { - GPBUtil::checkString($var, True); - $this->pod = $var; - - return $this; - } - - /** - * Input only. List of mount points to attach the network to. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkMountPoint mount_points = 15 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMountPoints() - { - return $this->mount_points; - } - - /** - * Input only. List of mount points to attach the network to. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkMountPoint mount_points = 15 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkMountPoint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMountPoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkMountPoint::class); - $this->mount_points = $arr; - - return $this; - } - - /** - * Whether network uses standard frames or jumbo ones. - * - * Generated from protobuf field bool jumbo_frames_enabled = 16; - * @return bool - */ - public function getJumboFramesEnabled() - { - return $this->jumbo_frames_enabled; - } - - /** - * Whether network uses standard frames or jumbo ones. - * - * Generated from protobuf field bool jumbo_frames_enabled = 16; - * @param bool $var - * @return $this - */ - public function setJumboFramesEnabled($var) - { - GPBUtil::checkBool($var); - $this->jumbo_frames_enabled = $var; - - return $this; - } - - /** - * Output only. Gateway ip address. - * - * Generated from protobuf field string gateway_ip = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGatewayIp() - { - return $this->gateway_ip; - } - - /** - * Output only. Gateway ip address. - * - * Generated from protobuf field string gateway_ip = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGatewayIp($var) - { - GPBUtil::checkString($var, True); - $this->gateway_ip = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/State.php deleted file mode 100644 index 461eaa871ee6..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.baremetalsolution.v2.Network.State - */ -class State -{ - /** - * The Network is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Network is provisioning. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The Network has been provisioned. - * - * Generated from protobuf enum PROVISIONED = 2; - */ - const PROVISIONED = 2; - /** - * The Network is being deprovisioned. - * - * Generated from protobuf enum DEPROVISIONING = 3; - */ - const DEPROVISIONING = 3; - /** - * The Network is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::PROVISIONED => 'PROVISIONED', - self::DEPROVISIONING => 'DEPROVISIONING', - self::UPDATING => 'UPDATING', - ]; - - 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\BareMetalSolution\V2\Network_State::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/Type.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/Type.php deleted file mode 100644 index 5b7a71e8a639..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Network/Type.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.baremetalsolution.v2.Network.Type - */ -class Type -{ - /** - * Unspecified value. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Client network, a network peered to a Google Cloud VPC. - * - * Generated from protobuf enum CLIENT = 1; - */ - const CLIENT = 1; - /** - * Private network, a network local to the Bare Metal Solution environment. - * - * Generated from protobuf enum PRIVATE = 2; - */ - const PBPRIVATE = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::CLIENT => 'CLIENT', - self::PBPRIVATE => 'PRIVATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\BareMetalSolution\V2\Network_Type::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkAddressReservation.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkAddressReservation.php deleted file mode 100644 index e9164232774a..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkAddressReservation.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.baremetalsolution.v2.NetworkAddressReservation - */ -class NetworkAddressReservation extends \Google\Protobuf\Internal\Message -{ - /** - * The first address of this reservation block. - * Must be specified as a single IPv4 address, e.g. 10.1.2.2. - * - * Generated from protobuf field string start_address = 1; - */ - protected $start_address = ''; - /** - * The last address of this reservation block, inclusive. I.e., for cases when - * reservations are only single addresses, end_address and start_address will - * be the same. - * Must be specified as a single IPv4 address, e.g. 10.1.2.2. - * - * Generated from protobuf field string end_address = 2; - */ - protected $end_address = ''; - /** - * A note about this reservation, intended for human consumption. - * - * Generated from protobuf field string note = 3; - */ - protected $note = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $start_address - * The first address of this reservation block. - * Must be specified as a single IPv4 address, e.g. 10.1.2.2. - * @type string $end_address - * The last address of this reservation block, inclusive. I.e., for cases when - * reservations are only single addresses, end_address and start_address will - * be the same. - * Must be specified as a single IPv4 address, e.g. 10.1.2.2. - * @type string $note - * A note about this reservation, intended for human consumption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * The first address of this reservation block. - * Must be specified as a single IPv4 address, e.g. 10.1.2.2. - * - * Generated from protobuf field string start_address = 1; - * @return string - */ - public function getStartAddress() - { - return $this->start_address; - } - - /** - * The first address of this reservation block. - * Must be specified as a single IPv4 address, e.g. 10.1.2.2. - * - * Generated from protobuf field string start_address = 1; - * @param string $var - * @return $this - */ - public function setStartAddress($var) - { - GPBUtil::checkString($var, True); - $this->start_address = $var; - - return $this; - } - - /** - * The last address of this reservation block, inclusive. I.e., for cases when - * reservations are only single addresses, end_address and start_address will - * be the same. - * Must be specified as a single IPv4 address, e.g. 10.1.2.2. - * - * Generated from protobuf field string end_address = 2; - * @return string - */ - public function getEndAddress() - { - return $this->end_address; - } - - /** - * The last address of this reservation block, inclusive. I.e., for cases when - * reservations are only single addresses, end_address and start_address will - * be the same. - * Must be specified as a single IPv4 address, e.g. 10.1.2.2. - * - * Generated from protobuf field string end_address = 2; - * @param string $var - * @return $this - */ - public function setEndAddress($var) - { - GPBUtil::checkString($var, True); - $this->end_address = $var; - - return $this; - } - - /** - * A note about this reservation, intended for human consumption. - * - * Generated from protobuf field string note = 3; - * @return string - */ - public function getNote() - { - return $this->note; - } - - /** - * A note about this reservation, intended for human consumption. - * - * Generated from protobuf field string note = 3; - * @param string $var - * @return $this - */ - public function setNote($var) - { - GPBUtil::checkString($var, True); - $this->note = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig.php deleted file mode 100644 index 85659bf9e249..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig.php +++ /dev/null @@ -1,423 +0,0 @@ -google.cloud.baremetalsolution.v2.NetworkConfig - */ -class NetworkConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the network config. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * A transient unique identifier to identify a volume within an - * ProvisioningConfig request. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - /** - * The type of this network, either Client or Private. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Type type = 3; - */ - protected $type = 0; - /** - * Interconnect bandwidth. Set only when type is CLIENT. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth bandwidth = 4; - */ - protected $bandwidth = 0; - /** - * List of VLAN attachments. As of now there are always 2 attachments, but it - * is going to change in the future (multi vlan). - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment vlan_attachments = 5; - */ - private $vlan_attachments; - /** - * CIDR range of the network. - * - * Generated from protobuf field string cidr = 6; - */ - protected $cidr = ''; - /** - * Service CIDR, if any. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr service_cidr = 7; - */ - protected $service_cidr = 0; - /** - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * - * Generated from protobuf field string user_note = 8; - */ - protected $user_note = ''; - /** - * The GCP service of the network. Available gcp_service are in - * https://cloud.google.com/bare-metal/docs/bms-planning. - * - * Generated from protobuf field string gcp_service = 9; - */ - protected $gcp_service = ''; - /** - * Whether the VLAN attachment pair is located in the same project. - * - * Generated from protobuf field bool vlan_same_project = 10; - */ - protected $vlan_same_project = false; - /** - * The JumboFramesEnabled option for customer to set. - * - * Generated from protobuf field bool jumbo_frames_enabled = 11; - */ - protected $jumbo_frames_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the network config. - * @type string $id - * A transient unique identifier to identify a volume within an - * ProvisioningConfig request. - * @type int $type - * The type of this network, either Client or Private. - * @type int $bandwidth - * Interconnect bandwidth. Set only when type is CLIENT. - * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkConfig\IntakeVlanAttachment>|\Google\Protobuf\Internal\RepeatedField $vlan_attachments - * List of VLAN attachments. As of now there are always 2 attachments, but it - * is going to change in the future (multi vlan). - * @type string $cidr - * CIDR range of the network. - * @type int $service_cidr - * Service CIDR, if any. - * @type string $user_note - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * @type string $gcp_service - * The GCP service of the network. Available gcp_service are in - * https://cloud.google.com/bare-metal/docs/bms-planning. - * @type bool $vlan_same_project - * Whether the VLAN attachment pair is located in the same project. - * @type bool $jumbo_frames_enabled - * The JumboFramesEnabled option for customer to set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the network config. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the network config. - * - * 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; - } - - /** - * A transient unique identifier to identify a volume within an - * ProvisioningConfig request. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * A transient unique identifier to identify a volume within an - * ProvisioningConfig request. - * - * Generated from protobuf field string id = 2; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The type of this network, either Client or Private. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Type type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of this network, either Client or Private. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Type type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NetworkConfig\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Interconnect bandwidth. Set only when type is CLIENT. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth bandwidth = 4; - * @return int - */ - public function getBandwidth() - { - return $this->bandwidth; - } - - /** - * Interconnect bandwidth. Set only when type is CLIENT. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth bandwidth = 4; - * @param int $var - * @return $this - */ - public function setBandwidth($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NetworkConfig\Bandwidth::class); - $this->bandwidth = $var; - - return $this; - } - - /** - * List of VLAN attachments. As of now there are always 2 attachments, but it - * is going to change in the future (multi vlan). - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment vlan_attachments = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVlanAttachments() - { - return $this->vlan_attachments; - } - - /** - * List of VLAN attachments. As of now there are always 2 attachments, but it - * is going to change in the future (multi vlan). - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment vlan_attachments = 5; - * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkConfig\IntakeVlanAttachment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVlanAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkConfig\IntakeVlanAttachment::class); - $this->vlan_attachments = $arr; - - return $this; - } - - /** - * CIDR range of the network. - * - * Generated from protobuf field string cidr = 6; - * @return string - */ - public function getCidr() - { - return $this->cidr; - } - - /** - * CIDR range of the network. - * - * Generated from protobuf field string cidr = 6; - * @param string $var - * @return $this - */ - public function setCidr($var) - { - GPBUtil::checkString($var, True); - $this->cidr = $var; - - return $this; - } - - /** - * Service CIDR, if any. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr service_cidr = 7; - * @return int - */ - public function getServiceCidr() - { - return $this->service_cidr; - } - - /** - * Service CIDR, if any. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr service_cidr = 7; - * @param int $var - * @return $this - */ - public function setServiceCidr($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NetworkConfig\ServiceCidr::class); - $this->service_cidr = $var; - - return $this; - } - - /** - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * - * Generated from protobuf field string user_note = 8; - * @return string - */ - public function getUserNote() - { - return $this->user_note; - } - - /** - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * - * Generated from protobuf field string user_note = 8; - * @param string $var - * @return $this - */ - public function setUserNote($var) - { - GPBUtil::checkString($var, True); - $this->user_note = $var; - - return $this; - } - - /** - * The GCP service of the network. Available gcp_service are in - * https://cloud.google.com/bare-metal/docs/bms-planning. - * - * Generated from protobuf field string gcp_service = 9; - * @return string - */ - public function getGcpService() - { - return $this->gcp_service; - } - - /** - * The GCP service of the network. Available gcp_service are in - * https://cloud.google.com/bare-metal/docs/bms-planning. - * - * Generated from protobuf field string gcp_service = 9; - * @param string $var - * @return $this - */ - public function setGcpService($var) - { - GPBUtil::checkString($var, True); - $this->gcp_service = $var; - - return $this; - } - - /** - * Whether the VLAN attachment pair is located in the same project. - * - * Generated from protobuf field bool vlan_same_project = 10; - * @return bool - */ - public function getVlanSameProject() - { - return $this->vlan_same_project; - } - - /** - * Whether the VLAN attachment pair is located in the same project. - * - * Generated from protobuf field bool vlan_same_project = 10; - * @param bool $var - * @return $this - */ - public function setVlanSameProject($var) - { - GPBUtil::checkBool($var); - $this->vlan_same_project = $var; - - return $this; - } - - /** - * The JumboFramesEnabled option for customer to set. - * - * Generated from protobuf field bool jumbo_frames_enabled = 11; - * @return bool - */ - public function getJumboFramesEnabled() - { - return $this->jumbo_frames_enabled; - } - - /** - * The JumboFramesEnabled option for customer to set. - * - * Generated from protobuf field bool jumbo_frames_enabled = 11; - * @param bool $var - * @return $this - */ - public function setJumboFramesEnabled($var) - { - GPBUtil::checkBool($var); - $this->jumbo_frames_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Bandwidth.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Bandwidth.php deleted file mode 100644 index b1f187f83d13..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Bandwidth.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth - */ -class Bandwidth -{ - /** - * Unspecified value. - * - * Generated from protobuf enum BANDWIDTH_UNSPECIFIED = 0; - */ - const BANDWIDTH_UNSPECIFIED = 0; - /** - * 1 Gbps. - * - * Generated from protobuf enum BW_1_GBPS = 1; - */ - const BW_1_GBPS = 1; - /** - * 2 Gbps. - * - * Generated from protobuf enum BW_2_GBPS = 2; - */ - const BW_2_GBPS = 2; - /** - * 5 Gbps. - * - * Generated from protobuf enum BW_5_GBPS = 3; - */ - const BW_5_GBPS = 3; - /** - * 10 Gbps. - * - * Generated from protobuf enum BW_10_GBPS = 4; - */ - const BW_10_GBPS = 4; - - private static $valueToName = [ - self::BANDWIDTH_UNSPECIFIED => 'BANDWIDTH_UNSPECIFIED', - self::BW_1_GBPS => 'BW_1_GBPS', - self::BW_2_GBPS => 'BW_2_GBPS', - self::BW_5_GBPS => 'BW_5_GBPS', - self::BW_10_GBPS => 'BW_10_GBPS', - ]; - - 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(Bandwidth::class, \Google\Cloud\BareMetalSolution\V2\NetworkConfig_Bandwidth::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/IntakeVlanAttachment.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/IntakeVlanAttachment.php deleted file mode 100644 index 3b6c74ad0653..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/IntakeVlanAttachment.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment - */ -class IntakeVlanAttachment extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier of the VLAN attachment. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * Attachment pairing key. - * - * Generated from protobuf field string pairing_key = 2; - */ - protected $pairing_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Identifier of the VLAN attachment. - * @type string $pairing_key - * Attachment pairing key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Identifier of the VLAN attachment. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Identifier of the VLAN attachment. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Attachment pairing key. - * - * Generated from protobuf field string pairing_key = 2; - * @return string - */ - public function getPairingKey() - { - return $this->pairing_key; - } - - /** - * Attachment pairing key. - * - * Generated from protobuf field string pairing_key = 2; - * @param string $var - * @return $this - */ - public function setPairingKey($var) - { - GPBUtil::checkString($var, True); - $this->pairing_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IntakeVlanAttachment::class, \Google\Cloud\BareMetalSolution\V2\NetworkConfig_IntakeVlanAttachment::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/ServiceCidr.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/ServiceCidr.php deleted file mode 100644 index fef9ef5310e5..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/ServiceCidr.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr - */ -class ServiceCidr -{ - /** - * Unspecified value. - * - * Generated from protobuf enum SERVICE_CIDR_UNSPECIFIED = 0; - */ - const SERVICE_CIDR_UNSPECIFIED = 0; - /** - * Services are disabled for the given network. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Use the highest /26 block of the network to host services. - * - * Generated from protobuf enum HIGH_26 = 2; - */ - const HIGH_26 = 2; - /** - * Use the highest /27 block of the network to host services. - * - * Generated from protobuf enum HIGH_27 = 3; - */ - const HIGH_27 = 3; - /** - * Use the highest /28 block of the network to host services. - * - * Generated from protobuf enum HIGH_28 = 4; - */ - const HIGH_28 = 4; - - private static $valueToName = [ - self::SERVICE_CIDR_UNSPECIFIED => 'SERVICE_CIDR_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::HIGH_26 => 'HIGH_26', - self::HIGH_27 => 'HIGH_27', - self::HIGH_28 => 'HIGH_28', - ]; - - 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(ServiceCidr::class, \Google\Cloud\BareMetalSolution\V2\NetworkConfig_ServiceCidr::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Type.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Type.php deleted file mode 100644 index 7ad2e6357a0f..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkConfig/Type.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.baremetalsolution.v2.NetworkConfig.Type - */ -class Type -{ - /** - * Unspecified value. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Client network, that is a network peered to a GCP VPC. - * - * Generated from protobuf enum CLIENT = 1; - */ - const CLIENT = 1; - /** - * Private network, that is a network local to the BMS POD. - * - * Generated from protobuf enum PRIVATE = 2; - */ - const PBPRIVATE = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::CLIENT => 'CLIENT', - self::PBPRIVATE => 'PRIVATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\BareMetalSolution\V2\NetworkConfig_Type::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkMountPoint.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkMountPoint.php deleted file mode 100644 index a147b3f1fa57..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkMountPoint.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.baremetalsolution.v2.NetworkMountPoint - */ -class NetworkMountPoint extends \Google\Protobuf\Internal\Message -{ - /** - * Instance to attach network to. - * - * Generated from protobuf field string instance = 1 [(.google.api.resource_reference) = { - */ - protected $instance = ''; - /** - * Logical interface to detach from. - * - * Generated from protobuf field string logical_interface = 2; - */ - protected $logical_interface = ''; - /** - * Network should be a default gateway. - * - * Generated from protobuf field bool default_gateway = 3; - */ - protected $default_gateway = false; - /** - * Ip address of the server. - * - * Generated from protobuf field string ip_address = 4; - */ - protected $ip_address = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Instance to attach network to. - * @type string $logical_interface - * Logical interface to detach from. - * @type bool $default_gateway - * Network should be a default gateway. - * @type string $ip_address - * Ip address of the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Instance to attach network to. - * - * Generated from protobuf field string instance = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Instance to attach network to. - * - * Generated from protobuf field string instance = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Logical interface to detach from. - * - * Generated from protobuf field string logical_interface = 2; - * @return string - */ - public function getLogicalInterface() - { - return $this->logical_interface; - } - - /** - * Logical interface to detach from. - * - * Generated from protobuf field string logical_interface = 2; - * @param string $var - * @return $this - */ - public function setLogicalInterface($var) - { - GPBUtil::checkString($var, True); - $this->logical_interface = $var; - - return $this; - } - - /** - * Network should be a default gateway. - * - * Generated from protobuf field bool default_gateway = 3; - * @return bool - */ - public function getDefaultGateway() - { - return $this->default_gateway; - } - - /** - * Network should be a default gateway. - * - * Generated from protobuf field bool default_gateway = 3; - * @param bool $var - * @return $this - */ - public function setDefaultGateway($var) - { - GPBUtil::checkBool($var); - $this->default_gateway = $var; - - return $this; - } - - /** - * Ip address of the server. - * - * Generated from protobuf field string ip_address = 4; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * Ip address of the server. - * - * Generated from protobuf field string ip_address = 4; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkUsage.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkUsage.php deleted file mode 100644 index 789ec3aa94c0..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NetworkUsage.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.baremetalsolution.v2.NetworkUsage - */ -class NetworkUsage extends \Google\Protobuf\Internal\Message -{ - /** - * Network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1; - */ - protected $network = null; - /** - * All used IP addresses in this network. - * - * Generated from protobuf field repeated string used_ips = 2; - */ - private $used_ips; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BareMetalSolution\V2\Network $network - * Network. - * @type array|\Google\Protobuf\Internal\RepeatedField $used_ips - * All used IP addresses in this network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1; - * @return \Google\Cloud\BareMetalSolution\V2\Network|null - */ - public function getNetwork() - { - return $this->network; - } - - public function hasNetwork() - { - return isset($this->network); - } - - public function clearNetwork() - { - unset($this->network); - } - - /** - * Network. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1; - * @param \Google\Cloud\BareMetalSolution\V2\Network $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Network::class); - $this->network = $var; - - return $this; - } - - /** - * All used IP addresses in this network. - * - * Generated from protobuf field repeated string used_ips = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUsedIps() - { - return $this->used_ips; - } - - /** - * All used IP addresses in this network. - * - * Generated from protobuf field repeated string used_ips = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUsedIps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->used_ips = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare.php deleted file mode 100644 index 2362d9d26764..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare.php +++ /dev/null @@ -1,351 +0,0 @@ -google.cloud.baremetalsolution.v2.NfsShare - */ -class NfsShare extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The name of the NFS share. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. An identifier for the NFS share, generated by the backend. - * This field will be deprecated in the future, use `id` instead. - * - * Generated from protobuf field string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $nfs_share_id = ''; - /** - * Output only. An identifier for the NFS share, generated by the backend. - * This is the same value as nfs_share_id and will replace it in the future. - * - * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * Output only. The state of the NFS share. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The underlying volume of the share. Created automatically - * during provisioning. - * - * Generated from protobuf field string volume = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $volume = ''; - /** - * List of allowed access points. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; - */ - private $allowed_clients; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 6; - */ - private $labels; - /** - * The requested size, in GiB. - * - * Generated from protobuf field int64 requested_size_gib = 7; - */ - protected $requested_size_gib = 0; - /** - * Immutable. The storage type of the underlying volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.StorageType storage_type = 9 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $storage_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The name of the NFS share. - * @type string $nfs_share_id - * Output only. An identifier for the NFS share, generated by the backend. - * This field will be deprecated in the future, use `id` instead. - * @type string $id - * Output only. An identifier for the NFS share, generated by the backend. - * This is the same value as nfs_share_id and will replace it in the future. - * @type int $state - * Output only. The state of the NFS share. - * @type string $volume - * Output only. The underlying volume of the share. Created automatically - * during provisioning. - * @type array<\Google\Cloud\BareMetalSolution\V2\NfsShare\AllowedClient>|\Google\Protobuf\Internal\RepeatedField $allowed_clients - * List of allowed access points. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type int|string $requested_size_gib - * The requested size, in GiB. - * @type int $storage_type - * Immutable. The storage type of the underlying volume. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The name of the NFS share. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The name of the NFS share. - * - * 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; - } - - /** - * Output only. An identifier for the NFS share, generated by the backend. - * This field will be deprecated in the future, use `id` instead. - * - * Generated from protobuf field string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNfsShareId() - { - return $this->nfs_share_id; - } - - /** - * Output only. An identifier for the NFS share, generated by the backend. - * This field will be deprecated in the future, use `id` instead. - * - * Generated from protobuf field string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNfsShareId($var) - { - GPBUtil::checkString($var, True); - $this->nfs_share_id = $var; - - return $this; - } - - /** - * Output only. An identifier for the NFS share, generated by the backend. - * This is the same value as nfs_share_id and will replace it in the future. - * - * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. An identifier for the NFS share, generated by the backend. - * This is the same value as nfs_share_id and will replace it in the future. - * - * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Output only. The state of the NFS share. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the NFS share. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NfsShare\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The underlying volume of the share. Created automatically - * during provisioning. - * - * Generated from protobuf field string volume = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getVolume() - { - return $this->volume; - } - - /** - * Output only. The underlying volume of the share. Created automatically - * during provisioning. - * - * Generated from protobuf field string volume = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVolume($var) - { - GPBUtil::checkString($var, True); - $this->volume = $var; - - return $this; - } - - /** - * List of allowed access points. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedClients() - { - return $this->allowed_clients; - } - - /** - * List of allowed access points. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; - * @param array<\Google\Cloud\BareMetalSolution\V2\NfsShare\AllowedClient>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedClients($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NfsShare\AllowedClient::class); - $this->allowed_clients = $arr; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 6; - * @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; - } - - /** - * The requested size, in GiB. - * - * Generated from protobuf field int64 requested_size_gib = 7; - * @return int|string - */ - public function getRequestedSizeGib() - { - return $this->requested_size_gib; - } - - /** - * The requested size, in GiB. - * - * Generated from protobuf field int64 requested_size_gib = 7; - * @param int|string $var - * @return $this - */ - public function setRequestedSizeGib($var) - { - GPBUtil::checkInt64($var); - $this->requested_size_gib = $var; - - return $this; - } - - /** - * Immutable. The storage type of the underlying volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.StorageType storage_type = 9 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getStorageType() - { - return $this->storage_type; - } - - /** - * Immutable. The storage type of the underlying volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.StorageType storage_type = 9 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setStorageType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NfsShare\StorageType::class); - $this->storage_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/AllowedClient.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/AllowedClient.php deleted file mode 100644 index 392194acd694..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/AllowedClient.php +++ /dev/null @@ -1,328 +0,0 @@ -google.cloud.baremetalsolution.v2.NfsShare.AllowedClient - */ -class AllowedClient extends \Google\Protobuf\Internal\Message -{ - /** - * The network the access point sits on. - * - * Generated from protobuf field string network = 1 [(.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Output only. The IP address of the share on this network. Assigned - * automatically during provisioning based on the network's services_cidr. - * - * Generated from protobuf field string share_ip = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $share_ip = ''; - /** - * The subnet of IP addresses permitted to access the share. - * - * Generated from protobuf field string allowed_clients_cidr = 3; - */ - protected $allowed_clients_cidr = ''; - /** - * Mount permissions. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; - */ - protected $mount_permissions = 0; - /** - * Allow dev flag. Which controls whether to allow creation of devices. - * - * Generated from protobuf field bool allow_dev = 5; - */ - protected $allow_dev = false; - /** - * Allow the setuid flag. - * - * Generated from protobuf field bool allow_suid = 6; - */ - protected $allow_suid = false; - /** - * Disable root squashing, which is a feature of NFS. - * Root squash is a special mapping of the remote superuser (root) identity - * when using identity authentication. - * - * Generated from protobuf field bool no_root_squash = 7; - */ - protected $no_root_squash = false; - /** - * Output only. The path to access NFS, in format shareIP:/InstanceID - * InstanceID is the generated ID instead of customer provided name. - * example like "10.0.0.0:/g123456789-nfs001" - * - * Generated from protobuf field string nfs_path = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $nfs_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The network the access point sits on. - * @type string $share_ip - * Output only. The IP address of the share on this network. Assigned - * automatically during provisioning based on the network's services_cidr. - * @type string $allowed_clients_cidr - * The subnet of IP addresses permitted to access the share. - * @type int $mount_permissions - * Mount permissions. - * @type bool $allow_dev - * Allow dev flag. Which controls whether to allow creation of devices. - * @type bool $allow_suid - * Allow the setuid flag. - * @type bool $no_root_squash - * Disable root squashing, which is a feature of NFS. - * Root squash is a special mapping of the remote superuser (root) identity - * when using identity authentication. - * @type string $nfs_path - * Output only. The path to access NFS, in format shareIP:/InstanceID - * InstanceID is the generated ID instead of customer provided name. - * example like "10.0.0.0:/g123456789-nfs001" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); - parent::__construct($data); - } - - /** - * The network the access point sits on. - * - * Generated from protobuf field string network = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The network the access point sits on. - * - * Generated from protobuf field string network = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Output only. The IP address of the share on this network. Assigned - * automatically during provisioning based on the network's services_cidr. - * - * Generated from protobuf field string share_ip = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getShareIp() - { - return $this->share_ip; - } - - /** - * Output only. The IP address of the share on this network. Assigned - * automatically during provisioning based on the network's services_cidr. - * - * Generated from protobuf field string share_ip = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setShareIp($var) - { - GPBUtil::checkString($var, True); - $this->share_ip = $var; - - return $this; - } - - /** - * The subnet of IP addresses permitted to access the share. - * - * Generated from protobuf field string allowed_clients_cidr = 3; - * @return string - */ - public function getAllowedClientsCidr() - { - return $this->allowed_clients_cidr; - } - - /** - * The subnet of IP addresses permitted to access the share. - * - * Generated from protobuf field string allowed_clients_cidr = 3; - * @param string $var - * @return $this - */ - public function setAllowedClientsCidr($var) - { - GPBUtil::checkString($var, True); - $this->allowed_clients_cidr = $var; - - return $this; - } - - /** - * Mount permissions. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; - * @return int - */ - public function getMountPermissions() - { - return $this->mount_permissions; - } - - /** - * Mount permissions. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; - * @param int $var - * @return $this - */ - public function setMountPermissions($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NfsShare\MountPermissions::class); - $this->mount_permissions = $var; - - return $this; - } - - /** - * Allow dev flag. Which controls whether to allow creation of devices. - * - * Generated from protobuf field bool allow_dev = 5; - * @return bool - */ - public function getAllowDev() - { - return $this->allow_dev; - } - - /** - * Allow dev flag. Which controls whether to allow creation of devices. - * - * Generated from protobuf field bool allow_dev = 5; - * @param bool $var - * @return $this - */ - public function setAllowDev($var) - { - GPBUtil::checkBool($var); - $this->allow_dev = $var; - - return $this; - } - - /** - * Allow the setuid flag. - * - * Generated from protobuf field bool allow_suid = 6; - * @return bool - */ - public function getAllowSuid() - { - return $this->allow_suid; - } - - /** - * Allow the setuid flag. - * - * Generated from protobuf field bool allow_suid = 6; - * @param bool $var - * @return $this - */ - public function setAllowSuid($var) - { - GPBUtil::checkBool($var); - $this->allow_suid = $var; - - return $this; - } - - /** - * Disable root squashing, which is a feature of NFS. - * Root squash is a special mapping of the remote superuser (root) identity - * when using identity authentication. - * - * Generated from protobuf field bool no_root_squash = 7; - * @return bool - */ - public function getNoRootSquash() - { - return $this->no_root_squash; - } - - /** - * Disable root squashing, which is a feature of NFS. - * Root squash is a special mapping of the remote superuser (root) identity - * when using identity authentication. - * - * Generated from protobuf field bool no_root_squash = 7; - * @param bool $var - * @return $this - */ - public function setNoRootSquash($var) - { - GPBUtil::checkBool($var); - $this->no_root_squash = $var; - - return $this; - } - - /** - * Output only. The path to access NFS, in format shareIP:/InstanceID - * InstanceID is the generated ID instead of customer provided name. - * example like "10.0.0.0:/g123456789-nfs001" - * - * Generated from protobuf field string nfs_path = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNfsPath() - { - return $this->nfs_path; - } - - /** - * Output only. The path to access NFS, in format shareIP:/InstanceID - * InstanceID is the generated ID instead of customer provided name. - * example like "10.0.0.0:/g123456789-nfs001" - * - * Generated from protobuf field string nfs_path = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNfsPath($var) - { - GPBUtil::checkString($var, True); - $this->nfs_path = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AllowedClient::class, \Google\Cloud\BareMetalSolution\V2\NfsShare_AllowedClient::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/MountPermissions.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/MountPermissions.php deleted file mode 100644 index dadf339aea7f..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/MountPermissions.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.NfsShare.MountPermissions - */ -class MountPermissions -{ - /** - * Permissions were not specified. - * - * Generated from protobuf enum MOUNT_PERMISSIONS_UNSPECIFIED = 0; - */ - const MOUNT_PERMISSIONS_UNSPECIFIED = 0; - /** - * NFS share can be mount with read-only permissions. - * - * Generated from protobuf enum READ = 1; - */ - const READ = 1; - /** - * NFS share can be mount with read-write permissions. - * - * Generated from protobuf enum READ_WRITE = 2; - */ - const READ_WRITE = 2; - - private static $valueToName = [ - self::MOUNT_PERMISSIONS_UNSPECIFIED => 'MOUNT_PERMISSIONS_UNSPECIFIED', - self::READ => 'READ', - self::READ_WRITE => 'READ_WRITE', - ]; - - 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(MountPermissions::class, \Google\Cloud\BareMetalSolution\V2\NfsShare_MountPermissions::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/State.php deleted file mode 100644 index 33726a32ec7b..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.baremetalsolution.v2.NfsShare.State - */ -class State -{ - /** - * The share is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The share has been provisioned. - * - * Generated from protobuf enum PROVISIONED = 1; - */ - const PROVISIONED = 1; - /** - * The NFS Share is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The NFS Share is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The NFS Share has been requested to be deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONED => 'PROVISIONED', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - ]; - - 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\BareMetalSolution\V2\NfsShare_State::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/StorageType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/StorageType.php deleted file mode 100644 index 3d002a9bee9f..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/NfsShare/StorageType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.NfsShare.StorageType - */ -class StorageType -{ - /** - * The storage type for this volume is unknown. - * - * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; - */ - const STORAGE_TYPE_UNSPECIFIED = 0; - /** - * The storage type for this volume is SSD. - * - * Generated from protobuf enum SSD = 1; - */ - const SSD = 1; - /** - * This storage type for this volume is HDD. - * - * Generated from protobuf enum HDD = 2; - */ - const HDD = 2; - - private static $valueToName = [ - self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', - self::SSD => 'SSD', - self::HDD => 'HDD', - ]; - - 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(StorageType::class, \Google\Cloud\BareMetalSolution\V2\NfsShare_StorageType::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OSImage.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OSImage.php deleted file mode 100644 index 46442969f67e..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OSImage.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.baremetalsolution.v2.OSImage - */ -class OSImage extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. OS Image's unique name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * OS Image code. - * - * Generated from protobuf field string code = 2; - */ - protected $code = ''; - /** - * OS Image description. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Instance types this image is applicable to. - * [Available - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field repeated string applicable_instance_types = 4; - */ - private $applicable_instance_types; - /** - * Network templates that can be used with this OS Image. - * - * Generated from protobuf field repeated string supported_network_templates = 5; - */ - private $supported_network_templates; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. OS Image's unique name. - * @type string $code - * OS Image code. - * @type string $description - * OS Image description. - * @type array|\Google\Protobuf\Internal\RepeatedField $applicable_instance_types - * Instance types this image is applicable to. - * [Available - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_network_templates - * Network templates that can be used with this OS Image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Osimage::initOnce(); - parent::__construct($data); - } - - /** - * Output only. OS Image's unique name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. OS Image's unique name. - * - * 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; - } - - /** - * OS Image code. - * - * Generated from protobuf field string code = 2; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * OS Image code. - * - * Generated from protobuf field string code = 2; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - - /** - * OS Image description. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * OS Image description. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Instance types this image is applicable to. - * [Available - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field repeated string applicable_instance_types = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getApplicableInstanceTypes() - { - return $this->applicable_instance_types; - } - - /** - * Instance types this image is applicable to. - * [Available - * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - * - * Generated from protobuf field repeated string applicable_instance_types = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setApplicableInstanceTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->applicable_instance_types = $arr; - - return $this; - } - - /** - * Network templates that can be used with this OS Image. - * - * Generated from protobuf field repeated string supported_network_templates = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedNetworkTemplates() - { - return $this->supported_network_templates; - } - - /** - * Network templates that can be used with this OS Image. - * - * Generated from protobuf field repeated string supported_network_templates = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedNetworkTemplates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->supported_network_templates = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OperationMetadata.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OperationMetadata.php deleted file mode 100644 index e6061c8bf259..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.baremetalsolution.v2.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 action 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 requested the cancellation - * of the operation. Operations that have been successfully 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 with 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 action 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 requested the cancellation - * of the operation. Operations that have been successfully 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 with the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Baremetalsolution::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 action 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 action 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 requested the cancellation - * of the operation. Operations that have been successfully 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 requested the cancellation - * of the operation. Operations that have been successfully 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 with 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 with 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig.php deleted file mode 100644 index 9aedd8c65bfa..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig.php +++ /dev/null @@ -1,540 +0,0 @@ -google.cloud.baremetalsolution.v2.ProvisioningConfig - */ -class ProvisioningConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The system-generated name of the provisioning config. This - * follows the UUID format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Instances to be created. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.InstanceConfig instances = 2; - */ - private $instances; - /** - * Networks to be created. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig networks = 3; - */ - private $networks; - /** - * Volumes to be created. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig volumes = 4; - */ - private $volumes; - /** - * A generated ticket id to track provisioning request. - * - * Generated from protobuf field string ticket_id = 5; - */ - protected $ticket_id = ''; - /** - * A service account to enable customers to access instance credentials upon - * handover. - * - * Generated from protobuf field string handover_service_account = 6; - */ - protected $handover_service_account = ''; - /** - * Email provided to send a confirmation with provisioning config to. - * Deprecated in favour of email field in request messages. - * - * Generated from protobuf field string email = 7 [deprecated = true]; - * @deprecated - */ - protected $email = ''; - /** - * Output only. State of ProvisioningConfig. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. Location name of this ProvisioningConfig. - * It is optional only for Intake UI transition period. - * - * Generated from protobuf field string location = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $location = ''; - /** - * Output only. Last update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. URI to Cloud Console UI view of this provisioning config. - * - * Generated from protobuf field string cloud_console_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cloud_console_uri = ''; - /** - * If true, VPC SC is enabled for the cluster. - * - * Generated from protobuf field bool vpc_sc_enabled = 12; - */ - protected $vpc_sc_enabled = false; - /** - * Optional status messages associated with the FAILED state. - * - * Generated from protobuf field string status_message = 13; - */ - protected $status_message = ''; - /** - * Optional. The user-defined identifier of the provisioning config. - * - * Generated from protobuf field string custom_id = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The system-generated name of the provisioning config. This - * follows the UUID format. - * @type array<\Google\Cloud\BareMetalSolution\V2\InstanceConfig>|\Google\Protobuf\Internal\RepeatedField $instances - * Instances to be created. - * @type array<\Google\Cloud\BareMetalSolution\V2\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $networks - * Networks to be created. - * @type array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig>|\Google\Protobuf\Internal\RepeatedField $volumes - * Volumes to be created. - * @type string $ticket_id - * A generated ticket id to track provisioning request. - * @type string $handover_service_account - * A service account to enable customers to access instance credentials upon - * handover. - * @type string $email - * Email provided to send a confirmation with provisioning config to. - * Deprecated in favour of email field in request messages. - * @type int $state - * Output only. State of ProvisioningConfig. - * @type string $location - * Optional. Location name of this ProvisioningConfig. - * It is optional only for Intake UI transition period. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update timestamp. - * @type string $cloud_console_uri - * Output only. URI to Cloud Console UI view of this provisioning config. - * @type bool $vpc_sc_enabled - * If true, VPC SC is enabled for the cluster. - * @type string $status_message - * Optional status messages associated with the FAILED state. - * @type string $custom_id - * Optional. The user-defined identifier of the provisioning config. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The system-generated name of the provisioning config. This - * follows the UUID format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The system-generated name of the provisioning config. This - * follows the UUID format. - * - * 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; - } - - /** - * Instances to be created. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.InstanceConfig instances = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * Instances to be created. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.InstanceConfig instances = 2; - * @param array<\Google\Cloud\BareMetalSolution\V2\InstanceConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\InstanceConfig::class); - $this->instances = $arr; - - return $this; - } - - /** - * Networks to be created. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig networks = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworks() - { - return $this->networks; - } - - /** - * Networks to be created. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.NetworkConfig networks = 3; - * @param array<\Google\Cloud\BareMetalSolution\V2\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\NetworkConfig::class); - $this->networks = $arr; - - return $this; - } - - /** - * Volumes to be created. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig volumes = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * Volumes to be created. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig volumes = 4; - * @param array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeConfig::class); - $this->volumes = $arr; - - return $this; - } - - /** - * A generated ticket id to track provisioning request. - * - * Generated from protobuf field string ticket_id = 5; - * @return string - */ - public function getTicketId() - { - return $this->ticket_id; - } - - /** - * A generated ticket id to track provisioning request. - * - * Generated from protobuf field string ticket_id = 5; - * @param string $var - * @return $this - */ - public function setTicketId($var) - { - GPBUtil::checkString($var, True); - $this->ticket_id = $var; - - return $this; - } - - /** - * A service account to enable customers to access instance credentials upon - * handover. - * - * Generated from protobuf field string handover_service_account = 6; - * @return string - */ - public function getHandoverServiceAccount() - { - return $this->handover_service_account; - } - - /** - * A service account to enable customers to access instance credentials upon - * handover. - * - * Generated from protobuf field string handover_service_account = 6; - * @param string $var - * @return $this - */ - public function setHandoverServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->handover_service_account = $var; - - return $this; - } - - /** - * Email provided to send a confirmation with provisioning config to. - * Deprecated in favour of email field in request messages. - * - * Generated from protobuf field string email = 7 [deprecated = true]; - * @return string - * @deprecated - */ - public function getEmail() - { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - return $this->email; - } - - /** - * Email provided to send a confirmation with provisioning config to. - * Deprecated in favour of email field in request messages. - * - * Generated from protobuf field string email = 7 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEmail($var) - { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Output only. State of ProvisioningConfig. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of ProvisioningConfig. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Location name of this ProvisioningConfig. - * It is optional only for Intake UI transition period. - * - * Generated from protobuf field string location = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Optional. Location name of this ProvisioningConfig. - * It is optional only for Intake UI transition period. - * - * Generated from protobuf field string location = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Output only. Last update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.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 timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.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. URI to Cloud Console UI view of this provisioning config. - * - * Generated from protobuf field string cloud_console_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCloudConsoleUri() - { - return $this->cloud_console_uri; - } - - /** - * Output only. URI to Cloud Console UI view of this provisioning config. - * - * Generated from protobuf field string cloud_console_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCloudConsoleUri($var) - { - GPBUtil::checkString($var, True); - $this->cloud_console_uri = $var; - - return $this; - } - - /** - * If true, VPC SC is enabled for the cluster. - * - * Generated from protobuf field bool vpc_sc_enabled = 12; - * @return bool - */ - public function getVpcScEnabled() - { - return $this->vpc_sc_enabled; - } - - /** - * If true, VPC SC is enabled for the cluster. - * - * Generated from protobuf field bool vpc_sc_enabled = 12; - * @param bool $var - * @return $this - */ - public function setVpcScEnabled($var) - { - GPBUtil::checkBool($var); - $this->vpc_sc_enabled = $var; - - return $this; - } - - /** - * Optional status messages associated with the FAILED state. - * - * Generated from protobuf field string status_message = 13; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Optional status messages associated with the FAILED state. - * - * Generated from protobuf field string status_message = 13; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Optional. The user-defined identifier of the provisioning config. - * - * Generated from protobuf field string custom_id = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCustomId() - { - return $this->custom_id; - } - - /** - * Optional. The user-defined identifier of the provisioning config. - * - * Generated from protobuf field string custom_id = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCustomId($var) - { - GPBUtil::checkString($var, True); - $this->custom_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig/State.php deleted file mode 100644 index 227318e80823..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningConfig/State.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.baremetalsolution.v2.ProvisioningConfig.State - */ -class State -{ - /** - * State wasn't specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * ProvisioningConfig is a draft and can be freely modified. - * - * Generated from protobuf enum DRAFT = 1; - */ - const DRAFT = 1; - /** - * ProvisioningConfig was already submitted and cannot be modified. - * - * Generated from protobuf enum SUBMITTED = 2; - */ - const SUBMITTED = 2; - /** - * ProvisioningConfig was in the provisioning state. Initially this state - * comes from the work order table in big query when SNOW is used. Later - * this field can be set by the work order API. - * - * Generated from protobuf enum PROVISIONING = 3; - */ - const PROVISIONING = 3; - /** - * ProvisioningConfig was provisioned, meaning the resources exist. - * - * Generated from protobuf enum PROVISIONED = 4; - */ - const PROVISIONED = 4; - /** - * ProvisioningConfig was validated. A validation tool will be run to - * set this state. - * - * Generated from protobuf enum VALIDATED = 5; - */ - const VALIDATED = 5; - /** - * ProvisioningConfig was canceled. - * - * Generated from protobuf enum CANCELLED = 6; - */ - const CANCELLED = 6; - /** - * The request is submitted for provisioning, with error return. - * - * Generated from protobuf enum FAILED = 7; - */ - const FAILED = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::DRAFT => 'DRAFT', - self::SUBMITTED => 'SUBMITTED', - self::PROVISIONING => 'PROVISIONING', - self::PROVISIONED => 'PROVISIONED', - self::VALIDATED => 'VALIDATED', - self::CANCELLED => 'CANCELLED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig_State::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota.php deleted file mode 100644 index e93a6c0f70a2..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.baremetalsolution.v2.ProvisioningQuota - */ -class ProvisioningQuota extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the provisioning quota. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The asset type of this provisioning quota. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2; - */ - protected $asset_type = 0; - /** - * The gcp service of the provisioning quota. - * - * Generated from protobuf field string gcp_service = 3; - */ - protected $gcp_service = ''; - /** - * The specific location of the provisioining quota. - * - * Generated from protobuf field string location = 4; - */ - protected $location = ''; - /** - * The available count of the provisioning quota. - * - * Generated from protobuf field int32 available_count = 5; - */ - protected $available_count = 0; - protected $quota; - protected $availability; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the provisioning quota. - * @type int $asset_type - * The asset type of this provisioning quota. - * @type string $gcp_service - * The gcp service of the provisioning quota. - * @type string $location - * The specific location of the provisioining quota. - * @type int $available_count - * The available count of the provisioning quota. - * @type \Google\Cloud\BareMetalSolution\V2\InstanceQuota $instance_quota - * Instance quota. - * @type int|string $server_count - * Server count. - * @type int|string $network_bandwidth - * Network bandwidth, Gbps - * @type int|string $storage_gib - * Storage size (GB). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the provisioning quota. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the provisioning quota. - * - * 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; - } - - /** - * The asset type of this provisioning quota. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2; - * @return int - */ - public function getAssetType() - { - return $this->asset_type; - } - - /** - * The asset type of this provisioning quota. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2; - * @param int $var - * @return $this - */ - public function setAssetType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningQuota\AssetType::class); - $this->asset_type = $var; - - return $this; - } - - /** - * The gcp service of the provisioning quota. - * - * Generated from protobuf field string gcp_service = 3; - * @return string - */ - public function getGcpService() - { - return $this->gcp_service; - } - - /** - * The gcp service of the provisioning quota. - * - * Generated from protobuf field string gcp_service = 3; - * @param string $var - * @return $this - */ - public function setGcpService($var) - { - GPBUtil::checkString($var, True); - $this->gcp_service = $var; - - return $this; - } - - /** - * The specific location of the provisioining quota. - * - * Generated from protobuf field string location = 4; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The specific location of the provisioining quota. - * - * Generated from protobuf field string location = 4; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * The available count of the provisioning quota. - * - * Generated from protobuf field int32 available_count = 5; - * @return int - */ - public function getAvailableCount() - { - return $this->available_count; - } - - /** - * The available count of the provisioning quota. - * - * Generated from protobuf field int32 available_count = 5; - * @param int $var - * @return $this - */ - public function setAvailableCount($var) - { - GPBUtil::checkInt32($var); - $this->available_count = $var; - - return $this; - } - - /** - * Instance quota. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6; - * @return \Google\Cloud\BareMetalSolution\V2\InstanceQuota|null - */ - public function getInstanceQuota() - { - return $this->readOneof(6); - } - - public function hasInstanceQuota() - { - return $this->hasOneof(6); - } - - /** - * Instance quota. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6; - * @param \Google\Cloud\BareMetalSolution\V2\InstanceQuota $var - * @return $this - */ - public function setInstanceQuota($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\InstanceQuota::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Server count. - * - * Generated from protobuf field int64 server_count = 7; - * @return int|string - */ - public function getServerCount() - { - return $this->readOneof(7); - } - - public function hasServerCount() - { - return $this->hasOneof(7); - } - - /** - * Server count. - * - * Generated from protobuf field int64 server_count = 7; - * @param int|string $var - * @return $this - */ - public function setServerCount($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Network bandwidth, Gbps - * - * Generated from protobuf field int64 network_bandwidth = 8; - * @return int|string - */ - public function getNetworkBandwidth() - { - return $this->readOneof(8); - } - - public function hasNetworkBandwidth() - { - return $this->hasOneof(8); - } - - /** - * Network bandwidth, Gbps - * - * Generated from protobuf field int64 network_bandwidth = 8; - * @param int|string $var - * @return $this - */ - public function setNetworkBandwidth($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Storage size (GB). - * - * Generated from protobuf field int64 storage_gib = 9; - * @return int|string - */ - public function getStorageGib() - { - return $this->readOneof(9); - } - - public function hasStorageGib() - { - return $this->hasOneof(9); - } - - /** - * Storage size (GB). - * - * Generated from protobuf field int64 storage_gib = 9; - * @param int|string $var - * @return $this - */ - public function setStorageGib($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * @return string - */ - public function getQuota() - { - return $this->whichOneof("quota"); - } - - /** - * @return string - */ - public function getAvailability() - { - return $this->whichOneof("availability"); - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota/AssetType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota/AssetType.php deleted file mode 100644 index ed4619ec1e63..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ProvisioningQuota/AssetType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType - */ -class AssetType -{ - /** - * The unspecified type. - * - * Generated from protobuf enum ASSET_TYPE_UNSPECIFIED = 0; - */ - const ASSET_TYPE_UNSPECIFIED = 0; - /** - * The server asset type. - * - * Generated from protobuf enum ASSET_TYPE_SERVER = 1; - */ - const ASSET_TYPE_SERVER = 1; - /** - * The storage asset type. - * - * Generated from protobuf enum ASSET_TYPE_STORAGE = 2; - */ - const ASSET_TYPE_STORAGE = 2; - /** - * The network asset type. - * - * Generated from protobuf enum ASSET_TYPE_NETWORK = 3; - */ - const ASSET_TYPE_NETWORK = 3; - - private static $valueToName = [ - self::ASSET_TYPE_UNSPECIFIED => 'ASSET_TYPE_UNSPECIFIED', - self::ASSET_TYPE_SERVER => 'ASSET_TYPE_SERVER', - self::ASSET_TYPE_STORAGE => 'ASSET_TYPE_STORAGE', - self::ASSET_TYPE_NETWORK => 'ASSET_TYPE_NETWORK', - ]; - - 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(AssetType::class, \Google\Cloud\BareMetalSolution\V2\ProvisioningQuota_AssetType::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameInstanceRequest.php deleted file mode 100644 index 168cff7da429..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameInstanceRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.baremetalsolution.v2.RenameInstanceRequest - */ -class RenameInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `name` field is used to identify the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new `id` of the instance. - * - * Generated from protobuf field string new_instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $new_instance_id = ''; - - /** - * @param string $name Required. The `name` field is used to identify the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * Please see {@see BareMetalSolutionClient::instanceName()} for help formatting this field. - * @param string $newInstanceId Required. The new `id` of the instance. - * - * @return \Google\Cloud\BareMetalSolution\V2\RenameInstanceRequest - * - * @experimental - */ - public static function build(string $name, string $newInstanceId): self - { - return (new self()) - ->setName($name) - ->setNewInstanceId($newInstanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The `name` field is used to identify the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * @type string $new_instance_id - * Required. The new `id` of the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `name` field is used to identify the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The `name` field is used to identify the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new `id` of the instance. - * - * Generated from protobuf field string new_instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNewInstanceId() - { - return $this->new_instance_id; - } - - /** - * Required. The new `id` of the instance. - * - * Generated from protobuf field string new_instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNewInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->new_instance_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNetworkRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNetworkRequest.php deleted file mode 100644 index ee6b7a98640d..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNetworkRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.baremetalsolution.v2.RenameNetworkRequest - */ -class RenameNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `name` field is used to identify the network. - * Format: projects/{project}/locations/{location}/networks/{network} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new `id` of the network. - * - * Generated from protobuf field string new_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $new_network_id = ''; - - /** - * @param string $name Required. The `name` field is used to identify the network. - * Format: projects/{project}/locations/{location}/networks/{network} - * Please see {@see BareMetalSolutionClient::networkName()} for help formatting this field. - * @param string $newNetworkId Required. The new `id` of the network. - * - * @return \Google\Cloud\BareMetalSolution\V2\RenameNetworkRequest - * - * @experimental - */ - public static function build(string $name, string $newNetworkId): self - { - return (new self()) - ->setName($name) - ->setNewNetworkId($newNetworkId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The `name` field is used to identify the network. - * Format: projects/{project}/locations/{location}/networks/{network} - * @type string $new_network_id - * Required. The new `id` of the network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `name` field is used to identify the network. - * Format: projects/{project}/locations/{location}/networks/{network} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The `name` field is used to identify the network. - * Format: projects/{project}/locations/{location}/networks/{network} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new `id` of the network. - * - * Generated from protobuf field string new_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNewNetworkId() - { - return $this->new_network_id; - } - - /** - * Required. The new `id` of the network. - * - * Generated from protobuf field string new_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNewNetworkId($var) - { - GPBUtil::checkString($var, True); - $this->new_network_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNfsShareRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNfsShareRequest.php deleted file mode 100644 index 32c07a6d6213..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameNfsShareRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.baremetalsolution.v2.RenameNfsShareRequest - */ -class RenameNfsShareRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `name` field is used to identify the nfsshare. - * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new `id` of the nfsshare. - * - * Generated from protobuf field string new_nfsshare_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $new_nfsshare_id = ''; - - /** - * @param string $name Required. The `name` field is used to identify the nfsshare. - * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} - * Please see {@see BareMetalSolutionClient::nFSShareName()} for help formatting this field. - * @param string $newNfsshareId Required. The new `id` of the nfsshare. - * - * @return \Google\Cloud\BareMetalSolution\V2\RenameNfsShareRequest - * - * @experimental - */ - public static function build(string $name, string $newNfsshareId): self - { - return (new self()) - ->setName($name) - ->setNewNfsshareId($newNfsshareId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The `name` field is used to identify the nfsshare. - * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} - * @type string $new_nfsshare_id - * Required. The new `id` of the nfsshare. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `name` field is used to identify the nfsshare. - * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The `name` field is used to identify the nfsshare. - * Format: projects/{project}/locations/{location}/nfsshares/{nfsshare} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new `id` of the nfsshare. - * - * Generated from protobuf field string new_nfsshare_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNewNfsshareId() - { - return $this->new_nfsshare_id; - } - - /** - * Required. The new `id` of the nfsshare. - * - * Generated from protobuf field string new_nfsshare_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNewNfsshareId($var) - { - GPBUtil::checkString($var, True); - $this->new_nfsshare_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameVolumeRequest.php deleted file mode 100644 index c74a86a8d25b..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RenameVolumeRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.baremetalsolution.v2.RenameVolumeRequest - */ -class RenameVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `name` field is used to identify the volume. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new `id` of the volume. - * - * Generated from protobuf field string new_volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $new_volume_id = ''; - - /** - * @param string $name Required. The `name` field is used to identify the volume. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * Please see {@see BareMetalSolutionClient::volumeName()} for help formatting this field. - * @param string $newVolumeId Required. The new `id` of the volume. - * - * @return \Google\Cloud\BareMetalSolution\V2\RenameVolumeRequest - * - * @experimental - */ - public static function build(string $name, string $newVolumeId): self - { - return (new self()) - ->setName($name) - ->setNewVolumeId($newVolumeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The `name` field is used to identify the volume. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * @type string $new_volume_id - * Required. The new `id` of the volume. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `name` field is used to identify the volume. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The `name` field is used to identify the volume. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new `id` of the volume. - * - * Generated from protobuf field string new_volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNewVolumeId() - { - return $this->new_volume_id; - } - - /** - * Required. The new `id` of the volume. - * - * Generated from protobuf field string new_volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNewVolumeId($var) - { - GPBUtil::checkString($var, True); - $this->new_volume_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceRequest.php deleted file mode 100644 index fad5d2770386..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.ResetInstanceRequest - */ -class ResetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\ResetInstanceRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceResponse.php deleted file mode 100644 index 013bd1cf5868..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResetInstanceResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.baremetalsolution.v2.ResetInstanceResponse - */ -class ResetInstanceResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Baremetalsolution::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResizeVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResizeVolumeRequest.php deleted file mode 100644 index 7cb2d386c502..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ResizeVolumeRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.baremetalsolution.v2.ResizeVolumeRequest - */ -class ResizeVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Volume to resize. - * - * Generated from protobuf field string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $volume = ''; - /** - * New Volume size, in GiB. - * - * Generated from protobuf field int64 size_gib = 2; - */ - protected $size_gib = 0; - - /** - * @param string $volume Required. Volume to resize. Please see - * {@see BareMetalSolutionClient::volumeName()} for help formatting this field. - * @param int $sizeGib New Volume size, in GiB. - * - * @return \Google\Cloud\BareMetalSolution\V2\ResizeVolumeRequest - * - * @experimental - */ - public static function build(string $volume, int $sizeGib): self - { - return (new self()) - ->setVolume($volume) - ->setSizeGib($sizeGib); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $volume - * Required. Volume to resize. - * @type int|string $size_gib - * New Volume size, in GiB. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. Volume to resize. - * - * Generated from protobuf field string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getVolume() - { - return $this->volume; - } - - /** - * Required. Volume to resize. - * - * Generated from protobuf field string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVolume($var) - { - GPBUtil::checkString($var, True); - $this->volume = $var; - - return $this; - } - - /** - * New Volume size, in GiB. - * - * Generated from protobuf field int64 size_gib = 2; - * @return int|string - */ - public function getSizeGib() - { - return $this->size_gib; - } - - /** - * New Volume size, in GiB. - * - * Generated from protobuf field int64 size_gib = 2; - * @param int|string $var - * @return $this - */ - public function setSizeGib($var) - { - GPBUtil::checkInt64($var); - $this->size_gib = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RestoreVolumeSnapshotRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RestoreVolumeSnapshotRequest.php deleted file mode 100644 index 2f0b9e7c7fff..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/RestoreVolumeSnapshotRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest - */ -class RestoreVolumeSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the snapshot which will be used to restore its parent - * volume. - * - * Generated from protobuf field string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $volume_snapshot = ''; - - /** - * @param string $volumeSnapshot Required. Name of the snapshot which will be used to restore its parent - * volume. Please see - * {@see BareMetalSolutionClient::volumeSnapshotName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\RestoreVolumeSnapshotRequest - * - * @experimental - */ - public static function build(string $volumeSnapshot): self - { - return (new self()) - ->setVolumeSnapshot($volumeSnapshot); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $volume_snapshot - * Required. Name of the snapshot which will be used to restore its parent - * volume. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the snapshot which will be used to restore its parent - * volume. - * - * Generated from protobuf field string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getVolumeSnapshot() - { - return $this->volume_snapshot; - } - - /** - * Required. Name of the snapshot which will be used to restore its parent - * volume. - * - * Generated from protobuf field string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVolumeSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->volume_snapshot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SSHKey.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SSHKey.php deleted file mode 100644 index f219549b1c98..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SSHKey.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.baremetalsolution.v2.SSHKey - */ -class SSHKey extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of this SSH key. - * Currently, the only valid value for the location is "global". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The public SSH key. This must be in OpenSSH .authorized_keys format. - * - * Generated from protobuf field string public_key = 2; - */ - protected $public_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of this SSH key. - * Currently, the only valid value for the location is "global". - * @type string $public_key - * The public SSH key. This must be in OpenSSH .authorized_keys format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\SshKey::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of this SSH key. - * Currently, the only valid value for the location is "global". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of this SSH key. - * Currently, the only valid value for the location is "global". - * - * 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; - } - - /** - * The public SSH key. This must be in OpenSSH .authorized_keys format. - * - * Generated from protobuf field string public_key = 2; - * @return string - */ - public function getPublicKey() - { - return $this->public_key; - } - - /** - * The public SSH key. This must be in OpenSSH .authorized_keys format. - * - * Generated from protobuf field string public_key = 2; - * @param string $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkString($var, True); - $this->public_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate.php deleted file mode 100644 index 9374bd6b1e69..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.baremetalsolution.v2.ServerNetworkTemplate - */ -class ServerNetworkTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Template's unique name. The full resource name follows the - * pattern: - * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` - * Generally, the {server_network_template} follows the syntax of - * "bond" or "nic". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Instance types this template is applicable to. - * - * Generated from protobuf field repeated string applicable_instance_types = 2; - */ - private $applicable_instance_types; - /** - * Logical interfaces. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; - */ - private $logical_interfaces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Template's unique name. The full resource name follows the - * pattern: - * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` - * Generally, the {server_network_template} follows the syntax of - * "bond" or "nic". - * @type array|\Google\Protobuf\Internal\RepeatedField $applicable_instance_types - * Instance types this template is applicable to. - * @type array<\Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $logical_interfaces - * Logical interfaces. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Template's unique name. The full resource name follows the - * pattern: - * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` - * Generally, the {server_network_template} follows the syntax of - * "bond" or "nic". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Template's unique name. The full resource name follows the - * pattern: - * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` - * Generally, the {server_network_template} follows the syntax of - * "bond" or "nic". - * - * 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; - } - - /** - * Instance types this template is applicable to. - * - * Generated from protobuf field repeated string applicable_instance_types = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getApplicableInstanceTypes() - { - return $this->applicable_instance_types; - } - - /** - * Instance types this template is applicable to. - * - * Generated from protobuf field repeated string applicable_instance_types = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setApplicableInstanceTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->applicable_instance_types = $arr; - - return $this; - } - - /** - * Logical interfaces. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogicalInterfaces() - { - return $this->logical_interfaces; - } - - /** - * Logical interfaces. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; - * @param array<\Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate\LogicalInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogicalInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate\LogicalInterface::class); - $this->logical_interfaces = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface.php deleted file mode 100644 index 96085db3f668..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface - */ -class LogicalInterface extends \Google\Protobuf\Internal\Message -{ - /** - * Interface name. - * This is not a globally unique identifier. - * Name is unique only inside the ServerNetworkTemplate. This is of syntax - * or - * and forms part of the network template name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Interface type. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; - */ - protected $type = 0; - /** - * If true, interface must have network connected. - * - * Generated from protobuf field bool required = 3; - */ - protected $required = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Interface name. - * This is not a globally unique identifier. - * Name is unique only inside the ServerNetworkTemplate. This is of syntax - * or - * and forms part of the network template name. - * @type int $type - * Interface type. - * @type bool $required - * If true, interface must have network connected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Interface name. - * This is not a globally unique identifier. - * Name is unique only inside the ServerNetworkTemplate. This is of syntax - * or - * and forms part of the network template name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Interface name. - * This is not a globally unique identifier. - * Name is unique only inside the ServerNetworkTemplate. This is of syntax - * or - * and forms part of the network template name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Interface type. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Interface type. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate\LogicalInterface\InterfaceType::class); - $this->type = $var; - - return $this; - } - - /** - * If true, interface must have network connected. - * - * Generated from protobuf field bool required = 3; - * @return bool - */ - public function getRequired() - { - return $this->required; - } - - /** - * If true, interface must have network connected. - * - * Generated from protobuf field bool required = 3; - * @param bool $var - * @return $this - */ - public function setRequired($var) - { - GPBUtil::checkBool($var); - $this->required = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LogicalInterface::class, \Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate_LogicalInterface::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface/InterfaceType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface/InterfaceType.php deleted file mode 100644 index 45e03a1e7723..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/ServerNetworkTemplate/LogicalInterface/InterfaceType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType - */ -class InterfaceType -{ - /** - * Unspecified value. - * - * Generated from protobuf enum INTERFACE_TYPE_UNSPECIFIED = 0; - */ - const INTERFACE_TYPE_UNSPECIFIED = 0; - /** - * Bond interface type. - * - * Generated from protobuf enum BOND = 1; - */ - const BOND = 1; - /** - * NIC interface type. - * - * Generated from protobuf enum NIC = 2; - */ - const NIC = 2; - - private static $valueToName = [ - self::INTERFACE_TYPE_UNSPECIFIED => 'INTERFACE_TYPE_UNSPECIFIED', - self::BOND => 'BOND', - self::NIC => 'NIC', - ]; - - 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(InterfaceType::class, \Google\Cloud\BareMetalSolution\V2\ServerNetworkTemplate_LogicalInterface_InterfaceType::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceRequest.php deleted file mode 100644 index 11a471958fad..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.StartInstanceRequest - */ -class StartInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\StartInstanceRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceResponse.php deleted file mode 100644 index 078df2aa2efa..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StartInstanceResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.baremetalsolution.v2.StartInstanceResponse - */ -class StartInstanceResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceRequest.php deleted file mode 100644 index c838273d1284..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.baremetalsolution.v2.StopInstanceRequest - */ -class StopInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see BareMetalSolutionClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\BareMetalSolution\V2\StopInstanceRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceResponse.php deleted file mode 100644 index f481f45b43fe..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/StopInstanceResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.baremetalsolution.v2.StopInstanceResponse - */ -class StopInstanceResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigRequest.php deleted file mode 100644 index 2def6642afc8..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest - */ -class SubmitProvisioningConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent project and location containing the - * ProvisioningConfig. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ProvisioningConfig to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $provisioning_config = null; - /** - * Optional. Email provided to send a confirmation with provisioning config - * to. - * - * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $email = ''; - - /** - * @param string $parent Required. The parent project and location containing the - * ProvisioningConfig. Please see - * {@see BareMetalSolutionClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig Required. The ProvisioningConfig to create. - * - * @return \Google\Cloud\BareMetalSolution\V2\SubmitProvisioningConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig): self - { - return (new self()) - ->setParent($parent) - ->setProvisioningConfig($provisioningConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent project and location containing the - * ProvisioningConfig. - * @type \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioning_config - * Required. The ProvisioningConfig to create. - * @type string $email - * Optional. Email provided to send a confirmation with provisioning config - * to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent project and location containing the - * ProvisioningConfig. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent project and location containing the - * ProvisioningConfig. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ProvisioningConfig to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig|null - */ - public function getProvisioningConfig() - { - return $this->provisioning_config; - } - - public function hasProvisioningConfig() - { - return isset($this->provisioning_config); - } - - public function clearProvisioningConfig() - { - unset($this->provisioning_config); - } - - /** - * Required. The ProvisioningConfig to create. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $var - * @return $this - */ - public function setProvisioningConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig::class); - $this->provisioning_config = $var; - - return $this; - } - - /** - * Optional. Email provided to send a confirmation with provisioning config - * to. - * - * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Optional. Email provided to send a confirmation with provisioning config - * to. - * - * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigResponse.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigResponse.php deleted file mode 100644 index 35a3c9651f5a..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/SubmitProvisioningConfigResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse - */ -class SubmitProvisioningConfigResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The submitted provisioning config. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1; - */ - protected $provisioning_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioning_config - * The submitted provisioning config. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * The submitted provisioning config. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1; - * @return \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig|null - */ - public function getProvisioningConfig() - { - return $this->provisioning_config; - } - - public function hasProvisioningConfig() - { - return isset($this->provisioning_config); - } - - public function clearProvisioningConfig() - { - unset($this->provisioning_config); - } - - /** - * The submitted provisioning config. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1; - * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $var - * @return $this - */ - public function setProvisioningConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig::class); - $this->provisioning_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateInstanceRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateInstanceRequest.php deleted file mode 100644 index 60546eef353a..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateInstanceRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.baremetalsolution.v2.UpdateInstanceRequest - */ -class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The server to update. - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * The list of fields to update. - * The currently supported fields are: - * `labels` - * `hyperthreading_enabled` - * `os_image` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\BareMetalSolution\V2\Instance $instance Required. The server to update. - * - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/instances/{instance} - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. - * The currently supported fields are: - * `labels` - * `hyperthreading_enabled` - * `os_image` - * - * @return \Google\Cloud\BareMetalSolution\V2\UpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BareMetalSolution\V2\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BareMetalSolution\V2\Instance $instance - * Required. The server to update. - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/instances/{instance} - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to update. - * The currently supported fields are: - * `labels` - * `hyperthreading_enabled` - * `os_image` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. The server to update. - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The server to update. - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * The list of fields to update. - * The currently supported fields are: - * `labels` - * `hyperthreading_enabled` - * `os_image` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to update. - * The currently supported fields are: - * `labels` - * `hyperthreading_enabled` - * `os_image` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNetworkRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNetworkRequest.php deleted file mode 100644 index 87eeb260f62b..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNetworkRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.baremetalsolution.v2.UpdateNetworkRequest - */ -class UpdateNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The network to update. - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/networks/{network} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network = null; - /** - * The list of fields to update. - * The only currently supported fields are: - * `labels`, `reservations`, `vrf.vlan_attachments` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\BareMetalSolution\V2\Network $network Required. The network to update. - * - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/networks/{network} - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. - * The only currently supported fields are: - * `labels`, `reservations`, `vrf.vlan_attachments` - * - * @return \Google\Cloud\BareMetalSolution\V2\UpdateNetworkRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BareMetalSolution\V2\Network $network, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setNetwork($network) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BareMetalSolution\V2\Network $network - * Required. The network to update. - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/networks/{network} - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to update. - * The only currently supported fields are: - * `labels`, `reservations`, `vrf.vlan_attachments` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * Required. The network to update. - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/networks/{network} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\Network|null - */ - public function getNetwork() - { - return $this->network; - } - - public function hasNetwork() - { - return isset($this->network); - } - - public function clearNetwork() - { - unset($this->network); - } - - /** - * Required. The network to update. - * The `name` field is used to identify the instance to update. - * Format: projects/{project}/locations/{location}/networks/{network} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\Network $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Network::class); - $this->network = $var; - - return $this; - } - - /** - * The list of fields to update. - * The only currently supported fields are: - * `labels`, `reservations`, `vrf.vlan_attachments` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to update. - * The only currently supported fields are: - * `labels`, `reservations`, `vrf.vlan_attachments` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNfsShareRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNfsShareRequest.php deleted file mode 100644 index 63a98b61ec2d..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateNfsShareRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.baremetalsolution.v2.UpdateNfsShareRequest - */ -class UpdateNfsShareRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The NFS share to update. - * The `name` field is used to identify the NFS share to update. - * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $nfs_share = null; - /** - * The list of fields to update. - * The only currently supported fields are: - * `labels` - * `allowed_clients` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\BareMetalSolution\V2\NfsShare $nfsShare Required. The NFS share to update. - * - * The `name` field is used to identify the NFS share to update. - * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. - * The only currently supported fields are: - * `labels` - * `allowed_clients` - * - * @return \Google\Cloud\BareMetalSolution\V2\UpdateNfsShareRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BareMetalSolution\V2\NfsShare $nfsShare, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setNfsShare($nfsShare) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BareMetalSolution\V2\NfsShare $nfs_share - * Required. The NFS share to update. - * The `name` field is used to identify the NFS share to update. - * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to update. - * The only currently supported fields are: - * `labels` - * `allowed_clients` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce(); - parent::__construct($data); - } - - /** - * Required. The NFS share to update. - * The `name` field is used to identify the NFS share to update. - * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\NfsShare|null - */ - public function getNfsShare() - { - return $this->nfs_share; - } - - public function hasNfsShare() - { - return isset($this->nfs_share); - } - - public function clearNfsShare() - { - unset($this->nfs_share); - } - - /** - * Required. The NFS share to update. - * The `name` field is used to identify the NFS share to update. - * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\NfsShare $var - * @return $this - */ - public function setNfsShare($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\NfsShare::class); - $this->nfs_share = $var; - - return $this; - } - - /** - * The list of fields to update. - * The only currently supported fields are: - * `labels` - * `allowed_clients` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to update. - * The only currently supported fields are: - * `labels` - * `allowed_clients` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateProvisioningConfigRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateProvisioningConfigRequest.php deleted file mode 100644 index d9f98f9de392..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateProvisioningConfigRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest - */ -class UpdateProvisioningConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ProvisioningConfig to update. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $provisioning_config = null; - /** - * Required. The list of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. Email provided to send a confirmation with provisioning config - * to. - * - * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $email = ''; - - /** - * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig Required. The ProvisioningConfig to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. - * - * @return \Google\Cloud\BareMetalSolution\V2\UpdateProvisioningConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setProvisioningConfig($provisioningConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioning_config - * Required. The ProvisioningConfig to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to update. - * @type string $email - * Optional. Email provided to send a confirmation with provisioning config - * to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ProvisioningConfig to update. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig|null - */ - public function getProvisioningConfig() - { - return $this->provisioning_config; - } - - public function hasProvisioningConfig() - { - return isset($this->provisioning_config); - } - - public function clearProvisioningConfig() - { - unset($this->provisioning_config); - } - - /** - * Required. The ProvisioningConfig to update. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $var - * @return $this - */ - public function setProvisioningConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig::class); - $this->provisioning_config = $var; - - return $this; - } - - /** - * Required. The list of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The list of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. Email provided to send a confirmation with provisioning config - * to. - * - * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Optional. Email provided to send a confirmation with provisioning config - * to. - * - * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateVolumeRequest.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateVolumeRequest.php deleted file mode 100644 index d4fa695d3f0b..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/UpdateVolumeRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.baremetalsolution.v2.UpdateVolumeRequest - */ -class UpdateVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The volume to update. - * The `name` field is used to identify the volume to update. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume volume = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $volume = null; - /** - * The list of fields to update. - * The only currently supported fields are: - * 'labels' - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\BareMetalSolution\V2\Volume $volume Required. The volume to update. - * - * The `name` field is used to identify the volume to update. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. - * The only currently supported fields are: - * 'labels' - * - * @return \Google\Cloud\BareMetalSolution\V2\UpdateVolumeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BareMetalSolution\V2\Volume $volume, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setVolume($volume) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BareMetalSolution\V2\Volume $volume - * Required. The volume to update. - * The `name` field is used to identify the volume to update. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to update. - * The only currently supported fields are: - * 'labels' - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. The volume to update. - * The `name` field is used to identify the volume to update. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume volume = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BareMetalSolution\V2\Volume|null - */ - public function getVolume() - { - return $this->volume; - } - - public function hasVolume() - { - return isset($this->volume); - } - - public function clearVolume() - { - unset($this->volume); - } - - /** - * Required. The volume to update. - * The `name` field is used to identify the volume to update. - * Format: projects/{project}/locations/{location}/volumes/{volume} - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume volume = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BareMetalSolution\V2\Volume $var - * @return $this - */ - public function setVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Volume::class); - $this->volume = $var; - - return $this; - } - - /** - * The list of fields to update. - * The only currently supported fields are: - * 'labels' - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to update. - * The only currently supported fields are: - * 'labels' - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF.php deleted file mode 100644 index 217c29708d74..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.baremetalsolution.v2.VRF - */ -class VRF extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the VRF. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The possible state of VRF. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.State state = 5; - */ - protected $state = 0; - /** - * The QOS policy applied to this VRF. - * The value is only meaningful when all the vlan attachments have the same - * QoS. This field should not be used for new integrations, use vlan - * attachment level qos instead. The field is left for backward-compatibility. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 6; - */ - protected $qos_policy = null; - /** - * The list of VLAN attachments for the VRF. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VRF.VlanAttachment vlan_attachments = 7; - */ - private $vlan_attachments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the VRF. - * @type int $state - * The possible state of VRF. - * @type \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy $qos_policy - * The QOS policy applied to this VRF. - * The value is only meaningful when all the vlan attachments have the same - * QoS. This field should not be used for new integrations, use vlan - * attachment level qos instead. The field is left for backward-compatibility. - * @type array<\Google\Cloud\BareMetalSolution\V2\VRF\VlanAttachment>|\Google\Protobuf\Internal\RepeatedField $vlan_attachments - * The list of VLAN attachments for the VRF. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * The name of the VRF. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the VRF. - * - * 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 possible state of VRF. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.State state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The possible state of VRF. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.State state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VRF\State::class); - $this->state = $var; - - return $this; - } - - /** - * The QOS policy applied to this VRF. - * The value is only meaningful when all the vlan attachments have the same - * QoS. This field should not be used for new integrations, use vlan - * attachment level qos instead. The field is left for backward-compatibility. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 6; - * @return \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy|null - */ - public function getQosPolicy() - { - return $this->qos_policy; - } - - public function hasQosPolicy() - { - return isset($this->qos_policy); - } - - public function clearQosPolicy() - { - unset($this->qos_policy); - } - - /** - * The QOS policy applied to this VRF. - * The value is only meaningful when all the vlan attachments have the same - * QoS. This field should not be used for new integrations, use vlan - * attachment level qos instead. The field is left for backward-compatibility. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 6; - * @param \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy $var - * @return $this - */ - public function setQosPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy::class); - $this->qos_policy = $var; - - return $this; - } - - /** - * The list of VLAN attachments for the VRF. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VRF.VlanAttachment vlan_attachments = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVlanAttachments() - { - return $this->vlan_attachments; - } - - /** - * The list of VLAN attachments for the VRF. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VRF.VlanAttachment vlan_attachments = 7; - * @param array<\Google\Cloud\BareMetalSolution\V2\VRF\VlanAttachment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVlanAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VRF\VlanAttachment::class); - $this->vlan_attachments = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/QosPolicy.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/QosPolicy.php deleted file mode 100644 index 155de6cc6ac3..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/QosPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.baremetalsolution.v2.VRF.QosPolicy - */ -class QosPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The bandwidth permitted by the QOS policy, in gbps. - * - * Generated from protobuf field double bandwidth_gbps = 1; - */ - protected $bandwidth_gbps = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $bandwidth_gbps - * The bandwidth permitted by the QOS policy, in gbps. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * The bandwidth permitted by the QOS policy, in gbps. - * - * Generated from protobuf field double bandwidth_gbps = 1; - * @return float - */ - public function getBandwidthGbps() - { - return $this->bandwidth_gbps; - } - - /** - * The bandwidth permitted by the QOS policy, in gbps. - * - * Generated from protobuf field double bandwidth_gbps = 1; - * @param float $var - * @return $this - */ - public function setBandwidthGbps($var) - { - GPBUtil::checkDouble($var); - $this->bandwidth_gbps = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QosPolicy::class, \Google\Cloud\BareMetalSolution\V2\VRF_QosPolicy::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/State.php deleted file mode 100644 index 77a76204cece..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/State.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.VRF.State - */ -class State -{ - /** - * The unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The vrf is provisioning. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The vrf is provisioned. - * - * Generated from protobuf enum PROVISIONED = 2; - */ - const PROVISIONED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::PROVISIONED => 'PROVISIONED', - ]; - - 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\BareMetalSolution\V2\VRF_State::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/VlanAttachment.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/VlanAttachment.php deleted file mode 100644 index e0c067b66dad..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VRF/VlanAttachment.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.baremetalsolution.v2.VRF.VlanAttachment - */ -class VlanAttachment extends \Google\Protobuf\Internal\Message -{ - /** - * The peer vlan ID of the attachment. - * - * Generated from protobuf field int64 peer_vlan_id = 1; - */ - protected $peer_vlan_id = 0; - /** - * The peer IP of the attachment. - * - * Generated from protobuf field string peer_ip = 2; - */ - protected $peer_ip = ''; - /** - * The router IP of the attachment. - * - * Generated from protobuf field string router_ip = 3; - */ - protected $router_ip = ''; - /** - * Input only. Pairing key. - * - * Generated from protobuf field string pairing_key = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $pairing_key = ''; - /** - * The QOS policy applied to this VLAN attachment. - * This value should be preferred to using qos at vrf level. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 5; - */ - protected $qos_policy = null; - /** - * Immutable. The identifier of the attachment within vrf. - * - * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $id = ''; - /** - * Optional. The name of the vlan attachment within vrf. This is of the form - * projects/{project_number}/regions/{region}/interconnectAttachments/{interconnect_attachment} - * - * Generated from protobuf field string interconnect_attachment = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $interconnect_attachment = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $peer_vlan_id - * The peer vlan ID of the attachment. - * @type string $peer_ip - * The peer IP of the attachment. - * @type string $router_ip - * The router IP of the attachment. - * @type string $pairing_key - * Input only. Pairing key. - * @type \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy $qos_policy - * The QOS policy applied to this VLAN attachment. - * This value should be preferred to using qos at vrf level. - * @type string $id - * Immutable. The identifier of the attachment within vrf. - * @type string $interconnect_attachment - * Optional. The name of the vlan attachment within vrf. This is of the form - * projects/{project_number}/regions/{region}/interconnectAttachments/{interconnect_attachment} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce(); - parent::__construct($data); - } - - /** - * The peer vlan ID of the attachment. - * - * Generated from protobuf field int64 peer_vlan_id = 1; - * @return int|string - */ - public function getPeerVlanId() - { - return $this->peer_vlan_id; - } - - /** - * The peer vlan ID of the attachment. - * - * Generated from protobuf field int64 peer_vlan_id = 1; - * @param int|string $var - * @return $this - */ - public function setPeerVlanId($var) - { - GPBUtil::checkInt64($var); - $this->peer_vlan_id = $var; - - return $this; - } - - /** - * The peer IP of the attachment. - * - * Generated from protobuf field string peer_ip = 2; - * @return string - */ - public function getPeerIp() - { - return $this->peer_ip; - } - - /** - * The peer IP of the attachment. - * - * Generated from protobuf field string peer_ip = 2; - * @param string $var - * @return $this - */ - public function setPeerIp($var) - { - GPBUtil::checkString($var, True); - $this->peer_ip = $var; - - return $this; - } - - /** - * The router IP of the attachment. - * - * Generated from protobuf field string router_ip = 3; - * @return string - */ - public function getRouterIp() - { - return $this->router_ip; - } - - /** - * The router IP of the attachment. - * - * Generated from protobuf field string router_ip = 3; - * @param string $var - * @return $this - */ - public function setRouterIp($var) - { - GPBUtil::checkString($var, True); - $this->router_ip = $var; - - return $this; - } - - /** - * Input only. Pairing key. - * - * Generated from protobuf field string pairing_key = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPairingKey() - { - return $this->pairing_key; - } - - /** - * Input only. Pairing key. - * - * Generated from protobuf field string pairing_key = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPairingKey($var) - { - GPBUtil::checkString($var, True); - $this->pairing_key = $var; - - return $this; - } - - /** - * The QOS policy applied to this VLAN attachment. - * This value should be preferred to using qos at vrf level. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 5; - * @return \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy|null - */ - public function getQosPolicy() - { - return $this->qos_policy; - } - - public function hasQosPolicy() - { - return isset($this->qos_policy); - } - - public function clearQosPolicy() - { - unset($this->qos_policy); - } - - /** - * The QOS policy applied to this VLAN attachment. - * This value should be preferred to using qos at vrf level. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VRF.QosPolicy qos_policy = 5; - * @param \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy $var - * @return $this - */ - public function setQosPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\VRF\QosPolicy::class); - $this->qos_policy = $var; - - return $this; - } - - /** - * Immutable. The identifier of the attachment within vrf. - * - * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Immutable. The identifier of the attachment within vrf. - * - * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Optional. The name of the vlan attachment within vrf. This is of the form - * projects/{project_number}/regions/{region}/interconnectAttachments/{interconnect_attachment} - * - * Generated from protobuf field string interconnect_attachment = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getInterconnectAttachment() - { - return $this->interconnect_attachment; - } - - /** - * Optional. The name of the vlan attachment within vrf. This is of the form - * projects/{project_number}/regions/{region}/interconnectAttachments/{interconnect_attachment} - * - * Generated from protobuf field string interconnect_attachment = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInterconnectAttachment($var) - { - GPBUtil::checkString($var, True); - $this->interconnect_attachment = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VlanAttachment::class, \Google\Cloud\BareMetalSolution\V2\VRF_VlanAttachment::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume.php deleted file mode 100644 index 47b35834e0a2..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume.php +++ /dev/null @@ -1,933 +0,0 @@ -google.cloud.baremetalsolution.v2.Volume - */ -class Volume extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this `Volume`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/volumes/{volume}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * An identifier for the `Volume`, generated by the backend. - * - * Generated from protobuf field string id = 11; - */ - protected $id = ''; - /** - * The storage type for this volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; - */ - protected $storage_type = 0; - /** - * The state of this storage volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.State state = 3; - */ - protected $state = 0; - /** - * The requested size of this storage volume, in GiB. - * - * Generated from protobuf field int64 requested_size_gib = 4; - */ - protected $requested_size_gib = 0; - /** - * Originally requested size, in GiB. - * - * Generated from protobuf field int64 originally_requested_size_gib = 16; - */ - protected $originally_requested_size_gib = 0; - /** - * The current size of this storage volume, in GiB, including space reserved - * for snapshots. This size might be different than the requested size if the - * storage volume has been configured with auto grow or auto shrink. - * - * Generated from protobuf field int64 current_size_gib = 5; - */ - protected $current_size_gib = 0; - /** - * Additional emergency size that was requested for this Volume, in GiB. - * current_size_gib includes this value. - * - * Generated from protobuf field int64 emergency_size_gib = 14; - */ - protected $emergency_size_gib = 0; - /** - * Maximum size volume can be expanded to in case of evergency, in GiB. - * - * Generated from protobuf field int64 max_size_gib = 17; - */ - protected $max_size_gib = 0; - /** - * The size, in GiB, that this storage volume has expanded as a result of an - * auto grow policy. In the absence of auto-grow, the value is 0. - * - * Generated from protobuf field int64 auto_grown_size_gib = 6; - */ - protected $auto_grown_size_gib = 0; - /** - * The space remaining in the storage volume for new LUNs, in GiB, excluding - * space reserved for snapshots. - * - * Generated from protobuf field int64 remaining_space_gib = 7; - */ - protected $remaining_space_gib = 0; - /** - * Details about snapshot space reservation and usage on the storage volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; - */ - protected $snapshot_reservation_detail = null; - /** - * The behavior to use when snapshot reserved space is full. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; - */ - protected $snapshot_auto_delete_behavior = 0; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 12; - */ - private $labels; - /** - * Whether snapshots are enabled. - * - * Generated from protobuf field bool snapshot_enabled = 13; - */ - protected $snapshot_enabled = false; - /** - * Immutable. Pod name. - * - * Generated from protobuf field string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $pod = ''; - /** - * Output only. Storage protocol for the Volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $protocol = 0; - /** - * Output only. Whether this volume is a boot volume. A boot volume is one - * which contains a boot LUN. - * - * Generated from protobuf field bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $boot_volume = false; - /** - * Immutable. Performance tier of the Volume. - * Default is SHARED. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $performance_tier = 0; - /** - * Input only. User-specified notes for new Volume. - * Used to provision Volumes that require manual intervention. - * - * Generated from protobuf field string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $notes = ''; - /** - * The workload profile for the volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; - */ - protected $workload_profile = 0; - /** - * Output only. Time after which volume will be fully deleted. - * It is filled only for volumes in COOLOFF state. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. Instances this Volume is attached to. - * This field is set only in Get requests. - * - * Generated from protobuf field repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $instances; - /** - * Output only. Is the Volume attached at at least one instance. - * This field is a lightweight counterpart of `instances` field. - * It is filled in List responses as well. - * - * Generated from protobuf field bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attached = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this `Volume`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/volumes/{volume}` - * @type string $id - * An identifier for the `Volume`, generated by the backend. - * @type int $storage_type - * The storage type for this volume. - * @type int $state - * The state of this storage volume. - * @type int|string $requested_size_gib - * The requested size of this storage volume, in GiB. - * @type int|string $originally_requested_size_gib - * Originally requested size, in GiB. - * @type int|string $current_size_gib - * The current size of this storage volume, in GiB, including space reserved - * for snapshots. This size might be different than the requested size if the - * storage volume has been configured with auto grow or auto shrink. - * @type int|string $emergency_size_gib - * Additional emergency size that was requested for this Volume, in GiB. - * current_size_gib includes this value. - * @type int|string $max_size_gib - * Maximum size volume can be expanded to in case of evergency, in GiB. - * @type int|string $auto_grown_size_gib - * The size, in GiB, that this storage volume has expanded as a result of an - * auto grow policy. In the absence of auto-grow, the value is 0. - * @type int|string $remaining_space_gib - * The space remaining in the storage volume for new LUNs, in GiB, excluding - * space reserved for snapshots. - * @type \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotReservationDetail $snapshot_reservation_detail - * Details about snapshot space reservation and usage on the storage volume. - * @type int $snapshot_auto_delete_behavior - * The behavior to use when snapshot reserved space is full. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type bool $snapshot_enabled - * Whether snapshots are enabled. - * @type string $pod - * Immutable. Pod name. - * @type int $protocol - * Output only. Storage protocol for the Volume. - * @type bool $boot_volume - * Output only. Whether this volume is a boot volume. A boot volume is one - * which contains a boot LUN. - * @type int $performance_tier - * Immutable. Performance tier of the Volume. - * Default is SHARED. - * @type string $notes - * Input only. User-specified notes for new Volume. - * Used to provision Volumes that require manual intervention. - * @type int $workload_profile - * The workload profile for the volume. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. Time after which volume will be fully deleted. - * It is filled only for volumes in COOLOFF state. - * @type array|\Google\Protobuf\Internal\RepeatedField $instances - * Output only. Instances this Volume is attached to. - * This field is set only in Get requests. - * @type bool $attached - * Output only. Is the Volume attached at at least one instance. - * This field is a lightweight counterpart of `instances` field. - * It is filled in List responses as well. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this `Volume`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/volumes/{volume}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of this `Volume`. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * Format: - * `projects/{project}/locations/{location}/volumes/{volume}` - * - * 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; - } - - /** - * An identifier for the `Volume`, generated by the backend. - * - * Generated from protobuf field string id = 11; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * An identifier for the `Volume`, generated by the backend. - * - * Generated from protobuf field string id = 11; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The storage type for this volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; - * @return int - */ - public function getStorageType() - { - return $this->storage_type; - } - - /** - * The storage type for this volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; - * @param int $var - * @return $this - */ - public function setStorageType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\StorageType::class); - $this->storage_type = $var; - - return $this; - } - - /** - * The state of this storage volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.State state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of this storage volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.State state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\State::class); - $this->state = $var; - - return $this; - } - - /** - * The requested size of this storage volume, in GiB. - * - * Generated from protobuf field int64 requested_size_gib = 4; - * @return int|string - */ - public function getRequestedSizeGib() - { - return $this->requested_size_gib; - } - - /** - * The requested size of this storage volume, in GiB. - * - * Generated from protobuf field int64 requested_size_gib = 4; - * @param int|string $var - * @return $this - */ - public function setRequestedSizeGib($var) - { - GPBUtil::checkInt64($var); - $this->requested_size_gib = $var; - - return $this; - } - - /** - * Originally requested size, in GiB. - * - * Generated from protobuf field int64 originally_requested_size_gib = 16; - * @return int|string - */ - public function getOriginallyRequestedSizeGib() - { - return $this->originally_requested_size_gib; - } - - /** - * Originally requested size, in GiB. - * - * Generated from protobuf field int64 originally_requested_size_gib = 16; - * @param int|string $var - * @return $this - */ - public function setOriginallyRequestedSizeGib($var) - { - GPBUtil::checkInt64($var); - $this->originally_requested_size_gib = $var; - - return $this; - } - - /** - * The current size of this storage volume, in GiB, including space reserved - * for snapshots. This size might be different than the requested size if the - * storage volume has been configured with auto grow or auto shrink. - * - * Generated from protobuf field int64 current_size_gib = 5; - * @return int|string - */ - public function getCurrentSizeGib() - { - return $this->current_size_gib; - } - - /** - * The current size of this storage volume, in GiB, including space reserved - * for snapshots. This size might be different than the requested size if the - * storage volume has been configured with auto grow or auto shrink. - * - * Generated from protobuf field int64 current_size_gib = 5; - * @param int|string $var - * @return $this - */ - public function setCurrentSizeGib($var) - { - GPBUtil::checkInt64($var); - $this->current_size_gib = $var; - - return $this; - } - - /** - * Additional emergency size that was requested for this Volume, in GiB. - * current_size_gib includes this value. - * - * Generated from protobuf field int64 emergency_size_gib = 14; - * @return int|string - */ - public function getEmergencySizeGib() - { - return $this->emergency_size_gib; - } - - /** - * Additional emergency size that was requested for this Volume, in GiB. - * current_size_gib includes this value. - * - * Generated from protobuf field int64 emergency_size_gib = 14; - * @param int|string $var - * @return $this - */ - public function setEmergencySizeGib($var) - { - GPBUtil::checkInt64($var); - $this->emergency_size_gib = $var; - - return $this; - } - - /** - * Maximum size volume can be expanded to in case of evergency, in GiB. - * - * Generated from protobuf field int64 max_size_gib = 17; - * @return int|string - */ - public function getMaxSizeGib() - { - return $this->max_size_gib; - } - - /** - * Maximum size volume can be expanded to in case of evergency, in GiB. - * - * Generated from protobuf field int64 max_size_gib = 17; - * @param int|string $var - * @return $this - */ - public function setMaxSizeGib($var) - { - GPBUtil::checkInt64($var); - $this->max_size_gib = $var; - - return $this; - } - - /** - * The size, in GiB, that this storage volume has expanded as a result of an - * auto grow policy. In the absence of auto-grow, the value is 0. - * - * Generated from protobuf field int64 auto_grown_size_gib = 6; - * @return int|string - */ - public function getAutoGrownSizeGib() - { - return $this->auto_grown_size_gib; - } - - /** - * The size, in GiB, that this storage volume has expanded as a result of an - * auto grow policy. In the absence of auto-grow, the value is 0. - * - * Generated from protobuf field int64 auto_grown_size_gib = 6; - * @param int|string $var - * @return $this - */ - public function setAutoGrownSizeGib($var) - { - GPBUtil::checkInt64($var); - $this->auto_grown_size_gib = $var; - - return $this; - } - - /** - * The space remaining in the storage volume for new LUNs, in GiB, excluding - * space reserved for snapshots. - * - * Generated from protobuf field int64 remaining_space_gib = 7; - * @return int|string - */ - public function getRemainingSpaceGib() - { - return $this->remaining_space_gib; - } - - /** - * The space remaining in the storage volume for new LUNs, in GiB, excluding - * space reserved for snapshots. - * - * Generated from protobuf field int64 remaining_space_gib = 7; - * @param int|string $var - * @return $this - */ - public function setRemainingSpaceGib($var) - { - GPBUtil::checkInt64($var); - $this->remaining_space_gib = $var; - - return $this; - } - - /** - * Details about snapshot space reservation and usage on the storage volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; - * @return \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotReservationDetail|null - */ - public function getSnapshotReservationDetail() - { - return $this->snapshot_reservation_detail; - } - - public function hasSnapshotReservationDetail() - { - return isset($this->snapshot_reservation_detail); - } - - public function clearSnapshotReservationDetail() - { - unset($this->snapshot_reservation_detail); - } - - /** - * Details about snapshot space reservation and usage on the storage volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; - * @param \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotReservationDetail $var - * @return $this - */ - public function setSnapshotReservationDetail($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotReservationDetail::class); - $this->snapshot_reservation_detail = $var; - - return $this; - } - - /** - * The behavior to use when snapshot reserved space is full. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; - * @return int - */ - public function getSnapshotAutoDeleteBehavior() - { - return $this->snapshot_auto_delete_behavior; - } - - /** - * The behavior to use when snapshot reserved space is full. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; - * @param int $var - * @return $this - */ - public function setSnapshotAutoDeleteBehavior($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\SnapshotAutoDeleteBehavior::class); - $this->snapshot_auto_delete_behavior = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 12; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 12; - * @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; - } - - /** - * Whether snapshots are enabled. - * - * Generated from protobuf field bool snapshot_enabled = 13; - * @return bool - */ - public function getSnapshotEnabled() - { - return $this->snapshot_enabled; - } - - /** - * Whether snapshots are enabled. - * - * Generated from protobuf field bool snapshot_enabled = 13; - * @param bool $var - * @return $this - */ - public function setSnapshotEnabled($var) - { - GPBUtil::checkBool($var); - $this->snapshot_enabled = $var; - - return $this; - } - - /** - * Immutable. Pod name. - * - * Generated from protobuf field string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getPod() - { - return $this->pod; - } - - /** - * Immutable. Pod name. - * - * Generated from protobuf field string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setPod($var) - { - GPBUtil::checkString($var, True); - $this->pod = $var; - - return $this; - } - - /** - * Output only. Storage protocol for the Volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * Output only. Storage protocol for the Volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\Protocol::class); - $this->protocol = $var; - - return $this; - } - - /** - * Output only. Whether this volume is a boot volume. A boot volume is one - * which contains a boot LUN. - * - * Generated from protobuf field bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getBootVolume() - { - return $this->boot_volume; - } - - /** - * Output only. Whether this volume is a boot volume. A boot volume is one - * which contains a boot LUN. - * - * Generated from protobuf field bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setBootVolume($var) - { - GPBUtil::checkBool($var); - $this->boot_volume = $var; - - return $this; - } - - /** - * Immutable. Performance tier of the Volume. - * Default is SHARED. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getPerformanceTier() - { - return $this->performance_tier; - } - - /** - * Immutable. Performance tier of the Volume. - * Default is SHARED. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setPerformanceTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumePerformanceTier::class); - $this->performance_tier = $var; - - return $this; - } - - /** - * Input only. User-specified notes for new Volume. - * Used to provision Volumes that require manual intervention. - * - * Generated from protobuf field string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getNotes() - { - return $this->notes; - } - - /** - * Input only. User-specified notes for new Volume. - * Used to provision Volumes that require manual intervention. - * - * Generated from protobuf field string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNotes($var) - { - GPBUtil::checkString($var, True); - $this->notes = $var; - - return $this; - } - - /** - * The workload profile for the volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; - * @return int - */ - public function getWorkloadProfile() - { - return $this->workload_profile; - } - - /** - * The workload profile for the volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; - * @param int $var - * @return $this - */ - public function setWorkloadProfile($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\Volume\WorkloadProfile::class); - $this->workload_profile = $var; - - return $this; - } - - /** - * Output only. Time after which volume will be fully deleted. - * It is filled only for volumes in COOLOFF state. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. Time after which volume will be fully deleted. - * It is filled only for volumes in COOLOFF state. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. Instances this Volume is attached to. - * This field is set only in Get requests. - * - * Generated from protobuf field repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * Output only. Instances this Volume is attached to. - * This field is set only in Get requests. - * - * Generated from protobuf field repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instances = $arr; - - return $this; - } - - /** - * Output only. Is the Volume attached at at least one instance. - * This field is a lightweight counterpart of `instances` field. - * It is filled in List responses as well. - * - * Generated from protobuf field bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAttached() - { - return $this->attached; - } - - /** - * Output only. Is the Volume attached at at least one instance. - * This field is a lightweight counterpart of `instances` field. - * It is filled in List responses as well. - * - * Generated from protobuf field bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAttached($var) - { - GPBUtil::checkBool($var); - $this->attached = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/Protocol.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/Protocol.php deleted file mode 100644 index 4fa04cff8958..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/Protocol.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.baremetalsolution.v2.Volume.Protocol - */ -class Protocol -{ - /** - * Value is not specified. - * - * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; - */ - const PROTOCOL_UNSPECIFIED = 0; - /** - * Fibre Channel protocol. - * - * Generated from protobuf enum FIBRE_CHANNEL = 1; - */ - const FIBRE_CHANNEL = 1; - /** - * NFS protocol means Volume is a NFS Share volume. - * Such volumes cannot be manipulated via Volumes API. - * - * Generated from protobuf enum NFS = 2; - */ - const NFS = 2; - - private static $valueToName = [ - self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', - self::FIBRE_CHANNEL => 'FIBRE_CHANNEL', - self::NFS => 'NFS', - ]; - - 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(Protocol::class, \Google\Cloud\BareMetalSolution\V2\Volume_Protocol::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotAutoDeleteBehavior.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotAutoDeleteBehavior.php deleted file mode 100644 index c00ae75623da..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotAutoDeleteBehavior.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior - */ -class SnapshotAutoDeleteBehavior -{ - /** - * The unspecified behavior. - * - * Generated from protobuf enum SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0; - */ - const SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0; - /** - * Don't delete any snapshots. This disables new snapshot creation, as - * long as the snapshot reserved space is full. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Delete the oldest snapshots first. - * - * Generated from protobuf enum OLDEST_FIRST = 2; - */ - const OLDEST_FIRST = 2; - /** - * Delete the newest snapshots first. - * - * Generated from protobuf enum NEWEST_FIRST = 3; - */ - const NEWEST_FIRST = 3; - - private static $valueToName = [ - self::SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED => 'SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::OLDEST_FIRST => 'OLDEST_FIRST', - self::NEWEST_FIRST => 'NEWEST_FIRST', - ]; - - 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(SnapshotAutoDeleteBehavior::class, \Google\Cloud\BareMetalSolution\V2\Volume_SnapshotAutoDeleteBehavior::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotReservationDetail.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotReservationDetail.php deleted file mode 100644 index 16739fe08920..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/SnapshotReservationDetail.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail - */ -class SnapshotReservationDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The space on this storage volume reserved for snapshots, shown in GiB. - * - * Generated from protobuf field int64 reserved_space_gib = 1; - */ - protected $reserved_space_gib = 0; - /** - * The percent of snapshot space on this storage volume actually being used - * by the snapshot copies. This value might be higher than 100% if the - * snapshot copies have overflowed into the data portion of the storage - * volume. - * - * Generated from protobuf field int32 reserved_space_used_percent = 2; - */ - protected $reserved_space_used_percent = 0; - /** - * The amount, in GiB, of available space in this storage volume's reserved - * snapshot space. - * - * Generated from protobuf field int64 reserved_space_remaining_gib = 3; - */ - protected $reserved_space_remaining_gib = 0; - /** - * Percent of the total Volume size reserved for snapshot copies. - * Enabling snapshots requires reserving 20% or more of - * the storage volume space for snapshots. Maximum reserved space for - * snapshots is 40%. - * Setting this field will effectively set snapshot_enabled to true. - * - * Generated from protobuf field int32 reserved_space_percent = 4; - */ - protected $reserved_space_percent = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $reserved_space_gib - * The space on this storage volume reserved for snapshots, shown in GiB. - * @type int $reserved_space_used_percent - * The percent of snapshot space on this storage volume actually being used - * by the snapshot copies. This value might be higher than 100% if the - * snapshot copies have overflowed into the data portion of the storage - * volume. - * @type int|string $reserved_space_remaining_gib - * The amount, in GiB, of available space in this storage volume's reserved - * snapshot space. - * @type int $reserved_space_percent - * Percent of the total Volume size reserved for snapshot copies. - * Enabling snapshots requires reserving 20% or more of - * the storage volume space for snapshots. Maximum reserved space for - * snapshots is 40%. - * Setting this field will effectively set snapshot_enabled to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Volume::initOnce(); - parent::__construct($data); - } - - /** - * The space on this storage volume reserved for snapshots, shown in GiB. - * - * Generated from protobuf field int64 reserved_space_gib = 1; - * @return int|string - */ - public function getReservedSpaceGib() - { - return $this->reserved_space_gib; - } - - /** - * The space on this storage volume reserved for snapshots, shown in GiB. - * - * Generated from protobuf field int64 reserved_space_gib = 1; - * @param int|string $var - * @return $this - */ - public function setReservedSpaceGib($var) - { - GPBUtil::checkInt64($var); - $this->reserved_space_gib = $var; - - return $this; - } - - /** - * The percent of snapshot space on this storage volume actually being used - * by the snapshot copies. This value might be higher than 100% if the - * snapshot copies have overflowed into the data portion of the storage - * volume. - * - * Generated from protobuf field int32 reserved_space_used_percent = 2; - * @return int - */ - public function getReservedSpaceUsedPercent() - { - return $this->reserved_space_used_percent; - } - - /** - * The percent of snapshot space on this storage volume actually being used - * by the snapshot copies. This value might be higher than 100% if the - * snapshot copies have overflowed into the data portion of the storage - * volume. - * - * Generated from protobuf field int32 reserved_space_used_percent = 2; - * @param int $var - * @return $this - */ - public function setReservedSpaceUsedPercent($var) - { - GPBUtil::checkInt32($var); - $this->reserved_space_used_percent = $var; - - return $this; - } - - /** - * The amount, in GiB, of available space in this storage volume's reserved - * snapshot space. - * - * Generated from protobuf field int64 reserved_space_remaining_gib = 3; - * @return int|string - */ - public function getReservedSpaceRemainingGib() - { - return $this->reserved_space_remaining_gib; - } - - /** - * The amount, in GiB, of available space in this storage volume's reserved - * snapshot space. - * - * Generated from protobuf field int64 reserved_space_remaining_gib = 3; - * @param int|string $var - * @return $this - */ - public function setReservedSpaceRemainingGib($var) - { - GPBUtil::checkInt64($var); - $this->reserved_space_remaining_gib = $var; - - return $this; - } - - /** - * Percent of the total Volume size reserved for snapshot copies. - * Enabling snapshots requires reserving 20% or more of - * the storage volume space for snapshots. Maximum reserved space for - * snapshots is 40%. - * Setting this field will effectively set snapshot_enabled to true. - * - * Generated from protobuf field int32 reserved_space_percent = 4; - * @return int - */ - public function getReservedSpacePercent() - { - return $this->reserved_space_percent; - } - - /** - * Percent of the total Volume size reserved for snapshot copies. - * Enabling snapshots requires reserving 20% or more of - * the storage volume space for snapshots. Maximum reserved space for - * snapshots is 40%. - * Setting this field will effectively set snapshot_enabled to true. - * - * Generated from protobuf field int32 reserved_space_percent = 4; - * @param int $var - * @return $this - */ - public function setReservedSpacePercent($var) - { - GPBUtil::checkInt32($var); - $this->reserved_space_percent = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SnapshotReservationDetail::class, \Google\Cloud\BareMetalSolution\V2\Volume_SnapshotReservationDetail::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/State.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/State.php deleted file mode 100644 index 6f0294162c29..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.baremetalsolution.v2.Volume.State - */ -class State -{ - /** - * The storage volume is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The storage volume is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The storage volume is ready for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The storage volume has been requested to be deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The storage volume is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * The storage volume is in cool off state. It will be deleted after - * `expire_time`. - * - * Generated from protobuf enum COOL_OFF = 5; - */ - const COOL_OFF = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - self::COOL_OFF => 'COOL_OFF', - ]; - - 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\BareMetalSolution\V2\Volume_State::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/StorageType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/StorageType.php deleted file mode 100644 index 2ccb93087f78..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/StorageType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.Volume.StorageType - */ -class StorageType -{ - /** - * The storage type for this volume is unknown. - * - * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; - */ - const STORAGE_TYPE_UNSPECIFIED = 0; - /** - * The storage type for this volume is SSD. - * - * Generated from protobuf enum SSD = 1; - */ - const SSD = 1; - /** - * This storage type for this volume is HDD. - * - * Generated from protobuf enum HDD = 2; - */ - const HDD = 2; - - private static $valueToName = [ - self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', - self::SSD => 'SSD', - self::HDD => 'HDD', - ]; - - 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(StorageType::class, \Google\Cloud\BareMetalSolution\V2\Volume_StorageType::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/WorkloadProfile.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/WorkloadProfile.php deleted file mode 100644 index dc4e299c0d91..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/Volume/WorkloadProfile.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.Volume.WorkloadProfile - */ -class WorkloadProfile -{ - /** - * The workload profile is in an unknown state. - * - * Generated from protobuf enum WORKLOAD_PROFILE_UNSPECIFIED = 0; - */ - const WORKLOAD_PROFILE_UNSPECIFIED = 0; - /** - * The workload profile is generic. - * - * Generated from protobuf enum GENERIC = 1; - */ - const GENERIC = 1; - /** - * The workload profile is hana. - * - * Generated from protobuf enum HANA = 2; - */ - const HANA = 2; - - private static $valueToName = [ - self::WORKLOAD_PROFILE_UNSPECIFIED => 'WORKLOAD_PROFILE_UNSPECIFIED', - self::GENERIC => 'GENERIC', - self::HANA => 'HANA', - ]; - - 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(WorkloadProfile::class, \Google\Cloud\BareMetalSolution\V2\Volume_WorkloadProfile::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig.php deleted file mode 100644 index 7778d4373a6d..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig.php +++ /dev/null @@ -1,461 +0,0 @@ -google.cloud.baremetalsolution.v2.VolumeConfig - */ -class VolumeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the volume config. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * A transient unique identifier to identify a volume within an - * ProvisioningConfig request. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - /** - * Whether snapshots should be enabled. - * - * Generated from protobuf field bool snapshots_enabled = 3; - */ - protected $snapshots_enabled = false; - /** - * The type of this Volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; - */ - protected $type = 0; - /** - * Volume protocol. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; - */ - protected $protocol = 0; - /** - * The requested size of this volume, in GB. - * - * Generated from protobuf field int32 size_gb = 6; - */ - protected $size_gb = 0; - /** - * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; - */ - private $lun_ranges; - /** - * Machine ids connected to this volume. Set only when protocol is - * PROTOCOL_FC. - * - * Generated from protobuf field repeated string machine_ids = 8; - */ - private $machine_ids; - /** - * NFS exports. Set only when protocol is PROTOCOL_NFS. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; - */ - private $nfs_exports; - /** - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * - * Generated from protobuf field string user_note = 10; - */ - protected $user_note = ''; - /** - * The GCP service of the storage volume. Available gcp_service are in - * https://cloud.google.com/bare-metal/docs/bms-planning. - * - * Generated from protobuf field string gcp_service = 11; - */ - protected $gcp_service = ''; - /** - * Performance tier of the Volume. - * Default is SHARED. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; - */ - protected $performance_tier = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the volume config. - * @type string $id - * A transient unique identifier to identify a volume within an - * ProvisioningConfig request. - * @type bool $snapshots_enabled - * Whether snapshots should be enabled. - * @type int $type - * The type of this Volume. - * @type int $protocol - * Volume protocol. - * @type int $size_gb - * The requested size of this volume, in GB. - * @type array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange>|\Google\Protobuf\Internal\RepeatedField $lun_ranges - * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. - * @type array|\Google\Protobuf\Internal\RepeatedField $machine_ids - * Machine ids connected to this volume. Set only when protocol is - * PROTOCOL_FC. - * @type array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport>|\Google\Protobuf\Internal\RepeatedField $nfs_exports - * NFS exports. Set only when protocol is PROTOCOL_NFS. - * @type string $user_note - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * @type string $gcp_service - * The GCP service of the storage volume. Available gcp_service are in - * https://cloud.google.com/bare-metal/docs/bms-planning. - * @type int $performance_tier - * Performance tier of the Volume. - * Default is SHARED. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the volume config. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the volume config. - * - * 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; - } - - /** - * A transient unique identifier to identify a volume within an - * ProvisioningConfig request. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * A transient unique identifier to identify a volume within an - * ProvisioningConfig request. - * - * Generated from protobuf field string id = 2; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Whether snapshots should be enabled. - * - * Generated from protobuf field bool snapshots_enabled = 3; - * @return bool - */ - public function getSnapshotsEnabled() - { - return $this->snapshots_enabled; - } - - /** - * Whether snapshots should be enabled. - * - * Generated from protobuf field bool snapshots_enabled = 3; - * @param bool $var - * @return $this - */ - public function setSnapshotsEnabled($var) - { - GPBUtil::checkBool($var); - $this->snapshots_enabled = $var; - - return $this; - } - - /** - * The type of this Volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of this Volume. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Volume protocol. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; - * @return int - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * Volume protocol. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; - * @param int $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\Protocol::class); - $this->protocol = $var; - - return $this; - } - - /** - * The requested size of this volume, in GB. - * - * Generated from protobuf field int32 size_gb = 6; - * @return int - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * The requested size of this volume, in GB. - * - * Generated from protobuf field int32 size_gb = 6; - * @param int $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->size_gb = $var; - - return $this; - } - - /** - * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLunRanges() - { - return $this->lun_ranges; - } - - /** - * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; - * @param array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLunRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange::class); - $this->lun_ranges = $arr; - - return $this; - } - - /** - * Machine ids connected to this volume. Set only when protocol is - * PROTOCOL_FC. - * - * Generated from protobuf field repeated string machine_ids = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMachineIds() - { - return $this->machine_ids; - } - - /** - * Machine ids connected to this volume. Set only when protocol is - * PROTOCOL_FC. - * - * Generated from protobuf field repeated string machine_ids = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMachineIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->machine_ids = $arr; - - return $this; - } - - /** - * NFS exports. Set only when protocol is PROTOCOL_NFS. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNfsExports() - { - return $this->nfs_exports; - } - - /** - * NFS exports. Set only when protocol is PROTOCOL_NFS. - * - * Generated from protobuf field repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; - * @param array<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNfsExports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport::class); - $this->nfs_exports = $arr; - - return $this; - } - - /** - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * - * Generated from protobuf field string user_note = 10; - * @return string - */ - public function getUserNote() - { - return $this->user_note; - } - - /** - * User note field, it can be used by customers to add additional information - * for the BMS Ops team . - * - * Generated from protobuf field string user_note = 10; - * @param string $var - * @return $this - */ - public function setUserNote($var) - { - GPBUtil::checkString($var, True); - $this->user_note = $var; - - return $this; - } - - /** - * The GCP service of the storage volume. Available gcp_service are in - * https://cloud.google.com/bare-metal/docs/bms-planning. - * - * Generated from protobuf field string gcp_service = 11; - * @return string - */ - public function getGcpService() - { - return $this->gcp_service; - } - - /** - * The GCP service of the storage volume. Available gcp_service are in - * https://cloud.google.com/bare-metal/docs/bms-planning. - * - * Generated from protobuf field string gcp_service = 11; - * @param string $var - * @return $this - */ - public function setGcpService($var) - { - GPBUtil::checkString($var, True); - $this->gcp_service = $var; - - return $this; - } - - /** - * Performance tier of the Volume. - * Default is SHARED. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; - * @return int - */ - public function getPerformanceTier() - { - return $this->performance_tier; - } - - /** - * Performance tier of the Volume. - * Default is SHARED. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; - * @param int $var - * @return $this - */ - public function setPerformanceTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumePerformanceTier::class); - $this->performance_tier = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/LunRange.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/LunRange.php deleted file mode 100644 index eb66277f0448..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/LunRange.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.baremetalsolution.v2.VolumeConfig.LunRange - */ -class LunRange extends \Google\Protobuf\Internal\Message -{ - /** - * Number of LUNs to create. - * - * Generated from protobuf field int32 quantity = 1; - */ - protected $quantity = 0; - /** - * The requested size of each LUN, in GB. - * - * Generated from protobuf field int32 size_gb = 2; - */ - protected $size_gb = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $quantity - * Number of LUNs to create. - * @type int $size_gb - * The requested size of each LUN, in GB. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Number of LUNs to create. - * - * Generated from protobuf field int32 quantity = 1; - * @return int - */ - public function getQuantity() - { - return $this->quantity; - } - - /** - * Number of LUNs to create. - * - * Generated from protobuf field int32 quantity = 1; - * @param int $var - * @return $this - */ - public function setQuantity($var) - { - GPBUtil::checkInt32($var); - $this->quantity = $var; - - return $this; - } - - /** - * The requested size of each LUN, in GB. - * - * Generated from protobuf field int32 size_gb = 2; - * @return int - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * The requested size of each LUN, in GB. - * - * Generated from protobuf field int32 size_gb = 2; - * @param int $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->size_gb = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LunRange::class, \Google\Cloud\BareMetalSolution\V2\VolumeConfig_LunRange::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport.php deleted file mode 100644 index 532d11d7a61f..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport - */ -class NfsExport extends \Google\Protobuf\Internal\Message -{ - /** - * Network to use to publish the export. - * - * Generated from protobuf field string network_id = 1; - */ - protected $network_id = ''; - /** - * Export permissions. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; - */ - protected $permissions = 0; - /** - * Disable root squashing, which is a feature of NFS. - * Root squash is a special mapping of the remote superuser (root) identity - * when using identity authentication. - * - * Generated from protobuf field bool no_root_squash = 5; - */ - protected $no_root_squash = false; - /** - * Allow the setuid flag. - * - * Generated from protobuf field bool allow_suid = 6; - */ - protected $allow_suid = false; - /** - * Allow dev flag in NfsShare AllowedClientsRequest. - * - * Generated from protobuf field bool allow_dev = 7; - */ - protected $allow_dev = false; - protected $client; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_id - * Network to use to publish the export. - * @type string $machine_id - * Either a single machine, identified by an ID, or a comma-separated - * list of machine IDs. - * @type string $cidr - * A CIDR range. - * @type int $permissions - * Export permissions. - * @type bool $no_root_squash - * Disable root squashing, which is a feature of NFS. - * Root squash is a special mapping of the remote superuser (root) identity - * when using identity authentication. - * @type bool $allow_suid - * Allow the setuid flag. - * @type bool $allow_dev - * Allow dev flag in NfsShare AllowedClientsRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce(); - parent::__construct($data); - } - - /** - * Network to use to publish the export. - * - * Generated from protobuf field string network_id = 1; - * @return string - */ - public function getNetworkId() - { - return $this->network_id; - } - - /** - * Network to use to publish the export. - * - * Generated from protobuf field string network_id = 1; - * @param string $var - * @return $this - */ - public function setNetworkId($var) - { - GPBUtil::checkString($var, True); - $this->network_id = $var; - - return $this; - } - - /** - * Either a single machine, identified by an ID, or a comma-separated - * list of machine IDs. - * - * Generated from protobuf field string machine_id = 2; - * @return string - */ - public function getMachineId() - { - return $this->readOneof(2); - } - - public function hasMachineId() - { - return $this->hasOneof(2); - } - - /** - * Either a single machine, identified by an ID, or a comma-separated - * list of machine IDs. - * - * Generated from protobuf field string machine_id = 2; - * @param string $var - * @return $this - */ - public function setMachineId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A CIDR range. - * - * Generated from protobuf field string cidr = 3; - * @return string - */ - public function getCidr() - { - return $this->readOneof(3); - } - - public function hasCidr() - { - return $this->hasOneof(3); - } - - /** - * A CIDR range. - * - * Generated from protobuf field string cidr = 3; - * @param string $var - * @return $this - */ - public function setCidr($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Export permissions. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; - * @return int - */ - public function getPermissions() - { - return $this->permissions; - } - - /** - * Export permissions. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; - * @param int $var - * @return $this - */ - public function setPermissions($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport\Permissions::class); - $this->permissions = $var; - - return $this; - } - - /** - * Disable root squashing, which is a feature of NFS. - * Root squash is a special mapping of the remote superuser (root) identity - * when using identity authentication. - * - * Generated from protobuf field bool no_root_squash = 5; - * @return bool - */ - public function getNoRootSquash() - { - return $this->no_root_squash; - } - - /** - * Disable root squashing, which is a feature of NFS. - * Root squash is a special mapping of the remote superuser (root) identity - * when using identity authentication. - * - * Generated from protobuf field bool no_root_squash = 5; - * @param bool $var - * @return $this - */ - public function setNoRootSquash($var) - { - GPBUtil::checkBool($var); - $this->no_root_squash = $var; - - return $this; - } - - /** - * Allow the setuid flag. - * - * Generated from protobuf field bool allow_suid = 6; - * @return bool - */ - public function getAllowSuid() - { - return $this->allow_suid; - } - - /** - * Allow the setuid flag. - * - * Generated from protobuf field bool allow_suid = 6; - * @param bool $var - * @return $this - */ - public function setAllowSuid($var) - { - GPBUtil::checkBool($var); - $this->allow_suid = $var; - - return $this; - } - - /** - * Allow dev flag in NfsShare AllowedClientsRequest. - * - * Generated from protobuf field bool allow_dev = 7; - * @return bool - */ - public function getAllowDev() - { - return $this->allow_dev; - } - - /** - * Allow dev flag in NfsShare AllowedClientsRequest. - * - * Generated from protobuf field bool allow_dev = 7; - * @param bool $var - * @return $this - */ - public function setAllowDev($var) - { - GPBUtil::checkBool($var); - $this->allow_dev = $var; - - return $this; - } - - /** - * @return string - */ - public function getClient() - { - return $this->whichOneof("client"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NfsExport::class, \Google\Cloud\BareMetalSolution\V2\VolumeConfig_NfsExport::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport/Permissions.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport/Permissions.php deleted file mode 100644 index 3df23bfc1717..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/NfsExport/Permissions.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions - */ -class Permissions -{ - /** - * Unspecified value. - * - * Generated from protobuf enum PERMISSIONS_UNSPECIFIED = 0; - */ - const PERMISSIONS_UNSPECIFIED = 0; - /** - * Read-only permission. - * - * Generated from protobuf enum READ_ONLY = 1; - */ - const READ_ONLY = 1; - /** - * Read-write permission. - * - * Generated from protobuf enum READ_WRITE = 2; - */ - const READ_WRITE = 2; - - private static $valueToName = [ - self::PERMISSIONS_UNSPECIFIED => 'PERMISSIONS_UNSPECIFIED', - self::READ_ONLY => 'READ_ONLY', - self::READ_WRITE => 'READ_WRITE', - ]; - - 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(Permissions::class, \Google\Cloud\BareMetalSolution\V2\VolumeConfig_NfsExport_Permissions::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Protocol.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Protocol.php deleted file mode 100644 index 65bef81f7778..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Protocol.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.VolumeConfig.Protocol - */ -class Protocol -{ - /** - * Unspecified value. - * - * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; - */ - const PROTOCOL_UNSPECIFIED = 0; - /** - * Fibre channel. - * - * Generated from protobuf enum PROTOCOL_FC = 1; - */ - const PROTOCOL_FC = 1; - /** - * Network file system. - * - * Generated from protobuf enum PROTOCOL_NFS = 2; - */ - const PROTOCOL_NFS = 2; - - private static $valueToName = [ - self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', - self::PROTOCOL_FC => 'PROTOCOL_FC', - self::PROTOCOL_NFS => 'PROTOCOL_NFS', - ]; - - 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(Protocol::class, \Google\Cloud\BareMetalSolution\V2\VolumeConfig_Protocol::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Type.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Type.php deleted file mode 100644 index 625c45b1595a..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeConfig/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.VolumeConfig.Type - */ -class Type -{ - /** - * The unspecified type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * This Volume is on flash. - * - * Generated from protobuf enum FLASH = 1; - */ - const FLASH = 1; - /** - * This Volume is on disk. - * - * Generated from protobuf enum DISK = 2; - */ - const DISK = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::FLASH => 'FLASH', - self::DISK => 'DISK', - ]; - - 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\BareMetalSolution\V2\VolumeConfig_Type::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumePerformanceTier.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumePerformanceTier.php deleted file mode 100644 index 7297104a7429..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumePerformanceTier.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.baremetalsolution.v2.VolumePerformanceTier - */ -class VolumePerformanceTier -{ - /** - * Value is not specified. - * - * Generated from protobuf enum VOLUME_PERFORMANCE_TIER_UNSPECIFIED = 0; - */ - const VOLUME_PERFORMANCE_TIER_UNSPECIFIED = 0; - /** - * Regular volumes, shared aggregates. - * - * Generated from protobuf enum VOLUME_PERFORMANCE_TIER_SHARED = 1; - */ - const VOLUME_PERFORMANCE_TIER_SHARED = 1; - /** - * Assigned aggregates. - * - * Generated from protobuf enum VOLUME_PERFORMANCE_TIER_ASSIGNED = 2; - */ - const VOLUME_PERFORMANCE_TIER_ASSIGNED = 2; - /** - * High throughput aggregates. - * - * Generated from protobuf enum VOLUME_PERFORMANCE_TIER_HT = 3; - */ - const VOLUME_PERFORMANCE_TIER_HT = 3; - - private static $valueToName = [ - self::VOLUME_PERFORMANCE_TIER_UNSPECIFIED => 'VOLUME_PERFORMANCE_TIER_UNSPECIFIED', - self::VOLUME_PERFORMANCE_TIER_SHARED => 'VOLUME_PERFORMANCE_TIER_SHARED', - self::VOLUME_PERFORMANCE_TIER_ASSIGNED => 'VOLUME_PERFORMANCE_TIER_ASSIGNED', - self::VOLUME_PERFORMANCE_TIER_HT => 'VOLUME_PERFORMANCE_TIER_HT', - ]; - - 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/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot.php deleted file mode 100644 index 0f373073648f..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot.php +++ /dev/null @@ -1,251 +0,0 @@ -google.cloud.baremetalsolution.v2.VolumeSnapshot - */ -class VolumeSnapshot extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the snapshot. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. An identifier for the snapshot, generated by the backend. - * - * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * The description of the snapshot. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The creation time of the snapshot. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The name of the volume which this snapshot belongs to. - * - * Generated from protobuf field string storage_volume = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $storage_volume = ''; - /** - * Output only. The type of the snapshot which indicates whether it was - * scheduled or manual/ad-hoc. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the snapshot. - * @type string $id - * Output only. An identifier for the snapshot, generated by the backend. - * @type string $description - * The description of the snapshot. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time of the snapshot. - * @type string $storage_volume - * Output only. The name of the volume which this snapshot belongs to. - * @type int $type - * Output only. The type of the snapshot which indicates whether it was - * scheduled or manual/ad-hoc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Baremetalsolution\V2\VolumeSnapshot::initOnce(); - parent::__construct($data); - } - - /** - * The name of the snapshot. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the snapshot. - * - * 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; - } - - /** - * Output only. An identifier for the snapshot, generated by the backend. - * - * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. An identifier for the snapshot, generated by the backend. - * - * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The description of the snapshot. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the snapshot. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The creation time of the snapshot. - * - * 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 creation time of the snapshot. - * - * 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 name of the volume which this snapshot belongs to. - * - * Generated from protobuf field string storage_volume = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getStorageVolume() - { - return $this->storage_volume; - } - - /** - * Output only. The name of the volume which this snapshot belongs to. - * - * Generated from protobuf field string storage_volume = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStorageVolume($var) - { - GPBUtil::checkString($var, True); - $this->storage_volume = $var; - - return $this; - } - - /** - * Output only. The type of the snapshot which indicates whether it was - * scheduled or manual/ad-hoc. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of the snapshot which indicates whether it was - * scheduled or manual/ad-hoc. - * - * Generated from protobuf field .google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot\SnapshotType::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot/SnapshotType.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot/SnapshotType.php deleted file mode 100644 index cb33991c9af7..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/VolumeSnapshot/SnapshotType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType - */ -class SnapshotType -{ - /** - * Type is not specified. - * - * Generated from protobuf enum SNAPSHOT_TYPE_UNSPECIFIED = 0; - */ - const SNAPSHOT_TYPE_UNSPECIFIED = 0; - /** - * Snapshot was taken manually by user. - * - * Generated from protobuf enum AD_HOC = 1; - */ - const AD_HOC = 1; - /** - * Snapshot was taken automatically as a part of a snapshot schedule. - * - * Generated from protobuf enum SCHEDULED = 2; - */ - const SCHEDULED = 2; - - private static $valueToName = [ - self::SNAPSHOT_TYPE_UNSPECIFIED => 'SNAPSHOT_TYPE_UNSPECIFIED', - self::AD_HOC => 'AD_HOC', - self::SCHEDULED => 'SCHEDULED', - ]; - - 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(SnapshotType::class, \Google\Cloud\BareMetalSolution\V2\VolumeSnapshot_SnapshotType::class); - diff --git a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/WorkloadProfile.php b/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/WorkloadProfile.php deleted file mode 100644 index fc772fed0a51..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/proto/src/Google/Cloud/BareMetalSolution/V2/WorkloadProfile.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.baremetalsolution.v2.WorkloadProfile - */ -class WorkloadProfile -{ - /** - * The workload profile is in an unknown state. - * - * Generated from protobuf enum WORKLOAD_PROFILE_UNSPECIFIED = 0; - */ - const WORKLOAD_PROFILE_UNSPECIFIED = 0; - /** - * The workload profile is generic. - * - * Generated from protobuf enum WORKLOAD_PROFILE_GENERIC = 1; - */ - const WORKLOAD_PROFILE_GENERIC = 1; - /** - * The workload profile is hana. - * - * Generated from protobuf enum WORKLOAD_PROFILE_HANA = 2; - */ - const WORKLOAD_PROFILE_HANA = 2; - - private static $valueToName = [ - self::WORKLOAD_PROFILE_UNSPECIFIED => 'WORKLOAD_PROFILE_UNSPECIFIED', - self::WORKLOAD_PROFILE_GENERIC => 'WORKLOAD_PROFILE_GENERIC', - self::WORKLOAD_PROFILE_HANA => 'WORKLOAD_PROFILE_HANA', - ]; - - 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/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_nfs_share.php deleted file mode 100644 index ed4d0a74f15e..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_nfs_share.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setNfsShare($nfsShare); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->createNfsShare($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NfsShare $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - create_nfs_share_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_provisioning_config.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_provisioning_config.php deleted file mode 100644 index 9bc3a6586138..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_provisioning_config.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setProvisioningConfig($provisioningConfig); - - // Call the API and handle any network failures. - try { - /** @var ProvisioningConfig $response */ - $response = $bareMetalSolutionClient->createProvisioningConfig($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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - create_provisioning_config_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_ssh_key.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_ssh_key.php deleted file mode 100644 index 41135bb514d1..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_ssh_key.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent) - ->setSshKey($sshKey) - ->setSshKeyId($sshKeyId); - - // Call the API and handle any network failures. - try { - /** @var SSHKey $response */ - $response = $bareMetalSolutionClient->createSSHKey($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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - $sshKeyId = '[SSH_KEY_ID]'; - - create_ssh_key_sample($formattedParent, $sshKeyId); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_volume_snapshot.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_volume_snapshot.php deleted file mode 100644 index 28173c28bd82..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/create_volume_snapshot.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setVolumeSnapshot($volumeSnapshot); - - // Call the API and handle any network failures. - try { - /** @var VolumeSnapshot $response */ - $response = $bareMetalSolutionClient->createVolumeSnapshot($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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - create_volume_snapshot_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_nfs_share.php deleted file mode 100644 index e2dce3818dce..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_nfs_share.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->deleteNfsShare($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 = BareMetalSolutionClient::nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); - - delete_nfs_share_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_ssh_key.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_ssh_key.php deleted file mode 100644 index 6f0600e1afa2..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_ssh_key.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $bareMetalSolutionClient->deleteSSHKey($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 = BareMetalSolutionClient::sshKeyName('[PROJECT]', '[LOCATION]', '[SSH_KEY]'); - - delete_ssh_key_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php deleted file mode 100644 index a2efad4389bd..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $bareMetalSolutionClient->deleteVolumeSnapshot($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 = BareMetalSolutionClient::volumeSnapshotName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[SNAPSHOT]' - ); - - delete_volume_snapshot_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/detach_lun.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/detach_lun.php deleted file mode 100644 index b9eaca3c7003..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/detach_lun.php +++ /dev/null @@ -1,87 +0,0 @@ -setInstance($formattedInstance) - ->setLun($formattedLun); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->detachLun($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 -{ - $formattedInstance = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $formattedLun = BareMetalSolutionClient::lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); - - detach_lun_sample($formattedInstance, $formattedLun); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php deleted file mode 100644 index 179a72f1910e..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->disableInteractiveSerialConsole($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DisableInteractiveSerialConsoleResponse $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 -{ - $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - disable_interactive_serial_console_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php deleted file mode 100644 index 9861ffcaddea..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->enableInteractiveSerialConsole($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EnableInteractiveSerialConsoleResponse $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 -{ - $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - enable_interactive_serial_console_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_lun.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_lun.php deleted file mode 100644 index 05f1470156bf..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_lun.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->evictLun($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 = BareMetalSolutionClient::lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); - - evict_lun_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_volume.php deleted file mode 100644 index 0d7f59bd5e2d..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/evict_volume.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->evictVolume($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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - evict_volume_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_instance.php deleted file mode 100644 index 7816e83709e2..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_instance.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $bareMetalSolutionClient->getInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_location.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_location.php deleted file mode 100644 index baadc6bed0c9..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/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 baremetalsolution_v2_generated_BareMetalSolution_GetLocation_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_lun.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_lun.php deleted file mode 100644 index d249f64d398f..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_lun.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Lun $response */ - $response = $bareMetalSolutionClient->getLun($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 = BareMetalSolutionClient::lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); - - get_lun_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_network.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_network.php deleted file mode 100644 index 6f1fb0c3f793..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_network.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Network $response */ - $response = $bareMetalSolutionClient->getNetwork($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 = BareMetalSolutionClient::networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); - - get_network_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_nfs_share.php deleted file mode 100644 index 88188b923791..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_nfs_share.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var NfsShare $response */ - $response = $bareMetalSolutionClient->getNfsShare($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 = BareMetalSolutionClient::nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); - - get_nfs_share_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_provisioning_config.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_provisioning_config.php deleted file mode 100644 index 59411c40cdf4..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_provisioning_config.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ProvisioningConfig $response */ - $response = $bareMetalSolutionClient->getProvisioningConfig($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 = BareMetalSolutionClient::provisioningConfigName( - '[PROJECT]', - '[LOCATION]', - '[PROVISIONING_CONFIG]' - ); - - get_provisioning_config_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume.php deleted file mode 100644 index 185a81d1cc7c..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Volume $response */ - $response = $bareMetalSolutionClient->getVolume($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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - get_volume_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume_snapshot.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume_snapshot.php deleted file mode 100644 index 0ff4ff5ca193..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/get_volume_snapshot.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VolumeSnapshot $response */ - $response = $bareMetalSolutionClient->getVolumeSnapshot($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 = BareMetalSolutionClient::volumeSnapshotName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[SNAPSHOT]' - ); - - get_volume_snapshot_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_instances.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_instances.php deleted file mode 100644 index ebbe9c0fb0d4..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_instances.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bareMetalSolutionClient->listInstances($request); - - /** @var Instance $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_locations.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_locations.php deleted file mode 100644 index c0182ac269c0..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/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 baremetalsolution_v2_generated_BareMetalSolution_ListLocations_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_luns.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_luns.php deleted file mode 100644 index 04c6ec4f4e83..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_luns.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bareMetalSolutionClient->listLuns($request); - - /** @var Lun $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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - list_luns_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_network_usage.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_network_usage.php deleted file mode 100644 index 50c7b4987643..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_network_usage.php +++ /dev/null @@ -1,72 +0,0 @@ -setLocation($formattedLocation); - - // Call the API and handle any network failures. - try { - /** @var ListNetworkUsageResponse $response */ - $response = $bareMetalSolutionClient->listNetworkUsage($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 -{ - $formattedLocation = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - list_network_usage_sample($formattedLocation); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_networks.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_networks.php deleted file mode 100644 index b08ac94895c3..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_networks.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bareMetalSolutionClient->listNetworks($request); - - /** @var Network $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - list_networks_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_nfs_shares.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_nfs_shares.php deleted file mode 100644 index 58724afd9e66..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_nfs_shares.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bareMetalSolutionClient->listNfsShares($request); - - /** @var NfsShare $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - list_nfs_shares_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_os_images.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_os_images.php deleted file mode 100644 index 73a9f72ba49c..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_os_images.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bareMetalSolutionClient->listOSImages($request); - - /** @var OSImage $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - list_os_images_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php deleted file mode 100644 index d20ebcac0d81..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bareMetalSolutionClient->listProvisioningQuotas($request); - - /** @var ProvisioningQuota $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - list_provisioning_quotas_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_ssh_keys.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_ssh_keys.php deleted file mode 100644 index 05d9976d2d4a..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_ssh_keys.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bareMetalSolutionClient->listSSHKeys($request); - - /** @var SSHKey $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - list_ssh_keys_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volume_snapshots.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volume_snapshots.php deleted file mode 100644 index ec6187beb2d3..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volume_snapshots.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bareMetalSolutionClient->listVolumeSnapshots($request); - - /** @var VolumeSnapshot $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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - list_volume_snapshots_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volumes.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volumes.php deleted file mode 100644 index d5ee384a4368..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/list_volumes.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bareMetalSolutionClient->listVolumes($request); - - /** @var Volume $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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - list_volumes_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_instance.php deleted file mode 100644 index e3626707d59e..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_instance.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName) - ->setNewInstanceId($newInstanceId); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $bareMetalSolutionClient->renameInstance($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 = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $newInstanceId = '[NEW_INSTANCE_ID]'; - - rename_instance_sample($formattedName, $newInstanceId); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_network.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_network.php deleted file mode 100644 index b57757e6efd4..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_network.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName) - ->setNewNetworkId($newNetworkId); - - // Call the API and handle any network failures. - try { - /** @var Network $response */ - $response = $bareMetalSolutionClient->renameNetwork($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 = BareMetalSolutionClient::networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); - $newNetworkId = '[NEW_NETWORK_ID]'; - - rename_network_sample($formattedName, $newNetworkId); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_nfs_share.php deleted file mode 100644 index 1dd1547c1a6b..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_nfs_share.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName) - ->setNewNfsshareId($newNfsshareId); - - // Call the API and handle any network failures. - try { - /** @var NfsShare $response */ - $response = $bareMetalSolutionClient->renameNfsShare($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 = BareMetalSolutionClient::nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); - $newNfsshareId = '[NEW_NFSSHARE_ID]'; - - rename_nfs_share_sample($formattedName, $newNfsshareId); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_volume.php deleted file mode 100644 index 22257d66071e..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/rename_volume.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName) - ->setNewVolumeId($newVolumeId); - - // Call the API and handle any network failures. - try { - /** @var Volume $response */ - $response = $bareMetalSolutionClient->renameVolume($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 = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $newVolumeId = '[NEW_VOLUME_ID]'; - - rename_volume_sample($formattedName, $newVolumeId); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/reset_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/reset_instance.php deleted file mode 100644 index 0757737dd1bb..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/reset_instance.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->resetInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ResetInstanceResponse $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 -{ - $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - reset_instance_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/resize_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/resize_volume.php deleted file mode 100644 index e71be72e3fab..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/resize_volume.php +++ /dev/null @@ -1,83 +0,0 @@ -setVolume($formattedVolume); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->resizeVolume($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Volume $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 -{ - $formattedVolume = BareMetalSolutionClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - resize_volume_sample($formattedVolume); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php deleted file mode 100644 index 0c6dba96a751..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php +++ /dev/null @@ -1,90 +0,0 @@ -setVolumeSnapshot($formattedVolumeSnapshot); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->restoreVolumeSnapshot($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var VolumeSnapshot $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 -{ - $formattedVolumeSnapshot = BareMetalSolutionClient::volumeSnapshotName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[SNAPSHOT]' - ); - - restore_volume_snapshot_sample($formattedVolumeSnapshot); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/start_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/start_instance.php deleted file mode 100644 index e1edfde7a964..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/start_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->startInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var StartInstanceResponse $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 -{ - $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - start_instance_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/stop_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/stop_instance.php deleted file mode 100644 index 56e08ba240bd..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/stop_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->stopInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var StopInstanceResponse $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 -{ - $formattedName = BareMetalSolutionClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - stop_instance_sample($formattedName); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/submit_provisioning_config.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/submit_provisioning_config.php deleted file mode 100644 index 4fc592a83cc5..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/submit_provisioning_config.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setProvisioningConfig($provisioningConfig); - - // Call the API and handle any network failures. - try { - /** @var SubmitProvisioningConfigResponse $response */ - $response = $bareMetalSolutionClient->submitProvisioningConfig($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 = BareMetalSolutionClient::locationName('[PROJECT]', '[LOCATION]'); - - submit_provisioning_config_sample($formattedParent); -} -// [END baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_instance.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_instance.php deleted file mode 100644 index 75a782c8fb99..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_instance.php +++ /dev/null @@ -1,71 +0,0 @@ -setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->updateInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_network.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_network.php deleted file mode 100644 index bd16181fe008..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_network.php +++ /dev/null @@ -1,71 +0,0 @@ -setNetwork($network); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->updateNetwork($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Network $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 baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_nfs_share.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_nfs_share.php deleted file mode 100644 index 8d56c47b34ca..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_nfs_share.php +++ /dev/null @@ -1,71 +0,0 @@ -setNfsShare($nfsShare); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->updateNfsShare($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NfsShare $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 baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_provisioning_config.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_provisioning_config.php deleted file mode 100644 index 3d07d4d712d2..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_provisioning_config.php +++ /dev/null @@ -1,62 +0,0 @@ -setProvisioningConfig($provisioningConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var ProvisioningConfig $response */ - $response = $bareMetalSolutionClient->updateProvisioningConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_volume.php b/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_volume.php deleted file mode 100644 index 705fcc7c9cdd..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/samples/V2/BareMetalSolutionClient/update_volume.php +++ /dev/null @@ -1,71 +0,0 @@ -setVolume($volume); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bareMetalSolutionClient->updateVolume($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Volume $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 baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] diff --git a/owl-bot-staging/BareMetalSolution/v2/src/V2/Client/BareMetalSolutionClient.php b/owl-bot-staging/BareMetalSolution/v2/src/V2/Client/BareMetalSolutionClient.php deleted file mode 100644 index d21ed1cd65b2..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/src/V2/Client/BareMetalSolutionClient.php +++ /dev/null @@ -1,1856 +0,0 @@ - createNfsShareAsync(CreateNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface createProvisioningConfigAsync(CreateProvisioningConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSSHKeyAsync(CreateSSHKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVolumeSnapshotAsync(CreateVolumeSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNfsShareAsync(DeleteNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSSHKeyAsync(DeleteSSHKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteVolumeSnapshotAsync(DeleteVolumeSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface detachLunAsync(DetachLunRequest $request, array $optionalArgs = []) - * @method PromiseInterface disableInteractiveSerialConsoleAsync(DisableInteractiveSerialConsoleRequest $request, array $optionalArgs = []) - * @method PromiseInterface enableInteractiveSerialConsoleAsync(EnableInteractiveSerialConsoleRequest $request, array $optionalArgs = []) - * @method PromiseInterface evictLunAsync(EvictLunRequest $request, array $optionalArgs = []) - * @method PromiseInterface evictVolumeAsync(EvictVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLunAsync(GetLunRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNetworkAsync(GetNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNfsShareAsync(GetNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProvisioningConfigAsync(GetProvisioningConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVolumeAsync(GetVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVolumeSnapshotAsync(GetVolumeSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLunsAsync(ListLunsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNetworkUsageAsync(ListNetworkUsageRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNetworksAsync(ListNetworksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNfsSharesAsync(ListNfsSharesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOSImagesAsync(ListOSImagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProvisioningQuotasAsync(ListProvisioningQuotasRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSSHKeysAsync(ListSSHKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVolumeSnapshotsAsync(ListVolumeSnapshotsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVolumesAsync(ListVolumesRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameInstanceAsync(RenameInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameNetworkAsync(RenameNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameNfsShareAsync(RenameNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameVolumeAsync(RenameVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetInstanceAsync(ResetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface resizeVolumeAsync(ResizeVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreVolumeSnapshotAsync(RestoreVolumeSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface startInstanceAsync(StartInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopInstanceAsync(StopInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface submitProvisioningConfigAsync(SubmitProvisioningConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNetworkAsync(UpdateNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNfsShareAsync(UpdateNfsShareRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProvisioningConfigAsync(UpdateProvisioningConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateVolumeAsync(UpdateVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class BareMetalSolutionClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.baremetalsolution.v2.BareMetalSolution'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'baremetalsolution.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'baremetalsolution.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bare_metal_solution_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bare_metal_solution_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bare_metal_solution_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bare_metal_solution_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * instance_config resource. - * - * @param string $project - * @param string $location - * @param string $instanceConfig - * - * @return string The formatted instance_config resource. - */ - public static function instanceConfigName(string $project, string $location, string $instanceConfig): string - { - return self::getPathTemplate('instanceConfig')->render([ - 'project' => $project, - 'location' => $location, - 'instance_config' => $instanceConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * interconnect_attachment resource. - * - * @param string $project - * @param string $region - * @param string $interconnectAttachment - * - * @return string The formatted interconnect_attachment resource. - */ - public static function interconnectAttachmentName(string $project, string $region, string $interconnectAttachment): string - { - return self::getPathTemplate('interconnectAttachment')->render([ - 'project' => $project, - 'region' => $region, - 'interconnect_attachment' => $interconnectAttachment, - ]); - } - - /** - * 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 lun - * resource. - * - * @param string $project - * @param string $location - * @param string $volume - * @param string $lun - * - * @return string The formatted lun resource. - */ - public static function lunName(string $project, string $location, string $volume, string $lun): string - { - return self::getPathTemplate('lun')->render([ - 'project' => $project, - 'location' => $location, - 'volume' => $volume, - 'lun' => $lun, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a nfs_share - * resource. - * - * @param string $project - * @param string $location - * @param string $nfsShare - * - * @return string The formatted nfs_share resource. - */ - public static function nFSShareName(string $project, string $location, string $nfsShare): string - { - return self::getPathTemplate('nFSShare')->render([ - 'project' => $project, - 'location' => $location, - 'nfs_share' => $nfsShare, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $location - * @param string $network - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $location, string $network): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'location' => $location, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * network_config resource. - * - * @param string $project - * @param string $location - * @param string $networkConfig - * - * @return string The formatted network_config resource. - */ - public static function networkConfigName(string $project, string $location, string $networkConfig): string - { - return self::getPathTemplate('networkConfig')->render([ - 'project' => $project, - 'location' => $location, - 'network_config' => $networkConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * provisioning_config resource. - * - * @param string $project - * @param string $location - * @param string $provisioningConfig - * - * @return string The formatted provisioning_config resource. - */ - public static function provisioningConfigName(string $project, string $location, string $provisioningConfig): string - { - return self::getPathTemplate('provisioningConfig')->render([ - 'project' => $project, - 'location' => $location, - 'provisioning_config' => $provisioningConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * server_network_template resource. - * - * @param string $project - * @param string $location - * @param string $serverNetworkTemplate - * - * @return string The formatted server_network_template resource. - */ - public static function serverNetworkTemplateName(string $project, string $location, string $serverNetworkTemplate): string - { - return self::getPathTemplate('serverNetworkTemplate')->render([ - 'project' => $project, - 'location' => $location, - 'server_network_template' => $serverNetworkTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a ssh_key - * resource. - * - * @param string $project - * @param string $location - * @param string $sshKey - * - * @return string The formatted ssh_key resource. - */ - public static function sshKeyName(string $project, string $location, string $sshKey): string - { - return self::getPathTemplate('sshKey')->render([ - 'project' => $project, - 'location' => $location, - 'ssh_key' => $sshKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a volume - * resource. - * - * @param string $project - * @param string $location - * @param string $volume - * - * @return string The formatted volume resource. - */ - public static function volumeName(string $project, string $location, string $volume): string - { - return self::getPathTemplate('volume')->render([ - 'project' => $project, - 'location' => $location, - 'volume' => $volume, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * volume_config resource. - * - * @param string $project - * @param string $location - * @param string $volumeConfig - * - * @return string The formatted volume_config resource. - */ - public static function volumeConfigName(string $project, string $location, string $volumeConfig): string - { - return self::getPathTemplate('volumeConfig')->render([ - 'project' => $project, - 'location' => $location, - 'volume_config' => $volumeConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * volume_snapshot resource. - * - * @param string $project - * @param string $location - * @param string $volume - * @param string $snapshot - * - * @return string The formatted volume_snapshot resource. - */ - public static function volumeSnapshotName(string $project, string $location, string $volume, string $snapshot): string - { - return self::getPathTemplate('volumeSnapshot')->render([ - 'project' => $project, - 'location' => $location, - 'volume' => $volume, - 'snapshot' => $snapshot, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - instanceConfig: projects/{project}/locations/{location}/instanceConfigs/{instance_config} - * - interconnectAttachment: projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment} - * - location: projects/{project}/locations/{location} - * - lun: projects/{project}/locations/{location}/volumes/{volume}/luns/{lun} - * - nFSShare: projects/{project}/locations/{location}/nfsShares/{nfs_share} - * - network: projects/{project}/locations/{location}/networks/{network} - * - networkConfig: projects/{project}/locations/{location}/networkConfigs/{network_config} - * - provisioningConfig: projects/{project}/locations/{location}/provisioningConfigs/{provisioning_config} - * - serverNetworkTemplate: projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template} - * - sshKey: projects/{project}/locations/{location}/sshKeys/{ssh_key} - * - volume: projects/{project}/locations/{location}/volumes/{volume} - * - volumeConfig: projects/{project}/locations/{location}/volumeConfigs/{volume_config} - * - volumeSnapshot: projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} - * - * 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 'baremetalsolution.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 an NFS share. - * - * The async variant is {@see BareMetalSolutionClient::createNfsShareAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/create_nfs_share.php - * - * @param CreateNfsShareRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createNfsShare(CreateNfsShareRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateNfsShare', $request, $callOptions)->wait(); - } - - /** - * Create new ProvisioningConfig. - * - * The async variant is - * {@see BareMetalSolutionClient::createProvisioningConfigAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/create_provisioning_config.php - * - * @param CreateProvisioningConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProvisioningConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function createProvisioningConfig(CreateProvisioningConfigRequest $request, array $callOptions = []): ProvisioningConfig - { - return $this->startApiCall('CreateProvisioningConfig', $request, $callOptions)->wait(); - } - - /** - * Register a public SSH key in the specified project for use with the - * interactive serial console feature. - * - * The async variant is {@see BareMetalSolutionClient::createSSHKeyAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/create_ssh_key.php - * - * @param CreateSSHKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SSHKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSSHKey(CreateSSHKeyRequest $request, array $callOptions = []): SSHKey - { - return $this->startApiCall('CreateSSHKey', $request, $callOptions)->wait(); - } - - /** - * Takes a snapshot of a boot volume. - * Returns INVALID_ARGUMENT if called for a non-boot volume. - * - * The async variant is {@see BareMetalSolutionClient::createVolumeSnapshotAsync()} - * . - * - * @example samples/V2/BareMetalSolutionClient/create_volume_snapshot.php - * - * @param CreateVolumeSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VolumeSnapshot - * - * @throws ApiException Thrown if the API call fails. - */ - public function createVolumeSnapshot(CreateVolumeSnapshotRequest $request, array $callOptions = []): VolumeSnapshot - { - return $this->startApiCall('CreateVolumeSnapshot', $request, $callOptions)->wait(); - } - - /** - * Delete an NFS share. The underlying volume is automatically deleted. - * - * The async variant is {@see BareMetalSolutionClient::deleteNfsShareAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/delete_nfs_share.php - * - * @param DeleteNfsShareRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteNfsShare(DeleteNfsShareRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteNfsShare', $request, $callOptions)->wait(); - } - - /** - * Deletes a public SSH key registered in the specified project. - * - * The async variant is {@see BareMetalSolutionClient::deleteSSHKeyAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/delete_ssh_key.php - * - * @param DeleteSSHKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteSSHKey(DeleteSSHKeyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSSHKey', $request, $callOptions)->wait(); - } - - /** - * Deletes a volume snapshot. - * Returns INVALID_ARGUMENT if called for a non-boot volume. - * - * The async variant is {@see BareMetalSolutionClient::deleteVolumeSnapshotAsync()} - * . - * - * @example samples/V2/BareMetalSolutionClient/delete_volume_snapshot.php - * - * @param DeleteVolumeSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteVolumeSnapshot(DeleteVolumeSnapshotRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteVolumeSnapshot', $request, $callOptions)->wait(); - } - - /** - * Detach LUN from Instance. - * - * The async variant is {@see BareMetalSolutionClient::detachLunAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/detach_lun.php - * - * @param DetachLunRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 detachLun(DetachLunRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DetachLun', $request, $callOptions)->wait(); - } - - /** - * Disable the interactive serial console feature on an instance. - * - * The async variant is - * {@see BareMetalSolutionClient::disableInteractiveSerialConsoleAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/disable_interactive_serial_console.php - * - * @param DisableInteractiveSerialConsoleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 disableInteractiveSerialConsole(DisableInteractiveSerialConsoleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DisableInteractiveSerialConsole', $request, $callOptions)->wait(); - } - - /** - * Enable the interactive serial console feature on an instance. - * - * The async variant is - * {@see BareMetalSolutionClient::enableInteractiveSerialConsoleAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/enable_interactive_serial_console.php - * - * @param EnableInteractiveSerialConsoleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 enableInteractiveSerialConsole(EnableInteractiveSerialConsoleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('EnableInteractiveSerialConsole', $request, $callOptions)->wait(); - } - - /** - * Skips lun's cooloff and deletes it now. - * Lun must be in cooloff state. - * - * The async variant is {@see BareMetalSolutionClient::evictLunAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/evict_lun.php - * - * @param EvictLunRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 evictLun(EvictLunRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('EvictLun', $request, $callOptions)->wait(); - } - - /** - * Skips volume's cooloff and deletes it now. - * Volume must be in cooloff state. - * - * The async variant is {@see BareMetalSolutionClient::evictVolumeAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/evict_volume.php - * - * @param EvictVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 evictVolume(EvictVolumeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('EvictVolume', $request, $callOptions)->wait(); - } - - /** - * Get details about a single server. - * - * The async variant is {@see BareMetalSolutionClient::getInstanceAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/get_instance.php - * - * @param GetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Get details of a single storage logical unit number(LUN). - * - * The async variant is {@see BareMetalSolutionClient::getLunAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/get_lun.php - * - * @param GetLunRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Lun - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLun(GetLunRequest $request, array $callOptions = []): Lun - { - return $this->startApiCall('GetLun', $request, $callOptions)->wait(); - } - - /** - * Get details of a single network. - * - * The async variant is {@see BareMetalSolutionClient::getNetworkAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/get_network.php - * - * @param GetNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Network - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNetwork(GetNetworkRequest $request, array $callOptions = []): Network - { - return $this->startApiCall('GetNetwork', $request, $callOptions)->wait(); - } - - /** - * Get details of a single NFS share. - * - * The async variant is {@see BareMetalSolutionClient::getNfsShareAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/get_nfs_share.php - * - * @param GetNfsShareRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NfsShare - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNfsShare(GetNfsShareRequest $request, array $callOptions = []): NfsShare - { - return $this->startApiCall('GetNfsShare', $request, $callOptions)->wait(); - } - - /** - * Get ProvisioningConfig by name. - * - * The async variant is - * {@see BareMetalSolutionClient::getProvisioningConfigAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/get_provisioning_config.php - * - * @param GetProvisioningConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProvisioningConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProvisioningConfig(GetProvisioningConfigRequest $request, array $callOptions = []): ProvisioningConfig - { - return $this->startApiCall('GetProvisioningConfig', $request, $callOptions)->wait(); - } - - /** - * Get details of a single storage volume. - * - * The async variant is {@see BareMetalSolutionClient::getVolumeAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/get_volume.php - * - * @param GetVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Volume - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVolume(GetVolumeRequest $request, array $callOptions = []): Volume - { - return $this->startApiCall('GetVolume', $request, $callOptions)->wait(); - } - - /** - * Returns the specified snapshot resource. - * Returns INVALID_ARGUMENT if called for a non-boot volume. - * - * The async variant is {@see BareMetalSolutionClient::getVolumeSnapshotAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/get_volume_snapshot.php - * - * @param GetVolumeSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VolumeSnapshot - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVolumeSnapshot(GetVolumeSnapshotRequest $request, array $callOptions = []): VolumeSnapshot - { - return $this->startApiCall('GetVolumeSnapshot', $request, $callOptions)->wait(); - } - - /** - * List servers in a given project and location. - * - * The async variant is {@see BareMetalSolutionClient::listInstancesAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/list_instances.php - * - * @param ListInstancesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * List storage volume luns for given storage volume. - * - * The async variant is {@see BareMetalSolutionClient::listLunsAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/list_luns.php - * - * @param ListLunsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listLuns(ListLunsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLuns', $request, $callOptions); - } - - /** - * List all Networks (and used IPs for each Network) in the vendor account - * associated with the specified project. - * - * The async variant is {@see BareMetalSolutionClient::listNetworkUsageAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/list_network_usage.php - * - * @param ListNetworkUsageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListNetworkUsageResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listNetworkUsage(ListNetworkUsageRequest $request, array $callOptions = []): ListNetworkUsageResponse - { - return $this->startApiCall('ListNetworkUsage', $request, $callOptions)->wait(); - } - - /** - * List network in a given project and location. - * - * The async variant is {@see BareMetalSolutionClient::listNetworksAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/list_networks.php - * - * @param ListNetworksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listNetworks(ListNetworksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNetworks', $request, $callOptions); - } - - /** - * List NFS shares. - * - * The async variant is {@see BareMetalSolutionClient::listNfsSharesAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/list_nfs_shares.php - * - * @param ListNfsSharesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listNfsShares(ListNfsSharesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNfsShares', $request, $callOptions); - } - - /** - * Retrieves the list of OS images which are currently approved. - * - * The async variant is {@see BareMetalSolutionClient::listOSImagesAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/list_os_images.php - * - * @param ListOSImagesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listOSImages(ListOSImagesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOSImages', $request, $callOptions); - } - - /** - * List the budget details to provision resources on a given project. - * - * The async variant is - * {@see BareMetalSolutionClient::listProvisioningQuotasAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/list_provisioning_quotas.php - * - * @param ListProvisioningQuotasRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listProvisioningQuotas(ListProvisioningQuotasRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProvisioningQuotas', $request, $callOptions); - } - - /** - * Lists the public SSH keys registered for the specified project. - * These SSH keys are used only for the interactive serial console feature. - * - * The async variant is {@see BareMetalSolutionClient::listSSHKeysAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/list_ssh_keys.php - * - * @param ListSSHKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSSHKeys(ListSSHKeysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSSHKeys', $request, $callOptions); - } - - /** - * Retrieves the list of snapshots for the specified volume. - * Returns a response with an empty list of snapshots if called - * for a non-boot volume. - * - * The async variant is {@see BareMetalSolutionClient::listVolumeSnapshotsAsync()} - * . - * - * @example samples/V2/BareMetalSolutionClient/list_volume_snapshots.php - * - * @param ListVolumeSnapshotsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listVolumeSnapshots(ListVolumeSnapshotsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVolumeSnapshots', $request, $callOptions); - } - - /** - * List storage volumes in a given project and location. - * - * The async variant is {@see BareMetalSolutionClient::listVolumesAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/list_volumes.php - * - * @param ListVolumesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listVolumes(ListVolumesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVolumes', $request, $callOptions); - } - - /** - * RenameInstance sets a new name for an instance. - * Use with caution, previous names become immediately invalidated. - * - * The async variant is {@see BareMetalSolutionClient::renameInstanceAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/rename_instance.php - * - * @param RenameInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function renameInstance(RenameInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('RenameInstance', $request, $callOptions)->wait(); - } - - /** - * RenameNetwork sets a new name for a network. - * Use with caution, previous names become immediately invalidated. - * - * The async variant is {@see BareMetalSolutionClient::renameNetworkAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/rename_network.php - * - * @param RenameNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Network - * - * @throws ApiException Thrown if the API call fails. - */ - public function renameNetwork(RenameNetworkRequest $request, array $callOptions = []): Network - { - return $this->startApiCall('RenameNetwork', $request, $callOptions)->wait(); - } - - /** - * RenameNfsShare sets a new name for an nfsshare. - * Use with caution, previous names become immediately invalidated. - * - * The async variant is {@see BareMetalSolutionClient::renameNfsShareAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/rename_nfs_share.php - * - * @param RenameNfsShareRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NfsShare - * - * @throws ApiException Thrown if the API call fails. - */ - public function renameNfsShare(RenameNfsShareRequest $request, array $callOptions = []): NfsShare - { - return $this->startApiCall('RenameNfsShare', $request, $callOptions)->wait(); - } - - /** - * RenameVolume sets a new name for a volume. - * Use with caution, previous names become immediately invalidated. - * - * The async variant is {@see BareMetalSolutionClient::renameVolumeAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/rename_volume.php - * - * @param RenameVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Volume - * - * @throws ApiException Thrown if the API call fails. - */ - public function renameVolume(RenameVolumeRequest $request, array $callOptions = []): Volume - { - return $this->startApiCall('RenameVolume', $request, $callOptions)->wait(); - } - - /** - * Perform an ungraceful, hard reset on a server. Equivalent to shutting the - * power off and then turning it back on. - * - * The async variant is {@see BareMetalSolutionClient::resetInstanceAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/reset_instance.php - * - * @param ResetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 resetInstance(ResetInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResetInstance', $request, $callOptions)->wait(); - } - - /** - * Emergency Volume resize. - * - * The async variant is {@see BareMetalSolutionClient::resizeVolumeAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/resize_volume.php - * - * @param ResizeVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 resizeVolume(ResizeVolumeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResizeVolume', $request, $callOptions)->wait(); - } - - /** - * Uses the specified snapshot to restore its parent volume. - * Returns INVALID_ARGUMENT if called for a non-boot volume. - * - * The async variant is - * {@see BareMetalSolutionClient::restoreVolumeSnapshotAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/restore_volume_snapshot.php - * - * @param RestoreVolumeSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 restoreVolumeSnapshot(RestoreVolumeSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RestoreVolumeSnapshot', $request, $callOptions)->wait(); - } - - /** - * Starts a server that was shutdown. - * - * The async variant is {@see BareMetalSolutionClient::startInstanceAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/start_instance.php - * - * @param StartInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 startInstance(StartInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartInstance', $request, $callOptions)->wait(); - } - - /** - * Stop a running server. - * - * The async variant is {@see BareMetalSolutionClient::stopInstanceAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/stop_instance.php - * - * @param StopInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 stopInstance(StopInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StopInstance', $request, $callOptions)->wait(); - } - - /** - * Submit a provisiong configuration for a given project. - * - * The async variant is - * {@see BareMetalSolutionClient::submitProvisioningConfigAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/submit_provisioning_config.php - * - * @param SubmitProvisioningConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SubmitProvisioningConfigResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function submitProvisioningConfig(SubmitProvisioningConfigRequest $request, array $callOptions = []): SubmitProvisioningConfigResponse - { - return $this->startApiCall('SubmitProvisioningConfig', $request, $callOptions)->wait(); - } - - /** - * Update details of a single server. - * - * The async variant is {@see BareMetalSolutionClient::updateInstanceAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/update_instance.php - * - * @param UpdateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Update details of a single network. - * - * The async variant is {@see BareMetalSolutionClient::updateNetworkAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/update_network.php - * - * @param UpdateNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateNetwork(UpdateNetworkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateNetwork', $request, $callOptions)->wait(); - } - - /** - * Update details of a single NFS share. - * - * The async variant is {@see BareMetalSolutionClient::updateNfsShareAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/update_nfs_share.php - * - * @param UpdateNfsShareRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateNfsShare(UpdateNfsShareRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateNfsShare', $request, $callOptions)->wait(); - } - - /** - * Update existing ProvisioningConfig. - * - * The async variant is - * {@see BareMetalSolutionClient::updateProvisioningConfigAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/update_provisioning_config.php - * - * @param UpdateProvisioningConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProvisioningConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateProvisioningConfig(UpdateProvisioningConfigRequest $request, array $callOptions = []): ProvisioningConfig - { - return $this->startApiCall('UpdateProvisioningConfig', $request, $callOptions)->wait(); - } - - /** - * Update details of a single storage volume. - * - * The async variant is {@see BareMetalSolutionClient::updateVolumeAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/update_volume.php - * - * @param UpdateVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateVolume(UpdateVolumeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateVolume', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see BareMetalSolutionClient::getLocationAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/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 BareMetalSolutionClient::listLocationsAsync()} . - * - * @example samples/V2/BareMetalSolutionClient/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/BareMetalSolution/v2/src/V2/gapic_metadata.json b/owl-bot-staging/BareMetalSolution/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 330d34ae54a4..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.baremetalsolution.v2", - "libraryPackage": "Google\\Cloud\\BareMetalSolution\\V2", - "services": { - "BareMetalSolution": { - "clients": { - "grpc": { - "libraryClient": "BareMetalSolutionGapicClient", - "rpcs": { - "CreateNfsShare": { - "methods": [ - "createNfsShare" - ] - }, - "CreateProvisioningConfig": { - "methods": [ - "createProvisioningConfig" - ] - }, - "CreateSSHKey": { - "methods": [ - "createSSHKey" - ] - }, - "CreateVolumeSnapshot": { - "methods": [ - "createVolumeSnapshot" - ] - }, - "DeleteNfsShare": { - "methods": [ - "deleteNfsShare" - ] - }, - "DeleteSSHKey": { - "methods": [ - "deleteSSHKey" - ] - }, - "DeleteVolumeSnapshot": { - "methods": [ - "deleteVolumeSnapshot" - ] - }, - "DetachLun": { - "methods": [ - "detachLun" - ] - }, - "DisableInteractiveSerialConsole": { - "methods": [ - "disableInteractiveSerialConsole" - ] - }, - "EnableInteractiveSerialConsole": { - "methods": [ - "enableInteractiveSerialConsole" - ] - }, - "EvictLun": { - "methods": [ - "evictLun" - ] - }, - "EvictVolume": { - "methods": [ - "evictVolume" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "GetLun": { - "methods": [ - "getLun" - ] - }, - "GetNetwork": { - "methods": [ - "getNetwork" - ] - }, - "GetNfsShare": { - "methods": [ - "getNfsShare" - ] - }, - "GetProvisioningConfig": { - "methods": [ - "getProvisioningConfig" - ] - }, - "GetVolume": { - "methods": [ - "getVolume" - ] - }, - "GetVolumeSnapshot": { - "methods": [ - "getVolumeSnapshot" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "ListLuns": { - "methods": [ - "listLuns" - ] - }, - "ListNetworkUsage": { - "methods": [ - "listNetworkUsage" - ] - }, - "ListNetworks": { - "methods": [ - "listNetworks" - ] - }, - "ListNfsShares": { - "methods": [ - "listNfsShares" - ] - }, - "ListOSImages": { - "methods": [ - "listOSImages" - ] - }, - "ListProvisioningQuotas": { - "methods": [ - "listProvisioningQuotas" - ] - }, - "ListSSHKeys": { - "methods": [ - "listSSHKeys" - ] - }, - "ListVolumeSnapshots": { - "methods": [ - "listVolumeSnapshots" - ] - }, - "ListVolumes": { - "methods": [ - "listVolumes" - ] - }, - "RenameInstance": { - "methods": [ - "renameInstance" - ] - }, - "RenameNetwork": { - "methods": [ - "renameNetwork" - ] - }, - "RenameNfsShare": { - "methods": [ - "renameNfsShare" - ] - }, - "RenameVolume": { - "methods": [ - "renameVolume" - ] - }, - "ResetInstance": { - "methods": [ - "resetInstance" - ] - }, - "ResizeVolume": { - "methods": [ - "resizeVolume" - ] - }, - "RestoreVolumeSnapshot": { - "methods": [ - "restoreVolumeSnapshot" - ] - }, - "StartInstance": { - "methods": [ - "startInstance" - ] - }, - "StopInstance": { - "methods": [ - "stopInstance" - ] - }, - "SubmitProvisioningConfig": { - "methods": [ - "submitProvisioningConfig" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - }, - "UpdateNetwork": { - "methods": [ - "updateNetwork" - ] - }, - "UpdateNfsShare": { - "methods": [ - "updateNfsShare" - ] - }, - "UpdateProvisioningConfig": { - "methods": [ - "updateProvisioningConfig" - ] - }, - "UpdateVolume": { - "methods": [ - "updateVolume" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_client_config.json b/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_client_config.json deleted file mode 100644 index 65c1fe7f2687..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_client_config.json +++ /dev/null @@ -1,262 +0,0 @@ -{ - "interfaces": { - "google.cloud.baremetalsolution.v2.BareMetalSolution": { - "retry_codes": { - "no_retry_codes": [], - "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 - }, - "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": { - "CreateNfsShare": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateProvisioningConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateSSHKey": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateVolumeSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteNfsShare": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteSSHKey": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteVolumeSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DetachLun": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DisableInteractiveSerialConsole": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EnableInteractiveSerialConsole": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EvictLun": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EvictVolume": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLun": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetNetwork": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetNfsShare": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetProvisioningConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetVolume": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetVolumeSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLuns": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListNetworkUsage": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListNetworks": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListNfsShares": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListOSImages": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListProvisioningQuotas": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListSSHKeys": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListVolumeSnapshots": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListVolumes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RenameInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RenameNetwork": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RenameNfsShare": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RenameVolume": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResizeVolume": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RestoreVolumeSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StartInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StopInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SubmitProvisioningConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateNetwork": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateNfsShare": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateProvisioningConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateVolume": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_descriptor_config.php b/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_descriptor_config.php deleted file mode 100644 index 343411549094..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_descriptor_config.php +++ /dev/null @@ -1,795 +0,0 @@ - [ - 'google.cloud.baremetalsolution.v2.BareMetalSolution' => [ - 'CreateNfsShare' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\NfsShare', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteNfsShare' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DetachLun' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'DisableInteractiveSerialConsole' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\DisableInteractiveSerialConsoleResponse', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EnableInteractiveSerialConsole' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\EnableInteractiveSerialConsoleResponse', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EvictLun' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EvictVolume' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResetInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\ResetInstanceResponse', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResizeVolume' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Volume', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'volume', - 'fieldAccessors' => [ - 'getVolume', - ], - ], - ], - ], - 'RestoreVolumeSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\VolumeSnapshot', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'volume_snapshot', - 'fieldAccessors' => [ - 'getVolumeSnapshot', - ], - ], - ], - ], - 'StartInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\StartInstanceResponse', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StopInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\StopInstanceResponse', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'UpdateNetwork' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Network', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'network.name', - 'fieldAccessors' => [ - 'getNetwork', - 'getName', - ], - ], - ], - ], - 'UpdateNfsShare' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\NfsShare', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'nfs_share.name', - 'fieldAccessors' => [ - 'getNfsShare', - 'getName', - ], - ], - ], - ], - 'UpdateVolume' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BareMetalSolution\V2\Volume', - 'metadataReturnType' => '\Google\Cloud\BareMetalSolution\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'volume.name', - 'fieldAccessors' => [ - 'getVolume', - 'getName', - ], - ], - ], - ], - 'CreateProvisioningConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ProvisioningConfig', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSSHKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\SSHKey', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateVolumeSnapshot' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\VolumeSnapshot', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSSHKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVolumeSnapshot' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLun' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Lun', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNetwork' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Network', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNfsShare' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\NfsShare', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProvisioningConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ProvisioningConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVolume' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Volume', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVolumeSnapshot' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\VolumeSnapshot', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLuns' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLuns', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListLunsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNetworkUsage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListNetworkUsageResponse', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getLocation', - ], - ], - ], - ], - 'ListNetworks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNetworks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListNetworksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNfsShares' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNfsShares', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListNfsSharesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOSImages' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOsImages', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListOSImagesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProvisioningQuotas' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProvisioningQuotas', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListProvisioningQuotasResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSSHKeys' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSshKeys', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListSSHKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumeSnapshots' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVolumeSnapshots', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListVolumeSnapshotsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVolumes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ListVolumesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RenameInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RenameNetwork' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Network', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RenameNfsShare' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\NfsShare', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RenameVolume' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\Volume', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SubmitProvisioningConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\SubmitProvisioningConfigResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateProvisioningConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BareMetalSolution\V2\ProvisioningConfig', - 'headerParams' => [ - [ - 'keyName' => 'provisioning_config.name', - 'fieldAccessors' => [ - 'getProvisioningConfig', - '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' => [ - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'instanceConfig' => 'projects/{project}/locations/{location}/instanceConfigs/{instance_config}', - 'interconnectAttachment' => 'projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}', - 'location' => 'projects/{project}/locations/{location}', - 'lun' => 'projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}', - 'nFSShare' => 'projects/{project}/locations/{location}/nfsShares/{nfs_share}', - 'network' => 'projects/{project}/locations/{location}/networks/{network}', - 'networkConfig' => 'projects/{project}/locations/{location}/networkConfigs/{network_config}', - 'provisioningConfig' => 'projects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}', - 'serverNetworkTemplate' => 'projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}', - 'sshKey' => 'projects/{project}/locations/{location}/sshKeys/{ssh_key}', - 'volume' => 'projects/{project}/locations/{location}/volumes/{volume}', - 'volumeConfig' => 'projects/{project}/locations/{location}/volumeConfigs/{volume_config}', - 'volumeSnapshot' => 'projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_rest_client_config.php b/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_rest_client_config.php deleted file mode 100644 index 38b7716b99b6..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/src/V2/resources/bare_metal_solution_rest_client_config.php +++ /dev/null @@ -1,572 +0,0 @@ - [ - 'google.cloud.baremetalsolution.v2.BareMetalSolution' => [ - 'CreateNfsShare' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/nfsShares', - 'body' => 'nfs_share', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateProvisioningConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/provisioningConfigs', - 'body' => 'provisioning_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSSHKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/sshKeys', - 'body' => 'ssh_key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'ssh_key_id', - ], - ], - 'CreateVolumeSnapshot' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/volumes/*}/snapshots', - 'body' => 'volume_snapshot', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteNfsShare' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/nfsShares/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSSHKey' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/sshKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVolumeSnapshot' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DetachLun' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{instance=projects/*/locations/*/instances/*}:detachLun', - 'body' => '*', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - ], - ], - 'DisableInteractiveSerialConsole' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:disableInteractiveSerialConsole', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EnableInteractiveSerialConsole' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:enableInteractiveSerialConsole', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EvictLun' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*/luns/*}:evict', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EvictVolume' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*}:evict', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLun' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*/luns/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNetwork' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/networks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNfsShare' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/nfsShares/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProvisioningConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/provisioningConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVolume' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVolumeSnapshot' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLuns' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/volumes/*}/luns', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNetworkUsage' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{location=projects/*/locations/*}/networks:listNetworkUsage', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'ListNetworks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/networks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNfsShares' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/nfsShares', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOSImages' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/osImages', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProvisioningQuotas' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/provisioningQuotas', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSSHKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/sshKeys', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumeSnapshots' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/volumes/*}/snapshots', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumes' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/volumes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RenameInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:rename', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RenameNetwork' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/networks/*}:rename', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RenameNfsShare' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/nfsShares/*}:rename', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RenameVolume' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/volumes/*}:rename', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResetInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:reset', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResizeVolume' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{volume=projects/*/locations/*/volumes/*}:resize', - 'body' => '*', - 'placeholders' => [ - 'volume' => [ - 'getters' => [ - 'getVolume', - ], - ], - ], - ], - 'RestoreVolumeSnapshot' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{volume_snapshot=projects/*/locations/*/volumes/*/snapshots/*}:restoreVolumeSnapshot', - 'body' => '*', - 'placeholders' => [ - 'volume_snapshot' => [ - 'getters' => [ - 'getVolumeSnapshot', - ], - ], - ], - ], - 'StartInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SubmitProvisioningConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/provisioningConfigs:submit', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{instance.name=projects/*/locations/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'UpdateNetwork' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{network.name=projects/*/locations/*/networks/*}', - 'body' => 'network', - 'placeholders' => [ - 'network.name' => [ - 'getters' => [ - 'getNetwork', - 'getName', - ], - ], - ], - ], - 'UpdateNfsShare' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{nfs_share.name=projects/*/locations/*/nfsShares/*}', - 'body' => 'nfs_share', - 'placeholders' => [ - 'nfs_share.name' => [ - 'getters' => [ - 'getNfsShare', - 'getName', - ], - ], - ], - ], - 'UpdateProvisioningConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{provisioning_config.name=projects/*/locations/*/provisioningConfigs/*}', - 'body' => 'provisioning_config', - 'placeholders' => [ - 'provisioning_config.name' => [ - 'getters' => [ - 'getProvisioningConfig', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateVolume' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{volume.name=projects/*/locations/*/volumes/*}', - 'body' => 'volume', - 'placeholders' => [ - 'volume.name' => [ - 'getters' => [ - 'getVolume', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/BareMetalSolution/v2/tests/Unit/V2/Client/BareMetalSolutionClientTest.php b/owl-bot-staging/BareMetalSolution/v2/tests/Unit/V2/Client/BareMetalSolutionClientTest.php deleted file mode 100644 index a662316a7970..000000000000 --- a/owl-bot-staging/BareMetalSolution/v2/tests/Unit/V2/Client/BareMetalSolutionClientTest.php +++ /dev/null @@ -1,4556 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BareMetalSolutionClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BareMetalSolutionClient($options); - } - - /** @test */ - public function createNfsShareTest() - { - $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/createNfsShareTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $nfsShareId = 'nfsShareId931294079'; - $id = 'id3355'; - $volume = 'volume-810883302'; - $requestedSizeGib = 525454387; - $expectedResponse = new NfsShare(); - $expectedResponse->setName($name); - $expectedResponse->setNfsShareId($nfsShareId); - $expectedResponse->setId($id); - $expectedResponse->setVolume($volume); - $expectedResponse->setRequestedSizeGib($requestedSizeGib); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNfsShareTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $nfsShare = new NfsShare(); - $request = (new CreateNfsShareRequest()) - ->setParent($formattedParent) - ->setNfsShare($nfsShare); - $response = $gapicClient->createNfsShare($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.baremetalsolution.v2.BareMetalSolution/CreateNfsShare', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNfsShare(); - $this->assertProtobufEquals($nfsShare, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNfsShareTest'); - $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 createNfsShareExceptionTest() - { - $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/createNfsShareTest'); - $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]'); - $nfsShare = new NfsShare(); - $request = (new CreateNfsShareRequest()) - ->setParent($formattedParent) - ->setNfsShare($nfsShare); - $response = $gapicClient->createNfsShare($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNfsShareTest'); - 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 createProvisioningConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $ticketId = 'ticketId-71132370'; - $handoverServiceAccount = 'handoverServiceAccount747638823'; - $email2 = 'email2-1638014897'; - $location = 'location1901043637'; - $cloudConsoleUri = 'cloudConsoleUri529066874'; - $vpcScEnabled = true; - $statusMessage = 'statusMessage-239442758'; - $customId = 'customId1611556009'; - $expectedResponse = new ProvisioningConfig(); - $expectedResponse->setName($name); - $expectedResponse->setTicketId($ticketId); - $expectedResponse->setHandoverServiceAccount($handoverServiceAccount); - $expectedResponse->setEmail($email2); - $expectedResponse->setLocation($location); - $expectedResponse->setCloudConsoleUri($cloudConsoleUri); - $expectedResponse->setVpcScEnabled($vpcScEnabled); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setCustomId($customId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $provisioningConfig = new ProvisioningConfig(); - $request = (new CreateProvisioningConfigRequest()) - ->setParent($formattedParent) - ->setProvisioningConfig($provisioningConfig); - $response = $gapicClient->createProvisioningConfig($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.baremetalsolution.v2.BareMetalSolution/CreateProvisioningConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getProvisioningConfig(); - $this->assertProtobufEquals($provisioningConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProvisioningConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $provisioningConfig = new ProvisioningConfig(); - $request = (new CreateProvisioningConfigRequest()) - ->setParent($formattedParent) - ->setProvisioningConfig($provisioningConfig); - try { - $gapicClient->createProvisioningConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSSHKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $publicKey = 'publicKey1904812937'; - $expectedResponse = new SSHKey(); - $expectedResponse->setName($name); - $expectedResponse->setPublicKey($publicKey); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sshKey = new SSHKey(); - $sshKeyId = 'sshKeyId-385603310'; - $request = (new CreateSSHKeyRequest()) - ->setParent($formattedParent) - ->setSshKey($sshKey) - ->setSshKeyId($sshKeyId); - $response = $gapicClient->createSSHKey($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.baremetalsolution.v2.BareMetalSolution/CreateSSHKey', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSshKey(); - $this->assertProtobufEquals($sshKey, $actualValue); - $actualValue = $actualRequestObject->getSshKeyId(); - $this->assertProtobufEquals($sshKeyId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSSHKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $sshKey = new SSHKey(); - $sshKeyId = 'sshKeyId-385603310'; - $request = (new CreateSSHKeyRequest()) - ->setParent($formattedParent) - ->setSshKey($sshKey) - ->setSshKeyId($sshKeyId); - try { - $gapicClient->createSSHKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createVolumeSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $id = 'id3355'; - $description = 'description-1724546052'; - $storageVolume = 'storageVolume-768806562'; - $expectedResponse = new VolumeSnapshot(); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setDescription($description); - $expectedResponse->setStorageVolume($storageVolume); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $volumeSnapshot = new VolumeSnapshot(); - $request = (new CreateVolumeSnapshotRequest()) - ->setParent($formattedParent) - ->setVolumeSnapshot($volumeSnapshot); - $response = $gapicClient->createVolumeSnapshot($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.baremetalsolution.v2.BareMetalSolution/CreateVolumeSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getVolumeSnapshot(); - $this->assertProtobufEquals($volumeSnapshot, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createVolumeSnapshotExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $volumeSnapshot = new VolumeSnapshot(); - $request = (new CreateVolumeSnapshotRequest()) - ->setParent($formattedParent) - ->setVolumeSnapshot($volumeSnapshot); - try { - $gapicClient->createVolumeSnapshot($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNfsShareTest() - { - $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/deleteNfsShareTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteNfsShareTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); - $request = (new DeleteNfsShareRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNfsShare($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.baremetalsolution.v2.BareMetalSolution/DeleteNfsShare', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNfsShareTest'); - $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 deleteNfsShareExceptionTest() - { - $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/deleteNfsShareTest'); - $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->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); - $request = (new DeleteNfsShareRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNfsShare($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNfsShareTest'); - 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 deleteSSHKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sshKeyName('[PROJECT]', '[LOCATION]', '[SSH_KEY]'); - $request = (new DeleteSSHKeyRequest()) - ->setName($formattedName); - $gapicClient->deleteSSHKey($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/DeleteSSHKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSSHKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sshKeyName('[PROJECT]', '[LOCATION]', '[SSH_KEY]'); - $request = (new DeleteSSHKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSSHKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteVolumeSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new DeleteVolumeSnapshotRequest()) - ->setName($formattedName); - $gapicClient->deleteVolumeSnapshot($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/DeleteVolumeSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteVolumeSnapshotExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new DeleteVolumeSnapshotRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteVolumeSnapshot($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function detachLunTest() - { - $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/detachLunTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $id = 'id3355'; - $machineType = 'machineType1838323762'; - $hyperthreadingEnabled = true; - $interactiveSerialConsoleEnabled = false; - $osImage = 'osImage1982209856'; - $pod = 'pod111173'; - $networkTemplate = 'networkTemplate215365483'; - $loginInfo = 'loginInfo-1747949628'; - $firmwareVersion = 'firmwareVersion-987819436'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setHyperthreadingEnabled($hyperthreadingEnabled); - $expectedResponse->setInteractiveSerialConsoleEnabled($interactiveSerialConsoleEnabled); - $expectedResponse->setOsImage($osImage); - $expectedResponse->setPod($pod); - $expectedResponse->setNetworkTemplate($networkTemplate); - $expectedResponse->setLoginInfo($loginInfo); - $expectedResponse->setFirmwareVersion($firmwareVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/detachLunTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedInstance = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $formattedLun = $gapicClient->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); - $request = (new DetachLunRequest()) - ->setInstance($formattedInstance) - ->setLun($formattedLun); - $response = $gapicClient->detachLun($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.baremetalsolution.v2.BareMetalSolution/DetachLun', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($formattedInstance, $actualValue); - $actualValue = $actualApiRequestObject->getLun(); - $this->assertProtobufEquals($formattedLun, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/detachLunTest'); - $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 detachLunExceptionTest() - { - $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/detachLunTest'); - $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 - $formattedInstance = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $formattedLun = $gapicClient->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); - $request = (new DetachLunRequest()) - ->setInstance($formattedInstance) - ->setLun($formattedLun); - $response = $gapicClient->detachLun($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/detachLunTest'); - 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 disableInteractiveSerialConsoleTest() - { - $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/disableInteractiveSerialConsoleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new DisableInteractiveSerialConsoleResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/disableInteractiveSerialConsoleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DisableInteractiveSerialConsoleRequest()) - ->setName($formattedName); - $response = $gapicClient->disableInteractiveSerialConsole($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.baremetalsolution.v2.BareMetalSolution/DisableInteractiveSerialConsole', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/disableInteractiveSerialConsoleTest'); - $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 disableInteractiveSerialConsoleExceptionTest() - { - $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/disableInteractiveSerialConsoleTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DisableInteractiveSerialConsoleRequest()) - ->setName($formattedName); - $response = $gapicClient->disableInteractiveSerialConsole($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/disableInteractiveSerialConsoleTest'); - 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 enableInteractiveSerialConsoleTest() - { - $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/enableInteractiveSerialConsoleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new EnableInteractiveSerialConsoleResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/enableInteractiveSerialConsoleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new EnableInteractiveSerialConsoleRequest()) - ->setName($formattedName); - $response = $gapicClient->enableInteractiveSerialConsole($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.baremetalsolution.v2.BareMetalSolution/EnableInteractiveSerialConsole', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/enableInteractiveSerialConsoleTest'); - $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 enableInteractiveSerialConsoleExceptionTest() - { - $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/enableInteractiveSerialConsoleTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new EnableInteractiveSerialConsoleRequest()) - ->setName($formattedName); - $response = $gapicClient->enableInteractiveSerialConsole($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/enableInteractiveSerialConsoleTest'); - 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 evictLunTest() - { - $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/evictLunTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/evictLunTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); - $request = (new EvictLunRequest()) - ->setName($formattedName); - $response = $gapicClient->evictLun($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.baremetalsolution.v2.BareMetalSolution/EvictLun', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/evictLunTest'); - $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 evictLunExceptionTest() - { - $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/evictLunTest'); - $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->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); - $request = (new EvictLunRequest()) - ->setName($formattedName); - $response = $gapicClient->evictLun($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/evictLunTest'); - 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 evictVolumeTest() - { - $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/evictVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/evictVolumeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new EvictVolumeRequest()) - ->setName($formattedName); - $response = $gapicClient->evictVolume($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.baremetalsolution.v2.BareMetalSolution/EvictVolume', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/evictVolumeTest'); - $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 evictVolumeExceptionTest() - { - $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/evictVolumeTest'); - $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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new EvictVolumeRequest()) - ->setName($formattedName); - $response = $gapicClient->evictVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/evictVolumeTest'); - 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 getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $machineType = 'machineType1838323762'; - $hyperthreadingEnabled = true; - $interactiveSerialConsoleEnabled = false; - $osImage = 'osImage1982209856'; - $pod = 'pod111173'; - $networkTemplate = 'networkTemplate215365483'; - $loginInfo = 'loginInfo-1747949628'; - $firmwareVersion = 'firmwareVersion-987819436'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setHyperthreadingEnabled($hyperthreadingEnabled); - $expectedResponse->setInteractiveSerialConsoleEnabled($interactiveSerialConsoleEnabled); - $expectedResponse->setOsImage($osImage); - $expectedResponse->setPod($pod); - $expectedResponse->setNetworkTemplate($networkTemplate); - $expectedResponse->setLoginInfo($loginInfo); - $expectedResponse->setFirmwareVersion($firmwareVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLunTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $sizeGb = 2105542105; - $storageVolume = 'storageVolume-768806562'; - $shareable = false; - $bootLun = true; - $wwid = 'wwid3662843'; - $expectedResponse = new Lun(); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setSizeGb($sizeGb); - $expectedResponse->setStorageVolume($storageVolume); - $expectedResponse->setShareable($shareable); - $expectedResponse->setBootLun($bootLun); - $expectedResponse->setWwid($wwid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); - $request = (new GetLunRequest()) - ->setName($formattedName); - $response = $gapicClient->getLun($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.baremetalsolution.v2.BareMetalSolution/GetLun', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLunExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lunName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[LUN]'); - $request = (new GetLunRequest()) - ->setName($formattedName); - try { - $gapicClient->getLun($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $ipAddress = 'ipAddress1480014044'; - $vlanId = 'vlanId536153463'; - $cidr = 'cidr3053428'; - $servicesCidr = 'servicesCidr-1169831243'; - $pod = 'pod111173'; - $jumboFramesEnabled = true; - $gatewayIp = 'gatewayIp955798786'; - $expectedResponse = new Network(); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setIpAddress($ipAddress); - $expectedResponse->setVlanId($vlanId); - $expectedResponse->setCidr($cidr); - $expectedResponse->setServicesCidr($servicesCidr); - $expectedResponse->setPod($pod); - $expectedResponse->setJumboFramesEnabled($jumboFramesEnabled); - $expectedResponse->setGatewayIp($gatewayIp); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); - $request = (new GetNetworkRequest()) - ->setName($formattedName); - $response = $gapicClient->getNetwork($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.baremetalsolution.v2.BareMetalSolution/GetNetwork', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); - $request = (new GetNetworkRequest()) - ->setName($formattedName); - try { - $gapicClient->getNetwork($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNfsShareTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $nfsShareId = 'nfsShareId931294079'; - $id = 'id3355'; - $volume = 'volume-810883302'; - $requestedSizeGib = 525454387; - $expectedResponse = new NfsShare(); - $expectedResponse->setName($name2); - $expectedResponse->setNfsShareId($nfsShareId); - $expectedResponse->setId($id); - $expectedResponse->setVolume($volume); - $expectedResponse->setRequestedSizeGib($requestedSizeGib); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); - $request = (new GetNfsShareRequest()) - ->setName($formattedName); - $response = $gapicClient->getNfsShare($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.baremetalsolution.v2.BareMetalSolution/GetNfsShare', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNfsShareExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); - $request = (new GetNfsShareRequest()) - ->setName($formattedName); - try { - $gapicClient->getNfsShare($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProvisioningConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $ticketId = 'ticketId-71132370'; - $handoverServiceAccount = 'handoverServiceAccount747638823'; - $email = 'email96619420'; - $location = 'location1901043637'; - $cloudConsoleUri = 'cloudConsoleUri529066874'; - $vpcScEnabled = true; - $statusMessage = 'statusMessage-239442758'; - $customId = 'customId1611556009'; - $expectedResponse = new ProvisioningConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setTicketId($ticketId); - $expectedResponse->setHandoverServiceAccount($handoverServiceAccount); - $expectedResponse->setEmail($email); - $expectedResponse->setLocation($location); - $expectedResponse->setCloudConsoleUri($cloudConsoleUri); - $expectedResponse->setVpcScEnabled($vpcScEnabled); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setCustomId($customId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->provisioningConfigName('[PROJECT]', '[LOCATION]', '[PROVISIONING_CONFIG]'); - $request = (new GetProvisioningConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getProvisioningConfig($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.baremetalsolution.v2.BareMetalSolution/GetProvisioningConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProvisioningConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->provisioningConfigName('[PROJECT]', '[LOCATION]', '[PROVISIONING_CONFIG]'); - $request = (new GetProvisioningConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getProvisioningConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $requestedSizeGib = 525454387; - $originallyRequestedSizeGib = 44854004; - $currentSizeGib = 72696456; - $emergencySizeGib = 1936971120; - $maxSizeGib = 1805521661; - $autoGrownSizeGib = 1245638678; - $remainingSpaceGib = 1423108606; - $snapshotEnabled = true; - $pod = 'pod111173'; - $bootVolume = false; - $notes = 'notes105008833'; - $attached = true; - $expectedResponse = new Volume(); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setRequestedSizeGib($requestedSizeGib); - $expectedResponse->setOriginallyRequestedSizeGib($originallyRequestedSizeGib); - $expectedResponse->setCurrentSizeGib($currentSizeGib); - $expectedResponse->setEmergencySizeGib($emergencySizeGib); - $expectedResponse->setMaxSizeGib($maxSizeGib); - $expectedResponse->setAutoGrownSizeGib($autoGrownSizeGib); - $expectedResponse->setRemainingSpaceGib($remainingSpaceGib); - $expectedResponse->setSnapshotEnabled($snapshotEnabled); - $expectedResponse->setPod($pod); - $expectedResponse->setBootVolume($bootVolume); - $expectedResponse->setNotes($notes); - $expectedResponse->setAttached($attached); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new GetVolumeRequest()) - ->setName($formattedName); - $response = $gapicClient->getVolume($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.baremetalsolution.v2.BareMetalSolution/GetVolume', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new GetVolumeRequest()) - ->setName($formattedName); - try { - $gapicClient->getVolume($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $description = 'description-1724546052'; - $storageVolume = 'storageVolume-768806562'; - $expectedResponse = new VolumeSnapshot(); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setDescription($description); - $expectedResponse->setStorageVolume($storageVolume); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new GetVolumeSnapshotRequest()) - ->setName($formattedName); - $response = $gapicClient->getVolumeSnapshot($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.baremetalsolution.v2.BareMetalSolution/GetVolumeSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeSnapshotExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new GetVolumeSnapshotRequest()) - ->setName($formattedName); - try { - $gapicClient->getVolumeSnapshot($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLunsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $lunsElement = new Lun(); - $luns = [ - $lunsElement, - ]; - $expectedResponse = new ListLunsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLuns($luns); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ListLunsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLuns($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLuns()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListLuns', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLunsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ListLunsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLuns($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkUsageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListNetworkUsageResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNetworkUsageRequest()) - ->setLocation($formattedLocation); - $response = $gapicClient->listNetworkUsage($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.baremetalsolution.v2.BareMetalSolution/ListNetworkUsage', $actualFuncCall); - $actualValue = $actualRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkUsageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNetworkUsageRequest()) - ->setLocation($formattedLocation); - try { - $gapicClient->listNetworkUsage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $networksElement = new Network(); - $networks = [ - $networksElement, - ]; - $expectedResponse = new ListNetworksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNetworks($networks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNetworksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNetworks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNetworks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListNetworks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListNetworksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNetworks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNfsSharesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $nfsSharesElement = new NfsShare(); - $nfsShares = [ - $nfsSharesElement, - ]; - $expectedResponse = new ListNfsSharesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNfsShares($nfsShares); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNfsSharesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNfsShares($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNfsShares()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListNfsShares', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNfsSharesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListNfsSharesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNfsShares($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOSImagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $osImagesElement = new OSImage(); - $osImages = [ - $osImagesElement, - ]; - $expectedResponse = new ListOSImagesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOsImages($osImages); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListOSImagesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listOSImages($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOsImages()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListOSImages', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOSImagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListOSImagesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listOSImages($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProvisioningQuotasTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $provisioningQuotasElement = new ProvisioningQuota(); - $provisioningQuotas = [ - $provisioningQuotasElement, - ]; - $expectedResponse = new ListProvisioningQuotasResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProvisioningQuotas($provisioningQuotas); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListProvisioningQuotasRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listProvisioningQuotas($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProvisioningQuotas()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListProvisioningQuotas', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProvisioningQuotasExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListProvisioningQuotasRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listProvisioningQuotas($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSSHKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sshKeysElement = new SSHKey(); - $sshKeys = [ - $sshKeysElement, - ]; - $expectedResponse = new ListSSHKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSshKeys($sshKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSSHKeysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSSHKeys($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSshKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListSSHKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSSHKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListSSHKeysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSSHKeys($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumeSnapshotsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $volumeSnapshotsElement = new VolumeSnapshot(); - $volumeSnapshots = [ - $volumeSnapshotsElement, - ]; - $expectedResponse = new ListVolumeSnapshotsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVolumeSnapshots($volumeSnapshots); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ListVolumeSnapshotsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVolumeSnapshots($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVolumeSnapshots()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListVolumeSnapshots', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumeSnapshotsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ListVolumeSnapshotsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVolumeSnapshots($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $volumesElement = new Volume(); - $volumes = [ - $volumesElement, - ]; - $expectedResponse = new ListVolumesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVolumes($volumes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListVolumesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVolumes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVolumes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.baremetalsolution.v2.BareMetalSolution/ListVolumes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListVolumesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVolumes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $machineType = 'machineType1838323762'; - $hyperthreadingEnabled = true; - $interactiveSerialConsoleEnabled = false; - $osImage = 'osImage1982209856'; - $pod = 'pod111173'; - $networkTemplate = 'networkTemplate215365483'; - $loginInfo = 'loginInfo-1747949628'; - $firmwareVersion = 'firmwareVersion-987819436'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setHyperthreadingEnabled($hyperthreadingEnabled); - $expectedResponse->setInteractiveSerialConsoleEnabled($interactiveSerialConsoleEnabled); - $expectedResponse->setOsImage($osImage); - $expectedResponse->setPod($pod); - $expectedResponse->setNetworkTemplate($networkTemplate); - $expectedResponse->setLoginInfo($loginInfo); - $expectedResponse->setFirmwareVersion($firmwareVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $newInstanceId = 'newInstanceId-179130138'; - $request = (new RenameInstanceRequest()) - ->setName($formattedName) - ->setNewInstanceId($newInstanceId); - $response = $gapicClient->renameInstance($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.baremetalsolution.v2.BareMetalSolution/RenameInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNewInstanceId(); - $this->assertProtobufEquals($newInstanceId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $newInstanceId = 'newInstanceId-179130138'; - $request = (new RenameInstanceRequest()) - ->setName($formattedName) - ->setNewInstanceId($newInstanceId); - try { - $gapicClient->renameInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameNetworkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $ipAddress = 'ipAddress1480014044'; - $vlanId = 'vlanId536153463'; - $cidr = 'cidr3053428'; - $servicesCidr = 'servicesCidr-1169831243'; - $pod = 'pod111173'; - $jumboFramesEnabled = true; - $gatewayIp = 'gatewayIp955798786'; - $expectedResponse = new Network(); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setIpAddress($ipAddress); - $expectedResponse->setVlanId($vlanId); - $expectedResponse->setCidr($cidr); - $expectedResponse->setServicesCidr($servicesCidr); - $expectedResponse->setPod($pod); - $expectedResponse->setJumboFramesEnabled($jumboFramesEnabled); - $expectedResponse->setGatewayIp($gatewayIp); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); - $newNetworkId = 'newNetworkId-554751797'; - $request = (new RenameNetworkRequest()) - ->setName($formattedName) - ->setNewNetworkId($newNetworkId); - $response = $gapicClient->renameNetwork($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.baremetalsolution.v2.BareMetalSolution/RenameNetwork', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNewNetworkId(); - $this->assertProtobufEquals($newNetworkId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameNetworkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->networkName('[PROJECT]', '[LOCATION]', '[NETWORK]'); - $newNetworkId = 'newNetworkId-554751797'; - $request = (new RenameNetworkRequest()) - ->setName($formattedName) - ->setNewNetworkId($newNetworkId); - try { - $gapicClient->renameNetwork($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameNfsShareTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $nfsShareId = 'nfsShareId931294079'; - $id = 'id3355'; - $volume = 'volume-810883302'; - $requestedSizeGib = 525454387; - $expectedResponse = new NfsShare(); - $expectedResponse->setName($name2); - $expectedResponse->setNfsShareId($nfsShareId); - $expectedResponse->setId($id); - $expectedResponse->setVolume($volume); - $expectedResponse->setRequestedSizeGib($requestedSizeGib); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); - $newNfsshareId = 'newNfsshareId814577687'; - $request = (new RenameNfsShareRequest()) - ->setName($formattedName) - ->setNewNfsshareId($newNfsshareId); - $response = $gapicClient->renameNfsShare($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.baremetalsolution.v2.BareMetalSolution/RenameNfsShare', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNewNfsshareId(); - $this->assertProtobufEquals($newNfsshareId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameNfsShareExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->nFSShareName('[PROJECT]', '[LOCATION]', '[NFS_SHARE]'); - $newNfsshareId = 'newNfsshareId814577687'; - $request = (new RenameNfsShareRequest()) - ->setName($formattedName) - ->setNewNfsshareId($newNfsshareId); - try { - $gapicClient->renameNfsShare($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameVolumeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $requestedSizeGib = 525454387; - $originallyRequestedSizeGib = 44854004; - $currentSizeGib = 72696456; - $emergencySizeGib = 1936971120; - $maxSizeGib = 1805521661; - $autoGrownSizeGib = 1245638678; - $remainingSpaceGib = 1423108606; - $snapshotEnabled = true; - $pod = 'pod111173'; - $bootVolume = false; - $notes = 'notes105008833'; - $attached = true; - $expectedResponse = new Volume(); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setRequestedSizeGib($requestedSizeGib); - $expectedResponse->setOriginallyRequestedSizeGib($originallyRequestedSizeGib); - $expectedResponse->setCurrentSizeGib($currentSizeGib); - $expectedResponse->setEmergencySizeGib($emergencySizeGib); - $expectedResponse->setMaxSizeGib($maxSizeGib); - $expectedResponse->setAutoGrownSizeGib($autoGrownSizeGib); - $expectedResponse->setRemainingSpaceGib($remainingSpaceGib); - $expectedResponse->setSnapshotEnabled($snapshotEnabled); - $expectedResponse->setPod($pod); - $expectedResponse->setBootVolume($bootVolume); - $expectedResponse->setNotes($notes); - $expectedResponse->setAttached($attached); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $newVolumeId = 'newVolumeId-468182911'; - $request = (new RenameVolumeRequest()) - ->setName($formattedName) - ->setNewVolumeId($newVolumeId); - $response = $gapicClient->renameVolume($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.baremetalsolution.v2.BareMetalSolution/RenameVolume', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNewVolumeId(); - $this->assertProtobufEquals($newVolumeId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameVolumeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $newVolumeId = 'newVolumeId-468182911'; - $request = (new RenameVolumeRequest()) - ->setName($formattedName) - ->setNewVolumeId($newVolumeId); - try { - $gapicClient->renameVolume($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetInstanceTest() - { - $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/resetInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ResetInstanceResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ResetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->resetInstance($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.baremetalsolution.v2.BareMetalSolution/ResetInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); - $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 resetInstanceExceptionTest() - { - $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/resetInstanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ResetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->resetInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); - 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 resizeVolumeTest() - { - $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/resizeVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $id = 'id3355'; - $requestedSizeGib = 525454387; - $originallyRequestedSizeGib = 44854004; - $currentSizeGib = 72696456; - $emergencySizeGib = 1936971120; - $maxSizeGib = 1805521661; - $autoGrownSizeGib = 1245638678; - $remainingSpaceGib = 1423108606; - $snapshotEnabled = true; - $pod = 'pod111173'; - $bootVolume = false; - $notes = 'notes105008833'; - $attached = true; - $expectedResponse = new Volume(); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setRequestedSizeGib($requestedSizeGib); - $expectedResponse->setOriginallyRequestedSizeGib($originallyRequestedSizeGib); - $expectedResponse->setCurrentSizeGib($currentSizeGib); - $expectedResponse->setEmergencySizeGib($emergencySizeGib); - $expectedResponse->setMaxSizeGib($maxSizeGib); - $expectedResponse->setAutoGrownSizeGib($autoGrownSizeGib); - $expectedResponse->setRemainingSpaceGib($remainingSpaceGib); - $expectedResponse->setSnapshotEnabled($snapshotEnabled); - $expectedResponse->setPod($pod); - $expectedResponse->setBootVolume($bootVolume); - $expectedResponse->setNotes($notes); - $expectedResponse->setAttached($attached); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resizeVolumeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedVolume = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ResizeVolumeRequest()) - ->setVolume($formattedVolume); - $response = $gapicClient->resizeVolume($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.baremetalsolution.v2.BareMetalSolution/ResizeVolume', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getVolume(); - $this->assertProtobufEquals($formattedVolume, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resizeVolumeTest'); - $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 resizeVolumeExceptionTest() - { - $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/resizeVolumeTest'); - $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 - $formattedVolume = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ResizeVolumeRequest()) - ->setVolume($formattedVolume); - $response = $gapicClient->resizeVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resizeVolumeTest'); - 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 restoreVolumeSnapshotTest() - { - $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/restoreVolumeSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $id = 'id3355'; - $description = 'description-1724546052'; - $storageVolume = 'storageVolume-768806562'; - $expectedResponse = new VolumeSnapshot(); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setDescription($description); - $expectedResponse->setStorageVolume($storageVolume); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreVolumeSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedVolumeSnapshot = $gapicClient->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new RestoreVolumeSnapshotRequest()) - ->setVolumeSnapshot($formattedVolumeSnapshot); - $response = $gapicClient->restoreVolumeSnapshot($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.baremetalsolution.v2.BareMetalSolution/RestoreVolumeSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getVolumeSnapshot(); - $this->assertProtobufEquals($formattedVolumeSnapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreVolumeSnapshotTest'); - $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 restoreVolumeSnapshotExceptionTest() - { - $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/restoreVolumeSnapshotTest'); - $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 - $formattedVolumeSnapshot = $gapicClient->volumeSnapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new RestoreVolumeSnapshotRequest()) - ->setVolumeSnapshot($formattedVolumeSnapshot); - $response = $gapicClient->restoreVolumeSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreVolumeSnapshotTest'); - 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 startInstanceTest() - { - $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/startInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new StartInstanceResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new StartInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->startInstance($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.baremetalsolution.v2.BareMetalSolution/StartInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startInstanceTest'); - $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 startInstanceExceptionTest() - { - $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/startInstanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new StartInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->startInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startInstanceTest'); - 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 stopInstanceTest() - { - $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/stopInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new StopInstanceResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new StopInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->stopInstance($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.baremetalsolution.v2.BareMetalSolution/StopInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); - $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 stopInstanceExceptionTest() - { - $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/stopInstanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new StopInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->stopInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); - 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 submitProvisioningConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SubmitProvisioningConfigResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $provisioningConfig = new ProvisioningConfig(); - $request = (new SubmitProvisioningConfigRequest()) - ->setParent($formattedParent) - ->setProvisioningConfig($provisioningConfig); - $response = $gapicClient->submitProvisioningConfig($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.baremetalsolution.v2.BareMetalSolution/SubmitProvisioningConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getProvisioningConfig(); - $this->assertProtobufEquals($provisioningConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitProvisioningConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $provisioningConfig = new ProvisioningConfig(); - $request = (new SubmitProvisioningConfigRequest()) - ->setParent($formattedParent) - ->setProvisioningConfig($provisioningConfig); - try { - $gapicClient->submitProvisioningConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateInstanceTest() - { - $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/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $id = 'id3355'; - $machineType = 'machineType1838323762'; - $hyperthreadingEnabled = true; - $interactiveSerialConsoleEnabled = false; - $osImage = 'osImage1982209856'; - $pod = 'pod111173'; - $networkTemplate = 'networkTemplate215365483'; - $loginInfo = 'loginInfo-1747949628'; - $firmwareVersion = 'firmwareVersion-987819436'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setHyperthreadingEnabled($hyperthreadingEnabled); - $expectedResponse->setInteractiveSerialConsoleEnabled($interactiveSerialConsoleEnabled); - $expectedResponse->setOsImage($osImage); - $expectedResponse->setPod($pod); - $expectedResponse->setNetworkTemplate($networkTemplate); - $expectedResponse->setLoginInfo($loginInfo); - $expectedResponse->setFirmwareVersion($firmwareVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $instance = new Instance(); - $request = (new UpdateInstanceRequest()) - ->setInstance($instance); - $response = $gapicClient->updateInstance($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.baremetalsolution.v2.BareMetalSolution/UpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - $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 updateInstanceExceptionTest() - { - $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/updateInstanceTest'); - $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 - $instance = new Instance(); - $request = (new UpdateInstanceRequest()) - ->setInstance($instance); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - 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 updateNetworkTest() - { - $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/updateNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $id = 'id3355'; - $ipAddress = 'ipAddress1480014044'; - $vlanId = 'vlanId536153463'; - $cidr = 'cidr3053428'; - $servicesCidr = 'servicesCidr-1169831243'; - $pod = 'pod111173'; - $jumboFramesEnabled = true; - $gatewayIp = 'gatewayIp955798786'; - $expectedResponse = new Network(); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setIpAddress($ipAddress); - $expectedResponse->setVlanId($vlanId); - $expectedResponse->setCidr($cidr); - $expectedResponse->setServicesCidr($servicesCidr); - $expectedResponse->setPod($pod); - $expectedResponse->setJumboFramesEnabled($jumboFramesEnabled); - $expectedResponse->setGatewayIp($gatewayIp); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $network = new Network(); - $request = (new UpdateNetworkRequest()) - ->setNetwork($network); - $response = $gapicClient->updateNetwork($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.baremetalsolution.v2.BareMetalSolution/UpdateNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getNetwork(); - $this->assertProtobufEquals($network, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkTest'); - $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 updateNetworkExceptionTest() - { - $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/updateNetworkTest'); - $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 - $network = new Network(); - $request = (new UpdateNetworkRequest()) - ->setNetwork($network); - $response = $gapicClient->updateNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkTest'); - 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 updateNfsShareTest() - { - $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/updateNfsShareTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $nfsShareId = 'nfsShareId931294079'; - $id = 'id3355'; - $volume = 'volume-810883302'; - $requestedSizeGib = 525454387; - $expectedResponse = new NfsShare(); - $expectedResponse->setName($name); - $expectedResponse->setNfsShareId($nfsShareId); - $expectedResponse->setId($id); - $expectedResponse->setVolume($volume); - $expectedResponse->setRequestedSizeGib($requestedSizeGib); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateNfsShareTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $nfsShare = new NfsShare(); - $request = (new UpdateNfsShareRequest()) - ->setNfsShare($nfsShare); - $response = $gapicClient->updateNfsShare($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.baremetalsolution.v2.BareMetalSolution/UpdateNfsShare', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getNfsShare(); - $this->assertProtobufEquals($nfsShare, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNfsShareTest'); - $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 updateNfsShareExceptionTest() - { - $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/updateNfsShareTest'); - $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 - $nfsShare = new NfsShare(); - $request = (new UpdateNfsShareRequest()) - ->setNfsShare($nfsShare); - $response = $gapicClient->updateNfsShare($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNfsShareTest'); - 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 updateProvisioningConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $ticketId = 'ticketId-71132370'; - $handoverServiceAccount = 'handoverServiceAccount747638823'; - $email2 = 'email2-1638014897'; - $location = 'location1901043637'; - $cloudConsoleUri = 'cloudConsoleUri529066874'; - $vpcScEnabled = true; - $statusMessage = 'statusMessage-239442758'; - $customId = 'customId1611556009'; - $expectedResponse = new ProvisioningConfig(); - $expectedResponse->setName($name); - $expectedResponse->setTicketId($ticketId); - $expectedResponse->setHandoverServiceAccount($handoverServiceAccount); - $expectedResponse->setEmail($email2); - $expectedResponse->setLocation($location); - $expectedResponse->setCloudConsoleUri($cloudConsoleUri); - $expectedResponse->setVpcScEnabled($vpcScEnabled); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setCustomId($customId); - $transport->addResponse($expectedResponse); - // Mock request - $provisioningConfig = new ProvisioningConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateProvisioningConfigRequest()) - ->setProvisioningConfig($provisioningConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateProvisioningConfig($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.baremetalsolution.v2.BareMetalSolution/UpdateProvisioningConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getProvisioningConfig(); - $this->assertProtobufEquals($provisioningConfig, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProvisioningConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $provisioningConfig = new ProvisioningConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateProvisioningConfigRequest()) - ->setProvisioningConfig($provisioningConfig) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateProvisioningConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateVolumeTest() - { - $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/updateVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $id = 'id3355'; - $requestedSizeGib = 525454387; - $originallyRequestedSizeGib = 44854004; - $currentSizeGib = 72696456; - $emergencySizeGib = 1936971120; - $maxSizeGib = 1805521661; - $autoGrownSizeGib = 1245638678; - $remainingSpaceGib = 1423108606; - $snapshotEnabled = true; - $pod = 'pod111173'; - $bootVolume = false; - $notes = 'notes105008833'; - $attached = true; - $expectedResponse = new Volume(); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setRequestedSizeGib($requestedSizeGib); - $expectedResponse->setOriginallyRequestedSizeGib($originallyRequestedSizeGib); - $expectedResponse->setCurrentSizeGib($currentSizeGib); - $expectedResponse->setEmergencySizeGib($emergencySizeGib); - $expectedResponse->setMaxSizeGib($maxSizeGib); - $expectedResponse->setAutoGrownSizeGib($autoGrownSizeGib); - $expectedResponse->setRemainingSpaceGib($remainingSpaceGib); - $expectedResponse->setSnapshotEnabled($snapshotEnabled); - $expectedResponse->setPod($pod); - $expectedResponse->setBootVolume($bootVolume); - $expectedResponse->setNotes($notes); - $expectedResponse->setAttached($attached); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateVolumeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $volume = new Volume(); - $request = (new UpdateVolumeRequest()) - ->setVolume($volume); - $response = $gapicClient->updateVolume($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.baremetalsolution.v2.BareMetalSolution/UpdateVolume', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getVolume(); - $this->assertProtobufEquals($volume, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); - $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 updateVolumeExceptionTest() - { - $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/updateVolumeTest'); - $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 - $volume = new Volume(); - $request = (new UpdateVolumeRequest()) - ->setVolume($volume); - $response = $gapicClient->updateVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); - 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 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 createNfsShareAsyncTest() - { - $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/createNfsShareTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $nfsShareId = 'nfsShareId931294079'; - $id = 'id3355'; - $volume = 'volume-810883302'; - $requestedSizeGib = 525454387; - $expectedResponse = new NfsShare(); - $expectedResponse->setName($name); - $expectedResponse->setNfsShareId($nfsShareId); - $expectedResponse->setId($id); - $expectedResponse->setVolume($volume); - $expectedResponse->setRequestedSizeGib($requestedSizeGib); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNfsShareTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $nfsShare = new NfsShare(); - $request = (new CreateNfsShareRequest()) - ->setParent($formattedParent) - ->setNfsShare($nfsShare); - $response = $gapicClient->createNfsShareAsync($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.baremetalsolution.v2.BareMetalSolution/CreateNfsShare', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNfsShare(); - $this->assertProtobufEquals($nfsShare, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNfsShareTest'); - $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/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php deleted file mode 100644 index 7f21496cde09..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php +++ /dev/null @@ -1,93 +0,0 @@ -internalAddGeneratedFile( - ' -† -!google/cloud/batch/v1/batch.protogoogle.cloud.batch.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.protogoogle/cloud/batch/v1/job.proto google/cloud/batch/v1/task.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"› -CreateJobRequest0 -parent ( B àAúAbatch.googleapis.com/Job -job_id ( , -job ( 2.google.cloud.batch.v1.JobBàA - -request_id ( BàA"? - GetJobRequest. -name ( B àAúA -batch.googleapis.com/Job"N -DeleteJobRequest -name (  -reason ( BàA - -request_id ( BàA"o -ListJobsRequest -parent (  -filter (  -order_by ( BàA - page_size ( - -page_token ( "j -ListJobsResponse( -jobs ( 2.google.cloud.batch.v1.Job -next_page_token (  - unreachable ( " -ListTasksRequest6 -parent ( B&àAúA -batch.googleapis.com/TaskGroup -filter (  - page_size ( - -page_token ( "m -ListTasksResponse* -tasks ( 2.google.cloud.batch.v1.Task -next_page_token (  - unreachable ( "A -GetTaskRequest/ -name ( B!àAúA -batch.googleapis.com/Task"€ -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àA2¶ - BatchService› - CreateJob\'.google.cloud.batch.v1.CreateJobRequest.google.cloud.batch.v1.Job"IÚAparent,job,job_id‚Óä“/"(/v1/{parent=projects/*/locations/*}/jobs:jobƒ -GetJob$.google.cloud.batch.v1.GetJobRequest.google.cloud.batch.v1.Job"7ÚAname‚Óä“*(/v1/{name=projects/*/locations/*/jobs/*}Ï - DeleteJob\'.google.cloud.batch.v1.DeleteJobRequest.google.longrunning.Operation"zÊA@ -google.protobuf.Empty\'google.cloud.batch.v1.OperationMetadataÚAname‚Óä“**(/v1/{name=projects/*/locations/*/jobs/*}– -ListJobs&.google.cloud.batch.v1.ListJobsRequest\'.google.cloud.batch.v1.ListJobsResponse"9ÚAparent‚Óä“*(/v1/{parent=projects/*/locations/*}/jobs› -GetTask%.google.cloud.batch.v1.GetTaskRequest.google.cloud.batch.v1.Task"LÚAname‚Óä“?=/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}® - ListTasks\'.google.cloud.batch.v1.ListTasksRequest(.google.cloud.batch.v1.ListTasksResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasksHÊAbatch.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB« -com.google.cloud.batch.v1B -BatchProtoPZ/cloud.google.com/go/batch/apiv1/batchpb;batchpb¢GCBªGoogle.Cloud.Batch.V1ÊGoogle\\Cloud\\Batch\\V1êGoogle::Cloud::Batch::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php deleted file mode 100644 index ab493fe0fa4edd57072179c4de5d4b25f24750c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6031 zcmbtYTX!1Q6%L>aY$SxnH;h|*jMG|Ki6J71li)ZGHz6Duh(OLt7i&$2;Rua2%uMDC zvQ;mw)%LMZ{SAF#8?|~6Fmv`k=j{FMZ(qK8;vTqg zPpuJ~c)CyeYVTO}4~Xh|j_(+brS?Yq`@~ZXXXu(1@v^E~X{wE8N3B-sox3PXosnmd zf;w=VfkkqL<&65dp6(k5xueb83#XUmx&Ul_NT{nDM6I<-&xo)0bzkq+xLCK$#JVLW z)_uPD2*9v(O4X-M4_6^M`{svF|Sl!nxN>J|n+WnDj z_@-m4OrU8SWa9%>=wxf(cOAUtV>LKPi(MQq-L2a`@oe4dRtPmb)Ab#%g-Z*C0rAJ? zVox?cklQkK=DxZi&R8g%JLF^4_eNxLcUAR>Kl1EH{M<~z$@p9M0y7m|v%6&yt6w4q z`jP2)g~I8rPL<3O-6hgnb4#7|OShxb!}+%y+p;o3aG?wS2hom+sPXlod$BBc--EAB z>8xVEKlaTQ;&o$eO=jEs@Y4p|c?VFHYhpo`BRR{FoITo1-;{E?Yvw#@M*;2h4D9=8 zEV<&g6y~9T=*sn_MdbV7P~-Q0aBZ<5^T$PqU@$1_u)yLd6;eYRu~Ot;#fXxG$jI!c z!jn&;u7}_-{o_;wA4ik|#Mx=If#-}|np#jJ8}YoFz3`@4=Hwb%$n=Mm60GZ%tdHVCC!>Tw|$`i>xH2R_2p>2yx39(7-aQ zTWyNj-fU=ljdrVAu5Z<=mE?PPzt!?ibFZT9G;6hbqm~RQQCMgdJKM={ z=C{ib8{-&}zsQg;LOqdxOTY-=XW0i)zJygKHli9iBDPP_iY(SMGwdW}t8A%Ky@(_} zo*_6s=qX)L5wba0@kX{5FkEVp2gJ=l&p7ykq>%n+2oiN0PmQ@*oJY9|D?{BlFl`LQ zV^`9hvIh!EADI;W&yX;5`o!WeN#wr_^iKucG!tc86B?c|1q^iD%~+cpO1^vov7Y1j zTHmCH$d-)jKALxf3d*E^3c=c#N9CnXsz95ZMWKPCzmq+3Bwwif0Ae!7P0uGqn_qFu4zb$eFDo^m{5HnNH(6& z&Nlv}y6iI{mHul8mgRR0+J!O96ZsG4)YQSqP*@frFSQp=PotbJSRF7wT|9vV6X*CB z@~mJ;%+Bl#)WTbWa5CS*0zb%ANOpc`O?wNS__SHlgd@w_#YT-g?m8%)V*A^v=i$un z)*v|@vC1|?gZ#sdAJ0FWVWDYJOt&Jr%9Pulj2Tggd^4}AAasPPrq>}u*J3#R8rCTB zj!c7Sy1@fn)+)c4p}H+r7sXqa@DXPntm|O!V3x15H ze}o0brOFyCnnM<7jEG~~?ENL;8I0Zy?IzgUL$lT`CXY!EV4Rd1bN^ zXCTz@LLFaRVf7M+4X@}~+{H=&QC;qzK7cr4gkaaLWA!n0LoD$G)|k48atE&PY+za1 zz#VCQ&paX?<=HG+3a3KKEi?dssIeEUfa2B^rO@vqrx{o}Z#o0>QzLUGho-F=xCI0M zzT*w~9or9U{D1%py+N^&CDGlllD84)1!E>OXhS8)J28^iqK()m{oe7 zi_^0zeA9kNiy58g7XxNl6uLX-r>#!y+GTuD> zJtQRw)r06{0UYodZ*?)|0aI}BOrY^LT(=#Kyb^;N&2%-r-$(08+@}ewo@KWVC{n{I z5d_uP7xU7bR5?Ct`YTwQrap{q9G(S)CQAk$Qm+^Z@KRSW(dWT=~# z42uMgcnrrSqKk=@{v3jvIF`8B&!s4q=NJIK(+d4c44cObag;G|y{6=HG(nT{(@G<7k{mzX_*=NTI-G3I#4yC_LZn kEupP^=ac*6N#jRi$~!R>W`(tBTrd#kE5+FM1Wo|{3wiKVT>t<8 diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php deleted file mode 100644 index 8bac0e2979dfcdf792061b2ffe0587f0a437420b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3962 zcmbVP&2k$>5RN2Uwp#wnKoVJ1kc|k$0kXnMRRRi0kYvTElE}i6%}=RnYqT2Mi&wkL z?yM6*`31P}1{^r%4Y+aU!UJ&OoFjLt=$YA-Wntlf57zE%e>45_b@%kg54{5q-qJRi z!+gqFU+WDue!w)(ce!i2w$=;x_L#4k?!dEb=Iffav86S)I$C|B(Yc1uzzuzqm9>4> z-M3lMwB4{@>``tW6pz-6oCb%w+zh~>0~UDHWZGt{`jm0nr<`^-C9Yc&xNcS8y1VQ5 z08E<(f!0Ahd98z<02Im{T7Or%lnLv941!QZbrw7 z?W{d*P3c%J|3k_98uvpse!8aljEBB+PwFi;I37K9&+t>lv$~HgX7{V?fF4<{UoM|m zb+XAc=r)Vu^~$Kzf$8qLb~s?Ke(1=X8zB-5gYZ9~9Se!W>A*W1D+74zffa?T((jL= z^9VV+Hu9(N?hW`k2j`NNTvBw_C7pFiXZ>hBzZ$WedREboT&d`tFPxnKN77%B%$t#n zObDb{u^%}l`hIotJC7|_0);JDu3;vIoW+487a?PMp)s&*+sY-h#9E3FfB_r0{t#Dt zxujgX1dBb_^7UAjU}j0Q zNGX<^MdVVcd*ffA${Jn#utEVAPj83bV$UsZm~Nj*du9uNCIEzx0+Ks0tIiU>{10c5 zk6=*%!@!X43D7kuG_x>8S9P59df^+G6|an3f{X1=rBgR{n(bD-)_ByYZ>(G(S(t0p zn;VVh=1KxXG+$}A8=Fo1loX$~cbZM{DTQ%QKdLmI;D;Hq2$}XytyZsZ;Oi_|0@!KR zzo^%CI{2P0{FsLM?a*;(&t~KSa>#W!wXh3FuVhO%r>Grc^jZw~^aA-1(yBs6ba>}H za9h?>M3!N$M}6PIbJLO)Q)4?ixT@q4yb23QXV0cXL-ZERYb0$o^+zQ^@<6P8$MqS~ z4#TYiBUwE!(xXSs!+qZkoxUWaT%-0gIt&aybR^B@$z8}Y=g9J1XMl9i%}M>Hg|mJl zN#2DyksEHvbMq3k8v7$od_As)$nUgGd&~}U8A+G-V$q4L7@7Y>O4l9k5A(kzATx@C zs07x4?lU9wRVB!f6`04)J)lls(J>>8M`Qe<=VHB#(tH`_RGA9U$Q0&1F1VgZ)j%4M zA#cLvp6!|z z(Shac=N7~sGH&_XkXGD4!p?YDj||L zlfMPoF?V6Eqz>6IDr1WS4f9vOVjdWvbNubl>vP&C~3rj(`JU};$_NWG3};l^dttfg#3^^hJ~@52ry}dE7qsDB6goXmK}kl zZZ(-pU?(}nyKL!=Df_5P$7Di^be~>d$Bsl+T^xH=8l1<5!uLs7o;3eHq^Z10N)j!V zZcR~m0;g9bh_qlu!7(mQA1|-i3`Kj+mhSwgjWFjGI{!8-tG!1{GQ;B*7oeW0wb{Z$ zNJlDM22!bY8e7eY7K8m^yWZLU(&$v$kFm>O`w*=}y(SC4Bw$8F^K^odbu9d{=S5~* zn_|XEe=R?IS>dp%ZdB^hfS0L2$4n{813t$Z`86|nQ2Z`>Ixb@Ak#|R2iyx1RU%Neg z$N$H2%Gktm?%@I#cMVb7J+&S!9T$E`L3WGqH&@fb|sjWLqPDK5Woz^z zN-~x|)hcCu6!$yR@(!49oRrr52e34u&^dK8e+OPa(~xs;)fWj^#kiksQ8gpz&=SK~ zEAf?@D@T$@mVGyxGLb$wXi7qPy?fE`Ps!9~t@qG zMuR6#o-dO*1u2&$rd*bwa(Q>XmzM4O_Knd%@xB`8#-=}!4VHPvN7e0B`S0Dl80 CUcli1 diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php deleted file mode 100644 index fa8ca8061c1c73d2e747bfcc335cfc3d120737af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1026 zcmaiz-Hy^g6vqXW$Pm52kkq|8;wB45OIYuUXk>A5FI-66aABH|VK~4fZKs(|N!0K% zUT%C6U&O?xa6Yfp5*D99Z4go^lwcx)MZQ|0 z1SaB?M<{)O(FD#X7w~R$cJV}8Gm%S%0jz~sN7!YN$d}y(RczDU_PSdUq^r_mm!LeDyYt6rvNd_8)2mMD}7jlvOT zO!8C-In~l2Sfkosnu)YKMOl-Mub}OE41ya?4nWBquU7|BskXjC9R1ukugn_{2z?q`t&0XE-+~cvWqw>2QOPSmcSCr&MjcyC$lo4_r*7 zW^b8y4=U~2@II+J;#$v0Mb~dU)B%)Rl(yGe;}NM#jD_CrZy#}3clTj|n3g^{zV})Ych{nzou*s^Z|^c)^o#RbSr;B&mYWW8-$L$N$o*OG z$5lKm=r8cs{QoL@&JqOH69m>21hd|vYJaDfNBiABcSv0$@UQe)r2}n8c7*%}XQevv diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php deleted file mode 100644 index f438a67a782e..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php +++ /dev/null @@ -1,400 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy - */ -class AllocationPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Location where compute resources should be allocated for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; - */ - protected $location = null; - /** - * Describe instances that can be created by this AllocationPolicy. - * Only instances[0] is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; - */ - private $instances; - /** - * Defines the service account for Batch-created VMs. If omitted, the [default - * Compute Engine service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. Must match the service account specified in any used instance - * template configured in the Batch job. - * Includes the following fields: - * * email: The service account's email address. If not set, the default - * Compute Engine service account is used. - * * scopes: Additional OAuth scopes to grant the service account, beyond the - * default cloud-platform scope. (list of strings) - * - * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; - */ - protected $service_account = null; - /** - * Labels applied to all VM instances and other resources - * created by AllocationPolicy. - * Labels could be user provided or system generated. - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 6; - */ - private $labels; - /** - * The network policy. - * If you define an instance template in the `InstancePolicyOrTemplate` field, - * Batch will use the network settings in the instance template instead of - * this field. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; - */ - protected $network = null; - /** - * The placement policy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; - */ - protected $placement = null; - /** - * Optional. Tags applied to the VM instances. - * The tags identify valid sources or targets for network firewalls. - * Each tag must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * - * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy $location - * Location where compute resources should be allocated for the Job. - * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate>|\Google\Protobuf\Internal\RepeatedField $instances - * Describe instances that can be created by this AllocationPolicy. - * Only instances[0] is supported now. - * @type \Google\Cloud\Batch\V1\ServiceAccount $service_account - * Defines the service account for Batch-created VMs. If omitted, the [default - * Compute Engine service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. Must match the service account specified in any used instance - * template configured in the Batch job. - * Includes the following fields: - * * email: The service account's email address. If not set, the default - * Compute Engine service account is used. - * * scopes: Additional OAuth scopes to grant the service account, beyond the - * default cloud-platform scope. (list of strings) - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels applied to all VM instances and other resources - * created by AllocationPolicy. - * Labels could be user provided or system generated. - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * @type \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy $network - * The network policy. - * If you define an instance template in the `InstancePolicyOrTemplate` field, - * Batch will use the network settings in the instance template instead of - * this field. - * @type \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy $placement - * The placement policy. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Optional. Tags applied to the VM instances. - * The tags identify valid sources or targets for network firewalls. - * Each tag must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Location where compute resources should be allocated for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy|null - */ - public function getLocation() - { - return $this->location; - } - - public function hasLocation() - { - return isset($this->location); - } - - public function clearLocation() - { - unset($this->location); - } - - /** - * Location where compute resources should be allocated for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy::class); - $this->location = $var; - - return $this; - } - - /** - * Describe instances that can be created by this AllocationPolicy. - * Only instances[0] is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * Describe instances that can be created by this AllocationPolicy. - * Only instances[0] is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; - * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate::class); - $this->instances = $arr; - - return $this; - } - - /** - * Defines the service account for Batch-created VMs. If omitted, the [default - * Compute Engine service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. Must match the service account specified in any used instance - * template configured in the Batch job. - * Includes the following fields: - * * email: The service account's email address. If not set, the default - * Compute Engine service account is used. - * * scopes: Additional OAuth scopes to grant the service account, beyond the - * default cloud-platform scope. (list of strings) - * - * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; - * @return \Google\Cloud\Batch\V1\ServiceAccount|null - */ - public function getServiceAccount() - { - return $this->service_account; - } - - public function hasServiceAccount() - { - return isset($this->service_account); - } - - public function clearServiceAccount() - { - unset($this->service_account); - } - - /** - * Defines the service account for Batch-created VMs. If omitted, the [default - * Compute Engine service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. Must match the service account specified in any used instance - * template configured in the Batch job. - * Includes the following fields: - * * email: The service account's email address. If not set, the default - * Compute Engine service account is used. - * * scopes: Additional OAuth scopes to grant the service account, beyond the - * default cloud-platform scope. (list of strings) - * - * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; - * @param \Google\Cloud\Batch\V1\ServiceAccount $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\ServiceAccount::class); - $this->service_account = $var; - - return $this; - } - - /** - * Labels applied to all VM instances and other resources - * created by AllocationPolicy. - * Labels could be user provided or system generated. - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels applied to all VM instances and other resources - * created by AllocationPolicy. - * Labels could be user provided or system generated. - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 6; - * @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; - } - - /** - * The network policy. - * If you define an instance template in the `InstancePolicyOrTemplate` field, - * Batch will use the network settings in the instance template instead of - * this field. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy|null - */ - public function getNetwork() - { - return $this->network; - } - - public function hasNetwork() - { - return isset($this->network); - } - - public function clearNetwork() - { - unset($this->network); - } - - /** - * The network policy. - * If you define an instance template in the `InstancePolicyOrTemplate` field, - * Batch will use the network settings in the instance template instead of - * this field. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy::class); - $this->network = $var; - - return $this; - } - - /** - * The placement policy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy|null - */ - public function getPlacement() - { - return $this->placement; - } - - public function hasPlacement() - { - return isset($this->placement); - } - - public function clearPlacement() - { - unset($this->placement); - } - - /** - * The placement policy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy $var - * @return $this - */ - public function setPlacement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy::class); - $this->placement = $var; - - return $this; - } - - /** - * Optional. Tags applied to the VM instances. - * The tags identify valid sources or targets for network firewalls. - * Each tag must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * - * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Tags applied to the VM instances. - * The tags identify valid sources or targets for network firewalls. - * Each tag must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * - * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php deleted file mode 100644 index a035df7f534c..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.Accelerator - */ -class Accelerator extends \Google\Protobuf\Internal\Message -{ - /** - * The accelerator type. For example, "nvidia-tesla-t4". - * See `gcloud compute accelerator-types list`. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * The number of accelerators of this type. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - /** - * Deprecated: please use instances[0].install_gpu_drivers instead. - * - * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; - * @deprecated - */ - protected $install_gpu_drivers = false; - /** - * Optional. The NVIDIA GPU driver version that should be installed for this - * type. - * You can define the specific driver version such as "470.103.01", - * following the driver version requirements in - * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - * Batch will install the specific accelerator driver if qualified. - * - * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $driver_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The accelerator type. For example, "nvidia-tesla-t4". - * See `gcloud compute accelerator-types list`. - * @type int|string $count - * The number of accelerators of this type. - * @type bool $install_gpu_drivers - * Deprecated: please use instances[0].install_gpu_drivers instead. - * @type string $driver_version - * Optional. The NVIDIA GPU driver version that should be installed for this - * type. - * You can define the specific driver version such as "470.103.01", - * following the driver version requirements in - * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - * Batch will install the specific accelerator driver if qualified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The accelerator type. For example, "nvidia-tesla-t4". - * See `gcloud compute accelerator-types list`. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The accelerator type. For example, "nvidia-tesla-t4". - * See `gcloud compute accelerator-types list`. - * - * 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; - } - - /** - * The number of accelerators of this type. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * The number of accelerators of this type. - * - * 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; - } - - /** - * Deprecated: please use instances[0].install_gpu_drivers instead. - * - * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getInstallGpuDrivers() - { - @trigger_error('install_gpu_drivers is deprecated.', E_USER_DEPRECATED); - return $this->install_gpu_drivers; - } - - /** - * Deprecated: please use instances[0].install_gpu_drivers instead. - * - * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setInstallGpuDrivers($var) - { - @trigger_error('install_gpu_drivers is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->install_gpu_drivers = $var; - - return $this; - } - - /** - * Optional. The NVIDIA GPU driver version that should be installed for this - * type. - * You can define the specific driver version such as "470.103.01", - * following the driver version requirements in - * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - * Batch will install the specific accelerator driver if qualified. - * - * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDriverVersion() - { - return $this->driver_version; - } - - /** - * Optional. The NVIDIA GPU driver version that should be installed for this - * type. - * You can define the specific driver version such as "470.103.01", - * following the driver version requirements in - * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - * Batch will install the specific accelerator driver if qualified. - * - * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDriverVersion($var) - { - GPBUtil::checkString($var, True); - $this->driver_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Accelerator::class, \Google\Cloud\Batch\V1\AllocationPolicy_Accelerator::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php deleted file mode 100644 index d57b97912d09..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.AttachedDisk - */ -class AttachedDisk extends \Google\Protobuf\Internal\Message -{ - /** - * Device name that the guest operating system will see. - * It is used by Runnable.volumes field to mount disks. So please specify - * the device_name if you want Batch to help mount the disk, and it should - * match the device_name field in volumes. - * - * Generated from protobuf field string device_name = 3; - */ - protected $device_name = ''; - protected $attached; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $new_disk - * @type string $existing_disk - * Name of an existing PD. - * @type string $device_name - * Device name that the guest operating system will see. - * It is used by Runnable.volumes field to mount disks. So please specify - * the device_name if you want Batch to help mount the disk, and it should - * match the device_name field in volumes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null - */ - public function getNewDisk() - { - return $this->readOneof(1); - } - - public function hasNewDisk() - { - return $this->hasOneof(1); - } - - /** - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var - * @return $this - */ - public function setNewDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Name of an existing PD. - * - * Generated from protobuf field string existing_disk = 2; - * @return string - */ - public function getExistingDisk() - { - return $this->readOneof(2); - } - - public function hasExistingDisk() - { - return $this->hasOneof(2); - } - - /** - * Name of an existing PD. - * - * Generated from protobuf field string existing_disk = 2; - * @param string $var - * @return $this - */ - public function setExistingDisk($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Device name that the guest operating system will see. - * It is used by Runnable.volumes field to mount disks. So please specify - * the device_name if you want Batch to help mount the disk, and it should - * match the device_name field in volumes. - * - * Generated from protobuf field string device_name = 3; - * @return string - */ - public function getDeviceName() - { - return $this->device_name; - } - - /** - * Device name that the guest operating system will see. - * It is used by Runnable.volumes field to mount disks. So please specify - * the device_name if you want Batch to help mount the disk, and it should - * match the device_name field in volumes. - * - * Generated from protobuf field string device_name = 3; - * @param string $var - * @return $this - */ - public function setDeviceName($var) - { - GPBUtil::checkString($var, True); - $this->device_name = $var; - - return $this; - } - - /** - * @return string - */ - public function getAttached() - { - return $this->whichOneof("attached"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AttachedDisk::class, \Google\Cloud\Batch\V1\AllocationPolicy_AttachedDisk::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php deleted file mode 100644 index 339c61b43588..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.Disk - */ -class Disk extends \Google\Protobuf\Internal\Message -{ - /** - * Disk type as shown in `gcloud compute disk-types list`. - * For example, local SSD uses type "local-ssd". - * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - * or "pd-standard". If not specified, "pd-standard" will be used as the - * default type for non-boot disks, "pd-balanced" will be used as the - * default type for boot disks. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Disk size in GB. - * **Non-Boot Disk**: - * If the `type` specifies a persistent disk, this field - * is ignored if `data_source` is set as `image` or `snapshot`. - * If the `type` specifies a local SSD, this field should be a multiple of - * 375 GB, otherwise, the final size will be the next greater multiple of - * 375 GB. - * **Boot Disk**: - * Batch will calculate the boot disk size based on source - * image and task requirements if you do not speicify the size. - * If both this field and the `boot_disk_mib` field in task spec's - * `compute_resource` are defined, Batch will only honor this field. - * Also, this field should be no smaller than the source disk's - * size when the `data_source` is set as `snapshot` or `image`. - * For example, if you set an image as the `data_source` field and the - * image's default disk size 30 GB, you can only use this field to make the - * disk larger or equal to 30 GB. - * - * Generated from protobuf field int64 size_gb = 2; - */ - protected $size_gb = 0; - /** - * Local SSDs are available through both "SCSI" and "NVMe" interfaces. - * If not indicated, "NVMe" will be the default one for local ssds. - * This field is ignored for persistent disks as the interface is chosen - * automatically. See - * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - * - * Generated from protobuf field string disk_interface = 6; - */ - protected $disk_interface = ''; - protected $data_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image - * URL for a VM image to use as the data source for this disk. - * For example, the following are all valid URLs: - * * Specify the image by its family name: - * projects/{project}/global/images/family/{image_family} - * * Specify the image version: - * projects/{project}/global/images/{image_version} - * You can also use Batch customized image in short names. - * The following image values are supported for a boot disk: - * * `batch-debian`: use Batch Debian images. - * * `batch-cos`: use Batch Container-Optimized images. - * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. - * @type string $snapshot - * Name of a snapshot used as the data source. - * Snapshot is not supported as boot disk now. - * @type string $type - * Disk type as shown in `gcloud compute disk-types list`. - * For example, local SSD uses type "local-ssd". - * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - * or "pd-standard". If not specified, "pd-standard" will be used as the - * default type for non-boot disks, "pd-balanced" will be used as the - * default type for boot disks. - * @type int|string $size_gb - * Disk size in GB. - * **Non-Boot Disk**: - * If the `type` specifies a persistent disk, this field - * is ignored if `data_source` is set as `image` or `snapshot`. - * If the `type` specifies a local SSD, this field should be a multiple of - * 375 GB, otherwise, the final size will be the next greater multiple of - * 375 GB. - * **Boot Disk**: - * Batch will calculate the boot disk size based on source - * image and task requirements if you do not speicify the size. - * If both this field and the `boot_disk_mib` field in task spec's - * `compute_resource` are defined, Batch will only honor this field. - * Also, this field should be no smaller than the source disk's - * size when the `data_source` is set as `snapshot` or `image`. - * For example, if you set an image as the `data_source` field and the - * image's default disk size 30 GB, you can only use this field to make the - * disk larger or equal to 30 GB. - * @type string $disk_interface - * Local SSDs are available through both "SCSI" and "NVMe" interfaces. - * If not indicated, "NVMe" will be the default one for local ssds. - * This field is ignored for persistent disks as the interface is chosen - * automatically. See - * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * URL for a VM image to use as the data source for this disk. - * For example, the following are all valid URLs: - * * Specify the image by its family name: - * projects/{project}/global/images/family/{image_family} - * * Specify the image version: - * projects/{project}/global/images/{image_version} - * You can also use Batch customized image in short names. - * The following image values are supported for a boot disk: - * * `batch-debian`: use Batch Debian images. - * * `batch-cos`: use Batch Container-Optimized images. - * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. - * - * Generated from protobuf field string image = 4; - * @return string - */ - public function getImage() - { - return $this->readOneof(4); - } - - public function hasImage() - { - return $this->hasOneof(4); - } - - /** - * URL for a VM image to use as the data source for this disk. - * For example, the following are all valid URLs: - * * Specify the image by its family name: - * projects/{project}/global/images/family/{image_family} - * * Specify the image version: - * projects/{project}/global/images/{image_version} - * You can also use Batch customized image in short names. - * The following image values are supported for a boot disk: - * * `batch-debian`: use Batch Debian images. - * * `batch-cos`: use Batch Container-Optimized images. - * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. - * - * Generated from protobuf field string image = 4; - * @param string $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Name of a snapshot used as the data source. - * Snapshot is not supported as boot disk now. - * - * Generated from protobuf field string snapshot = 5; - * @return string - */ - public function getSnapshot() - { - return $this->readOneof(5); - } - - public function hasSnapshot() - { - return $this->hasOneof(5); - } - - /** - * Name of a snapshot used as the data source. - * Snapshot is not supported as boot disk now. - * - * Generated from protobuf field string snapshot = 5; - * @param string $var - * @return $this - */ - public function setSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Disk type as shown in `gcloud compute disk-types list`. - * For example, local SSD uses type "local-ssd". - * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - * or "pd-standard". If not specified, "pd-standard" will be used as the - * default type for non-boot disks, "pd-balanced" will be used as the - * default type for boot disks. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Disk type as shown in `gcloud compute disk-types list`. - * For example, local SSD uses type "local-ssd". - * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - * or "pd-standard". If not specified, "pd-standard" will be used as the - * default type for non-boot disks, "pd-balanced" will be used as the - * default type for boot disks. - * - * 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; - } - - /** - * Disk size in GB. - * **Non-Boot Disk**: - * If the `type` specifies a persistent disk, this field - * is ignored if `data_source` is set as `image` or `snapshot`. - * If the `type` specifies a local SSD, this field should be a multiple of - * 375 GB, otherwise, the final size will be the next greater multiple of - * 375 GB. - * **Boot Disk**: - * Batch will calculate the boot disk size based on source - * image and task requirements if you do not speicify the size. - * If both this field and the `boot_disk_mib` field in task spec's - * `compute_resource` are defined, Batch will only honor this field. - * Also, this field should be no smaller than the source disk's - * size when the `data_source` is set as `snapshot` or `image`. - * For example, if you set an image as the `data_source` field and the - * image's default disk size 30 GB, you can only use this field to make the - * disk larger or equal to 30 GB. - * - * Generated from protobuf field int64 size_gb = 2; - * @return int|string - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * Disk size in GB. - * **Non-Boot Disk**: - * If the `type` specifies a persistent disk, this field - * is ignored if `data_source` is set as `image` or `snapshot`. - * If the `type` specifies a local SSD, this field should be a multiple of - * 375 GB, otherwise, the final size will be the next greater multiple of - * 375 GB. - * **Boot Disk**: - * Batch will calculate the boot disk size based on source - * image and task requirements if you do not speicify the size. - * If both this field and the `boot_disk_mib` field in task spec's - * `compute_resource` are defined, Batch will only honor this field. - * Also, this field should be no smaller than the source disk's - * size when the `data_source` is set as `snapshot` or `image`. - * For example, if you set an image as the `data_source` field and the - * image's default disk size 30 GB, you can only use this field to make the - * disk larger or equal to 30 GB. - * - * Generated from protobuf field int64 size_gb = 2; - * @param int|string $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->size_gb = $var; - - return $this; - } - - /** - * Local SSDs are available through both "SCSI" and "NVMe" interfaces. - * If not indicated, "NVMe" will be the default one for local ssds. - * This field is ignored for persistent disks as the interface is chosen - * automatically. See - * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - * - * Generated from protobuf field string disk_interface = 6; - * @return string - */ - public function getDiskInterface() - { - return $this->disk_interface; - } - - /** - * Local SSDs are available through both "SCSI" and "NVMe" interfaces. - * If not indicated, "NVMe" will be the default one for local ssds. - * This field is ignored for persistent disks as the interface is chosen - * automatically. See - * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - * - * Generated from protobuf field string disk_interface = 6; - * @param string $var - * @return $this - */ - public function setDiskInterface($var) - { - GPBUtil::checkString($var, True); - $this->disk_interface = $var; - - return $this; - } - - /** - * @return string - */ - public function getDataSource() - { - return $this->whichOneof("data_source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Disk::class, \Google\Cloud\Batch\V1\AllocationPolicy_Disk::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php deleted file mode 100644 index 23e02e3a0f2f..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.InstancePolicy - */ -class InstancePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 2; - */ - protected $machine_type = ''; - /** - * The minimum CPU platform. - * See - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * - * Generated from protobuf field string min_cpu_platform = 3; - */ - protected $min_cpu_platform = ''; - /** - * The provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; - */ - protected $provisioning_model = 0; - /** - * The accelerators attached to each VM instance. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; - */ - private $accelerators; - /** - * Boot disk to be created and attached to each VM by this InstancePolicy. - * Boot disk will be deleted when the VM is deleted. - * Batch API now only supports booting from image. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; - */ - protected $boot_disk = null; - /** - * Non-boot disks to be attached for each VM created by this InstancePolicy. - * New disks will be deleted when the VM is deleted. - * A non-boot disk is a disk that can be of a device with a - * file system or a raw storage drive that is not ready for data - * storage and accessing. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; - */ - private $disks; - /** - * Optional. If specified, VMs will consume only the specified reservation. - * If not specified (default), VMs will consume any applicable reservation. - * - * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reservation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * The Compute Engine machine type. - * @type string $min_cpu_platform - * The minimum CPU platform. - * See - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * @type int $provisioning_model - * The provisioning model. - * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>|\Google\Protobuf\Internal\RepeatedField $accelerators - * The accelerators attached to each VM instance. - * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $boot_disk - * Boot disk to be created and attached to each VM by this InstancePolicy. - * Boot disk will be deleted when the VM is deleted. - * Batch API now only supports booting from image. - * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $disks - * Non-boot disks to be attached for each VM created by this InstancePolicy. - * New disks will be deleted when the VM is deleted. - * A non-boot disk is a disk that can be of a device with a - * file system or a raw storage drive that is not ready for data - * storage and accessing. - * @type string $reservation - * Optional. If specified, VMs will consume only the specified reservation. - * If not specified (default), VMs will consume any applicable reservation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 2; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 2; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * The minimum CPU platform. - * See - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * - * Generated from protobuf field string min_cpu_platform = 3; - * @return string - */ - public function getMinCpuPlatform() - { - return $this->min_cpu_platform; - } - - /** - * The minimum CPU platform. - * See - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * - * Generated from protobuf field string min_cpu_platform = 3; - * @param string $var - * @return $this - */ - public function setMinCpuPlatform($var) - { - GPBUtil::checkString($var, True); - $this->min_cpu_platform = $var; - - return $this; - } - - /** - * The provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; - * @return int - */ - public function getProvisioningModel() - { - return $this->provisioning_model; - } - - /** - * The provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; - * @param int $var - * @return $this - */ - public function setProvisioningModel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\AllocationPolicy\ProvisioningModel::class); - $this->provisioning_model = $var; - - return $this; - } - - /** - * The accelerators attached to each VM instance. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAccelerators() - { - return $this->accelerators; - } - - /** - * The accelerators attached to each VM instance. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; - * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAccelerators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\Accelerator::class); - $this->accelerators = $arr; - - return $this; - } - - /** - * Boot disk to be created and attached to each VM by this InstancePolicy. - * Boot disk will be deleted when the VM is deleted. - * Batch API now only supports booting from image. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null - */ - public function getBootDisk() - { - return $this->boot_disk; - } - - public function hasBootDisk() - { - return isset($this->boot_disk); - } - - public function clearBootDisk() - { - unset($this->boot_disk); - } - - /** - * Boot disk to be created and attached to each VM by this InstancePolicy. - * Boot disk will be deleted when the VM is deleted. - * Batch API now only supports booting from image. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var - * @return $this - */ - public function setBootDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); - $this->boot_disk = $var; - - return $this; - } - - /** - * Non-boot disks to be attached for each VM created by this InstancePolicy. - * New disks will be deleted when the VM is deleted. - * A non-boot disk is a disk that can be of a device with a - * file system or a raw storage drive that is not ready for data - * storage and accessing. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDisks() - { - return $this->disks; - } - - /** - * Non-boot disks to be attached for each VM created by this InstancePolicy. - * New disks will be deleted when the VM is deleted. - * A non-boot disk is a disk that can be of a device with a - * file system or a raw storage drive that is not ready for data - * storage and accessing. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; - * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDisks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk::class); - $this->disks = $arr; - - return $this; - } - - /** - * Optional. If specified, VMs will consume only the specified reservation. - * If not specified (default), VMs will consume any applicable reservation. - * - * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getReservation() - { - return $this->reservation; - } - - /** - * Optional. If specified, VMs will consume only the specified reservation. - * If not specified (default), VMs will consume any applicable reservation. - * - * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setReservation($var) - { - GPBUtil::checkString($var, True); - $this->reservation = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstancePolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_InstancePolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php deleted file mode 100644 index 65118bef501c..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php +++ /dev/null @@ -1,316 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate - */ -class InstancePolicyOrTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Set this field true if you want Batch to help fetch drivers from a third - * party location and install them for GPUs specified in - * `policy.accelerators` or `instance_template` on your behalf. Default is - * false. - * For Container-Optimized Image cases, Batch will install the - * accelerator driver following milestones of - * https://cloud.google.com/container-optimized-os/docs/release-notes. For - * non Container-Optimized Image cases, following - * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - * - * Generated from protobuf field bool install_gpu_drivers = 3; - */ - protected $install_gpu_drivers = false; - /** - * Optional. Set this field true if you want Batch to install Ops Agent on - * your behalf. Default is false. - * - * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $install_ops_agent = false; - /** - * Optional. Set this field to `true` if you want Batch to block - * project-level SSH keys from accessing this job's VMs. Alternatively, you - * can configure the job to specify a VM instance template that blocks - * project-level SSH keys. In either case, Batch blocks project-level SSH - * keys while creating the VMs for this job. - * Batch allows project-level SSH keys for a job's VMs only if all - * the following are true: - * + This field is undefined or set to `false`. - * + The job's VM instance template (if any) doesn't block project-level - * SSH keys. - * Notably, you can override this behavior by manually updating a VM to - * block or allow project-level SSH keys. For more information about - * blocking project-level SSH keys, see the Compute Engine documentation: - * https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys - * - * Generated from protobuf field bool block_project_ssh_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $block_project_ssh_keys = false; - protected $policy_template; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy $policy - * InstancePolicy. - * @type string $instance_template - * Name of an instance template used to create VMs. - * Named the field as 'instance_template' instead of 'template' to avoid - * C++ keyword conflict. - * Batch only supports global instance templates. - * You can specify the global instance template as a full or partial URL. - * @type bool $install_gpu_drivers - * Set this field true if you want Batch to help fetch drivers from a third - * party location and install them for GPUs specified in - * `policy.accelerators` or `instance_template` on your behalf. Default is - * false. - * For Container-Optimized Image cases, Batch will install the - * accelerator driver following milestones of - * https://cloud.google.com/container-optimized-os/docs/release-notes. For - * non Container-Optimized Image cases, following - * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - * @type bool $install_ops_agent - * Optional. Set this field true if you want Batch to install Ops Agent on - * your behalf. Default is false. - * @type bool $block_project_ssh_keys - * Optional. Set this field to `true` if you want Batch to block - * project-level SSH keys from accessing this job's VMs. Alternatively, you - * can configure the job to specify a VM instance template that blocks - * project-level SSH keys. In either case, Batch blocks project-level SSH - * keys while creating the VMs for this job. - * Batch allows project-level SSH keys for a job's VMs only if all - * the following are true: - * + This field is undefined or set to `false`. - * + The job's VM instance template (if any) doesn't block project-level - * SSH keys. - * Notably, you can override this behavior by manually updating a VM to - * block or allow project-level SSH keys. For more information about - * blocking project-level SSH keys, see the Compute Engine documentation: - * https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * InstancePolicy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy|null - */ - public function getPolicy() - { - return $this->readOneof(1); - } - - public function hasPolicy() - { - return $this->hasOneof(1); - } - - /** - * InstancePolicy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Name of an instance template used to create VMs. - * Named the field as 'instance_template' instead of 'template' to avoid - * C++ keyword conflict. - * Batch only supports global instance templates. - * You can specify the global instance template as a full or partial URL. - * - * Generated from protobuf field string instance_template = 2; - * @return string - */ - public function getInstanceTemplate() - { - return $this->readOneof(2); - } - - public function hasInstanceTemplate() - { - return $this->hasOneof(2); - } - - /** - * Name of an instance template used to create VMs. - * Named the field as 'instance_template' instead of 'template' to avoid - * C++ keyword conflict. - * Batch only supports global instance templates. - * You can specify the global instance template as a full or partial URL. - * - * Generated from protobuf field string instance_template = 2; - * @param string $var - * @return $this - */ - public function setInstanceTemplate($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Set this field true if you want Batch to help fetch drivers from a third - * party location and install them for GPUs specified in - * `policy.accelerators` or `instance_template` on your behalf. Default is - * false. - * For Container-Optimized Image cases, Batch will install the - * accelerator driver following milestones of - * https://cloud.google.com/container-optimized-os/docs/release-notes. For - * non Container-Optimized Image cases, following - * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - * - * Generated from protobuf field bool install_gpu_drivers = 3; - * @return bool - */ - public function getInstallGpuDrivers() - { - return $this->install_gpu_drivers; - } - - /** - * Set this field true if you want Batch to help fetch drivers from a third - * party location and install them for GPUs specified in - * `policy.accelerators` or `instance_template` on your behalf. Default is - * false. - * For Container-Optimized Image cases, Batch will install the - * accelerator driver following milestones of - * https://cloud.google.com/container-optimized-os/docs/release-notes. For - * non Container-Optimized Image cases, following - * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - * - * Generated from protobuf field bool install_gpu_drivers = 3; - * @param bool $var - * @return $this - */ - public function setInstallGpuDrivers($var) - { - GPBUtil::checkBool($var); - $this->install_gpu_drivers = $var; - - return $this; - } - - /** - * Optional. Set this field true if you want Batch to install Ops Agent on - * your behalf. Default is false. - * - * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getInstallOpsAgent() - { - return $this->install_ops_agent; - } - - /** - * Optional. Set this field true if you want Batch to install Ops Agent on - * your behalf. Default is false. - * - * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setInstallOpsAgent($var) - { - GPBUtil::checkBool($var); - $this->install_ops_agent = $var; - - return $this; - } - - /** - * Optional. Set this field to `true` if you want Batch to block - * project-level SSH keys from accessing this job's VMs. Alternatively, you - * can configure the job to specify a VM instance template that blocks - * project-level SSH keys. In either case, Batch blocks project-level SSH - * keys while creating the VMs for this job. - * Batch allows project-level SSH keys for a job's VMs only if all - * the following are true: - * + This field is undefined or set to `false`. - * + The job's VM instance template (if any) doesn't block project-level - * SSH keys. - * Notably, you can override this behavior by manually updating a VM to - * block or allow project-level SSH keys. For more information about - * blocking project-level SSH keys, see the Compute Engine documentation: - * https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys - * - * Generated from protobuf field bool block_project_ssh_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getBlockProjectSshKeys() - { - return $this->block_project_ssh_keys; - } - - /** - * Optional. Set this field to `true` if you want Batch to block - * project-level SSH keys from accessing this job's VMs. Alternatively, you - * can configure the job to specify a VM instance template that blocks - * project-level SSH keys. In either case, Batch blocks project-level SSH - * keys while creating the VMs for this job. - * Batch allows project-level SSH keys for a job's VMs only if all - * the following are true: - * + This field is undefined or set to `false`. - * + The job's VM instance template (if any) doesn't block project-level - * SSH keys. - * Notably, you can override this behavior by manually updating a VM to - * block or allow project-level SSH keys. For more information about - * blocking project-level SSH keys, see the Compute Engine documentation: - * https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys - * - * Generated from protobuf field bool block_project_ssh_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setBlockProjectSshKeys($var) - { - GPBUtil::checkBool($var); - $this->block_project_ssh_keys = $var; - - return $this; - } - - /** - * @return string - */ - public function getPolicyTemplate() - { - return $this->whichOneof("policy_template"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstancePolicyOrTemplate::class, \Google\Cloud\Batch\V1\AllocationPolicy_InstancePolicyOrTemplate::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php deleted file mode 100644 index cb5fbeb79a66..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.LocationPolicy - */ -class LocationPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. - * - * Generated from protobuf field repeated string allowed_locations = 1; - */ - private $allowed_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_locations - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. - * - * Generated from protobuf field repeated string allowed_locations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedLocations() - { - return $this->allowed_locations; - } - - /** - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. - * - * Generated from protobuf field repeated string allowed_locations = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_locations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LocationPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_LocationPolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php deleted file mode 100644 index 1c4b064ed7e0..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.NetworkInterface - */ -class NetworkInterface extends \Google\Protobuf\Internal\Message -{ - /** - * The URL of an existing network resource. - * You can specify the network as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - * * projects/{project}/global/networks/{network} - * * global/networks/{network} - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * The URL of an existing subnetwork resource in the network. - * You can specify the subnetwork as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * regions/{region}/subnetworks/{subnetwork} - * - * Generated from protobuf field string subnetwork = 2; - */ - protected $subnetwork = ''; - /** - * Default is false (with an external IP address). Required if - * no external public IP address is attached to the VM. If no external - * public IP address, additional configuration is required to allow the VM - * to access Google Services. See - * https://cloud.google.com/vpc/docs/configure-private-google-access and - * https://cloud.google.com/nat/docs/gce-example#create-nat for more - * information. - * - * Generated from protobuf field bool no_external_ip_address = 3; - */ - protected $no_external_ip_address = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The URL of an existing network resource. - * You can specify the network as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - * * projects/{project}/global/networks/{network} - * * global/networks/{network} - * @type string $subnetwork - * The URL of an existing subnetwork resource in the network. - * You can specify the subnetwork as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * regions/{region}/subnetworks/{subnetwork} - * @type bool $no_external_ip_address - * Default is false (with an external IP address). Required if - * no external public IP address is attached to the VM. If no external - * public IP address, additional configuration is required to allow the VM - * to access Google Services. See - * https://cloud.google.com/vpc/docs/configure-private-google-access and - * https://cloud.google.com/nat/docs/gce-example#create-nat for more - * information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The URL of an existing network resource. - * You can specify the network as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - * * projects/{project}/global/networks/{network} - * * global/networks/{network} - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The URL of an existing network resource. - * You can specify the network as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - * * projects/{project}/global/networks/{network} - * * global/networks/{network} - * - * Generated from protobuf field string network = 1; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The URL of an existing subnetwork resource in the network. - * You can specify the subnetwork as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * regions/{region}/subnetworks/{subnetwork} - * - * Generated from protobuf field string subnetwork = 2; - * @return string - */ - public function getSubnetwork() - { - return $this->subnetwork; - } - - /** - * The URL of an existing subnetwork resource in the network. - * You can specify the subnetwork as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * regions/{region}/subnetworks/{subnetwork} - * - * Generated from protobuf field string subnetwork = 2; - * @param string $var - * @return $this - */ - public function setSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork = $var; - - return $this; - } - - /** - * Default is false (with an external IP address). Required if - * no external public IP address is attached to the VM. If no external - * public IP address, additional configuration is required to allow the VM - * to access Google Services. See - * https://cloud.google.com/vpc/docs/configure-private-google-access and - * https://cloud.google.com/nat/docs/gce-example#create-nat for more - * information. - * - * Generated from protobuf field bool no_external_ip_address = 3; - * @return bool - */ - public function getNoExternalIpAddress() - { - return $this->no_external_ip_address; - } - - /** - * Default is false (with an external IP address). Required if - * no external public IP address is attached to the VM. If no external - * public IP address, additional configuration is required to allow the VM - * to access Google Services. See - * https://cloud.google.com/vpc/docs/configure-private-google-access and - * https://cloud.google.com/nat/docs/gce-example#create-nat for more - * information. - * - * Generated from protobuf field bool no_external_ip_address = 3; - * @param bool $var - * @return $this - */ - public function setNoExternalIpAddress($var) - { - GPBUtil::checkBool($var); - $this->no_external_ip_address = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkInterface::class, \Google\Cloud\Batch\V1\AllocationPolicy_NetworkInterface::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php deleted file mode 100644 index f402f3e8e3d2..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.NetworkPolicy - */ -class NetworkPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Network configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; - */ - private $network_interfaces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces - * Network configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Network configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkInterfaces() - { - return $this->network_interfaces; - } - - /** - * Network configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; - * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface::class); - $this->network_interfaces = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_NetworkPolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php deleted file mode 100644 index 2b9777719d46..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.PlacementPolicy - */ -class PlacementPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - * want VMs to be located close to each other for low network latency - * between the VMs. No placement policy will be generated when collocation - * is UNSPECIFIED. - * - * Generated from protobuf field string collocation = 1; - */ - protected $collocation = ''; - /** - * When specified, causes the job to fail if more than max_distance logical - * switches are required between VMs. Batch uses the most compact possible - * placement of VMs even when max_distance is not specified. An explicit - * max_distance makes that level of compactness a strict requirement. - * Not yet implemented - * - * Generated from protobuf field int64 max_distance = 2; - */ - protected $max_distance = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $collocation - * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - * want VMs to be located close to each other for low network latency - * between the VMs. No placement policy will be generated when collocation - * is UNSPECIFIED. - * @type int|string $max_distance - * When specified, causes the job to fail if more than max_distance logical - * switches are required between VMs. Batch uses the most compact possible - * placement of VMs even when max_distance is not specified. An explicit - * max_distance makes that level of compactness a strict requirement. - * Not yet implemented - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - * want VMs to be located close to each other for low network latency - * between the VMs. No placement policy will be generated when collocation - * is UNSPECIFIED. - * - * Generated from protobuf field string collocation = 1; - * @return string - */ - public function getCollocation() - { - return $this->collocation; - } - - /** - * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - * want VMs to be located close to each other for low network latency - * between the VMs. No placement policy will be generated when collocation - * is UNSPECIFIED. - * - * Generated from protobuf field string collocation = 1; - * @param string $var - * @return $this - */ - public function setCollocation($var) - { - GPBUtil::checkString($var, True); - $this->collocation = $var; - - return $this; - } - - /** - * When specified, causes the job to fail if more than max_distance logical - * switches are required between VMs. Batch uses the most compact possible - * placement of VMs even when max_distance is not specified. An explicit - * max_distance makes that level of compactness a strict requirement. - * Not yet implemented - * - * Generated from protobuf field int64 max_distance = 2; - * @return int|string - */ - public function getMaxDistance() - { - return $this->max_distance; - } - - /** - * When specified, causes the job to fail if more than max_distance logical - * switches are required between VMs. Batch uses the most compact possible - * placement of VMs even when max_distance is not specified. An explicit - * max_distance makes that level of compactness a strict requirement. - * Not yet implemented - * - * Generated from protobuf field int64 max_distance = 2; - * @param int|string $var - * @return $this - */ - public function setMaxDistance($var) - { - GPBUtil::checkInt64($var); - $this->max_distance = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PlacementPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_PlacementPolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php deleted file mode 100644 index 62a6191c61cb..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.ProvisioningModel - */ -class ProvisioningModel -{ - /** - * Unspecified. - * - * Generated from protobuf enum PROVISIONING_MODEL_UNSPECIFIED = 0; - */ - const PROVISIONING_MODEL_UNSPECIFIED = 0; - /** - * Standard VM. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * SPOT VM. - * - * Generated from protobuf enum SPOT = 2; - */ - const SPOT = 2; - /** - * Preemptible VM (PVM). - * Above SPOT VM is the preferable model for preemptible VM instances: the - * old preemptible VM model (indicated by this field) is the older model, - * and has been migrated to use the SPOT model as the underlying technology. - * This old model will still be supported. - * - * Generated from protobuf enum PREEMPTIBLE = 3; - */ - const PREEMPTIBLE = 3; - - private static $valueToName = [ - self::PROVISIONING_MODEL_UNSPECIFIED => 'PROVISIONING_MODEL_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::SPOT => 'SPOT', - self::PREEMPTIBLE => 'PREEMPTIBLE', - ]; - - 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(ProvisioningModel::class, \Google\Cloud\Batch\V1\AllocationPolicy_ProvisioningModel::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php deleted file mode 100644 index 71cfcd4d50f6..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php +++ /dev/null @@ -1,248 +0,0 @@ -google.cloud.batch.v1.ComputeResource - */ -class ComputeResource extends \Google\Protobuf\Internal\Message -{ - /** - * The milliCPU count. - * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - * For example, `1000` corresponds to 1 vCPU per task. If undefined, the - * default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the CPU resources for both fields are compatible with each - * other and with how many tasks you want to allow to run on the same VM at - * the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 2 - * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - * you are recommended to run two tasks on the same VM if you set `cpuMilli` - * to `1000` or less. - * - * Generated from protobuf field int64 cpu_milli = 1; - */ - protected $cpu_milli = 0; - /** - * Memory in MiB. - * `memoryMib` defines the amount of memory per task in MiB units. - * If undefined, the default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the memory resources for both fields are compatible with - * each other and with how many tasks you want to allow to run on the same VM - * at the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 8 - * GiB each, you are recommended to set `memoryMib` to no more than `8192`, - * or you are recommended to run two tasks on the same VM if you set - * `memoryMib` to `4096` or less. - * - * Generated from protobuf field int64 memory_mib = 2; - */ - protected $memory_mib = 0; - /** - * Extra boot disk size in MiB for each task. - * - * Generated from protobuf field int64 boot_disk_mib = 4; - */ - protected $boot_disk_mib = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $cpu_milli - * The milliCPU count. - * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - * For example, `1000` corresponds to 1 vCPU per task. If undefined, the - * default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the CPU resources for both fields are compatible with each - * other and with how many tasks you want to allow to run on the same VM at - * the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 2 - * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - * you are recommended to run two tasks on the same VM if you set `cpuMilli` - * to `1000` or less. - * @type int|string $memory_mib - * Memory in MiB. - * `memoryMib` defines the amount of memory per task in MiB units. - * If undefined, the default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the memory resources for both fields are compatible with - * each other and with how many tasks you want to allow to run on the same VM - * at the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 8 - * GiB each, you are recommended to set `memoryMib` to no more than `8192`, - * or you are recommended to run two tasks on the same VM if you set - * `memoryMib` to `4096` or less. - * @type int|string $boot_disk_mib - * Extra boot disk size in MiB for each task. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * The milliCPU count. - * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - * For example, `1000` corresponds to 1 vCPU per task. If undefined, the - * default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the CPU resources for both fields are compatible with each - * other and with how many tasks you want to allow to run on the same VM at - * the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 2 - * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - * you are recommended to run two tasks on the same VM if you set `cpuMilli` - * to `1000` or less. - * - * Generated from protobuf field int64 cpu_milli = 1; - * @return int|string - */ - public function getCpuMilli() - { - return $this->cpu_milli; - } - - /** - * The milliCPU count. - * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - * For example, `1000` corresponds to 1 vCPU per task. If undefined, the - * default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the CPU resources for both fields are compatible with each - * other and with how many tasks you want to allow to run on the same VM at - * the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 2 - * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - * you are recommended to run two tasks on the same VM if you set `cpuMilli` - * to `1000` or less. - * - * Generated from protobuf field int64 cpu_milli = 1; - * @param int|string $var - * @return $this - */ - public function setCpuMilli($var) - { - GPBUtil::checkInt64($var); - $this->cpu_milli = $var; - - return $this; - } - - /** - * Memory in MiB. - * `memoryMib` defines the amount of memory per task in MiB units. - * If undefined, the default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the memory resources for both fields are compatible with - * each other and with how many tasks you want to allow to run on the same VM - * at the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 8 - * GiB each, you are recommended to set `memoryMib` to no more than `8192`, - * or you are recommended to run two tasks on the same VM if you set - * `memoryMib` to `4096` or less. - * - * Generated from protobuf field int64 memory_mib = 2; - * @return int|string - */ - public function getMemoryMib() - { - return $this->memory_mib; - } - - /** - * Memory in MiB. - * `memoryMib` defines the amount of memory per task in MiB units. - * If undefined, the default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the memory resources for both fields are compatible with - * each other and with how many tasks you want to allow to run on the same VM - * at the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 8 - * GiB each, you are recommended to set `memoryMib` to no more than `8192`, - * or you are recommended to run two tasks on the same VM if you set - * `memoryMib` to `4096` or less. - * - * Generated from protobuf field int64 memory_mib = 2; - * @param int|string $var - * @return $this - */ - public function setMemoryMib($var) - { - GPBUtil::checkInt64($var); - $this->memory_mib = $var; - - return $this; - } - - /** - * Extra boot disk size in MiB for each task. - * - * Generated from protobuf field int64 boot_disk_mib = 4; - * @return int|string - */ - public function getBootDiskMib() - { - return $this->boot_disk_mib; - } - - /** - * Extra boot disk size in MiB for each task. - * - * Generated from protobuf field int64 boot_disk_mib = 4; - * @param int|string $var - * @return $this - */ - public function setBootDiskMib($var) - { - GPBUtil::checkInt64($var); - $this->boot_disk_mib = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php deleted file mode 100644 index fdec8fae5402..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php +++ /dev/null @@ -1,278 +0,0 @@ -google.cloud.batch.v1.CreateJobRequest - */ -class CreateJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * - * Generated from protobuf field string job_id = 2; - */ - protected $job_id = ''; - /** - * Required. The Job to create. - * - * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * Please see {@see BatchServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Batch\V1\Job $job Required. The Job to create. - * @param string $jobId ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * - * @return \Google\Cloud\Batch\V1\CreateJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Batch\V1\Job $job, string $jobId): self - { - return (new self()) - ->setParent($parent) - ->setJob($job) - ->setJobId($jobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * @type string $job_id - * ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * @type \Google\Cloud\Batch\V1\Job $job - * Required. The Job to create. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * - * 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; - } - - /** - * ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * - * Generated from protobuf field string job_id = 2; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * - * 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; - } - - /** - * Required. The Job to create. - * - * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Batch\V1\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Required. The Job to create. - * - * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Batch\V1\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Job::class); - $this->job = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php deleted file mode 100644 index 0acc2dfbbac6..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.batch.v1.DeleteJobRequest - */ -class DeleteJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Job name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. Reason for this deletion. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reason = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Job name. - * - * @return \Google\Cloud\Batch\V1\DeleteJobRequest - * - * @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 - * Job name. - * @type string $reason - * Optional. Reason for this deletion. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Job name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Job name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Reason for this deletion. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * Optional. Reason for this deletion. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php deleted file mode 100644 index 058a8d4ccc90..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.batch.v1.Environment - */ -class Environment extends \Google\Protobuf\Internal\Message -{ - /** - * A map of environment variable names to values. - * - * Generated from protobuf field map variables = 1; - */ - private $variables; - /** - * A map of environment variable names to Secret Manager secret names. - * The VM will access the named secrets to set the value of each environment - * variable. - * - * Generated from protobuf field map secret_variables = 2; - */ - private $secret_variables; - /** - * An encrypted JSON dictionary where the key/value pairs correspond to - * environment variable names and their values. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; - */ - protected $encrypted_variables = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $variables - * A map of environment variable names to values. - * @type array|\Google\Protobuf\Internal\MapField $secret_variables - * A map of environment variable names to Secret Manager secret names. - * The VM will access the named secrets to set the value of each environment - * variable. - * @type \Google\Cloud\Batch\V1\Environment\KMSEnvMap $encrypted_variables - * An encrypted JSON dictionary where the key/value pairs correspond to - * environment variable names and their values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * A map of environment variable names to values. - * - * Generated from protobuf field map variables = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getVariables() - { - return $this->variables; - } - - /** - * A map of environment variable names to values. - * - * Generated from protobuf field map variables = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->variables = $arr; - - return $this; - } - - /** - * A map of environment variable names to Secret Manager secret names. - * The VM will access the named secrets to set the value of each environment - * variable. - * - * Generated from protobuf field map secret_variables = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSecretVariables() - { - return $this->secret_variables; - } - - /** - * A map of environment variable names to Secret Manager secret names. - * The VM will access the named secrets to set the value of each environment - * variable. - * - * Generated from protobuf field map secret_variables = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSecretVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->secret_variables = $arr; - - return $this; - } - - /** - * An encrypted JSON dictionary where the key/value pairs correspond to - * environment variable names and their values. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; - * @return \Google\Cloud\Batch\V1\Environment\KMSEnvMap|null - */ - public function getEncryptedVariables() - { - return $this->encrypted_variables; - } - - public function hasEncryptedVariables() - { - return isset($this->encrypted_variables); - } - - public function clearEncryptedVariables() - { - unset($this->encrypted_variables); - } - - /** - * An encrypted JSON dictionary where the key/value pairs correspond to - * environment variable names and their values. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; - * @param \Google\Cloud\Batch\V1\Environment\KMSEnvMap $var - * @return $this - */ - public function setEncryptedVariables($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment\KMSEnvMap::class); - $this->encrypted_variables = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php deleted file mode 100644 index 91b995831e11..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.batch.v1.Environment.KMSEnvMap - */ -class KMSEnvMap extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the KMS key that will be used to decrypt the cipher text. - * - * Generated from protobuf field string key_name = 1; - */ - protected $key_name = ''; - /** - * The value of the cipherText response from the `encrypt` method. - * - * Generated from protobuf field string cipher_text = 2; - */ - protected $cipher_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_name - * The name of the KMS key that will be used to decrypt the cipher text. - * @type string $cipher_text - * The value of the cipherText response from the `encrypt` method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * The name of the KMS key that will be used to decrypt the cipher text. - * - * Generated from protobuf field string key_name = 1; - * @return string - */ - public function getKeyName() - { - return $this->key_name; - } - - /** - * The name of the KMS key that will be used to decrypt the cipher text. - * - * Generated from protobuf field string key_name = 1; - * @param string $var - * @return $this - */ - public function setKeyName($var) - { - GPBUtil::checkString($var, True); - $this->key_name = $var; - - return $this; - } - - /** - * The value of the cipherText response from the `encrypt` method. - * - * Generated from protobuf field string cipher_text = 2; - * @return string - */ - public function getCipherText() - { - return $this->cipher_text; - } - - /** - * The value of the cipherText response from the `encrypt` method. - * - * Generated from protobuf field string cipher_text = 2; - * @param string $var - * @return $this - */ - public function setCipherText($var) - { - GPBUtil::checkString($var, True); - $this->cipher_text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KMSEnvMap::class, \Google\Cloud\Batch\V1\Environment_KMSEnvMap::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php deleted file mode 100644 index af7bffd938ba..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.batch.v1.GCS - */ -class GCS extends \Google\Protobuf\Internal\Message -{ - /** - * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - * bucket_name, bucket_name/subdirectory/ - * - * Generated from protobuf field string remote_path = 1; - */ - protected $remote_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $remote_path - * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - * bucket_name, bucket_name/subdirectory/ - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - * bucket_name, bucket_name/subdirectory/ - * - * Generated from protobuf field string remote_path = 1; - * @return string - */ - public function getRemotePath() - { - return $this->remote_path; - } - - /** - * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - * bucket_name, bucket_name/subdirectory/ - * - * Generated from protobuf field string remote_path = 1; - * @param string $var - * @return $this - */ - public function setRemotePath($var) - { - GPBUtil::checkString($var, True); - $this->remote_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php deleted file mode 100644 index ae27090d4139..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.batch.v1.GetJobRequest - */ -class GetJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Job name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Job name. Please see - * {@see BatchServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Batch\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. Job name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Required. Job name. - * - * 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. Job name. - * - * 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php deleted file mode 100644 index 6271a4460bce..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.batch.v1.GetTaskRequest - */ -class GetTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Task name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Task name. Please see - * {@see BatchServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Batch\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. Task name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Required. Task name. - * - * 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. Task name. - * - * 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php deleted file mode 100644 index 6c7254f33660..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php +++ /dev/null @@ -1,513 +0,0 @@ -google.cloud.batch.v1.Job - */ -class Job extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Job name. - * For example: "projects/123456/locations/us-central1/jobs/job01". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. A system generated unique ID for the Job. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Priority of the Job. - * The valid value range is [0, 100). Default value is 0. - * Higher value indicates higher priority. - * A job with higher priority value is more likely to run earlier if all other - * requirements are satisfied. - * - * Generated from protobuf field int64 priority = 3; - */ - protected $priority = 0; - /** - * Required. TaskGroups in the Job. Only one TaskGroup is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $task_groups; - /** - * Compute resource allocation for all TaskGroups in the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; - */ - protected $allocation_policy = null; - /** - * Labels for the Job. Labels could be user provided or system generated. - * For example, - * "labels": { - * "department": "finance", - * "environment": "test" - * } - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 8; - */ - private $labels; - /** - * Output only. Job status. It is read only for users. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - /** - * Output only. When the Job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last time the Job was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Log preservation policy for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; - */ - protected $logs_policy = null; - /** - * Notification configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; - */ - private $notifications; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Job name. - * For example: "projects/123456/locations/us-central1/jobs/job01". - * @type string $uid - * Output only. A system generated unique ID for the Job. - * @type int|string $priority - * Priority of the Job. - * The valid value range is [0, 100). Default value is 0. - * Higher value indicates higher priority. - * A job with higher priority value is more likely to run earlier if all other - * requirements are satisfied. - * @type array<\Google\Cloud\Batch\V1\TaskGroup>|\Google\Protobuf\Internal\RepeatedField $task_groups - * Required. TaskGroups in the Job. Only one TaskGroup is supported now. - * @type \Google\Cloud\Batch\V1\AllocationPolicy $allocation_policy - * Compute resource allocation for all TaskGroups in the Job. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels for the Job. Labels could be user provided or system generated. - * For example, - * "labels": { - * "department": "finance", - * "environment": "test" - * } - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * @type \Google\Cloud\Batch\V1\JobStatus $status - * Output only. Job status. It is read only for users. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the Job was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time the Job was updated. - * @type \Google\Cloud\Batch\V1\LogsPolicy $logs_policy - * Log preservation policy for the Job. - * @type array<\Google\Cloud\Batch\V1\JobNotification>|\Google\Protobuf\Internal\RepeatedField $notifications - * Notification configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Job name. - * For example: "projects/123456/locations/us-central1/jobs/job01". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Job name. - * For example: "projects/123456/locations/us-central1/jobs/job01". - * - * 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. A system generated 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. A system generated 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; - } - - /** - * Priority of the Job. - * The valid value range is [0, 100). Default value is 0. - * Higher value indicates higher priority. - * A job with higher priority value is more likely to run earlier if all other - * requirements are satisfied. - * - * Generated from protobuf field int64 priority = 3; - * @return int|string - */ - public function getPriority() - { - return $this->priority; - } - - /** - * Priority of the Job. - * The valid value range is [0, 100). Default value is 0. - * Higher value indicates higher priority. - * A job with higher priority value is more likely to run earlier if all other - * requirements are satisfied. - * - * Generated from protobuf field int64 priority = 3; - * @param int|string $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt64($var); - $this->priority = $var; - - return $this; - } - - /** - * Required. TaskGroups in the Job. Only one TaskGroup is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaskGroups() - { - return $this->task_groups; - } - - /** - * Required. TaskGroups in the Job. Only one TaskGroup is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Batch\V1\TaskGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaskGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\TaskGroup::class); - $this->task_groups = $arr; - - return $this; - } - - /** - * Compute resource allocation for all TaskGroups in the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; - * @return \Google\Cloud\Batch\V1\AllocationPolicy|null - */ - public function getAllocationPolicy() - { - return $this->allocation_policy; - } - - public function hasAllocationPolicy() - { - return isset($this->allocation_policy); - } - - public function clearAllocationPolicy() - { - unset($this->allocation_policy); - } - - /** - * Compute resource allocation for all TaskGroups in the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; - * @param \Google\Cloud\Batch\V1\AllocationPolicy $var - * @return $this - */ - public function setAllocationPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy::class); - $this->allocation_policy = $var; - - return $this; - } - - /** - * Labels for the Job. Labels could be user provided or system generated. - * For example, - * "labels": { - * "department": "finance", - * "environment": "test" - * } - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels for the Job. Labels could be user provided or system generated. - * For example, - * "labels": { - * "department": "finance", - * "environment": "test" - * } - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 8; - * @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 status. It is read only for users. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Batch\V1\JobStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. Job status. It is read only for users. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Batch\V1\JobStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\JobStatus::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. When the Job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. When the Job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 last time the Job was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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 last time the Job was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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; - } - - /** - * Log preservation policy for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; - * @return \Google\Cloud\Batch\V1\LogsPolicy|null - */ - public function getLogsPolicy() - { - return $this->logs_policy; - } - - public function hasLogsPolicy() - { - return isset($this->logs_policy); - } - - public function clearLogsPolicy() - { - unset($this->logs_policy); - } - - /** - * Log preservation policy for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; - * @param \Google\Cloud\Batch\V1\LogsPolicy $var - * @return $this - */ - public function setLogsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LogsPolicy::class); - $this->logs_policy = $var; - - return $this; - } - - /** - * Notification configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotifications() - { - return $this->notifications; - } - - /** - * Notification configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; - * @param array<\Google\Cloud\Batch\V1\JobNotification>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobNotification::class); - $this->notifications = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php deleted file mode 100644 index a84bc5653ad3..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.batch.v1.JobNotification - */ -class JobNotification extends \Google\Protobuf\Internal\Message -{ - /** - * The Pub/Sub topic where notifications for the job, like state - * changes, will be published. If undefined, no Pub/Sub notifications - * are sent for this job. - * Specify the topic using the following format: - * `projects/{project}/topics/{topic}`. - * Notably, if you want to specify a Pub/Sub topic that is in a - * different project than the job, your administrator must grant your - * project's Batch service agent permission to publish to that topic. - * For more information about configuring Pub/Sub notifications for - * a job, see - * https://cloud.google.com/batch/docs/enable-notifications. - * - * Generated from protobuf field string pubsub_topic = 1; - */ - protected $pubsub_topic = ''; - /** - * The attribute requirements of messages to be sent to this Pub/Sub topic. - * Without this field, no message will be sent. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; - */ - protected $message = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pubsub_topic - * The Pub/Sub topic where notifications for the job, like state - * changes, will be published. If undefined, no Pub/Sub notifications - * are sent for this job. - * Specify the topic using the following format: - * `projects/{project}/topics/{topic}`. - * Notably, if you want to specify a Pub/Sub topic that is in a - * different project than the job, your administrator must grant your - * project's Batch service agent permission to publish to that topic. - * For more information about configuring Pub/Sub notifications for - * a job, see - * https://cloud.google.com/batch/docs/enable-notifications. - * @type \Google\Cloud\Batch\V1\JobNotification\Message $message - * The attribute requirements of messages to be sent to this Pub/Sub topic. - * Without this field, no message will be sent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The Pub/Sub topic where notifications for the job, like state - * changes, will be published. If undefined, no Pub/Sub notifications - * are sent for this job. - * Specify the topic using the following format: - * `projects/{project}/topics/{topic}`. - * Notably, if you want to specify a Pub/Sub topic that is in a - * different project than the job, your administrator must grant your - * project's Batch service agent permission to publish to that topic. - * For more information about configuring Pub/Sub notifications for - * a job, see - * https://cloud.google.com/batch/docs/enable-notifications. - * - * Generated from protobuf field string pubsub_topic = 1; - * @return string - */ - public function getPubsubTopic() - { - return $this->pubsub_topic; - } - - /** - * The Pub/Sub topic where notifications for the job, like state - * changes, will be published. If undefined, no Pub/Sub notifications - * are sent for this job. - * Specify the topic using the following format: - * `projects/{project}/topics/{topic}`. - * Notably, if you want to specify a Pub/Sub topic that is in a - * different project than the job, your administrator must grant your - * project's Batch service agent permission to publish to that topic. - * For more information about configuring Pub/Sub notifications for - * a job, see - * https://cloud.google.com/batch/docs/enable-notifications. - * - * Generated from protobuf field string pubsub_topic = 1; - * @param string $var - * @return $this - */ - public function setPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic = $var; - - return $this; - } - - /** - * The attribute requirements of messages to be sent to this Pub/Sub topic. - * Without this field, no message will be sent. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; - * @return \Google\Cloud\Batch\V1\JobNotification\Message|null - */ - public function getMessage() - { - return $this->message; - } - - public function hasMessage() - { - return isset($this->message); - } - - public function clearMessage() - { - unset($this->message); - } - - /** - * The attribute requirements of messages to be sent to this Pub/Sub topic. - * Without this field, no message will be sent. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; - * @param \Google\Cloud\Batch\V1\JobNotification\Message $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\JobNotification\Message::class); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php deleted file mode 100644 index 2dc572817132..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.batch.v1.JobNotification.Message - */ -class Message extends \Google\Protobuf\Internal\Message -{ - /** - * The message type. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; - */ - protected $type = 0; - /** - * The new job state. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; - */ - protected $new_job_state = 0; - /** - * The new task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; - */ - protected $new_task_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The message type. - * @type int $new_job_state - * The new job state. - * @type int $new_task_state - * The new task state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The message type. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The message type. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobNotification\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The new job state. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; - * @return int - */ - public function getNewJobState() - { - return $this->new_job_state; - } - - /** - * The new job state. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; - * @param int $var - * @return $this - */ - public function setNewJobState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobStatus\State::class); - $this->new_job_state = $var; - - return $this; - } - - /** - * The new task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; - * @return int - */ - public function getNewTaskState() - { - return $this->new_task_state; - } - - /** - * The new task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; - * @param int $var - * @return $this - */ - public function setNewTaskState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); - $this->new_task_state = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Message::class, \Google\Cloud\Batch\V1\JobNotification_Message::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php deleted file mode 100644 index 28ccf868f4c0..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.batch.v1.JobNotification.Type - */ -class Type -{ - /** - * Unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Notify users that the job state has changed. - * - * Generated from protobuf enum JOB_STATE_CHANGED = 1; - */ - const JOB_STATE_CHANGED = 1; - /** - * Notify users that the task state has changed. - * - * Generated from protobuf enum TASK_STATE_CHANGED = 2; - */ - const TASK_STATE_CHANGED = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::JOB_STATE_CHANGED => 'JOB_STATE_CHANGED', - self::TASK_STATE_CHANGED => 'TASK_STATE_CHANGED', - ]; - - 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\Batch\V1\JobNotification_Type::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php deleted file mode 100644 index 44e61d9713b6..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.batch.v1.JobStatus - */ -class JobStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Job state - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; - */ - protected $state = 0; - /** - * Job status events - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - */ - private $status_events; - /** - * Aggregated task status for each TaskGroup in the Job. - * The map key is TaskGroup ID. - * - * Generated from protobuf field map task_groups = 4; - */ - private $task_groups; - /** - * The duration of time that the Job spent in status RUNNING. - * - * Generated from protobuf field .google.protobuf.Duration run_duration = 5; - */ - protected $run_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Job state - * @type array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $status_events - * Job status events - * @type array|\Google\Protobuf\Internal\MapField $task_groups - * Aggregated task status for each TaskGroup in the Job. - * The map key is TaskGroup ID. - * @type \Google\Protobuf\Duration $run_duration - * The duration of time that the Job spent in status RUNNING. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Job state - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Job state - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Job status events - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatusEvents() - { - return $this->status_events; - } - - /** - * Job status events - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - * @param array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatusEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\StatusEvent::class); - $this->status_events = $arr; - - return $this; - } - - /** - * Aggregated task status for each TaskGroup in the Job. - * The map key is TaskGroup ID. - * - * Generated from protobuf field map task_groups = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTaskGroups() - { - return $this->task_groups; - } - - /** - * Aggregated task status for each TaskGroup in the Job. - * The map key is TaskGroup ID. - * - * Generated from protobuf field map task_groups = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTaskGroups($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobStatus\TaskGroupStatus::class); - $this->task_groups = $arr; - - return $this; - } - - /** - * The duration of time that the Job spent in status RUNNING. - * - * Generated from protobuf field .google.protobuf.Duration run_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getRunDuration() - { - return $this->run_duration; - } - - public function hasRunDuration() - { - return isset($this->run_duration); - } - - public function clearRunDuration() - { - unset($this->run_duration); - } - - /** - * The duration of time that the Job spent in status RUNNING. - * - * Generated from protobuf field .google.protobuf.Duration run_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRunDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->run_duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php deleted file mode 100644 index 4073a44ab3bc..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.batch.v1.JobStatus.InstanceStatus - */ -class InstanceStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 1; - */ - protected $machine_type = ''; - /** - * The VM instance provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; - */ - protected $provisioning_model = 0; - /** - * The max number of tasks can be assigned to this instance type. - * - * Generated from protobuf field int64 task_pack = 3; - */ - protected $task_pack = 0; - /** - * The VM boot disk. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; - */ - protected $boot_disk = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * The Compute Engine machine type. - * @type int $provisioning_model - * The VM instance provisioning model. - * @type int|string $task_pack - * The max number of tasks can be assigned to this instance type. - * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $boot_disk - * The VM boot disk. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 1; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 1; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * The VM instance provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; - * @return int - */ - public function getProvisioningModel() - { - return $this->provisioning_model; - } - - /** - * The VM instance provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; - * @param int $var - * @return $this - */ - public function setProvisioningModel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\AllocationPolicy\ProvisioningModel::class); - $this->provisioning_model = $var; - - return $this; - } - - /** - * The max number of tasks can be assigned to this instance type. - * - * Generated from protobuf field int64 task_pack = 3; - * @return int|string - */ - public function getTaskPack() - { - return $this->task_pack; - } - - /** - * The max number of tasks can be assigned to this instance type. - * - * Generated from protobuf field int64 task_pack = 3; - * @param int|string $var - * @return $this - */ - public function setTaskPack($var) - { - GPBUtil::checkInt64($var); - $this->task_pack = $var; - - return $this; - } - - /** - * The VM boot disk. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null - */ - public function getBootDisk() - { - return $this->boot_disk; - } - - public function hasBootDisk() - { - return isset($this->boot_disk); - } - - public function clearBootDisk() - { - unset($this->boot_disk); - } - - /** - * The VM boot disk. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var - * @return $this - */ - public function setBootDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); - $this->boot_disk = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstanceStatus::class, \Google\Cloud\Batch\V1\JobStatus_InstanceStatus::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php deleted file mode 100644 index 88b1b714c63f..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.batch.v1.JobStatus.State - */ -class State -{ - /** - * Job state unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Job is admitted (validated and persisted) and waiting for resources. - * - * Generated from protobuf enum QUEUED = 1; - */ - const QUEUED = 1; - /** - * Job is scheduled to run as soon as resource allocation is ready. - * The resource allocation may happen at a later time but with a high - * chance to succeed. - * - * Generated from protobuf enum SCHEDULED = 2; - */ - const SCHEDULED = 2; - /** - * Resource allocation has been successful. At least one Task in the Job is - * RUNNING. - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - /** - * All Tasks in the Job have finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * At least one Task in the Job has failed. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The Job will be deleted, but has not been deleted yet. Typically this is - * because resources used by the Job are still being cleaned up. - * - * Generated from protobuf enum DELETION_IN_PROGRESS = 6; - */ - const DELETION_IN_PROGRESS = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::QUEUED => 'QUEUED', - self::SCHEDULED => 'SCHEDULED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::DELETION_IN_PROGRESS => 'DELETION_IN_PROGRESS', - ]; - - 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\Batch\V1\JobStatus_State::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php deleted file mode 100644 index 54e870456e18..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.batch.v1.JobStatus.TaskGroupStatus - */ -class TaskGroupStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Count of task in each state in the TaskGroup. - * The map key is task state name. - * - * Generated from protobuf field map counts = 1; - */ - private $counts; - /** - * Status of instances allocated for the TaskGroup. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; - */ - private $instances; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $counts - * Count of task in each state in the TaskGroup. - * The map key is task state name. - * @type array<\Google\Cloud\Batch\V1\JobStatus\InstanceStatus>|\Google\Protobuf\Internal\RepeatedField $instances - * Status of instances allocated for the TaskGroup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Count of task in each state in the TaskGroup. - * The map key is task state name. - * - * Generated from protobuf field map counts = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCounts() - { - return $this->counts; - } - - /** - * Count of task in each state in the TaskGroup. - * The map key is task state name. - * - * Generated from protobuf field map counts = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCounts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); - $this->counts = $arr; - - return $this; - } - - /** - * Status of instances allocated for the TaskGroup. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * Status of instances allocated for the TaskGroup. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; - * @param array<\Google\Cloud\Batch\V1\JobStatus\InstanceStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobStatus\InstanceStatus::class); - $this->instances = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TaskGroupStatus::class, \Google\Cloud\Batch\V1\JobStatus_TaskGroupStatus::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php deleted file mode 100644 index 50bf332faf2d..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.batch.v1.LifecyclePolicy - */ -class LifecyclePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Action to execute when ActionCondition is true. - * When RETRY_TASK is specified, we will retry failed tasks - * if we notice any exit code match and fail tasks if no match is found. - * Likewise, when FAIL_TASK is specified, we will fail tasks - * if we notice any exit code match and retry tasks if no match is found. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; - */ - protected $action = 0; - /** - * Conditions that decide why a task failure is dealt with a specific action. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; - */ - protected $action_condition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $action - * Action to execute when ActionCondition is true. - * When RETRY_TASK is specified, we will retry failed tasks - * if we notice any exit code match and fail tasks if no match is found. - * Likewise, when FAIL_TASK is specified, we will fail tasks - * if we notice any exit code match and retry tasks if no match is found. - * @type \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $action_condition - * Conditions that decide why a task failure is dealt with a specific action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Action to execute when ActionCondition is true. - * When RETRY_TASK is specified, we will retry failed tasks - * if we notice any exit code match and fail tasks if no match is found. - * Likewise, when FAIL_TASK is specified, we will fail tasks - * if we notice any exit code match and retry tasks if no match is found. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * Action to execute when ActionCondition is true. - * When RETRY_TASK is specified, we will retry failed tasks - * if we notice any exit code match and fail tasks if no match is found. - * Likewise, when FAIL_TASK is specified, we will fail tasks - * if we notice any exit code match and retry tasks if no match is found. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LifecyclePolicy\Action::class); - $this->action = $var; - - return $this; - } - - /** - * Conditions that decide why a task failure is dealt with a specific action. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; - * @return \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition|null - */ - public function getActionCondition() - { - return $this->action_condition; - } - - public function hasActionCondition() - { - return isset($this->action_condition); - } - - public function clearActionCondition() - { - unset($this->action_condition); - } - - /** - * Conditions that decide why a task failure is dealt with a specific action. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; - * @param \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $var - * @return $this - */ - public function setActionCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition::class); - $this->action_condition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php deleted file mode 100644 index 08419071bb67..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.batch.v1.LifecyclePolicy.Action - */ -class Action -{ - /** - * Action unspecified. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * Action that tasks in the group will be scheduled to re-execute. - * - * Generated from protobuf enum RETRY_TASK = 1; - */ - const RETRY_TASK = 1; - /** - * Action that tasks in the group will be stopped immediately. - * - * Generated from protobuf enum FAIL_TASK = 2; - */ - const FAIL_TASK = 2; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::RETRY_TASK => 'RETRY_TASK', - self::FAIL_TASK => 'FAIL_TASK', - ]; - - 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(Action::class, \Google\Cloud\Batch\V1\LifecyclePolicy_Action::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php deleted file mode 100644 index acffa97a9300..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.batch.v1.LifecyclePolicy.ActionCondition - */ -class ActionCondition extends \Google\Protobuf\Internal\Message -{ - /** - * Exit codes of a task execution. - * If there are more than 1 exit codes, - * when task executes with any of the exit code in the list, - * the condition is met and the action will be executed. - * - * Generated from protobuf field repeated int32 exit_codes = 1; - */ - private $exit_codes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $exit_codes - * Exit codes of a task execution. - * If there are more than 1 exit codes, - * when task executes with any of the exit code in the list, - * the condition is met and the action will be executed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Exit codes of a task execution. - * If there are more than 1 exit codes, - * when task executes with any of the exit code in the list, - * the condition is met and the action will be executed. - * - * Generated from protobuf field repeated int32 exit_codes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExitCodes() - { - return $this->exit_codes; - } - - /** - * Exit codes of a task execution. - * If there are more than 1 exit codes, - * when task executes with any of the exit code in the list, - * the condition is met and the action will be executed. - * - * Generated from protobuf field repeated int32 exit_codes = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExitCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->exit_codes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ActionCondition::class, \Google\Cloud\Batch\V1\LifecyclePolicy_ActionCondition::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php deleted file mode 100644 index 172ee92ea293..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.batch.v1.ListJobsRequest - */ -class ListJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Parent path. - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Optional. Sort results. Supported are "name", "name desc", "create_time", - * and "create_time desc". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Parent path. - * - * @return \Google\Cloud\Batch\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 - * Parent path. - * @type string $filter - * List filter. - * @type string $order_by - * Optional. Sort results. Supported are "name", "name desc", "create_time", - * and "create_time desc". - * @type int $page_size - * Page size. - * @type string $page_token - * Page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Parent path. - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Parent path. - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Sort results. Supported are "name", "name desc", "create_time", - * and "create_time desc". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Sort results. Supported are "name", "name desc", "create_time", - * and "create_time desc". - * - * 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; - } - - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php deleted file mode 100644 index 9874dbeed530..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.batch.v1.ListJobsResponse - */ -class ListJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Jobs. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; - */ - private $jobs; - /** - * Next page token. - * - * 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\Batch\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * Jobs. - * @type string $next_page_token - * Next page token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Jobs. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Jobs. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; - * @param array<\Google\Cloud\Batch\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Next page token. - * - * 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php deleted file mode 100644 index bd42658dcae9..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.batch.v1.ListTasksRequest - */ -class ListTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Task filter, null filter matches all Tasks. - * Filter string should be of the format State=TaskStatus.State e.g. - * State=RUNNING - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Page token. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * Please see {@see BatchServiceClient::taskGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Batch\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. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * @type string $filter - * Task filter, null filter matches all Tasks. - * Filter string should be of the format State=TaskStatus.State e.g. - * State=RUNNING - * @type int $page_size - * Page size. - * @type string $page_token - * Page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * - * 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; - } - - /** - * Task filter, null filter matches all Tasks. - * Filter string should be of the format State=TaskStatus.State e.g. - * State=RUNNING - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Task filter, null filter matches all Tasks. - * Filter string should be of the format State=TaskStatus.State e.g. - * State=RUNNING - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token. - * - * Generated from protobuf field string page_token = 4; - * @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/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php deleted file mode 100644 index 7209c2e30a9f..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.batch.v1.ListTasksResponse - */ -class ListTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Tasks. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; - */ - private $tasks; - /** - * Next page token. - * - * 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\Batch\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * Tasks. - * @type string $next_page_token - * Next page token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Tasks. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * Tasks. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; - * @param array<\Google\Cloud\Batch\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Task::class); - $this->tasks = $arr; - - return $this; - } - - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Next page token. - * - * 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php deleted file mode 100644 index 3815935a8403..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.batch.v1.LogsPolicy - */ -class LogsPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Where logs should be saved. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; - */ - protected $destination = 0; - /** - * The path to which logs are saved when the destination = PATH. This can be a - * local file path on the VM, or under the mount point of a Persistent Disk or - * Filestore, or a Cloud Storage path. - * - * Generated from protobuf field string logs_path = 2; - */ - protected $logs_path = ''; - /** - * Optional. Additional settings for Cloud Logging. It will only take effect - * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cloud_logging_option = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $destination - * Where logs should be saved. - * @type string $logs_path - * The path to which logs are saved when the destination = PATH. This can be a - * local file path on the VM, or under the mount point of a Persistent Disk or - * Filestore, or a Cloud Storage path. - * @type \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption $cloud_logging_option - * Optional. Additional settings for Cloud Logging. It will only take effect - * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Where logs should be saved. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; - * @return int - */ - public function getDestination() - { - return $this->destination; - } - - /** - * Where logs should be saved. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; - * @param int $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LogsPolicy\Destination::class); - $this->destination = $var; - - return $this; - } - - /** - * The path to which logs are saved when the destination = PATH. This can be a - * local file path on the VM, or under the mount point of a Persistent Disk or - * Filestore, or a Cloud Storage path. - * - * Generated from protobuf field string logs_path = 2; - * @return string - */ - public function getLogsPath() - { - return $this->logs_path; - } - - /** - * The path to which logs are saved when the destination = PATH. This can be a - * local file path on the VM, or under the mount point of a Persistent Disk or - * Filestore, or a Cloud Storage path. - * - * Generated from protobuf field string logs_path = 2; - * @param string $var - * @return $this - */ - public function setLogsPath($var) - { - GPBUtil::checkString($var, True); - $this->logs_path = $var; - - return $this; - } - - /** - * Optional. Additional settings for Cloud Logging. It will only take effect - * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption|null - */ - public function getCloudLoggingOption() - { - return $this->cloud_logging_option; - } - - public function hasCloudLoggingOption() - { - return isset($this->cloud_logging_option); - } - - public function clearCloudLoggingOption() - { - unset($this->cloud_logging_option); - } - - /** - * Optional. Additional settings for Cloud Logging. It will only take effect - * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption $var - * @return $this - */ - public function setCloudLoggingOption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption::class); - $this->cloud_logging_option = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php deleted file mode 100644 index 6004643bec5a..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.batch.v1.LogsPolicy.CloudLoggingOption - */ -class CloudLoggingOption extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Set this flag to true to change the [monitored resource - * type](https://cloud.google.com/monitoring/api/resources) for - * Cloud Logging logs generated by this Batch job from - * the - * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - * type to the formerly used - * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - * type. - * - * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $use_generic_task_monitored_resource = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $use_generic_task_monitored_resource - * Optional. Set this flag to true to change the [monitored resource - * type](https://cloud.google.com/monitoring/api/resources) for - * Cloud Logging logs generated by this Batch job from - * the - * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - * type to the formerly used - * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - * type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Set this flag to true to change the [monitored resource - * type](https://cloud.google.com/monitoring/api/resources) for - * Cloud Logging logs generated by this Batch job from - * the - * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - * type to the formerly used - * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - * type. - * - * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUseGenericTaskMonitoredResource() - { - return $this->use_generic_task_monitored_resource; - } - - /** - * Optional. Set this flag to true to change the [monitored resource - * type](https://cloud.google.com/monitoring/api/resources) for - * Cloud Logging logs generated by this Batch job from - * the - * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - * type to the formerly used - * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - * type. - * - * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUseGenericTaskMonitoredResource($var) - { - GPBUtil::checkBool($var); - $this->use_generic_task_monitored_resource = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudLoggingOption::class, \Google\Cloud\Batch\V1\LogsPolicy_CloudLoggingOption::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php deleted file mode 100644 index 1f87d09d632d..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.batch.v1.LogsPolicy.Destination - */ -class Destination -{ - /** - * Logs are not preserved. - * - * Generated from protobuf enum DESTINATION_UNSPECIFIED = 0; - */ - const DESTINATION_UNSPECIFIED = 0; - /** - * Logs are streamed to Cloud Logging. - * - * Generated from protobuf enum CLOUD_LOGGING = 1; - */ - const CLOUD_LOGGING = 1; - /** - * Logs are saved to a file path. - * - * Generated from protobuf enum PATH = 2; - */ - const PATH = 2; - - private static $valueToName = [ - self::DESTINATION_UNSPECIFIED => 'DESTINATION_UNSPECIFIED', - self::CLOUD_LOGGING => 'CLOUD_LOGGING', - self::PATH => 'PATH', - ]; - - 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(Destination::class, \Google\Cloud\Batch\V1\LogsPolicy_Destination::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php deleted file mode 100644 index b4c6e4bb1506..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.batch.v1.NFS - */ -class NFS extends \Google\Protobuf\Internal\Message -{ - /** - * The IP address of the NFS. - * - * Generated from protobuf field string server = 1; - */ - protected $server = ''; - /** - * Remote source path exported from the NFS, e.g., "/share". - * - * Generated from protobuf field string remote_path = 2; - */ - protected $remote_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $server - * The IP address of the NFS. - * @type string $remote_path - * Remote source path exported from the NFS, e.g., "/share". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * The IP address of the NFS. - * - * Generated from protobuf field string server = 1; - * @return string - */ - public function getServer() - { - return $this->server; - } - - /** - * The IP address of the NFS. - * - * Generated from protobuf field string server = 1; - * @param string $var - * @return $this - */ - public function setServer($var) - { - GPBUtil::checkString($var, True); - $this->server = $var; - - return $this; - } - - /** - * Remote source path exported from the NFS, e.g., "/share". - * - * Generated from protobuf field string remote_path = 2; - * @return string - */ - public function getRemotePath() - { - return $this->remote_path; - } - - /** - * Remote source path exported from the NFS, e.g., "/share". - * - * Generated from protobuf field string remote_path = 2; - * @param string $var - * @return $this - */ - public function setRemotePath($var) - { - GPBUtil::checkString($var, True); - $this->remote_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php deleted file mode 100644 index 6a98d039d45c..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.batch.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\Batch\V1\Batch::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/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php deleted file mode 100644 index f04d7966d7b3..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php +++ /dev/null @@ -1,492 +0,0 @@ -google.cloud.batch.v1.Runnable - */ -class Runnable extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. DisplayName is an optional field that can be provided by the - * caller. If provided, it will be used in logs and other outputs to identify - * the script, making it easier for users to understand the logs. If not - * provided the index of the runnable will be used for outputs. - * - * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Normally, a runnable that returns a non-zero exit status fails and causes - * the task to fail. However, you can set this field to `true` to allow the - * task to continue executing its other runnables even if this runnable - * fails. - * - * Generated from protobuf field bool ignore_exit_status = 3; - */ - protected $ignore_exit_status = false; - /** - * Normally, a runnable that doesn't exit causes its task to fail. However, - * you can set this field to `true` to configure a background runnable. - * Background runnables are allowed continue running in the background while - * the task executes subsequent runnables. For example, background runnables - * are useful for providing services to other runnables or providing - * debugging-support tools like SSH servers. - * Specifically, background runnables are killed automatically (if they have - * not already exited) a short time after all foreground runnables have - * completed. Even though this is likely to result in a non-zero exit status - * for the background runnable, these automatic kills are not treated as task - * failures. - * - * Generated from protobuf field bool background = 4; - */ - protected $background = false; - /** - * By default, after a Runnable fails, no further Runnable are executed. This - * flag indicates that this Runnable must be run even if the Task has already - * failed. This is useful for Runnables that copy output files off of the VM - * or for debugging. - * The always_run flag does not override the Task's overall max_run_duration. - * If the max_run_duration has expired then no further Runnables will execute, - * not even always_run Runnables. - * - * Generated from protobuf field bool always_run = 5; - */ - protected $always_run = false; - /** - * Environment variables for this Runnable (overrides variables set for the - * whole Task or TaskGroup). - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; - */ - protected $environment = null; - /** - * Timeout for this Runnable. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - */ - protected $timeout = null; - /** - * Labels for this Runnable. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - protected $executable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\Runnable\Container $container - * Container runnable. - * @type \Google\Cloud\Batch\V1\Runnable\Script $script - * Script runnable. - * @type \Google\Cloud\Batch\V1\Runnable\Barrier $barrier - * Barrier runnable. - * @type string $display_name - * Optional. DisplayName is an optional field that can be provided by the - * caller. If provided, it will be used in logs and other outputs to identify - * the script, making it easier for users to understand the logs. If not - * provided the index of the runnable will be used for outputs. - * @type bool $ignore_exit_status - * Normally, a runnable that returns a non-zero exit status fails and causes - * the task to fail. However, you can set this field to `true` to allow the - * task to continue executing its other runnables even if this runnable - * fails. - * @type bool $background - * Normally, a runnable that doesn't exit causes its task to fail. However, - * you can set this field to `true` to configure a background runnable. - * Background runnables are allowed continue running in the background while - * the task executes subsequent runnables. For example, background runnables - * are useful for providing services to other runnables or providing - * debugging-support tools like SSH servers. - * Specifically, background runnables are killed automatically (if they have - * not already exited) a short time after all foreground runnables have - * completed. Even though this is likely to result in a non-zero exit status - * for the background runnable, these automatic kills are not treated as task - * failures. - * @type bool $always_run - * By default, after a Runnable fails, no further Runnable are executed. This - * flag indicates that this Runnable must be run even if the Task has already - * failed. This is useful for Runnables that copy output files off of the VM - * or for debugging. - * The always_run flag does not override the Task's overall max_run_duration. - * If the max_run_duration has expired then no further Runnables will execute, - * not even always_run Runnables. - * @type \Google\Cloud\Batch\V1\Environment $environment - * Environment variables for this Runnable (overrides variables set for the - * whole Task or TaskGroup). - * @type \Google\Protobuf\Duration $timeout - * Timeout for this Runnable. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels for this Runnable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Container runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1; - * @return \Google\Cloud\Batch\V1\Runnable\Container|null - */ - public function getContainer() - { - return $this->readOneof(1); - } - - public function hasContainer() - { - return $this->hasOneof(1); - } - - /** - * Container runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1; - * @param \Google\Cloud\Batch\V1\Runnable\Container $var - * @return $this - */ - public function setContainer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Container::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Script runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2; - * @return \Google\Cloud\Batch\V1\Runnable\Script|null - */ - public function getScript() - { - return $this->readOneof(2); - } - - public function hasScript() - { - return $this->hasOneof(2); - } - - /** - * Script runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2; - * @param \Google\Cloud\Batch\V1\Runnable\Script $var - * @return $this - */ - public function setScript($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Script::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Barrier runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6; - * @return \Google\Cloud\Batch\V1\Runnable\Barrier|null - */ - public function getBarrier() - { - return $this->readOneof(6); - } - - public function hasBarrier() - { - return $this->hasOneof(6); - } - - /** - * Barrier runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6; - * @param \Google\Cloud\Batch\V1\Runnable\Barrier $var - * @return $this - */ - public function setBarrier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Barrier::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. DisplayName is an optional field that can be provided by the - * caller. If provided, it will be used in logs and other outputs to identify - * the script, making it easier for users to understand the logs. If not - * provided the index of the runnable will be used for outputs. - * - * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. DisplayName is an optional field that can be provided by the - * caller. If provided, it will be used in logs and other outputs to identify - * the script, making it easier for users to understand the logs. If not - * provided the index of the runnable will be used for outputs. - * - * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Normally, a runnable that returns a non-zero exit status fails and causes - * the task to fail. However, you can set this field to `true` to allow the - * task to continue executing its other runnables even if this runnable - * fails. - * - * Generated from protobuf field bool ignore_exit_status = 3; - * @return bool - */ - public function getIgnoreExitStatus() - { - return $this->ignore_exit_status; - } - - /** - * Normally, a runnable that returns a non-zero exit status fails and causes - * the task to fail. However, you can set this field to `true` to allow the - * task to continue executing its other runnables even if this runnable - * fails. - * - * Generated from protobuf field bool ignore_exit_status = 3; - * @param bool $var - * @return $this - */ - public function setIgnoreExitStatus($var) - { - GPBUtil::checkBool($var); - $this->ignore_exit_status = $var; - - return $this; - } - - /** - * Normally, a runnable that doesn't exit causes its task to fail. However, - * you can set this field to `true` to configure a background runnable. - * Background runnables are allowed continue running in the background while - * the task executes subsequent runnables. For example, background runnables - * are useful for providing services to other runnables or providing - * debugging-support tools like SSH servers. - * Specifically, background runnables are killed automatically (if they have - * not already exited) a short time after all foreground runnables have - * completed. Even though this is likely to result in a non-zero exit status - * for the background runnable, these automatic kills are not treated as task - * failures. - * - * Generated from protobuf field bool background = 4; - * @return bool - */ - public function getBackground() - { - return $this->background; - } - - /** - * Normally, a runnable that doesn't exit causes its task to fail. However, - * you can set this field to `true` to configure a background runnable. - * Background runnables are allowed continue running in the background while - * the task executes subsequent runnables. For example, background runnables - * are useful for providing services to other runnables or providing - * debugging-support tools like SSH servers. - * Specifically, background runnables are killed automatically (if they have - * not already exited) a short time after all foreground runnables have - * completed. Even though this is likely to result in a non-zero exit status - * for the background runnable, these automatic kills are not treated as task - * failures. - * - * Generated from protobuf field bool background = 4; - * @param bool $var - * @return $this - */ - public function setBackground($var) - { - GPBUtil::checkBool($var); - $this->background = $var; - - return $this; - } - - /** - * By default, after a Runnable fails, no further Runnable are executed. This - * flag indicates that this Runnable must be run even if the Task has already - * failed. This is useful for Runnables that copy output files off of the VM - * or for debugging. - * The always_run flag does not override the Task's overall max_run_duration. - * If the max_run_duration has expired then no further Runnables will execute, - * not even always_run Runnables. - * - * Generated from protobuf field bool always_run = 5; - * @return bool - */ - public function getAlwaysRun() - { - return $this->always_run; - } - - /** - * By default, after a Runnable fails, no further Runnable are executed. This - * flag indicates that this Runnable must be run even if the Task has already - * failed. This is useful for Runnables that copy output files off of the VM - * or for debugging. - * The always_run flag does not override the Task's overall max_run_duration. - * If the max_run_duration has expired then no further Runnables will execute, - * not even always_run Runnables. - * - * Generated from protobuf field bool always_run = 5; - * @param bool $var - * @return $this - */ - public function setAlwaysRun($var) - { - GPBUtil::checkBool($var); - $this->always_run = $var; - - return $this; - } - - /** - * Environment variables for this Runnable (overrides variables set for the - * whole Task or TaskGroup). - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; - * @return \Google\Cloud\Batch\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Environment variables for this Runnable (overrides variables set for the - * whole Task or TaskGroup). - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; - * @param \Google\Cloud\Batch\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Timeout for this Runnable. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Timeout for this Runnable. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Labels for this Runnable. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels for this Runnable. - * - * Generated from protobuf field map labels = 9; - * @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; - } - - /** - * @return string - */ - public function getExecutable() - { - return $this->whichOneof("executable"); - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php deleted file mode 100644 index 4e85102178ac..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.batch.v1.Runnable.Barrier - */ -class Barrier extends \Google\Protobuf\Internal\Message -{ - /** - * Barriers are identified by their index in runnable list. - * Names are not required, but if present should be an identifier. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Barriers are identified by their index in runnable list. - * Names are not required, but if present should be an identifier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Barriers are identified by their index in runnable list. - * Names are not required, but if present should be an identifier. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Barriers are identified by their index in runnable list. - * Names are not required, but if present should be an identifier. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Barrier::class, \Google\Cloud\Batch\V1\Runnable_Barrier::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php deleted file mode 100644 index 614fdd5d3e5c..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php +++ /dev/null @@ -1,562 +0,0 @@ -google.cloud.batch.v1.Runnable.Container - */ -class Container extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The URI to pull the container image from. - * - * Generated from protobuf field string image_uri = 1; - */ - protected $image_uri = ''; - /** - * Required for some container images. Overrides the `CMD` specified in the - * container. If there is an `ENTRYPOINT` (either in the container image or - * with the `entrypoint` field below) then these commands are appended as - * arguments to the `ENTRYPOINT`. - * - * Generated from protobuf field repeated string commands = 2; - */ - private $commands; - /** - * Required for some container images. Overrides the `ENTRYPOINT` specified - * in the container. - * - * Generated from protobuf field string entrypoint = 3; - */ - protected $entrypoint = ''; - /** - * Volumes to mount (bind mount) from the host machine files or directories - * into the container, formatted to match `--volume` option for the - * `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. - * If the `TaskSpec.Volumes` field is specified but this field is not, Batch - * will mount each volume from the host machine to the container with the - * same mount path by default. In this case, the default mount option for - * containers will be read-only (`ro`) for existing persistent disks and - * read-write (`rw`) for other volume types, regardless of the original - * mount options specified in `TaskSpec.Volumes`. If you need different - * mount settings, you can explicitly configure them in this field. - * - * Generated from protobuf field repeated string volumes = 7; - */ - private $volumes; - /** - * Required for some container images. Arbitrary additional options to - * include in the `docker run` command when running this container—for - * example, `--network host`. For the `--volume` option, use the `volumes` - * field for the container. - * - * Generated from protobuf field string options = 8; - */ - protected $options = ''; - /** - * If set to true, external network access to and from container will be - * blocked, containers that are with block_external_network as true can - * still communicate with each other, network cannot be specified in the - * `container.options` field. - * - * Generated from protobuf field bool block_external_network = 9; - */ - protected $block_external_network = false; - /** - * Required if the container image is from a private Docker registry. The - * username to login to the Docker registry that contains the image. - * You can either specify the username directly by using plain text or - * specify an encrypted username by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. However, using a secret is - * recommended for enhanced security. - * Caution: If you specify the username using plain text, you risk the - * username being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the username instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string username = 10; - */ - protected $username = ''; - /** - * Required if the container image is from a private Docker registry. The - * password to login to the Docker registry that contains the image. - * For security, it is strongly recommended to specify an - * encrypted password by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. - * Warning: If you specify the password using plain text, you risk the - * password being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the password instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string password = 11; - */ - protected $password = ''; - /** - * Optional. If set to true, this container runnable uses Image streaming. - * Use Image streaming to allow the runnable to initialize without - * waiting for the entire container image to download, which can - * significantly reduce startup time for large container images. - * When `enableImageStreaming` is set to true, the container - * runtime is [containerd](https://containerd.io/) instead of Docker. - * Additionally, this container runnable only supports the following - * `container` subfields: `imageUri`, - * `commands[]`, `entrypoint`, and - * `volumes[]`; any other `container` subfields are ignored. - * For more information about the requirements and limitations for using - * Image streaming with Batch, see the [`image-streaming` - * sample on - * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - * - * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_image_streaming = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_uri - * Required. The URI to pull the container image from. - * @type array|\Google\Protobuf\Internal\RepeatedField $commands - * Required for some container images. Overrides the `CMD` specified in the - * container. If there is an `ENTRYPOINT` (either in the container image or - * with the `entrypoint` field below) then these commands are appended as - * arguments to the `ENTRYPOINT`. - * @type string $entrypoint - * Required for some container images. Overrides the `ENTRYPOINT` specified - * in the container. - * @type array|\Google\Protobuf\Internal\RepeatedField $volumes - * Volumes to mount (bind mount) from the host machine files or directories - * into the container, formatted to match `--volume` option for the - * `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. - * If the `TaskSpec.Volumes` field is specified but this field is not, Batch - * will mount each volume from the host machine to the container with the - * same mount path by default. In this case, the default mount option for - * containers will be read-only (`ro`) for existing persistent disks and - * read-write (`rw`) for other volume types, regardless of the original - * mount options specified in `TaskSpec.Volumes`. If you need different - * mount settings, you can explicitly configure them in this field. - * @type string $options - * Required for some container images. Arbitrary additional options to - * include in the `docker run` command when running this container—for - * example, `--network host`. For the `--volume` option, use the `volumes` - * field for the container. - * @type bool $block_external_network - * If set to true, external network access to and from container will be - * blocked, containers that are with block_external_network as true can - * still communicate with each other, network cannot be specified in the - * `container.options` field. - * @type string $username - * Required if the container image is from a private Docker registry. The - * username to login to the Docker registry that contains the image. - * You can either specify the username directly by using plain text or - * specify an encrypted username by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. However, using a secret is - * recommended for enhanced security. - * Caution: If you specify the username using plain text, you risk the - * username being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the username instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * @type string $password - * Required if the container image is from a private Docker registry. The - * password to login to the Docker registry that contains the image. - * For security, it is strongly recommended to specify an - * encrypted password by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. - * Warning: If you specify the password using plain text, you risk the - * password being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the password instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * @type bool $enable_image_streaming - * Optional. If set to true, this container runnable uses Image streaming. - * Use Image streaming to allow the runnable to initialize without - * waiting for the entire container image to download, which can - * significantly reduce startup time for large container images. - * When `enableImageStreaming` is set to true, the container - * runtime is [containerd](https://containerd.io/) instead of Docker. - * Additionally, this container runnable only supports the following - * `container` subfields: `imageUri`, - * `commands[]`, `entrypoint`, and - * `volumes[]`; any other `container` subfields are ignored. - * For more information about the requirements and limitations for using - * Image streaming with Batch, see the [`image-streaming` - * sample on - * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URI to pull the container image from. - * - * Generated from protobuf field string image_uri = 1; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * Required. The URI to pull the container image from. - * - * Generated from protobuf field string image_uri = 1; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * Required for some container images. Overrides the `CMD` specified in the - * container. If there is an `ENTRYPOINT` (either in the container image or - * with the `entrypoint` field below) then these commands are appended as - * arguments to the `ENTRYPOINT`. - * - * Generated from protobuf field repeated string commands = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCommands() - { - return $this->commands; - } - - /** - * Required for some container images. Overrides the `CMD` specified in the - * container. If there is an `ENTRYPOINT` (either in the container image or - * with the `entrypoint` field below) then these commands are appended as - * arguments to the `ENTRYPOINT`. - * - * Generated from protobuf field repeated string commands = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCommands($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->commands = $arr; - - return $this; - } - - /** - * Required for some container images. Overrides the `ENTRYPOINT` specified - * in the container. - * - * Generated from protobuf field string entrypoint = 3; - * @return string - */ - public function getEntrypoint() - { - return $this->entrypoint; - } - - /** - * Required for some container images. Overrides the `ENTRYPOINT` specified - * in the container. - * - * Generated from protobuf field string entrypoint = 3; - * @param string $var - * @return $this - */ - public function setEntrypoint($var) - { - GPBUtil::checkString($var, True); - $this->entrypoint = $var; - - return $this; - } - - /** - * Volumes to mount (bind mount) from the host machine files or directories - * into the container, formatted to match `--volume` option for the - * `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. - * If the `TaskSpec.Volumes` field is specified but this field is not, Batch - * will mount each volume from the host machine to the container with the - * same mount path by default. In this case, the default mount option for - * containers will be read-only (`ro`) for existing persistent disks and - * read-write (`rw`) for other volume types, regardless of the original - * mount options specified in `TaskSpec.Volumes`. If you need different - * mount settings, you can explicitly configure them in this field. - * - * Generated from protobuf field repeated string volumes = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * Volumes to mount (bind mount) from the host machine files or directories - * into the container, formatted to match `--volume` option for the - * `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. - * If the `TaskSpec.Volumes` field is specified but this field is not, Batch - * will mount each volume from the host machine to the container with the - * same mount path by default. In this case, the default mount option for - * containers will be read-only (`ro`) for existing persistent disks and - * read-write (`rw`) for other volume types, regardless of the original - * mount options specified in `TaskSpec.Volumes`. If you need different - * mount settings, you can explicitly configure them in this field. - * - * Generated from protobuf field repeated string volumes = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->volumes = $arr; - - return $this; - } - - /** - * Required for some container images. Arbitrary additional options to - * include in the `docker run` command when running this container—for - * example, `--network host`. For the `--volume` option, use the `volumes` - * field for the container. - * - * Generated from protobuf field string options = 8; - * @return string - */ - public function getOptions() - { - return $this->options; - } - - /** - * Required for some container images. Arbitrary additional options to - * include in the `docker run` command when running this container—for - * example, `--network host`. For the `--volume` option, use the `volumes` - * field for the container. - * - * Generated from protobuf field string options = 8; - * @param string $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkString($var, True); - $this->options = $var; - - return $this; - } - - /** - * If set to true, external network access to and from container will be - * blocked, containers that are with block_external_network as true can - * still communicate with each other, network cannot be specified in the - * `container.options` field. - * - * Generated from protobuf field bool block_external_network = 9; - * @return bool - */ - public function getBlockExternalNetwork() - { - return $this->block_external_network; - } - - /** - * If set to true, external network access to and from container will be - * blocked, containers that are with block_external_network as true can - * still communicate with each other, network cannot be specified in the - * `container.options` field. - * - * Generated from protobuf field bool block_external_network = 9; - * @param bool $var - * @return $this - */ - public function setBlockExternalNetwork($var) - { - GPBUtil::checkBool($var); - $this->block_external_network = $var; - - return $this; - } - - /** - * Required if the container image is from a private Docker registry. The - * username to login to the Docker registry that contains the image. - * You can either specify the username directly by using plain text or - * specify an encrypted username by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. However, using a secret is - * recommended for enhanced security. - * Caution: If you specify the username using plain text, you risk the - * username being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the username instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string username = 10; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required if the container image is from a private Docker registry. The - * username to login to the Docker registry that contains the image. - * You can either specify the username directly by using plain text or - * specify an encrypted username by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. However, using a secret is - * recommended for enhanced security. - * Caution: If you specify the username using plain text, you risk the - * username being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the username instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string username = 10; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Required if the container image is from a private Docker registry. The - * password to login to the Docker registry that contains the image. - * For security, it is strongly recommended to specify an - * encrypted password by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. - * Warning: If you specify the password using plain text, you risk the - * password being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the password instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string password = 11; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Required if the container image is from a private Docker registry. The - * password to login to the Docker registry that contains the image. - * For security, it is strongly recommended to specify an - * encrypted password by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. - * Warning: If you specify the password using plain text, you risk the - * password being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the password instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string password = 11; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * Optional. If set to true, this container runnable uses Image streaming. - * Use Image streaming to allow the runnable to initialize without - * waiting for the entire container image to download, which can - * significantly reduce startup time for large container images. - * When `enableImageStreaming` is set to true, the container - * runtime is [containerd](https://containerd.io/) instead of Docker. - * Additionally, this container runnable only supports the following - * `container` subfields: `imageUri`, - * `commands[]`, `entrypoint`, and - * `volumes[]`; any other `container` subfields are ignored. - * For more information about the requirements and limitations for using - * Image streaming with Batch, see the [`image-streaming` - * sample on - * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - * - * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableImageStreaming() - { - return $this->enable_image_streaming; - } - - /** - * Optional. If set to true, this container runnable uses Image streaming. - * Use Image streaming to allow the runnable to initialize without - * waiting for the entire container image to download, which can - * significantly reduce startup time for large container images. - * When `enableImageStreaming` is set to true, the container - * runtime is [containerd](https://containerd.io/) instead of Docker. - * Additionally, this container runnable only supports the following - * `container` subfields: `imageUri`, - * `commands[]`, `entrypoint`, and - * `volumes[]`; any other `container` subfields are ignored. - * For more information about the requirements and limitations for using - * Image streaming with Batch, see the [`image-streaming` - * sample on - * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - * - * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableImageStreaming($var) - { - GPBUtil::checkBool($var); - $this->enable_image_streaming = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Container::class, \Google\Cloud\Batch\V1\Runnable_Container::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php deleted file mode 100644 index 1abdb64dd330..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.batch.v1.Runnable.Script - */ -class Script extends \Google\Protobuf\Internal\Message -{ - protected $command; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * The path to a script file that is accessible from the host VM(s). - * Unless the script file supports the default `#!/bin/sh` shell - * interpreter, you must specify an interpreter by including a - * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the - * first line of the file. For example, to execute the script using bash, - * include `#!/bin/bash` as the first line of the file. Alternatively, - * to execute the script using Python3, include `#!/usr/bin/env python3` - * as the first line of the file. - * @type string $text - * The text for a script. - * Unless the script text supports the default `#!/bin/sh` shell - * interpreter, you must specify an interpreter by including a - * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the - * beginning of the text. For example, to execute the script using bash, - * include `#!/bin/bash\n` at the beginning of the text. Alternatively, - * to execute the script using Python3, include `#!/usr/bin/env python3\n` - * at the beginning of the text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * The path to a script file that is accessible from the host VM(s). - * Unless the script file supports the default `#!/bin/sh` shell - * interpreter, you must specify an interpreter by including a - * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the - * first line of the file. For example, to execute the script using bash, - * include `#!/bin/bash` as the first line of the file. Alternatively, - * to execute the script using Python3, include `#!/usr/bin/env python3` - * as the first line of the file. - * - * Generated from protobuf field string path = 1; - * @return string - */ - public function getPath() - { - return $this->readOneof(1); - } - - public function hasPath() - { - return $this->hasOneof(1); - } - - /** - * The path to a script file that is accessible from the host VM(s). - * Unless the script file supports the default `#!/bin/sh` shell - * interpreter, you must specify an interpreter by including a - * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the - * first line of the file. For example, to execute the script using bash, - * include `#!/bin/bash` as the first line of the file. Alternatively, - * to execute the script using Python3, include `#!/usr/bin/env python3` - * as the first line of the file. - * - * Generated from protobuf field string path = 1; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The text for a script. - * Unless the script text supports the default `#!/bin/sh` shell - * interpreter, you must specify an interpreter by including a - * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the - * beginning of the text. For example, to execute the script using bash, - * include `#!/bin/bash\n` at the beginning of the text. Alternatively, - * to execute the script using Python3, include `#!/usr/bin/env python3\n` - * at the beginning of the text. - * - * Generated from protobuf field string text = 2; - * @return string - */ - public function getText() - { - return $this->readOneof(2); - } - - public function hasText() - { - return $this->hasOneof(2); - } - - /** - * The text for a script. - * Unless the script text supports the default `#!/bin/sh` shell - * interpreter, you must specify an interpreter by including a - * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the - * beginning of the text. For example, to execute the script using bash, - * include `#!/bin/bash\n` at the beginning of the text. Alternatively, - * to execute the script using Python3, include `#!/usr/bin/env python3\n` - * at the beginning of the text. - * - * Generated from protobuf field string text = 2; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getCommand() - { - return $this->whichOneof("command"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Script::class, \Google\Cloud\Batch\V1\Runnable_Script::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php deleted file mode 100644 index 2a315346b647..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.batch.v1.ServiceAccount - */ -class ServiceAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Email address of the service account. - * - * Generated from protobuf field string email = 1; - */ - protected $email = ''; - /** - * List of scopes to be enabled for this service account. - * - * Generated from protobuf field repeated string scopes = 2; - */ - private $scopes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * Email address of the service account. - * @type array|\Google\Protobuf\Internal\RepeatedField $scopes - * List of scopes to be enabled for this service account. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Email address of the service account. - * - * Generated from protobuf field string email = 1; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Email address of the service account. - * - * Generated from protobuf field string email = 1; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * List of scopes to be enabled for this service account. - * - * Generated from protobuf field repeated string scopes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScopes() - { - return $this->scopes; - } - - /** - * List of scopes to be enabled for this service account. - * - * Generated from protobuf field repeated string scopes = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scopes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php deleted file mode 100644 index 1a199e88f2ff..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.batch.v1.StatusEvent - */ -class StatusEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the event. - * - * Generated from protobuf field string type = 3; - */ - protected $type = ''; - /** - * Description of the event. - * - * Generated from protobuf field string description = 1; - */ - protected $description = ''; - /** - * The time this event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; - */ - protected $event_time = null; - /** - * Task Execution. - * This field is only defined for task-level status events where the task - * fails. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; - */ - protected $task_execution = null; - /** - * Task State. - * This field is only defined for task-level status events. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; - */ - protected $task_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Type of the event. - * @type string $description - * Description of the event. - * @type \Google\Protobuf\Timestamp $event_time - * The time this event occurred. - * @type \Google\Cloud\Batch\V1\TaskExecution $task_execution - * Task Execution. - * This field is only defined for task-level status events where the task - * fails. - * @type int $task_state - * Task State. - * This field is only defined for task-level status events. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Type of the event. - * - * Generated from protobuf field string type = 3; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the event. - * - * Generated from protobuf field string type = 3; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Description of the event. - * - * Generated from protobuf field string description = 1; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the event. - * - * Generated from protobuf field string description = 1; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The time this event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * The time this event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * Task Execution. - * This field is only defined for task-level status events where the task - * fails. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; - * @return \Google\Cloud\Batch\V1\TaskExecution|null - */ - public function getTaskExecution() - { - return $this->task_execution; - } - - public function hasTaskExecution() - { - return isset($this->task_execution); - } - - public function clearTaskExecution() - { - unset($this->task_execution); - } - - /** - * Task Execution. - * This field is only defined for task-level status events where the task - * fails. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; - * @param \Google\Cloud\Batch\V1\TaskExecution $var - * @return $this - */ - public function setTaskExecution($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskExecution::class); - $this->task_execution = $var; - - return $this; - } - - /** - * Task State. - * This field is only defined for task-level status events. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; - * @return int - */ - public function getTaskState() - { - return $this->task_state; - } - - /** - * Task State. - * This field is only defined for task-level status events. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; - * @param int $var - * @return $this - */ - public function setTaskState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); - $this->task_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php deleted file mode 100644 index c034a667462e..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.batch.v1.Task - */ -class Task extends \Google\Protobuf\Internal\Message -{ - /** - * Task name. - * The name is generated from the parent TaskGroup name and 'id' field. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Task Status. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Task name. - * The name is generated from the parent TaskGroup name and 'id' field. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - * @type \Google\Cloud\Batch\V1\TaskStatus $status - * Task Status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Task name. - * The name is generated from the parent TaskGroup name and 'id' field. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Task name. - * The name is generated from the parent TaskGroup name and 'id' field. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - * - * 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; - } - - /** - * Task Status. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; - * @return \Google\Cloud\Batch\V1\TaskStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Task Status. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; - * @param \Google\Cloud\Batch\V1\TaskStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskStatus::class); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php deleted file mode 100644 index 3a06c25ccab4..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.batch.v1.TaskExecution - */ -class TaskExecution extends \Google\Protobuf\Internal\Message -{ - /** - * The exit code of a finished task. - * If the task succeeded, the exit code will be 0. If the task failed but not - * due to the following reasons, the exit code will be 50000. - * Otherwise, it can be from different sources: - * * Batch known failures: - * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * * Batch runnable execution failures; you can rely on Batch logs to further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - * there are multiple runnables failures, Batch only exposes the first error. - * - * Generated from protobuf field int32 exit_code = 1; - */ - protected $exit_code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $exit_code - * The exit code of a finished task. - * If the task succeeded, the exit code will be 0. If the task failed but not - * due to the following reasons, the exit code will be 50000. - * Otherwise, it can be from different sources: - * * Batch known failures: - * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * * Batch runnable execution failures; you can rely on Batch logs to further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - * there are multiple runnables failures, Batch only exposes the first error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * The exit code of a finished task. - * If the task succeeded, the exit code will be 0. If the task failed but not - * due to the following reasons, the exit code will be 50000. - * Otherwise, it can be from different sources: - * * Batch known failures: - * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * * Batch runnable execution failures; you can rely on Batch logs to further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - * there are multiple runnables failures, Batch only exposes the first error. - * - * Generated from protobuf field int32 exit_code = 1; - * @return int - */ - public function getExitCode() - { - return $this->exit_code; - } - - /** - * The exit code of a finished task. - * If the task succeeded, the exit code will be 0. If the task failed but not - * due to the following reasons, the exit code will be 50000. - * Otherwise, it can be from different sources: - * * Batch known failures: - * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * * Batch runnable execution failures; you can rely on Batch logs to further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - * there are multiple runnables failures, Batch only exposes the first error. - * - * Generated from protobuf field int32 exit_code = 1; - * @param int $var - * @return $this - */ - public function setExitCode($var) - { - GPBUtil::checkInt32($var); - $this->exit_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php deleted file mode 100644 index 9a71f100436d..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php +++ /dev/null @@ -1,479 +0,0 @@ -google.cloud.batch.v1.TaskGroup - */ -class TaskGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. TaskGroup name. - * The system generates this field based on parent Job name. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Tasks in the group share the same task spec. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task_spec = null; - /** - * Number of Tasks in the TaskGroup. - * Default is 1. - * - * Generated from protobuf field int64 task_count = 4; - */ - protected $task_count = 0; - /** - * Max number of tasks that can run in parallel. - * Default to min(task_count, parallel tasks per job limit). - * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - * - * Generated from protobuf field int64 parallelism = 5; - */ - protected $parallelism = 0; - /** - * Scheduling policy for Tasks in the TaskGroup. - * The default value is AS_SOON_AS_POSSIBLE. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; - */ - protected $scheduling_policy = 0; - /** - * An array of environment variable mappings, which are passed to Tasks with - * matching indices. If task_environments is used then task_count should - * not be specified in the request (and will be ignored). Task count will be - * the length of task_environments. - * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - * addition to any environment variables set in task_environments, specifying - * the number of Tasks in the Task's parent TaskGroup, and the specific Task's - * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; - */ - private $task_environments; - /** - * Max number of tasks that can be run on a VM at the same time. - * If not specified, the system will decide a value based on available - * compute resources on a VM and task requirements. - * - * Generated from protobuf field int64 task_count_per_node = 10; - */ - protected $task_count_per_node = 0; - /** - * When true, Batch will populate a file with a list of all VMs assigned to - * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - * of that file. Defaults to false. The host file supports up to 1000 VMs. - * - * Generated from protobuf field bool require_hosts_file = 11; - */ - protected $require_hosts_file = false; - /** - * When true, Batch will configure SSH to allow passwordless login between - * VMs running the Batch tasks in the same TaskGroup. - * - * Generated from protobuf field bool permissive_ssh = 12; - */ - protected $permissive_ssh = false; - /** - * Optional. If not set or set to false, Batch uses the root user to execute - * runnables. If set to true, Batch runs the runnables using a non-root user. - * Currently, the non-root user Batch used is generated by OS Login. For more - * information, see [About OS - * Login](https://cloud.google.com/compute/docs/oslogin). - * - * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $run_as_non_root = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. TaskGroup name. - * The system generates this field based on parent Job name. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - * @type \Google\Cloud\Batch\V1\TaskSpec $task_spec - * Required. Tasks in the group share the same task spec. - * @type int|string $task_count - * Number of Tasks in the TaskGroup. - * Default is 1. - * @type int|string $parallelism - * Max number of tasks that can run in parallel. - * Default to min(task_count, parallel tasks per job limit). - * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - * @type int $scheduling_policy - * Scheduling policy for Tasks in the TaskGroup. - * The default value is AS_SOON_AS_POSSIBLE. - * @type array<\Google\Cloud\Batch\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $task_environments - * An array of environment variable mappings, which are passed to Tasks with - * matching indices. If task_environments is used then task_count should - * not be specified in the request (and will be ignored). Task count will be - * the length of task_environments. - * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - * addition to any environment variables set in task_environments, specifying - * the number of Tasks in the Task's parent TaskGroup, and the specific Task's - * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - * @type int|string $task_count_per_node - * Max number of tasks that can be run on a VM at the same time. - * If not specified, the system will decide a value based on available - * compute resources on a VM and task requirements. - * @type bool $require_hosts_file - * When true, Batch will populate a file with a list of all VMs assigned to - * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - * of that file. Defaults to false. The host file supports up to 1000 VMs. - * @type bool $permissive_ssh - * When true, Batch will configure SSH to allow passwordless login between - * VMs running the Batch tasks in the same TaskGroup. - * @type bool $run_as_non_root - * Optional. If not set or set to false, Batch uses the root user to execute - * runnables. If set to true, Batch runs the runnables using a non-root user. - * Currently, the non-root user Batch used is generated by OS Login. For more - * information, see [About OS - * Login](https://cloud.google.com/compute/docs/oslogin). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Output only. TaskGroup name. - * The system generates this field based on parent Job name. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. TaskGroup name. - * The system generates this field based on parent Job name. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Tasks in the group share the same task spec. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Batch\V1\TaskSpec|null - */ - public function getTaskSpec() - { - return $this->task_spec; - } - - public function hasTaskSpec() - { - return isset($this->task_spec); - } - - public function clearTaskSpec() - { - unset($this->task_spec); - } - - /** - * Required. Tasks in the group share the same task spec. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Batch\V1\TaskSpec $var - * @return $this - */ - public function setTaskSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskSpec::class); - $this->task_spec = $var; - - return $this; - } - - /** - * Number of Tasks in the TaskGroup. - * Default is 1. - * - * Generated from protobuf field int64 task_count = 4; - * @return int|string - */ - public function getTaskCount() - { - return $this->task_count; - } - - /** - * Number of Tasks in the TaskGroup. - * Default is 1. - * - * Generated from protobuf field int64 task_count = 4; - * @param int|string $var - * @return $this - */ - public function setTaskCount($var) - { - GPBUtil::checkInt64($var); - $this->task_count = $var; - - return $this; - } - - /** - * Max number of tasks that can run in parallel. - * Default to min(task_count, parallel tasks per job limit). - * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - * - * Generated from protobuf field int64 parallelism = 5; - * @return int|string - */ - public function getParallelism() - { - return $this->parallelism; - } - - /** - * Max number of tasks that can run in parallel. - * Default to min(task_count, parallel tasks per job limit). - * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - * - * Generated from protobuf field int64 parallelism = 5; - * @param int|string $var - * @return $this - */ - public function setParallelism($var) - { - GPBUtil::checkInt64($var); - $this->parallelism = $var; - - return $this; - } - - /** - * Scheduling policy for Tasks in the TaskGroup. - * The default value is AS_SOON_AS_POSSIBLE. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; - * @return int - */ - public function getSchedulingPolicy() - { - return $this->scheduling_policy; - } - - /** - * Scheduling policy for Tasks in the TaskGroup. - * The default value is AS_SOON_AS_POSSIBLE. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; - * @param int $var - * @return $this - */ - public function setSchedulingPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskGroup\SchedulingPolicy::class); - $this->scheduling_policy = $var; - - return $this; - } - - /** - * An array of environment variable mappings, which are passed to Tasks with - * matching indices. If task_environments is used then task_count should - * not be specified in the request (and will be ignored). Task count will be - * the length of task_environments. - * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - * addition to any environment variables set in task_environments, specifying - * the number of Tasks in the Task's parent TaskGroup, and the specific Task's - * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaskEnvironments() - { - return $this->task_environments; - } - - /** - * An array of environment variable mappings, which are passed to Tasks with - * matching indices. If task_environments is used then task_count should - * not be specified in the request (and will be ignored). Task count will be - * the length of task_environments. - * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - * addition to any environment variables set in task_environments, specifying - * the number of Tasks in the Task's parent TaskGroup, and the specific Task's - * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; - * @param array<\Google\Cloud\Batch\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaskEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Environment::class); - $this->task_environments = $arr; - - return $this; - } - - /** - * Max number of tasks that can be run on a VM at the same time. - * If not specified, the system will decide a value based on available - * compute resources on a VM and task requirements. - * - * Generated from protobuf field int64 task_count_per_node = 10; - * @return int|string - */ - public function getTaskCountPerNode() - { - return $this->task_count_per_node; - } - - /** - * Max number of tasks that can be run on a VM at the same time. - * If not specified, the system will decide a value based on available - * compute resources on a VM and task requirements. - * - * Generated from protobuf field int64 task_count_per_node = 10; - * @param int|string $var - * @return $this - */ - public function setTaskCountPerNode($var) - { - GPBUtil::checkInt64($var); - $this->task_count_per_node = $var; - - return $this; - } - - /** - * When true, Batch will populate a file with a list of all VMs assigned to - * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - * of that file. Defaults to false. The host file supports up to 1000 VMs. - * - * Generated from protobuf field bool require_hosts_file = 11; - * @return bool - */ - public function getRequireHostsFile() - { - return $this->require_hosts_file; - } - - /** - * When true, Batch will populate a file with a list of all VMs assigned to - * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - * of that file. Defaults to false. The host file supports up to 1000 VMs. - * - * Generated from protobuf field bool require_hosts_file = 11; - * @param bool $var - * @return $this - */ - public function setRequireHostsFile($var) - { - GPBUtil::checkBool($var); - $this->require_hosts_file = $var; - - return $this; - } - - /** - * When true, Batch will configure SSH to allow passwordless login between - * VMs running the Batch tasks in the same TaskGroup. - * - * Generated from protobuf field bool permissive_ssh = 12; - * @return bool - */ - public function getPermissiveSsh() - { - return $this->permissive_ssh; - } - - /** - * When true, Batch will configure SSH to allow passwordless login between - * VMs running the Batch tasks in the same TaskGroup. - * - * Generated from protobuf field bool permissive_ssh = 12; - * @param bool $var - * @return $this - */ - public function setPermissiveSsh($var) - { - GPBUtil::checkBool($var); - $this->permissive_ssh = $var; - - return $this; - } - - /** - * Optional. If not set or set to false, Batch uses the root user to execute - * runnables. If set to true, Batch runs the runnables using a non-root user. - * Currently, the non-root user Batch used is generated by OS Login. For more - * information, see [About OS - * Login](https://cloud.google.com/compute/docs/oslogin). - * - * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRunAsNonRoot() - { - return $this->run_as_non_root; - } - - /** - * Optional. If not set or set to false, Batch uses the root user to execute - * runnables. If set to true, Batch runs the runnables using a non-root user. - * Currently, the non-root user Batch used is generated by OS Login. For more - * information, see [About OS - * Login](https://cloud.google.com/compute/docs/oslogin). - * - * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRunAsNonRoot($var) - { - GPBUtil::checkBool($var); - $this->run_as_non_root = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php deleted file mode 100644 index df18ec4557bc..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.batch.v1.TaskGroup.SchedulingPolicy - */ -class SchedulingPolicy -{ - /** - * Unspecified. - * - * Generated from protobuf enum SCHEDULING_POLICY_UNSPECIFIED = 0; - */ - const SCHEDULING_POLICY_UNSPECIFIED = 0; - /** - * Run Tasks as soon as resources are available. - * Tasks might be executed in parallel depending on parallelism and - * task_count values. - * - * Generated from protobuf enum AS_SOON_AS_POSSIBLE = 1; - */ - const AS_SOON_AS_POSSIBLE = 1; - /** - * Run Tasks sequentially with increased task index. - * - * Generated from protobuf enum IN_ORDER = 2; - */ - const IN_ORDER = 2; - - private static $valueToName = [ - self::SCHEDULING_POLICY_UNSPECIFIED => 'SCHEDULING_POLICY_UNSPECIFIED', - self::AS_SOON_AS_POSSIBLE => 'AS_SOON_AS_POSSIBLE', - self::IN_ORDER => 'IN_ORDER', - ]; - - 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(SchedulingPolicy::class, \Google\Cloud\Batch\V1\TaskGroup_SchedulingPolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php deleted file mode 100644 index e690af593b2f..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php +++ /dev/null @@ -1,440 +0,0 @@ -google.cloud.batch.v1.TaskSpec - */ -class TaskSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The sequence of one or more runnables (executable scripts, - * executable containers, and/or barriers) for each task in this task group to - * run. Each task runs this list of runnables in order. For a task to succeed, - * all of its script and container runnables each must meet at least one of - * the following conditions: - * + The runnable exited with a zero status. - * + The runnable didn't finish, but you enabled its `background` subfield. - * + The runnable exited with a non-zero status, but you enabled its - * `ignore_exit_status` subfield. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; - */ - private $runnables; - /** - * ComputeResource requirements. - * - * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; - */ - protected $compute_resource = null; - /** - * Maximum duration the task should run before being automatically retried - * (if enabled) or automatically failed. Format the value of this field - * as a time limit in seconds followed by `s`—for example, `3600s` - * for 1 hour. The field accepts any value between 0 and the maximum listed - * for the `Duration` field type at - * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - * the actual maximum run time for a job will be limited to the maximum run - * time for a job listed at - * https://cloud.google.com/batch/quotas#max-job-duration. - * - * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; - */ - protected $max_run_duration = null; - /** - * Maximum number of retries on failures. - * The default, 0, which means never retry. - * The valid value range is [0, 10]. - * - * Generated from protobuf field int32 max_retry_count = 5; - */ - protected $max_retry_count = 0; - /** - * Lifecycle management schema when any task in a task group is failed. - * Currently we only support one lifecycle policy. - * When the lifecycle policy condition is met, - * the action in the policy will execute. - * If task execution result does not meet with the defined lifecycle - * policy, we consider it as the default policy. - * Default policy means if the exit code is 0, exit task. - * If task ends with non-zero exit code, retry the task with max_retry_count. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; - */ - private $lifecycle_policies; - /** - * Deprecated: please use environment(non-plural) instead. - * - * Generated from protobuf field map environments = 6 [deprecated = true]; - * @deprecated - */ - private $environments; - /** - * Volumes to mount before running Tasks using this TaskSpec. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; - */ - private $volumes; - /** - * Environment variables to set before running the Task. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; - */ - protected $environment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Batch\V1\Runnable>|\Google\Protobuf\Internal\RepeatedField $runnables - * Required. The sequence of one or more runnables (executable scripts, - * executable containers, and/or barriers) for each task in this task group to - * run. Each task runs this list of runnables in order. For a task to succeed, - * all of its script and container runnables each must meet at least one of - * the following conditions: - * + The runnable exited with a zero status. - * + The runnable didn't finish, but you enabled its `background` subfield. - * + The runnable exited with a non-zero status, but you enabled its - * `ignore_exit_status` subfield. - * @type \Google\Cloud\Batch\V1\ComputeResource $compute_resource - * ComputeResource requirements. - * @type \Google\Protobuf\Duration $max_run_duration - * Maximum duration the task should run before being automatically retried - * (if enabled) or automatically failed. Format the value of this field - * as a time limit in seconds followed by `s`—for example, `3600s` - * for 1 hour. The field accepts any value between 0 and the maximum listed - * for the `Duration` field type at - * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - * the actual maximum run time for a job will be limited to the maximum run - * time for a job listed at - * https://cloud.google.com/batch/quotas#max-job-duration. - * @type int $max_retry_count - * Maximum number of retries on failures. - * The default, 0, which means never retry. - * The valid value range is [0, 10]. - * @type array<\Google\Cloud\Batch\V1\LifecyclePolicy>|\Google\Protobuf\Internal\RepeatedField $lifecycle_policies - * Lifecycle management schema when any task in a task group is failed. - * Currently we only support one lifecycle policy. - * When the lifecycle policy condition is met, - * the action in the policy will execute. - * If task execution result does not meet with the defined lifecycle - * policy, we consider it as the default policy. - * Default policy means if the exit code is 0, exit task. - * If task ends with non-zero exit code, retry the task with max_retry_count. - * @type array|\Google\Protobuf\Internal\MapField $environments - * Deprecated: please use environment(non-plural) instead. - * @type array<\Google\Cloud\Batch\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * Volumes to mount before running Tasks using this TaskSpec. - * @type \Google\Cloud\Batch\V1\Environment $environment - * Environment variables to set before running the Task. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Required. The sequence of one or more runnables (executable scripts, - * executable containers, and/or barriers) for each task in this task group to - * run. Each task runs this list of runnables in order. For a task to succeed, - * all of its script and container runnables each must meet at least one of - * the following conditions: - * + The runnable exited with a zero status. - * + The runnable didn't finish, but you enabled its `background` subfield. - * + The runnable exited with a non-zero status, but you enabled its - * `ignore_exit_status` subfield. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRunnables() - { - return $this->runnables; - } - - /** - * Required. The sequence of one or more runnables (executable scripts, - * executable containers, and/or barriers) for each task in this task group to - * run. Each task runs this list of runnables in order. For a task to succeed, - * all of its script and container runnables each must meet at least one of - * the following conditions: - * + The runnable exited with a zero status. - * + The runnable didn't finish, but you enabled its `background` subfield. - * + The runnable exited with a non-zero status, but you enabled its - * `ignore_exit_status` subfield. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; - * @param array<\Google\Cloud\Batch\V1\Runnable>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRunnables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Runnable::class); - $this->runnables = $arr; - - return $this; - } - - /** - * ComputeResource requirements. - * - * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; - * @return \Google\Cloud\Batch\V1\ComputeResource|null - */ - public function getComputeResource() - { - return $this->compute_resource; - } - - public function hasComputeResource() - { - return isset($this->compute_resource); - } - - public function clearComputeResource() - { - unset($this->compute_resource); - } - - /** - * ComputeResource requirements. - * - * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; - * @param \Google\Cloud\Batch\V1\ComputeResource $var - * @return $this - */ - public function setComputeResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\ComputeResource::class); - $this->compute_resource = $var; - - return $this; - } - - /** - * Maximum duration the task should run before being automatically retried - * (if enabled) or automatically failed. Format the value of this field - * as a time limit in seconds followed by `s`—for example, `3600s` - * for 1 hour. The field accepts any value between 0 and the maximum listed - * for the `Duration` field type at - * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - * the actual maximum run time for a job will be limited to the maximum run - * time for a job listed at - * https://cloud.google.com/batch/quotas#max-job-duration. - * - * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxRunDuration() - { - return $this->max_run_duration; - } - - public function hasMaxRunDuration() - { - return isset($this->max_run_duration); - } - - public function clearMaxRunDuration() - { - unset($this->max_run_duration); - } - - /** - * Maximum duration the task should run before being automatically retried - * (if enabled) or automatically failed. Format the value of this field - * as a time limit in seconds followed by `s`—for example, `3600s` - * for 1 hour. The field accepts any value between 0 and the maximum listed - * for the `Duration` field type at - * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - * the actual maximum run time for a job will be limited to the maximum run - * time for a job listed at - * https://cloud.google.com/batch/quotas#max-job-duration. - * - * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxRunDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_run_duration = $var; - - return $this; - } - - /** - * Maximum number of retries on failures. - * The default, 0, which means never retry. - * The valid value range is [0, 10]. - * - * Generated from protobuf field int32 max_retry_count = 5; - * @return int - */ - public function getMaxRetryCount() - { - return $this->max_retry_count; - } - - /** - * Maximum number of retries on failures. - * The default, 0, which means never retry. - * The valid value range is [0, 10]. - * - * Generated from protobuf field int32 max_retry_count = 5; - * @param int $var - * @return $this - */ - public function setMaxRetryCount($var) - { - GPBUtil::checkInt32($var); - $this->max_retry_count = $var; - - return $this; - } - - /** - * Lifecycle management schema when any task in a task group is failed. - * Currently we only support one lifecycle policy. - * When the lifecycle policy condition is met, - * the action in the policy will execute. - * If task execution result does not meet with the defined lifecycle - * policy, we consider it as the default policy. - * Default policy means if the exit code is 0, exit task. - * If task ends with non-zero exit code, retry the task with max_retry_count. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLifecyclePolicies() - { - return $this->lifecycle_policies; - } - - /** - * Lifecycle management schema when any task in a task group is failed. - * Currently we only support one lifecycle policy. - * When the lifecycle policy condition is met, - * the action in the policy will execute. - * If task execution result does not meet with the defined lifecycle - * policy, we consider it as the default policy. - * Default policy means if the exit code is 0, exit task. - * If task ends with non-zero exit code, retry the task with max_retry_count. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; - * @param array<\Google\Cloud\Batch\V1\LifecyclePolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLifecyclePolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\LifecyclePolicy::class); - $this->lifecycle_policies = $arr; - - return $this; - } - - /** - * Deprecated: please use environment(non-plural) instead. - * - * Generated from protobuf field map environments = 6 [deprecated = true]; - * @return \Google\Protobuf\Internal\MapField - * @deprecated - */ - public function getEnvironments() - { - @trigger_error('environments is deprecated.', E_USER_DEPRECATED); - return $this->environments; - } - - /** - * Deprecated: please use environment(non-plural) instead. - * - * Generated from protobuf field map environments = 6 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - * @deprecated - */ - public function setEnvironments($var) - { - @trigger_error('environments is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environments = $arr; - - return $this; - } - - /** - * Volumes to mount before running Tasks using this TaskSpec. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * Volumes to mount before running Tasks using this TaskSpec. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; - * @param array<\Google\Cloud\Batch\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * Environment variables to set before running the Task. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; - * @return \Google\Cloud\Batch\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Environment variables to set before running the Task. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; - * @param \Google\Cloud\Batch\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment::class); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php deleted file mode 100644 index 8caeb3d3d49d..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.batch.v1.TaskStatus - */ -class TaskStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; - */ - protected $state = 0; - /** - * Detailed info about why the state is reached. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - */ - private $status_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Task state. - * @type array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $status_events - * Detailed info about why the state is reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Detailed info about why the state is reached. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatusEvents() - { - return $this->status_events; - } - - /** - * Detailed info about why the state is reached. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - * @param array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatusEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\StatusEvent::class); - $this->status_events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php deleted file mode 100644 index d74433bd3301..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.batch.v1.TaskStatus.State - */ -class State -{ - /** - * Unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Task is created and waiting for resources. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The Task is assigned to at least one VM. - * - * Generated from protobuf enum ASSIGNED = 2; - */ - const ASSIGNED = 2; - /** - * The Task is running. - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - /** - * The Task has failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * The Task has succeeded. - * - * Generated from protobuf enum SUCCEEDED = 5; - */ - const SUCCEEDED = 5; - /** - * The Task has not been executed when the Job finishes. - * - * Generated from protobuf enum UNEXECUTED = 6; - */ - const UNEXECUTED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::ASSIGNED => 'ASSIGNED', - self::RUNNING => 'RUNNING', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - self::UNEXECUTED => 'UNEXECUTED', - ]; - - 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\Batch\V1\TaskStatus_State::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php deleted file mode 100644 index c13f144d732c..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php +++ /dev/null @@ -1,268 +0,0 @@ -google.cloud.batch.v1.Volume - */ -class Volume extends \Google\Protobuf\Internal\Message -{ - /** - * The mount path for the volume, e.g. /mnt/disks/share. - * - * Generated from protobuf field string mount_path = 4; - */ - protected $mount_path = ''; - /** - * Mount options vary based on the type of storage volume: - * * For a Cloud Storage bucket, all the mount options provided - * by - * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - * are supported. - * * For an existing persistent disk, all mount options provided by the - * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - * except writing are supported. This is due to restrictions of - * [multi-writer - * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - * * For any other disk or a Network File System (NFS), all the - * mount options provided by the `mount` command are supported. - * - * Generated from protobuf field repeated string mount_options = 5; - */ - private $mount_options; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\NFS $nfs - * A Network File System (NFS) volume. For example, a - * Filestore file share. - * @type \Google\Cloud\Batch\V1\GCS $gcs - * A Google Cloud Storage (GCS) volume. - * @type string $device_name - * Device name of an attached disk volume, which should align with a - * device_name specified by - * job.allocation_policy.instances[0].policy.disks[i].device_name or - * defined by the given instance template in - * job.allocation_policy.instances[0].instance_template. - * @type string $mount_path - * The mount path for the volume, e.g. /mnt/disks/share. - * @type array|\Google\Protobuf\Internal\RepeatedField $mount_options - * Mount options vary based on the type of storage volume: - * * For a Cloud Storage bucket, all the mount options provided - * by - * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - * are supported. - * * For an existing persistent disk, all mount options provided by the - * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - * except writing are supported. This is due to restrictions of - * [multi-writer - * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - * * For any other disk or a Network File System (NFS), all the - * mount options provided by the `mount` command are supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * A Network File System (NFS) volume. For example, a - * Filestore file share. - * - * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1; - * @return \Google\Cloud\Batch\V1\NFS|null - */ - public function getNfs() - { - return $this->readOneof(1); - } - - public function hasNfs() - { - return $this->hasOneof(1); - } - - /** - * A Network File System (NFS) volume. For example, a - * Filestore file share. - * - * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1; - * @param \Google\Cloud\Batch\V1\NFS $var - * @return $this - */ - public function setNfs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\NFS::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A Google Cloud Storage (GCS) volume. - * - * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3; - * @return \Google\Cloud\Batch\V1\GCS|null - */ - public function getGcs() - { - return $this->readOneof(3); - } - - public function hasGcs() - { - return $this->hasOneof(3); - } - - /** - * A Google Cloud Storage (GCS) volume. - * - * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3; - * @param \Google\Cloud\Batch\V1\GCS $var - * @return $this - */ - public function setGcs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\GCS::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Device name of an attached disk volume, which should align with a - * device_name specified by - * job.allocation_policy.instances[0].policy.disks[i].device_name or - * defined by the given instance template in - * job.allocation_policy.instances[0].instance_template. - * - * Generated from protobuf field string device_name = 6; - * @return string - */ - public function getDeviceName() - { - return $this->readOneof(6); - } - - public function hasDeviceName() - { - return $this->hasOneof(6); - } - - /** - * Device name of an attached disk volume, which should align with a - * device_name specified by - * job.allocation_policy.instances[0].policy.disks[i].device_name or - * defined by the given instance template in - * job.allocation_policy.instances[0].instance_template. - * - * Generated from protobuf field string device_name = 6; - * @param string $var - * @return $this - */ - public function setDeviceName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The mount path for the volume, e.g. /mnt/disks/share. - * - * Generated from protobuf field string mount_path = 4; - * @return string - */ - public function getMountPath() - { - return $this->mount_path; - } - - /** - * The mount path for the volume, e.g. /mnt/disks/share. - * - * Generated from protobuf field string mount_path = 4; - * @param string $var - * @return $this - */ - public function setMountPath($var) - { - GPBUtil::checkString($var, True); - $this->mount_path = $var; - - return $this; - } - - /** - * Mount options vary based on the type of storage volume: - * * For a Cloud Storage bucket, all the mount options provided - * by - * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - * are supported. - * * For an existing persistent disk, all mount options provided by the - * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - * except writing are supported. This is due to restrictions of - * [multi-writer - * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - * * For any other disk or a Network File System (NFS), all the - * mount options provided by the `mount` command are supported. - * - * Generated from protobuf field repeated string mount_options = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMountOptions() - { - return $this->mount_options; - } - - /** - * Mount options vary based on the type of storage volume: - * * For a Cloud Storage bucket, all the mount options provided - * by - * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - * are supported. - * * For an existing persistent disk, all mount options provided by the - * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - * except writing are supported. This is due to restrictions of - * [multi-writer - * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - * * For any other disk or a Network File System (NFS), all the - * mount options provided by the `mount` command are supported. - * - * Generated from protobuf field repeated string mount_options = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMountOptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->mount_options = $arr; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php deleted file mode 100644 index 78181b5873de..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php +++ /dev/null @@ -1,81 +0,0 @@ -setTaskSpec($jobTaskGroupsTaskSpec); - $jobTaskGroups = [$taskGroup,]; - $job = (new Job()) - ->setTaskGroups($jobTaskGroups); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $batchServiceClient->createJob($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 = BatchServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_job_sample($formattedParent); -} -// [END batch_v1_generated_BatchService_CreateJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php deleted file mode 100644 index 2f18d5dabdf6..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php +++ /dev/null @@ -1,66 +0,0 @@ -deleteJob($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()); - } -} -// [END batch_v1_generated_BatchService_DeleteJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php deleted file mode 100644 index df59d0831359..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $batchServiceClient->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 = BatchServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - get_job_sample($formattedName); -} -// [END batch_v1_generated_BatchService_GetJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php deleted file mode 100644 index 7a7ba7f1f70b..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/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 batch_v1_generated_BatchService_GetLocation_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php deleted file mode 100644 index 757f3239fecb..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $batchServiceClient->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 = BatchServiceClient::taskName( - '[PROJECT]', - '[LOCATION]', - '[JOB]', - '[TASK_GROUP]', - '[TASK]' - ); - - get_task_sample($formattedName); -} -// [END batch_v1_generated_BatchService_GetTask_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php deleted file mode 100644 index 98fb7d71673e..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php +++ /dev/null @@ -1,62 +0,0 @@ -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()); - } -} -// [END batch_v1_generated_BatchService_ListJobs_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php deleted file mode 100644 index 044396d5d16e..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/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 batch_v1_generated_BatchService_ListLocations_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php deleted file mode 100644 index 68b45472d029..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $batchServiceClient->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 = BatchServiceClient::taskGroupName( - '[PROJECT]', - '[LOCATION]', - '[JOB]', - '[TASK_GROUP]' - ); - - list_tasks_sample($formattedParent); -} -// [END batch_v1_generated_BatchService_ListTasks_sync] diff --git a/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php b/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php deleted file mode 100644 index fd2211a52f22..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php +++ /dev/null @@ -1,558 +0,0 @@ - createJobAsync(CreateJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class BatchServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.batch.v1.BatchService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'batch.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'batch.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/batch_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/batch_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/batch_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/batch_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName(string $project, string $location, string $job): string - { - return self::getPathTemplate('job')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - ]); - } - - /** - * 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 $job - * @param string $taskGroup - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName(string $project, string $location, string $job, string $taskGroup, string $task): string - { - return self::getPathTemplate('task')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - 'task_group' => $taskGroup, - 'task' => $task, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task_group - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * @param string $taskGroup - * - * @return string The formatted task_group resource. - */ - public static function taskGroupName(string $project, string $location, string $job, string $taskGroup): string - { - return self::getPathTemplate('taskGroup')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - 'task_group' => $taskGroup, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - job: projects/{project}/locations/{location}/jobs/{job} - * - location: projects/{project}/locations/{location} - * - task: projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task} - * - taskGroup: projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group} - * - * 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 'batch.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 Job. - * - * The async variant is {@see BatchServiceClient::createJobAsync()} . - * - * @example samples/V1/BatchServiceClient/create_job.php - * - * @param CreateJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createJob(CreateJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); - } - - /** - * Delete a Job. - * - * The async variant is {@see BatchServiceClient::deleteJobAsync()} . - * - * @example samples/V1/BatchServiceClient/delete_job.php - * - * @param DeleteJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteJob(DeleteJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); - } - - /** - * Get a Job specified by its resource name. - * - * The async variant is {@see BatchServiceClient::getJobAsync()} . - * - * @example samples/V1/BatchServiceClient/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(); - } - - /** - * Return a single Task. - * - * The async variant is {@see BatchServiceClient::getTaskAsync()} . - * - * @example samples/V1/BatchServiceClient/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(); - } - - /** - * List all Jobs for a project within a region. - * - * The async variant is {@see BatchServiceClient::listJobsAsync()} . - * - * @example samples/V1/BatchServiceClient/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); - } - - /** - * List Tasks associated with a job. - * - * The async variant is {@see BatchServiceClient::listTasksAsync()} . - * - * @example samples/V1/BatchServiceClient/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); - } - - /** - * Gets information about a location. - * - * The async variant is {@see BatchServiceClient::getLocationAsync()} . - * - * @example samples/V1/BatchServiceClient/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 BatchServiceClient::listLocationsAsync()} . - * - * @example samples/V1/BatchServiceClient/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/Batch/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json deleted file mode 100644 index eae7f15d2f08..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.batch.v1", - "libraryPackage": "Google\\Cloud\\Batch\\V1", - "services": { - "BatchService": { - "clients": { - "grpc": { - "libraryClient": "BatchServiceGapicClient", - "rpcs": { - "CreateJob": { - "methods": [ - "createJob" - ] - }, - "DeleteJob": { - "methods": [ - "deleteJob" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "GetTask": { - "methods": [ - "getTask" - ] - }, - "ListJobs": { - "methods": [ - "listJobs" - ] - }, - "ListTasks": { - "methods": [ - "listTasks" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json deleted file mode 100644 index 4fae7bea9f19..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "google.cloud.batch.v1.BatchService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 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": { - "CreateJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetJob": { - "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" - }, - "ListJobs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTasks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_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/Batch/v1/src/V1/resources/batch_service_descriptor_config.php b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php deleted file mode 100644 index 8618662401e1..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php +++ /dev/null @@ -1,163 +0,0 @@ - [ - 'google.cloud.batch.v1.BatchService' => [ - 'DeleteJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Batch\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Batch\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Batch\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Batch\V1\Task', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Batch\V1\ListJobsResponse', - '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\Batch\V1\ListTasksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - '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' => [ - 'job' => 'projects/{project}/locations/{location}/jobs/{job}', - 'location' => 'projects/{project}/locations/{location}', - 'task' => 'projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}', - 'taskGroup' => 'projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php deleted file mode 100644 index 53dc86dfd5dc..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php +++ /dev/null @@ -1,167 +0,0 @@ - [ - 'google.cloud.batch.v1.BatchService' => [ - 'CreateJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', - 'body' => 'job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - '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.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/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php b/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php deleted file mode 100644 index 524f1fafb188..000000000000 --- a/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php +++ /dev/null @@ -1,701 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BatchServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BatchServiceClient($options); - } - - /** @test */ - public function createJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $priority = 1165461084; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPriority($priority); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $jobTaskGroups = []; - $job->setTaskGroups($jobTaskGroups); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - $response = $gapicClient->createJob($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.batch.v1.BatchService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $job = new Job(); - $jobTaskGroups = []; - $job->setTaskGroups($jobTaskGroups); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - try { - $gapicClient->createJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTest() - { - $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/deleteJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new DeleteJobRequest(); - $response = $gapicClient->deleteJob($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.batch.v1.BatchService/DeleteJob', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteJobTest'); - $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 deleteJobExceptionTest() - { - $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/deleteJobTest'); - $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); - $request = new DeleteJobRequest(); - $response = $gapicClient->deleteJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteJobTest'); - 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 getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $priority = 1165461084; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setPriority($priority); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[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.batch.v1.BatchService/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]', '[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 getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]', '[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.batch.v1.BatchService/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]', '[JOB]', '[TASK_GROUP]', '[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 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); - $request = new ListJobsRequest(); - $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.batch.v1.BatchService/ListJobs', $actualFuncCall); - $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); - $request = new ListJobsRequest(); - 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 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->taskGroupName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]'); - $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.batch.v1.BatchService/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->taskGroupName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]'); - $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 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 createJobAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $priority = 1165461084; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPriority($priority); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $jobTaskGroups = []; - $job->setTaskGroups($jobTaskGroups); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - $response = $gapicClient->createJobAsync($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.batch.v1.BatchService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnections/V1/AppConnectionsService.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnections/V1/AppConnectionsService.php deleted file mode 100644 index 2f156c3df8dcfccafbb66474247118a245702fe9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6753 zcmb_h&2QVt6|W@QvB!zm8OMpDcDJk&Z0t0qV0VEonDuU{k7$iLwrb01Qm7y(YAmy% zNtUGSs)m4~m!bs<6zHjk-ipPd|3UwSTng;oa>`-RL;isld+M7ReoAyA*~ul=aOTbX z_`Tn}H}lD7_K}V52z6o-NA*ZYX!iy0hzPc0d6s4wLc4c(NE|`4j&0o_jwlG#U14Xp zDb%W4%^$#0*XlVMk%X>gbq!L|46D~EwMpMHJDTO#CDpby%QT7R>6Yo1PS)v&5*t!n z;+*Ij5!s#ynd&idZB-*ey-|KlJhh{GYOBt~w<=V8s~n1N$qDhTC+iOp(hSvg1^7~l zHs0r(pfe=EKfBj9bWLzQ)r0@;>aL=jx~Hp#{#)?Drf{elE&)lSa}RqavqYc^c1?|} ztO{HvoqN}|z-OC6pl*Y@5nR~XGCks$s?n+vS95gRvz!J@m8355Lg&+wl~sRRDo#HX zR=AFmG@|6D;5j`K-(3(K;`JQ!A=8@*7=(YdQk*Hk%;paRt%k( z-ehYY>BQ)i$&q@ZTh3%l_lOU)v6bAm%&yZjP2KFac5Mpp$&3tR$FzQ|y3fbgI9%J* z0nDCyY^Sefcv<^Y_t7DDIw2SyLAtGk;iJL4hh9BE^>>tKc$EthS;C4@!ivd+6;IX+ zxBNX-TZjCnVduG8_ITq3 zekvMVMzfaFA&%1S=cmKr;@>l7V-^)E zu%AZ~3I^gYAGiWq&dHtefHGlRK&exndzAV>`{Br>kasDU)n@7TZ?@J9@! z#&ZKPd{Yg>I#rH!*9FFAN#Gm*7cjm`404X~mjv2SKp5CL07mqsw)i@|%%JblBgr^P zM#O!0`1~9##_(r35j;gkQY+}gaX89yk`zUaNTsL7~?7Q5Mx}Fmd0UCL1CK1QS!4@G`?f3dWL2U zwM`&kQ|!d3P7tt!A>uX@Q!_oM&-3Osy4ulQ+fe%oI{~8e3@@Tw4_I#obYv`>!wod$ z^=*>B0z(TMn-|ui2|_rnS?C5p6Uuv5@F~RX*cKF6`B~Yqw(gB*hAB_dMA0rjQjM$TklgTRAvr8L07u)<5cbE=b1r2xvtqXm$f7I0H2l;LC?(Q`joM|k6QjUV@Hl!@O64#h4bBQE zEM0}EL@A7MTMo-;9#EhJzTy~sz=-ohboY(K>046VKvQ&cd;={upEYXA!Oni8R@r*A zRjV$3hmO`O4P~!Z-`d@gx0T0R^~FqK4b8{$0nek{bJFKE5Wa?{;ehY)#GaF~A7_d` zeB&0^&|DL?XzcAieYTh>DrlMk0WYKL`%SqytkG38TiL70&8;2K1h&4yeu1)C44)1f zRsJbQe^qPSH8yby&!Va7?$37?r={L&*%`k=!*wVueg%EKTRQXq8k7u+ryYz1e-3EF zAM3Lth0|0jd+Xg`1_A@9-Ue#ugpBv;d<@Y0}Ic`5rn)$hOl z=C9e0@CLo~Ipb~CW{8>lF|6Dl#t8m81L-x?S>W;nWHP)sF!I8kQBi&=vyLWV6+Ph2 zv1u6g_XqeNS+tbW)8I)wpRzu%?ft+%v7TBCbE)`6=7n4uE<@gucrWGFJs!CS$*djv z3B@V%OSO1`XiGzl7XAYKl+x}@2G_`eynoZ30ydXNSe z?>*S%P~r2-3-USfr%6uy1WS{1q6Bpg?KcaLU&y!5EnvQq#UszNU8z($Jw5de2(PZx zo_EBr=+~e=_YN)RxcsLnvvVsK5(DvO{#mC+jbQxh?;_z<)5Hvs?7VAgVOn z7Cafe&aQFUlEj2dQY2lHlJg}A=F8UDy>~4<@Ww8Zpo>Vgoogle.cloud.beyondcorp.appconnections.v1.AppConnection - */ -class AppConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique resource name of the AppConnection. - * The name is ignored when creating a AppConnection. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Timestamp when the resource was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. An arbitrary user-provided name for the AppConnection. Cannot - * exceed 64 characters. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. A unique identifier for the instance generated by the - * system. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The type of network connectivity used by the AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. Address of the remote application endpoint for the BeyondCorp - * AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint application_endpoint = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $application_endpoint = null; - /** - * Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are - * authorised to be associated with this AppConnection. - * - * Generated from protobuf field repeated string connectors = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $connectors; - /** - * Output only. The current state of the AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. Gateway used by the AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway gateway = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gateway = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Unique resource name of the AppConnection. - * The name is ignored when creating a AppConnection. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp when the resource was last modified. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Resource labels to represent user provided metadata. - * @type string $display_name - * Optional. An arbitrary user-provided name for the AppConnection. Cannot - * exceed 64 characters. - * @type string $uid - * Output only. A unique identifier for the instance generated by the - * system. - * @type int $type - * Required. The type of network connectivity used by the AppConnection. - * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\ApplicationEndpoint $application_endpoint - * Required. Address of the remote application endpoint for the BeyondCorp - * AppConnection. - * @type array|\Google\Protobuf\Internal\RepeatedField $connectors - * Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are - * authorised to be associated with this AppConnection. - * @type int $state - * Output only. The current state of the AppConnection. - * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway $gateway - * Optional. Gateway used by the AppConnection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique resource name of the AppConnection. - * The name is ignored when creating a AppConnection. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Unique resource name of the AppConnection. - * The name is ignored when creating a AppConnection. - * - * 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; - } - - /** - * Output only. Timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was last modified. - * - * 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. Timestamp when the resource was last modified. - * - * 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; - } - - /** - * Optional. Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 4 [(.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. An arbitrary user-provided name for the AppConnection. Cannot - * exceed 64 characters. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. An arbitrary user-provided name for the AppConnection. Cannot - * exceed 64 characters. - * - * Generated from protobuf field string display_name = 5 [(.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. A unique identifier for the instance generated by the - * system. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A unique identifier for the instance generated by the - * system. - * - * Generated from protobuf field string uid = 6 [(.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 type of network connectivity used by the AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of network connectivity used by the AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. Address of the remote application endpoint for the BeyondCorp - * AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint application_endpoint = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\ApplicationEndpoint|null - */ - public function getApplicationEndpoint() - { - return $this->application_endpoint; - } - - public function hasApplicationEndpoint() - { - return isset($this->application_endpoint); - } - - public function clearApplicationEndpoint() - { - unset($this->application_endpoint); - } - - /** - * Required. Address of the remote application endpoint for the BeyondCorp - * AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint application_endpoint = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\ApplicationEndpoint $var - * @return $this - */ - public function setApplicationEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\ApplicationEndpoint::class); - $this->application_endpoint = $var; - - return $this; - } - - /** - * Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are - * authorised to be associated with this AppConnection. - * - * Generated from protobuf field repeated string connectors = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnectors() - { - return $this->connectors; - } - - /** - * Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are - * authorised to be associated with this AppConnection. - * - * Generated from protobuf field repeated string connectors = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnectors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->connectors = $arr; - - return $this; - } - - /** - * Output only. The current state of the AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Gateway used by the AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway gateway = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway|null - */ - public function getGateway() - { - return $this->gateway; - } - - public function hasGateway() - { - return isset($this->gateway); - } - - public function clearGateway() - { - unset($this->gateway); - } - - /** - * Optional. Gateway used by the AppConnection. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway gateway = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway $var - * @return $this - */ - public function setGateway($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway::class); - $this->gateway = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/ApplicationEndpoint.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/ApplicationEndpoint.php deleted file mode 100644 index cc68ac49a44e..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/ApplicationEndpoint.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint - */ -class ApplicationEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Hostname or IP address of the remote application endpoint. - * - * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $host = ''; - /** - * Required. Port of the remote application endpoint. - * - * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $port = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $host - * Required. Hostname or IP address of the remote application endpoint. - * @type int $port - * Required. Port of the remote application endpoint. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Hostname or IP address of the remote application endpoint. - * - * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Required. Hostname or IP address of the remote application endpoint. - * - * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - - /** - * Required. Port of the remote application endpoint. - * - * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Required. Port of the remote application endpoint. - * - * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ApplicationEndpoint::class, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection_ApplicationEndpoint::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway.php deleted file mode 100644 index 6af8ac8c19f7..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway - */ -class Gateway extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of hosting used by the gateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Output only. Server-defined URI for this resource. - * - * Generated from protobuf field string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri = ''; - /** - * Output only. Ingress port reserved on the gateways for this - * AppConnection, if not specified or zero, the default port is 19443. - * - * Generated from protobuf field int32 ingress_port = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ingress_port = 0; - /** - * Required. AppGateway name in following format: - * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` - * - * Generated from protobuf field string app_gateway = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $app_gateway = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. The type of hosting used by the gateway. - * @type string $uri - * Output only. Server-defined URI for this resource. - * @type int $ingress_port - * Output only. Ingress port reserved on the gateways for this - * AppConnection, if not specified or zero, the default port is 19443. - * @type string $app_gateway - * Required. AppGateway name in following format: - * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of hosting used by the gateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of hosting used by the gateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. Server-defined URI for this resource. - * - * Generated from protobuf field string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Output only. Server-defined URI for this resource. - * - * Generated from protobuf field string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Output only. Ingress port reserved on the gateways for this - * AppConnection, if not specified or zero, the default port is 19443. - * - * Generated from protobuf field int32 ingress_port = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getIngressPort() - { - return $this->ingress_port; - } - - /** - * Output only. Ingress port reserved on the gateways for this - * AppConnection, if not specified or zero, the default port is 19443. - * - * Generated from protobuf field int32 ingress_port = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setIngressPort($var) - { - GPBUtil::checkInt32($var); - $this->ingress_port = $var; - - return $this; - } - - /** - * Required. AppGateway name in following format: - * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` - * - * Generated from protobuf field string app_gateway = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAppGateway() - { - return $this->app_gateway; - } - - /** - * Required. AppGateway name in following format: - * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` - * - * Generated from protobuf field string app_gateway = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAppGateway($var) - { - GPBUtil::checkString($var, True); - $this->app_gateway = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Gateway::class, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection_Gateway::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway/Type.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway/Type.php deleted file mode 100644 index 9f600d8afa1b..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Gateway/Type.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type - */ -class Type -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Gateway hosted in a GCP regional managed instance group. - * - * Generated from protobuf enum GCP_REGIONAL_MIG = 1; - */ - const GCP_REGIONAL_MIG = 1; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::GCP_REGIONAL_MIG => 'GCP_REGIONAL_MIG', - ]; - - 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\BeyondCorp\AppConnections\V1\AppConnection_Gateway_Type::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/State.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/State.php deleted file mode 100644 index 28c1781608b2..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.AppConnection.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * AppConnection is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * AppConnection has been created. - * - * Generated from protobuf enum CREATED = 2; - */ - const CREATED = 2; - /** - * AppConnection's configuration is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * AppConnection is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * AppConnection is down and may be restored in the future. - * This happens when CCFE sends ProjectState = OFF. - * - * Generated from protobuf enum DOWN = 5; - */ - const DOWN = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::CREATED => 'CREATED', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::DOWN => 'DOWN', - ]; - - 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\BeyondCorp\AppConnections\V1\AppConnection_State::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Type.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Type.php deleted file mode 100644 index d3a6ffd1e4e5..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnection/Type.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.AppConnection.Type - */ -class Type -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * TCP Proxy based BeyondCorp AppConnection. API will default to this if - * unset. - * - * Generated from protobuf enum TCP_PROXY = 1; - */ - const TCP_PROXY = 1; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::TCP_PROXY => 'TCP_PROXY', - ]; - - 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\BeyondCorp\AppConnections\V1\AppConnection_Type::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnectionOperationMetadata.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnectionOperationMetadata.php deleted file mode 100644 index e2ee3aedca33..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/AppConnectionOperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.AppConnectionOperationMetadata - */ -class AppConnectionOperationMetadata 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\Beyondcorp\Appconnections\V1\AppConnectionsService::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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/CreateAppConnectionRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/CreateAppConnectionRequest.php deleted file mode 100644 index ef54860b1978..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/CreateAppConnectionRequest.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest - */ -class CreateAppConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource project name of the AppConnection location using the - * form: `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. User-settable AppConnection resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string app_connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $app_connection_id = ''; - /** - * Required. A BeyondCorp AppConnection resource. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_connection = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource project name of the AppConnection location using the - * form: `projects/{project_id}/locations/{location_id}` - * Please see {@see AppConnectionsServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $appConnection Required. A BeyondCorp AppConnection resource. - * @param string $appConnectionId Optional. User-settable AppConnection resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\CreateAppConnectionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $appConnection, string $appConnectionId): self - { - return (new self()) - ->setParent($parent) - ->setAppConnection($appConnection) - ->setAppConnectionId($appConnectionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource project name of the AppConnection location using the - * form: `projects/{project_id}/locations/{location_id}` - * @type string $app_connection_id - * Optional. User-settable AppConnection resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $app_connection - * Required. A BeyondCorp AppConnection resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource project name of the AppConnection location using the - * form: `projects/{project_id}/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 project name of the AppConnection location using the - * form: `projects/{project_id}/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. User-settable AppConnection resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string app_connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAppConnectionId() - { - return $this->app_connection_id; - } - - /** - * Optional. User-settable AppConnection resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string app_connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAppConnectionId($var) - { - GPBUtil::checkString($var, True); - $this->app_connection_id = $var; - - return $this; - } - - /** - * Required. A BeyondCorp AppConnection resource. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection|null - */ - public function getAppConnection() - { - return $this->app_connection; - } - - public function hasAppConnection() - { - return isset($this->app_connection); - } - - public function clearAppConnection() - { - unset($this->app_connection); - } - - /** - * Required. A BeyondCorp AppConnection resource. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $var - * @return $this - */ - public function setAppConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection::class); - $this->app_connection = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/DeleteAppConnectionRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/DeleteAppConnectionRequest.php deleted file mode 100644 index 33d06fe0c0a5..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/DeleteAppConnectionRequest.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest - */ -class DeleteAppConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $name Required. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - * Please see {@see AppConnectionsServiceClient::appConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\DeleteAppConnectionRequest - * - * @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. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_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. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * 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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/GetAppConnectionRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/GetAppConnectionRequest.php deleted file mode 100644 index cbda1a28657b..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/GetAppConnectionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest - */ -class GetAppConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. BeyondCorp AppConnection name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. BeyondCorp AppConnection name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - * Please see {@see AppConnectionsServiceClient::appConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\GetAppConnectionRequest - * - * @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. BeyondCorp AppConnection name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. BeyondCorp AppConnection name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_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. BeyondCorp AppConnection name using the form: - * `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsRequest.php deleted file mode 100644 index f2beaa7375a7..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsRequest.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest - */ -class ListAppConnectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the AppConnection location using the form: - * `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to - * determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous - * ListAppConnectionsRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter specifying constraints of a list operation. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * 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 AppConnection location using the form: - * `projects/{project_id}/locations/{location_id}` - * Please see {@see AppConnectionsServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\ListAppConnectionsRequest - * - * @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 AppConnection location using the form: - * `projects/{project_id}/locations/{location_id}` - * @type int $page_size - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to - * determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The next_page_token value returned from a previous - * ListAppConnectionsRequest, if any. - * @type string $filter - * Optional. A filter specifying constraints of a list operation. - * @type string $order_by - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the AppConnection location using the form: - * `projects/{project_id}/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 AppConnection location using the form: - * `projects/{project_id}/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. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to - * determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to - * determine if there are more instances left to be queried. - * - * 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. The next_page_token value returned from a previous - * ListAppConnectionsRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous - * ListAppConnectionsRequest, if any. - * - * 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. A filter specifying constraints of a list operation. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter specifying constraints of a list operation. - * - * 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. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * 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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsResponse.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsResponse.php deleted file mode 100644 index 31f3294ce77d..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ListAppConnectionsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse - */ -class ListAppConnectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of BeyondCorp AppConnections in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connections = 1; - */ - private $app_connections; - /** - * A 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 = ''; - /** - * A list of 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\BeyondCorp\AppConnections\V1\AppConnection>|\Google\Protobuf\Internal\RepeatedField $app_connections - * A list of BeyondCorp AppConnections in the project. - * @type string $next_page_token - * A 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 - * A list of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * A list of BeyondCorp AppConnections in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connections = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAppConnections() - { - return $this->app_connections; - } - - /** - * A list of BeyondCorp AppConnections in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connections = 1; - * @param array<\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAppConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection::class); - $this->app_connections = $arr; - - return $this; - } - - /** - * A 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; - } - - /** - * A 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; - } - - /** - * A list of 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; - } - - /** - * A list of 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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsRequest.php deleted file mode 100644 index d35e11b22f80..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest - */ -class ResolveAppConnectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the AppConnection location using the form: - * `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. BeyondCorp Connector name of the connector associated with those - * AppConnections using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * - * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $app_connector_id = ''; - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous - * ResolveAppConnectionsResponse, if any. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the AppConnection location using the form: - * `projects/{project_id}/locations/{location_id}` - * Please see {@see AppConnectionsServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsRequest - * - * @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 AppConnection location using the form: - * `projects/{project_id}/locations/{location_id}` - * @type string $app_connector_id - * Required. BeyondCorp Connector name of the connector associated with those - * AppConnections using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * @type int $page_size - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The next_page_token value returned from a previous - * ResolveAppConnectionsResponse, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the AppConnection location using the form: - * `projects/{project_id}/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 AppConnection location using the form: - * `projects/{project_id}/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. BeyondCorp Connector name of the connector associated with those - * AppConnections using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * - * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAppConnectorId() - { - return $this->app_connector_id; - } - - /** - * Required. BeyondCorp Connector name of the connector associated with those - * AppConnections using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * - * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAppConnectorId($var) - { - GPBUtil::checkString($var, True); - $this->app_connector_id = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * 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. The next_page_token value returned from a previous - * ResolveAppConnectionsResponse, if any. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous - * ResolveAppConnectionsResponse, if any. - * - * 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; - } - -} - diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse.php deleted file mode 100644 index 9c3bf3d32526..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse - */ -class ResolveAppConnectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of BeyondCorp AppConnections with details in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails app_connection_details = 1; - */ - private $app_connection_details; - /** - * A 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 = ''; - /** - * A list of 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\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse\AppConnectionDetails>|\Google\Protobuf\Internal\RepeatedField $app_connection_details - * A list of BeyondCorp AppConnections with details in the project. - * @type string $next_page_token - * A 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 - * A list of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * A list of BeyondCorp AppConnections with details in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails app_connection_details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAppConnectionDetails() - { - return $this->app_connection_details; - } - - /** - * A list of BeyondCorp AppConnections with details in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails app_connection_details = 1; - * @param array<\Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse\AppConnectionDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAppConnectionDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse\AppConnectionDetails::class); - $this->app_connection_details = $arr; - - return $this; - } - - /** - * A 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; - } - - /** - * A 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; - } - - /** - * A list of 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; - } - - /** - * A list of 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/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse/AppConnectionDetails.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse/AppConnectionDetails.php deleted file mode 100644 index 9ca817de9125..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/ResolveAppConnectionsResponse/AppConnectionDetails.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails - */ -class AppConnectionDetails extends \Google\Protobuf\Internal\Message -{ - /** - * A BeyondCorp AppConnection in the project. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 1; - */ - protected $app_connection = null; - /** - * If type=GCP_REGIONAL_MIG, contains most recent VM instances, like - * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. - * - * Generated from protobuf field repeated string recent_mig_vms = 2; - */ - private $recent_mig_vms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $app_connection - * A BeyondCorp AppConnection in the project. - * @type array|\Google\Protobuf\Internal\RepeatedField $recent_mig_vms - * If type=GCP_REGIONAL_MIG, contains most recent VM instances, like - * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * A BeyondCorp AppConnection in the project. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 1; - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection|null - */ - public function getAppConnection() - { - return $this->app_connection; - } - - public function hasAppConnection() - { - return isset($this->app_connection); - } - - public function clearAppConnection() - { - unset($this->app_connection); - } - - /** - * A BeyondCorp AppConnection in the project. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 1; - * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $var - * @return $this - */ - public function setAppConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection::class); - $this->app_connection = $var; - - return $this; - } - - /** - * If type=GCP_REGIONAL_MIG, contains most recent VM instances, like - * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. - * - * Generated from protobuf field repeated string recent_mig_vms = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRecentMigVms() - { - return $this->recent_mig_vms; - } - - /** - * If type=GCP_REGIONAL_MIG, contains most recent VM instances, like - * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. - * - * Generated from protobuf field repeated string recent_mig_vms = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRecentMigVms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->recent_mig_vms = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AppConnectionDetails::class, \Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse_AppConnectionDetails::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/UpdateAppConnectionRequest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/UpdateAppConnectionRequest.php deleted file mode 100644 index 84b98cfce15c..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/proto/src/Google/Cloud/BeyondCorp/AppConnections/V1/UpdateAppConnectionRequest.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest - */ -class UpdateAppConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnection]: - * * `labels` - * * `display_name` - * * `application_endpoint` - * * `connectors` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. AppConnection message with updated fields. Only supported fields - * specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_connection = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - /** - * Optional. If set as true, will create the resource if it is not found. - * - * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - - /** - * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $appConnection Required. AppConnection message with updated fields. Only supported fields - * specified in update_mask are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnection]: - * * `labels` - * * `display_name` - * * `application_endpoint` - * * `connectors` - * - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\UpdateAppConnectionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $appConnection, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAppConnection($appConnection) - ->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. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnection]: - * * `labels` - * * `display_name` - * * `application_endpoint` - * * `connectors` - * @type \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $app_connection - * Required. AppConnection message with updated fields. Only supported fields - * specified in update_mask are updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * @type bool $allow_missing - * Optional. If set as true, will create the resource if it is not found. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnection]: - * * `labels` - * * `display_name` - * * `application_endpoint` - * * `connectors` - * - * 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. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnection]: - * * `labels` - * * `display_name` - * * `application_endpoint` - * * `connectors` - * - * 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. AppConnection message with updated fields. Only supported fields - * specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection|null - */ - public function getAppConnection() - { - return $this->app_connection; - } - - public function hasAppConnection() - { - return isset($this->app_connection); - } - - public function clearAppConnection() - { - unset($this->app_connection); - } - - /** - * Required. AppConnection message with updated fields. Only supported fields - * specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnections.v1.AppConnection app_connection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection $var - * @return $this - */ - public function setAppConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection::class); - $this->app_connection = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * 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; - } - - /** - * Optional. If set as true, will create the resource if it is not found. - * - * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. If set as true, will create the resource if it is not found. - * - * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/create_app_connection.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/create_app_connection.php deleted file mode 100644 index 84acfb20a8fb..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/create_app_connection.php +++ /dev/null @@ -1,114 +0,0 @@ -setHost($appConnectionApplicationEndpointHost) - ->setPort($appConnectionApplicationEndpointPort); - $appConnection = (new AppConnection()) - ->setName($appConnectionName) - ->setType($appConnectionType) - ->setApplicationEndpoint($appConnectionApplicationEndpoint); - $request = (new CreateAppConnectionRequest()) - ->setParent($formattedParent) - ->setAppConnection($appConnection); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appConnectionsServiceClient->createAppConnection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AppConnection $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 = AppConnectionsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $appConnectionName = '[NAME]'; - $appConnectionType = Type::TYPE_UNSPECIFIED; - $appConnectionApplicationEndpointHost = '[HOST]'; - $appConnectionApplicationEndpointPort = 0; - - create_app_connection_sample( - $formattedParent, - $appConnectionName, - $appConnectionType, - $appConnectionApplicationEndpointHost, - $appConnectionApplicationEndpointPort - ); -} -// [END beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/delete_app_connection.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/delete_app_connection.php deleted file mode 100644 index 8c7725f0d034..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/delete_app_connection.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appConnectionsServiceClient->deleteAppConnection($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 = AppConnectionsServiceClient::appConnectionName( - '[PROJECT]', - '[LOCATION]', - '[APP_CONNECTION]' - ); - - delete_app_connection_sample($formattedName); -} -// [END beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_app_connection.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_app_connection.php deleted file mode 100644 index 0482a7e89fc6..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_app_connection.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AppConnection $response */ - $response = $appConnectionsServiceClient->getAppConnection($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 = AppConnectionsServiceClient::appConnectionName( - '[PROJECT]', - '[LOCATION]', - '[APP_CONNECTION]' - ); - - get_app_connection_sample($formattedName); -} -// [END beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_iam_policy.php deleted file mode 100644 index b5bc9e67f380..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/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 = $appConnectionsServiceClient->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 beyondcorp_v1_generated_AppConnectionsService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_location.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/get_location.php deleted file mode 100644 index 71164e34a912..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/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 beyondcorp_v1_generated_AppConnectionsService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_app_connections.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_app_connections.php deleted file mode 100644 index 2e52e3057db4..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_app_connections.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $appConnectionsServiceClient->listAppConnections($request); - - /** @var AppConnection $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 = AppConnectionsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_app_connections_sample($formattedParent); -} -// [END beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/list_locations.php deleted file mode 100644 index 632c9a180f99..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/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 beyondcorp_v1_generated_AppConnectionsService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/resolve_app_connections.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/resolve_app_connections.php deleted file mode 100644 index 2f6042c74432..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/resolve_app_connections.php +++ /dev/null @@ -1,91 +0,0 @@ -setParent($formattedParent) - ->setAppConnectorId($formattedAppConnectorId); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $appConnectionsServiceClient->resolveAppConnections($request); - - /** @var AppConnectionDetails $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 = AppConnectionsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedAppConnectorId = AppConnectionsServiceClient::appConnectorName( - '[PROJECT]', - '[LOCATION]', - '[APP_CONNECTOR]' - ); - - resolve_app_connections_sample($formattedParent, $formattedAppConnectorId); -} -// [END beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/set_iam_policy.php deleted file mode 100644 index a0839d476b56..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/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 = $appConnectionsServiceClient->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 beyondcorp_v1_generated_AppConnectionsService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/test_iam_permissions.php deleted file mode 100644 index d58bf6839467..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/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 = $appConnectionsServiceClient->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 beyondcorp_v1_generated_AppConnectionsService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/update_app_connection.php b/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/update_app_connection.php deleted file mode 100644 index 82b501555371..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/samples/V1/AppConnectionsServiceClient/update_app_connection.php +++ /dev/null @@ -1,110 +0,0 @@ -setHost($appConnectionApplicationEndpointHost) - ->setPort($appConnectionApplicationEndpointPort); - $appConnection = (new AppConnection()) - ->setName($appConnectionName) - ->setType($appConnectionType) - ->setApplicationEndpoint($appConnectionApplicationEndpoint); - $request = (new UpdateAppConnectionRequest()) - ->setUpdateMask($updateMask) - ->setAppConnection($appConnection); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appConnectionsServiceClient->updateAppConnection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AppConnection $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 -{ - $appConnectionName = '[NAME]'; - $appConnectionType = Type::TYPE_UNSPECIFIED; - $appConnectionApplicationEndpointHost = '[HOST]'; - $appConnectionApplicationEndpointPort = 0; - - update_app_connection_sample( - $appConnectionName, - $appConnectionType, - $appConnectionApplicationEndpointHost, - $appConnectionApplicationEndpointPort - ); -} -// [END beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/Client/AppConnectionsServiceClient.php b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/Client/AppConnectionsServiceClient.php deleted file mode 100644 index 10e4c80aa2e1..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/Client/AppConnectionsServiceClient.php +++ /dev/null @@ -1,668 +0,0 @@ - createAppConnectionAsync(CreateAppConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAppConnectionAsync(DeleteAppConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAppConnectionAsync(GetAppConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAppConnectionsAsync(ListAppConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface resolveAppConnectionsAsync(ResolveAppConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAppConnectionAsync(UpdateAppConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class AppConnectionsServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/app_connections_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/app_connections_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/app_connections_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/app_connections_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * app_connection resource. - * - * @param string $project - * @param string $location - * @param string $appConnection - * - * @return string The formatted app_connection resource. - */ - public static function appConnectionName(string $project, string $location, string $appConnection): string - { - return self::getPathTemplate('appConnection')->render([ - 'project' => $project, - 'location' => $location, - 'app_connection' => $appConnection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * app_connector resource. - * - * @param string $project - * @param string $location - * @param string $appConnector - * - * @return string The formatted app_connector resource. - */ - public static function appConnectorName(string $project, string $location, string $appConnector): string - { - return self::getPathTemplate('appConnector')->render([ - 'project' => $project, - 'location' => $location, - 'app_connector' => $appConnector, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a app_gateway - * resource. - * - * @param string $project - * @param string $location - * @param string $appGateway - * - * @return string The formatted app_gateway resource. - */ - public static function appGatewayName(string $project, string $location, string $appGateway): string - { - return self::getPathTemplate('appGateway')->render([ - 'project' => $project, - 'location' => $location, - 'app_gateway' => $appGateway, - ]); - } - - /** - * 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 - * - appConnection: projects/{project}/locations/{location}/appConnections/{app_connection} - * - appConnector: projects/{project}/locations/{location}/appConnectors/{app_connector} - * - appGateway: projects/{project}/locations/{location}/appGateways/{app_gateway} - * - 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 'beyondcorp.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 new AppConnection in a given project and location. - * - * The async variant is - * {@see AppConnectionsServiceClient::createAppConnectionAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/create_app_connection.php - * - * @param CreateAppConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createAppConnection(CreateAppConnectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAppConnection', $request, $callOptions)->wait(); - } - - /** - * Deletes a single AppConnection. - * - * The async variant is - * {@see AppConnectionsServiceClient::deleteAppConnectionAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/delete_app_connection.php - * - * @param DeleteAppConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteAppConnection(DeleteAppConnectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAppConnection', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single AppConnection. - * - * The async variant is {@see AppConnectionsServiceClient::getAppConnectionAsync()} - * . - * - * @example samples/V1/AppConnectionsServiceClient/get_app_connection.php - * - * @param GetAppConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AppConnection - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAppConnection(GetAppConnectionRequest $request, array $callOptions = []): AppConnection - { - return $this->startApiCall('GetAppConnection', $request, $callOptions)->wait(); - } - - /** - * Lists AppConnections in a given project and location. - * - * The async variant is - * {@see AppConnectionsServiceClient::listAppConnectionsAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/list_app_connections.php - * - * @param ListAppConnectionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAppConnections(ListAppConnectionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAppConnections', $request, $callOptions); - } - - /** - * Resolves AppConnections details for a given AppConnector. - * An internal method called by a connector to find AppConnections to connect - * to. - * - * The async variant is - * {@see AppConnectionsServiceClient::resolveAppConnectionsAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/resolve_app_connections.php - * - * @param ResolveAppConnectionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 resolveAppConnections(ResolveAppConnectionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ResolveAppConnections', $request, $callOptions); - } - - /** - * Updates the parameters of a single AppConnection. - * - * The async variant is - * {@see AppConnectionsServiceClient::updateAppConnectionAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/update_app_connection.php - * - * @param UpdateAppConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateAppConnection(UpdateAppConnectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAppConnection', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AppConnectionsServiceClient::getLocationAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/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 AppConnectionsServiceClient::listLocationsAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/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); - } - - /** - * 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 AppConnectionsServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/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 AppConnectionsServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/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 AppConnectionsServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/AppConnectionsServiceClient/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(); - } -} diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 68ef8018f5ae..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.beyondcorp.appconnections.v1", - "libraryPackage": "Google\\Cloud\\BeyondCorp\\AppConnections\\V1", - "services": { - "AppConnectionsService": { - "clients": { - "grpc": { - "libraryClient": "AppConnectionsServiceGapicClient", - "rpcs": { - "CreateAppConnection": { - "methods": [ - "createAppConnection" - ] - }, - "DeleteAppConnection": { - "methods": [ - "deleteAppConnection" - ] - }, - "GetAppConnection": { - "methods": [ - "getAppConnection" - ] - }, - "ListAppConnections": { - "methods": [ - "listAppConnections" - ] - }, - "ResolveAppConnections": { - "methods": [ - "resolveAppConnections" - ] - }, - "UpdateAppConnection": { - "methods": [ - "updateAppConnection" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_client_config.json b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_client_config.json deleted file mode 100644 index 96222a9ebc4f..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_client_config.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "interfaces": { - "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService": { - "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": { - "CreateAppConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteAppConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetAppConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAppConnections": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ResolveAppConnections": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateAppConnection": { - "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" - }, - "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" - } - } - } - } -} diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_descriptor_config.php b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_descriptor_config.php deleted file mode 100644 index 2362b01c1024..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_descriptor_config.php +++ /dev/null @@ -1,217 +0,0 @@ - [ - 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService' => [ - 'CreateAppConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnectionOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnectionOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAppConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnections\V1\AppConnectionOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'app_connection.name', - 'fieldAccessors' => [ - 'getAppConnection', - 'getName', - ], - ], - ], - ], - 'GetAppConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAppConnections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAppConnections', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\AppConnections\V1\ListAppConnectionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ResolveAppConnections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAppConnectionDetails', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\AppConnections\V1\ResolveAppConnectionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - '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', - ], - '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', - ], - 'templateMap' => [ - 'appConnection' => 'projects/{project}/locations/{location}/appConnections/{app_connection}', - 'appConnector' => 'projects/{project}/locations/{location}/appConnectors/{app_connector}', - 'appGateway' => 'projects/{project}/locations/{location}/appGateways/{app_gateway}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_rest_client_config.php b/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_rest_client_config.php deleted file mode 100644 index ddb0a23de5ad..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/src/V1/resources/app_connections_service_rest_client_config.php +++ /dev/null @@ -1,271 +0,0 @@ - [ - 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService' => [ - 'CreateAppConnection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnections', - 'body' => 'app_connection', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppConnection' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/appConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAppConnection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/appConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAppConnections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResolveAppConnections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnections:resolve', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAppConnection' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{app_connection.name=projects/*/locations/*/appConnections/*}', - 'body' => 'app_connection', - 'placeholders' => [ - 'app_connection.name' => [ - 'getters' => [ - 'getAppConnection', - '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/*/appConnections/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpAppConnections/v1/tests/Unit/V1/Client/AppConnectionsServiceClientTest.php b/owl-bot-staging/BeyondCorpAppConnections/v1/tests/Unit/V1/Client/AppConnectionsServiceClientTest.php deleted file mode 100644 index 0ee8d7ec041c..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnections/v1/tests/Unit/V1/Client/AppConnectionsServiceClientTest.php +++ /dev/null @@ -1,1146 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AppConnectionsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AppConnectionsServiceClient($options); - } - - /** @test */ - public function createAppConnectionTest() - { - $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/createAppConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new AppConnection(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAppConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $appConnection = new AppConnection(); - $appConnectionName = 'appConnectionName-1608104182'; - $appConnection->setName($appConnectionName); - $appConnectionType = Type::TYPE_UNSPECIFIED; - $appConnection->setType($appConnectionType); - $appConnectionApplicationEndpoint = new ApplicationEndpoint(); - $applicationEndpointHost = 'applicationEndpointHost1976079949'; - $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); - $applicationEndpointPort = 1976318246; - $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); - $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); - $request = (new CreateAppConnectionRequest()) - ->setParent($formattedParent) - ->setAppConnection($appConnection); - $response = $gapicClient->createAppConnection($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.beyondcorp.appconnections.v1.AppConnectionsService/CreateAppConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAppConnection(); - $this->assertProtobufEquals($appConnection, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAppConnectionTest'); - $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 createAppConnectionExceptionTest() - { - $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/createAppConnectionTest'); - $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]'); - $appConnection = new AppConnection(); - $appConnectionName = 'appConnectionName-1608104182'; - $appConnection->setName($appConnectionName); - $appConnectionType = Type::TYPE_UNSPECIFIED; - $appConnection->setType($appConnectionType); - $appConnectionApplicationEndpoint = new ApplicationEndpoint(); - $applicationEndpointHost = 'applicationEndpointHost1976079949'; - $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); - $applicationEndpointPort = 1976318246; - $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); - $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); - $request = (new CreateAppConnectionRequest()) - ->setParent($formattedParent) - ->setAppConnection($appConnection); - $response = $gapicClient->createAppConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAppConnectionTest'); - 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 deleteAppConnectionTest() - { - $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/deleteAppConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAppConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->appConnectionName('[PROJECT]', '[LOCATION]', '[APP_CONNECTION]'); - $request = (new DeleteAppConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAppConnection($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.beyondcorp.appconnections.v1.AppConnectionsService/DeleteAppConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAppConnectionTest'); - $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 deleteAppConnectionExceptionTest() - { - $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/deleteAppConnectionTest'); - $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->appConnectionName('[PROJECT]', '[LOCATION]', '[APP_CONNECTION]'); - $request = (new DeleteAppConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAppConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAppConnectionTest'); - 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 getAppConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new AppConnection(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->appConnectionName('[PROJECT]', '[LOCATION]', '[APP_CONNECTION]'); - $request = (new GetAppConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->getAppConnection($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.beyondcorp.appconnections.v1.AppConnectionsService/GetAppConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAppConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->appConnectionName('[PROJECT]', '[LOCATION]', '[APP_CONNECTION]'); - $request = (new GetAppConnectionRequest()) - ->setName($formattedName); - try { - $gapicClient->getAppConnection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppConnectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $appConnectionsElement = new AppConnection(); - $appConnections = [ - $appConnectionsElement, - ]; - $expectedResponse = new ListAppConnectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAppConnections($appConnections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAppConnectionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAppConnections($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAppConnections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.beyondcorp.appconnections.v1.AppConnectionsService/ListAppConnections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppConnectionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListAppConnectionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAppConnections($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resolveAppConnectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $appConnectionDetailsElement = new AppConnectionDetails(); - $appConnectionDetails = [ - $appConnectionDetailsElement, - ]; - $expectedResponse = new ResolveAppConnectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAppConnectionDetails($appConnectionDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedAppConnectorId = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); - $request = (new ResolveAppConnectionsRequest()) - ->setParent($formattedParent) - ->setAppConnectorId($formattedAppConnectorId); - $response = $gapicClient->resolveAppConnections($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAppConnectionDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.beyondcorp.appconnections.v1.AppConnectionsService/ResolveAppConnections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAppConnectorId(); - $this->assertProtobufEquals($formattedAppConnectorId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resolveAppConnectionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $formattedAppConnectorId = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); - $request = (new ResolveAppConnectionsRequest()) - ->setParent($formattedParent) - ->setAppConnectorId($formattedAppConnectorId); - try { - $gapicClient->resolveAppConnections($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAppConnectionTest() - { - $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/updateAppConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new AppConnection(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAppConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $appConnection = new AppConnection(); - $appConnectionName = 'appConnectionName-1608104182'; - $appConnection->setName($appConnectionName); - $appConnectionType = Type::TYPE_UNSPECIFIED; - $appConnection->setType($appConnectionType); - $appConnectionApplicationEndpoint = new ApplicationEndpoint(); - $applicationEndpointHost = 'applicationEndpointHost1976079949'; - $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); - $applicationEndpointPort = 1976318246; - $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); - $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); - $request = (new UpdateAppConnectionRequest()) - ->setUpdateMask($updateMask) - ->setAppConnection($appConnection); - $response = $gapicClient->updateAppConnection($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.beyondcorp.appconnections.v1.AppConnectionsService/UpdateAppConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getAppConnection(); - $this->assertProtobufEquals($appConnection, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppConnectionTest'); - $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 updateAppConnectionExceptionTest() - { - $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/updateAppConnectionTest'); - $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(); - $appConnection = new AppConnection(); - $appConnectionName = 'appConnectionName-1608104182'; - $appConnection->setName($appConnectionName); - $appConnectionType = Type::TYPE_UNSPECIFIED; - $appConnection->setType($appConnectionType); - $appConnectionApplicationEndpoint = new ApplicationEndpoint(); - $applicationEndpointHost = 'applicationEndpointHost1976079949'; - $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); - $applicationEndpointPort = 1976318246; - $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); - $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); - $request = (new UpdateAppConnectionRequest()) - ->setUpdateMask($updateMask) - ->setAppConnection($appConnection); - $response = $gapicClient->updateAppConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppConnectionTest'); - 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 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 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 createAppConnectionAsyncTest() - { - $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/createAppConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new AppConnection(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAppConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $appConnection = new AppConnection(); - $appConnectionName = 'appConnectionName-1608104182'; - $appConnection->setName($appConnectionName); - $appConnectionType = Type::TYPE_UNSPECIFIED; - $appConnection->setType($appConnectionType); - $appConnectionApplicationEndpoint = new ApplicationEndpoint(); - $applicationEndpointHost = 'applicationEndpointHost1976079949'; - $appConnectionApplicationEndpoint->setHost($applicationEndpointHost); - $applicationEndpointPort = 1976318246; - $appConnectionApplicationEndpoint->setPort($applicationEndpointPort); - $appConnection->setApplicationEndpoint($appConnectionApplicationEndpoint); - $request = (new CreateAppConnectionRequest()) - ->setParent($formattedParent) - ->setAppConnection($appConnection); - $response = $gapicClient->createAppConnectionAsync($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.beyondcorp.appconnections.v1.AppConnectionsService/CreateAppConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAppConnection(); - $this->assertProtobufEquals($appConnection, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAppConnectionTest'); - $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/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorInstanceConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorInstanceConfig.php deleted file mode 100644 index b82fc926871c931d6c7fabc36850f5f3cbcc0c4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1743 zcmb_c-A)rh6t=~n3?w8A7Zo**NJ2?qn_|3h0Zj{18x<+1Y8CWIHqN&XQEa zL--mziZ9@;*WURC&d+vRY^z+zP087FzVDnf-}!c5igN*;zy@I?Mv{au=tFre+I(JQQwY)tzXt|~Lsdni%nIthok$*rE98;mT(o(6O z*CjH41sy4GWV9NNc3|1|=y_vJ?m-!+WRxAkn8-9{JEm_9aGC$-PgrP8Q2&sUD6Ern zbU}ISdBdrOAd^b-!D_5Oxyr0!>jljQuZ3Yg=b@5RIqyvOxek8a0dN1OmYlLhbB!|H zp)%cT%5*QPEB7*9qe1mp6~y{hkgH#dU}d_PoCjbrA)ivBh0M}kK;lvX7RodAnIE;H zvjrCaka?-7zRqtiyIF4oMptdo`3RO6m$XB%5+!HZWt3)2$?l-!pX0bkBOq4v&Ks~m zd#F3Ow$g2b`RwMHO!t7&y`|RdaV-`W(!U4C*X{1&LyHpl!1}o35kkB!h@# zQT?QI^{XP-RAzbOG3$?}%gWqVt8n(-zV$%IyjSV+=@yFwwJxiM$!u2yJJ-Z6f~#V= zVa(L-)U{^1uMFEA?I&?htKSBxerCLx^Xg<@Td$Hs#^WpR{aM_!$ew53!t;jMo_8(X g^G>V5tkM3{_1p$Ft(}dy-&E%_nbw~!!6g8{0gEM6{{R30 diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorsService.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appconnectors/V1/AppConnectorsService.php deleted file mode 100644 index f9d70472c21985498eaaaaca4257aba3c2a21f78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6117 zcmb_g&2JM&6vuWFl1T_*DBu_&wuXXMn6@RU^W3t@MC+YE$*p`Z5z2mdbXuA-Z|r>lnk3E00Rv{b_-AgF(Bt8HqYZkYnzux@Ika82Mc z>DtS-1$Zq9fwDCUA;4E(F+Jj#s!^{HS95e5fT+PzN!lh}2s|ArT=S2m;`EkK;5tfD zpOQ<0=d?-mbU|>4*LKWXOm8Y+Km1i60Hti}b=fp6ih^ajlGL@SE8v#D=5Q_wna41Hpt?_zpB?Vq(jgE%b=Mxem$Ci&9o^@)+-!zaz7L6_5R#8l z@hbZH3aY-541o(=jK~s=*iAGd$8e6()CVN}El>jlwJd-4C4aZkKMcfDxLxEti7HV_2gL1VV+0JzzdkSa`+#20e< zU%7yTu8s!G>8~2WnRcBd=4Qt?paTWnawcSY~nN; zYv~50)a*!i@C+KaoF;LUMkhNO4(Gp4q1geNyEddeg4fVAkS1~&feD$y?skwsX-I?G@5Li4pFrowP6r2CR3QmKSF1hNet5f(%Wc+UW0K!Q9?lT zpQX`k84mMERJlO*>$>X#nu%ei=uPIe3GTHGbRss*9Cu_ysmwHGg2Ty14~sZGhfeIl zwG9;lQ7qHoo*!q5pj z=6%Ld!+qnv0OKmeAcKv2E&BAJ&G^e*+oup!)>r876gs^@Y|HUBp`d7o$)VayhggnC zN@)zh$MPRz+)%(rFXBP0N(lU~$I(=jPxw?UR2f}?TN(>Lh2~LT)qZY;_bXK=gS(7m zyQn^c7}>MyF&Z<}1~FU+3!1q~0fi5}9b=hGTxCM4rss6HvuDv%Q+I7c?IwGII=1q4DxYRo+@zTb@aQwBzgxrqXokVXeZaGW4rbU9GZ( zBX}H*RMsD_&5TOUOW8`C52}!%KZF;hTYTpK+AkWG#_Qzbv*71GeQSnQJ}i!1P5b%J z)96Apn!{QoRFS6&96N7FRa z+O7iCxeIkux7x|zOX#eBQIe*j(HD(jFicpmvQ(YHSu_cSm;!=bcvY~FX zWiCRIxgKiZ-%{vgPc??`C0DLzYhd0G$s`JV{@#JiD!`aMG!MVRnjW6d?c;CK2=^C( zcnG}vcL!Eo2yltKJH#+{^53PN%h!9Z$^Q?t1Nj~9toc}g#=oHUV{nx6!@F0C7p3@H zK&QVr90r~K-3ih8{s`#I#$kz6t_+dd;$24g*eY=ty7c1nPYU7w`f?b2`gbS9r}JFC ziO%@%udooW?%G}lAI73c%*=6;3$e6{WE@MiFJs3N_V zV^y`#(U4*9+BO+1#m{c ze@YjYS*KYn(@wL#6SA4YaJXl)yyV8DJnl7%#x{Gcd8q+V+^IWndG0~FL rl`TmzGbQQKLSu|k|Hjp@jW*9azL5qotpjvzKy#R_Xk7)~Xo{a=al$QjuR88zjGLqvN+2cw9 zbtkNV4X_7R!8eOQjP2M-`Vg=DIJVC{bMC#z=jaWeaPS1yi9=j0hy{l;C?*7QmkDMv z8xH-^h`7*XQ%-H-Y7kahu-WRtYNgS8BuhQ!yCy+!%-Gl_1=D7}RTz>Pb1aj&yns13 znd1;sFxM-b6$>tjN=~UWVp@0*01loKk7JX-db{+F2y9`2je5vwlmkwqlyDmQGN&;p z9s*$6*z;g#&fSpI;1huI$NiyAP3Q?M@!o`egZZ2wft4*EtMz2L$KIKjVrK>YN%iN^Gk{Cisjp7okO03zDl! zlg4ys_77D(DmN?elwVyNj`787Iv<*DS;>rQ(r{|hRnX%u___{`{>N#G8dYndPql?l zwH2RgXT_cE`8lCOcG-){U67_$J_S?iW-0SsPb)RB z9<1B<@@e_-&cQ3~PlahG1lwZL4Xc%BU?cvZ@)^mrb#OmsiiK-(af%Ao0+IQ(5VLa$ zldMT8gN)}7^EY8elKq9O<$j-2kX@1a0BoOB^|!r~({4}i^}DD2X184}H)@S)C3i#F z0=J^q?{g{THrVVprU(#wl3@|MWFf9tOvJ6E{23R=> zMQu?07DJ7B*v-=}02@KvEzpL{yC3QOh#8@f8leR@LMw2D2F2leXoZ)%$;Y%G11GD?VZa1OvPVgoogle.cloud.beyondcorp.appconnectors.v1.AppConnector - */ -class AppConnector extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique resource name of the AppConnector. - * The name is ignored when creating a AppConnector. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Timestamp when the resource was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. An arbitrary user-provided name for the AppConnector. Cannot - * exceed 64 characters. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. A unique identifier for the instance generated by the - * system. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The current state of the AppConnector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Principal information about the Identity of the AppConnector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo principal_info = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $principal_info = null; - /** - * Optional. Resource info of the connector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Unique resource name of the AppConnector. - * The name is ignored when creating a AppConnector. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp when the resource was last modified. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Resource labels to represent user provided metadata. - * @type string $display_name - * Optional. An arbitrary user-provided name for the AppConnector. Cannot - * exceed 64 characters. - * @type string $uid - * Output only. A unique identifier for the instance generated by the - * system. - * @type int $state - * Output only. The current state of the AppConnector. - * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo $principal_info - * Required. Principal information about the Identity of the AppConnector. - * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $resource_info - * Optional. Resource info of the connector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique resource name of the AppConnector. - * The name is ignored when creating a AppConnector. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Unique resource name of the AppConnector. - * The name is ignored when creating a AppConnector. - * - * 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; - } - - /** - * Output only. Timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was last modified. - * - * 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. Timestamp when the resource was last modified. - * - * 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; - } - - /** - * Optional. Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 4 [(.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. An arbitrary user-provided name for the AppConnector. Cannot - * exceed 64 characters. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. An arbitrary user-provided name for the AppConnector. Cannot - * exceed 64 characters. - * - * Generated from protobuf field string display_name = 5 [(.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. A unique identifier for the instance generated by the - * system. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A unique identifier for the instance generated by the - * system. - * - * Generated from protobuf field string uid = 6 [(.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 current state of the AppConnector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the AppConnector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Principal information about the Identity of the AppConnector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo principal_info = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo|null - */ - public function getPrincipalInfo() - { - return $this->principal_info; - } - - public function hasPrincipalInfo() - { - return isset($this->principal_info); - } - - public function clearPrincipalInfo() - { - unset($this->principal_info); - } - - /** - * Required. Principal information about the Identity of the AppConnector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo principal_info = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo $var - * @return $this - */ - public function setPrincipalInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo::class); - $this->principal_info = $var; - - return $this; - } - - /** - * Optional. Resource info of the connector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo|null - */ - public function getResourceInfo() - { - return $this->resource_info; - } - - public function hasResourceInfo() - { - return isset($this->resource_info); - } - - public function clearResourceInfo() - { - unset($this->resource_info); - } - - /** - * Optional. Resource info of the connector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $var - * @return $this - */ - public function setResourceInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo::class); - $this->resource_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo.php deleted file mode 100644 index 00c58b75f4af..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo - */ -class PrincipalInfo extends \Google\Protobuf\Internal\Message -{ - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo\ServiceAccount $service_account - * A GCP service account. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * A GCP service account. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount service_account = 1; - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo\ServiceAccount|null - */ - public function getServiceAccount() - { - return $this->readOneof(1); - } - - public function hasServiceAccount() - { - return $this->hasOneof(1); - } - - /** - * A GCP service account. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount service_account = 1; - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo\ServiceAccount $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo\ServiceAccount::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PrincipalInfo::class, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector_PrincipalInfo::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo/ServiceAccount.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo/ServiceAccount.php deleted file mode 100644 index 9219e3d17fe8..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/PrincipalInfo/ServiceAccount.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount - */ -class ServiceAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Email address of the service account. - * - * Generated from protobuf field string email = 1; - */ - protected $email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * Email address of the service account. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * Email address of the service account. - * - * Generated from protobuf field string email = 1; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Email address of the service account. - * - * Generated from protobuf field string email = 1; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceAccount::class, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector_PrincipalInfo_ServiceAccount::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/State.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/State.php deleted file mode 100644 index 05d642b76b6d..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnector/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.AppConnector.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * AppConnector is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * AppConnector has been created. - * - * Generated from protobuf enum CREATED = 2; - */ - const CREATED = 2; - /** - * AppConnector's configuration is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * AppConnector is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * AppConnector is down and may be restored in the future. - * This happens when CCFE sends ProjectState = OFF. - * - * Generated from protobuf enum DOWN = 5; - */ - const DOWN = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::CREATED => 'CREATED', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::DOWN => 'DOWN', - ]; - - 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\BeyondCorp\AppConnectors\V1\AppConnector_State::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorInstanceConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorInstanceConfig.php deleted file mode 100644 index 59a44797fb90..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorInstanceConfig.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.AppConnectorInstanceConfig - */ -class AppConnectorInstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A monotonically increasing number generated and maintained - * by the API provider. Every time a config changes in the backend, the - * sequenceNumber should be bumped up to reflect the change. - * - * Generated from protobuf field int64 sequence_number = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sequence_number = 0; - /** - * The SLM instance agent configuration. - * - * Generated from protobuf field .google.protobuf.Any instance_config = 2; - */ - protected $instance_config = null; - /** - * NotificationConfig defines the notification mechanism that the remote - * instance should subscribe to in order to receive notification. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig notification_config = 3; - */ - protected $notification_config = null; - /** - * ImageConfig defines the GCR images to run for the remote agent's control - * plane. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ImageConfig image_config = 4; - */ - protected $image_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $sequence_number - * Required. A monotonically increasing number generated and maintained - * by the API provider. Every time a config changes in the backend, the - * sequenceNumber should be bumped up to reflect the change. - * @type \Google\Protobuf\Any $instance_config - * The SLM instance agent configuration. - * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig $notification_config - * NotificationConfig defines the notification mechanism that the remote - * instance should subscribe to in order to receive notification. - * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\ImageConfig $image_config - * ImageConfig defines the GCR images to run for the remote agent's control - * plane. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorInstanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A monotonically increasing number generated and maintained - * by the API provider. Every time a config changes in the backend, the - * sequenceNumber should be bumped up to reflect the change. - * - * Generated from protobuf field int64 sequence_number = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getSequenceNumber() - { - return $this->sequence_number; - } - - /** - * Required. A monotonically increasing number generated and maintained - * by the API provider. Every time a config changes in the backend, the - * sequenceNumber should be bumped up to reflect the change. - * - * Generated from protobuf field int64 sequence_number = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setSequenceNumber($var) - { - GPBUtil::checkInt64($var); - $this->sequence_number = $var; - - return $this; - } - - /** - * The SLM instance agent configuration. - * - * Generated from protobuf field .google.protobuf.Any instance_config = 2; - * @return \Google\Protobuf\Any|null - */ - public function getInstanceConfig() - { - return $this->instance_config; - } - - public function hasInstanceConfig() - { - return isset($this->instance_config); - } - - public function clearInstanceConfig() - { - unset($this->instance_config); - } - - /** - * The SLM instance agent configuration. - * - * Generated from protobuf field .google.protobuf.Any instance_config = 2; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setInstanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->instance_config = $var; - - return $this; - } - - /** - * NotificationConfig defines the notification mechanism that the remote - * instance should subscribe to in order to receive notification. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig notification_config = 3; - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig|null - */ - public function getNotificationConfig() - { - return $this->notification_config; - } - - public function hasNotificationConfig() - { - return isset($this->notification_config); - } - - public function clearNotificationConfig() - { - unset($this->notification_config); - } - - /** - * NotificationConfig defines the notification mechanism that the remote - * instance should subscribe to in order to receive notification. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig notification_config = 3; - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig $var - * @return $this - */ - public function setNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig::class); - $this->notification_config = $var; - - return $this; - } - - /** - * ImageConfig defines the GCR images to run for the remote agent's control - * plane. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ImageConfig image_config = 4; - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ImageConfig|null - */ - public function getImageConfig() - { - return $this->image_config; - } - - public function hasImageConfig() - { - return isset($this->image_config); - } - - public function clearImageConfig() - { - unset($this->image_config); - } - - /** - * ImageConfig defines the GCR images to run for the remote agent's control - * plane. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ImageConfig image_config = 4; - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\ImageConfig $var - * @return $this - */ - public function setImageConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\ImageConfig::class); - $this->image_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorOperationMetadata.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorOperationMetadata.php deleted file mode 100644 index 28e101a224c3..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/AppConnectorOperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.AppConnectorOperationMetadata - */ -class AppConnectorOperationMetadata 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\Beyondcorp\Appconnectors\V1\AppConnectorsService::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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/CreateAppConnectorRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/CreateAppConnectorRequest.php deleted file mode 100644 index 971d96884ddc..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/CreateAppConnectorRequest.php +++ /dev/null @@ -1,296 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest - */ -class CreateAppConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource project name of the AppConnector location using the - * form: `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. User-settable AppConnector resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $app_connector_id = ''; - /** - * Required. A BeyondCorp AppConnector resource. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_connector = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource project name of the AppConnector location using the - * form: `projects/{project_id}/locations/{location_id}` - * Please see {@see AppConnectorsServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $appConnector Required. A BeyondCorp AppConnector resource. - * @param string $appConnectorId Optional. User-settable AppConnector resource ID. - * - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\CreateAppConnectorRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $appConnector, string $appConnectorId): self - { - return (new self()) - ->setParent($parent) - ->setAppConnector($appConnector) - ->setAppConnectorId($appConnectorId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource project name of the AppConnector location using the - * form: `projects/{project_id}/locations/{location_id}` - * @type string $app_connector_id - * Optional. User-settable AppConnector resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $app_connector - * Required. A BeyondCorp AppConnector resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource project name of the AppConnector location using the - * form: `projects/{project_id}/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 project name of the AppConnector location using the - * form: `projects/{project_id}/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. User-settable AppConnector resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAppConnectorId() - { - return $this->app_connector_id; - } - - /** - * Optional. User-settable AppConnector resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string app_connector_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAppConnectorId($var) - { - GPBUtil::checkString($var, True); - $this->app_connector_id = $var; - - return $this; - } - - /** - * Required. A BeyondCorp AppConnector resource. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector|null - */ - public function getAppConnector() - { - return $this->app_connector; - } - - public function hasAppConnector() - { - return isset($this->app_connector); - } - - public function clearAppConnector() - { - unset($this->app_connector); - } - - /** - * Required. A BeyondCorp AppConnector resource. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $var - * @return $this - */ - public function setAppConnector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector::class); - $this->app_connector = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/DeleteAppConnectorRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/DeleteAppConnectorRequest.php deleted file mode 100644 index a9ac702ffd42..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/DeleteAppConnectorRequest.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest - */ -class DeleteAppConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $name Required. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * Please see {@see AppConnectorsServiceClient::appConnectorName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\DeleteAppConnectorRequest - * - * @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. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/GetAppConnectorRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/GetAppConnectorRequest.php deleted file mode 100644 index 977e4560e303..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/GetAppConnectorRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest - */ -class GetAppConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * Please see {@see AppConnectorsServiceClient::appConnectorName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\GetAppConnectorRequest - * - * @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. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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. BeyondCorp AppConnector name using the form: - * `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/HealthStatus.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/HealthStatus.php deleted file mode 100644 index 4c2c7b1895f9..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/HealthStatus.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.HealthStatus - */ -class HealthStatus -{ - /** - * Health status is unknown: not initialized or failed to retrieve. - * - * Generated from protobuf enum HEALTH_STATUS_UNSPECIFIED = 0; - */ - const HEALTH_STATUS_UNSPECIFIED = 0; - /** - * The resource is healthy. - * - * Generated from protobuf enum HEALTHY = 1; - */ - const HEALTHY = 1; - /** - * The resource is unhealthy. - * - * Generated from protobuf enum UNHEALTHY = 2; - */ - const UNHEALTHY = 2; - /** - * The resource is unresponsive. - * - * Generated from protobuf enum UNRESPONSIVE = 3; - */ - const UNRESPONSIVE = 3; - /** - * Some sub-resources are UNHEALTHY. - * - * Generated from protobuf enum DEGRADED = 4; - */ - const DEGRADED = 4; - - private static $valueToName = [ - self::HEALTH_STATUS_UNSPECIFIED => 'HEALTH_STATUS_UNSPECIFIED', - self::HEALTHY => 'HEALTHY', - self::UNHEALTHY => 'UNHEALTHY', - self::UNRESPONSIVE => 'UNRESPONSIVE', - self::DEGRADED => 'DEGRADED', - ]; - - 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ImageConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ImageConfig.php deleted file mode 100644 index f31d9006cf66..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ImageConfig.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.ImageConfig - */ -class ImageConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The initial image the remote agent will attempt to run for the control - * plane. - * - * Generated from protobuf field string target_image = 1; - */ - protected $target_image = ''; - /** - * The stable image that the remote agent will fallback to if the target image - * fails. - * - * Generated from protobuf field string stable_image = 2; - */ - protected $stable_image = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $target_image - * The initial image the remote agent will attempt to run for the control - * plane. - * @type string $stable_image - * The stable image that the remote agent will fallback to if the target image - * fails. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorInstanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * The initial image the remote agent will attempt to run for the control - * plane. - * - * Generated from protobuf field string target_image = 1; - * @return string - */ - public function getTargetImage() - { - return $this->target_image; - } - - /** - * The initial image the remote agent will attempt to run for the control - * plane. - * - * Generated from protobuf field string target_image = 1; - * @param string $var - * @return $this - */ - public function setTargetImage($var) - { - GPBUtil::checkString($var, True); - $this->target_image = $var; - - return $this; - } - - /** - * The stable image that the remote agent will fallback to if the target image - * fails. - * - * Generated from protobuf field string stable_image = 2; - * @return string - */ - public function getStableImage() - { - return $this->stable_image; - } - - /** - * The stable image that the remote agent will fallback to if the target image - * fails. - * - * Generated from protobuf field string stable_image = 2; - * @param string $var - * @return $this - */ - public function setStableImage($var) - { - GPBUtil::checkString($var, True); - $this->stable_image = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsRequest.php deleted file mode 100644 index eb6639769249..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsRequest.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest - */ -class ListAppConnectorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the AppConnector location using the form: - * `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to - * determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous - * ListAppConnectorsRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter specifying constraints of a list operation. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * 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 AppConnector location using the form: - * `projects/{project_id}/locations/{location_id}` - * Please see {@see AppConnectorsServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ListAppConnectorsRequest - * - * @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 AppConnector location using the form: - * `projects/{project_id}/locations/{location_id}` - * @type int $page_size - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to - * determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The next_page_token value returned from a previous - * ListAppConnectorsRequest, if any. - * @type string $filter - * Optional. A filter specifying constraints of a list operation. - * @type string $order_by - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the AppConnector location using the form: - * `projects/{project_id}/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 AppConnector location using the form: - * `projects/{project_id}/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. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to - * determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to - * determine if there are more instances left to be queried. - * - * 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. The next_page_token value returned from a previous - * ListAppConnectorsRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous - * ListAppConnectorsRequest, if any. - * - * 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. A filter specifying constraints of a list operation. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter specifying constraints of a list operation. - * - * 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. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsResponse.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsResponse.php deleted file mode 100644 index 4dd5d6387e1b..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ListAppConnectorsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse - */ -class ListAppConnectorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of BeyondCorp AppConnectors in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connectors = 1; - */ - private $app_connectors; - /** - * A 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 = ''; - /** - * A list of 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\BeyondCorp\AppConnectors\V1\AppConnector>|\Google\Protobuf\Internal\RepeatedField $app_connectors - * A list of BeyondCorp AppConnectors in the project. - * @type string $next_page_token - * A 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 - * A list of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * A list of BeyondCorp AppConnectors in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connectors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAppConnectors() - { - return $this->app_connectors; - } - - /** - * A list of BeyondCorp AppConnectors in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connectors = 1; - * @param array<\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAppConnectors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector::class); - $this->app_connectors = $arr; - - return $this; - } - - /** - * A 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; - } - - /** - * A 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; - } - - /** - * A list of 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; - } - - /** - * A list of 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig.php deleted file mode 100644 index 0ab5679cdf95..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.NotificationConfig - */ -class NotificationConfig extends \Google\Protobuf\Internal\Message -{ - protected $config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig\CloudPubSubNotificationConfig $pubsub_notification - * Cloud Pub/Sub Configuration to receive notifications. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorInstanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Pub/Sub Configuration to receive notifications. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig pubsub_notification = 1; - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig\CloudPubSubNotificationConfig|null - */ - public function getPubsubNotification() - { - return $this->readOneof(1); - } - - public function hasPubsubNotification() - { - return $this->hasOneof(1); - } - - /** - * Cloud Pub/Sub Configuration to receive notifications. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig pubsub_notification = 1; - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig\CloudPubSubNotificationConfig $var - * @return $this - */ - public function setPubsubNotification($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig\CloudPubSubNotificationConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - -} - diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig/CloudPubSubNotificationConfig.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig/CloudPubSubNotificationConfig.php deleted file mode 100644 index b4a622dabefe..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/NotificationConfig/CloudPubSubNotificationConfig.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig - */ -class CloudPubSubNotificationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The Pub/Sub subscription the AppConnector uses to receive notifications. - * - * Generated from protobuf field string pubsub_subscription = 1; - */ - protected $pubsub_subscription = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pubsub_subscription - * The Pub/Sub subscription the AppConnector uses to receive notifications. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorInstanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * The Pub/Sub subscription the AppConnector uses to receive notifications. - * - * Generated from protobuf field string pubsub_subscription = 1; - * @return string - */ - public function getPubsubSubscription() - { - return $this->pubsub_subscription; - } - - /** - * The Pub/Sub subscription the AppConnector uses to receive notifications. - * - * Generated from protobuf field string pubsub_subscription = 1; - * @param string $var - * @return $this - */ - public function setPubsubSubscription($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_subscription = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudPubSubNotificationConfig::class, \Google\Cloud\BeyondCorp\AppConnectors\V1\NotificationConfig_CloudPubSubNotificationConfig::class); - diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ReportStatusRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ReportStatusRequest.php deleted file mode 100644 index 15a4889b3bc3..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ReportStatusRequest.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest - */ -class ReportStatusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/connectors/{connector}` - * - * Generated from protobuf field string app_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $app_connector = ''; - /** - * Required. Resource info of the connector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_info = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $appConnector Required. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/connectors/{connector}` - * Please see {@see AppConnectorsServiceClient::appConnectorName()} for help formatting this field. - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $resourceInfo Required. Resource info of the connector. - * - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ReportStatusRequest - * - * @experimental - */ - public static function build(string $appConnector, \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $resourceInfo): self - { - return (new self()) - ->setAppConnector($appConnector) - ->setResourceInfo($resourceInfo); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $app_connector - * Required. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/connectors/{connector}` - * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $resource_info - * Required. Resource info of the connector. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/connectors/{connector}` - * - * Generated from protobuf field string app_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAppConnector() - { - return $this->app_connector; - } - - /** - * Required. BeyondCorp Connector name using the form: - * `projects/{project_id}/locations/{location_id}/connectors/{connector}` - * - * Generated from protobuf field string app_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAppConnector($var) - { - GPBUtil::checkString($var, True); - $this->app_connector = $var; - - return $this; - } - - /** - * Required. Resource info of the connector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo|null - */ - public function getResourceInfo() - { - return $this->resource_info; - } - - public function hasResourceInfo() - { - return isset($this->resource_info); - } - - public function clearResourceInfo() - { - unset($this->resource_info); - } - - /** - * Required. Resource info of the connector. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $var - * @return $this - */ - public function setResourceInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo::class); - $this->resource_info = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * 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/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ResourceInfo.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ResourceInfo.php deleted file mode 100644 index e2ea6c977df7..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/ResourceInfo.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.ResourceInfo - */ -class ResourceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique Id for the resource. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Overall health status. Overall status is derived based on the status of - * each sub level resources. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.HealthStatus status = 2; - */ - protected $status = 0; - /** - * Specific details for the resource. This is for internal use only. - * - * Generated from protobuf field .google.protobuf.Any resource = 3; - */ - protected $resource = null; - /** - * The timestamp to collect the info. It is suggested to be set by - * the topmost level resource only. - * - * Generated from protobuf field .google.protobuf.Timestamp time = 4; - */ - protected $time = null; - /** - * List of Info for the sub level resources. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo sub = 5; - */ - private $sub; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. Unique Id for the resource. - * @type int $status - * Overall health status. Overall status is derived based on the status of - * each sub level resources. - * @type \Google\Protobuf\Any $resource - * Specific details for the resource. This is for internal use only. - * @type \Google\Protobuf\Timestamp $time - * The timestamp to collect the info. It is suggested to be set by - * the topmost level resource only. - * @type array<\Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo>|\Google\Protobuf\Internal\RepeatedField $sub - * List of Info for the sub level resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\ResourceInfo::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique Id for the resource. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. Unique Id for the resource. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Overall health status. Overall status is derived based on the status of - * each sub level resources. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.HealthStatus status = 2; - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * Overall health status. Overall status is derived based on the status of - * each sub level resources. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.HealthStatus status = 2; - * @param int $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\HealthStatus::class); - $this->status = $var; - - return $this; - } - - /** - * Specific details for the resource. This is for internal use only. - * - * Generated from protobuf field .google.protobuf.Any resource = 3; - * @return \Google\Protobuf\Any|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Specific details for the resource. This is for internal use only. - * - * Generated from protobuf field .google.protobuf.Any resource = 3; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->resource = $var; - - return $this; - } - - /** - * The timestamp to collect the info. It is suggested to be set by - * the topmost level resource only. - * - * Generated from protobuf field .google.protobuf.Timestamp time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTime() - { - return $this->time; - } - - public function hasTime() - { - return isset($this->time); - } - - public function clearTime() - { - unset($this->time); - } - - /** - * The timestamp to collect the info. It is suggested to be set by - * the topmost level resource only. - * - * Generated from protobuf field .google.protobuf.Timestamp time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time = $var; - - return $this; - } - - /** - * List of Info for the sub level resources. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo sub = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSub() - { - return $this->sub; - } - - /** - * List of Info for the sub level resources. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appconnectors.v1.ResourceInfo sub = 5; - * @param array<\Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSub($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo::class); - $this->sub = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/UpdateAppConnectorRequest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/UpdateAppConnectorRequest.php deleted file mode 100644 index eb3293b86e4f..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/proto/src/Google/Cloud/BeyondCorp/AppConnectors/V1/UpdateAppConnectorRequest.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest - */ -class UpdateAppConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnector]: - * * `labels` - * * `display_name` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. AppConnector message with updated fields. Only supported fields - * specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_connector = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $appConnector Required. AppConnector message with updated fields. Only supported fields - * specified in update_mask are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnector]: - * * `labels` - * * `display_name` - * - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\UpdateAppConnectorRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $appConnector, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAppConnector($appConnector) - ->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. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnector]: - * * `labels` - * * `display_name` - * @type \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $app_connector - * Required. AppConnector message with updated fields. Only supported fields - * specified in update_mask are updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnector]: - * * `labels` - * * `display_name` - * - * 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. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [BeyondCorp.AppConnector]: - * * `labels` - * * `display_name` - * - * 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. AppConnector message with updated fields. Only supported fields - * specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector|null - */ - public function getAppConnector() - { - return $this->app_connector; - } - - public function hasAppConnector() - { - return isset($this->app_connector); - } - - public function clearAppConnector() - { - unset($this->app_connector); - } - - /** - * Required. AppConnector message with updated fields. Only supported fields - * specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.beyondcorp.appconnectors.v1.AppConnector app_connector = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector $var - * @return $this - */ - public function setAppConnector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector::class); - $this->app_connector = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * 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/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/create_app_connector.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/create_app_connector.php deleted file mode 100644 index afcd71875d67..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/create_app_connector.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($appConnectorName) - ->setPrincipalInfo($appConnectorPrincipalInfo); - $request = (new CreateAppConnectorRequest()) - ->setParent($formattedParent) - ->setAppConnector($appConnector); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appConnectorsServiceClient->createAppConnector($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AppConnector $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 = AppConnectorsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $appConnectorName = '[NAME]'; - - create_app_connector_sample($formattedParent, $appConnectorName); -} -// [END beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/delete_app_connector.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/delete_app_connector.php deleted file mode 100644 index 578ff6e18307..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/delete_app_connector.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appConnectorsServiceClient->deleteAppConnector($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 = AppConnectorsServiceClient::appConnectorName( - '[PROJECT]', - '[LOCATION]', - '[APP_CONNECTOR]' - ); - - delete_app_connector_sample($formattedName); -} -// [END beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_app_connector.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_app_connector.php deleted file mode 100644 index 82dbca68241d..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_app_connector.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AppConnector $response */ - $response = $appConnectorsServiceClient->getAppConnector($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 = AppConnectorsServiceClient::appConnectorName( - '[PROJECT]', - '[LOCATION]', - '[APP_CONNECTOR]' - ); - - get_app_connector_sample($formattedName); -} -// [END beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_iam_policy.php deleted file mode 100644 index 2d9971aefff9..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/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 = $appConnectorsServiceClient->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 beyondcorp_v1_generated_AppConnectorsService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_location.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/get_location.php deleted file mode 100644 index fcce3ca9f51e..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/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 beyondcorp_v1_generated_AppConnectorsService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_app_connectors.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_app_connectors.php deleted file mode 100644 index 56398737f929..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_app_connectors.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $appConnectorsServiceClient->listAppConnectors($request); - - /** @var AppConnector $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 = AppConnectorsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_app_connectors_sample($formattedParent); -} -// [END beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/list_locations.php deleted file mode 100644 index 17965a132c46..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/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 beyondcorp_v1_generated_AppConnectorsService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/report_status.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/report_status.php deleted file mode 100644 index 39edd3236cae..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/report_status.php +++ /dev/null @@ -1,94 +0,0 @@ -setId($resourceInfoId); - $request = (new ReportStatusRequest()) - ->setAppConnector($formattedAppConnector) - ->setResourceInfo($resourceInfo); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appConnectorsServiceClient->reportStatus($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AppConnector $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 -{ - $formattedAppConnector = AppConnectorsServiceClient::appConnectorName( - '[PROJECT]', - '[LOCATION]', - '[APP_CONNECTOR]' - ); - $resourceInfoId = '[ID]'; - - report_status_sample($formattedAppConnector, $resourceInfoId); -} -// [END beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/set_iam_policy.php deleted file mode 100644 index 8ad3b35214b3..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/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 = $appConnectorsServiceClient->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 beyondcorp_v1_generated_AppConnectorsService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/test_iam_permissions.php deleted file mode 100644 index b4d27f651a4a..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/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 = $appConnectorsServiceClient->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 beyondcorp_v1_generated_AppConnectorsService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/update_app_connector.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/update_app_connector.php deleted file mode 100644 index bb76d70d3a8e..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/samples/V1/AppConnectorsServiceClient/update_app_connector.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($appConnectorName) - ->setPrincipalInfo($appConnectorPrincipalInfo); - $request = (new UpdateAppConnectorRequest()) - ->setUpdateMask($updateMask) - ->setAppConnector($appConnector); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appConnectorsServiceClient->updateAppConnector($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AppConnector $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 -{ - $appConnectorName = '[NAME]'; - - update_app_connector_sample($appConnectorName); -} -// [END beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/Client/AppConnectorsServiceClient.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/Client/AppConnectorsServiceClient.php deleted file mode 100644 index c3a83d8a7e27..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/Client/AppConnectorsServiceClient.php +++ /dev/null @@ -1,624 +0,0 @@ - createAppConnectorAsync(CreateAppConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAppConnectorAsync(DeleteAppConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAppConnectorAsync(GetAppConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAppConnectorsAsync(ListAppConnectorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface reportStatusAsync(ReportStatusRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAppConnectorAsync(UpdateAppConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class AppConnectorsServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/app_connectors_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/app_connectors_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/app_connectors_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/app_connectors_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * app_connector resource. - * - * @param string $project - * @param string $location - * @param string $appConnector - * - * @return string The formatted app_connector resource. - */ - public static function appConnectorName(string $project, string $location, string $appConnector): string - { - return self::getPathTemplate('appConnector')->render([ - 'project' => $project, - 'location' => $location, - 'app_connector' => $appConnector, - ]); - } - - /** - * 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 - * - appConnector: projects/{project}/locations/{location}/appConnectors/{app_connector} - * - 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 'beyondcorp.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 new AppConnector in a given project and location. - * - * The async variant is - * {@see AppConnectorsServiceClient::createAppConnectorAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/create_app_connector.php - * - * @param CreateAppConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createAppConnector(CreateAppConnectorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAppConnector', $request, $callOptions)->wait(); - } - - /** - * Deletes a single AppConnector. - * - * The async variant is - * {@see AppConnectorsServiceClient::deleteAppConnectorAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/delete_app_connector.php - * - * @param DeleteAppConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteAppConnector(DeleteAppConnectorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAppConnector', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single AppConnector. - * - * The async variant is {@see AppConnectorsServiceClient::getAppConnectorAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/get_app_connector.php - * - * @param GetAppConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AppConnector - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAppConnector(GetAppConnectorRequest $request, array $callOptions = []): AppConnector - { - return $this->startApiCall('GetAppConnector', $request, $callOptions)->wait(); - } - - /** - * Lists AppConnectors in a given project and location. - * - * The async variant is {@see AppConnectorsServiceClient::listAppConnectorsAsync()} - * . - * - * @example samples/V1/AppConnectorsServiceClient/list_app_connectors.php - * - * @param ListAppConnectorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAppConnectors(ListAppConnectorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAppConnectors', $request, $callOptions); - } - - /** - * Report status for a given connector. - * - * The async variant is {@see AppConnectorsServiceClient::reportStatusAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/report_status.php - * - * @param ReportStatusRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 reportStatus(ReportStatusRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ReportStatus', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single AppConnector. - * - * The async variant is - * {@see AppConnectorsServiceClient::updateAppConnectorAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/update_app_connector.php - * - * @param UpdateAppConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateAppConnector(UpdateAppConnectorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAppConnector', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AppConnectorsServiceClient::getLocationAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/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 AppConnectorsServiceClient::listLocationsAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/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); - } - - /** - * 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 AppConnectorsServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/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 AppConnectorsServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/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 AppConnectorsServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/AppConnectorsServiceClient/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(); - } -} diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 45b46c7018ad..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.beyondcorp.appconnectors.v1", - "libraryPackage": "Google\\Cloud\\BeyondCorp\\AppConnectors\\V1", - "services": { - "AppConnectorsService": { - "clients": { - "grpc": { - "libraryClient": "AppConnectorsServiceGapicClient", - "rpcs": { - "CreateAppConnector": { - "methods": [ - "createAppConnector" - ] - }, - "DeleteAppConnector": { - "methods": [ - "deleteAppConnector" - ] - }, - "GetAppConnector": { - "methods": [ - "getAppConnector" - ] - }, - "ListAppConnectors": { - "methods": [ - "listAppConnectors" - ] - }, - "ReportStatus": { - "methods": [ - "reportStatus" - ] - }, - "UpdateAppConnector": { - "methods": [ - "updateAppConnector" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_client_config.json b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_client_config.json deleted file mode 100644 index 6a2292abae69..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_client_config.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "interfaces": { - "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService": { - "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": { - "CreateAppConnector": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteAppConnector": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetAppConnector": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAppConnectors": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ReportStatus": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateAppConnector": { - "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" - }, - "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" - } - } - } - } -} diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_descriptor_config.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_descriptor_config.php deleted file mode 100644 index 6de05317288a..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_descriptor_config.php +++ /dev/null @@ -1,214 +0,0 @@ - [ - 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService' => [ - 'CreateAppConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnectorOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnectorOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ReportStatus' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnectorOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'app_connector', - 'fieldAccessors' => [ - 'getAppConnector', - ], - ], - ], - ], - 'UpdateAppConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnectorOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'app_connector.name', - 'fieldAccessors' => [ - 'getAppConnector', - 'getName', - ], - ], - ], - ], - 'GetAppConnector' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAppConnectors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAppConnectors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\AppConnectors\V1\ListAppConnectorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - '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', - ], - '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', - ], - 'templateMap' => [ - 'appConnector' => 'projects/{project}/locations/{location}/appConnectors/{app_connector}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_rest_client_config.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_rest_client_config.php deleted file mode 100644 index 4eb4516f5c91..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/src/V1/resources/app_connectors_service_rest_client_config.php +++ /dev/null @@ -1,272 +0,0 @@ - [ - 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService' => [ - 'CreateAppConnector' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnectors', - 'body' => 'app_connector', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppConnector' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/appConnectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAppConnector' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/appConnectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAppConnectors' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appConnectors', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ReportStatus' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{app_connector=projects/*/locations/*/appConnectors/*}:reportStatus', - 'body' => '*', - 'placeholders' => [ - 'app_connector' => [ - 'getters' => [ - 'getAppConnector', - ], - ], - ], - ], - 'UpdateAppConnector' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{app_connector.name=projects/*/locations/*/appConnectors/*}', - 'body' => 'app_connector', - 'placeholders' => [ - 'app_connector.name' => [ - 'getters' => [ - 'getAppConnector', - '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/*/appConnections/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpAppConnectors/v1/tests/Unit/V1/Client/AppConnectorsServiceClientTest.php b/owl-bot-staging/BeyondCorpAppConnectors/v1/tests/Unit/V1/Client/AppConnectorsServiceClientTest.php deleted file mode 100644 index a8d24ec734d7..000000000000 --- a/owl-bot-staging/BeyondCorpAppConnectors/v1/tests/Unit/V1/Client/AppConnectorsServiceClientTest.php +++ /dev/null @@ -1,1173 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AppConnectorsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AppConnectorsServiceClient($options); - } - - /** @test */ - public function createAppConnectorTest() - { - $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/createAppConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new AppConnector(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAppConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $appConnector = new AppConnector(); - $appConnectorName = 'appConnectorName-1263736873'; - $appConnector->setName($appConnectorName); - $appConnectorPrincipalInfo = new PrincipalInfo(); - $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); - $request = (new CreateAppConnectorRequest()) - ->setParent($formattedParent) - ->setAppConnector($appConnector); - $response = $gapicClient->createAppConnector($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.beyondcorp.appconnectors.v1.AppConnectorsService/CreateAppConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAppConnector(); - $this->assertProtobufEquals($appConnector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAppConnectorTest'); - $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 createAppConnectorExceptionTest() - { - $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/createAppConnectorTest'); - $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]'); - $appConnector = new AppConnector(); - $appConnectorName = 'appConnectorName-1263736873'; - $appConnector->setName($appConnectorName); - $appConnectorPrincipalInfo = new PrincipalInfo(); - $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); - $request = (new CreateAppConnectorRequest()) - ->setParent($formattedParent) - ->setAppConnector($appConnector); - $response = $gapicClient->createAppConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAppConnectorTest'); - 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 deleteAppConnectorTest() - { - $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/deleteAppConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAppConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); - $request = (new DeleteAppConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAppConnector($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.beyondcorp.appconnectors.v1.AppConnectorsService/DeleteAppConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAppConnectorTest'); - $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 deleteAppConnectorExceptionTest() - { - $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/deleteAppConnectorTest'); - $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->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); - $request = (new DeleteAppConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAppConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAppConnectorTest'); - 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 getAppConnectorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new AppConnector(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); - $request = (new GetAppConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->getAppConnector($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.beyondcorp.appconnectors.v1.AppConnectorsService/GetAppConnector', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAppConnectorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); - $request = (new GetAppConnectorRequest()) - ->setName($formattedName); - try { - $gapicClient->getAppConnector($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppConnectorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $appConnectorsElement = new AppConnector(); - $appConnectors = [ - $appConnectorsElement, - ]; - $expectedResponse = new ListAppConnectorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAppConnectors($appConnectors); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAppConnectorsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAppConnectors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAppConnectors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService/ListAppConnectors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppConnectorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListAppConnectorsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAppConnectors($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reportStatusTest() - { - $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/reportStatusTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new AppConnector(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reportStatusTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedAppConnector = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); - $resourceInfo = new ResourceInfo(); - $resourceInfoId = 'resourceInfoId-332404713'; - $resourceInfo->setId($resourceInfoId); - $request = (new ReportStatusRequest()) - ->setAppConnector($formattedAppConnector) - ->setResourceInfo($resourceInfo); - $response = $gapicClient->reportStatus($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.beyondcorp.appconnectors.v1.AppConnectorsService/ReportStatus', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAppConnector(); - $this->assertProtobufEquals($formattedAppConnector, $actualValue); - $actualValue = $actualApiRequestObject->getResourceInfo(); - $this->assertProtobufEquals($resourceInfo, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reportStatusTest'); - $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 reportStatusExceptionTest() - { - $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/reportStatusTest'); - $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 - $formattedAppConnector = $gapicClient->appConnectorName('[PROJECT]', '[LOCATION]', '[APP_CONNECTOR]'); - $resourceInfo = new ResourceInfo(); - $resourceInfoId = 'resourceInfoId-332404713'; - $resourceInfo->setId($resourceInfoId); - $request = (new ReportStatusRequest()) - ->setAppConnector($formattedAppConnector) - ->setResourceInfo($resourceInfo); - $response = $gapicClient->reportStatus($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reportStatusTest'); - 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 updateAppConnectorTest() - { - $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/updateAppConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new AppConnector(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAppConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $appConnector = new AppConnector(); - $appConnectorName = 'appConnectorName-1263736873'; - $appConnector->setName($appConnectorName); - $appConnectorPrincipalInfo = new PrincipalInfo(); - $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); - $request = (new UpdateAppConnectorRequest()) - ->setUpdateMask($updateMask) - ->setAppConnector($appConnector); - $response = $gapicClient->updateAppConnector($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.beyondcorp.appconnectors.v1.AppConnectorsService/UpdateAppConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getAppConnector(); - $this->assertProtobufEquals($appConnector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppConnectorTest'); - $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 updateAppConnectorExceptionTest() - { - $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/updateAppConnectorTest'); - $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(); - $appConnector = new AppConnector(); - $appConnectorName = 'appConnectorName-1263736873'; - $appConnector->setName($appConnectorName); - $appConnectorPrincipalInfo = new PrincipalInfo(); - $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); - $request = (new UpdateAppConnectorRequest()) - ->setUpdateMask($updateMask) - ->setAppConnector($appConnector); - $response = $gapicClient->updateAppConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppConnectorTest'); - 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 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 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 createAppConnectorAsyncTest() - { - $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/createAppConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new AppConnector(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAppConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $appConnector = new AppConnector(); - $appConnectorName = 'appConnectorName-1263736873'; - $appConnector->setName($appConnectorName); - $appConnectorPrincipalInfo = new PrincipalInfo(); - $appConnector->setPrincipalInfo($appConnectorPrincipalInfo); - $request = (new CreateAppConnectorRequest()) - ->setParent($formattedParent) - ->setAppConnector($appConnector); - $response = $gapicClient->createAppConnectorAsync($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.beyondcorp.appconnectors.v1.AppConnectorsService/CreateAppConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAppConnector(); - $this->assertProtobufEquals($appConnector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAppConnectorTest'); - $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/BeyondCorpAppGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appgateways/V1/AppGatewaysService.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Appgateways/V1/AppGatewaysService.php deleted file mode 100644 index 2dd093d5d5bb50785742b236dfb4f10a11d772db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4655 zcmbtY&2JM&6tC@k*kdSWAjC1Px)=l@g|(6*6>Ui9#&%396I+R)rLweIugA{9W_P>0 zPU=Rv^j2^HEzAu;L4@7#uX5?jh>|t zf$JJZS0e>QGkWbpi}Ve>tr(VBkWI4-ns?>CUD%nYkCOi^*~HpW6~Z%X2d_wJ;Lq%}G*#hj zM|R-fHPx0>U3FAhQ@@9}m$;6s*#y)a-rMQvilZ7jM+IuSLS}Dru1>o5nrQ$|OPud$ zok9n&HP>{9Sh}n=OT<gl?wcbhenru4~z47h8kkcy7HZ6570M<;~+X11gP$shh z1(c8*=)aGU_}=w_ue&OER$_cuVtk~;_?`LOv}Z~-RVYWwm|I}EPa+E)N{iI;c=0yO zL^fC+_}#vIAz>&Q;M32 zkefqicc9tBnL;E(*Ib5^%!T}Oh`dBJa#ZB+f#{Gkj7~S^L(b6D^qhH_L?|QxpC4e9 z#drs$6~>c93yfizUdZ`5=T{#eG%;#3fkCQgvhbM{wK#&*CYsRX7SU|LlBV{uZ{{6s zD3aQIl_@Cej@5U=pFwBZs%>g=Ut-xB78}l>L=T9Y@XIfOzeHnB-z3>dc=h4J=clmW z0C8$Kj;m;#9|`2G>SgKC`ewac zTw7f$moguKK&nx!OZAP~*H1FByoAOX33v*f-)xAD;q7Novba$e8*A&8Obkpy@RUu^-nB!lR@jCU7>)v3fjwJ-3Co5v zJ3MI<_$s>OHE&uzGK|`q#%4Iy4_JRp;4D2aR0$N@fD>yA>?BDn{5^>P(*P=O{>OjB z(7B=W8;{(^h6KIyFn52{N;@R)4i5P*UWwko^TY3d{v4mj1^Rik=gvS&L1N5B5@K#3 z5%8}ubar3{!1qRVYCy~n=@dgte)*Ni=8b_EXiGmPf`Lq)+s8k~QD%7Lz$0TjEa^w` zv5!M!TIGY<$iIjkh&Kn$*teC?EAfg;%B@J@MSsJb!NOn8pOiu&I{4tfVkk2_gp7{G zu;hqX^bW*3Xv&*bgUO-1Z90AYc2pv~&$)q*&U^0RfjD#QVE>!QZ#j->3x&e&?ykpW zF!jqlXUn~2xD5k@(=n{=l^1a|2VVp}?e7>(R;CX(i8}piugAWry0ZTG4qq8v&U=5!VfDr+Y21 IkMgoogle.cloud.beyondcorp.appgateways.v1.AppGateway - */ -class AppGateway extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique resource name of the AppGateway. - * The name is ignored when creating an AppGateway. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Timestamp when the resource was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed - * 64 characters. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. A unique identifier for the instance generated by the - * system. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The type of network connectivity used by the AppGateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Output only. The current state of the AppGateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Server-defined URI for this resource. - * - * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri = ''; - /** - * Output only. A list of connections allocated for the Gateway - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection allocated_connections = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $allocated_connections; - /** - * Required. The type of hosting used by the AppGateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType host_type = 11 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $host_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Unique resource name of the AppGateway. - * The name is ignored when creating an AppGateway. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp when the resource was last modified. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Resource labels to represent user provided metadata. - * @type string $display_name - * Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed - * 64 characters. - * @type string $uid - * Output only. A unique identifier for the instance generated by the - * system. - * @type int $type - * Required. The type of network connectivity used by the AppGateway. - * @type int $state - * Output only. The current state of the AppGateway. - * @type string $uri - * Output only. Server-defined URI for this resource. - * @type array<\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\AllocatedConnection>|\Google\Protobuf\Internal\RepeatedField $allocated_connections - * Output only. A list of connections allocated for the Gateway - * @type int $host_type - * Required. The type of hosting used by the AppGateway. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique resource name of the AppGateway. - * The name is ignored when creating an AppGateway. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Unique resource name of the AppGateway. - * The name is ignored when creating an AppGateway. - * - * 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; - } - - /** - * Output only. Timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when the resource was last modified. - * - * 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. Timestamp when the resource was last modified. - * - * 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; - } - - /** - * Optional. Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 4 [(.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. An arbitrary user-provided name for the AppGateway. Cannot exceed - * 64 characters. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed - * 64 characters. - * - * Generated from protobuf field string display_name = 5 [(.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. A unique identifier for the instance generated by the - * system. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A unique identifier for the instance generated by the - * system. - * - * Generated from protobuf field string uid = 6 [(.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 type of network connectivity used by the AppGateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of network connectivity used by the AppGateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.Type type = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. The current state of the AppGateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the AppGateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Server-defined URI for this resource. - * - * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Output only. Server-defined URI for this resource. - * - * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Output only. A list of connections allocated for the Gateway - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection allocated_connections = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllocatedConnections() - { - return $this->allocated_connections; - } - - /** - * Output only. A list of connections allocated for the Gateway - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection allocated_connections = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\AllocatedConnection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllocatedConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\AllocatedConnection::class); - $this->allocated_connections = $arr; - - return $this; - } - - /** - * Required. The type of hosting used by the AppGateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType host_type = 11 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getHostType() - { - return $this->host_type; - } - - /** - * Required. The type of hosting used by the AppGateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType host_type = 11 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setHostType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\HostType::class); - $this->host_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/AllocatedConnection.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/AllocatedConnection.php deleted file mode 100644 index ae86af600c62..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/AllocatedConnection.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection - */ -class AllocatedConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The PSC uri of an allocated connection - * - * Generated from protobuf field string psc_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $psc_uri = ''; - /** - * Required. The ingress port of an allocated connection - * - * Generated from protobuf field int32 ingress_port = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ingress_port = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $psc_uri - * Required. The PSC uri of an allocated connection - * @type int $ingress_port - * Required. The ingress port of an allocated connection - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The PSC uri of an allocated connection - * - * Generated from protobuf field string psc_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPscUri() - { - return $this->psc_uri; - } - - /** - * Required. The PSC uri of an allocated connection - * - * Generated from protobuf field string psc_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPscUri($var) - { - GPBUtil::checkString($var, True); - $this->psc_uri = $var; - - return $this; - } - - /** - * Required. The ingress port of an allocated connection - * - * Generated from protobuf field int32 ingress_port = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getIngressPort() - { - return $this->ingress_port; - } - - /** - * Required. The ingress port of an allocated connection - * - * Generated from protobuf field int32 ingress_port = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setIngressPort($var) - { - GPBUtil::checkInt32($var); - $this->ingress_port = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AllocatedConnection::class, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway_AllocatedConnection::class); - diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/HostType.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/HostType.php deleted file mode 100644 index 0be7ad2a31c9..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/HostType.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType - */ -class HostType -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum HOST_TYPE_UNSPECIFIED = 0; - */ - const HOST_TYPE_UNSPECIFIED = 0; - /** - * AppGateway hosted in a GCP regional managed instance group. - * - * Generated from protobuf enum GCP_REGIONAL_MIG = 1; - */ - const GCP_REGIONAL_MIG = 1; - - private static $valueToName = [ - self::HOST_TYPE_UNSPECIFIED => 'HOST_TYPE_UNSPECIFIED', - self::GCP_REGIONAL_MIG => 'GCP_REGIONAL_MIG', - ]; - - 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(HostType::class, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway_HostType::class); - diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/State.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/State.php deleted file mode 100644 index ab280c73a846..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.AppGateway.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * AppGateway is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * AppGateway has been created. - * - * Generated from protobuf enum CREATED = 2; - */ - const CREATED = 2; - /** - * AppGateway's configuration is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * AppGateway is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * AppGateway is down and may be restored in the future. - * This happens when CCFE sends ProjectState = OFF. - * - * Generated from protobuf enum DOWN = 5; - */ - const DOWN = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::CREATED => 'CREATED', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::DOWN => 'DOWN', - ]; - - 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\BeyondCorp\AppGateways\V1\AppGateway_State::class); - diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/Type.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/Type.php deleted file mode 100644 index 237bf4a3fd35..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGateway/Type.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.AppGateway.Type - */ -class Type -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * TCP Proxy based BeyondCorp Connection. API will default to this if unset. - * - * Generated from protobuf enum TCP_PROXY = 1; - */ - const TCP_PROXY = 1; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::TCP_PROXY => 'TCP_PROXY', - ]; - - 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\BeyondCorp\AppGateways\V1\AppGateway_Type::class); - diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGatewayOperationMetadata.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGatewayOperationMetadata.php deleted file mode 100644 index cc45976fe154..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/AppGatewayOperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.AppGatewayOperationMetadata - */ -class AppGatewayOperationMetadata 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\Beyondcorp\Appgateways\V1\AppGatewaysService::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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/CreateAppGatewayRequest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/CreateAppGatewayRequest.php deleted file mode 100644 index 1462f6d587f3..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/CreateAppGatewayRequest.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest - */ -class CreateAppGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource project name of the AppGateway location using the - * form: `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. User-settable AppGateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string app_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $app_gateway_id = ''; - /** - * Required. A BeyondCorp AppGateway resource. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_gateway = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource project name of the AppGateway location using the - * form: `projects/{project_id}/locations/{location_id}` - * Please see {@see AppGatewaysServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway $appGateway Required. A BeyondCorp AppGateway resource. - * @param string $appGatewayId Optional. User-settable AppGateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * @return \Google\Cloud\BeyondCorp\AppGateways\V1\CreateAppGatewayRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway $appGateway, string $appGatewayId): self - { - return (new self()) - ->setParent($parent) - ->setAppGateway($appGateway) - ->setAppGatewayId($appGatewayId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource project name of the AppGateway location using the - * form: `projects/{project_id}/locations/{location_id}` - * @type string $app_gateway_id - * Optional. User-settable AppGateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * @type \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway $app_gateway - * Required. A BeyondCorp AppGateway resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource project name of the AppGateway location using the - * form: `projects/{project_id}/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 project name of the AppGateway location using the - * form: `projects/{project_id}/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. User-settable AppGateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string app_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAppGatewayId() - { - return $this->app_gateway_id; - } - - /** - * Optional. User-settable AppGateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string app_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAppGatewayId($var) - { - GPBUtil::checkString($var, True); - $this->app_gateway_id = $var; - - return $this; - } - - /** - * Required. A BeyondCorp AppGateway resource. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway|null - */ - public function getAppGateway() - { - return $this->app_gateway; - } - - public function hasAppGateway() - { - return isset($this->app_gateway); - } - - public function clearAppGateway() - { - unset($this->app_gateway); - } - - /** - * Required. A BeyondCorp AppGateway resource. - * - * Generated from protobuf field .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway $var - * @return $this - */ - public function setAppGateway($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway::class); - $this->app_gateway = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/DeleteAppGatewayRequest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/DeleteAppGatewayRequest.php deleted file mode 100644 index 0dd9bed3f1c3..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/DeleteAppGatewayRequest.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest - */ -class DeleteAppGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $name Required. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - * Please see {@see AppGatewaysServiceClient::appGatewayName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppGateways\V1\DeleteAppGatewayRequest - * - * @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. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_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. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * 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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/GetAppGatewayRequest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/GetAppGatewayRequest.php deleted file mode 100644 index f19a8b563b82..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/GetAppGatewayRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest - */ -class GetAppGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - * Please see {@see AppGatewaysServiceClient::appGatewayName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppGateways\V1\GetAppGatewayRequest - * - * @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. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_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. BeyondCorp AppGateway name using the form: - * `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysRequest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysRequest.php deleted file mode 100644 index 7fde412ec54b..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysRequest.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest - */ -class ListAppGatewaysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the AppGateway location using the form: - * `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to - * determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous - * ListAppGatewaysRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter specifying constraints of a list operation. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * 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 AppGateway location using the form: - * `projects/{project_id}/locations/{location_id}` - * Please see {@see AppGatewaysServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\AppGateways\V1\ListAppGatewaysRequest - * - * @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 AppGateway location using the form: - * `projects/{project_id}/locations/{location_id}` - * @type int $page_size - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to - * determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The next_page_token value returned from a previous - * ListAppGatewaysRequest, if any. - * @type string $filter - * Optional. A filter specifying constraints of a list operation. - * @type string $order_by - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the AppGateway location using the form: - * `projects/{project_id}/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 AppGateway location using the form: - * `projects/{project_id}/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. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to - * determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to - * determine if there are more instances left to be queried. - * - * 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. The next_page_token value returned from a previous - * ListAppGatewaysRequest, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous - * ListAppGatewaysRequest, if any. - * - * 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. A filter specifying constraints of a list operation. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter specifying constraints of a list operation. - * - * 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. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * 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/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysResponse.php b/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysResponse.php deleted file mode 100644 index 757bac5b484a..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/proto/src/Google/Cloud/BeyondCorp/AppGateways/V1/ListAppGatewaysResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse - */ -class ListAppGatewaysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of BeyondCorp AppGateways in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateways = 1; - */ - private $app_gateways; - /** - * A 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 = ''; - /** - * A list of 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\BeyondCorp\AppGateways\V1\AppGateway>|\Google\Protobuf\Internal\RepeatedField $app_gateways - * A list of BeyondCorp AppGateways in the project. - * @type string $next_page_token - * A 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 - * A list of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * A list of BeyondCorp AppGateways in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateways = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAppGateways() - { - return $this->app_gateways; - } - - /** - * A list of BeyondCorp AppGateways in the project. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway app_gateways = 1; - * @param array<\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAppGateways($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway::class); - $this->app_gateways = $arr; - - return $this; - } - - /** - * A 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; - } - - /** - * A 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; - } - - /** - * A list of 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; - } - - /** - * A list of 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/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/create_app_gateway.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/create_app_gateway.php deleted file mode 100644 index cc4f12844f92..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/create_app_gateway.php +++ /dev/null @@ -1,102 +0,0 @@ -setName($appGatewayName) - ->setType($appGatewayType) - ->setHostType($appGatewayHostType); - $request = (new CreateAppGatewayRequest()) - ->setParent($formattedParent) - ->setAppGateway($appGateway); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appGatewaysServiceClient->createAppGateway($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AppGateway $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 = AppGatewaysServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $appGatewayName = '[NAME]'; - $appGatewayType = Type::TYPE_UNSPECIFIED; - $appGatewayHostType = HostType::HOST_TYPE_UNSPECIFIED; - - create_app_gateway_sample($formattedParent, $appGatewayName, $appGatewayType, $appGatewayHostType); -} -// [END beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/delete_app_gateway.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/delete_app_gateway.php deleted file mode 100644 index cbe88510a8d9..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/delete_app_gateway.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appGatewaysServiceClient->deleteAppGateway($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 = AppGatewaysServiceClient::appGatewayName( - '[PROJECT]', - '[LOCATION]', - '[APP_GATEWAY]' - ); - - delete_app_gateway_sample($formattedName); -} -// [END beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_app_gateway.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_app_gateway.php deleted file mode 100644 index 70f628baa129..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_app_gateway.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AppGateway $response */ - $response = $appGatewaysServiceClient->getAppGateway($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 = AppGatewaysServiceClient::appGatewayName( - '[PROJECT]', - '[LOCATION]', - '[APP_GATEWAY]' - ); - - get_app_gateway_sample($formattedName); -} -// [END beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_iam_policy.php deleted file mode 100644 index 996fa9d50caf..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/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 = $appGatewaysServiceClient->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 beyondcorp_v1_generated_AppGatewaysService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_location.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/get_location.php deleted file mode 100644 index cb466ac0f4c5..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/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 beyondcorp_v1_generated_AppGatewaysService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_app_gateways.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_app_gateways.php deleted file mode 100644 index a1838da39d45..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_app_gateways.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $appGatewaysServiceClient->listAppGateways($request); - - /** @var AppGateway $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 = AppGatewaysServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_app_gateways_sample($formattedParent); -} -// [END beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/list_locations.php deleted file mode 100644 index 2bff3d26f2b9..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/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 beyondcorp_v1_generated_AppGatewaysService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/set_iam_policy.php deleted file mode 100644 index 083c84078eee..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/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 = $appGatewaysServiceClient->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 beyondcorp_v1_generated_AppGatewaysService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/test_iam_permissions.php deleted file mode 100644 index d1dcf2c86d2a..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/samples/V1/AppGatewaysServiceClient/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 = $appGatewaysServiceClient->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 beyondcorp_v1_generated_AppGatewaysService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/Client/AppGatewaysServiceClient.php b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/Client/AppGatewaysServiceClient.php deleted file mode 100644 index 8f003674c6da..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/Client/AppGatewaysServiceClient.php +++ /dev/null @@ -1,564 +0,0 @@ - createAppGatewayAsync(CreateAppGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAppGatewayAsync(DeleteAppGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAppGatewayAsync(GetAppGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAppGatewaysAsync(ListAppGatewaysRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class AppGatewaysServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/app_gateways_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/app_gateways_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/app_gateways_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/app_gateways_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a app_gateway - * resource. - * - * @param string $project - * @param string $location - * @param string $appGateway - * - * @return string The formatted app_gateway resource. - */ - public static function appGatewayName(string $project, string $location, string $appGateway): string - { - return self::getPathTemplate('appGateway')->render([ - 'project' => $project, - 'location' => $location, - 'app_gateway' => $appGateway, - ]); - } - - /** - * 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 - * - appGateway: projects/{project}/locations/{location}/appGateways/{app_gateway} - * - 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 'beyondcorp.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 new AppGateway in a given project and location. - * - * The async variant is {@see AppGatewaysServiceClient::createAppGatewayAsync()} . - * - * @example samples/V1/AppGatewaysServiceClient/create_app_gateway.php - * - * @param CreateAppGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createAppGateway(CreateAppGatewayRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAppGateway', $request, $callOptions)->wait(); - } - - /** - * Deletes a single AppGateway. - * - * The async variant is {@see AppGatewaysServiceClient::deleteAppGatewayAsync()} . - * - * @example samples/V1/AppGatewaysServiceClient/delete_app_gateway.php - * - * @param DeleteAppGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteAppGateway(DeleteAppGatewayRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAppGateway', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single AppGateway. - * - * The async variant is {@see AppGatewaysServiceClient::getAppGatewayAsync()} . - * - * @example samples/V1/AppGatewaysServiceClient/get_app_gateway.php - * - * @param GetAppGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AppGateway - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAppGateway(GetAppGatewayRequest $request, array $callOptions = []): AppGateway - { - return $this->startApiCall('GetAppGateway', $request, $callOptions)->wait(); - } - - /** - * Lists AppGateways in a given project and location. - * - * The async variant is {@see AppGatewaysServiceClient::listAppGatewaysAsync()} . - * - * @example samples/V1/AppGatewaysServiceClient/list_app_gateways.php - * - * @param ListAppGatewaysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAppGateways(ListAppGatewaysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAppGateways', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AppGatewaysServiceClient::getLocationAsync()} . - * - * @example samples/V1/AppGatewaysServiceClient/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 AppGatewaysServiceClient::listLocationsAsync()} . - * - * @example samples/V1/AppGatewaysServiceClient/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); - } - - /** - * 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 AppGatewaysServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/AppGatewaysServiceClient/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 AppGatewaysServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/AppGatewaysServiceClient/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 AppGatewaysServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/AppGatewaysServiceClient/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(); - } -} diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 7a4405a3cc86..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.beyondcorp.appgateways.v1", - "libraryPackage": "Google\\Cloud\\BeyondCorp\\AppGateways\\V1", - "services": { - "AppGatewaysService": { - "clients": { - "grpc": { - "libraryClient": "AppGatewaysServiceGapicClient", - "rpcs": { - "CreateAppGateway": { - "methods": [ - "createAppGateway" - ] - }, - "DeleteAppGateway": { - "methods": [ - "deleteAppGateway" - ] - }, - "GetAppGateway": { - "methods": [ - "getAppGateway" - ] - }, - "ListAppGateways": { - "methods": [ - "listAppGateways" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_client_config.json b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_client_config.json deleted file mode 100644 index 17dd44bd7ca4..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_client_config.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "interfaces": { - "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService": { - "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": { - "CreateAppGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteAppGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetAppGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAppGateways": { - "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" - }, - "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" - } - } - } - } -} diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_descriptor_config.php b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_descriptor_config.php deleted file mode 100644 index 8100e79b67a2..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_descriptor_config.php +++ /dev/null @@ -1,175 +0,0 @@ - [ - 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService' => [ - 'CreateAppGateway' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppGateways\V1\AppGatewayOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppGateway' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\AppGateways\V1\AppGatewayOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAppGateway' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAppGateways' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAppGateways', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\AppGateways\V1\ListAppGatewaysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - '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', - ], - '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', - ], - 'templateMap' => [ - 'appGateway' => 'projects/{project}/locations/{location}/appGateways/{app_gateway}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_rest_client_config.php b/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_rest_client_config.php deleted file mode 100644 index b1d9ab39bc31..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/src/V1/resources/app_gateways_service_rest_client_config.php +++ /dev/null @@ -1,244 +0,0 @@ - [ - 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService' => [ - 'CreateAppGateway' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appGateways', - 'body' => 'app_gateway', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppGateway' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/appGateways/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAppGateway' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/appGateways/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAppGateways' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/appGateways', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - '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/*/appConnections/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpAppGateways/v1/tests/Unit/V1/Client/AppGatewaysServiceClientTest.php b/owl-bot-staging/BeyondCorpAppGateways/v1/tests/Unit/V1/Client/AppGatewaysServiceClientTest.php deleted file mode 100644 index 70fdb804f5ce..000000000000 --- a/owl-bot-staging/BeyondCorpAppGateways/v1/tests/Unit/V1/Client/AppGatewaysServiceClientTest.php +++ /dev/null @@ -1,904 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AppGatewaysServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AppGatewaysServiceClient($options); - } - - /** @test */ - public function createAppGatewayTest() - { - $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/createAppGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $uri = 'uri116076'; - $expectedResponse = new AppGateway(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAppGatewayTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $appGateway = new AppGateway(); - $appGatewayName = 'appGatewayName-1786203634'; - $appGateway->setName($appGatewayName); - $appGatewayType = Type::TYPE_UNSPECIFIED; - $appGateway->setType($appGatewayType); - $appGatewayHostType = HostType::HOST_TYPE_UNSPECIFIED; - $appGateway->setHostType($appGatewayHostType); - $request = (new CreateAppGatewayRequest()) - ->setParent($formattedParent) - ->setAppGateway($appGateway); - $response = $gapicClient->createAppGateway($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.beyondcorp.appgateways.v1.AppGatewaysService/CreateAppGateway', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAppGateway(); - $this->assertProtobufEquals($appGateway, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAppGatewayTest'); - $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 createAppGatewayExceptionTest() - { - $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/createAppGatewayTest'); - $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]'); - $appGateway = new AppGateway(); - $appGatewayName = 'appGatewayName-1786203634'; - $appGateway->setName($appGatewayName); - $appGatewayType = Type::TYPE_UNSPECIFIED; - $appGateway->setType($appGatewayType); - $appGatewayHostType = HostType::HOST_TYPE_UNSPECIFIED; - $appGateway->setHostType($appGatewayHostType); - $request = (new CreateAppGatewayRequest()) - ->setParent($formattedParent) - ->setAppGateway($appGateway); - $response = $gapicClient->createAppGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAppGatewayTest'); - 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 deleteAppGatewayTest() - { - $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/deleteAppGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAppGatewayTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->appGatewayName('[PROJECT]', '[LOCATION]', '[APP_GATEWAY]'); - $request = (new DeleteAppGatewayRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAppGateway($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.beyondcorp.appgateways.v1.AppGatewaysService/DeleteAppGateway', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAppGatewayTest'); - $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 deleteAppGatewayExceptionTest() - { - $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/deleteAppGatewayTest'); - $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->appGatewayName('[PROJECT]', '[LOCATION]', '[APP_GATEWAY]'); - $request = (new DeleteAppGatewayRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAppGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAppGatewayTest'); - 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 getAppGatewayTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $uri = 'uri116076'; - $expectedResponse = new AppGateway(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->appGatewayName('[PROJECT]', '[LOCATION]', '[APP_GATEWAY]'); - $request = (new GetAppGatewayRequest()) - ->setName($formattedName); - $response = $gapicClient->getAppGateway($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.beyondcorp.appgateways.v1.AppGatewaysService/GetAppGateway', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAppGatewayExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->appGatewayName('[PROJECT]', '[LOCATION]', '[APP_GATEWAY]'); - $request = (new GetAppGatewayRequest()) - ->setName($formattedName); - try { - $gapicClient->getAppGateway($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppGatewaysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $appGatewaysElement = new AppGateway(); - $appGateways = [ - $appGatewaysElement, - ]; - $expectedResponse = new ListAppGatewaysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAppGateways($appGateways); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAppGatewaysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAppGateways($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAppGateways()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.beyondcorp.appgateways.v1.AppGatewaysService/ListAppGateways', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppGatewaysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListAppGatewaysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAppGateways($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 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 createAppGatewayAsyncTest() - { - $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/createAppGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $uri = 'uri116076'; - $expectedResponse = new AppGateway(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAppGatewayTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $appGateway = new AppGateway(); - $appGatewayName = 'appGatewayName-1786203634'; - $appGateway->setName($appGatewayName); - $appGatewayType = Type::TYPE_UNSPECIFIED; - $appGateway->setType($appGatewayType); - $appGatewayHostType = HostType::HOST_TYPE_UNSPECIFIED; - $appGateway->setHostType($appGatewayHostType); - $request = (new CreateAppGatewayRequest()) - ->setParent($formattedParent) - ->setAppGateway($appGateway); - $response = $gapicClient->createAppGatewayAsync($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.beyondcorp.appgateways.v1.AppGatewaysService/CreateAppGateway', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAppGateway(); - $this->assertProtobufEquals($appGateway, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAppGatewayTest'); - $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/BeyondCorpClientConnectorServices/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientconnectorservices/V1/ClientConnectorServicesService.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientconnectorservices/V1/ClientConnectorServicesService.php deleted file mode 100644 index 6282c792c478acc175fcb4581b7fc86cd64e134e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6575 zcmcIpO>Em#94ASewy!X{2ODX|he?N41~@bzgi;DPZB~l9CS+MBMkLE|URtlNZEUBd zRK0LRd`Td2LPFxefje9{!ExN+HX#8Lr=2;Vo%p{GJ6UT-P04y`{6794zyIfZ@0Hh_ zO$W_L%fuqC=98Ax+>`uGA~~+@+q!K^%}%>bTuHaL9m6E9EJ;fhX{}P1%1bNtCt<5+ zcU+wmr48HOFiBoF?M^G-Bzv~i(rwp)0fSh+Zd(@7ecSbjyJP6Y%kRvIDK(r^gUR5B z%)~&*(zc1`XgZOWtEJ1t*IJsdHI^C2#vN7uGHmhKz2CD9EPODD5W zOPnTMd)~1D*aaz2ph~d@oEs~aPh3kg8%xB~UBdyms<5^+cBvxYu?uJB@Xx24RCK? z+jgS&GJkpQRYQ1((rSgya0y~^HZ&hK<^}ZeGwAxg3r1Yvv}G3PayQUnATsRaow@8I zLLSXAM9}ld&OXsI(WZ7+o5Jv7!F108S6Ej}&4?+pYr?!8noukX(h^G~5Mz1HWg852 zNQ7{OA6SDg$o)Qv&PL}8d>W0=)Raj`iP?!#>Q5z!Uqq9-OCXi1lujlIGn0j^%w^>i zK@2%GIo*|_yE+aeHL)voyj|1i{+8i6rnaXtF-8J05_l7hflC8oUM9_m)dCR)u$vsM zw!FeAbA{U|O*o@5#^|jfGAc8|oKFjl(kw?Zgplh2 zPnMW~Who6F{iiaDKLUwbkfIEWZU55P68^UPq^osETvw@p?^JyHc&x>T0!CsaF;&tLjx4C@-#D zS}8A0-G|3es=ipAN|dJ1DTBuVZC=2D*&h-p&Ak=Bi;zQzOIqrVqYKx0XNVYaHgc8m zSa)=Ao~O`6_=z)U5|rMx-K|gnu6PNfsa`Akdk)FnK%>n4@fmdbN?oa!59xeA8egoH zmHNus@>BxD*VXD0|4P!YrSfW-&86@p8mnDhTcZm{@HiS-s$5%}8pRW6v|OuIYE$Xr z=ZV|OrwR0YPto9c5$b{`LyMV@PB{2F1i=kxAHDp(_;rvsZJihE{C@EBKol21I$4qIUxv`QqZIJq%A7?LjCHX=R)M-6lI0)JuI+YnlYKPR&k$ zPr`vD#vp+`F5Ojng*66ut=vyZG_%MGcC-To{Dx=$S#&NAdevxk6IB8-NhWS3^N*q0 zh*w!~LYI3ym8Hkuvgm;wIQg(1#kNfDbmPo(b6*37S6TbgAH!~!!%{L$)KR@r*h+Je z`k}zvt08)76be0|cmxHC5Jv&SoMxK#uDWe_9+U?bmI9$~AS{=NNqo{Dp&@xS%_Ti% zWTD1PMTNZEj8r)x!ePpTJkw2!DLjMD3Ot}J>l&QMO_Nm*)*UnbQ?zhGAyR>` z2Zz86ZD&~qP8EK906iWJj3-JA{wj&i^+~*V{Uq764?&Tave$-Amsg0~>Mcc7ybpf+ z`-|iPo~Ktf`@9G)ga!FxPa(b-TY&M0Ni-ds({cSIO2m>2pc!IX$h~<>VMo2Yu%L&o z7$jmlk&6fT-z0jpU&+BIvS~kx0V0nDIQN{H~8 z=~qSG^nJ%G=JUI|yCSB;GnCfxHzEDNrTBAjHRQK#cf0gY61@cHt04RbxC1K9^e=qu zuArK@?r@p{L3)google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService - */ -class ClientConnectorService extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of resource. The name is ignored during creation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. [Output only] Create time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. [Output only] Update time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User-provided name. - * The display name should follow certain format. - * * Must be 6 to 30 characters in length. - * * Can only contain lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Required. The details of the ingress settings. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ingress = null; - /** - * Required. The details of the egress settings. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $egress = null; - /** - * Output only. The operational state of the ClientConnectorService. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of resource. The name is ignored during creation. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create time stamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update time stamp. - * @type string $display_name - * Optional. User-provided name. - * The display name should follow certain format. - * * Must be 6 to 30 characters in length. - * * Can only contain lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress $ingress - * Required. The details of the ingress settings. - * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress $egress - * Required. The details of the egress settings. - * @type int $state - * Output only. The operational state of the ClientConnectorService. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of resource. The name is ignored during creation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of resource. The name is ignored during creation. - * - * 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; - } - - /** - * Output only. [Output only] Create time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Update time stamp. - * - * 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. [Output only] Update time stamp. - * - * 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; - } - - /** - * Optional. User-provided name. - * The display name should follow certain format. - * * Must be 6 to 30 characters in length. - * * Can only contain lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User-provided name. - * The display name should follow certain format. - * * Must be 6 to 30 characters in length. - * * Can only contain lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * - * 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; - } - - /** - * Required. The details of the ingress settings. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress|null - */ - public function getIngress() - { - return $this->ingress; - } - - public function hasIngress() - { - return isset($this->ingress); - } - - public function clearIngress() - { - unset($this->ingress); - } - - /** - * Required. The details of the ingress settings. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress $var - * @return $this - */ - public function setIngress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress::class); - $this->ingress = $var; - - return $this; - } - - /** - * Required. The details of the egress settings. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress|null - */ - public function getEgress() - { - return $this->egress; - } - - public function hasEgress() - { - return isset($this->egress); - } - - public function clearEgress() - { - unset($this->egress); - } - - /** - * Required. The details of the egress settings. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress $var - * @return $this - */ - public function setEgress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress::class); - $this->egress = $var; - - return $this; - } - - /** - * Output only. The operational state of the ClientConnectorService. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The operational state of the ClientConnectorService. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress.php deleted file mode 100644 index 44f15504298f..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress - */ -class Egress extends \Google\Protobuf\Internal\Message -{ - protected $destination_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress\PeeredVpc $peered_vpc - * A VPC from the consumer project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * A VPC from the consumer project. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress\PeeredVpc|null - */ - public function getPeeredVpc() - { - return $this->readOneof(1); - } - - public function hasPeeredVpc() - { - return $this->hasOneof(1); - } - - /** - * A VPC from the consumer project. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; - * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress\PeeredVpc $var - * @return $this - */ - public function setPeeredVpc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Egress\PeeredVpc::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestinationType() - { - return $this->whichOneof("destination_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Egress::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Egress::class); - diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress/PeeredVpc.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress/PeeredVpc.php deleted file mode 100644 index cb600f930cf7..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Egress/PeeredVpc.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc - */ -class PeeredVpc extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the peered VPC owned by the consumer project. - * - * Generated from protobuf field string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_vpc = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_vpc - * Required. The name of the peered VPC owned by the consumer project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the peered VPC owned by the consumer project. - * - * Generated from protobuf field string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkVpc() - { - return $this->network_vpc; - } - - /** - * Required. The name of the peered VPC owned by the consumer project. - * - * Generated from protobuf field string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkVpc($var) - { - GPBUtil::checkString($var, True); - $this->network_vpc = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PeeredVpc::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Egress_PeeredVpc::class); - diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress.php deleted file mode 100644 index 3d5145bd439d..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress - */ -class Ingress extends \Google\Protobuf\Internal\Message -{ - protected $ingress_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config $config - * The basic ingress config for ClientGateways. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * The basic ingress config for ClientGateways. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config|null - */ - public function getConfig() - { - return $this->readOneof(1); - } - - public function hasConfig() - { - return $this->hasOneof(1); - } - - /** - * The basic ingress config for ClientGateways. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; - * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getIngressConfig() - { - return $this->whichOneof("ingress_config"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Ingress::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Ingress::class); - diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config.php deleted file mode 100644 index ed18102df8ba..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config - */ -class Config extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. The transport protocol used between the client and - * the server. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $transport_protocol = 0; - /** - * Required. The settings used to configure basic ClientGateways. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $destination_routes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $transport_protocol - * Required. Immutable. The transport protocol used between the client and - * the server. - * @type array<\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config\DestinationRoute>|\Google\Protobuf\Internal\RepeatedField $destination_routes - * Required. The settings used to configure basic ClientGateways. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. The transport protocol used between the client and - * the server. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getTransportProtocol() - { - return $this->transport_protocol; - } - - /** - * Required. Immutable. The transport protocol used between the client and - * the server. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setTransportProtocol($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config\TransportProtocol::class); - $this->transport_protocol = $var; - - return $this; - } - - /** - * Required. The settings used to configure basic ClientGateways. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinationRoutes() - { - return $this->destination_routes; - } - - /** - * Required. The settings used to configure basic ClientGateways. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config\DestinationRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinationRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config\DestinationRoute::class); - $this->destination_routes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Config::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Ingress_Config::class); - diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/DestinationRoute.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/DestinationRoute.php deleted file mode 100644 index 42f139cc3904..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/DestinationRoute.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute - */ -class DestinationRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The network address of the subnet - * for which the packet is routed to the ClientGateway. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $address = ''; - /** - * Required. The network mask of the subnet - * for which the packet is routed to the ClientGateway. - * - * Generated from protobuf field string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $netmask = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address - * Required. The network address of the subnet - * for which the packet is routed to the ClientGateway. - * @type string $netmask - * Required. The network mask of the subnet - * for which the packet is routed to the ClientGateway. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The network address of the subnet - * for which the packet is routed to the ClientGateway. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Required. The network address of the subnet - * for which the packet is routed to the ClientGateway. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * Required. The network mask of the subnet - * for which the packet is routed to the ClientGateway. - * - * Generated from protobuf field string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetmask() - { - return $this->netmask; - } - - /** - * Required. The network mask of the subnet - * for which the packet is routed to the ClientGateway. - * - * Generated from protobuf field string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetmask($var) - { - GPBUtil::checkString($var, True); - $this->netmask = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DestinationRoute::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Ingress_Config_DestinationRoute::class); - diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/TransportProtocol.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/TransportProtocol.php deleted file mode 100644 index 988fe0a16327..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/Ingress/Config/TransportProtocol.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol - */ -class TransportProtocol -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum TRANSPORT_PROTOCOL_UNSPECIFIED = 0; - */ - const TRANSPORT_PROTOCOL_UNSPECIFIED = 0; - /** - * TCP protocol. - * - * Generated from protobuf enum TCP = 1; - */ - const TCP = 1; - - private static $valueToName = [ - self::TRANSPORT_PROTOCOL_UNSPECIFIED => 'TRANSPORT_PROTOCOL_UNSPECIFIED', - self::TCP => 'TCP', - ]; - - 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(TransportProtocol::class, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_Ingress_Config_TransportProtocol::class); - diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/State.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/State.php deleted file mode 100644 index effe28bb052a..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorService/State.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * ClientConnectorService is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * ClientConnectorService is being updated. - * - * Generated from protobuf enum UPDATING = 2; - */ - const UPDATING = 2; - /** - * ClientConnectorService is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * ClientConnectorService is running. - * - * Generated from protobuf enum RUNNING = 4; - */ - const RUNNING = 4; - /** - * ClientConnectorService is down and may be restored in the future. - * This happens when CCFE sends ProjectState = OFF. - * - * Generated from protobuf enum DOWN = 5; - */ - const DOWN = 5; - /** - * ClientConnectorService encountered an error and is in an indeterministic - * state. - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::RUNNING => 'RUNNING', - self::DOWN => 'DOWN', - 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\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService_State::class); - diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorServiceOperationMetadata.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorServiceOperationMetadata.php deleted file mode 100644 index 844551d17009..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ClientConnectorServiceOperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata - */ -class ClientConnectorServiceOperationMetadata 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\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/CreateClientConnectorServiceRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/CreateClientConnectorServiceRequest.php deleted file mode 100644 index 0a95214649da..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/CreateClientConnectorServiceRequest.php +++ /dev/null @@ -1,301 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest - */ -class CreateClientConnectorServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. User-settable client connector service resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * A random system generated name will be assigned - * if not specified by the user. - * - * Generated from protobuf field string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $client_connector_service_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_connector_service = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see ClientConnectorServicesServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $clientConnectorService Required. The resource being created. - * @param string $clientConnectorServiceId Optional. User-settable client connector service resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * A random system generated name will be assigned - * if not specified by the user. - * - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\CreateClientConnectorServiceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $clientConnectorService, string $clientConnectorServiceId): self - { - return (new self()) - ->setParent($parent) - ->setClientConnectorService($clientConnectorService) - ->setClientConnectorServiceId($clientConnectorServiceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $client_connector_service_id - * Optional. User-settable client connector service resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * A random system generated name will be assigned - * if not specified by the user. - * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $client_connector_service - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. User-settable client connector service resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * A random system generated name will be assigned - * if not specified by the user. - * - * Generated from protobuf field string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClientConnectorServiceId() - { - return $this->client_connector_service_id; - } - - /** - * Optional. User-settable client connector service resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * A random system generated name will be assigned - * if not specified by the user. - * - * Generated from protobuf field string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClientConnectorServiceId($var) - { - GPBUtil::checkString($var, True); - $this->client_connector_service_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService|null - */ - public function getClientConnectorService() - { - return $this->client_connector_service; - } - - public function hasClientConnectorService() - { - return isset($this->client_connector_service); - } - - public function clearClientConnectorService() - { - unset($this->client_connector_service); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $var - * @return $this - */ - public function setClientConnectorService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService::class); - $this->client_connector_service = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/DeleteClientConnectorServiceRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/DeleteClientConnectorServiceRequest.php deleted file mode 100644 index 191baa3fdc0e..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/DeleteClientConnectorServiceRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest - */ -class DeleteClientConnectorServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see ClientConnectorServicesServiceClient::clientConnectorServiceName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\DeleteClientConnectorServiceRequest - * - * @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. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * 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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/GetClientConnectorServiceRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/GetClientConnectorServiceRequest.php deleted file mode 100644 index 375cdd935d62..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/GetClientConnectorServiceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest - */ -class GetClientConnectorServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see ClientConnectorServicesServiceClient::clientConnectorServiceName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\GetClientConnectorServiceRequest - * - * @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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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. Name of the resource. - * - * 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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesRequest.php deleted file mode 100644 index 5f92bfb0a749..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest - */ -class ListClientConnectorServicesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListClientConnectorServicesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListClientConnectorServicesRequest. Please see - * {@see ClientConnectorServicesServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ListClientConnectorServicesRequest - * - * @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. Parent value for ListClientConnectorServicesRequest. - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Filtering results. - * @type string $order_by - * Optional. Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListClientConnectorServicesRequest. - * - * 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. Parent value for ListClientConnectorServicesRequest. - * - * 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. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * 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. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering results. - * - * 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. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Hint for how to order the results. - * - * 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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesResponse.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesResponse.php deleted file mode 100644 index 606e1598f06e..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/ListClientConnectorServicesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse - */ -class ListClientConnectorServicesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of ClientConnectorService. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; - */ - private $client_connector_services; - /** - * A token identifying a page of results the server should return. - * - * 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\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService>|\Google\Protobuf\Internal\RepeatedField $client_connector_services - * The list of ClientConnectorService. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * The list of ClientConnectorService. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClientConnectorServices() - { - return $this->client_connector_services; - } - - /** - * The list of ClientConnectorService. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; - * @param array<\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClientConnectorServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService::class); - $this->client_connector_services = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/UpdateClientConnectorServiceRequest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/UpdateClientConnectorServiceRequest.php deleted file mode 100644 index d972d609914e..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/proto/src/Google/Cloud/BeyondCorp/ClientConnectorServices/V1/UpdateClientConnectorServiceRequest.php +++ /dev/null @@ -1,308 +0,0 @@ -google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest - */ -class UpdateClientConnectorServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * ClientConnectorService resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * Mutable fields: display_name. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_connector_service = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - /** - * Optional. If set as true, will create the resource if it is not found. - * - * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - - /** - * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $clientConnectorService Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * ClientConnectorService resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Mutable fields: display_name. - * - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\UpdateClientConnectorServiceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $clientConnectorService, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setClientConnectorService($clientConnectorService) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * ClientConnectorService resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * Mutable fields: display_name. - * @type \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $client_connector_service - * Required. The resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * @type bool $allow_missing - * Optional. If set as true, will create the resource if it is not found. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientconnectorservices\V1\ClientConnectorServicesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * ClientConnectorService resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * Mutable fields: display_name. - * - * 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. Field mask is used to specify the fields to be overwritten in the - * ClientConnectorService resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * Mutable fields: display_name. - * - * 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. The resource being updated. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService|null - */ - public function getClientConnectorService() - { - return $this->client_connector_service; - } - - public function hasClientConnectorService() - { - return isset($this->client_connector_service); - } - - public function clearClientConnectorService() - { - unset($this->client_connector_service); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService $var - * @return $this - */ - public function setClientConnectorService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService::class); - $this->client_connector_service = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * 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; - } - - /** - * Optional. If set as true, will create the resource if it is not found. - * - * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. If set as true, will create the resource if it is not found. - * - * Generated from protobuf field bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php deleted file mode 100644 index 470f65418ff7..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php +++ /dev/null @@ -1,96 +0,0 @@ -setName($clientConnectorServiceName) - ->setIngress($clientConnectorServiceIngress) - ->setEgress($clientConnectorServiceEgress); - $request = (new CreateClientConnectorServiceRequest()) - ->setParent($formattedParent) - ->setClientConnectorService($clientConnectorService); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clientConnectorServicesServiceClient->createClientConnectorService($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ClientConnectorService $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 = ClientConnectorServicesServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $clientConnectorServiceName = '[NAME]'; - - create_client_connector_service_sample($formattedParent, $clientConnectorServiceName); -} -// [END beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php deleted file mode 100644 index 32795152c60a..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clientConnectorServicesServiceClient->deleteClientConnectorService($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 = ClientConnectorServicesServiceClient::clientConnectorServiceName( - '[PROJECT]', - '[LOCATION]', - '[CLIENT_CONNECTOR_SERVICE]' - ); - - delete_client_connector_service_sample($formattedName); -} -// [END beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php deleted file mode 100644 index df0d1d1beb4f..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ClientConnectorService $response */ - $response = $clientConnectorServicesServiceClient->getClientConnectorService($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 = ClientConnectorServicesServiceClient::clientConnectorServiceName( - '[PROJECT]', - '[LOCATION]', - '[CLIENT_CONNECTOR_SERVICE]' - ); - - get_client_connector_service_sample($formattedName); -} -// [END beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_iam_policy.php deleted file mode 100644 index b341bdb728ed..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/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 = $clientConnectorServicesServiceClient->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 beyondcorp_v1_generated_ClientConnectorServicesService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_location.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/get_location.php deleted file mode 100644 index a6d52b4a274a..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/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 beyondcorp_v1_generated_ClientConnectorServicesService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php deleted file mode 100644 index 7ef63bc8ddb1..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $clientConnectorServicesServiceClient->listClientConnectorServices($request); - - /** @var ClientConnectorService $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 = ClientConnectorServicesServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_client_connector_services_sample($formattedParent); -} -// [END beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/list_locations.php deleted file mode 100644 index f4b343381f1b..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/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 beyondcorp_v1_generated_ClientConnectorServicesService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/set_iam_policy.php deleted file mode 100644 index f9dbbecda9bb..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/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 = $clientConnectorServicesServiceClient->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 beyondcorp_v1_generated_ClientConnectorServicesService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/test_iam_permissions.php deleted file mode 100644 index 59dd05dccdb7..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/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 = $clientConnectorServicesServiceClient->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 beyondcorp_v1_generated_ClientConnectorServicesService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php deleted file mode 100644 index 270ef0c9aaef..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($clientConnectorServiceName) - ->setIngress($clientConnectorServiceIngress) - ->setEgress($clientConnectorServiceEgress); - $request = (new UpdateClientConnectorServiceRequest()) - ->setUpdateMask($updateMask) - ->setClientConnectorService($clientConnectorService); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clientConnectorServicesServiceClient->updateClientConnectorService($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ClientConnectorService $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 -{ - $clientConnectorServiceName = '[NAME]'; - - update_client_connector_service_sample($clientConnectorServiceName); -} -// [END beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_sync] diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/Client/ClientConnectorServicesServiceClient.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/Client/ClientConnectorServicesServiceClient.php deleted file mode 100644 index fd0b2fca9dbf..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/Client/ClientConnectorServicesServiceClient.php +++ /dev/null @@ -1,602 +0,0 @@ - createClientConnectorServiceAsync(CreateClientConnectorServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClientConnectorServiceAsync(DeleteClientConnectorServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClientConnectorServiceAsync(GetClientConnectorServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClientConnectorServicesAsync(ListClientConnectorServicesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClientConnectorServiceAsync(UpdateClientConnectorServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class ClientConnectorServicesServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/client_connector_services_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/client_connector_services_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/client_connector_services_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/client_connector_services_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * client_connector_service resource. - * - * @param string $project - * @param string $location - * @param string $clientConnectorService - * - * @return string The formatted client_connector_service resource. - */ - public static function clientConnectorServiceName(string $project, string $location, string $clientConnectorService): string - { - return self::getPathTemplate('clientConnectorService')->render([ - 'project' => $project, - 'location' => $location, - 'client_connector_service' => $clientConnectorService, - ]); - } - - /** - * 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 - * - clientConnectorService: projects/{project}/locations/{location}/clientConnectorServices/{client_connector_service} - * - 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 'beyondcorp.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 new ClientConnectorService in a given project and location. - * - * The async variant is - * {@see ClientConnectorServicesServiceClient::createClientConnectorServiceAsync()} - * . - * - * @example samples/V1/ClientConnectorServicesServiceClient/create_client_connector_service.php - * - * @param CreateClientConnectorServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createClientConnectorService(CreateClientConnectorServiceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateClientConnectorService', $request, $callOptions)->wait(); - } - - /** - * Deletes a single ClientConnectorService. - * - * The async variant is - * {@see ClientConnectorServicesServiceClient::deleteClientConnectorServiceAsync()} - * . - * - * @example samples/V1/ClientConnectorServicesServiceClient/delete_client_connector_service.php - * - * @param DeleteClientConnectorServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteClientConnectorService(DeleteClientConnectorServiceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteClientConnectorService', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ClientConnectorService. - * - * The async variant is - * {@see ClientConnectorServicesServiceClient::getClientConnectorServiceAsync()} . - * - * @example samples/V1/ClientConnectorServicesServiceClient/get_client_connector_service.php - * - * @param GetClientConnectorServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ClientConnectorService - * - * @throws ApiException Thrown if the API call fails. - */ - public function getClientConnectorService(GetClientConnectorServiceRequest $request, array $callOptions = []): ClientConnectorService - { - return $this->startApiCall('GetClientConnectorService', $request, $callOptions)->wait(); - } - - /** - * Lists ClientConnectorServices in a given project and location. - * - * The async variant is - * {@see ClientConnectorServicesServiceClient::listClientConnectorServicesAsync()} - * . - * - * @example samples/V1/ClientConnectorServicesServiceClient/list_client_connector_services.php - * - * @param ListClientConnectorServicesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listClientConnectorServices(ListClientConnectorServicesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClientConnectorServices', $request, $callOptions); - } - - /** - * Updates the parameters of a single ClientConnectorService. - * - * The async variant is - * {@see ClientConnectorServicesServiceClient::updateClientConnectorServiceAsync()} - * . - * - * @example samples/V1/ClientConnectorServicesServiceClient/update_client_connector_service.php - * - * @param UpdateClientConnectorServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateClientConnectorService(UpdateClientConnectorServiceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateClientConnectorService', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is - * {@see ClientConnectorServicesServiceClient::getLocationAsync()} . - * - * @example samples/V1/ClientConnectorServicesServiceClient/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 ClientConnectorServicesServiceClient::listLocationsAsync()} . - * - * @example samples/V1/ClientConnectorServicesServiceClient/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); - } - - /** - * 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 ClientConnectorServicesServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/ClientConnectorServicesServiceClient/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 ClientConnectorServicesServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/ClientConnectorServicesServiceClient/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 ClientConnectorServicesServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/ClientConnectorServicesServiceClient/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(); - } -} diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 720b69b26a56..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.beyondcorp.clientconnectorservices.v1", - "libraryPackage": "Google\\Cloud\\BeyondCorp\\ClientConnectorServices\\V1", - "services": { - "ClientConnectorServicesService": { - "clients": { - "grpc": { - "libraryClient": "ClientConnectorServicesServiceGapicClient", - "rpcs": { - "CreateClientConnectorService": { - "methods": [ - "createClientConnectorService" - ] - }, - "DeleteClientConnectorService": { - "methods": [ - "deleteClientConnectorService" - ] - }, - "GetClientConnectorService": { - "methods": [ - "getClientConnectorService" - ] - }, - "ListClientConnectorServices": { - "methods": [ - "listClientConnectorServices" - ] - }, - "UpdateClientConnectorService": { - "methods": [ - "updateClientConnectorService" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_client_config.json b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_client_config.json deleted file mode 100644 index 28b8380f1ff7..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_client_config.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "interfaces": { - "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService": { - "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": { - "CreateClientConnectorService": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteClientConnectorService": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetClientConnectorService": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListClientConnectorServices": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateClientConnectorService": { - "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" - }, - "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" - } - } - } - } -} diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_descriptor_config.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_descriptor_config.php deleted file mode 100644 index 0dbda905ab14..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_descriptor_config.php +++ /dev/null @@ -1,195 +0,0 @@ - [ - 'google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService' => [ - 'CreateClientConnectorService' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorServiceOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteClientConnectorService' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorServiceOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateClientConnectorService' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorServiceOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'client_connector_service.name', - 'fieldAccessors' => [ - 'getClientConnectorService', - 'getName', - ], - ], - ], - ], - 'GetClientConnectorService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListClientConnectorServices' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClientConnectorServices', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ListClientConnectorServicesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - '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', - ], - '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', - ], - 'templateMap' => [ - 'clientConnectorService' => 'projects/{project}/locations/{location}/clientConnectorServices/{client_connector_service}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_rest_client_config.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_rest_client_config.php deleted file mode 100644 index ae310fcb8790..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/src/V1/resources/client_connector_services_service_rest_client_config.php +++ /dev/null @@ -1,260 +0,0 @@ - [ - 'google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService' => [ - 'CreateClientConnectorService' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientConnectorServices', - 'body' => 'client_connector_service', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteClientConnectorService' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientConnectorServices/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetClientConnectorService' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientConnectorServices/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListClientConnectorServices' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientConnectorServices', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateClientConnectorService' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{client_connector_service.name=projects/*/locations/*/clientConnectorServices/*}', - 'body' => 'client_connector_service', - 'placeholders' => [ - 'client_connector_service.name' => [ - 'getters' => [ - 'getClientConnectorService', - '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/*/appConnections/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpClientConnectorServices/v1/tests/Unit/V1/Client/ClientConnectorServicesServiceClientTest.php b/owl-bot-staging/BeyondCorpClientConnectorServices/v1/tests/Unit/V1/Client/ClientConnectorServicesServiceClientTest.php deleted file mode 100644 index df045ae7b20d..000000000000 --- a/owl-bot-staging/BeyondCorpClientConnectorServices/v1/tests/Unit/V1/Client/ClientConnectorServicesServiceClientTest.php +++ /dev/null @@ -1,1037 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ClientConnectorServicesServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ClientConnectorServicesServiceClient($options); - } - - /** @test */ - public function createClientConnectorServiceTest() - { - $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/createClientConnectorServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ClientConnectorService(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClientConnectorServiceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientConnectorService = new ClientConnectorService(); - $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; - $clientConnectorService->setName($clientConnectorServiceName); - $clientConnectorServiceIngress = new Ingress(); - $clientConnectorService->setIngress($clientConnectorServiceIngress); - $clientConnectorServiceEgress = new Egress(); - $clientConnectorService->setEgress($clientConnectorServiceEgress); - $request = (new CreateClientConnectorServiceRequest()) - ->setParent($formattedParent) - ->setClientConnectorService($clientConnectorService); - $response = $gapicClient->createClientConnectorService($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/CreateClientConnectorService', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClientConnectorService(); - $this->assertProtobufEquals($clientConnectorService, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientConnectorServiceTest'); - $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 createClientConnectorServiceExceptionTest() - { - $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/createClientConnectorServiceTest'); - $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]'); - $clientConnectorService = new ClientConnectorService(); - $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; - $clientConnectorService->setName($clientConnectorServiceName); - $clientConnectorServiceIngress = new Ingress(); - $clientConnectorService->setIngress($clientConnectorServiceIngress); - $clientConnectorServiceEgress = new Egress(); - $clientConnectorService->setEgress($clientConnectorServiceEgress); - $request = (new CreateClientConnectorServiceRequest()) - ->setParent($formattedParent) - ->setClientConnectorService($clientConnectorService); - $response = $gapicClient->createClientConnectorService($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientConnectorServiceTest'); - 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 deleteClientConnectorServiceTest() - { - $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/deleteClientConnectorServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClientConnectorServiceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clientConnectorServiceName('[PROJECT]', '[LOCATION]', '[CLIENT_CONNECTOR_SERVICE]'); - $request = (new DeleteClientConnectorServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClientConnectorService($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/DeleteClientConnectorService', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientConnectorServiceTest'); - $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 deleteClientConnectorServiceExceptionTest() - { - $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/deleteClientConnectorServiceTest'); - $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->clientConnectorServiceName('[PROJECT]', '[LOCATION]', '[CLIENT_CONNECTOR_SERVICE]'); - $request = (new DeleteClientConnectorServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClientConnectorService($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientConnectorServiceTest'); - 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 getClientConnectorServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ClientConnectorService(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clientConnectorServiceName('[PROJECT]', '[LOCATION]', '[CLIENT_CONNECTOR_SERVICE]'); - $request = (new GetClientConnectorServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->getClientConnectorService($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/GetClientConnectorService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClientConnectorServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clientConnectorServiceName('[PROJECT]', '[LOCATION]', '[CLIENT_CONNECTOR_SERVICE]'); - $request = (new GetClientConnectorServiceRequest()) - ->setName($formattedName); - try { - $gapicClient->getClientConnectorService($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClientConnectorServicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clientConnectorServicesElement = new ClientConnectorService(); - $clientConnectorServices = [ - $clientConnectorServicesElement, - ]; - $expectedResponse = new ListClientConnectorServicesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClientConnectorServices($clientConnectorServices); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClientConnectorServicesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClientConnectorServices($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClientConnectorServices()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/ListClientConnectorServices', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClientConnectorServicesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListClientConnectorServicesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClientConnectorServices($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateClientConnectorServiceTest() - { - $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/updateClientConnectorServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ClientConnectorService(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClientConnectorServiceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $clientConnectorService = new ClientConnectorService(); - $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; - $clientConnectorService->setName($clientConnectorServiceName); - $clientConnectorServiceIngress = new Ingress(); - $clientConnectorService->setIngress($clientConnectorServiceIngress); - $clientConnectorServiceEgress = new Egress(); - $clientConnectorService->setEgress($clientConnectorServiceEgress); - $request = (new UpdateClientConnectorServiceRequest()) - ->setUpdateMask($updateMask) - ->setClientConnectorService($clientConnectorService); - $response = $gapicClient->updateClientConnectorService($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/UpdateClientConnectorService', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getClientConnectorService(); - $this->assertProtobufEquals($clientConnectorService, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClientConnectorServiceTest'); - $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 updateClientConnectorServiceExceptionTest() - { - $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/updateClientConnectorServiceTest'); - $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(); - $clientConnectorService = new ClientConnectorService(); - $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; - $clientConnectorService->setName($clientConnectorServiceName); - $clientConnectorServiceIngress = new Ingress(); - $clientConnectorService->setIngress($clientConnectorServiceIngress); - $clientConnectorServiceEgress = new Egress(); - $clientConnectorService->setEgress($clientConnectorServiceEgress); - $request = (new UpdateClientConnectorServiceRequest()) - ->setUpdateMask($updateMask) - ->setClientConnectorService($clientConnectorService); - $response = $gapicClient->updateClientConnectorService($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClientConnectorServiceTest'); - 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 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 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 createClientConnectorServiceAsyncTest() - { - $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/createClientConnectorServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ClientConnectorService(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClientConnectorServiceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientConnectorService = new ClientConnectorService(); - $clientConnectorServiceName = 'clientConnectorServiceName1804966078'; - $clientConnectorService->setName($clientConnectorServiceName); - $clientConnectorServiceIngress = new Ingress(); - $clientConnectorService->setIngress($clientConnectorServiceIngress); - $clientConnectorServiceEgress = new Egress(); - $clientConnectorService->setEgress($clientConnectorServiceEgress); - $request = (new CreateClientConnectorServiceRequest()) - ->setParent($formattedParent) - ->setClientConnectorService($clientConnectorService); - $response = $gapicClient->createClientConnectorServiceAsync($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.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/CreateClientConnectorService', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClientConnectorService(); - $this->assertProtobufEquals($clientConnectorService, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientConnectorServiceTest'); - $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/BeyondCorpClientGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientgateways/V1/ClientGatewaysService.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/GPBMetadata/Google/Cloud/Beyondcorp/Clientgateways/V1/ClientGatewaysService.php deleted file mode 100644 index 64586f6a1acbc37bc95213293e8ec6afcdb13f13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4281 zcmb_f&2Jk;6vuXwCKKAEQ>Ar`D2rQ^4>h|=s07-QR_l*ik=n#KNkPccYP}viTQ$WMhf=-9Hf^P3ShDlse5Gq^3=GKl-t!(VP z4WgbMxH^%Au5EWsBI%|bw51j~vaPmmyACWE#PYkK{7^gcq=QwyqDD)qN8AHLCt`Rf zLYB5qJV(=sP^*_76JKjYHV%zFCUZ!$MMh^U3NxgmhE$Jb~@h_{H1o5_F6N z_;Z4mY3PFIYd-wDZFs6-8NQ*J#utFWy3o-~kASArXFGwV`-W`^RA9@}$>Ng0bkei8 z9UCxP7b0`(6h?rsxncRlwKTI?A)f9Uj&HklI4a9s;>Y0AmBl4~Emdc9ghghfET1xR zUGUw2BySf4m-vBe-3#re3VQLc<`6Iy$7m{+Wm6Pv%ai54Pkj|H6J+p?CiBoBX1hf8 zv;)I-M-y!jo@nPb@{w(I-N3R8tJ~aiXnK$4WE{I40}|5L_MPDthcREdZ}12!?RFf{ zhfp$$aR_KY7SNybsP;eA3SMH0#IWeZe$l}~vMR)b)xr&ar{);E09m~i-b!qAXnfQb z4-h{vpE%(1DDbUYe9P=ZE!i>D0~dtl4YeTo5uWTo@t+*JoGMm)6^&6A$Y+Gi;#4X3 zo07$M(X{RoC}x$4=d-Xgy;cyJ0Zb9-7UNh^sT`FG9N-Twl{=qQ1C7(FBl$5ne`W1{ zbj#T=izz?EZK{P?GJ~>4J3k&dl*8|!Jd2X5+m=OiV1$SX^Aqv0;!`vpYQb~p>h_MZ zQ&o32x9ipN#>0(jW%f1vI+`pus>;sBW^Fb@zjo^t_LZeymFlBvxR=Az=u%^MbCVt% z!;@&Nvh~sC>^Po6W-|KP6V4CP$cT8GH>*bPN+1JInySIEN-}w@qBN zb<~ezrubb36^0q_IY6lde~4z%?t0)x4s!SXSIsIgd&VN4`)a~=S`JfS_HY_3t~NB zQv!oiHqkuhHhrB%H&fQc?_ktd4e}~w+;i~iDw-r#dn77`n({Rl+MRx(KKYuBT zUvBM}Ni>(j!{cos{v(6%=_|MM@yXj*_ zj_WZQFDFQNd60bZvkaOYdViBE&?$#M^WpGDV( zFcBUF`62R=Z*NBUBpMwtuBGA+nG;1C>|xF*yyr@Dfkp04n!*M?fq_C?D#cfbwmd+O z_^%AQHiV=`!fA;7IdM8ZQQkvygDqQi-|>&|nQ$diWSK!RQi>EFpD6P$?QDKk#6914 zJXw+s4-a{?google.cloud.beyondcorp.clientgateways.v1.ClientGateway - */ -class ClientGateway extends \Google\Protobuf\Internal\Message -{ - /** - * Required. name of resource. The name is ignored during creation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. [Output only] Create time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. [Output only] Update time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The operational state of the gateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A unique identifier for the instance generated by the system. - * - * Generated from protobuf field string id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * Output only. The client connector service name that the client gateway is - * associated to. Client Connector Services, named as follows: - * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. - * - * Generated from protobuf field string client_connector_service = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $client_connector_service = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. name of resource. The name is ignored during creation. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create time stamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update time stamp. - * @type int $state - * Output only. The operational state of the gateway. - * @type string $id - * Output only. A unique identifier for the instance generated by the system. - * @type string $client_connector_service - * Output only. The client connector service name that the client gateway is - * associated to. Client Connector Services, named as follows: - * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. name of resource. The name is ignored during creation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. name of resource. The name is ignored during creation. - * - * 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; - } - - /** - * Output only. [Output only] Create time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Update time stamp. - * - * 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. [Output only] Update time stamp. - * - * 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. The operational state of the gateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The operational state of the gateway. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A unique identifier for the instance generated by the system. - * - * Generated from protobuf field string id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. A unique identifier for the instance generated by the system. - * - * Generated from protobuf field string id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Output only. The client connector service name that the client gateway is - * associated to. Client Connector Services, named as follows: - * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. - * - * Generated from protobuf field string client_connector_service = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClientConnectorService() - { - return $this->client_connector_service; - } - - /** - * Output only. The client connector service name that the client gateway is - * associated to. Client Connector Services, named as follows: - * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. - * - * Generated from protobuf field string client_connector_service = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClientConnectorService($var) - { - GPBUtil::checkString($var, True); - $this->client_connector_service = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway/State.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway/State.php deleted file mode 100644 index f22273017c96..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGateway/State.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Gateway is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Gateway is being updated. - * - * Generated from protobuf enum UPDATING = 2; - */ - const UPDATING = 2; - /** - * Gateway is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Gateway is running. - * - * Generated from protobuf enum RUNNING = 4; - */ - const RUNNING = 4; - /** - * Gateway is down and may be restored in the future. - * This happens when CCFE sends ProjectState = OFF. - * - * Generated from protobuf enum DOWN = 5; - */ - const DOWN = 5; - /** - * ClientGateway encountered an error and is in indeterministic state. - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::RUNNING => 'RUNNING', - self::DOWN => 'DOWN', - 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\BeyondCorp\ClientGateways\V1\ClientGateway_State::class); - diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGatewayOperationMetadata.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGatewayOperationMetadata.php deleted file mode 100644 index eebce8959553..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ClientGatewayOperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.beyondcorp.clientgateways.v1.ClientGatewayOperationMetadata - */ -class ClientGatewayOperationMetadata 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 been cancelled successfully - * 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 been cancelled successfully - * 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\Beyondcorp\Clientgateways\V1\ClientGatewaysService::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 been cancelled successfully - * 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 been cancelled successfully - * 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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/CreateClientGatewayRequest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/CreateClientGatewayRequest.php deleted file mode 100644 index 09b409646d7a..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/CreateClientGatewayRequest.php +++ /dev/null @@ -1,290 +0,0 @@ -google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest - */ -class CreateClientGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. User-settable client gateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string client_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $client_gateway_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_gateway = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see ClientGatewaysServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway $clientGateway Required. The resource being created. - * @param string $clientGatewayId Optional. User-settable client gateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\CreateClientGatewayRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway $clientGateway, string $clientGatewayId): self - { - return (new self()) - ->setParent($parent) - ->setClientGateway($clientGateway) - ->setClientGatewayId($clientGatewayId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $client_gateway_id - * Optional. User-settable client gateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * @type \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway $client_gateway - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. User-settable client gateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string client_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClientGatewayId() - { - return $this->client_gateway_id; - } - - /** - * Optional. User-settable client gateway resource ID. - * * Must start with a letter. - * * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - * * Must end with a number or a letter. - * - * Generated from protobuf field string client_gateway_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClientGatewayId($var) - { - GPBUtil::checkString($var, True); - $this->client_gateway_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway|null - */ - public function getClientGateway() - { - return $this->client_gateway; - } - - public function hasClientGateway() - { - return isset($this->client_gateway); - } - - public function clearClientGateway() - { - unset($this->client_gateway); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway $var - * @return $this - */ - public function setClientGateway($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway::class); - $this->client_gateway = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 5 [(.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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/DeleteClientGatewayRequest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/DeleteClientGatewayRequest.php deleted file mode 100644 index 4ebd3346210c..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/DeleteClientGatewayRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest - */ -class DeleteClientGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $name Required. Name of the resource - * Please see {@see ClientGatewaysServiceClient::clientGatewayName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\DeleteClientGatewayRequest - * - * @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. Name of the resource - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * 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. Name of the resource - * - * 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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validates request by executing a dry-run which would not - * alter the resource in any way. - * - * 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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/GetClientGatewayRequest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/GetClientGatewayRequest.php deleted file mode 100644 index 34aa28bf8694..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/GetClientGatewayRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest - */ -class GetClientGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see ClientGatewaysServiceClient::clientGatewayName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\GetClientGatewayRequest - * - * @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. Name of the resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * 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. Name of the resource - * - * 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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysRequest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysRequest.php deleted file mode 100644 index 4c7efdb4e0d1..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest - */ -class ListClientGatewaysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListClientGatewaysRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListClientGatewaysRequest. Please see - * {@see ClientGatewaysServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BeyondCorp\ClientGateways\V1\ListClientGatewaysRequest - * - * @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. Parent value for ListClientGatewaysRequest. - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Filtering results. - * @type string $order_by - * Optional. Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListClientGatewaysRequest. - * - * 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. Parent value for ListClientGatewaysRequest. - * - * 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. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * 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. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering results. - * - * 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. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Hint for how to order the results. - * - * 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/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysResponse.php b/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysResponse.php deleted file mode 100644 index 41559467cdc4..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/proto/src/Google/Cloud/BeyondCorp/ClientGateways/V1/ListClientGatewaysResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse - */ -class ListClientGatewaysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of ClientGateway. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateways = 1; - */ - private $client_gateways; - /** - * A token identifying a page of results the server should return. - * - * 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\BeyondCorp\ClientGateways\V1\ClientGateway>|\Google\Protobuf\Internal\RepeatedField $client_gateways - * The list of ClientGateway. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Beyondcorp\Clientgateways\V1\ClientGatewaysService::initOnce(); - parent::__construct($data); - } - - /** - * The list of ClientGateway. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateways = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClientGateways() - { - return $this->client_gateways; - } - - /** - * The list of ClientGateway. - * - * Generated from protobuf field repeated .google.cloud.beyondcorp.clientgateways.v1.ClientGateway client_gateways = 1; - * @param array<\Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClientGateways($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway::class); - $this->client_gateways = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/create_client_gateway.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/create_client_gateway.php deleted file mode 100644 index 97a045e3ce95..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/create_client_gateway.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($clientGatewayName); - $request = (new CreateClientGatewayRequest()) - ->setParent($formattedParent) - ->setClientGateway($clientGateway); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clientGatewaysServiceClient->createClientGateway($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ClientGateway $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 = ClientGatewaysServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $clientGatewayName = '[NAME]'; - - create_client_gateway_sample($formattedParent, $clientGatewayName); -} -// [END beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php deleted file mode 100644 index 7ff430162461..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clientGatewaysServiceClient->deleteClientGateway($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 = ClientGatewaysServiceClient::clientGatewayName( - '[PROJECT]', - '[LOCATION]', - '[CLIENT_GATEWAY]' - ); - - delete_client_gateway_sample($formattedName); -} -// [END beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_client_gateway.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_client_gateway.php deleted file mode 100644 index 1e113cbd841f..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_client_gateway.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ClientGateway $response */ - $response = $clientGatewaysServiceClient->getClientGateway($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 = ClientGatewaysServiceClient::clientGatewayName( - '[PROJECT]', - '[LOCATION]', - '[CLIENT_GATEWAY]' - ); - - get_client_gateway_sample($formattedName); -} -// [END beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_iam_policy.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_iam_policy.php deleted file mode 100644 index eb57c1d037ba..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/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 = $clientGatewaysServiceClient->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 beyondcorp_v1_generated_ClientGatewaysService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_location.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/get_location.php deleted file mode 100644 index 1596f24d637c..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/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 beyondcorp_v1_generated_ClientGatewaysService_GetLocation_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_client_gateways.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_client_gateways.php deleted file mode 100644 index 668f730cde0b..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_client_gateways.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $clientGatewaysServiceClient->listClientGateways($request); - - /** @var ClientGateway $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 = ClientGatewaysServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_client_gateways_sample($formattedParent); -} -// [END beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_locations.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/list_locations.php deleted file mode 100644 index 621532f73343..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/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 beyondcorp_v1_generated_ClientGatewaysService_ListLocations_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/set_iam_policy.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/set_iam_policy.php deleted file mode 100644 index f9bbc4cb80d6..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/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 = $clientGatewaysServiceClient->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 beyondcorp_v1_generated_ClientGatewaysService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/test_iam_permissions.php b/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/test_iam_permissions.php deleted file mode 100644 index 15cad423794d..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/samples/V1/ClientGatewaysServiceClient/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 = $clientGatewaysServiceClient->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 beyondcorp_v1_generated_ClientGatewaysService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/Client/ClientGatewaysServiceClient.php b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/Client/ClientGatewaysServiceClient.php deleted file mode 100644 index e2d7bbf546db..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/Client/ClientGatewaysServiceClient.php +++ /dev/null @@ -1,565 +0,0 @@ - createClientGatewayAsync(CreateClientGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClientGatewayAsync(DeleteClientGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClientGatewayAsync(GetClientGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClientGatewaysAsync(ListClientGatewaysRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class ClientGatewaysServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'beyondcorp.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'beyondcorp.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/client_gateways_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/client_gateways_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/client_gateways_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/client_gateways_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * client_gateway resource. - * - * @param string $project - * @param string $location - * @param string $clientGateway - * - * @return string The formatted client_gateway resource. - */ - public static function clientGatewayName(string $project, string $location, string $clientGateway): string - { - return self::getPathTemplate('clientGateway')->render([ - 'project' => $project, - 'location' => $location, - 'client_gateway' => $clientGateway, - ]); - } - - /** - * 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 - * - clientGateway: projects/{project}/locations/{location}/clientGateways/{client_gateway} - * - 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 'beyondcorp.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 new ClientGateway in a given project and location. - * - * The async variant is - * {@see ClientGatewaysServiceClient::createClientGatewayAsync()} . - * - * @example samples/V1/ClientGatewaysServiceClient/create_client_gateway.php - * - * @param CreateClientGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createClientGateway(CreateClientGatewayRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateClientGateway', $request, $callOptions)->wait(); - } - - /** - * Deletes a single ClientGateway. - * - * The async variant is - * {@see ClientGatewaysServiceClient::deleteClientGatewayAsync()} . - * - * @example samples/V1/ClientGatewaysServiceClient/delete_client_gateway.php - * - * @param DeleteClientGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteClientGateway(DeleteClientGatewayRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteClientGateway', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ClientGateway. - * - * The async variant is {@see ClientGatewaysServiceClient::getClientGatewayAsync()} - * . - * - * @example samples/V1/ClientGatewaysServiceClient/get_client_gateway.php - * - * @param GetClientGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ClientGateway - * - * @throws ApiException Thrown if the API call fails. - */ - public function getClientGateway(GetClientGatewayRequest $request, array $callOptions = []): ClientGateway - { - return $this->startApiCall('GetClientGateway', $request, $callOptions)->wait(); - } - - /** - * Lists ClientGateways in a given project and location. - * - * The async variant is - * {@see ClientGatewaysServiceClient::listClientGatewaysAsync()} . - * - * @example samples/V1/ClientGatewaysServiceClient/list_client_gateways.php - * - * @param ListClientGatewaysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listClientGateways(ListClientGatewaysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClientGateways', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ClientGatewaysServiceClient::getLocationAsync()} . - * - * @example samples/V1/ClientGatewaysServiceClient/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 ClientGatewaysServiceClient::listLocationsAsync()} . - * - * @example samples/V1/ClientGatewaysServiceClient/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); - } - - /** - * 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 ClientGatewaysServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/ClientGatewaysServiceClient/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 ClientGatewaysServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/ClientGatewaysServiceClient/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 ClientGatewaysServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/ClientGatewaysServiceClient/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(); - } -} diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/gapic_metadata.json deleted file mode 100644 index cb3b63e30fc4..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.beyondcorp.clientgateways.v1", - "libraryPackage": "Google\\Cloud\\BeyondCorp\\ClientGateways\\V1", - "services": { - "ClientGatewaysService": { - "clients": { - "grpc": { - "libraryClient": "ClientGatewaysServiceGapicClient", - "rpcs": { - "CreateClientGateway": { - "methods": [ - "createClientGateway" - ] - }, - "DeleteClientGateway": { - "methods": [ - "deleteClientGateway" - ] - }, - "GetClientGateway": { - "methods": [ - "getClientGateway" - ] - }, - "ListClientGateways": { - "methods": [ - "listClientGateways" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_client_config.json b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_client_config.json deleted file mode 100644 index 582868412a6b..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_client_config.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "interfaces": { - "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService": { - "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": { - "CreateClientGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteClientGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetClientGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListClientGateways": { - "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" - }, - "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" - } - } - } - } -} diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_descriptor_config.php b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_descriptor_config.php deleted file mode 100644 index feae5f92322d..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_descriptor_config.php +++ /dev/null @@ -1,175 +0,0 @@ - [ - 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService' => [ - 'CreateClientGateway' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGatewayOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteClientGateway' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGatewayOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetClientGateway' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListClientGateways' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClientGateways', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BeyondCorp\ClientGateways\V1\ListClientGatewaysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - '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', - ], - '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', - ], - 'templateMap' => [ - 'clientGateway' => 'projects/{project}/locations/{location}/clientGateways/{client_gateway}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_rest_client_config.php b/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_rest_client_config.php deleted file mode 100644 index 903cf45ad886..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/src/V1/resources/client_gateways_service_rest_client_config.php +++ /dev/null @@ -1,244 +0,0 @@ - [ - 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService' => [ - 'CreateClientGateway' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientGateways', - 'body' => 'client_gateway', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteClientGateway' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientGateways/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetClientGateway' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientGateways/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListClientGateways' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientGateways', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - '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/*/appConnections/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnections/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appConnectors/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/appGateways/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientConnectorServices/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientGateways/*}: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/BeyondCorpClientGateways/v1/tests/Unit/V1/Client/ClientGatewaysServiceClientTest.php b/owl-bot-staging/BeyondCorpClientGateways/v1/tests/Unit/V1/Client/ClientGatewaysServiceClientTest.php deleted file mode 100644 index 10b4c88e9557..000000000000 --- a/owl-bot-staging/BeyondCorpClientGateways/v1/tests/Unit/V1/Client/ClientGatewaysServiceClientTest.php +++ /dev/null @@ -1,884 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ClientGatewaysServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ClientGatewaysServiceClient($options); - } - - /** @test */ - public function createClientGatewayTest() - { - $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/createClientGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $id = 'id3355'; - $clientConnectorService = 'clientConnectorService-1152817841'; - $expectedResponse = new ClientGateway(); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setClientConnectorService($clientConnectorService); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClientGatewayTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientGateway = new ClientGateway(); - $clientGatewayName = 'clientGatewayName-1795593692'; - $clientGateway->setName($clientGatewayName); - $request = (new CreateClientGatewayRequest()) - ->setParent($formattedParent) - ->setClientGateway($clientGateway); - $response = $gapicClient->createClientGateway($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.beyondcorp.clientgateways.v1.ClientGatewaysService/CreateClientGateway', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClientGateway(); - $this->assertProtobufEquals($clientGateway, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientGatewayTest'); - $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 createClientGatewayExceptionTest() - { - $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/createClientGatewayTest'); - $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]'); - $clientGateway = new ClientGateway(); - $clientGatewayName = 'clientGatewayName-1795593692'; - $clientGateway->setName($clientGatewayName); - $request = (new CreateClientGatewayRequest()) - ->setParent($formattedParent) - ->setClientGateway($clientGateway); - $response = $gapicClient->createClientGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientGatewayTest'); - 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 deleteClientGatewayTest() - { - $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/deleteClientGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClientGatewayTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clientGatewayName('[PROJECT]', '[LOCATION]', '[CLIENT_GATEWAY]'); - $request = (new DeleteClientGatewayRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClientGateway($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.beyondcorp.clientgateways.v1.ClientGatewaysService/DeleteClientGateway', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientGatewayTest'); - $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 deleteClientGatewayExceptionTest() - { - $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/deleteClientGatewayTest'); - $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->clientGatewayName('[PROJECT]', '[LOCATION]', '[CLIENT_GATEWAY]'); - $request = (new DeleteClientGatewayRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClientGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientGatewayTest'); - 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 getClientGatewayTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $id = 'id3355'; - $clientConnectorService = 'clientConnectorService-1152817841'; - $expectedResponse = new ClientGateway(); - $expectedResponse->setName($name2); - $expectedResponse->setId($id); - $expectedResponse->setClientConnectorService($clientConnectorService); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clientGatewayName('[PROJECT]', '[LOCATION]', '[CLIENT_GATEWAY]'); - $request = (new GetClientGatewayRequest()) - ->setName($formattedName); - $response = $gapicClient->getClientGateway($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.beyondcorp.clientgateways.v1.ClientGatewaysService/GetClientGateway', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClientGatewayExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clientGatewayName('[PROJECT]', '[LOCATION]', '[CLIENT_GATEWAY]'); - $request = (new GetClientGatewayRequest()) - ->setName($formattedName); - try { - $gapicClient->getClientGateway($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClientGatewaysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clientGatewaysElement = new ClientGateway(); - $clientGateways = [ - $clientGatewaysElement, - ]; - $expectedResponse = new ListClientGatewaysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClientGateways($clientGateways); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClientGatewaysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClientGateways($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClientGateways()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService/ListClientGateways', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClientGatewaysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListClientGatewaysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClientGateways($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 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 createClientGatewayAsyncTest() - { - $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/createClientGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $id = 'id3355'; - $clientConnectorService = 'clientConnectorService-1152817841'; - $expectedResponse = new ClientGateway(); - $expectedResponse->setName($name); - $expectedResponse->setId($id); - $expectedResponse->setClientConnectorService($clientConnectorService); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClientGatewayTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientGateway = new ClientGateway(); - $clientGatewayName = 'clientGatewayName-1795593692'; - $clientGateway->setName($clientGatewayName); - $request = (new CreateClientGatewayRequest()) - ->setParent($formattedParent) - ->setClientGateway($clientGateway); - $response = $gapicClient->createClientGatewayAsync($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.beyondcorp.clientgateways.v1.ClientGatewaysService/CreateClientGateway', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClientGateway(); - $this->assertProtobufEquals($clientGateway, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientGatewayTest'); - $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/BigQueryAnalyticsHub/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Analyticshub/V1/Analyticshub.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Analyticshub/V1/Analyticshub.php deleted file mode 100644 index 91016b17f55154d23fe898c649a98ff6727550b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16329 zcmc&*O>i4Y72c5(Cu!M^+>R4RNr-lm>?S5FZM+L)l}$DyX=01DEUl!N-C$6Sq_I64 zS<=poyfG>B6F5*5C*Z^ZC@xfSpy0H3I8c=;4nV=d#epi80|9PSQMDI%{WqE!$<|28 z!d7K%PxpKM-s{(2zxTTP^*7p^ZFC{Fs5f;}v-Ntcx)ZZE^;p|%*{xcu5vz9A*L5>i zYi+fShHl1Vu}nU;k}t>9Ot$a`mP z)f$>*#oXV~LllGm+MQ~{sKqQ>gYjb*4Xa`_4cpKf#+N|Po3VARVd=o2x9@tVS+k8+ zGe!vV&6YZQ8mC@~vfbt7aN)yJZ%jYcjc^+m3WM4xe0?^=eM;!_EXvh7_HeNR%kV? zWU{MMm&JaB>4u>$*?_fXYg_FRXg_Ca zZBTh1AEL|RrCSDH1WLW``1~C}j?0dh5}$n$J=#XsM}-W0iBZNW*u(|c#NA*M-@X<- z#Rt&Z2H+BLWd=FX^R9+<;;)q|cUa!xw5x;3y^=S5f;So376CN)QE5}(w+*w^BwWd$>&C|1QRo<6cq7itJiv$ICB{hY z@<~%RY@}5*1$L;lwqdWU*gI`~?ig^NT6i@e_lzJe11)8_^xQWkDQQ1Z-b0r?{>;P$ zSGMA?87Dk5q{3XjtJiER@sR(vn`pFZ44e`V#jm>wva^bLh0f&9iq7YGH#LopSG?-T z-#din_A>!~fKJu*b*Ty<+JNm>IoZ5jav2z6l>})1Z+CU0X+~ zLsJL9pF$TneZy$p2Wm1^mTp%7Eh@E!t~Je8Yio`u%*iD1n^Xe5R2gR6)C=gMAUJ5C z)FcYKmXiDigNTCJ+BWLC*$WYUSG$7}lKeV4Rv_`2wK)oP9-V<03-Ew?I9Uo{nxYPY zst(Z_K827lmr?J+R){q4^-+NaN1TxS?JaV=OW-Wcja9ADVMu{L-HWt==*Hz9JGG2pJVgpSdajX=U&m?HVh0U0__!el#xrc533Ps^@owVG~Oa}&Uh zhAt9rpg94&0IT|gcFS}^gGoAS(DfkHD8fJl$Mw2Oxg8uJOu-nzXSYv)K!85_??Y&| zuRp`iafD+QN4|?6DbJ(xVhwSNdg2HGPrQwA&rW5*k|Y2TbQ>22=_^>g#5Y1Pm$ULD z{7C9IA1rF7!DD#g^8vl!;NktV#4M@k>F_L?E|rzCTDiMYDyZq~ovfOPJckh)SJLI|sv42x4-TQD0%IUAIgy6$ zi}~U^K9U)9+-b>|m(*e@BH>MEhaiobb$VsgTz;{r6qd5-Qsgi`iLle8 zrt>TL9Qi)({hqlCeX{wL$Pw&TLS0ddi|<5^dOF|9t|%+%tg;+A=IOksk3E2VT+T>-5pFh)~O&m0s8mB=KHqLa?I z!rjzzHeD&H>2kgpnexa{RLe?sIda_du~f(x%cV#JKab8iT=;m@o<+5!D#i3tWEvdp zlGCMJRKP2MmYRq5T+T0MOJ!n2jL)Mp?yjrqGVM~%-z{cKxyVfNk@Q6Q3c7Gm0>;q> zzYXj4>2t3{gM~Ygl=0toQ%BJ_N6J2l**A`$iBhM^3XPCx!(1QXl-(*94#r2y5L|gdp3AqTWT=mlADh zZKxiQ9Wgr!?`4|F@#r(BwVkke3>*?$Y%;4PzvI;rQcGaEMPEl#j2yNTy0_qSXv!;I zH_?G;qsJ1NX6{^+ahOTq1D`hBHBzDW8WnE$k*9y8qlw9Y>R}Tha-jg)jN*5WWy3 zAhRlJ23C;;pZGQ!Z)=c}+I(tWhJ5cMWgZ7F>`X&UtZhIM0nRMwIy?-vK=hN{y07!{ zn*22ho$e!r)rN|{j^BhL6^Z=?0$3mpapGZuf1w-f633hR1E@m~v6u`rkCrRw3=tu3 zZuGSUR1DpVxa+JTNLKWCJ_<^?uf<=lb+=PSoC|*J~gpmAW(C2O&hU}})t0>%|jTKV7rvA`x zr*IBCD9>IYS=2kake^4VGmx0{m+@(5^vh_5cr5t`rJF&x5ZqOQE}8ex3GeuPrQC)p z4VQ^yK|J7w##PxL23F8CEDzpI`0i_-mGMamgO>t@SMmoE#O-uZ_;~KK9)>U?R0Fvc zd@CW-4W(EBGo*Ex`+o-{XYTKld^FE@3B`PVB%$6yCz!kYWO|Aj`lWhzGa@3gA!`6mmFQ z8c)c7fIZ9^ryt5cCE~!jgIg_DQcYc<3+@7XUX*4nzS^BC&@w+PA_sdOU7avI1c_X~ z7?n)rG5K9|ZXdOty$#paP!wwD5QlBLZ7Z;51Pi*^$eZX)U+&Ld5f(|f2Y*&Ne3wV1 zZr+1-pM#@PHzz!W#@CGoTy|mp<=u^lL-?aq>P7Nbd6eqr1yXUteiltyu6%abAl1!u z|J?};^8#7kzL_Gw~ohy)njxSjUj0sUqa`MX06ew>yl8X8^WE^f&Ju7cLOV)EQbEdEC1ZW?}&|eLq zY3CY`xO#?RgQgV_NN`9IgPmpf7Dj#bk89{CoZ<~tGMPc+wr0ZhFdA#~G6tO9z;%ME zy8;3S8suoGV^!exjs=;QtHgsZppzy`IKd}s8XSN&8nlc;D?Pll3b!%<>?^?7BDXTg zWeGOi{5qQS95UcfplBvrO6Q^G`A(($PQhPcg@T^1y->`qLV**ircluIx6zVcB($(M zk7k@(dP|*ZNjJ9*IIP`+^K;_+?%mMBL9b`@P;#e?-X0>L^$aZlNlxu4Jbi!k`wzbx zdIeu2_kA9+jQ*xmPMCMyw3zqZu)zO<7?6nQ&x&!-M=EtZpyq zQ>kn2DW^SpUUgLrsLq9jH>jg}dc}vCVZQ}_4i@Mw2n4o3FR8G=N#Xy_`5wLh>GRQf zHiyG#fd43=34#;kA1O27q!?;I<=agp#Jn*QE#IqiUdR+Mav)^(tU2c>1pi7xs9Q|H z*8_^yB@s#unJUX~x^Y8jF~poWDkK0x{v@GEPXz-9wXuh4R9(Kfr%Z9oXfOw%D`!z= z5I^GFB*kG9{u`+0DRTr?&qFn;diVE~8Ln3kI^-8J6dic`Fu35J!LF{q09`%hlfb%q zsD!TjL4w!)=GjDz>VE%};Btenw1IC0TuOdIA$id7te2i6#oO)`_NIJ?&eMo0CM}^} z5>hh=>1Ul`-O&IJ8ZY&w7Mh`mw0^wmKf zX$1EYT!XXMTjo~kXJhCJyb2SxJvhEgO}p!`1@gY6Al=I`BJnB?o|tX49C_WVuQb-WZ@r;fyavyF zpMgoogle.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest - */ -class CreateDataExchangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the data exchange. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_exchange_id = ''; - /** - * Required. The data exchange to create. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_exchange = null; - - /** - * @param string $parent Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. Please see - * {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $dataExchange Required. The data exchange to create. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\CreateDataExchangeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $dataExchange): self - { - return (new self()) - ->setParent($parent) - ->setDataExchange($dataExchange); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. - * @type string $data_exchange_id - * Required. The ID of the data exchange. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $data_exchange - * Required. The data exchange to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the data exchange. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataExchangeId() - { - return $this->data_exchange_id; - } - - /** - * Required. The ID of the data exchange. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataExchangeId($var) - { - GPBUtil::checkString($var, True); - $this->data_exchange_id = $var; - - return $this; - } - - /** - * Required. The data exchange to create. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange|null - */ - public function getDataExchange() - { - return $this->data_exchange; - } - - public function hasDataExchange() - { - return isset($this->data_exchange); - } - - public function clearDataExchange() - { - unset($this->data_exchange); - } - - /** - * Required. The data exchange to create. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $var - * @return $this - */ - public function setDataExchange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange::class); - $this->data_exchange = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateListingRequest.php deleted file mode 100644 index e7fe7aa5bd6c..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/CreateListingRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.CreateListingRequest - */ -class CreateListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the listing to create. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $listing_id = ''; - /** - * Required. The listing to create. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $listing = null; - - /** - * @param string $parent Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see - * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing Required. The listing to create. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\CreateListingRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing): self - { - return (new self()) - ->setParent($parent) - ->setListing($listing); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @type string $listing_id - * Required. The ID of the listing to create. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing - * Required. The listing to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the listing to create. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getListingId() - { - return $this->listing_id; - } - - /** - * Required. The ID of the listing to create. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setListingId($var) - { - GPBUtil::checkString($var, True); - $this->listing_id = $var; - - return $this; - } - - /** - * Required. The listing to create. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing|null - */ - public function getListing() - { - return $this->listing; - } - - public function hasListing() - { - return isset($this->listing); - } - - public function clearListing() - { - unset($this->listing); - } - - /** - * Required. The listing to create. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $var - * @return $this - */ - public function setListing($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing::class); - $this->listing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataExchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataExchange.php deleted file mode 100644 index c8eefaa39b1f..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataExchange.php +++ /dev/null @@ -1,421 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.DataExchange - */ -class DataExchange extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Human-readable display name of the data exchange. The display - * name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), ampersands (&) and must not start or end with - * spaces. Default value is an empty string. Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. Description of the data exchange. The description must not - * contain Unicode non-characters as well as C0 and C1 control codes except - * tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Email or URL of the primary point of contact of the data - * exchange. Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $primary_contact = ''; - /** - * Optional. Documentation describing the data exchange. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $documentation = ''; - /** - * Output only. Number of listings contained in the data exchange. - * - * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $listing_count = 0; - /** - * Optional. Base64 encoded image representing the data exchange. Max - * Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API - * only performs validation on size of the encoded data. Note: For byte - * fields, the content of the fields are base64-encoded (which increases the - * size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $icon = ''; - /** - * Optional. Configurable data sharing environment option for a data exchange. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig sharing_environment_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sharing_environment_config = null; - /** - * Optional. Type of discovery on the discovery page for all the listings - * under this exchange. Updating this field also updates (overwrites) the - * discovery_type field for all the listings under this exchange. - * - * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $discovery_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @type string $display_name - * Required. Human-readable display name of the data exchange. The display - * name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), ampersands (&) and must not start or end with - * spaces. Default value is an empty string. Max length: 63 bytes. - * @type string $description - * Optional. Description of the data exchange. The description must not - * contain Unicode non-characters as well as C0 and C1 control codes except - * tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * @type string $primary_contact - * Optional. Email or URL of the primary point of contact of the data - * exchange. Max Length: 1000 bytes. - * @type string $documentation - * Optional. Documentation describing the data exchange. - * @type int $listing_count - * Output only. Number of listings contained in the data exchange. - * @type string $icon - * Optional. Base64 encoded image representing the data exchange. Max - * Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API - * only performs validation on size of the encoded data. Note: For byte - * fields, the content of the fields are base64-encoded (which increases the - * size of the data by 33-36%) when using JSON on the wire. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig $sharing_environment_config - * Optional. Configurable data sharing environment option for a data exchange. - * @type int $discovery_type - * Optional. Type of discovery on the discovery page for all the listings - * under this exchange. Updating this field also updates (overwrites) the - * discovery_type field for all the listings under this exchange. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Human-readable display name of the data exchange. The display - * name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), ampersands (&) and must not start or end with - * spaces. Default value is an empty string. Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Human-readable display name of the data exchange. The display - * name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), ampersands (&) and must not start or end with - * spaces. Default value is an empty string. Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Description of the data exchange. The description must not - * contain Unicode non-characters as well as C0 and C1 control codes except - * tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the data exchange. The description must not - * contain Unicode non-characters as well as C0 and C1 control codes except - * tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * - * 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. Email or URL of the primary point of contact of the data - * exchange. Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrimaryContact() - { - return $this->primary_contact; - } - - /** - * Optional. Email or URL of the primary point of contact of the data - * exchange. Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrimaryContact($var) - { - GPBUtil::checkString($var, True); - $this->primary_contact = $var; - - return $this; - } - - /** - * Optional. Documentation describing the data exchange. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDocumentation() - { - return $this->documentation; - } - - /** - * Optional. Documentation describing the data exchange. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDocumentation($var) - { - GPBUtil::checkString($var, True); - $this->documentation = $var; - - return $this; - } - - /** - * Output only. Number of listings contained in the data exchange. - * - * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getListingCount() - { - return $this->listing_count; - } - - /** - * Output only. Number of listings contained in the data exchange. - * - * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setListingCount($var) - { - GPBUtil::checkInt32($var); - $this->listing_count = $var; - - return $this; - } - - /** - * Optional. Base64 encoded image representing the data exchange. Max - * Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API - * only performs validation on size of the encoded data. Note: For byte - * fields, the content of the fields are base64-encoded (which increases the - * size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIcon() - { - return $this->icon; - } - - /** - * Optional. Base64 encoded image representing the data exchange. Max - * Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API - * only performs validation on size of the encoded data. Note: For byte - * fields, the content of the fields are base64-encoded (which increases the - * size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIcon($var) - { - GPBUtil::checkString($var, False); - $this->icon = $var; - - return $this; - } - - /** - * Optional. Configurable data sharing environment option for a data exchange. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig sharing_environment_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig|null - */ - public function getSharingEnvironmentConfig() - { - return $this->sharing_environment_config; - } - - public function hasSharingEnvironmentConfig() - { - return isset($this->sharing_environment_config); - } - - public function clearSharingEnvironmentConfig() - { - unset($this->sharing_environment_config); - } - - /** - * Optional. Configurable data sharing environment option for a data exchange. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig sharing_environment_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig $var - * @return $this - */ - public function setSharingEnvironmentConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig::class); - $this->sharing_environment_config = $var; - - return $this; - } - - /** - * Optional. Type of discovery on the discovery page for all the listings - * under this exchange. Updating this field also updates (overwrites) the - * discovery_type field for all the listings under this exchange. - * - * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiscoveryType() - { - return isset($this->discovery_type) ? $this->discovery_type : 0; - } - - public function hasDiscoveryType() - { - return isset($this->discovery_type); - } - - public function clearDiscoveryType() - { - unset($this->discovery_type); - } - - /** - * Optional. Type of discovery on the discovery page for all the listings - * under this exchange. Updating this field also updates (overwrites) the - * discovery_type field for all the listings under this exchange. - * - * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiscoveryType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DiscoveryType::class); - $this->discovery_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataProvider.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataProvider.php deleted file mode 100644 index ae0efbfc4a0e..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DataProvider.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.DataProvider - */ -class DataProvider extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Name of the data provider. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. Email or URL of the data provider. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $primary_contact = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. Name of the data provider. - * @type string $primary_contact - * Optional. Email or URL of the data provider. - * Max Length: 1000 bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Name of the data provider. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. Name of the data provider. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Email or URL of the data provider. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrimaryContact() - { - return $this->primary_contact; - } - - /** - * Optional. Email or URL of the data provider. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrimaryContact($var) - { - GPBUtil::checkString($var, True); - $this->primary_contact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteDataExchangeRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteDataExchangeRequest.php deleted file mode 100644 index 714ba25e08f4..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteDataExchangeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest - */ -class DeleteDataExchangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the data exchange resource that you want to - * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of the data exchange resource that you want to - * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. Please see - * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DeleteDataExchangeRequest - * - * @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 full name of the data exchange resource that you want to - * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the data exchange resource that you want to - * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the data exchange resource that you want to - * delete. For example, `projects/myproject/locations/US/dataExchanges/123`. - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteListingRequest.php deleted file mode 100644 index 630e70a33f4e..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteListingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.DeleteListingRequest - */ -class DeleteListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see - * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DeleteListingRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteSubscriptionRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteSubscriptionRequest.php deleted file mode 100644 index 7bfd5a0f13f4..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DeleteSubscriptionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest - */ -class DeleteSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the subscription to delete. - * e.g. projects/123/locations/US/subscriptions/456 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the subscription to delete. - * e.g. projects/123/locations/US/subscriptions/456 - * Please see {@see AnalyticsHubServiceClient::subscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DeleteSubscriptionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the subscription to delete. - * e.g. projects/123/locations/US/subscriptions/456 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the subscription to delete. - * e.g. projects/123/locations/US/subscriptions/456 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the subscription to delete. - * e.g. projects/123/locations/US/subscriptions/456 - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDataset.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDataset.php deleted file mode 100644 index 05c16ab5c7e9..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDataset.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.DestinationDataset - */ -class DestinationDataset extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A reference that identifies the destination dataset. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset_reference = null; - /** - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $friendly_name = null; - /** - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = null; - /** - * Optional. The labels associated with this dataset. You can use these - * to organize and group your datasets. - * You can set this property when inserting or updating a dataset. - * See https://cloud.google.com/resource-manager/docs/creating-managing-labels - * for more information. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDatasetReference $dataset_reference - * Required. A reference that identifies the destination dataset. - * @type \Google\Protobuf\StringValue $friendly_name - * Optional. A descriptive name for the dataset. - * @type \Google\Protobuf\StringValue $description - * Optional. A user-friendly description of the dataset. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels associated with this dataset. You can use these - * to organize and group your datasets. - * You can set this property when inserting or updating a dataset. - * See https://cloud.google.com/resource-manager/docs/creating-managing-labels - * for more information. - * @type string $location - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. A reference that identifies the destination dataset. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDatasetReference|null - */ - public function getDatasetReference() - { - return $this->dataset_reference; - } - - public function hasDatasetReference() - { - return isset($this->dataset_reference); - } - - public function clearDatasetReference() - { - unset($this->dataset_reference); - } - - /** - * Required. A reference that identifies the destination dataset. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDatasetReference $var - * @return $this - */ - public function setDatasetReference($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDatasetReference::class); - $this->dataset_reference = $var; - - return $this; - } - - /** - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\StringValue|null - */ - public function getFriendlyName() - { - return $this->friendly_name; - } - - public function hasFriendlyName() - { - return isset($this->friendly_name); - } - - public function clearFriendlyName() - { - unset($this->friendly_name); - } - - /** - * Returns the unboxed value from getFriendlyName() - - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string|null - */ - public function getFriendlyNameUnwrapped() - { - return $this->readWrapperValue("friendly_name"); - } - - /** - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setFriendlyName($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->friendly_name = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string|null $var - * @return $this - */ - public function setFriendlyNameUnwrapped($var) - { - $this->writeWrapperValue("friendly_name", $var); - return $this;} - - /** - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\StringValue|null - */ - public function getDescription() - { - return $this->description; - } - - public function hasDescription() - { - return isset($this->description); - } - - public function clearDescription() - { - unset($this->description); - } - - /** - * Returns the unboxed value from getDescription() - - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string|null - */ - public function getDescriptionUnwrapped() - { - return $this->readWrapperValue("description"); - } - - /** - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->description = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string|null $var - * @return $this - */ - public function setDescriptionUnwrapped($var) - { - $this->writeWrapperValue("description", $var); - return $this;} - - /** - * Optional. The labels associated with this dataset. You can use these - * to organize and group your datasets. - * You can set this property when inserting or updating a dataset. - * See https://cloud.google.com/resource-manager/docs/creating-managing-labels - * for more information. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels associated with this dataset. You can use these - * to organize and group your datasets. - * You can set this property when inserting or updating a dataset. - * See https://cloud.google.com/resource-manager/docs/creating-managing-labels - * for more information. - * - * Generated from protobuf field map labels = 4 [(.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. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDatasetReference.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDatasetReference.php deleted file mode 100644 index 0158d1b6c937..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DestinationDatasetReference.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - */ -class DestinationDatasetReference extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A unique ID for this dataset, without the project name. The ID - * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - * The maximum length is 1,024 characters. - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset_id = ''; - /** - * Required. The ID of the project containing this dataset. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset_id - * Required. A unique ID for this dataset, without the project name. The ID - * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - * The maximum length is 1,024 characters. - * @type string $project_id - * Required. The ID of the project containing this dataset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. A unique ID for this dataset, without the project name. The ID - * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - * The maximum length is 1,024 characters. - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * Required. A unique ID for this dataset, without the project name. The ID - * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - * The maximum length is 1,024 characters. - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - - /** - * Required. The ID of the project containing this dataset. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the project containing this dataset. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DiscoveryType.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DiscoveryType.php deleted file mode 100644 index 2726ed751e8a..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/DiscoveryType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.DiscoveryType - */ -class DiscoveryType -{ - /** - * Unspecified. Defaults to DISCOVERY_TYPE_PRIVATE. - * - * Generated from protobuf enum DISCOVERY_TYPE_UNSPECIFIED = 0; - */ - const DISCOVERY_TYPE_UNSPECIFIED = 0; - /** - * The Data exchange/listing can be discovered in the 'Private' results - * list. - * - * Generated from protobuf enum DISCOVERY_TYPE_PRIVATE = 1; - */ - const DISCOVERY_TYPE_PRIVATE = 1; - /** - * The Data exchange/listing can be discovered in the 'Public' results - * list. - * - * Generated from protobuf enum DISCOVERY_TYPE_PUBLIC = 2; - */ - const DISCOVERY_TYPE_PUBLIC = 2; - - private static $valueToName = [ - self::DISCOVERY_TYPE_UNSPECIFIED => 'DISCOVERY_TYPE_UNSPECIFIED', - self::DISCOVERY_TYPE_PRIVATE => 'DISCOVERY_TYPE_PRIVATE', - self::DISCOVERY_TYPE_PUBLIC => 'DISCOVERY_TYPE_PUBLIC', - ]; - - 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetDataExchangeRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetDataExchangeRequest.php deleted file mode 100644 index ac579385d217..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetDataExchangeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest - */ -class GetDataExchangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see - * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\GetDataExchangeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetListingRequest.php deleted file mode 100644 index a8e2c2523961..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetListingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.GetListingRequest - */ -class GetListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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 listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see - * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\GetListingRequest - * - * @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 listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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 listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetSubscriptionRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetSubscriptionRequest.php deleted file mode 100644 index 8978d37ca8e6..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/GetSubscriptionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest - */ -class GetSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the subscription. - * e.g. projects/123/locations/US/subscriptions/456 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the subscription. - * e.g. projects/123/locations/US/subscriptions/456 - * Please see {@see AnalyticsHubServiceClient::subscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\GetSubscriptionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the subscription. - * e.g. projects/123/locations/US/subscriptions/456 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the subscription. - * e.g. projects/123/locations/US/subscriptions/456 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the subscription. - * e.g. projects/123/locations/US/subscriptions/456 - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesRequest.php deleted file mode 100644 index fe9ae5f2f822..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest - */ -class ListDataExchangesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. Please see - * {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListDataExchangesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. - * @type int $page_size - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * @type string $page_token - * Page token, returned by a previous call, to request the next page of - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesResponse.php deleted file mode 100644 index fb8bbdccd266..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListDataExchangesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse - */ -class ListDataExchangesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - private $data_exchanges; - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges - * The list of data exchanges. - * @type string $next_page_token - * A token to request the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataExchanges() - { - return $this->data_exchanges; - } - - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataExchanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange::class); - $this->data_exchanges = $arr; - - return $this; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsRequest.php deleted file mode 100644 index acff05320794..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListListingsRequest - */ -class ListListingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see - * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListListingsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @type int $page_size - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * @type string $page_token - * Page token, returned by a previous call, to request the next page of - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsResponse.php deleted file mode 100644 index 2a35739b95ea..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListListingsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListListingsResponse - */ -class ListListingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Listing. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - private $listings; - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing>|\Google\Protobuf\Internal\RepeatedField $listings - * The list of Listing. - * @type string $next_page_token - * A token to request the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * The list of Listing. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getListings() - { - return $this->listings; - } - - /** - * The list of Listing. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setListings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing::class); - $this->listings = $arr; - - return $this; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesRequest.php deleted file mode 100644 index 71eca67a2bd9..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - */ -class ListOrgDataExchangesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The organization resource path of the projects containing - * DataExchanges. e.g. `organizations/myorg/locations/US`. - * - * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $organization = ''; - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $organization Required. The organization resource path of the projects containing - * DataExchanges. e.g. `organizations/myorg/locations/US`. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListOrgDataExchangesRequest - * - * @experimental - */ - public static function build(string $organization): self - { - return (new self()) - ->setOrganization($organization); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $organization - * Required. The organization resource path of the projects containing - * DataExchanges. e.g. `organizations/myorg/locations/US`. - * @type int $page_size - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * @type string $page_token - * Page token, returned by a previous call, to request the next page of - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The organization resource path of the projects containing - * DataExchanges. e.g. `organizations/myorg/locations/US`. - * - * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOrganization() - { - return $this->organization; - } - - /** - * Required. The organization resource path of the projects containing - * DataExchanges. e.g. `organizations/myorg/locations/US`. - * - * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOrganization($var) - { - GPBUtil::checkString($var, True); - $this->organization = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesResponse.php deleted file mode 100644 index d33782786693..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListOrgDataExchangesResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - */ -class ListOrgDataExchangesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - private $data_exchanges; - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges - * The list of data exchanges. - * @type string $next_page_token - * A token to request the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataExchanges() - { - return $this->data_exchanges; - } - - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataExchanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange::class); - $this->data_exchanges = $arr; - - return $this; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsRequest.php deleted file mode 100644 index 7868a7a49226..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest - */ -class ListSharedResourceSubscriptionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the requested target. This resource may be - * either a Listing or a DataExchange. e.g. - * projects/123/locations/US/dataExchanges/456 OR e.g. - * projects/123/locations/US/dataExchanges/456/listings/789 - * - * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $resource = ''; - /** - * If selected, includes deleted subscriptions in the response - * (up to 63 days after deletion). - * - * Generated from protobuf field bool include_deleted_subscriptions = 2; - */ - protected $include_deleted_subscriptions = false; - /** - * The maximum number of results to return in a single response page. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Page token, returned by a previous call. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $resource Required. Resource name of the requested target. This resource may be - * either a Listing or a DataExchange. e.g. - * projects/123/locations/US/dataExchanges/456 OR e.g. - * projects/123/locations/US/dataExchanges/456/listings/789 - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListSharedResourceSubscriptionsRequest - * - * @experimental - */ - public static function build(string $resource): self - { - return (new self()) - ->setResource($resource); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource - * Required. Resource name of the requested target. This resource may be - * either a Listing or a DataExchange. e.g. - * projects/123/locations/US/dataExchanges/456 OR e.g. - * projects/123/locations/US/dataExchanges/456/listings/789 - * @type bool $include_deleted_subscriptions - * If selected, includes deleted subscriptions in the response - * (up to 63 days after deletion). - * @type int $page_size - * The maximum number of results to return in a single response page. - * @type string $page_token - * Page token, returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the requested target. This resource may be - * either a Listing or a DataExchange. e.g. - * projects/123/locations/US/dataExchanges/456 OR e.g. - * projects/123/locations/US/dataExchanges/456/listings/789 - * - * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * Required. Resource name of the requested target. This resource may be - * either a Listing or a DataExchange. e.g. - * projects/123/locations/US/dataExchanges/456 OR e.g. - * projects/123/locations/US/dataExchanges/456/listings/789 - * - * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * If selected, includes deleted subscriptions in the response - * (up to 63 days after deletion). - * - * Generated from protobuf field bool include_deleted_subscriptions = 2; - * @return bool - */ - public function getIncludeDeletedSubscriptions() - { - return $this->include_deleted_subscriptions; - } - - /** - * If selected, includes deleted subscriptions in the response - * (up to 63 days after deletion). - * - * Generated from protobuf field bool include_deleted_subscriptions = 2; - * @param bool $var - * @return $this - */ - public function setIncludeDeletedSubscriptions($var) - { - GPBUtil::checkBool($var); - $this->include_deleted_subscriptions = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response page. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response page. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token, returned by a previous call. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token, returned by a previous call. - * - * Generated from protobuf field string page_token = 4; - * @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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsResponse.php deleted file mode 100644 index 6dd58edfff9a..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSharedResourceSubscriptionsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse - */ -class ListSharedResourceSubscriptionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of subscriptions. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription shared_resource_subscriptions = 1; - */ - private $shared_resource_subscriptions; - /** - * Next page token. - * - * 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\BigQuery\AnalyticsHub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $shared_resource_subscriptions - * The list of subscriptions. - * @type string $next_page_token - * Next page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * The list of subscriptions. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription shared_resource_subscriptions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSharedResourceSubscriptions() - { - return $this->shared_resource_subscriptions; - } - - /** - * The list of subscriptions. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription shared_resource_subscriptions = 1; - * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSharedResourceSubscriptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); - $this->shared_resource_subscriptions = $arr; - - return $this; - } - - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Next page token. - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsRequest.php deleted file mode 100644 index eb2bf9d45198..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsRequest.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest - */ -class ListSubscriptionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource path of the subscription. - * e.g. projects/myproject/locations/US - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * An expression for filtering the results of the request. Eligible - * fields for filtering are: - * * `listing` - * * `data_exchange` - * Alternatively, a literal wrapped in double quotes may be provided. - * This will be checked for an exact match against both fields above. - * In all cases, the full Data Exchange or Listing resource name must - * be provided. Some example of using filters: - * * data_exchange="projects/myproject/locations/us/dataExchanges/123" - * * listing="projects/123/locations/us/dataExchanges/456/listings/789" - * * "projects/myproject/locations/us/dataExchanges/123" - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The maximum number of results to return in a single response page. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Page token, returned by a previous call. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource path of the subscription. - * e.g. projects/myproject/locations/US - * Please see {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\ListSubscriptionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource path of the subscription. - * e.g. projects/myproject/locations/US - * @type string $filter - * An expression for filtering the results of the request. Eligible - * fields for filtering are: - * * `listing` - * * `data_exchange` - * Alternatively, a literal wrapped in double quotes may be provided. - * This will be checked for an exact match against both fields above. - * In all cases, the full Data Exchange or Listing resource name must - * be provided. Some example of using filters: - * * data_exchange="projects/myproject/locations/us/dataExchanges/123" - * * listing="projects/123/locations/us/dataExchanges/456/listings/789" - * * "projects/myproject/locations/us/dataExchanges/123" - * @type int $page_size - * The maximum number of results to return in a single response page. - * @type string $page_token - * Page token, returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource path of the subscription. - * e.g. projects/myproject/locations/US - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource path of the subscription. - * e.g. projects/myproject/locations/US - * - * 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; - } - - /** - * An expression for filtering the results of the request. Eligible - * fields for filtering are: - * * `listing` - * * `data_exchange` - * Alternatively, a literal wrapped in double quotes may be provided. - * This will be checked for an exact match against both fields above. - * In all cases, the full Data Exchange or Listing resource name must - * be provided. Some example of using filters: - * * data_exchange="projects/myproject/locations/us/dataExchanges/123" - * * listing="projects/123/locations/us/dataExchanges/456/listings/789" - * * "projects/myproject/locations/us/dataExchanges/123" - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression for filtering the results of the request. Eligible - * fields for filtering are: - * * `listing` - * * `data_exchange` - * Alternatively, a literal wrapped in double quotes may be provided. - * This will be checked for an exact match against both fields above. - * In all cases, the full Data Exchange or Listing resource name must - * be provided. Some example of using filters: - * * data_exchange="projects/myproject/locations/us/dataExchanges/123" - * * listing="projects/123/locations/us/dataExchanges/456/listings/789" - * * "projects/myproject/locations/us/dataExchanges/123" - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response page. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response page. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token, returned by a previous call. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token, returned by a previous call. - * - * Generated from protobuf field string page_token = 4; - * @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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsResponse.php deleted file mode 100644 index 6e5f3062d8a2..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/ListSubscriptionsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse - */ -class ListSubscriptionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of subscriptions. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription subscriptions = 1; - */ - private $subscriptions; - /** - * Next page token. - * - * 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\BigQuery\AnalyticsHub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $subscriptions - * The list of subscriptions. - * @type string $next_page_token - * Next page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * The list of subscriptions. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription subscriptions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubscriptions() - { - return $this->subscriptions; - } - - /** - * The list of subscriptions. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Subscription subscriptions = 1; - * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubscriptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); - $this->subscriptions = $arr; - - return $this; - } - - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Next page token. - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing.php deleted file mode 100644 index 6119711f11d3..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing.php +++ /dev/null @@ -1,624 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Listing - */ -class Listing extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Human-readable display name of the listing. The display name must - * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), ampersands (&) and can't start or end with spaces. Default - * value is an empty string. Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. Short description of the listing. The description must not - * contain Unicode non-characters and C0 and C1 control codes except tabs - * (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default - * value is an empty string. Max length: 2000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Email or URL of the primary point of contact of the listing. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $primary_contact = ''; - /** - * Optional. Documentation describing the listing. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $documentation = ''; - /** - * Output only. Current state of the listing. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $icon = ''; - /** - * Optional. Details of the data provider who owns the source data. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_provider = null; - /** - * Optional. Categories of the listing. Up to two categories are allowed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $categories; - /** - * Optional. Details of the publisher who owns the listing and who can share - * the source data. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $publisher = null; - /** - * Optional. Email or URL of the request access of the listing. - * Subscribers can use this reference to request access. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_access = ''; - /** - * Optional. If set, restricted export configuration will be propagated and - * enforced on the linked dataset. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig restricted_export_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $restricted_export_config = null; - /** - * Optional. Type of discovery of the listing on the discovery page. - * - * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $discovery_type = null; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource $bigquery_dataset - * Required. Shared dataset i.e. BigQuery dataset source. - * @type string $name - * Output only. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - * @type string $display_name - * Required. Human-readable display name of the listing. The display name must - * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), ampersands (&) and can't start or end with spaces. Default - * value is an empty string. Max length: 63 bytes. - * @type string $description - * Optional. Short description of the listing. The description must not - * contain Unicode non-characters and C0 and C1 control codes except tabs - * (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default - * value is an empty string. Max length: 2000 bytes. - * @type string $primary_contact - * Optional. Email or URL of the primary point of contact of the listing. - * Max Length: 1000 bytes. - * @type string $documentation - * Optional. Documentation describing the listing. - * @type int $state - * Output only. Current state of the listing. - * @type string $icon - * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\DataProvider $data_provider - * Optional. Details of the data provider who owns the source data. - * @type array|\Google\Protobuf\Internal\RepeatedField $categories - * Optional. Categories of the listing. Up to two categories are allowed. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Publisher $publisher - * Optional. Details of the publisher who owns the listing and who can share - * the source data. - * @type string $request_access - * Optional. Email or URL of the request access of the listing. - * Subscribers can use this reference to request access. - * Max Length: 1000 bytes. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\RestrictedExportConfig $restricted_export_config - * Optional. If set, restricted export configuration will be propagated and - * enforced on the linked dataset. - * @type int $discovery_type - * Optional. Type of discovery of the listing on the discovery page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Shared dataset i.e. BigQuery dataset source. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource|null - */ - public function getBigqueryDataset() - { - return $this->readOneof(6); - } - - public function hasBigqueryDataset() - { - return $this->hasOneof(6); - } - - /** - * Required. Shared dataset i.e. BigQuery dataset source. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource $var - * @return $this - */ - public function setBigqueryDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Output only. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Human-readable display name of the listing. The display name must - * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), ampersands (&) and can't start or end with spaces. Default - * value is an empty string. Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Human-readable display name of the listing. The display name must - * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), ampersands (&) and can't start or end with spaces. Default - * value is an empty string. Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Short description of the listing. The description must not - * contain Unicode non-characters and C0 and C1 control codes except tabs - * (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default - * value is an empty string. Max length: 2000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Short description of the listing. The description must not - * contain Unicode non-characters and C0 and C1 control codes except tabs - * (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default - * value is an empty string. Max length: 2000 bytes. - * - * 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. Email or URL of the primary point of contact of the listing. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrimaryContact() - { - return $this->primary_contact; - } - - /** - * Optional. Email or URL of the primary point of contact of the listing. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrimaryContact($var) - { - GPBUtil::checkString($var, True); - $this->primary_contact = $var; - - return $this; - } - - /** - * Optional. Documentation describing the listing. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDocumentation() - { - return $this->documentation; - } - - /** - * Optional. Documentation describing the listing. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDocumentation($var) - { - GPBUtil::checkString($var, True); - $this->documentation = $var; - - return $this; - } - - /** - * Output only. Current state of the listing. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the listing. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIcon() - { - return $this->icon; - } - - /** - * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIcon($var) - { - GPBUtil::checkString($var, False); - $this->icon = $var; - - return $this; - } - - /** - * Optional. Details of the data provider who owns the source data. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DataProvider|null - */ - public function getDataProvider() - { - return $this->data_provider; - } - - public function hasDataProvider() - { - return isset($this->data_provider); - } - - public function clearDataProvider() - { - unset($this->data_provider); - } - - /** - * Optional. Details of the data provider who owns the source data. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataProvider $var - * @return $this - */ - public function setDataProvider($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataProvider::class); - $this->data_provider = $var; - - return $this; - } - - /** - * Optional. Categories of the listing. Up to two categories are allowed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Optional. Categories of the listing. Up to two categories are allowed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\Category::class); - $this->categories = $arr; - - return $this; - } - - /** - * Optional. Details of the publisher who owns the listing and who can share - * the source data. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Publisher|null - */ - public function getPublisher() - { - return $this->publisher; - } - - public function hasPublisher() - { - return isset($this->publisher); - } - - public function clearPublisher() - { - unset($this->publisher); - } - - /** - * Optional. Details of the publisher who owns the listing and who can share - * the source data. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Publisher $var - * @return $this - */ - public function setPublisher($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Publisher::class); - $this->publisher = $var; - - return $this; - } - - /** - * Optional. Email or URL of the request access of the listing. - * Subscribers can use this reference to request access. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestAccess() - { - return $this->request_access; - } - - /** - * Optional. Email or URL of the request access of the listing. - * Subscribers can use this reference to request access. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestAccess($var) - { - GPBUtil::checkString($var, True); - $this->request_access = $var; - - return $this; - } - - /** - * Optional. If set, restricted export configuration will be propagated and - * enforced on the linked dataset. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig restricted_export_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\RestrictedExportConfig|null - */ - public function getRestrictedExportConfig() - { - return $this->restricted_export_config; - } - - public function hasRestrictedExportConfig() - { - return isset($this->restricted_export_config); - } - - public function clearRestrictedExportConfig() - { - unset($this->restricted_export_config); - } - - /** - * Optional. If set, restricted export configuration will be propagated and - * enforced on the linked dataset. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig restricted_export_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\RestrictedExportConfig $var - * @return $this - */ - public function setRestrictedExportConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\RestrictedExportConfig::class); - $this->restricted_export_config = $var; - - return $this; - } - - /** - * Optional. Type of discovery of the listing on the discovery page. - * - * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiscoveryType() - { - return isset($this->discovery_type) ? $this->discovery_type : 0; - } - - public function hasDiscoveryType() - { - return isset($this->discovery_type); - } - - public function clearDiscoveryType() - { - unset($this->discovery_type); - } - - /** - * Optional. Type of discovery of the listing on the discovery page. - * - * Generated from protobuf field optional .google.cloud.bigquery.analyticshub.v1.DiscoveryType discovery_type = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiscoveryType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DiscoveryType::class); - $this->discovery_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource.php deleted file mode 100644 index 22bcb6dd0ed8..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - */ -class BigQueryDatasetSource extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the dataset source for this listing. - * e.g. `projects/myproject/datasets/123` - * - * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { - */ - protected $dataset = ''; - /** - * Optional. Resources in this dataset that are selectively shared. - * If this field is empty, then the entire dataset (all resources) are - * shared. This field is only valid for data clean room exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource selected_resources = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $selected_resources; - /** - * Optional. If set, restricted export policy will be propagated and - * enforced on the linked dataset. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy restricted_export_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $restricted_export_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset - * Resource name of the dataset source for this listing. - * e.g. `projects/myproject/datasets/123` - * @type array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\SelectedResource>|\Google\Protobuf\Internal\RepeatedField $selected_resources - * Optional. Resources in this dataset that are selectively shared. - * If this field is empty, then the entire dataset (all resources) are - * shared. This field is only valid for data clean room exchanges. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\RestrictedExportPolicy $restricted_export_policy - * Optional. If set, restricted export policy will be propagated and - * enforced on the linked dataset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the dataset source for this listing. - * e.g. `projects/myproject/datasets/123` - * - * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * Resource name of the dataset source for this listing. - * e.g. `projects/myproject/datasets/123` - * - * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - - /** - * Optional. Resources in this dataset that are selectively shared. - * If this field is empty, then the entire dataset (all resources) are - * shared. This field is only valid for data clean room exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource selected_resources = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSelectedResources() - { - return $this->selected_resources; - } - - /** - * Optional. Resources in this dataset that are selectively shared. - * If this field is empty, then the entire dataset (all resources) are - * shared. This field is only valid for data clean room exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource selected_resources = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\SelectedResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSelectedResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\SelectedResource::class); - $this->selected_resources = $arr; - - return $this; - } - - /** - * Optional. If set, restricted export policy will be propagated and - * enforced on the linked dataset. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy restricted_export_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\RestrictedExportPolicy|null - */ - public function getRestrictedExportPolicy() - { - return $this->restricted_export_policy; - } - - public function hasRestrictedExportPolicy() - { - return isset($this->restricted_export_policy); - } - - public function clearRestrictedExportPolicy() - { - unset($this->restricted_export_policy); - } - - /** - * Optional. If set, restricted export policy will be propagated and - * enforced on the linked dataset. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy restricted_export_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\RestrictedExportPolicy $var - * @return $this - */ - public function setRestrictedExportPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing\BigQueryDatasetSource\RestrictedExportPolicy::class); - $this->restricted_export_policy = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryDatasetSource::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing_BigQueryDatasetSource::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/RestrictedExportPolicy.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/RestrictedExportPolicy.php deleted file mode 100644 index b3b09c13eff2..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/RestrictedExportPolicy.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy - */ -class RestrictedExportPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If true, enable restricted export. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = null; - /** - * Optional. If true, restrict direct table access (read - * api/tabledata.list) on linked table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $restrict_direct_table_access = null; - /** - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $restrict_query_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\BoolValue $enabled - * Optional. If true, enable restricted export. - * @type \Google\Protobuf\BoolValue $restrict_direct_table_access - * Optional. If true, restrict direct table access (read - * api/tabledata.list) on linked table. - * @type \Google\Protobuf\BoolValue $restrict_query_result - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If true, enable restricted export. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getEnabled() - { - return $this->enabled; - } - - public function hasEnabled() - { - return isset($this->enabled); - } - - public function clearEnabled() - { - unset($this->enabled); - } - - /** - * Returns the unboxed value from getEnabled() - - * Optional. If true, enable restricted export. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getEnabledUnwrapped() - { - return $this->readWrapperValue("enabled"); - } - - /** - * Optional. If true, enable restricted export. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. If true, enable restricted export. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setEnabledUnwrapped($var) - { - $this->writeWrapperValue("enabled", $var); - return $this;} - - /** - * Optional. If true, restrict direct table access (read - * api/tabledata.list) on linked table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getRestrictDirectTableAccess() - { - return $this->restrict_direct_table_access; - } - - public function hasRestrictDirectTableAccess() - { - return isset($this->restrict_direct_table_access); - } - - public function clearRestrictDirectTableAccess() - { - unset($this->restrict_direct_table_access); - } - - /** - * Returns the unboxed value from getRestrictDirectTableAccess() - - * Optional. If true, restrict direct table access (read - * api/tabledata.list) on linked table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getRestrictDirectTableAccessUnwrapped() - { - return $this->readWrapperValue("restrict_direct_table_access"); - } - - /** - * Optional. If true, restrict direct table access (read - * api/tabledata.list) on linked table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setRestrictDirectTableAccess($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->restrict_direct_table_access = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. If true, restrict direct table access (read - * api/tabledata.list) on linked table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_direct_table_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setRestrictDirectTableAccessUnwrapped($var) - { - $this->writeWrapperValue("restrict_direct_table_access", $var); - return $this;} - - /** - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getRestrictQueryResult() - { - return $this->restrict_query_result; - } - - public function hasRestrictQueryResult() - { - return isset($this->restrict_query_result); - } - - public function clearRestrictQueryResult() - { - unset($this->restrict_query_result); - } - - /** - * Returns the unboxed value from getRestrictQueryResult() - - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getRestrictQueryResultUnwrapped() - { - return $this->readWrapperValue("restrict_query_result"); - } - - /** - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setRestrictQueryResult($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->restrict_query_result = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * - * Generated from protobuf field .google.protobuf.BoolValue restrict_query_result = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setRestrictQueryResultUnwrapped($var) - { - $this->writeWrapperValue("restrict_query_result", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RestrictedExportPolicy::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing_BigQueryDatasetSource_RestrictedExportPolicy::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/SelectedResource.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/SelectedResource.php deleted file mode 100644 index babf97164a3b..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/BigQueryDatasetSource/SelectedResource.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource - */ -class SelectedResource extends \Google\Protobuf\Internal\Message -{ - protected $resource; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table - * Optional. Format: - * For table: - * `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` - * Example:"projects/test_project/datasets/test_dataset/tables/test_table" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Format: - * For table: - * `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` - * Example:"projects/test_project/datasets/test_dataset/tables/test_table" - * - * Generated from protobuf field string table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getTable() - { - return $this->readOneof(1); - } - - public function hasTable() - { - return $this->hasOneof(1); - } - - /** - * Optional. Format: - * For table: - * `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` - * Example:"projects/test_project/datasets/test_dataset/tables/test_table" - * - * Generated from protobuf field string table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getResource() - { - return $this->whichOneof("resource"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SelectedResource::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing_BigQueryDatasetSource_SelectedResource::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/Category.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/Category.php deleted file mode 100644 index c16d7e7d770d..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/Category.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Listing.Category - */ -class Category -{ - /** - * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; - */ - const CATEGORY_UNSPECIFIED = 0; - /** - * Generated from protobuf enum CATEGORY_OTHERS = 1; - */ - const CATEGORY_OTHERS = 1; - /** - * Generated from protobuf enum CATEGORY_ADVERTISING_AND_MARKETING = 2; - */ - const CATEGORY_ADVERTISING_AND_MARKETING = 2; - /** - * Generated from protobuf enum CATEGORY_COMMERCE = 3; - */ - const CATEGORY_COMMERCE = 3; - /** - * Generated from protobuf enum CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; - */ - const CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; - /** - * Generated from protobuf enum CATEGORY_DEMOGRAPHICS = 5; - */ - const CATEGORY_DEMOGRAPHICS = 5; - /** - * Generated from protobuf enum CATEGORY_ECONOMICS = 6; - */ - const CATEGORY_ECONOMICS = 6; - /** - * Generated from protobuf enum CATEGORY_EDUCATION = 7; - */ - const CATEGORY_EDUCATION = 7; - /** - * Generated from protobuf enum CATEGORY_ENERGY = 8; - */ - const CATEGORY_ENERGY = 8; - /** - * Generated from protobuf enum CATEGORY_FINANCIAL = 9; - */ - const CATEGORY_FINANCIAL = 9; - /** - * Generated from protobuf enum CATEGORY_GAMING = 10; - */ - const CATEGORY_GAMING = 10; - /** - * Generated from protobuf enum CATEGORY_GEOSPATIAL = 11; - */ - const CATEGORY_GEOSPATIAL = 11; - /** - * Generated from protobuf enum CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; - */ - const CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; - /** - * Generated from protobuf enum CATEGORY_MEDIA = 13; - */ - const CATEGORY_MEDIA = 13; - /** - * Generated from protobuf enum CATEGORY_PUBLIC_SECTOR = 14; - */ - const CATEGORY_PUBLIC_SECTOR = 14; - /** - * Generated from protobuf enum CATEGORY_RETAIL = 15; - */ - const CATEGORY_RETAIL = 15; - /** - * Generated from protobuf enum CATEGORY_SPORTS = 16; - */ - const CATEGORY_SPORTS = 16; - /** - * Generated from protobuf enum CATEGORY_SCIENCE_AND_RESEARCH = 17; - */ - const CATEGORY_SCIENCE_AND_RESEARCH = 17; - /** - * Generated from protobuf enum CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; - */ - const CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; - /** - * Generated from protobuf enum CATEGORY_TRAVEL_AND_TOURISM = 19; - */ - const CATEGORY_TRAVEL_AND_TOURISM = 19; - - private static $valueToName = [ - self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', - self::CATEGORY_OTHERS => 'CATEGORY_OTHERS', - self::CATEGORY_ADVERTISING_AND_MARKETING => 'CATEGORY_ADVERTISING_AND_MARKETING', - self::CATEGORY_COMMERCE => 'CATEGORY_COMMERCE', - self::CATEGORY_CLIMATE_AND_ENVIRONMENT => 'CATEGORY_CLIMATE_AND_ENVIRONMENT', - self::CATEGORY_DEMOGRAPHICS => 'CATEGORY_DEMOGRAPHICS', - self::CATEGORY_ECONOMICS => 'CATEGORY_ECONOMICS', - self::CATEGORY_EDUCATION => 'CATEGORY_EDUCATION', - self::CATEGORY_ENERGY => 'CATEGORY_ENERGY', - self::CATEGORY_FINANCIAL => 'CATEGORY_FINANCIAL', - self::CATEGORY_GAMING => 'CATEGORY_GAMING', - self::CATEGORY_GEOSPATIAL => 'CATEGORY_GEOSPATIAL', - self::CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE => 'CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE', - self::CATEGORY_MEDIA => 'CATEGORY_MEDIA', - self::CATEGORY_PUBLIC_SECTOR => 'CATEGORY_PUBLIC_SECTOR', - self::CATEGORY_RETAIL => 'CATEGORY_RETAIL', - self::CATEGORY_SPORTS => 'CATEGORY_SPORTS', - self::CATEGORY_SCIENCE_AND_RESEARCH => 'CATEGORY_SCIENCE_AND_RESEARCH', - self::CATEGORY_TRANSPORTATION_AND_LOGISTICS => 'CATEGORY_TRANSPORTATION_AND_LOGISTICS', - self::CATEGORY_TRAVEL_AND_TOURISM => 'CATEGORY_TRAVEL_AND_TOURISM', - ]; - - 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\BigQuery\AnalyticsHub\V1\Listing_Category::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/RestrictedExportConfig.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/RestrictedExportConfig.php deleted file mode 100644 index 28343b512b3b..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/RestrictedExportConfig.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig - */ -class RestrictedExportConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If true, enable restricted export. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - /** - * Output only. If true, restrict direct table access(read - * api/tabledata.list) on linked table. - * - * Generated from protobuf field bool restrict_direct_table_access = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $restrict_direct_table_access = false; - /** - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * - * Generated from protobuf field bool restrict_query_result = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $restrict_query_result = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Optional. If true, enable restricted export. - * @type bool $restrict_direct_table_access - * Output only. If true, restrict direct table access(read - * api/tabledata.list) on linked table. - * @type bool $restrict_query_result - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If true, enable restricted export. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. If true, enable restricted export. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Output only. If true, restrict direct table access(read - * api/tabledata.list) on linked table. - * - * Generated from protobuf field bool restrict_direct_table_access = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRestrictDirectTableAccess() - { - return $this->restrict_direct_table_access; - } - - /** - * Output only. If true, restrict direct table access(read - * api/tabledata.list) on linked table. - * - * Generated from protobuf field bool restrict_direct_table_access = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRestrictDirectTableAccess($var) - { - GPBUtil::checkBool($var); - $this->restrict_direct_table_access = $var; - - return $this; - } - - /** - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * - * Generated from protobuf field bool restrict_query_result = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRestrictQueryResult() - { - return $this->restrict_query_result; - } - - /** - * Optional. If true, restrict export of query result derived from - * restricted linked dataset table. - * - * Generated from protobuf field bool restrict_query_result = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRestrictQueryResult($var) - { - GPBUtil::checkBool($var); - $this->restrict_query_result = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RestrictedExportConfig::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing_RestrictedExportConfig::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/State.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/State.php deleted file mode 100644 index 67c97bcd62f1..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Listing/State.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Listing.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Subscribable state. Users with dataexchange.listings.subscribe permission - * can subscribe to this listing. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - ]; - - 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\BigQuery\AnalyticsHub\V1\Listing_State::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/OperationMetadata.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/OperationMetadata.php deleted file mode 100644 index 8f1689b049e3..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.bigquery.analyticshub.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\Bigquery\Analyticshub\V1\Analyticshub::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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Publisher.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Publisher.php deleted file mode 100644 index 7ee643e5a79f..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Publisher.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Publisher - */ -class Publisher extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Name of the listing publisher. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. Email or URL of the listing publisher. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $primary_contact = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. Name of the listing publisher. - * @type string $primary_contact - * Optional. Email or URL of the listing publisher. - * Max Length: 1000 bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Name of the listing publisher. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. Name of the listing publisher. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Email or URL of the listing publisher. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrimaryContact() - { - return $this->primary_contact; - } - - /** - * Optional. Email or URL of the listing publisher. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrimaryContact($var) - { - GPBUtil::checkString($var, True); - $this->primary_contact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionRequest.php deleted file mode 100644 index f9822739ea36..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest - */ -class RefreshSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the Subscription to refresh. - * e.g. `projects/subscriberproject/locations/US/subscriptions/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the Subscription to refresh. - * e.g. `projects/subscriberproject/locations/US/subscriptions/123` - * Please see {@see AnalyticsHubServiceClient::subscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\RefreshSubscriptionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the Subscription to refresh. - * e.g. `projects/subscriberproject/locations/US/subscriptions/123` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the Subscription to refresh. - * e.g. `projects/subscriberproject/locations/US/subscriptions/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the Subscription to refresh. - * e.g. `projects/subscriberproject/locations/US/subscriptions/123` - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionResponse.php deleted file mode 100644 index baa3de8019f6..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RefreshSubscriptionResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionResponse - */ -class RefreshSubscriptionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The refreshed subscription resource. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; - */ - protected $subscription = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $subscription - * The refreshed subscription resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * The refreshed subscription resource. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription|null - */ - public function getSubscription() - { - return $this->subscription; - } - - public function hasSubscription() - { - return isset($this->subscription); - } - - public function clearSubscription() - { - unset($this->subscription); - } - - /** - * The refreshed subscription resource. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $var - * @return $this - */ - public function setSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); - $this->subscription = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionRequest.php deleted file mode 100644 index 1cc4e2365c1e..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest - */ -class RevokeSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the subscription to revoke. - * e.g. projects/123/locations/US/subscriptions/456 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the subscription to revoke. - * e.g. projects/123/locations/US/subscriptions/456 - * Please see {@see AnalyticsHubServiceClient::subscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\RevokeSubscriptionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the subscription to revoke. - * e.g. projects/123/locations/US/subscriptions/456 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the subscription to revoke. - * e.g. projects/123/locations/US/subscriptions/456 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the subscription to revoke. - * e.g. projects/123/locations/US/subscriptions/456 - * - * 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/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionResponse.php deleted file mode 100644 index 948f06a270ed..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/RevokeSubscriptionResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse - */ -class RevokeSubscriptionResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig.php deleted file mode 100644 index 2596b44bb334..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig - */ -class SharingEnvironmentConfig extends \Google\Protobuf\Internal\Message -{ - protected $environment; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DefaultExchangeConfig $default_exchange_config - * Default Analytics Hub data exchange, used for secured data sharing. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DcrExchangeConfig $dcr_exchange_config - * Data Clean Room (DCR), used for privacy-safe and secured data sharing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Default Analytics Hub data exchange, used for secured data sharing. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig default_exchange_config = 1; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DefaultExchangeConfig|null - */ - public function getDefaultExchangeConfig() - { - return $this->readOneof(1); - } - - public function hasDefaultExchangeConfig() - { - return $this->hasOneof(1); - } - - /** - * Default Analytics Hub data exchange, used for secured data sharing. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig default_exchange_config = 1; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DefaultExchangeConfig $var - * @return $this - */ - public function setDefaultExchangeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DefaultExchangeConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Data Clean Room (DCR), used for privacy-safe and secured data sharing. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig dcr_exchange_config = 2; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DcrExchangeConfig|null - */ - public function getDcrExchangeConfig() - { - return $this->readOneof(2); - } - - public function hasDcrExchangeConfig() - { - return $this->hasOneof(2); - } - - /** - * Data Clean Room (DCR), used for privacy-safe and secured data sharing. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig dcr_exchange_config = 2; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DcrExchangeConfig $var - * @return $this - */ - public function setDcrExchangeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig\DcrExchangeConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getEnvironment() - { - return $this->whichOneof("environment"); - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DcrExchangeConfig.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DcrExchangeConfig.php deleted file mode 100644 index e5dcfa6b2daa..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DcrExchangeConfig.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig - */ -class DcrExchangeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. If True, this DCR restricts the contributors to sharing - * only a single resource in a Listing. And no two resources should have the - * same IDs. So if a contributor adds a view with a conflicting name, the - * CreateListing API will reject the request. if False, the data contributor - * can publish an entire dataset (as before). This is not configurable, and - * by default, all new DCRs will have the restriction set to True. - * - * Generated from protobuf field optional bool single_selected_resource_sharing_restriction = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $single_selected_resource_sharing_restriction = null; - /** - * Output only. If True, when subscribing to this DCR, it will create only - * one linked dataset containing all resources shared within the - * cleanroom. If False, when subscribing to this DCR, it will - * create 1 linked dataset per listing. This is not configurable, and by - * default, all new DCRs will have the restriction set to True. - * - * Generated from protobuf field optional bool single_linked_dataset_per_cleanroom = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $single_linked_dataset_per_cleanroom = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $single_selected_resource_sharing_restriction - * Output only. If True, this DCR restricts the contributors to sharing - * only a single resource in a Listing. And no two resources should have the - * same IDs. So if a contributor adds a view with a conflicting name, the - * CreateListing API will reject the request. if False, the data contributor - * can publish an entire dataset (as before). This is not configurable, and - * by default, all new DCRs will have the restriction set to True. - * @type bool $single_linked_dataset_per_cleanroom - * Output only. If True, when subscribing to this DCR, it will create only - * one linked dataset containing all resources shared within the - * cleanroom. If False, when subscribing to this DCR, it will - * create 1 linked dataset per listing. This is not configurable, and by - * default, all new DCRs will have the restriction set to True. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Output only. If True, this DCR restricts the contributors to sharing - * only a single resource in a Listing. And no two resources should have the - * same IDs. So if a contributor adds a view with a conflicting name, the - * CreateListing API will reject the request. if False, the data contributor - * can publish an entire dataset (as before). This is not configurable, and - * by default, all new DCRs will have the restriction set to True. - * - * Generated from protobuf field optional bool single_selected_resource_sharing_restriction = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSingleSelectedResourceSharingRestriction() - { - return isset($this->single_selected_resource_sharing_restriction) ? $this->single_selected_resource_sharing_restriction : false; - } - - public function hasSingleSelectedResourceSharingRestriction() - { - return isset($this->single_selected_resource_sharing_restriction); - } - - public function clearSingleSelectedResourceSharingRestriction() - { - unset($this->single_selected_resource_sharing_restriction); - } - - /** - * Output only. If True, this DCR restricts the contributors to sharing - * only a single resource in a Listing. And no two resources should have the - * same IDs. So if a contributor adds a view with a conflicting name, the - * CreateListing API will reject the request. if False, the data contributor - * can publish an entire dataset (as before). This is not configurable, and - * by default, all new DCRs will have the restriction set to True. - * - * Generated from protobuf field optional bool single_selected_resource_sharing_restriction = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSingleSelectedResourceSharingRestriction($var) - { - GPBUtil::checkBool($var); - $this->single_selected_resource_sharing_restriction = $var; - - return $this; - } - - /** - * Output only. If True, when subscribing to this DCR, it will create only - * one linked dataset containing all resources shared within the - * cleanroom. If False, when subscribing to this DCR, it will - * create 1 linked dataset per listing. This is not configurable, and by - * default, all new DCRs will have the restriction set to True. - * - * Generated from protobuf field optional bool single_linked_dataset_per_cleanroom = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSingleLinkedDatasetPerCleanroom() - { - return isset($this->single_linked_dataset_per_cleanroom) ? $this->single_linked_dataset_per_cleanroom : false; - } - - public function hasSingleLinkedDatasetPerCleanroom() - { - return isset($this->single_linked_dataset_per_cleanroom); - } - - public function clearSingleLinkedDatasetPerCleanroom() - { - unset($this->single_linked_dataset_per_cleanroom); - } - - /** - * Output only. If True, when subscribing to this DCR, it will create only - * one linked dataset containing all resources shared within the - * cleanroom. If False, when subscribing to this DCR, it will - * create 1 linked dataset per listing. This is not configurable, and by - * default, all new DCRs will have the restriction set to True. - * - * Generated from protobuf field optional bool single_linked_dataset_per_cleanroom = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSingleLinkedDatasetPerCleanroom($var) - { - GPBUtil::checkBool($var); - $this->single_linked_dataset_per_cleanroom = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DcrExchangeConfig::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig_DcrExchangeConfig::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DefaultExchangeConfig.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DefaultExchangeConfig.php deleted file mode 100644 index 8382587d4c61..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SharingEnvironmentConfig/DefaultExchangeConfig.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig - */ -class DefaultExchangeConfig extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DefaultExchangeConfig::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\SharingEnvironmentConfig_DefaultExchangeConfig::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeRequest.php deleted file mode 100644 index 3647f2fefce4..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest - */ -class SubscribeDataExchangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the Data Exchange. - * e.g. `projects/publisherproject/locations/US/dataExchanges/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The parent resource path of the Subscription. - * e.g. `projects/subscriberproject/locations/US` - * - * Generated from protobuf field string destination = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $destination = ''; - /** - * Required. Name of the subscription to create. - * e.g. `subscription1` - * - * Generated from protobuf field string subscription = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subscription = ''; - /** - * Email of the subscriber. - * - * Generated from protobuf field string subscriber_contact = 3; - */ - protected $subscriber_contact = ''; - - /** - * @param string $name Required. Resource name of the Data Exchange. - * e.g. `projects/publisherproject/locations/US/dataExchanges/123` - * Please see {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SubscribeDataExchangeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the Data Exchange. - * e.g. `projects/publisherproject/locations/US/dataExchanges/123` - * @type string $destination - * Required. The parent resource path of the Subscription. - * e.g. `projects/subscriberproject/locations/US` - * @type string $subscription - * Required. Name of the subscription to create. - * e.g. `subscription1` - * @type string $subscriber_contact - * Email of the subscriber. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the Data Exchange. - * e.g. `projects/publisherproject/locations/US/dataExchanges/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the Data Exchange. - * e.g. `projects/publisherproject/locations/US/dataExchanges/123` - * - * 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 parent resource path of the Subscription. - * e.g. `projects/subscriberproject/locations/US` - * - * Generated from protobuf field string destination = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDestination() - { - return $this->destination; - } - - /** - * Required. The parent resource path of the Subscription. - * e.g. `projects/subscriberproject/locations/US` - * - * Generated from protobuf field string destination = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkString($var, True); - $this->destination = $var; - - return $this; - } - - /** - * Required. Name of the subscription to create. - * e.g. `subscription1` - * - * Generated from protobuf field string subscription = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubscription() - { - return $this->subscription; - } - - /** - * Required. Name of the subscription to create. - * e.g. `subscription1` - * - * Generated from protobuf field string subscription = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubscription($var) - { - GPBUtil::checkString($var, True); - $this->subscription = $var; - - return $this; - } - - /** - * Email of the subscriber. - * - * Generated from protobuf field string subscriber_contact = 3; - * @return string - */ - public function getSubscriberContact() - { - return $this->subscriber_contact; - } - - /** - * Email of the subscriber. - * - * Generated from protobuf field string subscriber_contact = 3; - * @param string $var - * @return $this - */ - public function setSubscriberContact($var) - { - GPBUtil::checkString($var, True); - $this->subscriber_contact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeResponse.php deleted file mode 100644 index f9c149b11580..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeDataExchangeResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeResponse - */ -class SubscribeDataExchangeResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Subscription object created from this subscribe action. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; - */ - protected $subscription = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $subscription - * Subscription object created from this subscribe action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Subscription object created from this subscribe action. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription|null - */ - public function getSubscription() - { - return $this->subscription; - } - - public function hasSubscription() - { - return isset($this->subscription); - } - - public function clearSubscription() - { - unset($this->subscription); - } - - /** - * Subscription object created from this subscribe action. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $var - * @return $this - */ - public function setSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); - $this->subscription = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingRequest.php deleted file mode 100644 index bc95350a135c..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest - */ -class SubscribeListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - protected $destination; - - /** - * @param string $name Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see - * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\SubscribeListingRequest - * - * @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 \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDataset $destination_dataset - * Input only. BigQuery destination dataset to create for the subscriber. - * @type string $name - * Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Input only. BigQuery destination dataset to create for the subscriber. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDataset|null - */ - public function getDestinationDataset() - { - return $this->readOneof(3); - } - - public function hasDestinationDataset() - { - return $this->hasOneof(3); - } - - /** - * Input only. BigQuery destination dataset to create for the subscriber. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDataset $var - * @return $this - */ - public function setDestinationDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DestinationDataset::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingResponse.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingResponse.php deleted file mode 100644 index 25398a642d6b..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/SubscribeListingResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse - */ -class SubscribeListingResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Subscription object created from this subscribe action. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; - */ - protected $subscription = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $subscription - * Subscription object created from this subscribe action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Subscription object created from this subscribe action. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription|null - */ - public function getSubscription() - { - return $this->subscription; - } - - public function hasSubscription() - { - return isset($this->subscription); - } - - public function clearSubscription() - { - unset($this->subscription); - } - - /** - * Subscription object created from this subscribe action. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription subscription = 1; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription $var - * @return $this - */ - public function setSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription::class); - $this->subscription = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription.php deleted file mode 100644 index 773d68ea160a..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription.php +++ /dev/null @@ -1,432 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Subscription - */ -class Subscription extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the subscription. - * e.g. `projects/myproject/locations/US/subscriptions/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Timestamp when the subscription was created. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creation_time = null; - /** - * Output only. Timestamp when the subscription was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp last_modify_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_modify_time = null; - /** - * Output only. Organization of the project this subscription belongs to. - * - * Generated from protobuf field string organization_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $organization_id = ''; - /** - * Output only. Display name of the project of this subscription. - * - * Generated from protobuf field string organization_display_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $organization_display_name = ''; - /** - * Output only. Current state of the subscription. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Map of listing resource names to associated linked resource, - * e.g. projects/123/locations/US/dataExchanges/456/listings/789 - * -> - * projects/123/datasets/my_dataset - * For listing-level subscriptions, this is a map of size 1. - * Only contains values if state == STATE_ACTIVE. - * - * Generated from protobuf field map linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $linked_dataset_map; - /** - * Output only. Email of the subscriber. - * - * Generated from protobuf field string subscriber_contact = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $subscriber_contact = ''; - protected $resource_name; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $listing - * Output only. Resource name of the source Listing. - * e.g. projects/123/locations/US/dataExchanges/456/listings/789 - * @type string $data_exchange - * Output only. Resource name of the source Data Exchange. - * e.g. projects/123/locations/US/dataExchanges/456 - * @type string $name - * Output only. The resource name of the subscription. - * e.g. `projects/myproject/locations/US/subscriptions/123`. - * @type \Google\Protobuf\Timestamp $creation_time - * Output only. Timestamp when the subscription was created. - * @type \Google\Protobuf\Timestamp $last_modify_time - * Output only. Timestamp when the subscription was last modified. - * @type string $organization_id - * Output only. Organization of the project this subscription belongs to. - * @type string $organization_display_name - * Output only. Display name of the project of this subscription. - * @type int $state - * Output only. Current state of the subscription. - * @type array|\Google\Protobuf\Internal\MapField $linked_dataset_map - * Output only. Map of listing resource names to associated linked resource, - * e.g. projects/123/locations/US/dataExchanges/456/listings/789 - * -> - * projects/123/datasets/my_dataset - * For listing-level subscriptions, this is a map of size 1. - * Only contains values if state == STATE_ACTIVE. - * @type string $subscriber_contact - * Output only. Email of the subscriber. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of the source Listing. - * e.g. projects/123/locations/US/dataExchanges/456/listings/789 - * - * Generated from protobuf field string listing = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getListing() - { - return $this->readOneof(5); - } - - public function hasListing() - { - return $this->hasOneof(5); - } - - /** - * Output only. Resource name of the source Listing. - * e.g. projects/123/locations/US/dataExchanges/456/listings/789 - * - * Generated from protobuf field string listing = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setListing($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Output only. Resource name of the source Data Exchange. - * e.g. projects/123/locations/US/dataExchanges/456 - * - * Generated from protobuf field string data_exchange = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDataExchange() - { - return $this->readOneof(6); - } - - public function hasDataExchange() - { - return $this->hasOneof(6); - } - - /** - * Output only. Resource name of the source Data Exchange. - * e.g. projects/123/locations/US/dataExchanges/456 - * - * Generated from protobuf field string data_exchange = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDataExchange($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Output only. The resource name of the subscription. - * e.g. `projects/myproject/locations/US/subscriptions/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the subscription. - * e.g. `projects/myproject/locations/US/subscriptions/123`. - * - * 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. Timestamp when the subscription was created. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreationTime() - { - return $this->creation_time; - } - - public function hasCreationTime() - { - return isset($this->creation_time); - } - - public function clearCreationTime() - { - unset($this->creation_time); - } - - /** - * Output only. Timestamp when the subscription was created. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->creation_time = $var; - - return $this; - } - - /** - * Output only. Timestamp when the subscription was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp last_modify_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastModifyTime() - { - return $this->last_modify_time; - } - - public function hasLastModifyTime() - { - return isset($this->last_modify_time); - } - - public function clearLastModifyTime() - { - unset($this->last_modify_time); - } - - /** - * Output only. Timestamp when the subscription was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp last_modify_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastModifyTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_modify_time = $var; - - return $this; - } - - /** - * Output only. Organization of the project this subscription belongs to. - * - * Generated from protobuf field string organization_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOrganizationId() - { - return $this->organization_id; - } - - /** - * Output only. Organization of the project this subscription belongs to. - * - * Generated from protobuf field string organization_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOrganizationId($var) - { - GPBUtil::checkString($var, True); - $this->organization_id = $var; - - return $this; - } - - /** - * Output only. Display name of the project of this subscription. - * - * Generated from protobuf field string organization_display_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOrganizationDisplayName() - { - return $this->organization_display_name; - } - - /** - * Output only. Display name of the project of this subscription. - * - * Generated from protobuf field string organization_display_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOrganizationDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->organization_display_name = $var; - - return $this; - } - - /** - * Output only. Current state of the subscription. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the subscription. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Subscription.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Map of listing resource names to associated linked resource, - * e.g. projects/123/locations/US/dataExchanges/456/listings/789 - * -> - * projects/123/datasets/my_dataset - * For listing-level subscriptions, this is a map of size 1. - * Only contains values if state == STATE_ACTIVE. - * - * Generated from protobuf field map linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLinkedDatasetMap() - { - return $this->linked_dataset_map; - } - - /** - * Output only. Map of listing resource names to associated linked resource, - * e.g. projects/123/locations/US/dataExchanges/456/listings/789 - * -> - * projects/123/datasets/my_dataset - * For listing-level subscriptions, this is a map of size 1. - * Only contains values if state == STATE_ACTIVE. - * - * Generated from protobuf field map linked_dataset_map = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLinkedDatasetMap($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription\LinkedResource::class); - $this->linked_dataset_map = $arr; - - return $this; - } - - /** - * Output only. Email of the subscriber. - * - * Generated from protobuf field string subscriber_contact = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSubscriberContact() - { - return $this->subscriber_contact; - } - - /** - * Output only. Email of the subscriber. - * - * Generated from protobuf field string subscriber_contact = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSubscriberContact($var) - { - GPBUtil::checkString($var, True); - $this->subscriber_contact = $var; - - return $this; - } - - /** - * @return string - */ - public function getResourceName() - { - return $this->whichOneof("resource_name"); - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/LinkedResource.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/LinkedResource.php deleted file mode 100644 index 997433f4fc84..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/LinkedResource.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource - */ -class LinkedResource extends \Google\Protobuf\Internal\Message -{ - protected $reference; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $linked_dataset - * Output only. Name of the linked dataset, e.g. - * projects/subscriberproject/datasets/linked_dataset - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the linked dataset, e.g. - * projects/subscriberproject/datasets/linked_dataset - * - * Generated from protobuf field string linked_dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLinkedDataset() - { - return $this->readOneof(1); - } - - public function hasLinkedDataset() - { - return $this->hasOneof(1); - } - - /** - * Output only. Name of the linked dataset, e.g. - * projects/subscriberproject/datasets/linked_dataset - * - * Generated from protobuf field string linked_dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLinkedDataset($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getReference() - { - return $this->whichOneof("reference"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LinkedResource::class, \Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription_LinkedResource::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/State.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/State.php deleted file mode 100644 index 8f5368d32784..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/Subscription/State.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.Subscription.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * This subscription is active and the data is accessible. - * - * Generated from protobuf enum STATE_ACTIVE = 1; - */ - const STATE_ACTIVE = 1; - /** - * The data referenced by this subscription is out of date and should be - * refreshed. This can happen when a data provider adds or removes datasets. - * - * Generated from protobuf enum STATE_STALE = 2; - */ - const STATE_STALE = 2; - /** - * This subscription has been cancelled or revoked and the data is no longer - * accessible. - * - * Generated from protobuf enum STATE_INACTIVE = 3; - */ - const STATE_INACTIVE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STATE_ACTIVE => 'STATE_ACTIVE', - self::STATE_STALE => 'STATE_STALE', - self::STATE_INACTIVE => 'STATE_INACTIVE', - ]; - - 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\BigQuery\AnalyticsHub\V1\Subscription_State::class); - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateDataExchangeRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateDataExchangeRequest.php deleted file mode 100644 index a39b0308867c..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateDataExchangeRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest - */ -class UpdateDataExchangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The data exchange to update. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_exchange = null; - - /** - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $dataExchange Required. The data exchange to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\UpdateDataExchangeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $dataExchange, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataExchange($dataExchange) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $data_exchange - * Required. The data exchange to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * - * 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. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * - * 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. The data exchange to update. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange|null - */ - public function getDataExchange() - { - return $this->data_exchange; - } - - public function hasDataExchange() - { - return isset($this->data_exchange); - } - - public function clearDataExchange() - { - unset($this->data_exchange); - } - - /** - * Required. The data exchange to update. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange $var - * @return $this - */ - public function setDataExchange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange::class); - $this->data_exchange = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateListingRequest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateListingRequest.php deleted file mode 100644 index d890cb88debf..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/proto/src/Google/Cloud/BigQuery/AnalyticsHub/V1/UpdateListingRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.bigquery.analyticshub.v1.UpdateListingRequest - */ -class UpdateListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask specifies the fields to update in the listing - * resource. The fields specified in the `updateMask` are relative to the - * resource and are not a full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The listing to update. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $listing = null; - - /** - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing Required. The listing to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask specifies the fields to update in the listing - * resource. The fields specified in the `updateMask` are relative to the - * resource and are not a full request. - * - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\UpdateListingRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setListing($listing) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask specifies the fields to update in the listing - * resource. The fields specified in the `updateMask` are relative to the - * resource and are not a full request. - * @type \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $listing - * Required. The listing to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask specifies the fields to update in the listing - * resource. The fields specified in the `updateMask` are relative to the - * resource and are not a full request. - * - * 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. Field mask specifies the fields to update in the listing - * resource. The fields specified in the `updateMask` are relative to the - * resource and are not a full request. - * - * 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. The listing to update. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing|null - */ - public function getListing() - { - return $this->listing; - } - - public function hasListing() - { - return isset($this->listing); - } - - public function clearListing() - { - unset($this->listing); - } - - /** - * Required. The listing to update. - * - * Generated from protobuf field .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing $var - * @return $this - */ - public function setListing($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\AnalyticsHub\V1\Listing::class); - $this->listing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_data_exchange.php deleted file mode 100644 index 7deb15f08eec..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_data_exchange.php +++ /dev/null @@ -1,90 +0,0 @@ -setDisplayName($dataExchangeDisplayName); - $request = (new CreateDataExchangeRequest()) - ->setParent($formattedParent) - ->setDataExchangeId($dataExchangeId) - ->setDataExchange($dataExchange); - - // Call the API and handle any network failures. - try { - /** @var DataExchange $response */ - $response = $analyticsHubServiceClient->createDataExchange($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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $dataExchangeId = '[DATA_EXCHANGE_ID]'; - $dataExchangeDisplayName = '[DISPLAY_NAME]'; - - create_data_exchange_sample($formattedParent, $dataExchangeId, $dataExchangeDisplayName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_listing.php deleted file mode 100644 index 9c3d7fb5bdf8..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/create_listing.php +++ /dev/null @@ -1,97 +0,0 @@ -setBigqueryDataset($listingBigqueryDataset) - ->setDisplayName($listingDisplayName); - $request = (new CreateListingRequest()) - ->setParent($formattedParent) - ->setListingId($listingId) - ->setListing($listing); - - // Call the API and handle any network failures. - try { - /** @var Listing $response */ - $response = $analyticsHubServiceClient->createListing($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 = AnalyticsHubServiceClient::dataExchangeName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]' - ); - $listingId = '[LISTING_ID]'; - $listingDisplayName = '[DISPLAY_NAME]'; - - create_listing_sample($formattedParent, $listingId, $listingDisplayName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php deleted file mode 100644 index b2c81eac8fb4..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $analyticsHubServiceClient->deleteDataExchange($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 = AnalyticsHubServiceClient::dataExchangeName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]' - ); - - delete_data_exchange_sample($formattedName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_listing.php deleted file mode 100644 index 154911e4d768..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_listing.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $analyticsHubServiceClient->deleteListing($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 = AnalyticsHubServiceClient::listingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]', - '[LISTING]' - ); - - delete_listing_sample($formattedName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_subscription.php deleted file mode 100644 index 58c61238ed1f..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/delete_subscription.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $analyticsHubServiceClient->deleteSubscription($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 = AnalyticsHubServiceClient::subscriptionName( - '[PROJECT]', - '[LOCATION]', - '[SUBSCRIPTION]' - ); - - delete_subscription_sample($formattedName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_data_exchange.php deleted file mode 100644 index 8168270e7bcc..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_data_exchange.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataExchange $response */ - $response = $analyticsHubServiceClient->getDataExchange($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 = AnalyticsHubServiceClient::dataExchangeName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]' - ); - - get_data_exchange_sample($formattedName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_iam_policy.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_iam_policy.php deleted file mode 100644 index 7b6395957e37..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_iam_policy.php +++ /dev/null @@ -1,71 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $analyticsHubServiceClient->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 analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_listing.php deleted file mode 100644 index 37c635b4cec1..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_listing.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Listing $response */ - $response = $analyticsHubServiceClient->getListing($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 = AnalyticsHubServiceClient::listingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]', - '[LISTING]' - ); - - get_listing_sample($formattedName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_subscription.php deleted file mode 100644 index 6df7c988d8a8..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/get_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Subscription $response */ - $response = $analyticsHubServiceClient->getSubscription($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 = AnalyticsHubServiceClient::subscriptionName( - '[PROJECT]', - '[LOCATION]', - '[SUBSCRIPTION]' - ); - - get_subscription_sample($formattedName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php deleted file mode 100644 index e1ce230bfb00..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $analyticsHubServiceClient->listDataExchanges($request); - - /** @var DataExchange $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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_data_exchanges_sample($formattedParent); -} -// [END analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_listings.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_listings.php deleted file mode 100644 index 8497431fbf05..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_listings.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $analyticsHubServiceClient->listListings($request); - - /** @var Listing $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 = AnalyticsHubServiceClient::dataExchangeName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]' - ); - - list_listings_sample($formattedParent); -} -// [END analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php deleted file mode 100644 index 909cafafe605..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php +++ /dev/null @@ -1,77 +0,0 @@ -setOrganization($organization); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $analyticsHubServiceClient->listOrgDataExchanges($request); - - /** @var DataExchange $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 -{ - $organization = '[ORGANIZATION]'; - - list_org_data_exchanges_sample($organization); -} -// [END analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php deleted file mode 100644 index 420411fd03cb..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php +++ /dev/null @@ -1,78 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $analyticsHubServiceClient->listSharedResourceSubscriptions($request); - - /** @var Subscription $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 -{ - $resource = '[RESOURCE]'; - - list_shared_resource_subscriptions_sample($resource); -} -// [END analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_subscriptions.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_subscriptions.php deleted file mode 100644 index 67d681debe88..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/list_subscriptions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $analyticsHubServiceClient->listSubscriptions($request); - - /** @var Subscription $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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_subscriptions_sample($formattedParent); -} -// [END analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/refresh_subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/refresh_subscription.php deleted file mode 100644 index acc145b1ed29..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/refresh_subscription.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $analyticsHubServiceClient->refreshSubscription($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RefreshSubscriptionResponse $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 -{ - $formattedName = AnalyticsHubServiceClient::subscriptionName( - '[PROJECT]', - '[LOCATION]', - '[SUBSCRIPTION]' - ); - - refresh_subscription_sample($formattedName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/revoke_subscription.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/revoke_subscription.php deleted file mode 100644 index a748b2c44de2..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/revoke_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RevokeSubscriptionResponse $response */ - $response = $analyticsHubServiceClient->revokeSubscription($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 = AnalyticsHubServiceClient::subscriptionName( - '[PROJECT]', - '[LOCATION]', - '[SUBSCRIPTION]' - ); - - revoke_subscription_sample($formattedName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/set_iam_policy.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/set_iam_policy.php deleted file mode 100644 index 20444c0319b2..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $analyticsHubServiceClient->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 analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php deleted file mode 100644 index 732adf0edd73..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php +++ /dev/null @@ -1,101 +0,0 @@ -setName($formattedName) - ->setDestination($formattedDestination) - ->setSubscription($subscription); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $analyticsHubServiceClient->subscribeDataExchange($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var SubscribeDataExchangeResponse $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 -{ - $formattedName = AnalyticsHubServiceClient::dataExchangeName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]' - ); - $formattedDestination = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $subscription = '[SUBSCRIPTION]'; - - subscribe_data_exchange_sample($formattedName, $formattedDestination, $subscription); -} -// [END analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_listing.php deleted file mode 100644 index 29db76caf325..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/subscribe_listing.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SubscribeListingResponse $response */ - $response = $analyticsHubServiceClient->subscribeListing($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 = AnalyticsHubServiceClient::listingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]', - '[LISTING]' - ); - - subscribe_listing_sample($formattedName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/test_iam_permissions.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/test_iam_permissions.php deleted file mode 100644 index c471d83cf94e..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,78 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $analyticsHubServiceClient->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 analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_data_exchange.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_data_exchange.php deleted file mode 100644 index 1c51faad82cd..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_data_exchange.php +++ /dev/null @@ -1,78 +0,0 @@ -setDisplayName($dataExchangeDisplayName); - $request = (new UpdateDataExchangeRequest()) - ->setUpdateMask($updateMask) - ->setDataExchange($dataExchange); - - // Call the API and handle any network failures. - try { - /** @var DataExchange $response */ - $response = $analyticsHubServiceClient->updateDataExchange($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 -{ - $dataExchangeDisplayName = '[DISPLAY_NAME]'; - - update_data_exchange_sample($dataExchangeDisplayName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_listing.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_listing.php deleted file mode 100644 index 7cafc4893e22..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/samples/V1/AnalyticsHubServiceClient/update_listing.php +++ /dev/null @@ -1,81 +0,0 @@ -setBigqueryDataset($listingBigqueryDataset) - ->setDisplayName($listingDisplayName); - $request = (new UpdateListingRequest()) - ->setUpdateMask($updateMask) - ->setListing($listing); - - // Call the API and handle any network failures. - try { - /** @var Listing $response */ - $response = $analyticsHubServiceClient->updateListing($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 -{ - $listingDisplayName = '[DISPLAY_NAME]'; - - update_listing_sample($listingDisplayName); -} -// [END analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/Client/AnalyticsHubServiceClient.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/Client/AnalyticsHubServiceClient.php deleted file mode 100644 index d84c587270fc..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/Client/AnalyticsHubServiceClient.php +++ /dev/null @@ -1,1009 +0,0 @@ - createDataExchangeAsync(CreateDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface createListingAsync(CreateListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataExchangeAsync(DeleteDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteListingAsync(DeleteListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSubscriptionAsync(DeleteSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataExchangeAsync(GetDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getListingAsync(GetListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSubscriptionAsync(GetSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataExchangesAsync(ListDataExchangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listListingsAsync(ListListingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOrgDataExchangesAsync(ListOrgDataExchangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSharedResourceSubscriptionsAsync(ListSharedResourceSubscriptionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSubscriptionsAsync(ListSubscriptionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface refreshSubscriptionAsync(RefreshSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface revokeSubscriptionAsync(RevokeSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface subscribeDataExchangeAsync(SubscribeDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface subscribeListingAsync(SubscribeListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataExchangeAsync(UpdateDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateListingAsync(UpdateListingRequest $request, array $optionalArgs = []) - */ -final class AnalyticsHubServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'analyticshub.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'analyticshub.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigquery', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/analytics_hub_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/analytics_hub_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/analytics_hub_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/analytics_hub_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_exchange resource. - * - * @param string $project - * @param string $location - * @param string $dataExchange - * - * @return string The formatted data_exchange resource. - */ - public static function dataExchangeName(string $project, string $location, string $dataExchange): string - { - return self::getPathTemplate('dataExchange')->render([ - 'project' => $project, - 'location' => $location, - 'data_exchange' => $dataExchange, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a dataset - * resource. - * - * @param string $project - * @param string $dataset - * - * @return string The formatted dataset resource. - */ - public static function datasetName(string $project, string $dataset): string - { - return self::getPathTemplate('dataset')->render([ - 'project' => $project, - 'dataset' => $dataset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a listing - * resource. - * - * @param string $project - * @param string $location - * @param string $dataExchange - * @param string $listing - * - * @return string The formatted listing resource. - */ - public static function listingName(string $project, string $location, string $dataExchange, string $listing): string - { - return self::getPathTemplate('listing')->render([ - 'project' => $project, - 'location' => $location, - 'data_exchange' => $dataExchange, - 'listing' => $listing, - ]); - } - - /** - * 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 subscription - * resource. - * - * @param string $project - * @param string $location - * @param string $subscription - * - * @return string The formatted subscription resource. - */ - public static function subscriptionName(string $project, string $location, string $subscription): string - { - return self::getPathTemplate('subscription')->render([ - 'project' => $project, - 'location' => $location, - 'subscription' => $subscription, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $dataset - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName(string $project, string $dataset, string $table): string - { - return self::getPathTemplate('table')->render([ - 'project' => $project, - 'dataset' => $dataset, - 'table' => $table, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataExchange: projects/{project}/locations/{location}/dataExchanges/{data_exchange} - * - dataset: projects/{project}/datasets/{dataset} - * - listing: projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing} - * - location: projects/{project}/locations/{location} - * - subscription: projects/{project}/locations/{location}/subscriptions/{subscription} - * - table: projects/{project}/datasets/{dataset}/tables/{table} - * - * 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 'analyticshub.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 new data exchange. - * - * The async variant is {@see AnalyticsHubServiceClient::createDataExchangeAsync()} - * . - * - * @example samples/V1/AnalyticsHubServiceClient/create_data_exchange.php - * - * @param CreateDataExchangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataExchange - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataExchange(CreateDataExchangeRequest $request, array $callOptions = []): DataExchange - { - return $this->startApiCall('CreateDataExchange', $request, $callOptions)->wait(); - } - - /** - * Creates a new listing. - * - * The async variant is {@see AnalyticsHubServiceClient::createListingAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/create_listing.php - * - * @param CreateListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Listing - * - * @throws ApiException Thrown if the API call fails. - */ - public function createListing(CreateListingRequest $request, array $callOptions = []): Listing - { - return $this->startApiCall('CreateListing', $request, $callOptions)->wait(); - } - - /** - * Deletes an existing data exchange. - * - * The async variant is {@see AnalyticsHubServiceClient::deleteDataExchangeAsync()} - * . - * - * @example samples/V1/AnalyticsHubServiceClient/delete_data_exchange.php - * - * @param DeleteDataExchangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteDataExchange(DeleteDataExchangeRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDataExchange', $request, $callOptions)->wait(); - } - - /** - * Deletes a listing. - * - * The async variant is {@see AnalyticsHubServiceClient::deleteListingAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/delete_listing.php - * - * @param DeleteListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteListing(DeleteListingRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteListing', $request, $callOptions)->wait(); - } - - /** - * Deletes a subscription. - * - * The async variant is {@see AnalyticsHubServiceClient::deleteSubscriptionAsync()} - * . - * - * @example samples/V1/AnalyticsHubServiceClient/delete_subscription.php - * - * @param DeleteSubscriptionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteSubscription(DeleteSubscriptionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSubscription', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a data exchange. - * - * The async variant is {@see AnalyticsHubServiceClient::getDataExchangeAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/get_data_exchange.php - * - * @param GetDataExchangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataExchange - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataExchange(GetDataExchangeRequest $request, array $callOptions = []): DataExchange - { - return $this->startApiCall('GetDataExchange', $request, $callOptions)->wait(); - } - - /** - * Gets the IAM policy. - * - * The async variant is {@see AnalyticsHubServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/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(); - } - - /** - * Gets the details of a listing. - * - * The async variant is {@see AnalyticsHubServiceClient::getListingAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/get_listing.php - * - * @param GetListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Listing - * - * @throws ApiException Thrown if the API call fails. - */ - public function getListing(GetListingRequest $request, array $callOptions = []): Listing - { - return $this->startApiCall('GetListing', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a Subscription. - * - * The async variant is {@see AnalyticsHubServiceClient::getSubscriptionAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/get_subscription.php - * - * @param GetSubscriptionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Subscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSubscription(GetSubscriptionRequest $request, array $callOptions = []): Subscription - { - return $this->startApiCall('GetSubscription', $request, $callOptions)->wait(); - } - - /** - * Lists all data exchanges in a given project and location. - * - * The async variant is {@see AnalyticsHubServiceClient::listDataExchangesAsync()} - * . - * - * @example samples/V1/AnalyticsHubServiceClient/list_data_exchanges.php - * - * @param ListDataExchangesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listDataExchanges(ListDataExchangesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataExchanges', $request, $callOptions); - } - - /** - * Lists all listings in a given project and location. - * - * The async variant is {@see AnalyticsHubServiceClient::listListingsAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/list_listings.php - * - * @param ListListingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listListings(ListListingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListListings', $request, $callOptions); - } - - /** - * Lists all data exchanges from projects in a given organization and - * location. - * - * The async variant is - * {@see AnalyticsHubServiceClient::listOrgDataExchangesAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/list_org_data_exchanges.php - * - * @param ListOrgDataExchangesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listOrgDataExchanges(ListOrgDataExchangesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOrgDataExchanges', $request, $callOptions); - } - - /** - * Lists all subscriptions on a given Data Exchange or Listing. - * - * The async variant is - * {@see AnalyticsHubServiceClient::listSharedResourceSubscriptionsAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/list_shared_resource_subscriptions.php - * - * @param ListSharedResourceSubscriptionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSharedResourceSubscriptions(ListSharedResourceSubscriptionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSharedResourceSubscriptions', $request, $callOptions); - } - - /** - * Lists all subscriptions in a given project and location. - * - * The async variant is {@see AnalyticsHubServiceClient::listSubscriptionsAsync()} - * . - * - * @example samples/V1/AnalyticsHubServiceClient/list_subscriptions.php - * - * @param ListSubscriptionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSubscriptions(ListSubscriptionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSubscriptions', $request, $callOptions); - } - - /** - * Refreshes a Subscription to a Data Exchange. A Data Exchange can become - * stale when a publisher adds or removes data. This is a long-running - * operation as it may create many linked datasets. - * - * The async variant is - * {@see AnalyticsHubServiceClient::refreshSubscriptionAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/refresh_subscription.php - * - * @param RefreshSubscriptionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 refreshSubscription(RefreshSubscriptionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RefreshSubscription', $request, $callOptions)->wait(); - } - - /** - * Revokes a given subscription. - * - * The async variant is {@see AnalyticsHubServiceClient::revokeSubscriptionAsync()} - * . - * - * @example samples/V1/AnalyticsHubServiceClient/revoke_subscription.php - * - * @param RevokeSubscriptionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RevokeSubscriptionResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function revokeSubscription(RevokeSubscriptionRequest $request, array $callOptions = []): RevokeSubscriptionResponse - { - return $this->startApiCall('RevokeSubscription', $request, $callOptions)->wait(); - } - - /** - * Sets the IAM policy. - * - * The async variant is {@see AnalyticsHubServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/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(); - } - - /** - * Creates a Subscription to a Data Exchange. This is a long-running operation - * as it will create one or more linked datasets. - * - * The async variant is - * {@see AnalyticsHubServiceClient::subscribeDataExchangeAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/subscribe_data_exchange.php - * - * @param SubscribeDataExchangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 subscribeDataExchange(SubscribeDataExchangeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SubscribeDataExchange', $request, $callOptions)->wait(); - } - - /** - * Subscribes to a listing. - * - * Currently, with Analytics Hub, you can create listings that - * reference only BigQuery datasets. - * Upon subscription to a listing for a BigQuery dataset, Analytics Hub - * creates a linked dataset in the subscriber's project. - * - * The async variant is {@see AnalyticsHubServiceClient::subscribeListingAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/subscribe_listing.php - * - * @param SubscribeListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SubscribeListingResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function subscribeListing(SubscribeListingRequest $request, array $callOptions = []): SubscribeListingResponse - { - return $this->startApiCall('SubscribeListing', $request, $callOptions)->wait(); - } - - /** - * Returns the permissions that a caller has. - * - * The async variant is {@see AnalyticsHubServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/AnalyticsHubServiceClient/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(); - } - - /** - * Updates an existing data exchange. - * - * The async variant is {@see AnalyticsHubServiceClient::updateDataExchangeAsync()} - * . - * - * @example samples/V1/AnalyticsHubServiceClient/update_data_exchange.php - * - * @param UpdateDataExchangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataExchange - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataExchange(UpdateDataExchangeRequest $request, array $callOptions = []): DataExchange - { - return $this->startApiCall('UpdateDataExchange', $request, $callOptions)->wait(); - } - - /** - * Updates an existing listing. - * - * The async variant is {@see AnalyticsHubServiceClient::updateListingAsync()} . - * - * @example samples/V1/AnalyticsHubServiceClient/update_listing.php - * - * @param UpdateListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Listing - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateListing(UpdateListingRequest $request, array $callOptions = []): Listing - { - return $this->startApiCall('UpdateListing', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 29a21346b492..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.bigquery.analyticshub.v1", - "libraryPackage": "Google\\Cloud\\BigQuery\\AnalyticsHub\\V1", - "services": { - "AnalyticsHubService": { - "clients": { - "grpc": { - "libraryClient": "AnalyticsHubServiceGapicClient", - "rpcs": { - "CreateDataExchange": { - "methods": [ - "createDataExchange" - ] - }, - "CreateListing": { - "methods": [ - "createListing" - ] - }, - "DeleteDataExchange": { - "methods": [ - "deleteDataExchange" - ] - }, - "DeleteListing": { - "methods": [ - "deleteListing" - ] - }, - "DeleteSubscription": { - "methods": [ - "deleteSubscription" - ] - }, - "GetDataExchange": { - "methods": [ - "getDataExchange" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetListing": { - "methods": [ - "getListing" - ] - }, - "GetSubscription": { - "methods": [ - "getSubscription" - ] - }, - "ListDataExchanges": { - "methods": [ - "listDataExchanges" - ] - }, - "ListListings": { - "methods": [ - "listListings" - ] - }, - "ListOrgDataExchanges": { - "methods": [ - "listOrgDataExchanges" - ] - }, - "ListSharedResourceSubscriptions": { - "methods": [ - "listSharedResourceSubscriptions" - ] - }, - "ListSubscriptions": { - "methods": [ - "listSubscriptions" - ] - }, - "RefreshSubscription": { - "methods": [ - "refreshSubscription" - ] - }, - "RevokeSubscription": { - "methods": [ - "revokeSubscription" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "SubscribeDataExchange": { - "methods": [ - "subscribeDataExchange" - ] - }, - "SubscribeListing": { - "methods": [ - "subscribeListing" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateDataExchange": { - "methods": [ - "updateDataExchange" - ] - }, - "UpdateListing": { - "methods": [ - "updateListing" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_client_config.json b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_client_config.json deleted file mode 100644 index 8847f98d2f28..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_client_config.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateDataExchange": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDataExchange": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDataExchange": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDataExchanges": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListListings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListOrgDataExchanges": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSharedResourceSubscriptions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSubscriptions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RefreshSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RevokeSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SubscribeDataExchange": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SubscribeListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDataExchange": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_descriptor_config.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_descriptor_config.php deleted file mode 100644 index efefd6b59a97..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_descriptor_config.php +++ /dev/null @@ -1,363 +0,0 @@ - [ - 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService' => [ - 'DeleteSubscription' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RefreshSubscription' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\RefreshSubscriptionResponse', - 'metadataReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SubscribeDataExchange' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\SubscribeDataExchangeResponse', - 'metadataReturnType' => '\Google\Cloud\BigQuery\AnalyticsHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateDataExchange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\Listing', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataExchange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataExchange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\Listing', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDataExchanges' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataExchanges', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListDataExchangesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListListings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getListings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListListingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrgDataExchanges' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataExchanges', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListOrgDataExchangesResponse', - 'headerParams' => [ - [ - 'keyName' => 'organization', - 'fieldAccessors' => [ - 'getOrganization', - ], - ], - ], - ], - 'ListSharedResourceSubscriptions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSharedResourceSubscriptions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListSharedResourceSubscriptionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'ListSubscriptions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSubscriptions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\ListSubscriptionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RevokeSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\RevokeSubscriptionResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'SubscribeListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\SubscribeListingResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateDataExchange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\DataExchange', - 'headerParams' => [ - [ - 'keyName' => 'data_exchange.name', - 'fieldAccessors' => [ - 'getDataExchange', - 'getName', - ], - ], - ], - ], - 'UpdateListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\AnalyticsHub\V1\Listing', - 'headerParams' => [ - [ - 'keyName' => 'listing.name', - 'fieldAccessors' => [ - 'getListing', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'dataExchange' => 'projects/{project}/locations/{location}/dataExchanges/{data_exchange}', - 'dataset' => 'projects/{project}/datasets/{dataset}', - 'listing' => 'projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}', - 'location' => 'projects/{project}/locations/{location}', - 'subscription' => 'projects/{project}/locations/{location}/subscriptions/{subscription}', - 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_rest_client_config.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_rest_client_config.php deleted file mode 100644 index 8dba38a5eee3..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/src/V1/resources/analytics_hub_service_rest_client_config.php +++ /dev/null @@ -1,332 +0,0 @@ - [ - 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService' => [ - 'CreateDataExchange' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataExchanges', - 'body' => 'data_exchange', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_exchange_id', - ], - ], - 'CreateListing' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataExchanges/*}/listings', - 'body' => 'listing', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'listing_id', - ], - ], - 'DeleteDataExchange' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteListing' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSubscription' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/subscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataExchange' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/subscriptions/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetListing' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSubscription' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/subscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDataExchanges' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataExchanges', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListListings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataExchanges/*}/listings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrgDataExchanges' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{organization=organizations/*/locations/*}/dataExchanges', - 'placeholders' => [ - 'organization' => [ - 'getters' => [ - 'getOrganization', - ], - ], - ], - ], - 'ListSharedResourceSubscriptions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*}:listSubscriptions', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:listSubscriptions', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'ListSubscriptions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/subscriptions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RefreshSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/subscriptions/*}:refresh', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RevokeSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/subscriptions/*}:revoke', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/subscriptions/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SubscribeDataExchange' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*}:subscribe', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SubscribeListing' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateDataExchange' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_exchange.name=projects/*/locations/*/dataExchanges/*}', - 'body' => 'data_exchange', - 'placeholders' => [ - 'data_exchange.name' => [ - 'getters' => [ - 'getDataExchange', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateListing' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{listing.name=projects/*/locations/*/dataExchanges/*/listings/*}', - 'body' => 'listing', - 'placeholders' => [ - 'listing.name' => [ - 'getters' => [ - 'getListing', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryAnalyticsHub/v1/tests/Unit/V1/Client/AnalyticsHubServiceClientTest.php b/owl-bot-staging/BigQueryAnalyticsHub/v1/tests/Unit/V1/Client/AnalyticsHubServiceClientTest.php deleted file mode 100644 index 6d51510c3d35..000000000000 --- a/owl-bot-staging/BigQueryAnalyticsHub/v1/tests/Unit/V1/Client/AnalyticsHubServiceClientTest.php +++ /dev/null @@ -1,1929 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AnalyticsHubServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AnalyticsHubServiceClient($options); - } - - /** @test */ - public function createDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataExchangeId = 'dataExchangeId1402219426'; - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new CreateDataExchangeRequest()) - ->setParent($formattedParent) - ->setDataExchangeId($dataExchangeId) - ->setDataExchange($dataExchange); - $response = $gapicClient->createDataExchange($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.bigquery.analyticshub.v1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataExchangeId(); - $this->assertProtobufEquals($dataExchangeId, $actualValue); - $actualValue = $actualRequestObject->getDataExchange(); - $this->assertProtobufEquals($dataExchange, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $dataExchangeId = 'dataExchangeId1402219426'; - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new CreateDataExchangeRequest()) - ->setParent($formattedParent) - ->setDataExchangeId($dataExchangeId) - ->setDataExchange($dataExchange); - try { - $gapicClient->createDataExchange($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $icon = '121'; - $requestAccess = 'requestAccess2059178260'; - $expectedResponse = new Listing(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setIcon($icon); - $expectedResponse->setRequestAccess($requestAccess); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $listingId = 'listingId988969142'; - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $request = (new CreateListingRequest()) - ->setParent($formattedParent) - ->setListingId($listingId) - ->setListing($listing); - $response = $gapicClient->createListing($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.bigquery.analyticshub.v1.AnalyticsHubService/CreateListing', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getListingId(); - $this->assertProtobufEquals($listingId, $actualValue); - $actualValue = $actualRequestObject->getListing(); - $this->assertProtobufEquals($listing, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $listingId = 'listingId988969142'; - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $request = (new CreateListingRequest()) - ->setParent($formattedParent) - ->setListingId($listingId) - ->setListing($listing); - try { - $gapicClient->createListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new DeleteDataExchangeRequest()) - ->setName($formattedName); - $gapicClient->deleteDataExchange($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new DeleteDataExchangeRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDataExchange($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new DeleteListingRequest()) - ->setName($formattedName); - $gapicClient->deleteListing($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteListing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new DeleteListingRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSubscriptionTest() - { - $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/deleteSubscriptionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSubscriptionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); - $request = (new DeleteSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSubscription($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.bigquery.analyticshub.v1.AnalyticsHubService/DeleteSubscription', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSubscriptionTest'); - $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 deleteSubscriptionExceptionTest() - { - $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/deleteSubscriptionTest'); - $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->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); - $request = (new DeleteSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSubscription($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSubscriptionTest'); - 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 getDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new GetDataExchangeRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataExchange($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.bigquery.analyticshub.v1.AnalyticsHubService/GetDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new GetDataExchangeRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataExchange($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.analyticshub.v1.AnalyticsHubService/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 getListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $icon = '121'; - $requestAccess = 'requestAccess2059178260'; - $expectedResponse = new Listing(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setIcon($icon); - $expectedResponse->setRequestAccess($requestAccess); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new GetListingRequest()) - ->setName($formattedName); - $response = $gapicClient->getListing($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.bigquery.analyticshub.v1.AnalyticsHubService/GetListing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new GetListingRequest()) - ->setName($formattedName); - try { - $gapicClient->getListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $listing = 'listing181975684'; - $name2 = 'name2-1052831874'; - $organizationId = 'organizationId1326486439'; - $organizationDisplayName = 'organizationDisplayName1039600500'; - $subscriberContact = 'subscriberContact-975982775'; - $expectedResponse = new Subscription(); - $expectedResponse->setListing($listing); - $expectedResponse->setName($name2); - $expectedResponse->setOrganizationId($organizationId); - $expectedResponse->setOrganizationDisplayName($organizationDisplayName); - $expectedResponse->setSubscriberContact($subscriberContact); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); - $request = (new GetSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->getSubscription($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.bigquery.analyticshub.v1.AnalyticsHubService/GetSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSubscriptionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); - $request = (new GetSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->getSubscription($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataExchangesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataExchangesElement = new DataExchange(); - $dataExchanges = [ - $dataExchangesElement, - ]; - $expectedResponse = new ListDataExchangesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataExchanges($dataExchanges); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataExchangesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataExchanges($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListDataExchanges', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataExchangesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListDataExchangesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataExchanges($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listListingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $listingsElement = new Listing(); - $listings = [ - $listingsElement, - ]; - $expectedResponse = new ListListingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setListings($listings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new ListListingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listListings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getListings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListListings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listListingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new ListListingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listListings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrgDataExchangesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataExchangesElement = new DataExchange(); - $dataExchanges = [ - $dataExchangesElement, - ]; - $expectedResponse = new ListOrgDataExchangesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataExchanges($dataExchanges); - $transport->addResponse($expectedResponse); - // Mock request - $organization = 'organization1178922291'; - $request = (new ListOrgDataExchangesRequest()) - ->setOrganization($organization); - $response = $gapicClient->listOrgDataExchanges($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListOrgDataExchanges', $actualFuncCall); - $actualValue = $actualRequestObject->getOrganization(); - $this->assertProtobufEquals($organization, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrgDataExchangesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $organization = 'organization1178922291'; - $request = (new ListOrgDataExchangesRequest()) - ->setOrganization($organization); - try { - $gapicClient->listOrgDataExchanges($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSharedResourceSubscriptionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sharedResourceSubscriptionsElement = new Subscription(); - $sharedResourceSubscriptions = [ - $sharedResourceSubscriptionsElement, - ]; - $expectedResponse = new ListSharedResourceSubscriptionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSharedResourceSubscriptions($sharedResourceSubscriptions); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new ListSharedResourceSubscriptionsRequest()) - ->setResource($resource); - $response = $gapicClient->listSharedResourceSubscriptions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSharedResourceSubscriptions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListSharedResourceSubscriptions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSharedResourceSubscriptionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListSharedResourceSubscriptionsRequest()) - ->setResource($resource); - try { - $gapicClient->listSharedResourceSubscriptions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubscriptionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $subscriptionsElement = new Subscription(); - $subscriptions = [ - $subscriptionsElement, - ]; - $expectedResponse = new ListSubscriptionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSubscriptions($subscriptions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSubscriptionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSubscriptions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSubscriptions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListSubscriptions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubscriptionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListSubscriptionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSubscriptions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function refreshSubscriptionTest() - { - $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/refreshSubscriptionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RefreshSubscriptionResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/refreshSubscriptionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); - $request = (new RefreshSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->refreshSubscription($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.bigquery.analyticshub.v1.AnalyticsHubService/RefreshSubscription', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/refreshSubscriptionTest'); - $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 refreshSubscriptionExceptionTest() - { - $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/refreshSubscriptionTest'); - $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->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); - $request = (new RefreshSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->refreshSubscription($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/refreshSubscriptionTest'); - 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 revokeSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RevokeSubscriptionResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); - $request = (new RevokeSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->revokeSubscription($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.bigquery.analyticshub.v1.AnalyticsHubService/RevokeSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function revokeSubscriptionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->subscriptionName('[PROJECT]', '[LOCATION]', '[SUBSCRIPTION]'); - $request = (new RevokeSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->revokeSubscription($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.analyticshub.v1.AnalyticsHubService/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 subscribeDataExchangeTest() - { - $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/subscribeDataExchangeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new SubscribeDataExchangeResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/subscribeDataExchangeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $formattedDestination = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $subscription = 'subscription341203229'; - $request = (new SubscribeDataExchangeRequest()) - ->setName($formattedName) - ->setDestination($formattedDestination) - ->setSubscription($subscription); - $response = $gapicClient->subscribeDataExchange($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.bigquery.analyticshub.v1.AnalyticsHubService/SubscribeDataExchange', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getDestination(); - $this->assertProtobufEquals($formattedDestination, $actualValue); - $actualValue = $actualApiRequestObject->getSubscription(); - $this->assertProtobufEquals($subscription, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/subscribeDataExchangeTest'); - $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 subscribeDataExchangeExceptionTest() - { - $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/subscribeDataExchangeTest'); - $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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $formattedDestination = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $subscription = 'subscription341203229'; - $request = (new SubscribeDataExchangeRequest()) - ->setName($formattedName) - ->setDestination($formattedDestination) - ->setSubscription($subscription); - $response = $gapicClient->subscribeDataExchange($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/subscribeDataExchangeTest'); - 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 subscribeListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SubscribeListingResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new SubscribeListingRequest()) - ->setName($formattedName); - $response = $gapicClient->subscribeListing($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.bigquery.analyticshub.v1.AnalyticsHubService/SubscribeListing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function subscribeListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new SubscribeListingRequest()) - ->setName($formattedName); - try { - $gapicClient->subscribeListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.analyticshub.v1.AnalyticsHubService/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 updateDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new UpdateDataExchangeRequest()) - ->setUpdateMask($updateMask) - ->setDataExchange($dataExchange); - $response = $gapicClient->updateDataExchange($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.bigquery.analyticshub.v1.AnalyticsHubService/UpdateDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getDataExchange(); - $this->assertProtobufEquals($dataExchange, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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(); - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new UpdateDataExchangeRequest()) - ->setUpdateMask($updateMask) - ->setDataExchange($dataExchange); - try { - $gapicClient->updateDataExchange($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $icon = '121'; - $requestAccess = 'requestAccess2059178260'; - $expectedResponse = new Listing(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setIcon($icon); - $expectedResponse->setRequestAccess($requestAccess); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $request = (new UpdateListingRequest()) - ->setUpdateMask($updateMask) - ->setListing($listing); - $response = $gapicClient->updateListing($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.bigquery.analyticshub.v1.AnalyticsHubService/UpdateListing', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getListing(); - $this->assertProtobufEquals($listing, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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(); - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $request = (new UpdateListingRequest()) - ->setUpdateMask($updateMask) - ->setListing($listing); - try { - $gapicClient->updateListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataExchangeAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataExchangeId = 'dataExchangeId1402219426'; - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new CreateDataExchangeRequest()) - ->setParent($formattedParent) - ->setDataExchangeId($dataExchangeId) - ->setDataExchange($dataExchange); - $response = $gapicClient->createDataExchangeAsync($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.bigquery.analyticshub.v1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataExchangeId(); - $this->assertProtobufEquals($dataExchangeId, $actualValue); - $actualValue = $actualRequestObject->getDataExchange(); - $this->assertProtobufEquals($dataExchange, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Connection/V1/Connection.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Connection/V1/Connection.php deleted file mode 100644 index 0503193128ae2c9e5fb25f64af5b3bc4f7e04950..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6926 zcmcIpTW=f36*eWyl}55HPb`U%k$SxjAX!jINHx-gj#4jmvk*I0M8$;-+KVMQl(t@S z*E>tgiog~q&|lC$(e|;A?LRQm7HHlC6v#s!3jc%vL3_^3?2VGFrPAt!tDQM#&gDC| z*-w7q?Rw;pRi0|;qbEyg{o z&b0N-@&guF4J)v!>w;Hx8F^L9idS_x;#GaLaEFk(V{xv?(5pb9^mE;xHX`+178U$V&AVCvPD7xZyrL@F%wz~ax3msa5GgHLURCZo}a zz_SLSHygPdoj*f%LLK@K^BX;_FVxfsH zH*3o0YQwvU4Zd=$TKcJ4vaJ?o1NbpL;XbuKonB9^T~li!Z$Q))8G1nxhRG*dl#;c; z)^dmbmmHZ|_8FwOIA3fr$Wc6?ACn87<%5d(oR*s%Dc}0m82H|}Np3i9T}Dqq9uCIf zV5e5`zFMHuN*SJ zx1r!=avt-i68p9gyFlhcm&T{}${(}Re?unk+dRRXhunXJStiMdXYDYPL(0vc2hE3s zB9sy$-Use;))poi(O;3NBLZ*_QWm3Aj?eO=g30Y{OpqeQW*d?Nb}%M1 zIM4<8`3b@9P9}CzH%XY{`iNYTT*Ks=pA>9A$<8*cw<*4$G|1^c&rkKCbOk9=Y<9^6 zw;aZsE_8(^c5|i>H=h@5%bBFCL>yLtfiOjU2!cBYj>g=J86ALR1~#O@Avj?WR|n~J zLZLYf%$D1*p%ygch70kAYvj_d#Z6$)fW!~YVg4tuI4r13{EgxDmqzJb&v$=9 zsHbi*Dj&sz@Ufd{fnjT$#Jc4%$c+(>_16Q0N(dz3jqzi*p=*TR6swKQhT~)y?Od}s zll6ygk@La6$3%QxT3pFw^P{H~(D=x88+g%8C}**?Fsb(&rci&CvC+)u(Mg>7FKy7p zs@L64J3yV#izC7h`WhKaiSQnIcg5H?%0^|?+89^GvdRjx<@A5#$i-AjqfZE}`!2Fqb`~VEB7Kwz9l&oH zIT(_`793d~$YU68kWt`@vJ0lN&&iy3fgg|}yL;!#Q)I&G!1M_LDH|`d#e!Y8p+6(< z93y~;2IwL2+&CKY5F+prU7Kpi1}UsSHz7tfTtP_{&^{Cfi)A^UGkDw<01ozLoaukd zk;_Ip@8c0AIhRGu>75JFeJ3Me(ph>{mmW&UKyb*ep zj6pQnK2mjjTSg77&XDU(2r@Csn+Y)>2V)P92Oxe%pgzaCVCGYXC_$HuCF^K~I3ZeP z$BgRfPst<>@F1|yDl)F2J!slHbeUWMN6Hleb_jW8m|4i>-y1s7q74d;QLn970sFkD zHus=gb^U#O&3tu$LB=r}Ab-|DQ?MBnTPay}MjUX1Tn{(&@?Vzw_5Xk`d&=3VI@21- zM}mi%nUK{%Yk{xP#cb97c*9{9%+VckO%!HxS8A@(MR<(N#7mi?_#^|0gLIR;_twIT zpo^*xf=;HrB$Py#Cz3b4LPlcHidb9x`Xadk9#a=W%CYp{IWi7uIn{>KjNMERnHpWD z`yI1%c4%CeGvGXUPYIZKguwajH{bn!U`a3HY~~QboR$7y{{EAv32Y zIr?!Xzolr-tmLPMhL{(HCJR(*g5~c7JyN~OT$lbGBBWC~gYv^}?yxsvYBl3F5LY4YPo^@zkLmwo-HlLXFBVL z_L7BaPKL0B2oRT`1#u~+ry(}iuh{gDIWh)dhf6wnK}YrQAgJkZFI7k`hQdtr?2)AU zvqNJ%oRQ{T59b6f%(<%H6+s*>W`jT8=0Ia z21s=Vt^-5ch~*P5R5x=^*5$gqN)*?KJ8pD#BG(o{y41H4uXZOcN?z?x12@;j_Yryj zQGo9wU*NZv#I<4J(ZcI+S5H z0m`0irEsv7Pu(}hv(sBUS~`Y#I57jW@UdIuvaN)7>Zx11ATrR;W}@5idHLxi@ulU& PuPkDx{2J0FT|)i~$#gg? diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsAccessRole.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsAccessRole.php deleted file mode 100644 index a8e30e4d6bc3..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsAccessRole.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.bigquery.connection.v1.AwsAccessRole - */ -class AwsAccessRole extends \Google\Protobuf\Internal\Message -{ - /** - * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - * Connection. - * - * Generated from protobuf field string iam_role_id = 1; - */ - protected $iam_role_id = ''; - /** - * A unique Google-owned and Google-generated identity for the Connection. - * This identity will be used to access the user's AWS IAM Role. - * - * Generated from protobuf field string identity = 2; - */ - protected $identity = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $iam_role_id - * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - * Connection. - * @type string $identity - * A unique Google-owned and Google-generated identity for the Connection. - * This identity will be used to access the user's AWS IAM Role. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - * Connection. - * - * Generated from protobuf field string iam_role_id = 1; - * @return string - */ - public function getIamRoleId() - { - return $this->iam_role_id; - } - - /** - * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - * Connection. - * - * Generated from protobuf field string iam_role_id = 1; - * @param string $var - * @return $this - */ - public function setIamRoleId($var) - { - GPBUtil::checkString($var, True); - $this->iam_role_id = $var; - - return $this; - } - - /** - * A unique Google-owned and Google-generated identity for the Connection. - * This identity will be used to access the user's AWS IAM Role. - * - * Generated from protobuf field string identity = 2; - * @return string - */ - public function getIdentity() - { - return $this->identity; - } - - /** - * A unique Google-owned and Google-generated identity for the Connection. - * This identity will be used to access the user's AWS IAM Role. - * - * Generated from protobuf field string identity = 2; - * @param string $var - * @return $this - */ - public function setIdentity($var) - { - GPBUtil::checkString($var, True); - $this->identity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsCrossAccountRole.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsCrossAccountRole.php deleted file mode 100644 index 9b36df96aeba..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsCrossAccountRole.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.bigquery.connection.v1.AwsCrossAccountRole - */ -class AwsCrossAccountRole extends \Google\Protobuf\Internal\Message -{ - /** - * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - * Connection. - * - * Generated from protobuf field string iam_role_id = 1; - */ - protected $iam_role_id = ''; - /** - * Output only. Google-owned AWS IAM User for a Connection. - * - * Generated from protobuf field string iam_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $iam_user_id = ''; - /** - * Output only. A Google-generated id for representing Connection’s identity - * in AWS. External Id is also used for preventing the Confused Deputy - * Problem. See - * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html - * - * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $external_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $iam_role_id - * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - * Connection. - * @type string $iam_user_id - * Output only. Google-owned AWS IAM User for a Connection. - * @type string $external_id - * Output only. A Google-generated id for representing Connection’s identity - * in AWS. External Id is also used for preventing the Confused Deputy - * Problem. See - * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - * Connection. - * - * Generated from protobuf field string iam_role_id = 1; - * @return string - */ - public function getIamRoleId() - { - return $this->iam_role_id; - } - - /** - * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - * Connection. - * - * Generated from protobuf field string iam_role_id = 1; - * @param string $var - * @return $this - */ - public function setIamRoleId($var) - { - GPBUtil::checkString($var, True); - $this->iam_role_id = $var; - - return $this; - } - - /** - * Output only. Google-owned AWS IAM User for a Connection. - * - * Generated from protobuf field string iam_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIamUserId() - { - return $this->iam_user_id; - } - - /** - * Output only. Google-owned AWS IAM User for a Connection. - * - * Generated from protobuf field string iam_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIamUserId($var) - { - GPBUtil::checkString($var, True); - $this->iam_user_id = $var; - - return $this; - } - - /** - * Output only. A Google-generated id for representing Connection’s identity - * in AWS. External Id is also used for preventing the Confused Deputy - * Problem. See - * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html - * - * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getExternalId() - { - return $this->external_id; - } - - /** - * Output only. A Google-generated id for representing Connection’s identity - * in AWS. External Id is also used for preventing the Confused Deputy - * Problem. See - * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html - * - * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setExternalId($var) - { - GPBUtil::checkString($var, True); - $this->external_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsProperties.php deleted file mode 100644 index 9d0a58c34f8b..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AwsProperties.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.bigquery.connection.v1.AwsProperties - */ -class AwsProperties extends \Google\Protobuf\Internal\Message -{ - protected $authentication_method; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Connection\V1\AwsCrossAccountRole $cross_account_role - * Authentication using Google owned AWS IAM user's access key to assume - * into customer's AWS IAM Role. - * Deprecated, do not use. - * @type \Google\Cloud\BigQuery\Connection\V1\AwsAccessRole $access_role - * Authentication using Google owned service account to assume into - * customer's AWS IAM Role. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Authentication using Google owned AWS IAM user's access key to assume - * into customer's AWS IAM Role. - * Deprecated, do not use. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsCrossAccountRole cross_account_role = 2 [deprecated = true]; - * @return \Google\Cloud\BigQuery\Connection\V1\AwsCrossAccountRole|null - * @deprecated - */ - public function getCrossAccountRole() - { - @trigger_error('cross_account_role is deprecated.', E_USER_DEPRECATED); - return $this->readOneof(2); - } - - public function hasCrossAccountRole() - { - @trigger_error('cross_account_role is deprecated.', E_USER_DEPRECATED); - return $this->hasOneof(2); - } - - /** - * Authentication using Google owned AWS IAM user's access key to assume - * into customer's AWS IAM Role. - * Deprecated, do not use. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsCrossAccountRole cross_account_role = 2 [deprecated = true]; - * @param \Google\Cloud\BigQuery\Connection\V1\AwsCrossAccountRole $var - * @return $this - * @deprecated - */ - public function setCrossAccountRole($var) - { - @trigger_error('cross_account_role is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\AwsCrossAccountRole::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Authentication using Google owned service account to assume into - * customer's AWS IAM Role. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3; - * @return \Google\Cloud\BigQuery\Connection\V1\AwsAccessRole|null - */ - public function getAccessRole() - { - return $this->readOneof(3); - } - - public function hasAccessRole() - { - return $this->hasOneof(3); - } - - /** - * Authentication using Google owned service account to assume into - * customer's AWS IAM Role. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3; - * @param \Google\Cloud\BigQuery\Connection\V1\AwsAccessRole $var - * @return $this - */ - public function setAccessRole($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\AwsAccessRole::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getAuthenticationMethod() - { - return $this->whichOneof("authentication_method"); - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AzureProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AzureProperties.php deleted file mode 100644 index 4eed865cd3d5..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/AzureProperties.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.bigquery.connection.v1.AzureProperties - */ -class AzureProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the Azure Active Directory Application. - * - * Generated from protobuf field string application = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $application = ''; - /** - * Output only. The client id of the Azure Active Directory Application. - * - * Generated from protobuf field string client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $client_id = ''; - /** - * Output only. The object id of the Azure Active Directory Application. - * - * Generated from protobuf field string object_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $object_id = ''; - /** - * The id of customer's directory that host the data. - * - * Generated from protobuf field string customer_tenant_id = 4; - */ - protected $customer_tenant_id = ''; - /** - * The URL user will be redirected to after granting consent during connection - * setup. - * - * Generated from protobuf field string redirect_uri = 5; - */ - protected $redirect_uri = ''; - /** - * The client ID of the user's Azure Active Directory Application used for a - * federated connection. - * - * Generated from protobuf field string federated_application_client_id = 6; - */ - protected $federated_application_client_id = ''; - /** - * Output only. A unique Google-owned and Google-generated identity for the - * Connection. This identity will be used to access the user's Azure Active - * Directory Application. - * - * Generated from protobuf field string identity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $identity = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $application - * Output only. The name of the Azure Active Directory Application. - * @type string $client_id - * Output only. The client id of the Azure Active Directory Application. - * @type string $object_id - * Output only. The object id of the Azure Active Directory Application. - * @type string $customer_tenant_id - * The id of customer's directory that host the data. - * @type string $redirect_uri - * The URL user will be redirected to after granting consent during connection - * setup. - * @type string $federated_application_client_id - * The client ID of the user's Azure Active Directory Application used for a - * federated connection. - * @type string $identity - * Output only. A unique Google-owned and Google-generated identity for the - * Connection. This identity will be used to access the user's Azure Active - * Directory Application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the Azure Active Directory Application. - * - * Generated from protobuf field string application = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApplication() - { - return $this->application; - } - - /** - * Output only. The name of the Azure Active Directory Application. - * - * Generated from protobuf field string application = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApplication($var) - { - GPBUtil::checkString($var, True); - $this->application = $var; - - return $this; - } - - /** - * Output only. The client id of the Azure Active Directory Application. - * - * Generated from protobuf field string client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClientId() - { - return $this->client_id; - } - - /** - * Output only. The client id of the Azure Active Directory Application. - * - * Generated from protobuf field string client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClientId($var) - { - GPBUtil::checkString($var, True); - $this->client_id = $var; - - return $this; - } - - /** - * Output only. The object id of the Azure Active Directory Application. - * - * Generated from protobuf field string object_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getObjectId() - { - return $this->object_id; - } - - /** - * Output only. The object id of the Azure Active Directory Application. - * - * Generated from protobuf field string object_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setObjectId($var) - { - GPBUtil::checkString($var, True); - $this->object_id = $var; - - return $this; - } - - /** - * The id of customer's directory that host the data. - * - * Generated from protobuf field string customer_tenant_id = 4; - * @return string - */ - public function getCustomerTenantId() - { - return $this->customer_tenant_id; - } - - /** - * The id of customer's directory that host the data. - * - * Generated from protobuf field string customer_tenant_id = 4; - * @param string $var - * @return $this - */ - public function setCustomerTenantId($var) - { - GPBUtil::checkString($var, True); - $this->customer_tenant_id = $var; - - return $this; - } - - /** - * The URL user will be redirected to after granting consent during connection - * setup. - * - * Generated from protobuf field string redirect_uri = 5; - * @return string - */ - public function getRedirectUri() - { - return $this->redirect_uri; - } - - /** - * The URL user will be redirected to after granting consent during connection - * setup. - * - * Generated from protobuf field string redirect_uri = 5; - * @param string $var - * @return $this - */ - public function setRedirectUri($var) - { - GPBUtil::checkString($var, True); - $this->redirect_uri = $var; - - return $this; - } - - /** - * The client ID of the user's Azure Active Directory Application used for a - * federated connection. - * - * Generated from protobuf field string federated_application_client_id = 6; - * @return string - */ - public function getFederatedApplicationClientId() - { - return $this->federated_application_client_id; - } - - /** - * The client ID of the user's Azure Active Directory Application used for a - * federated connection. - * - * Generated from protobuf field string federated_application_client_id = 6; - * @param string $var - * @return $this - */ - public function setFederatedApplicationClientId($var) - { - GPBUtil::checkString($var, True); - $this->federated_application_client_id = $var; - - return $this; - } - - /** - * Output only. A unique Google-owned and Google-generated identity for the - * Connection. This identity will be used to access the user's Azure Active - * Directory Application. - * - * Generated from protobuf field string identity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIdentity() - { - return $this->identity; - } - - /** - * Output only. A unique Google-owned and Google-generated identity for the - * Connection. This identity will be used to access the user's Azure Active - * Directory Application. - * - * Generated from protobuf field string identity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIdentity($var) - { - GPBUtil::checkString($var, True); - $this->identity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudResourceProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudResourceProperties.php deleted file mode 100644 index cf4b72596aaf..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudResourceProperties.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.bigquery.connection.v1.CloudResourceProperties - */ -class CloudResourceProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The account ID of the service created for the purpose of this - * connection. - * The service account does not have any permissions associated with it - * when it is created. After creation, customers delegate permissions - * to the service account. When the connection is used in the context of an - * operation in BigQuery, the service account will be used to connect to the - * desired resources in GCP. - * The account ID is in the form of: - * @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com - * - * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_account_id - * Output only. The account ID of the service created for the purpose of this - * connection. - * The service account does not have any permissions associated with it - * when it is created. After creation, customers delegate permissions - * to the service account. When the connection is used in the context of an - * operation in BigQuery, the service account will be used to connect to the - * desired resources in GCP. - * The account ID is in the form of: - * @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The account ID of the service created for the purpose of this - * connection. - * The service account does not have any permissions associated with it - * when it is created. After creation, customers delegate permissions - * to the service account. When the connection is used in the context of an - * operation in BigQuery, the service account will be used to connect to the - * desired resources in GCP. - * The account ID is in the form of: - * @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com - * - * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccountId() - { - return $this->service_account_id; - } - - /** - * Output only. The account ID of the service created for the purpose of this - * connection. - * The service account does not have any permissions associated with it - * when it is created. After creation, customers delegate permissions - * to the service account. When the connection is used in the context of an - * operation in BigQuery, the service account will be used to connect to the - * desired resources in GCP. - * The account ID is in the form of: - * @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com - * - * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccountId($var) - { - GPBUtil::checkString($var, True); - $this->service_account_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSpannerProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSpannerProperties.php deleted file mode 100644 index e200b09b16a3..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSpannerProperties.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.bigquery.connection.v1.CloudSpannerProperties - */ -class CloudSpannerProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Spanner database in the form `project/instance/database' - * - * Generated from protobuf field string database = 1; - */ - protected $database = ''; - /** - * If parallelism should be used when reading from Cloud Spanner - * - * Generated from protobuf field bool use_parallelism = 2; - */ - protected $use_parallelism = false; - /** - * Allows setting max parallelism per query when executing on Spanner - * independent compute resources. If unspecified, default values of - * parallelism are chosen that are dependent on the Cloud Spanner instance - * configuration. - * REQUIRES: `use_parallelism` must be set. - * REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be - * set. - * - * Generated from protobuf field int32 max_parallelism = 5; - */ - protected $max_parallelism = 0; - /** - * If the serverless analytics service should be used to read data from Cloud - * Spanner. - * Note: `use_parallelism` must be set when using serverless analytics. - * - * Generated from protobuf field bool use_serverless_analytics = 3; - */ - protected $use_serverless_analytics = false; - /** - * If set, the request will be executed via Spanner independent compute - * resources. - * REQUIRES: `use_parallelism` must be set. - * NOTE: `use_serverless_analytics` will be deprecated. Prefer - * `use_data_boost` over `use_serverless_analytics`. - * - * Generated from protobuf field bool use_data_boost = 6; - */ - protected $use_data_boost = false; - /** - * Optional. Cloud Spanner database role for fine-grained access control. - * The Cloud Spanner admin should have provisioned the database role with - * appropriate permissions, such as `SELECT` and `INSERT`. Other users should - * only use roles provided by their Cloud Spanner admins. - * For more details, see [About fine-grained access control] - * (https://cloud.google.com/spanner/docs/fgac-about). - * REQUIRES: The database role name must start with a letter, and can only - * contain letters, numbers, and underscores. - * - * Generated from protobuf field string database_role = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $database_role = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Cloud Spanner database in the form `project/instance/database' - * @type bool $use_parallelism - * If parallelism should be used when reading from Cloud Spanner - * @type int $max_parallelism - * Allows setting max parallelism per query when executing on Spanner - * independent compute resources. If unspecified, default values of - * parallelism are chosen that are dependent on the Cloud Spanner instance - * configuration. - * REQUIRES: `use_parallelism` must be set. - * REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be - * set. - * @type bool $use_serverless_analytics - * If the serverless analytics service should be used to read data from Cloud - * Spanner. - * Note: `use_parallelism` must be set when using serverless analytics. - * @type bool $use_data_boost - * If set, the request will be executed via Spanner independent compute - * resources. - * REQUIRES: `use_parallelism` must be set. - * NOTE: `use_serverless_analytics` will be deprecated. Prefer - * `use_data_boost` over `use_serverless_analytics`. - * @type string $database_role - * Optional. Cloud Spanner database role for fine-grained access control. - * The Cloud Spanner admin should have provisioned the database role with - * appropriate permissions, such as `SELECT` and `INSERT`. Other users should - * only use roles provided by their Cloud Spanner admins. - * For more details, see [About fine-grained access control] - * (https://cloud.google.com/spanner/docs/fgac-about). - * REQUIRES: The database role name must start with a letter, and can only - * contain letters, numbers, and underscores. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Spanner database in the form `project/instance/database' - * - * Generated from protobuf field string database = 1; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Cloud Spanner database in the form `project/instance/database' - * - * Generated from protobuf field string database = 1; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * If parallelism should be used when reading from Cloud Spanner - * - * Generated from protobuf field bool use_parallelism = 2; - * @return bool - */ - public function getUseParallelism() - { - return $this->use_parallelism; - } - - /** - * If parallelism should be used when reading from Cloud Spanner - * - * Generated from protobuf field bool use_parallelism = 2; - * @param bool $var - * @return $this - */ - public function setUseParallelism($var) - { - GPBUtil::checkBool($var); - $this->use_parallelism = $var; - - return $this; - } - - /** - * Allows setting max parallelism per query when executing on Spanner - * independent compute resources. If unspecified, default values of - * parallelism are chosen that are dependent on the Cloud Spanner instance - * configuration. - * REQUIRES: `use_parallelism` must be set. - * REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be - * set. - * - * Generated from protobuf field int32 max_parallelism = 5; - * @return int - */ - public function getMaxParallelism() - { - return $this->max_parallelism; - } - - /** - * Allows setting max parallelism per query when executing on Spanner - * independent compute resources. If unspecified, default values of - * parallelism are chosen that are dependent on the Cloud Spanner instance - * configuration. - * REQUIRES: `use_parallelism` must be set. - * REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be - * set. - * - * Generated from protobuf field int32 max_parallelism = 5; - * @param int $var - * @return $this - */ - public function setMaxParallelism($var) - { - GPBUtil::checkInt32($var); - $this->max_parallelism = $var; - - return $this; - } - - /** - * If the serverless analytics service should be used to read data from Cloud - * Spanner. - * Note: `use_parallelism` must be set when using serverless analytics. - * - * Generated from protobuf field bool use_serverless_analytics = 3; - * @return bool - */ - public function getUseServerlessAnalytics() - { - return $this->use_serverless_analytics; - } - - /** - * If the serverless analytics service should be used to read data from Cloud - * Spanner. - * Note: `use_parallelism` must be set when using serverless analytics. - * - * Generated from protobuf field bool use_serverless_analytics = 3; - * @param bool $var - * @return $this - */ - public function setUseServerlessAnalytics($var) - { - GPBUtil::checkBool($var); - $this->use_serverless_analytics = $var; - - return $this; - } - - /** - * If set, the request will be executed via Spanner independent compute - * resources. - * REQUIRES: `use_parallelism` must be set. - * NOTE: `use_serverless_analytics` will be deprecated. Prefer - * `use_data_boost` over `use_serverless_analytics`. - * - * Generated from protobuf field bool use_data_boost = 6; - * @return bool - */ - public function getUseDataBoost() - { - return $this->use_data_boost; - } - - /** - * If set, the request will be executed via Spanner independent compute - * resources. - * REQUIRES: `use_parallelism` must be set. - * NOTE: `use_serverless_analytics` will be deprecated. Prefer - * `use_data_boost` over `use_serverless_analytics`. - * - * Generated from protobuf field bool use_data_boost = 6; - * @param bool $var - * @return $this - */ - public function setUseDataBoost($var) - { - GPBUtil::checkBool($var); - $this->use_data_boost = $var; - - return $this; - } - - /** - * Optional. Cloud Spanner database role for fine-grained access control. - * The Cloud Spanner admin should have provisioned the database role with - * appropriate permissions, such as `SELECT` and `INSERT`. Other users should - * only use roles provided by their Cloud Spanner admins. - * For more details, see [About fine-grained access control] - * (https://cloud.google.com/spanner/docs/fgac-about). - * REQUIRES: The database role name must start with a letter, and can only - * contain letters, numbers, and underscores. - * - * Generated from protobuf field string database_role = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDatabaseRole() - { - return $this->database_role; - } - - /** - * Optional. Cloud Spanner database role for fine-grained access control. - * The Cloud Spanner admin should have provisioned the database role with - * appropriate permissions, such as `SELECT` and `INSERT`. Other users should - * only use roles provided by their Cloud Spanner admins. - * For more details, see [About fine-grained access control] - * (https://cloud.google.com/spanner/docs/fgac-about). - * REQUIRES: The database role name must start with a letter, and can only - * contain letters, numbers, and underscores. - * - * Generated from protobuf field string database_role = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDatabaseRole($var) - { - GPBUtil::checkString($var, True); - $this->database_role = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlCredential.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlCredential.php deleted file mode 100644 index 29199f24bfeb..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlCredential.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.bigquery.connection.v1.CloudSqlCredential - */ -class CloudSqlCredential extends \Google\Protobuf\Internal\Message -{ - /** - * The username for the credential. - * - * Generated from protobuf field string username = 1; - */ - protected $username = ''; - /** - * The password for the credential. - * - * Generated from protobuf field string password = 2; - */ - protected $password = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * The username for the credential. - * @type string $password - * The password for the credential. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * The username for the credential. - * - * Generated from protobuf field string username = 1; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * The username for the credential. - * - * Generated from protobuf field string username = 1; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * The password for the credential. - * - * Generated from protobuf field string password = 2; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * The password for the credential. - * - * Generated from protobuf field string password = 2; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties.php deleted file mode 100644 index 088c0b4a1475..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.bigquery.connection.v1.CloudSqlProperties - */ -class CloudSqlProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID in the form `project:location:instance`. - * - * Generated from protobuf field string instance_id = 1; - */ - protected $instance_id = ''; - /** - * Database name. - * - * Generated from protobuf field string database = 2; - */ - protected $database = ''; - /** - * Type of the Cloud SQL database. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType type = 3; - */ - protected $type = 0; - /** - * Input only. Cloud SQL credential. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlCredential credential = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $credential = null; - /** - * Output only. The account ID of the service used for the purpose of this - * connection. - * When the connection is used in the context of an operation in - * BigQuery, this service account will serve as the identity being used for - * connecting to the CloudSQL instance specified in this connection. - * - * Generated from protobuf field string service_account_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_id - * Cloud SQL instance ID in the form `project:location:instance`. - * @type string $database - * Database name. - * @type int $type - * Type of the Cloud SQL database. - * @type \Google\Cloud\BigQuery\Connection\V1\CloudSqlCredential $credential - * Input only. Cloud SQL credential. - * @type string $service_account_id - * Output only. The account ID of the service used for the purpose of this - * connection. - * When the connection is used in the context of an operation in - * BigQuery, this service account will serve as the identity being used for - * connecting to the CloudSQL instance specified in this connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID in the form `project:location:instance`. - * - * Generated from protobuf field string instance_id = 1; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Cloud SQL instance ID in the form `project:location:instance`. - * - * Generated from protobuf field string instance_id = 1; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Database name. - * - * Generated from protobuf field string database = 2; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Database name. - * - * Generated from protobuf field string database = 2; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Type of the Cloud SQL database. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the Cloud SQL database. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties\DatabaseType::class); - $this->type = $var; - - return $this; - } - - /** - * Input only. Cloud SQL credential. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlCredential credential = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Connection\V1\CloudSqlCredential|null - */ - public function getCredential() - { - return $this->credential; - } - - public function hasCredential() - { - return isset($this->credential); - } - - public function clearCredential() - { - unset($this->credential); - } - - /** - * Input only. Cloud SQL credential. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlCredential credential = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Connection\V1\CloudSqlCredential $var - * @return $this - */ - public function setCredential($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\CloudSqlCredential::class); - $this->credential = $var; - - return $this; - } - - /** - * Output only. The account ID of the service used for the purpose of this - * connection. - * When the connection is used in the context of an operation in - * BigQuery, this service account will serve as the identity being used for - * connecting to the CloudSQL instance specified in this connection. - * - * Generated from protobuf field string service_account_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccountId() - { - return $this->service_account_id; - } - - /** - * Output only. The account ID of the service used for the purpose of this - * connection. - * When the connection is used in the context of an operation in - * BigQuery, this service account will serve as the identity being used for - * connecting to the CloudSQL instance specified in this connection. - * - * Generated from protobuf field string service_account_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccountId($var) - { - GPBUtil::checkString($var, True); - $this->service_account_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties/DatabaseType.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties/DatabaseType.php deleted file mode 100644 index 8c0ea09de1f7..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CloudSqlProperties/DatabaseType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType - */ -class DatabaseType -{ - /** - * Unspecified database type. - * - * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; - */ - const DATABASE_TYPE_UNSPECIFIED = 0; - /** - * Cloud SQL for PostgreSQL. - * - * Generated from protobuf enum POSTGRES = 1; - */ - const POSTGRES = 1; - /** - * Cloud SQL for MySQL. - * - * Generated from protobuf enum MYSQL = 2; - */ - const MYSQL = 2; - - private static $valueToName = [ - self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', - self::POSTGRES => 'POSTGRES', - self::MYSQL => 'MYSQL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DatabaseType::class, \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties_DatabaseType::class); - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/Connection.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/Connection.php deleted file mode 100644 index 692d883d280c..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/Connection.php +++ /dev/null @@ -1,488 +0,0 @@ -google.cloud.bigquery.connection.v1.Connection - */ -class Connection extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the connection in the form of: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * User provided display name for the connection. - * - * Generated from protobuf field string friendly_name = 2; - */ - protected $friendly_name = ''; - /** - * User provided description. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of the connection. - * - * Generated from protobuf field int64 creation_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creation_time = 0; - /** - * Output only. The last update timestamp of the connection. - * - * Generated from protobuf field int64 last_modified_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_modified_time = 0; - /** - * Output only. True, if credential is configured for this connection. - * - * Generated from protobuf field bool has_credential = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $has_credential = false; - protected $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the connection in the form of: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * @type string $friendly_name - * User provided display name for the connection. - * @type string $description - * User provided description. - * @type \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties $cloud_sql - * Cloud SQL properties. - * @type \Google\Cloud\BigQuery\Connection\V1\AwsProperties $aws - * Amazon Web Services (AWS) properties. - * @type \Google\Cloud\BigQuery\Connection\V1\AzureProperties $azure - * Azure properties. - * @type \Google\Cloud\BigQuery\Connection\V1\CloudSpannerProperties $cloud_spanner - * Cloud Spanner properties. - * @type \Google\Cloud\BigQuery\Connection\V1\CloudResourceProperties $cloud_resource - * Cloud Resource properties. - * @type \Google\Cloud\BigQuery\Connection\V1\SparkProperties $spark - * Spark properties. - * @type \Google\Cloud\BigQuery\Connection\V1\SalesforceDataCloudProperties $salesforce_data_cloud - * Optional. Salesforce DataCloud properties. This field is intended for - * use only by Salesforce partner projects. This field contains properties - * for your Salesforce DataCloud connection. - * @type int|string $creation_time - * Output only. The creation timestamp of the connection. - * @type int|string $last_modified_time - * Output only. The last update timestamp of the connection. - * @type bool $has_credential - * Output only. True, if credential is configured for this connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the connection in the form of: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the connection in the form of: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * - * 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; - } - - /** - * User provided display name for the connection. - * - * Generated from protobuf field string friendly_name = 2; - * @return string - */ - public function getFriendlyName() - { - return $this->friendly_name; - } - - /** - * User provided display name for the connection. - * - * Generated from protobuf field string friendly_name = 2; - * @param string $var - * @return $this - */ - public function setFriendlyName($var) - { - GPBUtil::checkString($var, True); - $this->friendly_name = $var; - - return $this; - } - - /** - * User provided description. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User provided description. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Cloud SQL properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties cloud_sql = 4; - * @return \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties|null - */ - public function getCloudSql() - { - return $this->readOneof(4); - } - - public function hasCloudSql() - { - return $this->hasOneof(4); - } - - /** - * Cloud SQL properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSqlProperties cloud_sql = 4; - * @param \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties $var - * @return $this - */ - public function setCloudSql($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\CloudSqlProperties::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Amazon Web Services (AWS) properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsProperties aws = 8; - * @return \Google\Cloud\BigQuery\Connection\V1\AwsProperties|null - */ - public function getAws() - { - return $this->readOneof(8); - } - - public function hasAws() - { - return $this->hasOneof(8); - } - - /** - * Amazon Web Services (AWS) properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.AwsProperties aws = 8; - * @param \Google\Cloud\BigQuery\Connection\V1\AwsProperties $var - * @return $this - */ - public function setAws($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\AwsProperties::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Azure properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.AzureProperties azure = 11; - * @return \Google\Cloud\BigQuery\Connection\V1\AzureProperties|null - */ - public function getAzure() - { - return $this->readOneof(11); - } - - public function hasAzure() - { - return $this->hasOneof(11); - } - - /** - * Azure properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.AzureProperties azure = 11; - * @param \Google\Cloud\BigQuery\Connection\V1\AzureProperties $var - * @return $this - */ - public function setAzure($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\AzureProperties::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Cloud Spanner properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21; - * @return \Google\Cloud\BigQuery\Connection\V1\CloudSpannerProperties|null - */ - public function getCloudSpanner() - { - return $this->readOneof(21); - } - - public function hasCloudSpanner() - { - return $this->hasOneof(21); - } - - /** - * Cloud Spanner properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21; - * @param \Google\Cloud\BigQuery\Connection\V1\CloudSpannerProperties $var - * @return $this - */ - public function setCloudSpanner($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\CloudSpannerProperties::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Cloud Resource properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudResourceProperties cloud_resource = 22; - * @return \Google\Cloud\BigQuery\Connection\V1\CloudResourceProperties|null - */ - public function getCloudResource() - { - return $this->readOneof(22); - } - - public function hasCloudResource() - { - return $this->hasOneof(22); - } - - /** - * Cloud Resource properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.CloudResourceProperties cloud_resource = 22; - * @param \Google\Cloud\BigQuery\Connection\V1\CloudResourceProperties $var - * @return $this - */ - public function setCloudResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\CloudResourceProperties::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * Spark properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkProperties spark = 23; - * @return \Google\Cloud\BigQuery\Connection\V1\SparkProperties|null - */ - public function getSpark() - { - return $this->readOneof(23); - } - - public function hasSpark() - { - return $this->hasOneof(23); - } - - /** - * Spark properties. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkProperties spark = 23; - * @param \Google\Cloud\BigQuery\Connection\V1\SparkProperties $var - * @return $this - */ - public function setSpark($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\SparkProperties::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * Optional. Salesforce DataCloud properties. This field is intended for - * use only by Salesforce partner projects. This field contains properties - * for your Salesforce DataCloud connection. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.SalesforceDataCloudProperties salesforce_data_cloud = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Connection\V1\SalesforceDataCloudProperties|null - */ - public function getSalesforceDataCloud() - { - return $this->readOneof(24); - } - - public function hasSalesforceDataCloud() - { - return $this->hasOneof(24); - } - - /** - * Optional. Salesforce DataCloud properties. This field is intended for - * use only by Salesforce partner projects. This field contains properties - * for your Salesforce DataCloud connection. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.SalesforceDataCloudProperties salesforce_data_cloud = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Connection\V1\SalesforceDataCloudProperties $var - * @return $this - */ - public function setSalesforceDataCloud($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\SalesforceDataCloudProperties::class); - $this->writeOneof(24, $var); - - return $this; - } - - /** - * Output only. The creation timestamp of the connection. - * - * Generated from protobuf field int64 creation_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getCreationTime() - { - return $this->creation_time; - } - - /** - * Output only. The creation timestamp of the connection. - * - * Generated from protobuf field int64 creation_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setCreationTime($var) - { - GPBUtil::checkInt64($var); - $this->creation_time = $var; - - return $this; - } - - /** - * Output only. The last update timestamp of the connection. - * - * Generated from protobuf field int64 last_modified_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getLastModifiedTime() - { - return $this->last_modified_time; - } - - /** - * Output only. The last update timestamp of the connection. - * - * Generated from protobuf field int64 last_modified_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setLastModifiedTime($var) - { - GPBUtil::checkInt64($var); - $this->last_modified_time = $var; - - return $this; - } - - /** - * Output only. True, if credential is configured for this connection. - * - * Generated from protobuf field bool has_credential = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getHasCredential() - { - return $this->has_credential; - } - - /** - * Output only. True, if credential is configured for this connection. - * - * Generated from protobuf field bool has_credential = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setHasCredential($var) - { - GPBUtil::checkBool($var); - $this->has_credential = $var; - - return $this; - } - - /** - * @return string - */ - public function getProperties() - { - return $this->whichOneof("properties"); - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CreateConnectionRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CreateConnectionRequest.php deleted file mode 100644 index 444204a15db6..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/CreateConnectionRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.bigquery.connection.v1.CreateConnectionRequest - */ -class CreateConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent resource name. - * Must be in the format `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Connection id that should be assigned to the created connection. - * - * Generated from protobuf field string connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $connection_id = ''; - /** - * Required. Connection to create. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $connection = null; - - /** - * @param string $parent Required. Parent resource name. - * Must be in the format `projects/{project_id}/locations/{location_id}` - * Please see {@see ConnectionServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Connection\V1\Connection $connection Required. Connection to create. - * @param string $connectionId Optional. Connection id that should be assigned to the created connection. - * - * @return \Google\Cloud\BigQuery\Connection\V1\CreateConnectionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\Connection\V1\Connection $connection, string $connectionId): self - { - return (new self()) - ->setParent($parent) - ->setConnection($connection) - ->setConnectionId($connectionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent resource name. - * Must be in the format `projects/{project_id}/locations/{location_id}` - * @type string $connection_id - * Optional. Connection id that should be assigned to the created connection. - * @type \Google\Cloud\BigQuery\Connection\V1\Connection $connection - * Required. Connection to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent resource name. - * Must be in the format `projects/{project_id}/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. Parent resource name. - * Must be in the format `projects/{project_id}/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. Connection id that should be assigned to the created connection. - * - * Generated from protobuf field string connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getConnectionId() - { - return $this->connection_id; - } - - /** - * Optional. Connection id that should be assigned to the created connection. - * - * Generated from protobuf field string connection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setConnectionId($var) - { - GPBUtil::checkString($var, True); - $this->connection_id = $var; - - return $this; - } - - /** - * Required. Connection to create. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\Connection\V1\Connection|null - */ - public function getConnection() - { - return $this->connection; - } - - public function hasConnection() - { - return isset($this->connection); - } - - public function clearConnection() - { - unset($this->connection); - } - - /** - * Required. Connection to create. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\Connection\V1\Connection $var - * @return $this - */ - public function setConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\Connection::class); - $this->connection = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/DeleteConnectionRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/DeleteConnectionRequest.php deleted file mode 100644 index 8c912391fd91..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/DeleteConnectionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.connection.v1.DeleteConnectionRequest - */ -class DeleteConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the deleted connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the deleted connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * Please see {@see ConnectionServiceClient::connectionName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Connection\V1\DeleteConnectionRequest - * - * @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. Name of the deleted connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the deleted connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_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. Name of the deleted connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_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/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/GetConnectionRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/GetConnectionRequest.php deleted file mode 100644 index cbd405870a93..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/GetConnectionRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.bigquery.connection.v1.GetConnectionRequest - */ -class GetConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the requested connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the requested connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * Please see {@see ConnectionServiceClient::connectionName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Connection\V1\GetConnectionRequest - * - * @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. Name of the requested connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the requested connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_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. Name of the requested connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_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/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsRequest.php deleted file mode 100644 index f2b7e3b5136d..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.bigquery.connection.v1.ListConnectionsRequest - */ -class ListConnectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent resource name. - * Must be in the form: `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Page size. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_size = 0; - /** - * Page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent resource name. - * Must be in the form: `projects/{project_id}/locations/{location_id}` - * Please see {@see ConnectionServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Connection\V1\ListConnectionsRequest - * - * @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. Parent resource name. - * Must be in the form: `projects/{project_id}/locations/{location_id}` - * @type int $page_size - * Required. Page size. - * @type string $page_token - * Page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent resource name. - * Must be in the form: `projects/{project_id}/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. Parent resource name. - * Must be in the form: `projects/{project_id}/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. Page size. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Required. Page size. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsResponse.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsResponse.php deleted file mode 100644 index 8039d6aeb66d..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/ListConnectionsResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.bigquery.connection.v1.ListConnectionsResponse - */ -class ListConnectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 1; - */ - protected $next_page_token = ''; - /** - * List of connections. - * - * Generated from protobuf field repeated .google.cloud.bigquery.connection.v1.Connection connections = 2; - */ - private $connections; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $next_page_token - * Next page token. - * @type array<\Google\Cloud\BigQuery\Connection\V1\Connection>|\Google\Protobuf\Internal\RepeatedField $connections - * List of connections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 1; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 1; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * List of connections. - * - * Generated from protobuf field repeated .google.cloud.bigquery.connection.v1.Connection connections = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnections() - { - return $this->connections; - } - - /** - * List of connections. - * - * Generated from protobuf field repeated .google.cloud.bigquery.connection.v1.Connection connections = 2; - * @param array<\Google\Cloud\BigQuery\Connection\V1\Connection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Connection\V1\Connection::class); - $this->connections = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/MetastoreServiceConfig.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/MetastoreServiceConfig.php deleted file mode 100644 index ffc140b0c99c..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/MetastoreServiceConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.bigquery.connection.v1.MetastoreServiceConfig - */ -class MetastoreServiceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[region]/services/[service_id]` - * - * Generated from protobuf field string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $metastore_service = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metastore_service - * Optional. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[region]/services/[service_id]` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[region]/services/[service_id]` - * - * Generated from protobuf field string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getMetastoreService() - { - return $this->metastore_service; - } - - /** - * Optional. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[region]/services/[service_id]` - * - * Generated from protobuf field string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMetastoreService($var) - { - GPBUtil::checkString($var, True); - $this->metastore_service = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SalesforceDataCloudProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SalesforceDataCloudProperties.php deleted file mode 100644 index 96554aba2f5c..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SalesforceDataCloudProperties.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.bigquery.connection.v1.SalesforceDataCloudProperties - */ -class SalesforceDataCloudProperties extends \Google\Protobuf\Internal\Message -{ - /** - * The URL to the user's Salesforce DataCloud instance. - * - * Generated from protobuf field string instance_uri = 1; - */ - protected $instance_uri = ''; - /** - * Output only. A unique Google-owned and Google-generated service account - * identity for the connection. - * - * Generated from protobuf field string identity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $identity = ''; - /** - * The ID of the user's Salesforce tenant. - * - * Generated from protobuf field string tenant_id = 3; - */ - protected $tenant_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_uri - * The URL to the user's Salesforce DataCloud instance. - * @type string $identity - * Output only. A unique Google-owned and Google-generated service account - * identity for the connection. - * @type string $tenant_id - * The ID of the user's Salesforce tenant. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * The URL to the user's Salesforce DataCloud instance. - * - * Generated from protobuf field string instance_uri = 1; - * @return string - */ - public function getInstanceUri() - { - return $this->instance_uri; - } - - /** - * The URL to the user's Salesforce DataCloud instance. - * - * Generated from protobuf field string instance_uri = 1; - * @param string $var - * @return $this - */ - public function setInstanceUri($var) - { - GPBUtil::checkString($var, True); - $this->instance_uri = $var; - - return $this; - } - - /** - * Output only. A unique Google-owned and Google-generated service account - * identity for the connection. - * - * Generated from protobuf field string identity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIdentity() - { - return $this->identity; - } - - /** - * Output only. A unique Google-owned and Google-generated service account - * identity for the connection. - * - * Generated from protobuf field string identity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIdentity($var) - { - GPBUtil::checkString($var, True); - $this->identity = $var; - - return $this; - } - - /** - * The ID of the user's Salesforce tenant. - * - * Generated from protobuf field string tenant_id = 3; - * @return string - */ - public function getTenantId() - { - return $this->tenant_id; - } - - /** - * The ID of the user's Salesforce tenant. - * - * Generated from protobuf field string tenant_id = 3; - * @param string $var - * @return $this - */ - public function setTenantId($var) - { - GPBUtil::checkString($var, True); - $this->tenant_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkHistoryServerConfig.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkHistoryServerConfig.php deleted file mode 100644 index cc00cd0d8cb8..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkHistoryServerConfig.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.bigquery.connection.v1.SparkHistoryServerConfig - */ -class SparkHistoryServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Resource name of an existing Dataproc Cluster to act as a Spark - * History Server for the connection. - * Example: - * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - * - * Generated from protobuf field string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $dataproc_cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataproc_cluster - * Optional. Resource name of an existing Dataproc Cluster to act as a Spark - * History Server for the connection. - * Example: - * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Resource name of an existing Dataproc Cluster to act as a Spark - * History Server for the connection. - * Example: - * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - * - * Generated from protobuf field string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getDataprocCluster() - { - return $this->dataproc_cluster; - } - - /** - * Optional. Resource name of an existing Dataproc Cluster to act as a Spark - * History Server for the connection. - * Example: - * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - * - * Generated from protobuf field string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDataprocCluster($var) - { - GPBUtil::checkString($var, True); - $this->dataproc_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkProperties.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkProperties.php deleted file mode 100644 index 8c3e21da8ebb..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/SparkProperties.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.bigquery.connection.v1.SparkProperties - */ -class SparkProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The account ID of the service created for the purpose of this - * connection. - * The service account does not have any permissions associated with it when - * it is created. After creation, customers delegate permissions to the - * service account. When the connection is used in the context of a stored - * procedure for Apache Spark in BigQuery, the service account is used to - * connect to the desired resources in Google Cloud. - * The account ID is in the form of: - * bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com - * - * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account_id = ''; - /** - * Optional. Dataproc Metastore Service configuration for the connection. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.MetastoreServiceConfig metastore_service_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metastore_service_config = null; - /** - * Optional. Spark History Server configuration for the connection. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkHistoryServerConfig spark_history_server_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $spark_history_server_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_account_id - * Output only. The account ID of the service created for the purpose of this - * connection. - * The service account does not have any permissions associated with it when - * it is created. After creation, customers delegate permissions to the - * service account. When the connection is used in the context of a stored - * procedure for Apache Spark in BigQuery, the service account is used to - * connect to the desired resources in Google Cloud. - * The account ID is in the form of: - * bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com - * @type \Google\Cloud\BigQuery\Connection\V1\MetastoreServiceConfig $metastore_service_config - * Optional. Dataproc Metastore Service configuration for the connection. - * @type \Google\Cloud\BigQuery\Connection\V1\SparkHistoryServerConfig $spark_history_server_config - * Optional. Spark History Server configuration for the connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The account ID of the service created for the purpose of this - * connection. - * The service account does not have any permissions associated with it when - * it is created. After creation, customers delegate permissions to the - * service account. When the connection is used in the context of a stored - * procedure for Apache Spark in BigQuery, the service account is used to - * connect to the desired resources in Google Cloud. - * The account ID is in the form of: - * bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com - * - * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccountId() - { - return $this->service_account_id; - } - - /** - * Output only. The account ID of the service created for the purpose of this - * connection. - * The service account does not have any permissions associated with it when - * it is created. After creation, customers delegate permissions to the - * service account. When the connection is used in the context of a stored - * procedure for Apache Spark in BigQuery, the service account is used to - * connect to the desired resources in Google Cloud. - * The account ID is in the form of: - * bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com - * - * Generated from protobuf field string service_account_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccountId($var) - { - GPBUtil::checkString($var, True); - $this->service_account_id = $var; - - return $this; - } - - /** - * Optional. Dataproc Metastore Service configuration for the connection. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.MetastoreServiceConfig metastore_service_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Connection\V1\MetastoreServiceConfig|null - */ - public function getMetastoreServiceConfig() - { - return $this->metastore_service_config; - } - - public function hasMetastoreServiceConfig() - { - return isset($this->metastore_service_config); - } - - public function clearMetastoreServiceConfig() - { - unset($this->metastore_service_config); - } - - /** - * Optional. Dataproc Metastore Service configuration for the connection. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.MetastoreServiceConfig metastore_service_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Connection\V1\MetastoreServiceConfig $var - * @return $this - */ - public function setMetastoreServiceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\MetastoreServiceConfig::class); - $this->metastore_service_config = $var; - - return $this; - } - - /** - * Optional. Spark History Server configuration for the connection. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkHistoryServerConfig spark_history_server_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Connection\V1\SparkHistoryServerConfig|null - */ - public function getSparkHistoryServerConfig() - { - return $this->spark_history_server_config; - } - - public function hasSparkHistoryServerConfig() - { - return isset($this->spark_history_server_config); - } - - public function clearSparkHistoryServerConfig() - { - unset($this->spark_history_server_config); - } - - /** - * Optional. Spark History Server configuration for the connection. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.SparkHistoryServerConfig spark_history_server_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Connection\V1\SparkHistoryServerConfig $var - * @return $this - */ - public function setSparkHistoryServerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\SparkHistoryServerConfig::class); - $this->spark_history_server_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/UpdateConnectionRequest.php b/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/UpdateConnectionRequest.php deleted file mode 100644 index 21c323c829fa..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/proto/src/Google/Cloud/BigQuery/Connection/V1/UpdateConnectionRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.bigquery.connection.v1.UpdateConnectionRequest - */ -class UpdateConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the connection to update, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Connection containing the updated fields. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $connection = null; - /** - * Required. Update mask for the connection fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param string $name Required. Name of the connection to update, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * Please see {@see ConnectionServiceClient::connectionName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Connection\V1\Connection $connection Required. Connection containing the updated fields. - * @param \Google\Protobuf\FieldMask $updateMask Required. Update mask for the connection fields to be updated. - * - * @return \Google\Cloud\BigQuery\Connection\V1\UpdateConnectionRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\BigQuery\Connection\V1\Connection $connection, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setConnection($connection) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the connection to update, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * @type \Google\Cloud\BigQuery\Connection\V1\Connection $connection - * Required. Connection containing the updated fields. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Update mask for the connection fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Connection\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the connection to update, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_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. Name of the connection to update, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_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. Connection containing the updated fields. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\Connection\V1\Connection|null - */ - public function getConnection() - { - return $this->connection; - } - - public function hasConnection() - { - return isset($this->connection); - } - - public function clearConnection() - { - unset($this->connection); - } - - /** - * Required. Connection containing the updated fields. - * - * Generated from protobuf field .google.cloud.bigquery.connection.v1.Connection connection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\Connection\V1\Connection $var - * @return $this - */ - public function setConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Connection\V1\Connection::class); - $this->connection = $var; - - return $this; - } - - /** - * Required. Update mask for the connection fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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. Update mask for the connection fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/create_connection.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/create_connection.php deleted file mode 100644 index 98de64cb0e63..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/create_connection.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setConnection($connection); - - // Call the API and handle any network failures. - try { - /** @var Connection $response */ - $response = $connectionServiceClient->createConnection($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 = ConnectionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_connection_sample($formattedParent); -} -// [END bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/delete_connection.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/delete_connection.php deleted file mode 100644 index cbe881ff8807..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/delete_connection.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $connectionServiceClient->deleteConnection($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 = ConnectionServiceClient::connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); - - delete_connection_sample($formattedName); -} -// [END bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_connection.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_connection.php deleted file mode 100644 index 831921fe59ec..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_connection.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Connection $response */ - $response = $connectionServiceClient->getConnection($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 = ConnectionServiceClient::connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); - - get_connection_sample($formattedName); -} -// [END bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_iam_policy.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_iam_policy.php deleted file mode 100644 index 53aee56c0402..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/get_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $connectionServiceClient->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 bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/list_connections.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/list_connections.php deleted file mode 100644 index 091267c7cd4b..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/list_connections.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageSize($pageSize); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $connectionServiceClient->listConnections($request); - - /** @var Connection $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 = ConnectionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $pageSize = 0; - - list_connections_sample($formattedParent, $pageSize); -} -// [END bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/set_iam_policy.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/set_iam_policy.php deleted file mode 100644 index ef729bbf6995..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/set_iam_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $connectionServiceClient->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 bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/test_iam_permissions.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/test_iam_permissions.php deleted file mode 100644 index 0541de4552dc..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/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 = $connectionServiceClient->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 bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/update_connection.php b/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/update_connection.php deleted file mode 100644 index bd37bfe621a1..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/samples/V1/ConnectionServiceClient/update_connection.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName) - ->setConnection($connection) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Connection $response */ - $response = $connectionServiceClient->updateConnection($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 = ConnectionServiceClient::connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); - - update_connection_sample($formattedName); -} -// [END bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync] diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/Client/ConnectionServiceClient.php b/owl-bot-staging/BigQueryConnection/v1/src/V1/Client/ConnectionServiceClient.php deleted file mode 100644 index e022e96d5501..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/src/V1/Client/ConnectionServiceClient.php +++ /dev/null @@ -1,507 +0,0 @@ - createConnectionAsync(CreateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteConnectionAsync(DeleteConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getConnectionAsync(GetConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listConnectionsAsync(ListConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateConnectionAsync(UpdateConnectionRequest $request, array $optionalArgs = []) - */ -final class ConnectionServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.connection.v1.ConnectionService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigqueryconnection.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigqueryconnection.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigquery', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/connection_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/connection_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/connection_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/connection_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $region, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a connection - * resource. - * - * @param string $project - * @param string $location - * @param string $connection - * - * @return string The formatted connection resource. - */ - public static function connectionName(string $project, string $location, string $connection): string - { - return self::getPathTemplate('connection')->render([ - 'project' => $project, - 'location' => $location, - 'connection' => $connection, - ]); - } - - /** - * 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 service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cluster: projects/{project}/regions/{region}/clusters/{cluster} - * - connection: projects/{project}/locations/{location}/connections/{connection} - * - location: projects/{project}/locations/{location} - * - service: projects/{project}/locations/{location}/services/{service} - * - * 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 'bigqueryconnection.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new connection. - * - * The async variant is {@see ConnectionServiceClient::createConnectionAsync()} . - * - * @example samples/V1/ConnectionServiceClient/create_connection.php - * - * @param CreateConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Connection - * - * @throws ApiException Thrown if the API call fails. - */ - public function createConnection(CreateConnectionRequest $request, array $callOptions = []): Connection - { - return $this->startApiCall('CreateConnection', $request, $callOptions)->wait(); - } - - /** - * Deletes connection and associated credential. - * - * The async variant is {@see ConnectionServiceClient::deleteConnectionAsync()} . - * - * @example samples/V1/ConnectionServiceClient/delete_connection.php - * - * @param DeleteConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteConnection(DeleteConnectionRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteConnection', $request, $callOptions)->wait(); - } - - /** - * Returns specified connection. - * - * The async variant is {@see ConnectionServiceClient::getConnectionAsync()} . - * - * @example samples/V1/ConnectionServiceClient/get_connection.php - * - * @param GetConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Connection - * - * @throws ApiException Thrown if the API call fails. - */ - public function getConnection(GetConnectionRequest $request, array $callOptions = []): Connection - { - return $this->startApiCall('GetConnection', $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 ConnectionServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/ConnectionServiceClient/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(); - } - - /** - * Returns a list of connections in the given project. - * - * The async variant is {@see ConnectionServiceClient::listConnectionsAsync()} . - * - * @example samples/V1/ConnectionServiceClient/list_connections.php - * - * @param ListConnectionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listConnections(ListConnectionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListConnections', $request, $callOptions); - } - - /** - * 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 ConnectionServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/ConnectionServiceClient/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 ConnectionServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/ConnectionServiceClient/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(); - } - - /** - * Updates the specified connection. For security reasons, also resets - * credential if connection properties are in the update field mask. - * - * The async variant is {@see ConnectionServiceClient::updateConnectionAsync()} . - * - * @example samples/V1/ConnectionServiceClient/update_connection.php - * - * @param UpdateConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Connection - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateConnection(UpdateConnectionRequest $request, array $callOptions = []): Connection - { - return $this->startApiCall('UpdateConnection', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryConnection/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 184acd74f36e..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.bigquery.connection.v1", - "libraryPackage": "Google\\Cloud\\BigQuery\\Connection\\V1", - "services": { - "ConnectionService": { - "clients": { - "grpc": { - "libraryClient": "ConnectionServiceGapicClient", - "rpcs": { - "CreateConnection": { - "methods": [ - "createConnection" - ] - }, - "DeleteConnection": { - "methods": [ - "deleteConnection" - ] - }, - "GetConnection": { - "methods": [ - "getConnection" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "ListConnections": { - "methods": [ - "listConnections" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateConnection": { - "methods": [ - "updateConnection" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_client_config.json b/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_client_config.json deleted file mode 100644 index 31abd111ed39..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_client_config.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.connection.v1.ConnectionService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteConnection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetConnection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListConnections": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_descriptor_config.php b/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_descriptor_config.php deleted file mode 100644 index cde4430f8eda..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_descriptor_config.php +++ /dev/null @@ -1,138 +0,0 @@ - [ - 'google.cloud.bigquery.connection.v1.ConnectionService' => [ - 'CreateConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Connection\V1\Connection', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Connection\V1\Connection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'ListConnections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConnections', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Connection\V1\ListConnectionsResponse', - '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', - ], - ], - ], - ], - 'UpdateConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Connection\V1\Connection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'cluster' => 'projects/{project}/regions/{region}/clusters/{cluster}', - 'connection' => 'projects/{project}/locations/{location}/connections/{connection}', - 'location' => 'projects/{project}/locations/{location}', - 'service' => 'projects/{project}/locations/{location}/services/{service}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_rest_client_config.php b/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_rest_client_config.php deleted file mode 100644 index 31ae1178ae30..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/src/V1/resources/connection_service_rest_client_config.php +++ /dev/null @@ -1,128 +0,0 @@ - [ - 'google.cloud.bigquery.connection.v1.ConnectionService' => [ - 'CreateConnection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connections', - 'body' => 'connection', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConnection' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/connections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConnection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/connections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/connections/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'ListConnections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_size', - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/connections/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/connections/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateConnection' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/connections/*}', - 'body' => 'connection', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/BigQueryConnection/v1/tests/Unit/V1/Client/ConnectionServiceClientTest.php b/owl-bot-staging/BigQueryConnection/v1/tests/Unit/V1/Client/ConnectionServiceClientTest.php deleted file mode 100644 index f7f488f16614..000000000000 --- a/owl-bot-staging/BigQueryConnection/v1/tests/Unit/V1/Client/ConnectionServiceClientTest.php +++ /dev/null @@ -1,702 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ConnectionServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ConnectionServiceClient($options); - } - - /** @test */ - public function createConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $friendlyName = 'friendlyName1451097503'; - $description = 'description-1724546052'; - $creationTime = 1932333101; - $lastModifiedTime = 671513446; - $hasCredential = true; - $expectedResponse = new Connection(); - $expectedResponse->setName($name); - $expectedResponse->setFriendlyName($friendlyName); - $expectedResponse->setDescription($description); - $expectedResponse->setCreationTime($creationTime); - $expectedResponse->setLastModifiedTime($lastModifiedTime); - $expectedResponse->setHasCredential($hasCredential); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $connection = new Connection(); - $request = (new CreateConnectionRequest()) - ->setParent($formattedParent) - ->setConnection($connection); - $response = $gapicClient->createConnection($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.bigquery.connection.v1.ConnectionService/CreateConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getConnection(); - $this->assertProtobufEquals($connection, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $connection = new Connection(); - $request = (new CreateConnectionRequest()) - ->setParent($formattedParent) - ->setConnection($connection); - try { - $gapicClient->createConnection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); - $request = (new DeleteConnectionRequest()) - ->setName($formattedName); - $gapicClient->deleteConnection($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.connection.v1.ConnectionService/DeleteConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); - $request = (new DeleteConnectionRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteConnection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $friendlyName = 'friendlyName1451097503'; - $description = 'description-1724546052'; - $creationTime = 1932333101; - $lastModifiedTime = 671513446; - $hasCredential = true; - $expectedResponse = new Connection(); - $expectedResponse->setName($name2); - $expectedResponse->setFriendlyName($friendlyName); - $expectedResponse->setDescription($description); - $expectedResponse->setCreationTime($creationTime); - $expectedResponse->setLastModifiedTime($lastModifiedTime); - $expectedResponse->setHasCredential($hasCredential); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); - $request = (new GetConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->getConnection($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.bigquery.connection.v1.ConnectionService/GetConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); - $request = (new GetConnectionRequest()) - ->setName($formattedName); - try { - $gapicClient->getConnection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.connection.v1.ConnectionService/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 listConnectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $connectionsElement = new Connection(); - $connections = [ - $connectionsElement, - ]; - $expectedResponse = new ListConnectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConnections($connections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageSize = 883849137; - $request = (new ListConnectionsRequest()) - ->setParent($formattedParent) - ->setPageSize($pageSize); - $response = $gapicClient->listConnections($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConnections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.connection.v1.ConnectionService/ListConnections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageSize(); - $this->assertProtobufEquals($pageSize, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $pageSize = 883849137; - $request = (new ListConnectionsRequest()) - ->setParent($formattedParent) - ->setPageSize($pageSize); - try { - $gapicClient->listConnections($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.connection.v1.ConnectionService/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.bigquery.connection.v1.ConnectionService/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 updateConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $friendlyName = 'friendlyName1451097503'; - $description = 'description-1724546052'; - $creationTime = 1932333101; - $lastModifiedTime = 671513446; - $hasCredential = true; - $expectedResponse = new Connection(); - $expectedResponse->setName($name2); - $expectedResponse->setFriendlyName($friendlyName); - $expectedResponse->setDescription($description); - $expectedResponse->setCreationTime($creationTime); - $expectedResponse->setLastModifiedTime($lastModifiedTime); - $expectedResponse->setHasCredential($hasCredential); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); - $connection = new Connection(); - $updateMask = new FieldMask(); - $request = (new UpdateConnectionRequest()) - ->setName($formattedName) - ->setConnection($connection) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateConnection($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.bigquery.connection.v1.ConnectionService/UpdateConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getConnection(); - $this->assertProtobufEquals($connection, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]'); - $connection = new Connection(); - $updateMask = new FieldMask(); - $request = (new UpdateConnectionRequest()) - ->setName($formattedName) - ->setConnection($connection) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateConnection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConnectionAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $friendlyName = 'friendlyName1451097503'; - $description = 'description-1724546052'; - $creationTime = 1932333101; - $lastModifiedTime = 671513446; - $hasCredential = true; - $expectedResponse = new Connection(); - $expectedResponse->setName($name); - $expectedResponse->setFriendlyName($friendlyName); - $expectedResponse->setDescription($description); - $expectedResponse->setCreationTime($creationTime); - $expectedResponse->setLastModifiedTime($lastModifiedTime); - $expectedResponse->setHasCredential($hasCredential); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $connection = new Connection(); - $request = (new CreateConnectionRequest()) - ->setParent($formattedParent) - ->setConnection($connection); - $response = $gapicClient->createConnectionAsync($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.bigquery.connection.v1.ConnectionService/CreateConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getConnection(); - $this->assertProtobufEquals($connection, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Dataexchange/V1Beta1/Dataexchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Dataexchange/V1Beta1/Dataexchange.php deleted file mode 100644 index 50488f80095d0feb2b8cfc10d2ae33e5dfb1ce98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10020 zcmcgy%WoUU8P8IdY!79b8u>xXNweNKjjY;atu%p6M@d%Hnqnh9LQ;;CG9Z@ZNZObp zH@i#QimMh#fdaksQlR|@`T&YvdMH}7J@uHLngTuO)I)n{dg!%Cd+0Z_Gs|7B>~Klc z1`J6%-}lY;p5HuPd&Ar{(F<~pbcv-qq%Al1WoMVjrqy$LtzJiN_P4i*CAWHerqLl* zN|x74a5z1*)9bg>O=IW7KC$-GZQaqy!`80e-684w z*PF!AuLnM+*h~m@^*v&ndW*=p@>&7NC}%y#gx0fEXnlX)avNA zE&B)2BP7E=v)}9(E!lQ-2Yy^O?1s@b97FFIAA!ZI^0wZw2?z+&Zuh$_$LMus%24XI z$kG+rl}TwYn?3N*sw~tjQ>TH$>iMoitghavuM@jv8K%>-%0QaQ>=4IuHT|-5g-=Vx z8Qb!bt79e;QgT&xtUmG2F3T2i`d0TA)0+x7@P4Zw;Y8Im>T0*!qh9EB?M!B1(?G=I z7_%LNbe(8Cw++&1uaRB-zR|Oyu~rCAtC5w=>wAz2b@);4L9q8npO14!W%Gg!uGaQU zC&G*#EAvo6x9^Rvt;hS0rJE+P9ur5Fn%7=8cp|FpwwHIep^lflOrd%668e*dRwpW8 zyzH{4SpBC&{ipo(pW^kuc%DzCn+Eg?npkcZSbW|$uuZe4(d6mF2`=~uES@8L=u3Ra z(D$Ixq~S-yWSPLn7lY%0v5S1neN}innS^K`XO4$dHFMMkl?LjDGbbwn;2RwCR$`7Xy4ok#4XkG}igmfk^zLMi^ z9;K{OVbPwlG>S2N1D)EopxoLWUy{XFo)wdT)@=PsRUHd5o_{T>6Qcj03}5CYVfeI;)t*0qbSeCr2w?NO_2~!pDII3EF2rp zgcJIy_kjYMrjUcMVxL>NIgW`{Du9|aMGa!DjGaFcx3A5oIRo zJkbT*xNia6gIRZakk57!L2}KlycR{Ih)>p)!qcgMPBO4a8%8qD6n!O%RIl5(T3$qR z76Bk^I}N?nBDS5J1(~elON&Kx_Q>SGub|^1@!SRC^5^O$^t{MQu1}!zLK9M!(KL$$ zK8xn7HMOQSwu;rVmd)SJYwL+;FhVnGwwAx6B_QFCp%cP#SYOU$fjn2LygS6QfKGcO zrP_v8sU{@+Wu$l?)%81CrIxSei@AncTyGTA%3E3u{z}BC8XjG?R48bbtd^LtXRC>6d=6o6NXwRrr2_pv6a2ou z1vL3mF>xIGjnIl(CHHRPM1c5qzNi+nd37^!GC-VD3)B(>4Sm6zF{hQPWe^S2alC{s zdjlJqx>?)EsukCq&HQbxQO)MHB3M0(F`Dxz3$S%k6Q}SZI_G^WZ>??SvyG~jt(7W? zxqu!Ot)}KT6Q=_otL0LqR!t=ECG?yph0n+QS<$MRTFGuC=J6HuqDNAzsE`%F%iO~# zH%qyEwMLzY@$=}SpY)El$w+FYtxCRHNGxPNmOfLzjb3;X6cC;CE?)&FLjmcI+n7NL z|LtJy1e$U82g)~5l1@h(goh(4Zpq=BXvWlGt##3Ckc6 zPj|^fr{PnC!3(8b;8*3OZh0C3r}cJ!|CkqZPp+!-6y((g&=*`sH8`o`Wx=W-+v zauM;@1GxIDEZ)nb<5uO55YMbdU`g=1QAnR4pPoaBKq>@*p|?hgOko&*f<$5XLirh3 zvt`1(M_ThW6z{Xa2HnYUytybAI}ZwaTT~`9tSQaEi8cKOy0A_<zN66-FK%=L5VX#&MBb4L<_)-D((8f4oBQY37!| z_?o?q&bZk>q}T+p`h$edSNlzR_}C;vV&6v#aGW5vwcZ|w9xKFGUXPN3;SDG3X~x%j z?G)Q(3eA*7lnmS87SGC0pF<0(IF8upH>-~KXUQPst25wea9xtL&qifJ2AJj46ph)(y0M8cUXe3 zcq6LCVL{yJyN7B3f-uvwSRI(|2PmulKkW1qz3>+aogRV%crA+FL(IbVu~C|$9jfej zFC1QaviF$a4jqLpAK?E;u+a&D5gaKC!~Bz**FIFwxOsXtfN7YyIc3aj&bX%p0s-Og z#}E#KmuS|9`6svj!J&E~VD?oXiefI`7NYF7$ik=NSI$ZBSPa(;kyBGX!j>KyMp z9XF9!!EGwOWn|3AWdzQ|{|0LVI5C>F0oIAEH4oJVZf2;*)K>C?9>a;EbQgbo2d4iH zOb;N@Xr>2Ph3SuLEWtEg_C;{qH2trH62o{AXQNc$Ft@NF5_}8`;r-@)e_@uDw*~p%k=zV9`d(m|DiwGH@xds>c&UVk*Tl-fG(fe`X_vm5uFo~KmcMO7LUKkB8G*}O&3s6g0e^XIYU9D84t%F_2$-c@DF zKYxn9ulhs~*ZFHK`W%bhY}VO(EOAC%hgUf4mDgvnlq)@xVd66xU|^5JG8z8_nT%ji zH@@(a3%}@XjR!9as8vuG{QUs@cF>$*F!tq_yk{;~-RD!j*H({xX~ihr7f}c30HOZ@ D2TVz% diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateDataExchangeRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateDataExchangeRequest.php deleted file mode 100644 index 09056571a3e0..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateDataExchangeRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest - */ -class CreateDataExchangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the data exchange. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_exchange_id = ''; - /** - * Required. The data exchange to create. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_exchange = null; - - /** - * @param string $parent Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. Please see - * {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $dataExchange Required. The data exchange to create. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\CreateDataExchangeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $dataExchange): self - { - return (new self()) - ->setParent($parent) - ->setDataExchange($dataExchange); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. - * @type string $data_exchange_id - * Required. The ID of the data exchange. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $data_exchange - * Required. The data exchange to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the data exchange. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataExchangeId() - { - return $this->data_exchange_id; - } - - /** - * Required. The ID of the data exchange. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataExchangeId($var) - { - GPBUtil::checkString($var, True); - $this->data_exchange_id = $var; - - return $this; - } - - /** - * Required. The data exchange to create. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange|null - */ - public function getDataExchange() - { - return $this->data_exchange; - } - - public function hasDataExchange() - { - return isset($this->data_exchange); - } - - public function clearDataExchange() - { - unset($this->data_exchange); - } - - /** - * Required. The data exchange to create. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $var - * @return $this - */ - public function setDataExchange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange::class); - $this->data_exchange = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateListingRequest.php deleted file mode 100644 index 185295f4c739..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/CreateListingRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest - */ -class CreateListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the listing to create. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $listing_id = ''; - /** - * Required. The listing to create. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $listing = null; - - /** - * @param string $parent Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see - * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing Required. The listing to create. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\CreateListingRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing): self - { - return (new self()) - ->setParent($parent) - ->setListing($listing); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @type string $listing_id - * Required. The ID of the listing to create. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing - * Required. The listing to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the listing to create. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getListingId() - { - return $this->listing_id; - } - - /** - * Required. The ID of the listing to create. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * - * Generated from protobuf field string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setListingId($var) - { - GPBUtil::checkString($var, True); - $this->listing_id = $var; - - return $this; - } - - /** - * Required. The listing to create. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing|null - */ - public function getListing() - { - return $this->listing; - } - - public function hasListing() - { - return isset($this->listing); - } - - public function clearListing() - { - unset($this->listing); - } - - /** - * Required. The listing to create. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $var - * @return $this - */ - public function setListing($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing::class); - $this->listing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataExchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataExchange.php deleted file mode 100644 index 6e9c67d93f21..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataExchange.php +++ /dev/null @@ -1,329 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.DataExchange - */ -class DataExchange extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Human-readable display name of the data exchange. The display name must - * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), ampersands (&) and must not start or end with spaces. - * Default value is an empty string. - * Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. Description of the data exchange. The description must not contain Unicode - * non-characters as well as C0 and C1 control codes except tabs (HT), - * new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Email or URL of the primary point of contact of the data exchange. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $primary_contact = ''; - /** - * Optional. Documentation describing the data exchange. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $documentation = ''; - /** - * Output only. Number of listings contained in the data exchange. - * - * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $listing_count = 0; - /** - * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the content of the fields are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $icon = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @type string $display_name - * Required. Human-readable display name of the data exchange. The display name must - * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), ampersands (&) and must not start or end with spaces. - * Default value is an empty string. - * Max length: 63 bytes. - * @type string $description - * Optional. Description of the data exchange. The description must not contain Unicode - * non-characters as well as C0 and C1 control codes except tabs (HT), - * new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * @type string $primary_contact - * Optional. Email or URL of the primary point of contact of the data exchange. - * Max Length: 1000 bytes. - * @type string $documentation - * Optional. Documentation describing the data exchange. - * @type int $listing_count - * Output only. Number of listings contained in the data exchange. - * @type string $icon - * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the content of the fields are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Human-readable display name of the data exchange. The display name must - * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), ampersands (&) and must not start or end with spaces. - * Default value is an empty string. - * Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Human-readable display name of the data exchange. The display name must - * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), ampersands (&) and must not start or end with spaces. - * Default value is an empty string. - * Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Description of the data exchange. The description must not contain Unicode - * non-characters as well as C0 and C1 control codes except tabs (HT), - * new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the data exchange. The description must not contain Unicode - * non-characters as well as C0 and C1 control codes except tabs (HT), - * new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * - * 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. Email or URL of the primary point of contact of the data exchange. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrimaryContact() - { - return $this->primary_contact; - } - - /** - * Optional. Email or URL of the primary point of contact of the data exchange. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrimaryContact($var) - { - GPBUtil::checkString($var, True); - $this->primary_contact = $var; - - return $this; - } - - /** - * Optional. Documentation describing the data exchange. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDocumentation() - { - return $this->documentation; - } - - /** - * Optional. Documentation describing the data exchange. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDocumentation($var) - { - GPBUtil::checkString($var, True); - $this->documentation = $var; - - return $this; - } - - /** - * Output only. Number of listings contained in the data exchange. - * - * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getListingCount() - { - return $this->listing_count; - } - - /** - * Output only. Number of listings contained in the data exchange. - * - * Generated from protobuf field int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setListingCount($var) - { - GPBUtil::checkInt32($var); - $this->listing_count = $var; - - return $this; - } - - /** - * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the content of the fields are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIcon() - { - return $this->icon; - } - - /** - * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the content of the fields are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIcon($var) - { - GPBUtil::checkString($var, False); - $this->icon = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataProvider.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataProvider.php deleted file mode 100644 index a84fe678974c..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DataProvider.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.DataProvider - */ -class DataProvider extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Name of the data provider. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. Email or URL of the data provider. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $primary_contact = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. Name of the data provider. - * @type string $primary_contact - * Optional. Email or URL of the data provider. - * Max Length: 1000 bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Name of the data provider. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. Name of the data provider. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Email or URL of the data provider. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrimaryContact() - { - return $this->primary_contact; - } - - /** - * Optional. Email or URL of the data provider. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrimaryContact($var) - { - GPBUtil::checkString($var, True); - $this->primary_contact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteDataExchangeRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteDataExchangeRequest.php deleted file mode 100644 index a51e62da4faf..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteDataExchangeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest - */ -class DeleteDataExchangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the data exchange resource that you want to delete. - * For example, `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of the data exchange resource that you want to delete. - * For example, `projects/myproject/locations/US/dataExchanges/123`. Please see - * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DeleteDataExchangeRequest - * - * @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 full name of the data exchange resource that you want to delete. - * For example, `projects/myproject/locations/US/dataExchanges/123`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the data exchange resource that you want to delete. - * For example, `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the data exchange resource that you want to delete. - * For example, `projects/myproject/locations/US/dataExchanges/123`. - * - * 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/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteListingRequest.php deleted file mode 100644 index 3a38544c15a9..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DeleteListingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest - */ -class DeleteListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see - * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DeleteListingRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDataset.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDataset.php deleted file mode 100644 index 5cdedbec98c6..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDataset.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset - */ -class DestinationDataset extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A reference that identifies the destination dataset. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset_reference = null; - /** - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $friendly_name = null; - /** - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = null; - /** - * Optional. The labels associated with this dataset. You can use these - * to organize and group your datasets. - * You can set this property when inserting or updating a dataset. - * See https://cloud.google.com/resource-manager/docs/creating-managing-labels - * for more information. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDatasetReference $dataset_reference - * Required. A reference that identifies the destination dataset. - * @type \Google\Protobuf\StringValue $friendly_name - * Optional. A descriptive name for the dataset. - * @type \Google\Protobuf\StringValue $description - * Optional. A user-friendly description of the dataset. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels associated with this dataset. You can use these - * to organize and group your datasets. - * You can set this property when inserting or updating a dataset. - * See https://cloud.google.com/resource-manager/docs/creating-managing-labels - * for more information. - * @type string $location - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. A reference that identifies the destination dataset. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDatasetReference|null - */ - public function getDatasetReference() - { - return $this->dataset_reference; - } - - public function hasDatasetReference() - { - return isset($this->dataset_reference); - } - - public function clearDatasetReference() - { - unset($this->dataset_reference); - } - - /** - * Required. A reference that identifies the destination dataset. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDatasetReference $var - * @return $this - */ - public function setDatasetReference($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDatasetReference::class); - $this->dataset_reference = $var; - - return $this; - } - - /** - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\StringValue|null - */ - public function getFriendlyName() - { - return $this->friendly_name; - } - - public function hasFriendlyName() - { - return isset($this->friendly_name); - } - - public function clearFriendlyName() - { - unset($this->friendly_name); - } - - /** - * Returns the unboxed value from getFriendlyName() - - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string|null - */ - public function getFriendlyNameUnwrapped() - { - return $this->readWrapperValue("friendly_name"); - } - - /** - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setFriendlyName($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->friendly_name = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Optional. A descriptive name for the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string|null $var - * @return $this - */ - public function setFriendlyNameUnwrapped($var) - { - $this->writeWrapperValue("friendly_name", $var); - return $this;} - - /** - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\StringValue|null - */ - public function getDescription() - { - return $this->description; - } - - public function hasDescription() - { - return isset($this->description); - } - - public function clearDescription() - { - unset($this->description); - } - - /** - * Returns the unboxed value from getDescription() - - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string|null - */ - public function getDescriptionUnwrapped() - { - return $this->readWrapperValue("description"); - } - - /** - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->description = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Optional. A user-friendly description of the dataset. - * - * Generated from protobuf field .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string|null $var - * @return $this - */ - public function setDescriptionUnwrapped($var) - { - $this->writeWrapperValue("description", $var); - return $this;} - - /** - * Optional. The labels associated with this dataset. You can use these - * to organize and group your datasets. - * You can set this property when inserting or updating a dataset. - * See https://cloud.google.com/resource-manager/docs/creating-managing-labels - * for more information. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels associated with this dataset. You can use these - * to organize and group your datasets. - * You can set this property when inserting or updating a dataset. - * See https://cloud.google.com/resource-manager/docs/creating-managing-labels - * for more information. - * - * Generated from protobuf field map labels = 4 [(.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. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDatasetReference.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDatasetReference.php deleted file mode 100644 index cdfc01fa84a4..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/DestinationDatasetReference.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference - */ -class DestinationDatasetReference extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A unique ID for this dataset, without the project name. The ID - * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - * The maximum length is 1,024 characters. - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset_id = ''; - /** - * Required. The ID of the project containing this dataset. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset_id - * Required. A unique ID for this dataset, without the project name. The ID - * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - * The maximum length is 1,024 characters. - * @type string $project_id - * Required. The ID of the project containing this dataset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. A unique ID for this dataset, without the project name. The ID - * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - * The maximum length is 1,024 characters. - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * Required. A unique ID for this dataset, without the project name. The ID - * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - * The maximum length is 1,024 characters. - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - - /** - * Required. The ID of the project containing this dataset. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the project containing this dataset. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetDataExchangeRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetDataExchangeRequest.php deleted file mode 100644 index 1589433adf0e..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetDataExchangeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest - */ -class GetDataExchangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see - * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\GetDataExchangeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * 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/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetListingRequest.php deleted file mode 100644 index 4833f1fea1f0..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/GetListingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest - */ -class GetListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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 listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see - * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\GetListingRequest - * - * @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 listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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 listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesRequest.php deleted file mode 100644 index 0d3c1e996b60..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest - */ -class ListDataExchangesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. Please see - * {@see AnalyticsHubServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\ListDataExchangesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. - * @type int $page_size - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * @type string $page_token - * Page token, returned by a previous call, to request the next page of - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesResponse.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesResponse.php deleted file mode 100644 index e4bc976a6fda..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListDataExchangesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesResponse - */ -class ListDataExchangesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; - */ - private $data_exchanges; - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges - * The list of data exchanges. - * @type string $next_page_token - * A token to request the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataExchanges() - { - return $this->data_exchanges; - } - - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; - * @param array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataExchanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange::class); - $this->data_exchanges = $arr; - - return $this; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsRequest.php deleted file mode 100644 index 453823573a96..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest - */ -class ListListingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. Please see - * {@see AnalyticsHubServiceClient::dataExchangeName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\ListListingsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @type int $page_size - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * @type string $page_token - * Page token, returned by a previous call, to request the next page of - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsResponse.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsResponse.php deleted file mode 100644 index 52139dd5acde..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListListingsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.ListListingsResponse - */ -class ListListingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Listing. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing listings = 1; - */ - private $listings; - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataExchange\V1beta1\Listing>|\Google\Protobuf\Internal\RepeatedField $listings - * The list of Listing. - * @type string $next_page_token - * A token to request the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * The list of Listing. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing listings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getListings() - { - return $this->listings; - } - - /** - * The list of Listing. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing listings = 1; - * @param array<\Google\Cloud\BigQuery\DataExchange\V1beta1\Listing>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setListings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing::class); - $this->listings = $arr; - - return $this; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesRequest.php deleted file mode 100644 index f6b4ab045d71..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest - */ -class ListOrgDataExchangesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The organization resource path of the projects containing DataExchanges. - * e.g. `organizations/myorg/locations/US`. - * - * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $organization = ''; - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $organization Required. The organization resource path of the projects containing DataExchanges. - * e.g. `organizations/myorg/locations/US`. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\ListOrgDataExchangesRequest - * - * @experimental - */ - public static function build(string $organization): self - { - return (new self()) - ->setOrganization($organization); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $organization - * Required. The organization resource path of the projects containing DataExchanges. - * e.g. `organizations/myorg/locations/US`. - * @type int $page_size - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * @type string $page_token - * Page token, returned by a previous call, to request the next page of - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. The organization resource path of the projects containing DataExchanges. - * e.g. `organizations/myorg/locations/US`. - * - * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOrganization() - { - return $this->organization; - } - - /** - * Required. The organization resource path of the projects containing DataExchanges. - * e.g. `organizations/myorg/locations/US`. - * - * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOrganization($var) - { - GPBUtil::checkString($var, True); - $this->organization = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response page. Leverage - * the page tokens to iterate through the entire collection. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token, returned by a previous call, to request the next page of - * results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesResponse.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesResponse.php deleted file mode 100644 index 10b57cdff8e8..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/ListOrgDataExchangesResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesResponse - */ -class ListOrgDataExchangesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; - */ - private $data_exchanges; - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges - * The list of data exchanges. - * @type string $next_page_token - * A token to request the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataExchanges() - { - return $this->data_exchanges; - } - - /** - * The list of data exchanges. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; - * @param array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataExchanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange::class); - $this->data_exchanges = $arr; - - return $this; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing.php deleted file mode 100644 index 97a1b7104982..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing.php +++ /dev/null @@ -1,540 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.Listing - */ -class Listing extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Human-readable display name of the listing. The display name must contain - * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - * ( ), ampersands (&) and can't start or end with spaces. - * Default value is an empty string. - * Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. Short description of the listing. The description must not contain - * Unicode non-characters and C0 and C1 control codes except tabs (HT), - * new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Email or URL of the primary point of contact of the listing. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $primary_contact = ''; - /** - * Optional. Documentation describing the listing. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $documentation = ''; - /** - * Output only. Current state of the listing. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $icon = ''; - /** - * Optional. Details of the data provider who owns the source data. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_provider = null; - /** - * Optional. Categories of the listing. Up to two categories are allowed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $categories; - /** - * Optional. Details of the publisher who owns the listing and who can share - * the source data. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $publisher = null; - /** - * Optional. Email or URL of the request access of the listing. - * Subscribers can use this reference to request access. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_access = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource $bigquery_dataset - * Required. Shared dataset i.e. BigQuery dataset source. - * @type string $name - * Output only. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - * @type string $display_name - * Required. Human-readable display name of the listing. The display name must contain - * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - * ( ), ampersands (&) and can't start or end with spaces. - * Default value is an empty string. - * Max length: 63 bytes. - * @type string $description - * Optional. Short description of the listing. The description must not contain - * Unicode non-characters and C0 and C1 control codes except tabs (HT), - * new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * @type string $primary_contact - * Optional. Email or URL of the primary point of contact of the listing. - * Max Length: 1000 bytes. - * @type string $documentation - * Optional. Documentation describing the listing. - * @type int $state - * Output only. Current state of the listing. - * @type string $icon - * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider $data_provider - * Optional. Details of the data provider who owns the source data. - * @type array|\Google\Protobuf\Internal\RepeatedField $categories - * Optional. Categories of the listing. Up to two categories are allowed. - * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Publisher $publisher - * Optional. Details of the publisher who owns the listing and who can share - * the source data. - * @type string $request_access - * Optional. Email or URL of the request access of the listing. - * Subscribers can use this reference to request access. - * Max Length: 1000 bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. Shared dataset i.e. BigQuery dataset source. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource|null - */ - public function getBigqueryDataset() - { - return $this->readOneof(6); - } - - public function hasBigqueryDataset() - { - return $this->hasOneof(6); - } - - /** - * Required. Shared dataset i.e. BigQuery dataset source. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource $var - * @return $this - */ - public function setBigqueryDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Output only. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Human-readable display name of the listing. The display name must contain - * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - * ( ), ampersands (&) and can't start or end with spaces. - * Default value is an empty string. - * Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Human-readable display name of the listing. The display name must contain - * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - * ( ), ampersands (&) and can't start or end with spaces. - * Default value is an empty string. - * Max length: 63 bytes. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Short description of the listing. The description must not contain - * Unicode non-characters and C0 and C1 control codes except tabs (HT), - * new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Short description of the listing. The description must not contain - * Unicode non-characters and C0 and C1 control codes except tabs (HT), - * new lines (LF), carriage returns (CR), and page breaks (FF). - * Default value is an empty string. - * Max length: 2000 bytes. - * - * 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. Email or URL of the primary point of contact of the listing. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrimaryContact() - { - return $this->primary_contact; - } - - /** - * Optional. Email or URL of the primary point of contact of the listing. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrimaryContact($var) - { - GPBUtil::checkString($var, True); - $this->primary_contact = $var; - - return $this; - } - - /** - * Optional. Documentation describing the listing. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDocumentation() - { - return $this->documentation; - } - - /** - * Optional. Documentation describing the listing. - * - * Generated from protobuf field string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDocumentation($var) - { - GPBUtil::checkString($var, True); - $this->documentation = $var; - - return $this; - } - - /** - * Output only. Current state of the listing. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the listing. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIcon() - { - return $this->icon; - } - - /** - * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - * Expected image dimensions are 512x512 pixels, however the API only - * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which - * increases the size of the data by 33-36%) when using JSON on the wire. - * - * Generated from protobuf field bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIcon($var) - { - GPBUtil::checkString($var, False); - $this->icon = $var; - - return $this; - } - - /** - * Optional. Details of the data provider who owns the source data. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider|null - */ - public function getDataProvider() - { - return $this->data_provider; - } - - public function hasDataProvider() - { - return isset($this->data_provider); - } - - public function clearDataProvider() - { - unset($this->data_provider); - } - - /** - * Optional. Details of the data provider who owns the source data. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider $var - * @return $this - */ - public function setDataProvider($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider::class); - $this->data_provider = $var; - - return $this; - } - - /** - * Optional. Categories of the listing. Up to two categories are allowed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Optional. Categories of the listing. Up to two categories are allowed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\Category::class); - $this->categories = $arr; - - return $this; - } - - /** - * Optional. Details of the publisher who owns the listing and who can share - * the source data. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Publisher|null - */ - public function getPublisher() - { - return $this->publisher; - } - - public function hasPublisher() - { - return isset($this->publisher); - } - - public function clearPublisher() - { - unset($this->publisher); - } - - /** - * Optional. Details of the publisher who owns the listing and who can share - * the source data. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Publisher $var - * @return $this - */ - public function setPublisher($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Publisher::class); - $this->publisher = $var; - - return $this; - } - - /** - * Optional. Email or URL of the request access of the listing. - * Subscribers can use this reference to request access. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestAccess() - { - return $this->request_access; - } - - /** - * Optional. Email or URL of the request access of the listing. - * Subscribers can use this reference to request access. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestAccess($var) - { - GPBUtil::checkString($var, True); - $this->request_access = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/BigQueryDatasetSource.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/BigQueryDatasetSource.php deleted file mode 100644 index 46799e57be56..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/BigQueryDatasetSource.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource - */ -class BigQueryDatasetSource extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the dataset source for this listing. - * e.g. `projects/myproject/datasets/123` - * - * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { - */ - protected $dataset = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset - * Resource name of the dataset source for this listing. - * e.g. `projects/myproject/datasets/123` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the dataset source for this listing. - * e.g. `projects/myproject/datasets/123` - * - * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * Resource name of the dataset source for this listing. - * e.g. `projects/myproject/datasets/123` - * - * Generated from protobuf field string dataset = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryDatasetSource::class, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing_BigQueryDatasetSource::class); - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/Category.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/Category.php deleted file mode 100644 index 49feae1ddd69..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/Category.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.Listing.Category - */ -class Category -{ - /** - * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; - */ - const CATEGORY_UNSPECIFIED = 0; - /** - * Generated from protobuf enum CATEGORY_OTHERS = 1; - */ - const CATEGORY_OTHERS = 1; - /** - * Generated from protobuf enum CATEGORY_ADVERTISING_AND_MARKETING = 2; - */ - const CATEGORY_ADVERTISING_AND_MARKETING = 2; - /** - * Generated from protobuf enum CATEGORY_COMMERCE = 3; - */ - const CATEGORY_COMMERCE = 3; - /** - * Generated from protobuf enum CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; - */ - const CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; - /** - * Generated from protobuf enum CATEGORY_DEMOGRAPHICS = 5; - */ - const CATEGORY_DEMOGRAPHICS = 5; - /** - * Generated from protobuf enum CATEGORY_ECONOMICS = 6; - */ - const CATEGORY_ECONOMICS = 6; - /** - * Generated from protobuf enum CATEGORY_EDUCATION = 7; - */ - const CATEGORY_EDUCATION = 7; - /** - * Generated from protobuf enum CATEGORY_ENERGY = 8; - */ - const CATEGORY_ENERGY = 8; - /** - * Generated from protobuf enum CATEGORY_FINANCIAL = 9; - */ - const CATEGORY_FINANCIAL = 9; - /** - * Generated from protobuf enum CATEGORY_GAMING = 10; - */ - const CATEGORY_GAMING = 10; - /** - * Generated from protobuf enum CATEGORY_GEOSPATIAL = 11; - */ - const CATEGORY_GEOSPATIAL = 11; - /** - * Generated from protobuf enum CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; - */ - const CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; - /** - * Generated from protobuf enum CATEGORY_MEDIA = 13; - */ - const CATEGORY_MEDIA = 13; - /** - * Generated from protobuf enum CATEGORY_PUBLIC_SECTOR = 14; - */ - const CATEGORY_PUBLIC_SECTOR = 14; - /** - * Generated from protobuf enum CATEGORY_RETAIL = 15; - */ - const CATEGORY_RETAIL = 15; - /** - * Generated from protobuf enum CATEGORY_SPORTS = 16; - */ - const CATEGORY_SPORTS = 16; - /** - * Generated from protobuf enum CATEGORY_SCIENCE_AND_RESEARCH = 17; - */ - const CATEGORY_SCIENCE_AND_RESEARCH = 17; - /** - * Generated from protobuf enum CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; - */ - const CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; - /** - * Generated from protobuf enum CATEGORY_TRAVEL_AND_TOURISM = 19; - */ - const CATEGORY_TRAVEL_AND_TOURISM = 19; - - private static $valueToName = [ - self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', - self::CATEGORY_OTHERS => 'CATEGORY_OTHERS', - self::CATEGORY_ADVERTISING_AND_MARKETING => 'CATEGORY_ADVERTISING_AND_MARKETING', - self::CATEGORY_COMMERCE => 'CATEGORY_COMMERCE', - self::CATEGORY_CLIMATE_AND_ENVIRONMENT => 'CATEGORY_CLIMATE_AND_ENVIRONMENT', - self::CATEGORY_DEMOGRAPHICS => 'CATEGORY_DEMOGRAPHICS', - self::CATEGORY_ECONOMICS => 'CATEGORY_ECONOMICS', - self::CATEGORY_EDUCATION => 'CATEGORY_EDUCATION', - self::CATEGORY_ENERGY => 'CATEGORY_ENERGY', - self::CATEGORY_FINANCIAL => 'CATEGORY_FINANCIAL', - self::CATEGORY_GAMING => 'CATEGORY_GAMING', - self::CATEGORY_GEOSPATIAL => 'CATEGORY_GEOSPATIAL', - self::CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE => 'CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE', - self::CATEGORY_MEDIA => 'CATEGORY_MEDIA', - self::CATEGORY_PUBLIC_SECTOR => 'CATEGORY_PUBLIC_SECTOR', - self::CATEGORY_RETAIL => 'CATEGORY_RETAIL', - self::CATEGORY_SPORTS => 'CATEGORY_SPORTS', - self::CATEGORY_SCIENCE_AND_RESEARCH => 'CATEGORY_SCIENCE_AND_RESEARCH', - self::CATEGORY_TRANSPORTATION_AND_LOGISTICS => 'CATEGORY_TRANSPORTATION_AND_LOGISTICS', - self::CATEGORY_TRAVEL_AND_TOURISM => 'CATEGORY_TRAVEL_AND_TOURISM', - ]; - - 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\BigQuery\DataExchange\V1beta1\Listing_Category::class); - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/State.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/State.php deleted file mode 100644 index b32889752911..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Listing/State.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.Listing.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Subscribable state. Users with dataexchange.listings.subscribe permission - * can subscribe to this listing. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - ]; - - 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\BigQuery\DataExchange\V1beta1\Listing_State::class); - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Publisher.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Publisher.php deleted file mode 100644 index df925cb8cd92..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/Publisher.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.Publisher - */ -class Publisher extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Name of the listing publisher. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. Email or URL of the listing publisher. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $primary_contact = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. Name of the listing publisher. - * @type string $primary_contact - * Optional. Email or URL of the listing publisher. - * Max Length: 1000 bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Name of the listing publisher. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. Name of the listing publisher. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Email or URL of the listing publisher. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrimaryContact() - { - return $this->primary_contact; - } - - /** - * Optional. Email or URL of the listing publisher. - * Max Length: 1000 bytes. - * - * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrimaryContact($var) - { - GPBUtil::checkString($var, True); - $this->primary_contact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingRequest.php deleted file mode 100644 index 618a4dddf6d5..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest - */ -class SubscribeListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - protected $destination; - - /** - * @param string $name Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. Please see - * {@see AnalyticsHubServiceClient::listingName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\SubscribeListingRequest - * - * @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 \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDataset $destination_dataset - * BigQuery destination dataset to create for the subscriber. - * @type string $name - * Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * BigQuery destination dataset to create for the subscriber. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset destination_dataset = 3; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDataset|null - */ - public function getDestinationDataset() - { - return $this->readOneof(3); - } - - public function hasDestinationDataset() - { - return $this->hasOneof(3); - } - - /** - * BigQuery destination dataset to create for the subscriber. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset destination_dataset = 3; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDataset $var - * @return $this - */ - public function setDestinationDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDataset::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * 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; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingResponse.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingResponse.php deleted file mode 100644 index d40416cb2840..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/SubscribeListingResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingResponse - */ -class SubscribeListingResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateDataExchangeRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateDataExchangeRequest.php deleted file mode 100644 index 9c8093ac7295..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateDataExchangeRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest - */ -class UpdateDataExchangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The data exchange to update. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_exchange = null; - - /** - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $dataExchange Required. The data exchange to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\UpdateDataExchangeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $dataExchange, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataExchange($dataExchange) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $data_exchange - * Required. The data exchange to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * - * 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. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * - * 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. The data exchange to update. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange|null - */ - public function getDataExchange() - { - return $this->data_exchange; - } - - public function hasDataExchange() - { - return isset($this->data_exchange); - } - - public function clearDataExchange() - { - unset($this->data_exchange); - } - - /** - * Required. The data exchange to update. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $var - * @return $this - */ - public function setDataExchange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange::class); - $this->data_exchange = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateListingRequest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateListingRequest.php deleted file mode 100644 index 65cdaa83e854..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/proto/src/Google/Cloud/BigQuery/DataExchange/V1beta1/UpdateListingRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest - */ -class UpdateListingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask specifies the fields to update in the listing resource. The - * fields specified in the `updateMask` are relative to the resource and are - * not a full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The listing to update. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $listing = null; - - /** - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing Required. The listing to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask specifies the fields to update in the listing resource. The - * fields specified in the `updateMask` are relative to the resource and are - * not a full request. - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\UpdateListingRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setListing($listing) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask specifies the fields to update in the listing resource. The - * fields specified in the `updateMask` are relative to the resource and are - * not a full request. - * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing - * Required. The listing to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Dataexchange\V1Beta1\Dataexchange::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask specifies the fields to update in the listing resource. The - * fields specified in the `updateMask` are relative to the resource and are - * not a full request. - * - * 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. Field mask specifies the fields to update in the listing resource. The - * fields specified in the `updateMask` are relative to the resource and are - * not a full request. - * - * 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. The listing to update. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing|null - */ - public function getListing() - { - return $this->listing; - } - - public function hasListing() - { - return isset($this->listing); - } - - public function clearListing() - { - unset($this->listing); - } - - /** - * Required. The listing to update. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $var - * @return $this - */ - public function setListing($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing::class); - $this->listing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php deleted file mode 100644 index 91e7905c6d7e..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php +++ /dev/null @@ -1,91 +0,0 @@ -setDisplayName($dataExchangeDisplayName); - $request = (new CreateDataExchangeRequest()) - ->setParent($formattedParent) - ->setDataExchangeId($dataExchangeId) - ->setDataExchange($dataExchange); - - // Call the API and handle any network failures. - try { - /** @var DataExchange $response */ - $response = $analyticsHubServiceClient->createDataExchange($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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $dataExchangeId = '[DATA_EXCHANGE_ID]'; - $dataExchangeDisplayName = '[DISPLAY_NAME]'; - - create_data_exchange_sample($formattedParent, $dataExchangeId, $dataExchangeDisplayName); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_listing.php deleted file mode 100644 index a6c498b410c6..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/create_listing.php +++ /dev/null @@ -1,98 +0,0 @@ -setBigqueryDataset($listingBigqueryDataset) - ->setDisplayName($listingDisplayName); - $request = (new CreateListingRequest()) - ->setParent($formattedParent) - ->setListingId($listingId) - ->setListing($listing); - - // Call the API and handle any network failures. - try { - /** @var Listing $response */ - $response = $analyticsHubServiceClient->createListing($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 = AnalyticsHubServiceClient::dataExchangeName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]' - ); - $listingId = '[LISTING_ID]'; - $listingDisplayName = '[DISPLAY_NAME]'; - - create_listing_sample($formattedParent, $listingId, $listingDisplayName); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php deleted file mode 100644 index 99c5254ba3df..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $analyticsHubServiceClient->deleteDataExchange($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 = AnalyticsHubServiceClient::dataExchangeName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]' - ); - - delete_data_exchange_sample($formattedName); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php deleted file mode 100644 index 264c3616cdd1..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $analyticsHubServiceClient->deleteListing($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 = AnalyticsHubServiceClient::listingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]', - '[LISTING]' - ); - - delete_listing_sample($formattedName); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php deleted file mode 100644 index 9e08be2ec9f1..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataExchange $response */ - $response = $analyticsHubServiceClient->getDataExchange($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 = AnalyticsHubServiceClient::dataExchangeName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]' - ); - - get_data_exchange_sample($formattedName); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_iam_policy.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_iam_policy.php deleted file mode 100644 index d56bce00ca61..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_iam_policy.php +++ /dev/null @@ -1,71 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $analyticsHubServiceClient->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 analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_listing.php deleted file mode 100644 index 2c6fa3115ade..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_listing.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Listing $response */ - $response = $analyticsHubServiceClient->getListing($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 = AnalyticsHubServiceClient::listingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]', - '[LISTING]' - ); - - get_listing_sample($formattedName); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_location.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/get_location.php deleted file mode 100644 index 2fbe8bedff2f..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/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 analyticshub_v1beta1_generated_AnalyticsHubService_GetLocation_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php deleted file mode 100644 index ea159727feb2..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $analyticsHubServiceClient->listDataExchanges($request); - - /** @var DataExchange $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 = AnalyticsHubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_data_exchanges_sample($formattedParent); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_listings.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_listings.php deleted file mode 100644 index dcdeb97ccecc..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_listings.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $analyticsHubServiceClient->listListings($request); - - /** @var Listing $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 = AnalyticsHubServiceClient::dataExchangeName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]' - ); - - list_listings_sample($formattedParent); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_locations.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_locations.php deleted file mode 100644 index 750c4435e1cf..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/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 analyticshub_v1beta1_generated_AnalyticsHubService_ListLocations_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php deleted file mode 100644 index 7366041a733f..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php +++ /dev/null @@ -1,77 +0,0 @@ -setOrganization($organization); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $analyticsHubServiceClient->listOrgDataExchanges($request); - - /** @var DataExchange $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 -{ - $organization = '[ORGANIZATION]'; - - list_org_data_exchanges_sample($organization); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/set_iam_policy.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/set_iam_policy.php deleted file mode 100644 index 73a7dac77161..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $analyticsHubServiceClient->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 analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php deleted file mode 100644 index df0061aa875d..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SubscribeListingResponse $response */ - $response = $analyticsHubServiceClient->subscribeListing($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 = AnalyticsHubServiceClient::listingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_EXCHANGE]', - '[LISTING]' - ); - - subscribe_listing_sample($formattedName); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/test_iam_permissions.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/test_iam_permissions.php deleted file mode 100644 index 6b252fbccb6d..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,78 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $analyticsHubServiceClient->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 analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php deleted file mode 100644 index 2e2328984071..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php +++ /dev/null @@ -1,79 +0,0 @@ -setDisplayName($dataExchangeDisplayName); - $request = (new UpdateDataExchangeRequest()) - ->setUpdateMask($updateMask) - ->setDataExchange($dataExchange); - - // Call the API and handle any network failures. - try { - /** @var DataExchange $response */ - $response = $analyticsHubServiceClient->updateDataExchange($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 -{ - $dataExchangeDisplayName = '[DISPLAY_NAME]'; - - update_data_exchange_sample($dataExchangeDisplayName); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_listing.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_listing.php deleted file mode 100644 index d2929851a9da..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/samples/V1beta1/AnalyticsHubServiceClient/update_listing.php +++ /dev/null @@ -1,82 +0,0 @@ -setBigqueryDataset($listingBigqueryDataset) - ->setDisplayName($listingDisplayName); - $request = (new UpdateListingRequest()) - ->setUpdateMask($updateMask) - ->setListing($listing); - - // Call the API and handle any network failures. - try { - /** @var Listing $response */ - $response = $analyticsHubServiceClient->updateListing($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 -{ - $listingDisplayName = '[DISPLAY_NAME]'; - - update_listing_sample($listingDisplayName); -} -// [END analyticshub_v1beta1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/AnalyticsHubServiceClient.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/AnalyticsHubServiceClient.php deleted file mode 100644 index fa24a46a2864..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/AnalyticsHubServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ - createDataExchangeAsync(CreateDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface createListingAsync(CreateListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataExchangeAsync(DeleteDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteListingAsync(DeleteListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataExchangeAsync(GetDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getListingAsync(GetListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataExchangesAsync(ListDataExchangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listListingsAsync(ListListingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOrgDataExchangesAsync(ListOrgDataExchangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface subscribeListingAsync(SubscribeListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataExchangeAsync(UpdateDataExchangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateListingAsync(UpdateListingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class AnalyticsHubServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'analyticshub.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'analyticshub.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigquery', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/analytics_hub_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/analytics_hub_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/analytics_hub_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/analytics_hub_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_exchange resource. - * - * @param string $project - * @param string $location - * @param string $dataExchange - * - * @return string The formatted data_exchange resource. - * - * @experimental - */ - public static function dataExchangeName(string $project, string $location, string $dataExchange): string - { - return self::getPathTemplate('dataExchange')->render([ - 'project' => $project, - 'location' => $location, - 'data_exchange' => $dataExchange, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a dataset - * resource. - * - * @param string $project - * @param string $dataset - * - * @return string The formatted dataset resource. - * - * @experimental - */ - public static function datasetName(string $project, string $dataset): string - { - return self::getPathTemplate('dataset')->render([ - 'project' => $project, - 'dataset' => $dataset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a listing - * resource. - * - * @param string $project - * @param string $location - * @param string $dataExchange - * @param string $listing - * - * @return string The formatted listing resource. - * - * @experimental - */ - public static function listingName(string $project, string $location, string $dataExchange, string $listing): string - { - return self::getPathTemplate('listing')->render([ - 'project' => $project, - 'location' => $location, - 'data_exchange' => $dataExchange, - 'listing' => $listing, - ]); - } - - /** - * 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. - * - * @experimental - */ - 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 - * - dataExchange: projects/{project}/locations/{location}/dataExchanges/{data_exchange} - * - dataset: projects/{project}/datasets/{dataset} - * - listing: projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing} - * - 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. - * - * @experimental - */ - 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 'analyticshub.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 - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new data exchange. - * - * The async variant is {@see AnalyticsHubServiceClient::createDataExchangeAsync()} - * . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/create_data_exchange.php - * - * @param CreateDataExchangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataExchange - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createDataExchange(CreateDataExchangeRequest $request, array $callOptions = []): DataExchange - { - return $this->startApiCall('CreateDataExchange', $request, $callOptions)->wait(); - } - - /** - * Creates a new listing. - * - * The async variant is {@see AnalyticsHubServiceClient::createListingAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/create_listing.php - * - * @param CreateListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Listing - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createListing(CreateListingRequest $request, array $callOptions = []): Listing - { - return $this->startApiCall('CreateListing', $request, $callOptions)->wait(); - } - - /** - * Deletes an existing data exchange. - * - * The async variant is {@see AnalyticsHubServiceClient::deleteDataExchangeAsync()} - * . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/delete_data_exchange.php - * - * @param DeleteDataExchangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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. - * - * @experimental - */ - public function deleteDataExchange(DeleteDataExchangeRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDataExchange', $request, $callOptions)->wait(); - } - - /** - * Deletes a listing. - * - * The async variant is {@see AnalyticsHubServiceClient::deleteListingAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/delete_listing.php - * - * @param DeleteListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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. - * - * @experimental - */ - public function deleteListing(DeleteListingRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteListing', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a data exchange. - * - * The async variant is {@see AnalyticsHubServiceClient::getDataExchangeAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/get_data_exchange.php - * - * @param GetDataExchangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataExchange - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getDataExchange(GetDataExchangeRequest $request, array $callOptions = []): DataExchange - { - return $this->startApiCall('GetDataExchange', $request, $callOptions)->wait(); - } - - /** - * Gets the IAM policy. - * - * The async variant is {@see AnalyticsHubServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/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. - * - * @experimental - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a listing. - * - * The async variant is {@see AnalyticsHubServiceClient::getListingAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/get_listing.php - * - * @param GetListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Listing - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getListing(GetListingRequest $request, array $callOptions = []): Listing - { - return $this->startApiCall('GetListing', $request, $callOptions)->wait(); - } - - /** - * Lists all data exchanges in a given project and location. - * - * The async variant is {@see AnalyticsHubServiceClient::listDataExchangesAsync()} - * . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/list_data_exchanges.php - * - * @param ListDataExchangesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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. - * - * @experimental - */ - public function listDataExchanges(ListDataExchangesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataExchanges', $request, $callOptions); - } - - /** - * Lists all listings in a given project and location. - * - * The async variant is {@see AnalyticsHubServiceClient::listListingsAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/list_listings.php - * - * @param ListListingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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. - * - * @experimental - */ - public function listListings(ListListingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListListings', $request, $callOptions); - } - - /** - * Lists all data exchanges from projects in a given organization and - * location. - * - * The async variant is - * {@see AnalyticsHubServiceClient::listOrgDataExchangesAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/list_org_data_exchanges.php - * - * @param ListOrgDataExchangesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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. - * - * @experimental - */ - public function listOrgDataExchanges(ListOrgDataExchangesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOrgDataExchanges', $request, $callOptions); - } - - /** - * Sets the IAM policy. - * - * The async variant is {@see AnalyticsHubServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/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. - * - * @experimental - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Subscribes to a listing. - * - * Currently, with Analytics Hub, you can create listings that - * reference only BigQuery datasets. - * Upon subscription to a listing for a BigQuery dataset, Analytics Hub - * creates a linked dataset in the subscriber's project. - * - * The async variant is {@see AnalyticsHubServiceClient::subscribeListingAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/subscribe_listing.php - * - * @param SubscribeListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SubscribeListingResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function subscribeListing(SubscribeListingRequest $request, array $callOptions = []): SubscribeListingResponse - { - return $this->startApiCall('SubscribeListing', $request, $callOptions)->wait(); - } - - /** - * Returns the permissions that a caller has. - * - * The async variant is {@see AnalyticsHubServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/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. - * - * @experimental - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Updates an existing data exchange. - * - * The async variant is {@see AnalyticsHubServiceClient::updateDataExchangeAsync()} - * . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/update_data_exchange.php - * - * @param UpdateDataExchangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataExchange - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateDataExchange(UpdateDataExchangeRequest $request, array $callOptions = []): DataExchange - { - return $this->startApiCall('UpdateDataExchange', $request, $callOptions)->wait(); - } - - /** - * Updates an existing listing. - * - * The async variant is {@see AnalyticsHubServiceClient::updateListingAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/update_listing.php - * - * @param UpdateListingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Listing - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateListing(UpdateListingRequest $request, array $callOptions = []): Listing - { - return $this->startApiCall('UpdateListing', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AnalyticsHubServiceClient::getLocationAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/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. - * - * @experimental - */ - 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 AnalyticsHubServiceClient::listLocationsAsync()} . - * - * @example samples/V1beta1/AnalyticsHubServiceClient/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. - * - * @experimental - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php deleted file mode 100644 index 6f0c940efa5f..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php +++ /dev/null @@ -1,1305 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $dataExchangeId = 'data_exchange_id'; - * $dataExchange = new DataExchange(); - * $response = $analyticsHubServiceClient->createDataExchange($formattedParent, $dataExchangeId, $dataExchange); - * } finally { - * $analyticsHubServiceClient->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. - * - * @experimental - * - * @deprecated Please use the new service client {@see \Google\Cloud\BigQuery\DataExchange\V1beta1\Client\AnalyticsHubServiceClient}. - */ -class AnalyticsHubServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'analyticshub.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'analyticshub.UNIVERSE_DOMAIN'; - - /** 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/bigquery', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $dataExchangeNameTemplate; - - private static $datasetNameTemplate; - - private static $listingNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/analytics_hub_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/analytics_hub_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/analytics_hub_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/analytics_hub_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getDataExchangeNameTemplate() - { - if (self::$dataExchangeNameTemplate == null) { - self::$dataExchangeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataExchanges/{data_exchange}'); - } - - return self::$dataExchangeNameTemplate; - } - - private static function getDatasetNameTemplate() - { - if (self::$datasetNameTemplate == null) { - self::$datasetNameTemplate = new PathTemplate('projects/{project}/datasets/{dataset}'); - } - - return self::$datasetNameTemplate; - } - - private static function getListingNameTemplate() - { - if (self::$listingNameTemplate == null) { - self::$listingNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}'); - } - - return self::$listingNameTemplate; - } - - 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 = [ - 'dataExchange' => self::getDataExchangeNameTemplate(), - 'dataset' => self::getDatasetNameTemplate(), - 'listing' => self::getListingNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_exchange resource. - * - * @param string $project - * @param string $location - * @param string $dataExchange - * - * @return string The formatted data_exchange resource. - * - * @experimental - */ - public static function dataExchangeName($project, $location, $dataExchange) - { - return self::getDataExchangeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'data_exchange' => $dataExchange, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a dataset - * resource. - * - * @param string $project - * @param string $dataset - * - * @return string The formatted dataset resource. - * - * @experimental - */ - public static function datasetName($project, $dataset) - { - return self::getDatasetNameTemplate()->render([ - 'project' => $project, - 'dataset' => $dataset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a listing - * resource. - * - * @param string $project - * @param string $location - * @param string $dataExchange - * @param string $listing - * - * @return string The formatted listing resource. - * - * @experimental - */ - public static function listingName($project, $location, $dataExchange, $listing) - { - return self::getListingNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'data_exchange' => $dataExchange, - 'listing' => $listing, - ]); - } - - /** - * 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. - * - * @experimental - */ - 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 - * - dataExchange: projects/{project}/locations/{location}/dataExchanges/{data_exchange} - * - dataset: projects/{project}/datasets/{dataset} - * - listing: projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing} - * - 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. - * - * @experimental - */ - 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 'analyticshub.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 - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a new data exchange. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $formattedParent = $analyticsHubServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $dataExchangeId = 'data_exchange_id'; - * $dataExchange = new DataExchange(); - * $response = $analyticsHubServiceClient->createDataExchange($formattedParent, $dataExchangeId, $dataExchange); - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource path of the data exchange. - * e.g. `projects/myproject/locations/US`. - * @param string $dataExchangeId Required. The ID of the data exchange. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * @param DataExchange $dataExchange Required. The data exchange to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createDataExchange($parent, $dataExchangeId, $dataExchange, array $optionalArgs = []) - { - $request = new CreateDataExchangeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataExchangeId($dataExchangeId); - $request->setDataExchange($dataExchange); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDataExchange', DataExchange::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new listing. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $formattedParent = $analyticsHubServiceClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - * $listingId = 'listing_id'; - * $listing = new Listing(); - * $response = $analyticsHubServiceClient->createListing($formattedParent, $listingId, $listing); - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @param string $listingId Required. The ID of the listing to create. - * Must contain only Unicode letters, numbers (0-9), underscores (_). - * Should not use characters that require URL-escaping, or characters - * outside of ASCII, spaces. - * Max length: 100 bytes. - * @param Listing $listing Required. The listing to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createListing($parent, $listingId, $listing, array $optionalArgs = []) - { - $request = new CreateListingRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setListingId($listingId); - $request->setListing($listing); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateListing', Listing::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an existing data exchange. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $formattedName = $analyticsHubServiceClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - * $analyticsHubServiceClient->deleteDataExchange($formattedName); - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The full name of the data exchange resource that you want to delete. - * For example, `projects/myproject/locations/US/dataExchanges/123`. - * @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 - * - * @experimental - */ - public function deleteDataExchange($name, array $optionalArgs = []) - { - $request = new DeleteDataExchangeRequest(); - $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('DeleteDataExchange', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a listing. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $formattedName = $analyticsHubServiceClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - * $analyticsHubServiceClient->deleteListing($formattedName); - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the listing to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * @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 - * - * @experimental - */ - public function deleteListing($name, array $optionalArgs = []) - { - $request = new DeleteListingRequest(); - $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('DeleteListing', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the details of a data exchange. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $formattedName = $analyticsHubServiceClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - * $response = $analyticsHubServiceClient->getDataExchange($formattedName); - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the data exchange. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @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\BigQuery\DataExchange\V1beta1\DataExchange - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDataExchange($name, array $optionalArgs = []) - { - $request = new GetDataExchangeRequest(); - $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('GetDataExchange', DataExchange::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the IAM policy. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $resource = 'resource'; - * $response = $analyticsHubServiceClient->getIamPolicy($resource); - * } finally { - * $analyticsHubServiceClient->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 - * - * @experimental - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the details of a listing. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $formattedName = $analyticsHubServiceClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - * $response = $analyticsHubServiceClient->getListing($formattedName); - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * @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\BigQuery\DataExchange\V1beta1\Listing - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getListing($name, array $optionalArgs = []) - { - $request = new GetListingRequest(); - $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('GetListing', Listing::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all data exchanges in a given project and location. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $formattedParent = $analyticsHubServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsHubServiceClient->listDataExchanges($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsHubServiceClient->listDataExchanges($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource path of the data exchanges. - * e.g. `projects/myproject/locations/US`. - * @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 - * - * @experimental - */ - public function listDataExchanges($parent, array $optionalArgs = []) - { - $request = new ListDataExchangesRequest(); - $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('ListDataExchanges', $optionalArgs, ListDataExchangesResponse::class, $request); - } - - /** - * Lists all listings in a given project and location. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $formattedParent = $analyticsHubServiceClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsHubServiceClient->listListings($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsHubServiceClient->listListings($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource path of the listing. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @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 - * - * @experimental - */ - public function listListings($parent, array $optionalArgs = []) - { - $request = new ListListingsRequest(); - $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('ListListings', $optionalArgs, ListListingsResponse::class, $request); - } - - /** - * Lists all data exchanges from projects in a given organization and - * location. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $organization = 'organization'; - * // Iterate over pages of elements - * $pagedResponse = $analyticsHubServiceClient->listOrgDataExchanges($organization); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsHubServiceClient->listOrgDataExchanges($organization); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $organization Required. The organization resource path of the projects containing DataExchanges. - * e.g. `organizations/myorg/locations/US`. - * @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 - * - * @experimental - */ - public function listOrgDataExchanges($organization, array $optionalArgs = []) - { - $request = new ListOrgDataExchangesRequest(); - $requestParamHeaders = []; - $request->setOrganization($organization); - $requestParamHeaders['organization'] = $organization; - 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('ListOrgDataExchanges', $optionalArgs, ListOrgDataExchangesResponse::class, $request); - } - - /** - * Sets the IAM policy. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $analyticsHubServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $analyticsHubServiceClient->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 - * - * @experimental - */ - 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(); - } - - /** - * Subscribes to a listing. - * - * Currently, with Analytics Hub, you can create listings that - * reference only BigQuery datasets. - * Upon subscription to a listing for a BigQuery dataset, Analytics Hub - * creates a linked dataset in the subscriber's project. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $formattedName = $analyticsHubServiceClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - * $response = $analyticsHubServiceClient->subscribeListing($formattedName); - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the listing that you want to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * @param array $optionalArgs { - * Optional. - * - * @type DestinationDataset $destinationDataset - * BigQuery destination dataset to create for the subscriber. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can 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\BigQuery\DataExchange\V1beta1\SubscribeListingResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function subscribeListing($name, array $optionalArgs = []) - { - $request = new SubscribeListingRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['destinationDataset'])) { - $request->setDestinationDataset($optionalArgs['destinationDataset']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SubscribeListing', SubscribeListingResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the permissions that a caller has. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $analyticsHubServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $analyticsHubServiceClient->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 - * - * @experimental - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an existing data exchange. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $dataExchange = new DataExchange(); - * $response = $analyticsHubServiceClient->updateDataExchange($updateMask, $dataExchange); - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the - * `updateMask` are relative to the resource and are not a full request. - * @param DataExchange $dataExchange Required. The data exchange to update. - * @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\BigQuery\DataExchange\V1beta1\DataExchange - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateDataExchange($updateMask, $dataExchange, array $optionalArgs = []) - { - $request = new UpdateDataExchangeRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setDataExchange($dataExchange); - $requestParamHeaders['data_exchange.name'] = $dataExchange->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDataExchange', DataExchange::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an existing listing. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $listing = new Listing(); - * $response = $analyticsHubServiceClient->updateListing($updateMask, $listing); - * } finally { - * $analyticsHubServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Field mask specifies the fields to update in the listing resource. The - * fields specified in the `updateMask` are relative to the resource and are - * not a full request. - * @param Listing $listing Required. The listing to update. - * @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\BigQuery\DataExchange\V1beta1\Listing - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateListing($updateMask, $listing, array $optionalArgs = []) - { - $request = new UpdateListingRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setListing($listing); - $requestParamHeaders['listing.name'] = $listing->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateListing', Listing::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * $response = $analyticsHubServiceClient->getLocation(); - * } finally { - * $analyticsHubServiceClient->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 - * - * @experimental - */ - 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: - * ``` - * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $analyticsHubServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsHubServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsHubServiceClient->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 - * - * @experimental - */ - 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/BigQueryDataExchange/v1beta1/src/V1beta1/gapic_metadata.json b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/gapic_metadata.json deleted file mode 100644 index f0e891ccec84..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/gapic_metadata.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.bigquery.dataexchange.v1beta1", - "libraryPackage": "Google\\Cloud\\BigQuery\\DataExchange\\V1beta1", - "services": { - "AnalyticsHubService": { - "clients": { - "grpc": { - "libraryClient": "AnalyticsHubServiceGapicClient", - "rpcs": { - "CreateDataExchange": { - "methods": [ - "createDataExchange" - ] - }, - "CreateListing": { - "methods": [ - "createListing" - ] - }, - "DeleteDataExchange": { - "methods": [ - "deleteDataExchange" - ] - }, - "DeleteListing": { - "methods": [ - "deleteListing" - ] - }, - "GetDataExchange": { - "methods": [ - "getDataExchange" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetListing": { - "methods": [ - "getListing" - ] - }, - "ListDataExchanges": { - "methods": [ - "listDataExchanges" - ] - }, - "ListListings": { - "methods": [ - "listListings" - ] - }, - "ListOrgDataExchanges": { - "methods": [ - "listOrgDataExchanges" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "SubscribeListing": { - "methods": [ - "subscribeListing" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateDataExchange": { - "methods": [ - "updateDataExchange" - ] - }, - "UpdateListing": { - "methods": [ - "updateListing" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_client_config.json b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_client_config.json deleted file mode 100644 index ef5607e7a3c2..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_client_config.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateDataExchange": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDataExchange": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDataExchange": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDataExchanges": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListListings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListOrgDataExchanges": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SubscribeListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDataExchange": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateListing": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_descriptor_config.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_descriptor_config.php deleted file mode 100644 index a8f4be36fc80..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_descriptor_config.php +++ /dev/null @@ -1,274 +0,0 @@ - [ - 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService' => [ - 'CreateDataExchange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\Listing', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataExchange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataExchange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\Listing', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDataExchanges' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataExchanges', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\ListDataExchangesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListListings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getListings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\ListListingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrgDataExchanges' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataExchanges', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\ListOrgDataExchangesResponse', - 'headerParams' => [ - [ - 'keyName' => 'organization', - 'fieldAccessors' => [ - 'getOrganization', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'SubscribeListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\SubscribeListingResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateDataExchange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange', - 'headerParams' => [ - [ - 'keyName' => 'data_exchange.name', - 'fieldAccessors' => [ - 'getDataExchange', - 'getName', - ], - ], - ], - ], - 'UpdateListing' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataExchange\V1beta1\Listing', - 'headerParams' => [ - [ - 'keyName' => 'listing.name', - 'fieldAccessors' => [ - 'getListing', - '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' => [ - 'dataExchange' => 'projects/{project}/locations/{location}/dataExchanges/{data_exchange}', - 'dataset' => 'projects/{project}/datasets/{dataset}', - 'listing' => 'projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_rest_client_config.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_rest_client_config.php deleted file mode 100644 index 514c173d9e4f..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/src/V1beta1/resources/analytics_hub_service_rest_client_config.php +++ /dev/null @@ -1,260 +0,0 @@ - [ - 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService' => [ - 'CreateDataExchange' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/dataExchanges', - 'body' => 'data_exchange', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_exchange_id', - ], - ], - 'CreateListing' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings', - 'body' => 'listing', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'listing_id', - ], - ], - 'DeleteDataExchange' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteListing' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataExchange' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetListing' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDataExchanges' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/dataExchanges', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListListings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrgDataExchanges' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{organization=organizations/*/locations/*}/dataExchanges', - 'placeholders' => [ - 'organization' => [ - 'getters' => [ - 'getOrganization', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SubscribeListing' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateDataExchange' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta1/{data_exchange.name=projects/*/locations/*/dataExchanges/*}', - 'body' => 'data_exchange', - 'placeholders' => [ - 'data_exchange.name' => [ - 'getters' => [ - 'getDataExchange', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateListing' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta1/{listing.name=projects/*/locations/*/dataExchanges/*/listings/*}', - 'body' => 'listing', - 'placeholders' => [ - 'listing.name' => [ - 'getters' => [ - 'getListing', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php deleted file mode 100644 index 95b5f271dd3e..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php +++ /dev/null @@ -1,1239 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AnalyticsHubServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AnalyticsHubServiceClient($options); - } - - /** @test */ - public function createDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataExchangeId = 'dataExchangeId1402219426'; - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $response = $gapicClient->createDataExchange($formattedParent, $dataExchangeId, $dataExchange); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataExchangeId(); - $this->assertProtobufEquals($dataExchangeId, $actualValue); - $actualValue = $actualRequestObject->getDataExchange(); - $this->assertProtobufEquals($dataExchange, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $dataExchangeId = 'dataExchangeId1402219426'; - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - try { - $gapicClient->createDataExchange($formattedParent, $dataExchangeId, $dataExchange); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $icon = '121'; - $requestAccess = 'requestAccess2059178260'; - $expectedResponse = new Listing(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setIcon($icon); - $expectedResponse->setRequestAccess($requestAccess); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $listingId = 'listingId988969142'; - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $response = $gapicClient->createListing($formattedParent, $listingId, $listing); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateListing', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getListingId(); - $this->assertProtobufEquals($listingId, $actualValue); - $actualValue = $actualRequestObject->getListing(); - $this->assertProtobufEquals($listing, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $listingId = 'listingId988969142'; - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - try { - $gapicClient->createListing($formattedParent, $listingId, $listing); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $gapicClient->deleteDataExchange($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - try { - $gapicClient->deleteDataExchange($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 deleteListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $gapicClient->deleteListing($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteListing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - try { - $gapicClient->deleteListing($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 getDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $response = $gapicClient->getDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - try { - $gapicClient->getDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 getListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $icon = '121'; - $requestAccess = 'requestAccess2059178260'; - $expectedResponse = new Listing(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setIcon($icon); - $expectedResponse->setRequestAccess($requestAccess); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $response = $gapicClient->getListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetListing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - try { - $gapicClient->getListing($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 listDataExchangesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataExchangesElement = new DataExchange(); - $dataExchanges = [ - $dataExchangesElement, - ]; - $expectedResponse = new ListDataExchangesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataExchanges($dataExchanges); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listDataExchanges($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListDataExchanges', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataExchangesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listDataExchanges($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 listListingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $listingsElement = new Listing(); - $listings = [ - $listingsElement, - ]; - $expectedResponse = new ListListingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setListings($listings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $response = $gapicClient->listListings($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getListings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListListings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listListingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - try { - $gapicClient->listListings($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 listOrgDataExchangesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataExchangesElement = new DataExchange(); - $dataExchanges = [ - $dataExchangesElement, - ]; - $expectedResponse = new ListOrgDataExchangesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataExchanges($dataExchanges); - $transport->addResponse($expectedResponse); - // Mock request - $organization = 'organization1178922291'; - $response = $gapicClient->listOrgDataExchanges($organization); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListOrgDataExchanges', $actualFuncCall); - $actualValue = $actualRequestObject->getOrganization(); - $this->assertProtobufEquals($organization, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrgDataExchangesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $organization = 'organization1178922291'; - try { - $gapicClient->listOrgDataExchanges($organization); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 subscribeListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SubscribeListingResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $response = $gapicClient->subscribeListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/SubscribeListing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function subscribeListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - try { - $gapicClient->subscribeListing($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 updateDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $response = $gapicClient->updateDataExchange($updateMask, $dataExchange); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getDataExchange(); - $this->assertProtobufEquals($dataExchange, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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(); - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - try { - $gapicClient->updateDataExchange($updateMask, $dataExchange); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $icon = '121'; - $requestAccess = 'requestAccess2059178260'; - $expectedResponse = new Listing(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setIcon($icon); - $expectedResponse->setRequestAccess($requestAccess); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $response = $gapicClient->updateListing($updateMask, $listing); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateListing', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getListing(); - $this->assertProtobufEquals($listing, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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(); - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - try { - $gapicClient->updateListing($updateMask, $listing); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/Client/AnalyticsHubServiceClientTest.php b/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/Client/AnalyticsHubServiceClientTest.php deleted file mode 100644 index 3a78232d4dc3..000000000000 --- a/owl-bot-staging/BigQueryDataExchange/v1beta1/tests/Unit/V1beta1/Client/AnalyticsHubServiceClientTest.php +++ /dev/null @@ -1,1387 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AnalyticsHubServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AnalyticsHubServiceClient($options); - } - - /** @test */ - public function createDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataExchangeId = 'dataExchangeId1402219426'; - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new CreateDataExchangeRequest()) - ->setParent($formattedParent) - ->setDataExchangeId($dataExchangeId) - ->setDataExchange($dataExchange); - $response = $gapicClient->createDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataExchangeId(); - $this->assertProtobufEquals($dataExchangeId, $actualValue); - $actualValue = $actualRequestObject->getDataExchange(); - $this->assertProtobufEquals($dataExchange, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $dataExchangeId = 'dataExchangeId1402219426'; - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new CreateDataExchangeRequest()) - ->setParent($formattedParent) - ->setDataExchangeId($dataExchangeId) - ->setDataExchange($dataExchange); - try { - $gapicClient->createDataExchange($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $icon = '121'; - $requestAccess = 'requestAccess2059178260'; - $expectedResponse = new Listing(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setIcon($icon); - $expectedResponse->setRequestAccess($requestAccess); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $listingId = 'listingId988969142'; - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $request = (new CreateListingRequest()) - ->setParent($formattedParent) - ->setListingId($listingId) - ->setListing($listing); - $response = $gapicClient->createListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateListing', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getListingId(); - $this->assertProtobufEquals($listingId, $actualValue); - $actualValue = $actualRequestObject->getListing(); - $this->assertProtobufEquals($listing, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $listingId = 'listingId988969142'; - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $request = (new CreateListingRequest()) - ->setParent($formattedParent) - ->setListingId($listingId) - ->setListing($listing); - try { - $gapicClient->createListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new DeleteDataExchangeRequest()) - ->setName($formattedName); - $gapicClient->deleteDataExchange($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new DeleteDataExchangeRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDataExchange($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new DeleteListingRequest()) - ->setName($formattedName); - $gapicClient->deleteListing($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteListing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new DeleteListingRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new GetDataExchangeRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new GetDataExchangeRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataExchange($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 getListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $icon = '121'; - $requestAccess = 'requestAccess2059178260'; - $expectedResponse = new Listing(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setIcon($icon); - $expectedResponse->setRequestAccess($requestAccess); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new GetListingRequest()) - ->setName($formattedName); - $response = $gapicClient->getListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetListing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new GetListingRequest()) - ->setName($formattedName); - try { - $gapicClient->getListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataExchangesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataExchangesElement = new DataExchange(); - $dataExchanges = [ - $dataExchangesElement, - ]; - $expectedResponse = new ListDataExchangesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataExchanges($dataExchanges); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataExchangesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataExchanges($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListDataExchanges', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataExchangesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListDataExchangesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataExchanges($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listListingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $listingsElement = new Listing(); - $listings = [ - $listingsElement, - ]; - $expectedResponse = new ListListingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setListings($listings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new ListListingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listListings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getListings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListListings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listListingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataExchangeName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]'); - $request = (new ListListingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listListings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrgDataExchangesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataExchangesElement = new DataExchange(); - $dataExchanges = [ - $dataExchangesElement, - ]; - $expectedResponse = new ListOrgDataExchangesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataExchanges($dataExchanges); - $transport->addResponse($expectedResponse); - // Mock request - $organization = 'organization1178922291'; - $request = (new ListOrgDataExchangesRequest()) - ->setOrganization($organization); - $response = $gapicClient->listOrgDataExchanges($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataExchanges()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListOrgDataExchanges', $actualFuncCall); - $actualValue = $actualRequestObject->getOrganization(); - $this->assertProtobufEquals($organization, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrgDataExchangesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $organization = 'organization1178922291'; - $request = (new ListOrgDataExchangesRequest()) - ->setOrganization($organization); - try { - $gapicClient->listOrgDataExchanges($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 subscribeListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SubscribeListingResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new SubscribeListingRequest()) - ->setName($formattedName); - $response = $gapicClient->subscribeListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/SubscribeListing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function subscribeListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listingName('[PROJECT]', '[LOCATION]', '[DATA_EXCHANGE]', '[LISTING]'); - $request = (new SubscribeListingRequest()) - ->setName($formattedName); - try { - $gapicClient->subscribeListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.dataexchange.v1beta1.AnalyticsHubService/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 updateDataExchangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new UpdateDataExchangeRequest()) - ->setUpdateMask($updateMask) - ->setDataExchange($dataExchange); - $response = $gapicClient->updateDataExchange($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getDataExchange(); - $this->assertProtobufEquals($dataExchange, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataExchangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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(); - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new UpdateDataExchangeRequest()) - ->setUpdateMask($updateMask) - ->setDataExchange($dataExchange); - try { - $gapicClient->updateDataExchange($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateListingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $icon = '121'; - $requestAccess = 'requestAccess2059178260'; - $expectedResponse = new Listing(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setIcon($icon); - $expectedResponse->setRequestAccess($requestAccess); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $request = (new UpdateListingRequest()) - ->setUpdateMask($updateMask) - ->setListing($listing); - $response = $gapicClient->updateListing($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateListing', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getListing(); - $this->assertProtobufEquals($listing, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateListingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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(); - $listing = new Listing(); - $listingDisplayName = 'listingDisplayName293456201'; - $listing->setDisplayName($listingDisplayName); - $listingBigqueryDataset = new BigQueryDatasetSource(); - $listing->setBigqueryDataset($listingBigqueryDataset); - $request = (new UpdateListingRequest()) - ->setUpdateMask($updateMask) - ->setListing($listing); - try { - $gapicClient->updateListing($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 createDataExchangeAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $primaryContact = 'primaryContact203339491'; - $documentation = 'documentation1587405498'; - $listingCount = 1101038700; - $icon = '121'; - $expectedResponse = new DataExchange(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPrimaryContact($primaryContact); - $expectedResponse->setDocumentation($documentation); - $expectedResponse->setListingCount($listingCount); - $expectedResponse->setIcon($icon); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataExchangeId = 'dataExchangeId1402219426'; - $dataExchange = new DataExchange(); - $dataExchangeDisplayName = 'dataExchangeDisplayName-1195270080'; - $dataExchange->setDisplayName($dataExchangeDisplayName); - $request = (new CreateDataExchangeRequest()) - ->setParent($formattedParent) - ->setDataExchangeId($dataExchangeId) - ->setDataExchange($dataExchange); - $response = $gapicClient->createDataExchangeAsync($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.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateDataExchange', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataExchangeId(); - $this->assertProtobufEquals($dataExchangeId, $actualValue); - $actualValue = $actualRequestObject->getDataExchange(); - $this->assertProtobufEquals($dataExchange, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datapolicies/V1/Datapolicy.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datapolicies/V1/Datapolicy.php deleted file mode 100644 index 5e5cef94109ac6d626004435a3261967337142c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5331 zcmcIo-EZ4e6kpn{qqkd^-F0hM5V&U3+NyJCfq~q0#Yx;YTH1yr?PwKbImu0G=Gew| zww0H znoF(|SEVYYRc5V}qSi`D-&!dhu~yoiUqq;)tB%8k-}li0;^1dB%P=SBxT*_}E1IKd zhURLju6+VNE^#$gcL=C=%hsAk#nnuMqY9fwg-p+Io=qxy#WI1DB`(01qcj0UrHtVc z+femVnm83(vs}~8fv70fi5rqjzf8~g(^7Lx{#$NWvSoeU+OAs0f-*C``!a)yN1NinN z`0rzAJY^GTb+l)A8IUK?s~i`n(U7Iu;NnD#i%kzF-}+q|_(u}(T)<99&c5KG09G6U zT4SPR4Btj0RL=KkVgO8yEX?}~&!Agq*+~wu5YrXzy-84tP9|PSOFNMd}BB4Pk@aS0cnHT9wT*>^b@&8c!3Q z9OY-S&72<;)K^gWT{N~z+-|5Z!uHn?qpaq%tiw_lQ1N0?>O2~@)H+cdSiKl&r!Yo{ zeR9pa#F!YQ`HDx;P)*Ze9hx{v-}yr{(T&ToU?m`U4V`TT0{}y?29K3KcpRNG$OBi2 zz@a%m%zu6op%&wK3=p$Et+;C4L%4PV-$54`4w`kEQ4gx-6ieoJgZz7XlVVjvdny?4 zDtax3yOMAa@1l6i=Y7T9w>&mS7vAe*B5#IBr53>szJx}jwjsG$O!x*GZE?UPIrK_e zDoRRjGn+~6D8-$etZZ!*a&juOl9AK#6Br~?o7t`P4J9jY%UPu$r?&E$;*PHp9|X=X zFdOSq;dW+YH5eEWn~x>CztX@-DDIC)#dQ(~{=dV7ZdSZ4L*gL#dzhg9G3V)4?jYjr zVKR(B`qY>2AGSQPSK`&*|=Kmc)=P3nk0m25lXxXGnYMMc+3V8r8jsu$%)-*;J z*82!Zn_(drT9reikZ0%7Y1?eNFq;>cwG;f$F*J6RG`@Xps}n} zC@L$PTX`k5Cgr76QO+0Q!&GS{lRshzL2V;>UCLycwfGsR|53;QS=o`Ly!Y*Fatz_1 zj9P>)e0k2}-^<$qvF~XWg8zu2c;`BZZ}rG}r=s8OCi`FI_}xbm_7>f_NJf43>tA0D zEc0*B-NAu3ycDMCY$QEr+tX5vF1`3~@Ue68?Agao#pm$x?jvbD;@n(hp=FNVUbx8| zjmQXe0eynY?S(jd*zWY7;B@E0+_Tf2iqGM6sRUkAFXp-ze&+Q}{vGCZKc2$o3@nPV zS^OQi*|}lp+09PHz|BiR{)hV=w$104A4zOS!*DOmdTH4QZv0~moo(BH;Kg97XDn@P zS^>^u)LFX=xPKRZ1HwCZ6Fn2&sTer2+#?I!`rbB%mmW#}p52R$?^qu#1H%^k46qy? zBQYOUtV`D(V(|bVj9Nj*7 z8J45>O}W_ax~JluLfHwlZiZ;s0>O4)bf*T0qxWv`$to|>r6!QD%HIxLU1j%eLWfLiXt;AiXhAG1Vu4w kRus4A%R{W;zIiRY-k9_5z9Ls;PrN2$lHPUJAv#3pKSDw%QUCw| diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/CreateDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/CreateDataPolicyRequest.php deleted file mode 100644 index f587ea304fcb..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/CreateDataPolicyRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest - */ -class CreateDataPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the project that the data policy will belong to. - * The format is `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. The data policy to create. The `name` field does not need to be - * provided for the data policy creation. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_policy = null; - - /** - * @param string $parent Required. Resource name of the project that the data policy will belong to. - * The format is `projects/{project_number}/locations/{location_id}`. Please see - * {@see DataPolicyServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $dataPolicy Required. The data policy to create. The `name` field does not need to be - * provided for the data policy creation. - * - * @return \Google\Cloud\BigQuery\DataPolicies\V1\CreateDataPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $dataPolicy): self - { - return (new self()) - ->setParent($parent) - ->setDataPolicy($dataPolicy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the project that the data policy will belong to. - * The format is `projects/{project_number}/locations/{location_id}`. - * @type \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $data_policy - * Required. The data policy to create. The `name` field does not need to be - * provided for the data policy creation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the project that the data policy will belong to. - * The format is `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. Resource name of the project that the data policy will belong to. - * The format is `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. The data policy to create. The `name` field does not need to be - * provided for the data policy creation. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy|null - */ - public function getDataPolicy() - { - return $this->data_policy; - } - - public function hasDataPolicy() - { - return isset($this->data_policy); - } - - public function clearDataPolicy() - { - unset($this->data_policy); - } - - /** - * Required. The data policy to create. The `name` field does not need to be - * provided for the data policy creation. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $var - * @return $this - */ - public function setDataPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy::class); - $this->data_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy.php deleted file mode 100644 index 67d9e2641f29..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy - */ -class DataMaskingPolicy extends \Google\Protobuf\Internal\Message -{ - protected $masking_expression; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $predefined_expression - * A predefined masking expression. - * @type string $routine - * The name of the BigQuery routine that contains the custom masking - * routine, in the format of - * `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); - parent::__construct($data); - } - - /** - * A predefined masking expression. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression predefined_expression = 1; - * @return int - */ - public function getPredefinedExpression() - { - return $this->readOneof(1); - } - - public function hasPredefinedExpression() - { - return $this->hasOneof(1); - } - - /** - * A predefined masking expression. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression predefined_expression = 1; - * @param int $var - * @return $this - */ - public function setPredefinedExpression($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy\PredefinedExpression::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The name of the BigQuery routine that contains the custom masking - * routine, in the format of - * `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`. - * - * Generated from protobuf field string routine = 3; - * @return string - */ - public function getRoutine() - { - return $this->readOneof(3); - } - - public function hasRoutine() - { - return $this->hasOneof(3); - } - - /** - * The name of the BigQuery routine that contains the custom masking - * routine, in the format of - * `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`. - * - * Generated from protobuf field string routine = 3; - * @param string $var - * @return $this - */ - public function setRoutine($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getMaskingExpression() - { - return $this->whichOneof("masking_expression"); - } - -} - diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy/PredefinedExpression.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy/PredefinedExpression.php deleted file mode 100644 index c561f3ab4083..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataMaskingPolicy/PredefinedExpression.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression - */ -class PredefinedExpression -{ - /** - * Default, unspecified predefined expression. No masking will take place - * since no expression is specified. - * - * Generated from protobuf enum PREDEFINED_EXPRESSION_UNSPECIFIED = 0; - */ - const PREDEFINED_EXPRESSION_UNSPECIFIED = 0; - /** - * Masking expression to replace data with SHA-256 hash. - * - * Generated from protobuf enum SHA256 = 3; - */ - const SHA256 = 3; - /** - * Masking expression to replace data with NULLs. - * - * Generated from protobuf enum ALWAYS_NULL = 5; - */ - const ALWAYS_NULL = 5; - /** - * Masking expression to replace data with their default masking values. - * The default masking values for each type listed as below: - * * STRING: "" - * * BYTES: b'' - * * INTEGER: 0 - * * FLOAT: 0.0 - * * NUMERIC: 0 - * * BOOLEAN: FALSE - * * TIMESTAMP: 1970-01-01 00:00:00 UTC - * * DATE: 1970-01-01 - * * TIME: 00:00:00 - * * DATETIME: 1970-01-01T00:00:00 - * * GEOGRAPHY: POINT(0 0) - * * BIGNUMERIC: 0 - * * ARRAY: [] - * * STRUCT: NOT_APPLICABLE - * * JSON: NULL - * - * Generated from protobuf enum DEFAULT_MASKING_VALUE = 7; - */ - const DEFAULT_MASKING_VALUE = 7; - /** - * Masking expression shows the last four characters of text. - * The masking behavior is as follows: - * * If text length > 4 characters: Replace text with XXXXX, append last - * four characters of original text. - * * If text length <= 4 characters: Apply SHA-256 hash. - * - * Generated from protobuf enum LAST_FOUR_CHARACTERS = 9; - */ - const LAST_FOUR_CHARACTERS = 9; - /** - * Masking expression shows the first four characters of text. - * The masking behavior is as follows: - * * If text length > 4 characters: Replace text with XXXXX, prepend first - * four characters of original text. - * * If text length <= 4 characters: Apply SHA-256 hash. - * - * Generated from protobuf enum FIRST_FOUR_CHARACTERS = 10; - */ - const FIRST_FOUR_CHARACTERS = 10; - /** - * Masking expression for email addresses. - * The masking behavior is as follows: - * * Syntax-valid email address: Replace username with XXXXX. For example, - * cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com. - * * Syntax-invalid email address: Apply SHA-256 hash. - * For more information, see [Email - * mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options). - * - * Generated from protobuf enum EMAIL_MASK = 12; - */ - const EMAIL_MASK = 12; - /** - * Masking expression to only show the year of `Date`, - * `DateTime` and `TimeStamp`. For example, with the - * year 2076: - * * DATE : 2076-01-01 - * * DATETIME : 2076-01-01T00:00:00 - * * TIMESTAMP : 2076-01-01 00:00:00 UTC - * Truncation occurs according to the UTC time zone. To change this, adjust - * the default time zone using the `time_zone` system variable. - * For more information, see the System - * variables reference. - * - * Generated from protobuf enum DATE_YEAR_MASK = 13; - */ - const DATE_YEAR_MASK = 13; - - private static $valueToName = [ - self::PREDEFINED_EXPRESSION_UNSPECIFIED => 'PREDEFINED_EXPRESSION_UNSPECIFIED', - self::SHA256 => 'SHA256', - self::ALWAYS_NULL => 'ALWAYS_NULL', - self::DEFAULT_MASKING_VALUE => 'DEFAULT_MASKING_VALUE', - self::LAST_FOUR_CHARACTERS => 'LAST_FOUR_CHARACTERS', - self::FIRST_FOUR_CHARACTERS => 'FIRST_FOUR_CHARACTERS', - self::EMAIL_MASK => 'EMAIL_MASK', - self::DATE_YEAR_MASK => 'DATE_YEAR_MASK', - ]; - - 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(PredefinedExpression::class, \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy_PredefinedExpression::class); - diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy.php deleted file mode 100644 index dd24973d3fd5..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.DataPolicy - */ -class DataPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of this data policy, in the format of - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Type of data policy. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType data_policy_type = 2; - */ - protected $data_policy_type = 0; - /** - * User-assigned (human readable) ID of the data policy that needs to be - * unique within a project. Used as {data_policy_id} in part of the resource - * name. - * - * Generated from protobuf field string data_policy_id = 3; - */ - protected $data_policy_id = ''; - protected $matching_label; - protected $policy; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $policy_tag - * Policy tag resource name, in the format of - * `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. - * @type \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy $data_masking_policy - * The data masking policy that specifies the data masking rule to use. - * @type string $name - * Output only. Resource name of this data policy, in the format of - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - * @type int $data_policy_type - * Type of data policy. - * @type string $data_policy_id - * User-assigned (human readable) ID of the data policy that needs to be - * unique within a project. Used as {data_policy_id} in part of the resource - * name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); - parent::__construct($data); - } - - /** - * Policy tag resource name, in the format of - * `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. - * - * Generated from protobuf field string policy_tag = 4; - * @return string - */ - public function getPolicyTag() - { - return $this->readOneof(4); - } - - public function hasPolicyTag() - { - return $this->hasOneof(4); - } - - /** - * Policy tag resource name, in the format of - * `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. - * - * Generated from protobuf field string policy_tag = 4; - * @param string $var - * @return $this - */ - public function setPolicyTag($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The data masking policy that specifies the data masking rule to use. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy data_masking_policy = 5; - * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy|null - */ - public function getDataMaskingPolicy() - { - return $this->readOneof(5); - } - - public function hasDataMaskingPolicy() - { - return $this->hasOneof(5); - } - - /** - * The data masking policy that specifies the data masking rule to use. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy data_masking_policy = 5; - * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy $var - * @return $this - */ - public function setDataMaskingPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Output only. Resource name of this data policy, in the format of - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of this data policy, in the format of - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - * - * 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; - } - - /** - * Type of data policy. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType data_policy_type = 2; - * @return int - */ - public function getDataPolicyType() - { - return $this->data_policy_type; - } - - /** - * Type of data policy. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType data_policy_type = 2; - * @param int $var - * @return $this - */ - public function setDataPolicyType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy\DataPolicyType::class); - $this->data_policy_type = $var; - - return $this; - } - - /** - * User-assigned (human readable) ID of the data policy that needs to be - * unique within a project. Used as {data_policy_id} in part of the resource - * name. - * - * Generated from protobuf field string data_policy_id = 3; - * @return string - */ - public function getDataPolicyId() - { - return $this->data_policy_id; - } - - /** - * User-assigned (human readable) ID of the data policy that needs to be - * unique within a project. Used as {data_policy_id} in part of the resource - * name. - * - * Generated from protobuf field string data_policy_id = 3; - * @param string $var - * @return $this - */ - public function setDataPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->data_policy_id = $var; - - return $this; - } - - /** - * @return string - */ - public function getMatchingLabel() - { - return $this->whichOneof("matching_label"); - } - - /** - * @return string - */ - public function getPolicy() - { - return $this->whichOneof("policy"); - } - -} - diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy/DataPolicyType.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy/DataPolicyType.php deleted file mode 100644 index 0f431ea3e887..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DataPolicy/DataPolicyType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType - */ -class DataPolicyType -{ - /** - * Default value for the data policy type. This should not be used. - * - * Generated from protobuf enum DATA_POLICY_TYPE_UNSPECIFIED = 0; - */ - const DATA_POLICY_TYPE_UNSPECIFIED = 0; - /** - * Used to create a data policy for column-level security, without data - * masking. - * - * Generated from protobuf enum COLUMN_LEVEL_SECURITY_POLICY = 3; - */ - const COLUMN_LEVEL_SECURITY_POLICY = 3; - /** - * Used to create a data policy for data masking. - * - * Generated from protobuf enum DATA_MASKING_POLICY = 2; - */ - const DATA_MASKING_POLICY = 2; - - private static $valueToName = [ - self::DATA_POLICY_TYPE_UNSPECIFIED => 'DATA_POLICY_TYPE_UNSPECIFIED', - self::COLUMN_LEVEL_SECURITY_POLICY => 'COLUMN_LEVEL_SECURITY_POLICY', - self::DATA_MASKING_POLICY => 'DATA_MASKING_POLICY', - ]; - - 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(DataPolicyType::class, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy_DataPolicyType::class); - diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DeleteDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DeleteDataPolicyRequest.php deleted file mode 100644 index 753de5ead174..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/DeleteDataPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest - */ -class DeleteDataPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the data policy to delete. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the data policy to delete. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. Please see - * {@see DataPolicyServiceClient::dataPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataPolicies\V1\DeleteDataPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the data policy to delete. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the data policy to delete. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_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. Resource name of the data policy to delete. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_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/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/GetDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/GetDataPolicyRequest.php deleted file mode 100644 index 8e6aa8262f60..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/GetDataPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest - */ -class GetDataPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the requested data policy. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the requested data policy. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. Please see - * {@see DataPolicyServiceClient::dataPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataPolicies\V1\GetDataPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the requested data policy. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the requested data policy. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_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. Resource name of the requested data policy. Format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_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/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesRequest.php deleted file mode 100644 index ec8bb56c49dc..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesRequest.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest - */ -class ListDataPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the project for which to list data policies. - * Format is `projects/{project_number}/locations/{location_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of data policies to return. Must be a value between 1 - * and 1000. - * If not set, defaults to 50. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous list request, if any. If - * not set, defaults to an empty string. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filters the data policies by policy tags that they - * are associated with. Currently filter only supports - * "policy_tag" based filtering and OR based predicates. Sample - * filter can be "policy_tag: - * projects/1/locations/us/taxonomies/2/policyTags/3". - * You may also use wildcard such as "policy_tag: - * projects/1/locations/us/taxonomies/2*". Please note that OR predicates - * cannot be used with wildcard filters. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Resource name of the project for which to list data policies. - * Format is `projects/{project_number}/locations/{location_id}`. Please see - * {@see DataPolicyServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataPolicies\V1\ListDataPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the project for which to list data policies. - * Format is `projects/{project_number}/locations/{location_id}`. - * @type int $page_size - * The maximum number of data policies to return. Must be a value between 1 - * and 1000. - * If not set, defaults to 50. - * @type string $page_token - * The `nextPageToken` value returned from a previous list request, if any. If - * not set, defaults to an empty string. - * @type string $filter - * Filters the data policies by policy tags that they - * are associated with. Currently filter only supports - * "policy_tag" based filtering and OR based predicates. Sample - * filter can be "policy_tag: - * projects/1/locations/us/taxonomies/2/policyTags/3". - * You may also use wildcard such as "policy_tag: - * projects/1/locations/us/taxonomies/2*". Please note that OR predicates - * cannot be used with wildcard filters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the project for which to list data policies. - * Format is `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. Resource name of the project for which to list data policies. - * Format is `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; - } - - /** - * The maximum number of data policies to return. Must be a value between 1 - * and 1000. - * If not set, defaults to 50. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of data policies to return. Must be a value between 1 - * and 1000. - * If not set, defaults to 50. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous list request, if any. If - * not set, defaults to an empty string. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous list request, if any. If - * not set, defaults to an empty string. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filters the data policies by policy tags that they - * are associated with. Currently filter only supports - * "policy_tag" based filtering and OR based predicates. Sample - * filter can be "policy_tag: - * projects/1/locations/us/taxonomies/2/policyTags/3". - * You may also use wildcard such as "policy_tag: - * projects/1/locations/us/taxonomies/2*". Please note that OR predicates - * cannot be used with wildcard filters. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filters the data policies by policy tags that they - * are associated with. Currently filter only supports - * "policy_tag" based filtering and OR based predicates. Sample - * filter can be "policy_tag: - * projects/1/locations/us/taxonomies/2/policyTags/3". - * You may also use wildcard such as "policy_tag: - * projects/1/locations/us/taxonomies/2*". Please note that OR predicates - * cannot be used with wildcard filters. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesResponse.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesResponse.php deleted file mode 100644 index e23d7ae0d58e..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/ListDataPoliciesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.ListDataPoliciesResponse - */ -class ListDataPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Data policies that belong to the requested project. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policies = 1; - */ - private $data_policies; - /** - * Token used to retrieve the next page of results, or empty if there are no - * more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy>|\Google\Protobuf\Internal\RepeatedField $data_policies - * Data policies that belong to the requested project. - * @type string $next_page_token - * Token used to retrieve the next page of results, or empty if there are no - * more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); - parent::__construct($data); - } - - /** - * Data policies that belong to the requested project. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataPolicies() - { - return $this->data_policies; - } - - /** - * Data policies that belong to the requested project. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policies = 1; - * @param array<\Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy::class); - $this->data_policies = $arr; - - return $this; - } - - /** - * Token used to retrieve the next page of results, or empty if there are no - * more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token used to retrieve the next page of results, or empty if there are no - * more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/RenameDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/RenameDataPolicyRequest.php deleted file mode 100644 index cb59f030aab8..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/RenameDataPolicyRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest - */ -class RenameDataPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the data policy to rename. The format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The new data policy id. - * - * Generated from protobuf field string new_data_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $new_data_policy_id = ''; - - /** - * @param string $name Required. Resource name of the data policy to rename. The format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` - * @param string $newDataPolicyId Required. The new data policy id. - * - * @return \Google\Cloud\BigQuery\DataPolicies\V1\RenameDataPolicyRequest - * - * @experimental - */ - public static function build(string $name, string $newDataPolicyId): self - { - return (new self()) - ->setName($name) - ->setNewDataPolicyId($newDataPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the data policy to rename. The format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` - * @type string $new_data_policy_id - * Required. The new data policy id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the data policy to rename. The format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the data policy to rename. The format is - * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` - * - * 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. The new data policy id. - * - * Generated from protobuf field string new_data_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNewDataPolicyId() - { - return $this->new_data_policy_id; - } - - /** - * Required. The new data policy id. - * - * Generated from protobuf field string new_data_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNewDataPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->new_data_policy_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/UpdateDataPolicyRequest.php b/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/UpdateDataPolicyRequest.php deleted file mode 100644 index 3bad7e59018b..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/proto/src/Google/Cloud/BigQuery/DataPolicies/V1/UpdateDataPolicyRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest - */ -class UpdateDataPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Update the data policy's metadata. - * The target data policy is determined by the `name` field. - * Other fields are updated to the specified values based on the field masks. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_policy = null; - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * If not set, defaults to all of the fields that are allowed to update. - * Updates to the `name` and `dataPolicyId` fields are not allowed. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $dataPolicy Required. Update the data policy's metadata. - * - * The target data policy is determined by the `name` field. - * Other fields are updated to the specified values based on the field masks. - * @param \Google\Protobuf\FieldMask $updateMask The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * If not set, defaults to all of the fields that are allowed to update. - * - * Updates to the `name` and `dataPolicyId` fields are not allowed. - * - * @return \Google\Cloud\BigQuery\DataPolicies\V1\UpdateDataPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $dataPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataPolicy($dataPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $data_policy - * Required. Update the data policy's metadata. - * The target data policy is determined by the `name` field. - * Other fields are updated to the specified values based on the field masks. - * @type \Google\Protobuf\FieldMask $update_mask - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * If not set, defaults to all of the fields that are allowed to update. - * Updates to the `name` and `dataPolicyId` fields are not allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Update the data policy's metadata. - * The target data policy is determined by the `name` field. - * Other fields are updated to the specified values based on the field masks. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy|null - */ - public function getDataPolicy() - { - return $this->data_policy; - } - - public function hasDataPolicy() - { - return isset($this->data_policy); - } - - public function clearDataPolicy() - { - unset($this->data_policy); - } - - /** - * Required. Update the data policy's metadata. - * The target data policy is determined by the `name` field. - * Other fields are updated to the specified values based on the field masks. - * - * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $var - * @return $this - */ - public function setDataPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy::class); - $this->data_policy = $var; - - return $this; - } - - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * If not set, defaults to all of the fields that are allowed to update. - * Updates to the `name` and `dataPolicyId` fields are not allowed. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * If not set, defaults to all of the fields that are allowed to update. - * Updates to the `name` and `dataPolicyId` fields are not allowed. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/create_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/create_data_policy.php deleted file mode 100644 index 8b28f612f640..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/create_data_policy.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setDataPolicy($dataPolicy); - - // Call the API and handle any network failures. - try { - /** @var DataPolicy $response */ - $response = $dataPolicyServiceClient->createDataPolicy($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 = DataPolicyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_data_policy_sample($formattedParent); -} -// [END bigquerydatapolicy_v1_generated_DataPolicyService_CreateDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/delete_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/delete_data_policy.php deleted file mode 100644 index d73d33365f40..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/delete_data_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $dataPolicyServiceClient->deleteDataPolicy($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 = DataPolicyServiceClient::dataPolicyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_POLICY]' - ); - - delete_data_policy_sample($formattedName); -} -// [END bigquerydatapolicy_v1_generated_DataPolicyService_DeleteDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_data_policy.php deleted file mode 100644 index e2eb490b924f..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_data_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataPolicy $response */ - $response = $dataPolicyServiceClient->getDataPolicy($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 = DataPolicyServiceClient::dataPolicyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_POLICY]' - ); - - get_data_policy_sample($formattedName); -} -// [END bigquerydatapolicy_v1_generated_DataPolicyService_GetDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_iam_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_iam_policy.php deleted file mode 100644 index bc045d514fd1..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/get_iam_policy.php +++ /dev/null @@ -1,71 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataPolicyServiceClient->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 bigquerydatapolicy_v1_generated_DataPolicyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/list_data_policies.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/list_data_policies.php deleted file mode 100644 index 827e2ff72c7d..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/list_data_policies.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataPolicyServiceClient->listDataPolicies($request); - - /** @var DataPolicy $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 = DataPolicyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_data_policies_sample($formattedParent); -} -// [END bigquerydatapolicy_v1_generated_DataPolicyService_ListDataPolicies_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/rename_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/rename_data_policy.php deleted file mode 100644 index efb6587c14d7..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/rename_data_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($name) - ->setNewDataPolicyId($newDataPolicyId); - - // Call the API and handle any network failures. - try { - /** @var DataPolicy $response */ - $response = $dataPolicyServiceClient->renameDataPolicy($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 -{ - $name = '[NAME]'; - $newDataPolicyId = '[NEW_DATA_POLICY_ID]'; - - rename_data_policy_sample($name, $newDataPolicyId); -} -// [END bigquerydatapolicy_v1_generated_DataPolicyService_RenameDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/set_iam_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/set_iam_policy.php deleted file mode 100644 index e680348581ab..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataPolicyServiceClient->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 bigquerydatapolicy_v1_generated_DataPolicyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/test_iam_permissions.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/test_iam_permissions.php deleted file mode 100644 index 8e8f3cdfc0b7..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,78 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $dataPolicyServiceClient->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 bigquerydatapolicy_v1_generated_DataPolicyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/update_data_policy.php b/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/update_data_policy.php deleted file mode 100644 index 54d136b98c09..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/samples/V1/DataPolicyServiceClient/update_data_policy.php +++ /dev/null @@ -1,60 +0,0 @@ -setDataPolicy($dataPolicy); - - // Call the API and handle any network failures. - try { - /** @var DataPolicy $response */ - $response = $dataPolicyServiceClient->updateDataPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigquerydatapolicy_v1_generated_DataPolicyService_UpdateDataPolicy_sync] diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/Client/DataPolicyServiceClient.php b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/Client/DataPolicyServiceClient.php deleted file mode 100644 index c2858168bd70..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/Client/DataPolicyServiceClient.php +++ /dev/null @@ -1,485 +0,0 @@ - createDataPolicyAsync(CreateDataPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataPolicyAsync(DeleteDataPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataPolicyAsync(GetDataPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataPoliciesAsync(ListDataPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameDataPolicyAsync(RenameDataPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataPolicyAsync(UpdateDataPolicyRequest $request, array $optionalArgs = []) - */ -final class DataPolicyServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.datapolicies.v1.DataPolicyService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigquerydatapolicy.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigquerydatapolicy.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigquery', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_policy_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_policy_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_policy_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_policy_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_policy - * resource. - * - * @param string $project - * @param string $location - * @param string $dataPolicy - * - * @return string The formatted data_policy resource. - */ - public static function dataPolicyName(string $project, string $location, string $dataPolicy): string - { - return self::getPathTemplate('dataPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'data_policy' => $dataPolicy, - ]); - } - - /** - * 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 - * - dataPolicy: projects/{project}/locations/{location}/dataPolicies/{data_policy} - * - 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 'bigquerydatapolicy.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new data policy under a project with the given `dataPolicyId` - * (used as the display name), policy tag, and data policy type. - * - * The async variant is {@see DataPolicyServiceClient::createDataPolicyAsync()} . - * - * @example samples/V1/DataPolicyServiceClient/create_data_policy.php - * - * @param CreateDataPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataPolicy(CreateDataPolicyRequest $request, array $callOptions = []): DataPolicy - { - return $this->startApiCall('CreateDataPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes the data policy specified by its resource name. - * - * The async variant is {@see DataPolicyServiceClient::deleteDataPolicyAsync()} . - * - * @example samples/V1/DataPolicyServiceClient/delete_data_policy.php - * - * @param DeleteDataPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteDataPolicy(DeleteDataPolicyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDataPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets the data policy specified by its resource name. - * - * The async variant is {@see DataPolicyServiceClient::getDataPolicyAsync()} . - * - * @example samples/V1/DataPolicyServiceClient/get_data_policy.php - * - * @param GetDataPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataPolicy(GetDataPolicyRequest $request, array $callOptions = []): DataPolicy - { - return $this->startApiCall('GetDataPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets the IAM policy for the specified data policy. - * - * The async variant is {@see DataPolicyServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/DataPolicyServiceClient/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 all of the data policies in the specified parent project. - * - * The async variant is {@see DataPolicyServiceClient::listDataPoliciesAsync()} . - * - * @example samples/V1/DataPolicyServiceClient/list_data_policies.php - * - * @param ListDataPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listDataPolicies(ListDataPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataPolicies', $request, $callOptions); - } - - /** - * Renames the id (display name) of the specified data policy. - * - * The async variant is {@see DataPolicyServiceClient::renameDataPolicyAsync()} . - * - * @example samples/V1/DataPolicyServiceClient/rename_data_policy.php - * - * @param RenameDataPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function renameDataPolicy(RenameDataPolicyRequest $request, array $callOptions = []): DataPolicy - { - return $this->startApiCall('RenameDataPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the IAM policy for the specified data policy. - * - * The async variant is {@see DataPolicyServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/DataPolicyServiceClient/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 permission on the specified data policy resource. - * - * The async variant is {@see DataPolicyServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/DataPolicyServiceClient/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(); - } - - /** - * Updates the metadata for an existing data policy. The target data policy - * can be specified by the resource name. - * - * The async variant is {@see DataPolicyServiceClient::updateDataPolicyAsync()} . - * - * @example samples/V1/DataPolicyServiceClient/update_data_policy.php - * - * @param UpdateDataPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataPolicy(UpdateDataPolicyRequest $request, array $callOptions = []): DataPolicy - { - return $this->startApiCall('UpdateDataPolicy', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 1d84ac5f7a4d..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.bigquery.datapolicies.v1", - "libraryPackage": "Google\\Cloud\\BigQuery\\DataPolicies\\V1", - "services": { - "DataPolicyService": { - "clients": { - "grpc": { - "libraryClient": "DataPolicyServiceGapicClient", - "rpcs": { - "CreateDataPolicy": { - "methods": [ - "createDataPolicy" - ] - }, - "DeleteDataPolicy": { - "methods": [ - "deleteDataPolicy" - ] - }, - "GetDataPolicy": { - "methods": [ - "getDataPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "ListDataPolicies": { - "methods": [ - "listDataPolicies" - ] - }, - "RenameDataPolicy": { - "methods": [ - "renameDataPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateDataPolicy": { - "methods": [ - "updateDataPolicy" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_client_config.json b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_client_config.json deleted file mode 100644 index c403ed0aa2f4..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_client_config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.datapolicies.v1.DataPolicyService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateDataPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDataPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDataPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDataPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RenameDataPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDataPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_descriptor_config.php b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_descriptor_config.php deleted file mode 100644 index adc115ae66f4..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_descriptor_config.php +++ /dev/null @@ -1,149 +0,0 @@ - [ - 'google.cloud.bigquery.datapolicies.v1.DataPolicyService' => [ - 'CreateDataPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'ListDataPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\ListDataPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RenameDataPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - 'UpdateDataPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy', - 'headerParams' => [ - [ - 'keyName' => 'data_policy.name', - 'fieldAccessors' => [ - 'getDataPolicy', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'dataPolicy' => 'projects/{project}/locations/{location}/dataPolicies/{data_policy}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_rest_client_config.php b/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_rest_client_config.php deleted file mode 100644 index ea0fae9fef3c..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/src/V1/resources/data_policy_service_rest_client_config.php +++ /dev/null @@ -1,135 +0,0 @@ - [ - 'google.cloud.bigquery.datapolicies.v1.DataPolicyService' => [ - 'CreateDataPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataPolicies', - 'body' => 'data_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'ListDataPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RenameDataPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataPolicies/*}:rename', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateDataPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_policy.name=projects/*/locations/*/dataPolicies/*}', - 'body' => 'data_policy', - 'placeholders' => [ - 'data_policy.name' => [ - 'getters' => [ - 'getDataPolicy', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/BigQueryDataPolicies/v1/tests/Unit/V1/Client/DataPolicyServiceClientTest.php b/owl-bot-staging/BigQueryDataPolicies/v1/tests/Unit/V1/Client/DataPolicyServiceClientTest.php deleted file mode 100644 index 7d6570c772a0..000000000000 --- a/owl-bot-staging/BigQueryDataPolicies/v1/tests/Unit/V1/Client/DataPolicyServiceClientTest.php +++ /dev/null @@ -1,734 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataPolicyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataPolicyServiceClient($options); - } - - /** @test */ - public function createDataPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $policyTag = 'policyTag1593879309'; - $name = 'name3373707'; - $dataPolicyId = 'dataPolicyId456934643'; - $expectedResponse = new DataPolicy(); - $expectedResponse->setPolicyTag($policyTag); - $expectedResponse->setName($name); - $expectedResponse->setDataPolicyId($dataPolicyId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataPolicy = new DataPolicy(); - $request = (new CreateDataPolicyRequest()) - ->setParent($formattedParent) - ->setDataPolicy($dataPolicy); - $response = $gapicClient->createDataPolicy($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.bigquery.datapolicies.v1.DataPolicyService/CreateDataPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataPolicy(); - $this->assertProtobufEquals($dataPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $dataPolicy = new DataPolicy(); - $request = (new CreateDataPolicyRequest()) - ->setParent($formattedParent) - ->setDataPolicy($dataPolicy); - try { - $gapicClient->createDataPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); - $request = (new DeleteDataPolicyRequest()) - ->setName($formattedName); - $gapicClient->deleteDataPolicy($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/DeleteDataPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); - $request = (new DeleteDataPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDataPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $policyTag = 'policyTag1593879309'; - $name2 = 'name2-1052831874'; - $dataPolicyId = 'dataPolicyId456934643'; - $expectedResponse = new DataPolicy(); - $expectedResponse->setPolicyTag($policyTag); - $expectedResponse->setName($name2); - $expectedResponse->setDataPolicyId($dataPolicyId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); - $request = (new GetDataPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataPolicy($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.bigquery.datapolicies.v1.DataPolicyService/GetDataPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); - $request = (new GetDataPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.datapolicies.v1.DataPolicyService/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 listDataPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataPoliciesElement = new DataPolicy(); - $dataPolicies = [ - $dataPoliciesElement, - ]; - $expectedResponse = new ListDataPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataPolicies($dataPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/ListDataPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListDataPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameDataPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $policyTag = 'policyTag1593879309'; - $name2 = 'name2-1052831874'; - $dataPolicyId = 'dataPolicyId456934643'; - $expectedResponse = new DataPolicy(); - $expectedResponse->setPolicyTag($policyTag); - $expectedResponse->setName($name2); - $expectedResponse->setDataPolicyId($dataPolicyId); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $newDataPolicyId = 'newDataPolicyId-1742039694'; - $request = (new RenameDataPolicyRequest()) - ->setName($name) - ->setNewDataPolicyId($newDataPolicyId); - $response = $gapicClient->renameDataPolicy($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.bigquery.datapolicies.v1.DataPolicyService/RenameDataPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getNewDataPolicyId(); - $this->assertProtobufEquals($newDataPolicyId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameDataPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $newDataPolicyId = 'newDataPolicyId-1742039694'; - $request = (new RenameDataPolicyRequest()) - ->setName($name) - ->setNewDataPolicyId($newDataPolicyId); - try { - $gapicClient->renameDataPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigquery.datapolicies.v1.DataPolicyService/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.bigquery.datapolicies.v1.DataPolicyService/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 updateDataPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $policyTag = 'policyTag1593879309'; - $name = 'name3373707'; - $dataPolicyId = 'dataPolicyId456934643'; - $expectedResponse = new DataPolicy(); - $expectedResponse->setPolicyTag($policyTag); - $expectedResponse->setName($name); - $expectedResponse->setDataPolicyId($dataPolicyId); - $transport->addResponse($expectedResponse); - // Mock request - $dataPolicy = new DataPolicy(); - $request = (new UpdateDataPolicyRequest()) - ->setDataPolicy($dataPolicy); - $response = $gapicClient->updateDataPolicy($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.bigquery.datapolicies.v1.DataPolicyService/UpdateDataPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getDataPolicy(); - $this->assertProtobufEquals($dataPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $dataPolicy = new DataPolicy(); - $request = (new UpdateDataPolicyRequest()) - ->setDataPolicy($dataPolicy); - try { - $gapicClient->updateDataPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataPolicyAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $policyTag = 'policyTag1593879309'; - $name = 'name3373707'; - $dataPolicyId = 'dataPolicyId456934643'; - $expectedResponse = new DataPolicy(); - $expectedResponse->setPolicyTag($policyTag); - $expectedResponse->setName($name); - $expectedResponse->setDataPolicyId($dataPolicyId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataPolicy = new DataPolicy(); - $request = (new CreateDataPolicyRequest()) - ->setParent($formattedParent) - ->setDataPolicy($dataPolicy); - $response = $gapicClient->createDataPolicyAsync($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.bigquery.datapolicies.v1.DataPolicyService/CreateDataPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataPolicy(); - $this->assertProtobufEquals($dataPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Datatransfer.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Datatransfer.php deleted file mode 100644 index f585538c53801ac3b04f6b0915c86dd399e469d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11719 zcmcIq-)|eo5e}&zmR7MutreM;Qir)Duq7yDL_29pM{!7zk{L*%N>X+su(_Pbm2?ex zcey)SQ4AJEP@sX+qD}kQpg;o@DB8C?^r`O!0`#FR`r-mb3KRvJ|DZvEc6M)XEgWfYBgrT0^q-ARZCVi)mD|d`X1Q165Chm76AplWA~d{)mC*aMg2S&4}iZd0fLrb=G3iK!{|N|snvQ#EYe+=ij4)B&;E0MjQ|7x=VPow^^p z>Z~!9>RIGU%r=|EJ$o!>61!!&liVuEiL#?DWO{Xa6nw3g*Z0e}!C%9Ty ziDsWoW=$paT811dcU9dyn`n`6X9~Q?lf9!-=AIXP8STx?HX$AWu>nM37jg~5J{~}n zfw!qxZx0|_Rw0aRrC|&pd&g7^gP48XgL(Y(ud3X?)3sXLo!5XAuC^VJy5kk}^CEhA zP&UBNIg)Y4BXPkaaW{{|?=H_>94^M2))+e?Q;-o>1rDF9mJ3g`G7wzy`4?w?gDv(C%`gflN^wDqvzOSX3?Zluj@yoCc}s(v7%$KA+RTb#v7{UJd2LQ(23-e zVx23Fe^F%GfpH^LjB3^>jwnBjAmW-xgmd?Svij` zxZWR}$@8~IW>a!&eq9HEXY;Au3> z+>JS5X6WAA5af>Z#4}=H*HI9H0!o%)QK#npk4`(vyo4s zi%kP8Byx=?wYsVi*&q;Oz1?8DXVqAL^$1o)e7>J?eIo$<=`9bsQj`cI#s9SgD|C z<^U$y2a-N?wuid$WHNpB3Fur!M-x*I8B3t+ndL~;YWk5}Q;w}@1ST87PokNIqBWJe zY&JDZ2706sR*OzEq+daofMC={v$F?KWCH9Es8I|t@*8r2 z4vGv(RW#L&($nZ`*>pKA7jtXHT{l7I6tZvAR<#7dGXt zSK-vJLSLkR8A9!}PQe%9!Eu6wZpES7NYK?dDGM(FcHbdY+e+Nyf3;X6;k<^YY!e-> zXyLTa=(-N1N9*6jJ@MxWDkN~fnRQ}!mQaM`1jQB3dZ_B9&(q;A(=VLW9_a@mG`pc% zF8!96U=58z>_R!?q~r{r0-qH!AYwx~0P@k_CL(78BeG`}G(aqIk4WDOp^H5$u?zr; z;B}}5Ivi}lf@p?Y7XBPK!$Ay9Y2;m7b}fjpIiq^%r(ra|YSKh6_;gj*_SFM{2&7mK zA}I#?b(|EnAzfrYC-SPqB{U^Q%D}cT3(G4L$rl4!<<&KPR*9@st9nzjotlf*I^)uRLuh`7B?#|~0u&!ZX!iVS4Y`gc zc+#TfDf6I-_fGSslxHhPf-at{W1&>houR~~#QiB(qHc>swu)K(-TucM?ngwA= z3;2L6_7Oyj?@~FFl~KgzCjmU{1)B{X_d}=9+TX(tvkLfNXWH1^?4mTj@lZbo+<3@C zqx8%ODp?BDWb(R*!c$mTtfoYT1Hy~nL=$FHlNH;hoh#$7$z(p@jP8ALVGxJE(~d&v zMT9!P@I1O$+}V=T<#KLwyWHE5Y^2LM=psVW2O$*g)y}uvUE0Iq#eOFPu3F#(>v9^B zlXKYTJdFym4gKJ>%?=*rUE9>|ZaTS~b~hvV+vq$T09h>SLr3B?Ig`n?Gn%~V=!o4Mv_k;8o(P1_>E_#y=4FAX+-5ZK>Dv#W=s`ZhH0Y7J_LS{w97Q>P`- z#UB0KV4$o+#iAz#YE7=vsae4`CjAMxsKh%q;SS(M?UnW6%|Q|vzJ?I6fN9J0NQhT5 zz4^F(F6iXrWi&>#nj=EnXTKEg6_MUTPx_n0!FUY~KU|DS_lMAB;3U)DWX;xB4V;c< zOsArUBO?l)49#@mW; z+_T|M#dpGn<0aQ#(~|qd$ugsGrUz?=R`995raiJ9UqjKHX6p5Nr^#x^NY8;#822j? zq+4iiMMkZkUuz{6J1 zsGD3)#3li42h@hG-4}4&SGorcA%Xu5{Orvm6ojDs+#@M)=$C%Hwk|%Dt&3;16+TBq z+;m922%n{lE%S2_Dkv-s3RU;Sa3P9)i;-Gh5*7~7L#C(j3fs}P1N2JwxIl|Z;7_|i zp=Un>f#NzCn;Qfa_o0*YF;K9(JNRJ;=leu@pvY(wF`Z@iCSK{ItOq3#C>{m)7hyEj zb$k@Ko$8VkeiYOXd&IdLeF%tkI?3-!H+_k~4VJe>OhH<5AGgue^fGTky2o@U`| z%)*rP;%VF3N;P}WOu)vuJD;VW3GfZ#&*}J~Z5vi9kvKX!;>oc6<(^&*aqa;>4|mDz zecfziJ`AG;_^KZ)Z)T?H5riPpZF;|UJG8s$lqlk+8C(%K(ED68hNX1fH8%EcP=^$u zYwZ0d{M5R diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Transfer.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Datatransfer/V1/Transfer.php deleted file mode 100644 index 385f1d373ad22e6a7f7da82a5d7a30fd29d42e10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4804 zcmbVQOLH5?5f(s^0vdd2WSJ|Pk=C$fQ7#2AVa0Z>BD?Tdk|>)X0)Uk5plY*N48V=S z-OWBI(=MKJN#&BYE|$tG!b-Jff=SyP<2jBefR|2GmzA_t>*X)Gw%NZC`EdcT~Mr@4Shs zfgAZ2)zqQu4o9?TjoheT?AgOVMbtkn_RY`?ebWgLq1~kP0ud+ac~5Q);HoMPAN>tV!$I1uil$o4W*l7fxEK;&tqT4 z>ud44?^%e<93~d>@4>2mY}%uyPm$de`4W%~c#S${Z$ym&u0%dHC=*dqYHBl+|9c8n z+SU>6MXImdG=>#db4#WHBEe&mor%{=BXBNW!saWYn_q?H^DfAj;MN7klQ-ZNc7h=48Tc#eGUl7G zF~13!gMj*VXW$Y7^OGFS?q2&#DpkqAf=Jx_KeDha8%))82KJELgzKzr38>24kL3(e z;q^Y&F5AJL<2nW-Z$LxC?knv42ufaqMND&VWS$yanVmFCUWa8SYlvdYo#Fk#>{X9$rOcyd>}zylDIMfBt;M4)-0lNQc~`5 z(4=gb0Y#FjpzyHWIVT>zWW@VcN!>*h&|5^7uSZqvV@;x$YaPw9%@m+@9W%z zEAoYfXO4UTOAh@yH2laBdYNQ;yD-lx9#sJ4mrIWm`cLKyYcEt-umU$COgI+d9AeF3 zdh*D#Eb-}(W#%$|o)yw>!X3vA?SXBHe2Nn}bUoWrR+t=V!A+jEhBv9c3c;mZ>BEF( zzEHgP0Nm$z5yT7Az*XMhV8w)Bl1}^pyD20Q`2#4}6#P@3gNDV)6X7kB9d?6*f1D6p zAHxU=#wg?+q^|F~zM^tCBH^%AAwO8F;^t`Ir+zAbmx7Y)t}N}wH&M|^u&)LMyyX^U z@M5w*M#BA(T47N9HhwxAUt)y_u1Ku-kY}WRf!4?s(L{Oqm;kD>1i7iw!d{I@kn(%5 zcA0ZZu=v$+V0=a6io;rPuCyV2G+jur*&dpsh~|G@fShzdD{?L>bz87BE(W|KzqDqv z3O{BZW73r!nQX!$530ea7X`}g%VJC3KX)@oSPQnMt_Q5xUTKV=<4n<6NT&5DVF?#| z+`qbm2wGi}Wn-#g@S-m;svB#vB;LkB=crEnp@RVOcmP^}`_%CVxGkX_e8`?1%yU2`f!Jf)5 z>Dl}Ntjr3ku(7AN+vOeIXzPc1tKRv-IB2w+dbPe?*K4cSNCvLg8{7MfF1Z!lJaNbLvs@E4b5Xl^gACy=8R1XzDY7s97m@s=J7|1le|{ zrI+_O=6YI5y&J%i1mm5V+=cZqTDw#3%)+5nO}$YQR^dzQputU?*L!mQ^`Ghaooc1l`FHyM4j-`;s%*qkz!A&u*tn)p!^S9mR5;xFLCSUGSqvM- zaLF#8#z@gFj$?jGKNOgn#z8d=W%&?D)23lH?QpBNz`M`;55`}jABlm-)O>_hf7`lX OHo_&v1mg_O0Db|}&Luzq diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsRequest.php deleted file mode 100644 index afd08a0f7a9d..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest - */ -class CheckValidCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The data source in the form: - * `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The data source in the form: - * `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. Please see - * {@see DataTransferServiceClient::dataSourceName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\CheckValidCredsRequest - * - * @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 data source in the form: - * `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The data source in the form: - * `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_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 data source in the form: - * `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsResponse.php deleted file mode 100644 index ed8cc0aece07..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CheckValidCredsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse - */ -class CheckValidCredsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * If set to `true`, the credentials exist and are valid. - * - * Generated from protobuf field bool has_valid_creds = 1; - */ - protected $has_valid_creds = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $has_valid_creds - * If set to `true`, the credentials exist and are valid. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * If set to `true`, the credentials exist and are valid. - * - * Generated from protobuf field bool has_valid_creds = 1; - * @return bool - */ - public function getHasValidCreds() - { - return $this->has_valid_creds; - } - - /** - * If set to `true`, the credentials exist and are valid. - * - * Generated from protobuf field bool has_valid_creds = 1; - * @param bool $var - * @return $this - */ - public function setHasValidCreds($var) - { - GPBUtil::checkBool($var); - $this->has_valid_creds = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CreateTransferConfigRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CreateTransferConfigRequest.php deleted file mode 100644 index ce1cd4587f87..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/CreateTransferConfigRequest.php +++ /dev/null @@ -1,403 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest - */ -class CreateTransferConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The BigQuery project id where the transfer configuration should - * be created. Must be in the format - * projects/{project_id}/locations/{location_id} or projects/{project_id}. If - * specified location and location of the destination bigquery dataset do not - * match - the request will fail. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Data transfer configuration to create. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transfer_config = null; - /** - * Deprecated: Authorization code was required when - * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - * in any data sources. Use `version_info` instead. - * Optional OAuth2 authorization code to use with this transfer configuration. - * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - * and new credentials are needed, as indicated by `CheckValidCreds`. In order - * to obtain authorization_code, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * create the transfer config. - * - * Generated from protobuf field string authorization_code = 3 [deprecated = true]; - * @deprecated - */ - protected $authorization_code = ''; - /** - * Optional version info. This parameter replaces `authorization_code` which - * is no longer used in any data sources. This is required only if - * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - * are needed, as indicated by `CheckValidCreds`. In order to obtain version - * info, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * create the transfer config. - * - * Generated from protobuf field string version_info = 5; - */ - protected $version_info = ''; - /** - * Optional service account email. If this field is set, the transfer config - * will be created with this service account's credentials. It requires that - * the requesting user calling this API has permissions to act as this service - * account. - * Note that not all data sources support service account credentials when - * creating a transfer config. For the latest list of data sources, read about - * [using service - * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - * - * Generated from protobuf field string service_account_name = 6; - */ - protected $service_account_name = ''; - - /** - * @param string $parent Required. The BigQuery project id where the transfer configuration should - * be created. Must be in the format - * projects/{project_id}/locations/{location_id} or projects/{project_id}. If - * specified location and location of the destination bigquery dataset do not - * match - the request will fail. Please see - * {@see DataTransferServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transferConfig Required. Data transfer configuration to create. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\CreateTransferConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transferConfig): self - { - return (new self()) - ->setParent($parent) - ->setTransferConfig($transferConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The BigQuery project id where the transfer configuration should - * be created. Must be in the format - * projects/{project_id}/locations/{location_id} or projects/{project_id}. If - * specified location and location of the destination bigquery dataset do not - * match - the request will fail. - * @type \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transfer_config - * Required. Data transfer configuration to create. - * @type string $authorization_code - * Deprecated: Authorization code was required when - * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - * in any data sources. Use `version_info` instead. - * Optional OAuth2 authorization code to use with this transfer configuration. - * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - * and new credentials are needed, as indicated by `CheckValidCreds`. In order - * to obtain authorization_code, make a request to the following URL: - *
-     *           https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-     *           
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * create the transfer config. - * @type string $version_info - * Optional version info. This parameter replaces `authorization_code` which - * is no longer used in any data sources. This is required only if - * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - * are needed, as indicated by `CheckValidCreds`. In order to obtain version - * info, make a request to the following URL: - *
-     *           https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-     *           
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * create the transfer config. - * @type string $service_account_name - * Optional service account email. If this field is set, the transfer config - * will be created with this service account's credentials. It requires that - * the requesting user calling this API has permissions to act as this service - * account. - * Note that not all data sources support service account credentials when - * creating a transfer config. For the latest list of data sources, read about - * [using service - * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The BigQuery project id where the transfer configuration should - * be created. Must be in the format - * projects/{project_id}/locations/{location_id} or projects/{project_id}. If - * specified location and location of the destination bigquery dataset do not - * match - the request will fail. - * - * 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 BigQuery project id where the transfer configuration should - * be created. Must be in the format - * projects/{project_id}/locations/{location_id} or projects/{project_id}. If - * specified location and location of the destination bigquery dataset do not - * match - the request will fail. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Data transfer configuration to create. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig|null - */ - public function getTransferConfig() - { - return $this->transfer_config; - } - - public function hasTransferConfig() - { - return isset($this->transfer_config); - } - - public function clearTransferConfig() - { - unset($this->transfer_config); - } - - /** - * Required. Data transfer configuration to create. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $var - * @return $this - */ - public function setTransferConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig::class); - $this->transfer_config = $var; - - return $this; - } - - /** - * Deprecated: Authorization code was required when - * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - * in any data sources. Use `version_info` instead. - * Optional OAuth2 authorization code to use with this transfer configuration. - * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - * and new credentials are needed, as indicated by `CheckValidCreds`. In order - * to obtain authorization_code, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * create the transfer config. - * - * Generated from protobuf field string authorization_code = 3 [deprecated = true]; - * @return string - * @deprecated - */ - public function getAuthorizationCode() - { - @trigger_error('authorization_code is deprecated.', E_USER_DEPRECATED); - return $this->authorization_code; - } - - /** - * Deprecated: Authorization code was required when - * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - * in any data sources. Use `version_info` instead. - * Optional OAuth2 authorization code to use with this transfer configuration. - * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - * and new credentials are needed, as indicated by `CheckValidCreds`. In order - * to obtain authorization_code, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * create the transfer config. - * - * Generated from protobuf field string authorization_code = 3 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setAuthorizationCode($var) - { - @trigger_error('authorization_code is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->authorization_code = $var; - - return $this; - } - - /** - * Optional version info. This parameter replaces `authorization_code` which - * is no longer used in any data sources. This is required only if - * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - * are needed, as indicated by `CheckValidCreds`. In order to obtain version - * info, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * create the transfer config. - * - * Generated from protobuf field string version_info = 5; - * @return string - */ - public function getVersionInfo() - { - return $this->version_info; - } - - /** - * Optional version info. This parameter replaces `authorization_code` which - * is no longer used in any data sources. This is required only if - * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - * are needed, as indicated by `CheckValidCreds`. In order to obtain version - * info, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * create the transfer config. - * - * Generated from protobuf field string version_info = 5; - * @param string $var - * @return $this - */ - public function setVersionInfo($var) - { - GPBUtil::checkString($var, True); - $this->version_info = $var; - - return $this; - } - - /** - * Optional service account email. If this field is set, the transfer config - * will be created with this service account's credentials. It requires that - * the requesting user calling this API has permissions to act as this service - * account. - * Note that not all data sources support service account credentials when - * creating a transfer config. For the latest list of data sources, read about - * [using service - * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - * - * Generated from protobuf field string service_account_name = 6; - * @return string - */ - public function getServiceAccountName() - { - return $this->service_account_name; - } - - /** - * Optional service account email. If this field is set, the transfer config - * will be created with this service account's credentials. It requires that - * the requesting user calling this API has permissions to act as this service - * account. - * Note that not all data sources support service account credentials when - * creating a transfer config. For the latest list of data sources, read about - * [using service - * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - * - * Generated from protobuf field string service_account_name = 6; - * @param string $var - * @return $this - */ - public function setServiceAccountName($var) - { - GPBUtil::checkString($var, True); - $this->service_account_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource.php deleted file mode 100644 index 830c728a8d39..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource.php +++ /dev/null @@ -1,721 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.DataSource - */ -class DataSource extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Data source resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Data source id. - * - * Generated from protobuf field string data_source_id = 2; - */ - protected $data_source_id = ''; - /** - * User friendly data source name. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * User friendly data source description string. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - /** - * Data source client id which should be used to receive refresh token. - * - * Generated from protobuf field string client_id = 5; - */ - protected $client_id = ''; - /** - * Api auth scopes for which refresh token needs to be obtained. These are - * scopes needed by a data source to prepare data and ingest them into - * BigQuery, e.g., https://www.googleapis.com/auth/bigquery - * - * Generated from protobuf field repeated string scopes = 6; - */ - private $scopes; - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferType transfer_type = 7 [deprecated = true]; - * @deprecated - */ - protected $transfer_type = 0; - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field bool supports_multiple_transfers = 8 [deprecated = true]; - * @deprecated - */ - protected $supports_multiple_transfers = false; - /** - * The number of seconds to wait for an update from the data source - * before the Data Transfer Service marks the transfer as FAILED. - * - * Generated from protobuf field int32 update_deadline_seconds = 9; - */ - protected $update_deadline_seconds = 0; - /** - * Default data transfer schedule. - * Examples of valid schedules include: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * - * Generated from protobuf field string default_schedule = 10; - */ - protected $default_schedule = ''; - /** - * Specifies whether the data source supports a user defined schedule, or - * operates on the default schedule. - * When set to `true`, user can override default schedule. - * - * Generated from protobuf field bool supports_custom_schedule = 11; - */ - protected $supports_custom_schedule = false; - /** - * Data source parameters. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter parameters = 12; - */ - private $parameters; - /** - * Url for the help document for this data source. - * - * Generated from protobuf field string help_url = 13; - */ - protected $help_url = ''; - /** - * Indicates the type of authorization. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType authorization_type = 14; - */ - protected $authorization_type = 0; - /** - * Specifies whether the data source supports automatic data refresh for the - * past few days, and how it's supported. - * For some data sources, data might not be complete until a few days later, - * so it's useful to refresh data automatically. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType data_refresh_type = 15; - */ - protected $data_refresh_type = 0; - /** - * Default data refresh window on days. - * Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. - * - * Generated from protobuf field int32 default_data_refresh_window_days = 16; - */ - protected $default_data_refresh_window_days = 0; - /** - * Disables backfilling and manual run scheduling - * for the data source. - * - * Generated from protobuf field bool manual_runs_disabled = 17; - */ - protected $manual_runs_disabled = false; - /** - * The minimum interval for scheduler to schedule runs. - * - * Generated from protobuf field .google.protobuf.Duration minimum_schedule_interval = 18; - */ - protected $minimum_schedule_interval = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Data source resource name. - * @type string $data_source_id - * Data source id. - * @type string $display_name - * User friendly data source name. - * @type string $description - * User friendly data source description string. - * @type string $client_id - * Data source client id which should be used to receive refresh token. - * @type array|\Google\Protobuf\Internal\RepeatedField $scopes - * Api auth scopes for which refresh token needs to be obtained. These are - * scopes needed by a data source to prepare data and ingest them into - * BigQuery, e.g., https://www.googleapis.com/auth/bigquery - * @type int $transfer_type - * Deprecated. This field has no effect. - * @type bool $supports_multiple_transfers - * Deprecated. This field has no effect. - * @type int $update_deadline_seconds - * The number of seconds to wait for an update from the data source - * before the Data Transfer Service marks the transfer as FAILED. - * @type string $default_schedule - * Default data transfer schedule. - * Examples of valid schedules include: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * @type bool $supports_custom_schedule - * Specifies whether the data source supports a user defined schedule, or - * operates on the default schedule. - * When set to `true`, user can override default schedule. - * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter>|\Google\Protobuf\Internal\RepeatedField $parameters - * Data source parameters. - * @type string $help_url - * Url for the help document for this data source. - * @type int $authorization_type - * Indicates the type of authorization. - * @type int $data_refresh_type - * Specifies whether the data source supports automatic data refresh for the - * past few days, and how it's supported. - * For some data sources, data might not be complete until a few days later, - * so it's useful to refresh data automatically. - * @type int $default_data_refresh_window_days - * Default data refresh window on days. - * Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. - * @type bool $manual_runs_disabled - * Disables backfilling and manual run scheduling - * for the data source. - * @type \Google\Protobuf\Duration $minimum_schedule_interval - * The minimum interval for scheduler to schedule runs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Data source resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Data source resource name. - * - * 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; - } - - /** - * Data source id. - * - * Generated from protobuf field string data_source_id = 2; - * @return string - */ - public function getDataSourceId() - { - return $this->data_source_id; - } - - /** - * Data source id. - * - * Generated from protobuf field string data_source_id = 2; - * @param string $var - * @return $this - */ - public function setDataSourceId($var) - { - GPBUtil::checkString($var, True); - $this->data_source_id = $var; - - return $this; - } - - /** - * User friendly data source name. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User friendly data source name. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * User friendly data source description string. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User friendly data source description string. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Data source client id which should be used to receive refresh token. - * - * Generated from protobuf field string client_id = 5; - * @return string - */ - public function getClientId() - { - return $this->client_id; - } - - /** - * Data source client id which should be used to receive refresh token. - * - * Generated from protobuf field string client_id = 5; - * @param string $var - * @return $this - */ - public function setClientId($var) - { - GPBUtil::checkString($var, True); - $this->client_id = $var; - - return $this; - } - - /** - * Api auth scopes for which refresh token needs to be obtained. These are - * scopes needed by a data source to prepare data and ingest them into - * BigQuery, e.g., https://www.googleapis.com/auth/bigquery - * - * Generated from protobuf field repeated string scopes = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScopes() - { - return $this->scopes; - } - - /** - * Api auth scopes for which refresh token needs to be obtained. These are - * scopes needed by a data source to prepare data and ingest them into - * BigQuery, e.g., https://www.googleapis.com/auth/bigquery - * - * Generated from protobuf field repeated string scopes = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scopes = $arr; - - return $this; - } - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferType transfer_type = 7 [deprecated = true]; - * @return int - * @deprecated - */ - public function getTransferType() - { - @trigger_error('transfer_type is deprecated.', E_USER_DEPRECATED); - return $this->transfer_type; - } - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferType transfer_type = 7 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setTransferType($var) - { - @trigger_error('transfer_type is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferType::class); - $this->transfer_type = $var; - - return $this; - } - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field bool supports_multiple_transfers = 8 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getSupportsMultipleTransfers() - { - @trigger_error('supports_multiple_transfers is deprecated.', E_USER_DEPRECATED); - return $this->supports_multiple_transfers; - } - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field bool supports_multiple_transfers = 8 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setSupportsMultipleTransfers($var) - { - @trigger_error('supports_multiple_transfers is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->supports_multiple_transfers = $var; - - return $this; - } - - /** - * The number of seconds to wait for an update from the data source - * before the Data Transfer Service marks the transfer as FAILED. - * - * Generated from protobuf field int32 update_deadline_seconds = 9; - * @return int - */ - public function getUpdateDeadlineSeconds() - { - return $this->update_deadline_seconds; - } - - /** - * The number of seconds to wait for an update from the data source - * before the Data Transfer Service marks the transfer as FAILED. - * - * Generated from protobuf field int32 update_deadline_seconds = 9; - * @param int $var - * @return $this - */ - public function setUpdateDeadlineSeconds($var) - { - GPBUtil::checkInt32($var); - $this->update_deadline_seconds = $var; - - return $this; - } - - /** - * Default data transfer schedule. - * Examples of valid schedules include: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * - * Generated from protobuf field string default_schedule = 10; - * @return string - */ - public function getDefaultSchedule() - { - return $this->default_schedule; - } - - /** - * Default data transfer schedule. - * Examples of valid schedules include: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * - * Generated from protobuf field string default_schedule = 10; - * @param string $var - * @return $this - */ - public function setDefaultSchedule($var) - { - GPBUtil::checkString($var, True); - $this->default_schedule = $var; - - return $this; - } - - /** - * Specifies whether the data source supports a user defined schedule, or - * operates on the default schedule. - * When set to `true`, user can override default schedule. - * - * Generated from protobuf field bool supports_custom_schedule = 11; - * @return bool - */ - public function getSupportsCustomSchedule() - { - return $this->supports_custom_schedule; - } - - /** - * Specifies whether the data source supports a user defined schedule, or - * operates on the default schedule. - * When set to `true`, user can override default schedule. - * - * Generated from protobuf field bool supports_custom_schedule = 11; - * @param bool $var - * @return $this - */ - public function setSupportsCustomSchedule($var) - { - GPBUtil::checkBool($var); - $this->supports_custom_schedule = $var; - - return $this; - } - - /** - * Data source parameters. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter parameters = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Data source parameters. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter parameters = 12; - * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter::class); - $this->parameters = $arr; - - return $this; - } - - /** - * Url for the help document for this data source. - * - * Generated from protobuf field string help_url = 13; - * @return string - */ - public function getHelpUrl() - { - return $this->help_url; - } - - /** - * Url for the help document for this data source. - * - * Generated from protobuf field string help_url = 13; - * @param string $var - * @return $this - */ - public function setHelpUrl($var) - { - GPBUtil::checkString($var, True); - $this->help_url = $var; - - return $this; - } - - /** - * Indicates the type of authorization. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType authorization_type = 14; - * @return int - */ - public function getAuthorizationType() - { - return $this->authorization_type; - } - - /** - * Indicates the type of authorization. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType authorization_type = 14; - * @param int $var - * @return $this - */ - public function setAuthorizationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource\AuthorizationType::class); - $this->authorization_type = $var; - - return $this; - } - - /** - * Specifies whether the data source supports automatic data refresh for the - * past few days, and how it's supported. - * For some data sources, data might not be complete until a few days later, - * so it's useful to refresh data automatically. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType data_refresh_type = 15; - * @return int - */ - public function getDataRefreshType() - { - return $this->data_refresh_type; - } - - /** - * Specifies whether the data source supports automatic data refresh for the - * past few days, and how it's supported. - * For some data sources, data might not be complete until a few days later, - * so it's useful to refresh data automatically. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType data_refresh_type = 15; - * @param int $var - * @return $this - */ - public function setDataRefreshType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource\DataRefreshType::class); - $this->data_refresh_type = $var; - - return $this; - } - - /** - * Default data refresh window on days. - * Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. - * - * Generated from protobuf field int32 default_data_refresh_window_days = 16; - * @return int - */ - public function getDefaultDataRefreshWindowDays() - { - return $this->default_data_refresh_window_days; - } - - /** - * Default data refresh window on days. - * Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. - * - * Generated from protobuf field int32 default_data_refresh_window_days = 16; - * @param int $var - * @return $this - */ - public function setDefaultDataRefreshWindowDays($var) - { - GPBUtil::checkInt32($var); - $this->default_data_refresh_window_days = $var; - - return $this; - } - - /** - * Disables backfilling and manual run scheduling - * for the data source. - * - * Generated from protobuf field bool manual_runs_disabled = 17; - * @return bool - */ - public function getManualRunsDisabled() - { - return $this->manual_runs_disabled; - } - - /** - * Disables backfilling and manual run scheduling - * for the data source. - * - * Generated from protobuf field bool manual_runs_disabled = 17; - * @param bool $var - * @return $this - */ - public function setManualRunsDisabled($var) - { - GPBUtil::checkBool($var); - $this->manual_runs_disabled = $var; - - return $this; - } - - /** - * The minimum interval for scheduler to schedule runs. - * - * Generated from protobuf field .google.protobuf.Duration minimum_schedule_interval = 18; - * @return \Google\Protobuf\Duration|null - */ - public function getMinimumScheduleInterval() - { - return $this->minimum_schedule_interval; - } - - public function hasMinimumScheduleInterval() - { - return isset($this->minimum_schedule_interval); - } - - public function clearMinimumScheduleInterval() - { - unset($this->minimum_schedule_interval); - } - - /** - * The minimum interval for scheduler to schedule runs. - * - * Generated from protobuf field .google.protobuf.Duration minimum_schedule_interval = 18; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinimumScheduleInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->minimum_schedule_interval = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/AuthorizationType.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/AuthorizationType.php deleted file mode 100644 index 4bef94c57096..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/AuthorizationType.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType - */ -class AuthorizationType -{ - /** - * Type unspecified. - * - * Generated from protobuf enum AUTHORIZATION_TYPE_UNSPECIFIED = 0; - */ - const AUTHORIZATION_TYPE_UNSPECIFIED = 0; - /** - * Use OAuth 2 authorization codes that can be exchanged - * for a refresh token on the backend. - * - * Generated from protobuf enum AUTHORIZATION_CODE = 1; - */ - const AUTHORIZATION_CODE = 1; - /** - * Return an authorization code for a given Google+ page that can then be - * exchanged for a refresh token on the backend. - * - * Generated from protobuf enum GOOGLE_PLUS_AUTHORIZATION_CODE = 2; - */ - const GOOGLE_PLUS_AUTHORIZATION_CODE = 2; - /** - * Use First Party OAuth. - * - * Generated from protobuf enum FIRST_PARTY_OAUTH = 3; - */ - const FIRST_PARTY_OAUTH = 3; - - private static $valueToName = [ - self::AUTHORIZATION_TYPE_UNSPECIFIED => 'AUTHORIZATION_TYPE_UNSPECIFIED', - self::AUTHORIZATION_CODE => 'AUTHORIZATION_CODE', - self::GOOGLE_PLUS_AUTHORIZATION_CODE => 'GOOGLE_PLUS_AUTHORIZATION_CODE', - self::FIRST_PARTY_OAUTH => 'FIRST_PARTY_OAUTH', - ]; - - 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(AuthorizationType::class, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource_AuthorizationType::class); - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/DataRefreshType.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/DataRefreshType.php deleted file mode 100644 index 2af897748a1f..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSource/DataRefreshType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType - */ -class DataRefreshType -{ - /** - * The data source won't support data auto refresh, which is default value. - * - * Generated from protobuf enum DATA_REFRESH_TYPE_UNSPECIFIED = 0; - */ - const DATA_REFRESH_TYPE_UNSPECIFIED = 0; - /** - * The data source supports data auto refresh, and runs will be scheduled - * for the past few days. Does not allow custom values to be set for each - * transfer config. - * - * Generated from protobuf enum SLIDING_WINDOW = 1; - */ - const SLIDING_WINDOW = 1; - /** - * The data source supports data auto refresh, and runs will be scheduled - * for the past few days. Allows custom values to be set for each transfer - * config. - * - * Generated from protobuf enum CUSTOM_SLIDING_WINDOW = 2; - */ - const CUSTOM_SLIDING_WINDOW = 2; - - private static $valueToName = [ - self::DATA_REFRESH_TYPE_UNSPECIFIED => 'DATA_REFRESH_TYPE_UNSPECIFIED', - self::SLIDING_WINDOW => 'SLIDING_WINDOW', - self::CUSTOM_SLIDING_WINDOW => 'CUSTOM_SLIDING_WINDOW', - ]; - - 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(DataRefreshType::class, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource_DataRefreshType::class); - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter.php deleted file mode 100644 index e58593a0ab3d..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter.php +++ /dev/null @@ -1,659 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.DataSourceParameter - */ -class DataSourceParameter extends \Google\Protobuf\Internal\Message -{ - /** - * Parameter identifier. - * - * Generated from protobuf field string param_id = 1; - */ - protected $param_id = ''; - /** - * Parameter display name in the user interface. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Parameter description. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Parameter type. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type type = 4; - */ - protected $type = 0; - /** - * Is parameter required. - * - * Generated from protobuf field bool required = 5; - */ - protected $required = false; - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field bool repeated = 6; - */ - protected $repeated = false; - /** - * Regular expression which can be used for parameter validation. - * - * Generated from protobuf field string validation_regex = 7; - */ - protected $validation_regex = ''; - /** - * All possible values for the parameter. - * - * Generated from protobuf field repeated string allowed_values = 8; - */ - private $allowed_values; - /** - * For integer and double values specifies minimum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; - */ - protected $min_value = null; - /** - * For integer and double values specifies maximum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; - */ - protected $max_value = null; - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter fields = 11; - */ - private $fields; - /** - * Description of the requirements for this field, in case the user input does - * not fulfill the regex pattern or min/max values. - * - * Generated from protobuf field string validation_description = 12; - */ - protected $validation_description = ''; - /** - * URL to a help document to further explain the naming requirements. - * - * Generated from protobuf field string validation_help_url = 13; - */ - protected $validation_help_url = ''; - /** - * Cannot be changed after initial creation. - * - * Generated from protobuf field bool immutable = 14; - */ - protected $immutable = false; - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field bool recurse = 15; - */ - protected $recurse = false; - /** - * If true, it should not be used in new transfers, and it should not be - * visible to users. - * - * Generated from protobuf field bool deprecated = 20; - */ - protected $deprecated = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $param_id - * Parameter identifier. - * @type string $display_name - * Parameter display name in the user interface. - * @type string $description - * Parameter description. - * @type int $type - * Parameter type. - * @type bool $required - * Is parameter required. - * @type bool $repeated - * Deprecated. This field has no effect. - * @type string $validation_regex - * Regular expression which can be used for parameter validation. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_values - * All possible values for the parameter. - * @type \Google\Protobuf\DoubleValue $min_value - * For integer and double values specifies minimum allowed value. - * @type \Google\Protobuf\DoubleValue $max_value - * For integer and double values specifies maximum allowed value. - * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter>|\Google\Protobuf\Internal\RepeatedField $fields - * Deprecated. This field has no effect. - * @type string $validation_description - * Description of the requirements for this field, in case the user input does - * not fulfill the regex pattern or min/max values. - * @type string $validation_help_url - * URL to a help document to further explain the naming requirements. - * @type bool $immutable - * Cannot be changed after initial creation. - * @type bool $recurse - * Deprecated. This field has no effect. - * @type bool $deprecated - * If true, it should not be used in new transfers, and it should not be - * visible to users. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Parameter identifier. - * - * Generated from protobuf field string param_id = 1; - * @return string - */ - public function getParamId() - { - return $this->param_id; - } - - /** - * Parameter identifier. - * - * Generated from protobuf field string param_id = 1; - * @param string $var - * @return $this - */ - public function setParamId($var) - { - GPBUtil::checkString($var, True); - $this->param_id = $var; - - return $this; - } - - /** - * Parameter display name in the user interface. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Parameter display name in the user interface. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Parameter description. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Parameter description. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Parameter type. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type type = 4; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Parameter type. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type type = 4; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Is parameter required. - * - * Generated from protobuf field bool required = 5; - * @return bool - */ - public function getRequired() - { - return $this->required; - } - - /** - * Is parameter required. - * - * Generated from protobuf field bool required = 5; - * @param bool $var - * @return $this - */ - public function setRequired($var) - { - GPBUtil::checkBool($var); - $this->required = $var; - - return $this; - } - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field bool repeated = 6; - * @return bool - */ - public function getRepeated() - { - return $this->repeated; - } - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field bool repeated = 6; - * @param bool $var - * @return $this - */ - public function setRepeated($var) - { - GPBUtil::checkBool($var); - $this->repeated = $var; - - return $this; - } - - /** - * Regular expression which can be used for parameter validation. - * - * Generated from protobuf field string validation_regex = 7; - * @return string - */ - public function getValidationRegex() - { - return $this->validation_regex; - } - - /** - * Regular expression which can be used for parameter validation. - * - * Generated from protobuf field string validation_regex = 7; - * @param string $var - * @return $this - */ - public function setValidationRegex($var) - { - GPBUtil::checkString($var, True); - $this->validation_regex = $var; - - return $this; - } - - /** - * All possible values for the parameter. - * - * Generated from protobuf field repeated string allowed_values = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedValues() - { - return $this->allowed_values; - } - - /** - * All possible values for the parameter. - * - * Generated from protobuf field repeated string allowed_values = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_values = $arr; - - return $this; - } - - /** - * For integer and double values specifies minimum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getMinValue() - { - return $this->min_value; - } - - public function hasMinValue() - { - return isset($this->min_value); - } - - public function clearMinValue() - { - unset($this->min_value); - } - - /** - * Returns the unboxed value from getMinValue() - - * For integer and double values specifies minimum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; - * @return float|null - */ - public function getMinValueUnwrapped() - { - return $this->readWrapperValue("min_value"); - } - - /** - * For integer and double values specifies minimum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setMinValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->min_value = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * For integer and double values specifies minimum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue min_value = 9; - * @param float|null $var - * @return $this - */ - public function setMinValueUnwrapped($var) - { - $this->writeWrapperValue("min_value", $var); - return $this;} - - /** - * For integer and double values specifies maximum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getMaxValue() - { - return $this->max_value; - } - - public function hasMaxValue() - { - return isset($this->max_value); - } - - public function clearMaxValue() - { - unset($this->max_value); - } - - /** - * Returns the unboxed value from getMaxValue() - - * For integer and double values specifies maximum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; - * @return float|null - */ - public function getMaxValueUnwrapped() - { - return $this->readWrapperValue("max_value"); - } - - /** - * For integer and double values specifies maximum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setMaxValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->max_value = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * For integer and double values specifies maximum allowed value. - * - * Generated from protobuf field .google.protobuf.DoubleValue max_value = 10; - * @param float|null $var - * @return $this - */ - public function setMaxValueUnwrapped($var) - { - $this->writeWrapperValue("max_value", $var); - return $this;} - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter fields = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSourceParameter fields = 11; - * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter::class); - $this->fields = $arr; - - return $this; - } - - /** - * Description of the requirements for this field, in case the user input does - * not fulfill the regex pattern or min/max values. - * - * Generated from protobuf field string validation_description = 12; - * @return string - */ - public function getValidationDescription() - { - return $this->validation_description; - } - - /** - * Description of the requirements for this field, in case the user input does - * not fulfill the regex pattern or min/max values. - * - * Generated from protobuf field string validation_description = 12; - * @param string $var - * @return $this - */ - public function setValidationDescription($var) - { - GPBUtil::checkString($var, True); - $this->validation_description = $var; - - return $this; - } - - /** - * URL to a help document to further explain the naming requirements. - * - * Generated from protobuf field string validation_help_url = 13; - * @return string - */ - public function getValidationHelpUrl() - { - return $this->validation_help_url; - } - - /** - * URL to a help document to further explain the naming requirements. - * - * Generated from protobuf field string validation_help_url = 13; - * @param string $var - * @return $this - */ - public function setValidationHelpUrl($var) - { - GPBUtil::checkString($var, True); - $this->validation_help_url = $var; - - return $this; - } - - /** - * Cannot be changed after initial creation. - * - * Generated from protobuf field bool immutable = 14; - * @return bool - */ - public function getImmutable() - { - return $this->immutable; - } - - /** - * Cannot be changed after initial creation. - * - * Generated from protobuf field bool immutable = 14; - * @param bool $var - * @return $this - */ - public function setImmutable($var) - { - GPBUtil::checkBool($var); - $this->immutable = $var; - - return $this; - } - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field bool recurse = 15; - * @return bool - */ - public function getRecurse() - { - return $this->recurse; - } - - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf field bool recurse = 15; - * @param bool $var - * @return $this - */ - public function setRecurse($var) - { - GPBUtil::checkBool($var); - $this->recurse = $var; - - return $this; - } - - /** - * If true, it should not be used in new transfers, and it should not be - * visible to users. - * - * Generated from protobuf field bool deprecated = 20; - * @return bool - */ - public function getDeprecated() - { - return $this->deprecated; - } - - /** - * If true, it should not be used in new transfers, and it should not be - * visible to users. - * - * Generated from protobuf field bool deprecated = 20; - * @param bool $var - * @return $this - */ - public function setDeprecated($var) - { - GPBUtil::checkBool($var); - $this->deprecated = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter/Type.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter/Type.php deleted file mode 100644 index 8804827735b1..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DataSourceParameter/Type.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type - */ -class Type -{ - /** - * Type unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * String parameter. - * - * Generated from protobuf enum STRING = 1; - */ - const STRING = 1; - /** - * Integer parameter (64-bits). - * Will be serialized to json as string. - * - * Generated from protobuf enum INTEGER = 2; - */ - const INTEGER = 2; - /** - * Double precision floating point parameter. - * - * Generated from protobuf enum DOUBLE = 3; - */ - const DOUBLE = 3; - /** - * Boolean parameter. - * - * Generated from protobuf enum BOOLEAN = 4; - */ - const BOOLEAN = 4; - /** - * Deprecated. This field has no effect. - * - * Generated from protobuf enum RECORD = 5; - */ - const RECORD = 5; - /** - * Page ID for a Google+ Page. - * - * Generated from protobuf enum PLUS_PAGE = 6; - */ - const PLUS_PAGE = 6; - /** - * List of strings parameter. - * - * Generated from protobuf enum LIST = 7; - */ - const PBLIST = 7; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::STRING => 'STRING', - self::INTEGER => 'INTEGER', - self::DOUBLE => 'DOUBLE', - self::BOOLEAN => 'BOOLEAN', - self::RECORD => 'RECORD', - self::PLUS_PAGE => 'PLUS_PAGE', - self::PBLIST => 'LIST', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceParameter_Type::class); - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferConfigRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferConfigRequest.php deleted file mode 100644 index d2ac100033aa..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferConfigRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest - */ -class DeleteTransferConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - * Please see {@see DataTransferServiceClient::transferConfigName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\DeleteTransferConfigRequest - * - * @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 field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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 field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferRunRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferRunRequest.php deleted file mode 100644 index 41fde560161f..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/DeleteTransferRunRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest - */ -class DeleteTransferRunRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - * Please see {@see DataTransferServiceClient::runName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\DeleteTransferRunRequest - * - * @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 field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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 field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EmailPreferences.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EmailPreferences.php deleted file mode 100644 index 4c1edcba0238..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EmailPreferences.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.EmailPreferences - */ -class EmailPreferences extends \Google\Protobuf\Internal\Message -{ - /** - * If true, email notifications will be sent on transfer run failures. - * - * Generated from protobuf field bool enable_failure_email = 1; - */ - protected $enable_failure_email = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_failure_email - * If true, email notifications will be sent on transfer run failures. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * If true, email notifications will be sent on transfer run failures. - * - * Generated from protobuf field bool enable_failure_email = 1; - * @return bool - */ - public function getEnableFailureEmail() - { - return $this->enable_failure_email; - } - - /** - * If true, email notifications will be sent on transfer run failures. - * - * Generated from protobuf field bool enable_failure_email = 1; - * @param bool $var - * @return $this - */ - public function setEnableFailureEmail($var) - { - GPBUtil::checkBool($var); - $this->enable_failure_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EncryptionConfiguration.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EncryptionConfiguration.php deleted file mode 100644 index 2aa88ac83724..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EncryptionConfiguration.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration - */ -class EncryptionConfiguration extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the KMS key used for encrypting BigQuery data. - * - * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; - */ - protected $kms_key_name = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\StringValue $kms_key_name - * The name of the KMS key used for encrypting BigQuery data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * The name of the KMS key used for encrypting BigQuery data. - * - * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; - * @return \Google\Protobuf\StringValue|null - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - public function hasKmsKeyName() - { - return isset($this->kms_key_name); - } - - public function clearKmsKeyName() - { - unset($this->kms_key_name); - } - - /** - * Returns the unboxed value from getKmsKeyName() - - * The name of the KMS key used for encrypting BigQuery data. - * - * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; - * @return string|null - */ - public function getKmsKeyNameUnwrapped() - { - return $this->readWrapperValue("kms_key_name"); - } - - /** - * The name of the KMS key used for encrypting BigQuery data. - * - * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * The name of the KMS key used for encrypting BigQuery data. - * - * Generated from protobuf field .google.protobuf.StringValue kms_key_name = 1; - * @param string|null $var - * @return $this - */ - public function setKmsKeyNameUnwrapped($var) - { - $this->writeWrapperValue("kms_key_name", $var); - return $this;} - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EnrollDataSourcesRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EnrollDataSourcesRequest.php deleted file mode 100644 index 851958ec1cb3..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EnrollDataSourcesRequest.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest - */ -class EnrollDataSourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project resource in the form: - * `projects/{project_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Data sources that are enrolled. It is required to provide at least one - * data source id. - * - * Generated from protobuf field repeated string data_source_ids = 2; - */ - private $data_source_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the project resource in the form: - * `projects/{project_id}` - * @type array|\Google\Protobuf\Internal\RepeatedField $data_source_ids - * Data sources that are enrolled. It is required to provide at least one - * data source id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project resource in the form: - * `projects/{project_id}` - * - * 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 project resource in the form: - * `projects/{project_id}` - * - * 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; - } - - /** - * Data sources that are enrolled. It is required to provide at least one - * data source id. - * - * Generated from protobuf field repeated string data_source_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataSourceIds() - { - return $this->data_source_ids; - } - - /** - * Data sources that are enrolled. It is required to provide at least one - * data source id. - * - * Generated from protobuf field repeated string data_source_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataSourceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_source_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EventDrivenSchedule.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EventDrivenSchedule.php deleted file mode 100644 index 31a5153fcb4d..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/EventDrivenSchedule.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule - */ -class EventDrivenSchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Pub/Sub subscription name used to receive events. - * Only Google Cloud Storage data source support this option. - * Format: projects/{project}/subscriptions/{subscription} - * - * Generated from protobuf field string pubsub_subscription = 1; - */ - protected $pubsub_subscription = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pubsub_subscription - * Pub/Sub subscription name used to receive events. - * Only Google Cloud Storage data source support this option. - * Format: projects/{project}/subscriptions/{subscription} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Pub/Sub subscription name used to receive events. - * Only Google Cloud Storage data source support this option. - * Format: projects/{project}/subscriptions/{subscription} - * - * Generated from protobuf field string pubsub_subscription = 1; - * @return string - */ - public function getPubsubSubscription() - { - return $this->pubsub_subscription; - } - - /** - * Pub/Sub subscription name used to receive events. - * Only Google Cloud Storage data source support this option. - * Format: projects/{project}/subscriptions/{subscription} - * - * Generated from protobuf field string pubsub_subscription = 1; - * @param string $var - * @return $this - */ - public function setPubsubSubscription($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_subscription = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetDataSourceRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetDataSourceRequest.php deleted file mode 100644 index 4a1ca8890805..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetDataSourceRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest - */ -class GetDataSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` - * Please see {@see DataTransferServiceClient::dataSourceName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\GetDataSourceRequest - * - * @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 field will contain name of the resource requested, for - * example: `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_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 field will contain name of the resource requested, for - * example: `projects/{project_id}/dataSources/{data_source_id}` or - * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferConfigRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferConfigRequest.php deleted file mode 100644 index 3b5e8a4ce8d1..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferConfigRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest - */ -class GetTransferConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - * Please see {@see DataTransferServiceClient::transferConfigName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\GetTransferConfigRequest - * - * @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 field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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 field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferRunRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferRunRequest.php deleted file mode 100644 index a86266124d87..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/GetTransferRunRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest - */ -class GetTransferRunRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - * Please see {@see DataTransferServiceClient::runName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\GetTransferRunRequest - * - * @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 field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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 field will contain name of the resource requested, for - * example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - * or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesRequest.php deleted file mode 100644 index 2523d66f0527..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest - */ -class ListDataSourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The BigQuery project id for which data sources should be - * returned. Must be in the form: `projects/{project_id}` or - * `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Pagination token, which can be used to request a specific page - * of `ListDataSourcesRequest` list results. For multiple-page - * results, `ListDataSourcesResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The BigQuery project id for which data sources should be - * returned. Must be in the form: `projects/{project_id}` or - * `projects/{project_id}/locations/{location_id}` - * Please see {@see DataTransferServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\ListDataSourcesRequest - * - * @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 BigQuery project id for which data sources should be - * returned. Must be in the form: `projects/{project_id}` or - * `projects/{project_id}/locations/{location_id}` - * @type string $page_token - * Pagination token, which can be used to request a specific page - * of `ListDataSourcesRequest` list results. For multiple-page - * results, `ListDataSourcesResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * @type int $page_size - * Page size. The default page size is the maximum value of 1000 results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The BigQuery project id for which data sources should be - * returned. Must be in the form: `projects/{project_id}` or - * `projects/{project_id}/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 BigQuery project id for which data sources should be - * returned. Must be in the form: `projects/{project_id}` or - * `projects/{project_id}/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; - } - - /** - * Pagination token, which can be used to request a specific page - * of `ListDataSourcesRequest` list results. For multiple-page - * results, `ListDataSourcesResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Pagination token, which can be used to request a specific page - * of `ListDataSourcesRequest` list results. For multiple-page - * results, `ListDataSourcesResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesResponse.php deleted file mode 100644 index 9ca585c15ea9..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListDataSourcesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse - */ -class ListDataSourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of supported data sources and their transfer settings. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSource data_sources = 1; - */ - private $data_sources; - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListDataSourcesRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSource>|\Google\Protobuf\Internal\RepeatedField $data_sources - * List of supported data sources and their transfer settings. - * @type string $next_page_token - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListDataSourcesRequest.page_token` - * to request the next page of list results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * List of supported data sources and their transfer settings. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSource data_sources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataSources() - { - return $this->data_sources; - } - - /** - * List of supported data sources and their transfer settings. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.DataSource data_sources = 1; - * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\DataSource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\DataSource::class); - $this->data_sources = $arr; - - return $this; - } - - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListDataSourcesRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListDataSourcesRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsRequest.php deleted file mode 100644 index 7f7b9bc17914..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsRequest.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest - */ -class ListTransferConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The BigQuery project id for which transfer configs - * should be returned: `projects/{project_id}` or - * `projects/{project_id}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * When specified, only configurations of requested data sources are returned. - * - * Generated from protobuf field repeated string data_source_ids = 2; - */ - private $data_source_ids; - /** - * Pagination token, which can be used to request a specific page - * of `ListTransfersRequest` list results. For multiple-page - * results, `ListTransfersResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The BigQuery project id for which transfer configs - * should be returned: `projects/{project_id}` or - * `projects/{project_id}/locations/{location_id}` - * Please see {@see DataTransferServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferConfigsRequest - * - * @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 BigQuery project id for which transfer configs - * should be returned: `projects/{project_id}` or - * `projects/{project_id}/locations/{location_id}` - * @type array|\Google\Protobuf\Internal\RepeatedField $data_source_ids - * When specified, only configurations of requested data sources are returned. - * @type string $page_token - * Pagination token, which can be used to request a specific page - * of `ListTransfersRequest` list results. For multiple-page - * results, `ListTransfersResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * @type int $page_size - * Page size. The default page size is the maximum value of 1000 results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The BigQuery project id for which transfer configs - * should be returned: `projects/{project_id}` or - * `projects/{project_id}/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 BigQuery project id for which transfer configs - * should be returned: `projects/{project_id}` or - * `projects/{project_id}/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; - } - - /** - * When specified, only configurations of requested data sources are returned. - * - * Generated from protobuf field repeated string data_source_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataSourceIds() - { - return $this->data_source_ids; - } - - /** - * When specified, only configurations of requested data sources are returned. - * - * Generated from protobuf field repeated string data_source_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataSourceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_source_ids = $arr; - - return $this; - } - - /** - * Pagination token, which can be used to request a specific page - * of `ListTransfersRequest` list results. For multiple-page - * results, `ListTransfersResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Pagination token, which can be used to request a specific page - * of `ListTransfersRequest` list results. For multiple-page - * results, `ListTransfersResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsResponse.php deleted file mode 100644 index f22f3fea2555..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferConfigsResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse - */ -class ListTransferConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The stored pipeline transfer configurations. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_configs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $transfer_configs; - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListTransferConfigsRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig>|\Google\Protobuf\Internal\RepeatedField $transfer_configs - * Output only. The stored pipeline transfer configurations. - * @type string $next_page_token - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListTransferConfigsRequest.page_token` - * to request the next page of list results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The stored pipeline transfer configurations. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_configs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransferConfigs() - { - return $this->transfer_configs; - } - - /** - * Output only. The stored pipeline transfer configurations. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_configs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransferConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig::class); - $this->transfer_configs = $arr; - - return $this; - } - - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListTransferConfigsRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListTransferConfigsRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsRequest.php deleted file mode 100644 index e9afd5bb4fdd..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsRequest.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest - */ -class ListTransferLogsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Transfer run name in the form: - * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Pagination token, which can be used to request a specific page - * of `ListTransferLogsRequest` list results. For multiple-page - * results, `ListTransferLogsResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 5; - */ - protected $page_size = 0; - /** - * Message types to return. If not populated - INFO, WARNING and ERROR - * messages are returned. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity message_types = 6; - */ - private $message_types; - - /** - * @param string $parent Required. Transfer run name in the form: - * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - * Please see {@see DataTransferServiceClient::runName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferLogsRequest - * - * @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. Transfer run name in the form: - * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - * @type string $page_token - * Pagination token, which can be used to request a specific page - * of `ListTransferLogsRequest` list results. For multiple-page - * results, `ListTransferLogsResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * @type int $page_size - * Page size. The default page size is the maximum value of 1000 results. - * @type array|\Google\Protobuf\Internal\RepeatedField $message_types - * Message types to return. If not populated - INFO, WARNING and ERROR - * messages are returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. Transfer run name in the form: - * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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. Transfer run name in the form: - * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_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; - } - - /** - * Pagination token, which can be used to request a specific page - * of `ListTransferLogsRequest` list results. For multiple-page - * results, `ListTransferLogsResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Pagination token, which can be used to request a specific page - * of `ListTransferLogsRequest` list results. For multiple-page - * results, `ListTransferLogsResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 5; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 5; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Message types to return. If not populated - INFO, WARNING and ERROR - * messages are returned. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity message_types = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessageTypes() - { - return $this->message_types; - } - - /** - * Message types to return. If not populated - INFO, WARNING and ERROR - * messages are returned. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity message_types = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessageTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage\MessageSeverity::class); - $this->message_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsResponse.php deleted file mode 100644 index 4e34aaac630f..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferLogsResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse - */ -class ListTransferLogsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The stored pipeline transfer messages. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $transfer_messages; - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `GetTransferRunLogRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage>|\Google\Protobuf\Internal\RepeatedField $transfer_messages - * Output only. The stored pipeline transfer messages. - * @type string $next_page_token - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `GetTransferRunLogRequest.page_token` - * to request the next page of list results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The stored pipeline transfer messages. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransferMessages() - { - return $this->transfer_messages; - } - - /** - * Output only. The stored pipeline transfer messages. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage transfer_messages = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransferMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage::class); - $this->transfer_messages = $arr; - - return $this; - } - - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `GetTransferRunLogRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `GetTransferRunLogRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest.php deleted file mode 100644 index e167275131bf..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest.php +++ /dev/null @@ -1,248 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest - */ -class ListTransferRunsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of transfer configuration for which transfer runs should be - * retrieved. Format of transfer configuration resource name is: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * When specified, only transfer runs with requested states are returned. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferState states = 2; - */ - private $states; - /** - * Pagination token, which can be used to request a specific page - * of `ListTransferRunsRequest` list results. For multiple-page - * results, `ListTransferRunsResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * Indicates how run attempts are to be pulled. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt run_attempt = 5; - */ - protected $run_attempt = 0; - - /** - * @param string $parent Required. Name of transfer configuration for which transfer runs should be - * retrieved. Format of transfer configuration resource name is: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. Please see - * {@see DataTransferServiceClient::transferConfigName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsRequest - * - * @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. Name of transfer configuration for which transfer runs should be - * retrieved. Format of transfer configuration resource name is: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $states - * When specified, only transfer runs with requested states are returned. - * @type string $page_token - * Pagination token, which can be used to request a specific page - * of `ListTransferRunsRequest` list results. For multiple-page - * results, `ListTransferRunsResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * @type int $page_size - * Page size. The default page size is the maximum value of 1000 results. - * @type int $run_attempt - * Indicates how run attempts are to be pulled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of transfer configuration for which transfer runs should be - * retrieved. Format of transfer configuration resource name is: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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. Name of transfer configuration for which transfer runs should be - * retrieved. Format of transfer configuration resource name is: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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; - } - - /** - * When specified, only transfer runs with requested states are returned. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferState states = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStates() - { - return $this->states; - } - - /** - * When specified, only transfer runs with requested states are returned. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferState states = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class); - $this->states = $arr; - - return $this; - } - - /** - * Pagination token, which can be used to request a specific page - * of `ListTransferRunsRequest` list results. For multiple-page - * results, `ListTransferRunsResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Pagination token, which can be used to request a specific page - * of `ListTransferRunsRequest` list results. For multiple-page - * results, `ListTransferRunsResponse` outputs - * a `next_page` token, which can be used as the - * `page_token` value to request the next page of list results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Page size. The default page size is the maximum value of 1000 results. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Indicates how run attempts are to be pulled. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt run_attempt = 5; - * @return int - */ - public function getRunAttempt() - { - return $this->run_attempt; - } - - /** - * Indicates how run attempts are to be pulled. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt run_attempt = 5; - * @param int $var - * @return $this - */ - public function setRunAttempt($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsRequest\RunAttempt::class); - $this->run_attempt = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest/RunAttempt.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest/RunAttempt.php deleted file mode 100644 index 24ffa90187ad..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsRequest/RunAttempt.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt - */ -class RunAttempt -{ - /** - * All runs should be returned. - * - * Generated from protobuf enum RUN_ATTEMPT_UNSPECIFIED = 0; - */ - const RUN_ATTEMPT_UNSPECIFIED = 0; - /** - * Only latest run per day should be returned. - * - * Generated from protobuf enum LATEST = 1; - */ - const LATEST = 1; - - private static $valueToName = [ - self::RUN_ATTEMPT_UNSPECIFIED => 'RUN_ATTEMPT_UNSPECIFIED', - self::LATEST => 'LATEST', - ]; - - 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(RunAttempt::class, \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsRequest_RunAttempt::class); - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsResponse.php deleted file mode 100644 index d1be9c36e029..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ListTransferRunsResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse - */ -class ListTransferRunsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The stored pipeline transfer runs. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_runs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $transfer_runs; - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListTransferRunsRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $transfer_runs - * Output only. The stored pipeline transfer runs. - * @type string $next_page_token - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListTransferRunsRequest.page_token` - * to request the next page of list results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The stored pipeline transfer runs. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_runs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransferRuns() - { - return $this->transfer_runs; - } - - /** - * Output only. The stored pipeline transfer runs. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_runs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransferRuns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun::class); - $this->transfer_runs = $arr; - - return $this; - } - - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListTransferRunsRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The next-pagination token. For multiple-page list results, - * this token can be used as the - * `ListTransferRunsRequest.page_token` - * to request the next page of list results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ManualSchedule.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ManualSchedule.php deleted file mode 100644 index d63152a9d504..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ManualSchedule.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ManualSchedule - */ -class ManualSchedule extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptions.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptions.php deleted file mode 100644 index 35e0e40bc6dc..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptions.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ScheduleOptions - */ -class ScheduleOptions extends \Google\Protobuf\Internal\Message -{ - /** - * If true, automatic scheduling of data transfer runs for this configuration - * will be disabled. The runs can be started on ad-hoc basis using - * StartManualTransferRuns API. When automatic scheduling is disabled, the - * TransferConfig.schedule field will be ignored. - * - * Generated from protobuf field bool disable_auto_scheduling = 3; - */ - protected $disable_auto_scheduling = false; - /** - * Specifies time to start scheduling transfer runs. The first run will be - * scheduled at or after the start time according to a recurrence pattern - * defined in the schedule string. The start time can be changed at any - * moment. The time when a data transfer can be triggered manually is not - * limited by this option. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * Defines time to stop scheduling transfer runs. A transfer run cannot be - * scheduled at or after the end time. The end time can be changed at any - * moment. The time when a data transfer can be triggered manually is not - * limited by this option. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $disable_auto_scheduling - * If true, automatic scheduling of data transfer runs for this configuration - * will be disabled. The runs can be started on ad-hoc basis using - * StartManualTransferRuns API. When automatic scheduling is disabled, the - * TransferConfig.schedule field will be ignored. - * @type \Google\Protobuf\Timestamp $start_time - * Specifies time to start scheduling transfer runs. The first run will be - * scheduled at or after the start time according to a recurrence pattern - * defined in the schedule string. The start time can be changed at any - * moment. The time when a data transfer can be triggered manually is not - * limited by this option. - * @type \Google\Protobuf\Timestamp $end_time - * Defines time to stop scheduling transfer runs. A transfer run cannot be - * scheduled at or after the end time. The end time can be changed at any - * moment. The time when a data transfer can be triggered manually is not - * limited by this option. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * If true, automatic scheduling of data transfer runs for this configuration - * will be disabled. The runs can be started on ad-hoc basis using - * StartManualTransferRuns API. When automatic scheduling is disabled, the - * TransferConfig.schedule field will be ignored. - * - * Generated from protobuf field bool disable_auto_scheduling = 3; - * @return bool - */ - public function getDisableAutoScheduling() - { - return $this->disable_auto_scheduling; - } - - /** - * If true, automatic scheduling of data transfer runs for this configuration - * will be disabled. The runs can be started on ad-hoc basis using - * StartManualTransferRuns API. When automatic scheduling is disabled, the - * TransferConfig.schedule field will be ignored. - * - * Generated from protobuf field bool disable_auto_scheduling = 3; - * @param bool $var - * @return $this - */ - public function setDisableAutoScheduling($var) - { - GPBUtil::checkBool($var); - $this->disable_auto_scheduling = $var; - - return $this; - } - - /** - * Specifies time to start scheduling transfer runs. The first run will be - * scheduled at or after the start time according to a recurrence pattern - * defined in the schedule string. The start time can be changed at any - * moment. The time when a data transfer can be triggered manually is not - * limited by this option. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @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); - } - - /** - * Specifies time to start scheduling transfer runs. The first run will be - * scheduled at or after the start time according to a recurrence pattern - * defined in the schedule string. The start time can be changed at any - * moment. The time when a data transfer can be triggered manually is not - * limited by this option. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Defines time to stop scheduling transfer runs. A transfer run cannot be - * scheduled at or after the end time. The end time can be changed at any - * moment. The time when a data transfer can be triggered manually is not - * limited by this option. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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); - } - - /** - * Defines time to stop scheduling transfer runs. A transfer run cannot be - * scheduled at or after the end time. The end time can be changed at any - * moment. The time when a data transfer can be triggered manually is not - * limited by this option. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptionsV2.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptionsV2.php deleted file mode 100644 index 9f60741106c1..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleOptionsV2.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2 - */ -class ScheduleOptionsV2 extends \Google\Protobuf\Internal\Message -{ - protected $schedule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\DataTransfer\V1\TimeBasedSchedule $time_based_schedule - * Time based transfer schedule options. This is the default schedule - * option. - * @type \Google\Cloud\BigQuery\DataTransfer\V1\ManualSchedule $manual_schedule - * Manual transfer schedule. If set, the transfer run will not be - * auto-scheduled by the system, unless the client invokes - * StartManualTransferRuns. This is equivalent to - * disable_auto_scheduling = true. - * @type \Google\Cloud\BigQuery\DataTransfer\V1\EventDrivenSchedule $event_driven_schedule - * Event driven transfer schedule options. If set, the transfer will be - * scheduled upon events arrial. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Time based transfer schedule options. This is the default schedule - * option. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule time_based_schedule = 1; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\TimeBasedSchedule|null - */ - public function getTimeBasedSchedule() - { - return $this->readOneof(1); - } - - public function hasTimeBasedSchedule() - { - return $this->hasOneof(1); - } - - /** - * Time based transfer schedule options. This is the default schedule - * option. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule time_based_schedule = 1; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\TimeBasedSchedule $var - * @return $this - */ - public function setTimeBasedSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\TimeBasedSchedule::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Manual transfer schedule. If set, the transfer run will not be - * auto-scheduled by the system, unless the client invokes - * StartManualTransferRuns. This is equivalent to - * disable_auto_scheduling = true. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ManualSchedule manual_schedule = 2; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\ManualSchedule|null - */ - public function getManualSchedule() - { - return $this->readOneof(2); - } - - public function hasManualSchedule() - { - return $this->hasOneof(2); - } - - /** - * Manual transfer schedule. If set, the transfer run will not be - * auto-scheduled by the system, unless the client invokes - * StartManualTransferRuns. This is equivalent to - * disable_auto_scheduling = true. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ManualSchedule manual_schedule = 2; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\ManualSchedule $var - * @return $this - */ - public function setManualSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\ManualSchedule::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Event driven transfer schedule options. If set, the transfer will be - * scheduled upon events arrial. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule event_driven_schedule = 3; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\EventDrivenSchedule|null - */ - public function getEventDrivenSchedule() - { - return $this->readOneof(3); - } - - public function hasEventDrivenSchedule() - { - return $this->hasOneof(3); - } - - /** - * Event driven transfer schedule options. If set, the transfer will be - * scheduled upon events arrial. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule event_driven_schedule = 3; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\EventDrivenSchedule $var - * @return $this - */ - public function setEventDrivenSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\EventDrivenSchedule::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSchedule() - { - return $this->whichOneof("schedule"); - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsRequest.php deleted file mode 100644 index 8f0b713bd735..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest - */ -class ScheduleTransferRunsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Transfer configuration name in the form: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Start time of the range of transfer runs. For example, - * `"2017-05-25T00:00:00+00:00"`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_time = null; - /** - * Required. End time of the range of transfer runs. For example, - * `"2017-05-30T00:00:00+00:00"`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $end_time = null; - - /** - * @param string $parent Required. Transfer configuration name in the form: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. Please see - * {@see DataTransferServiceClient::transferConfigName()} for help formatting this field. - * @param \Google\Protobuf\Timestamp $startTime Required. Start time of the range of transfer runs. For example, - * `"2017-05-25T00:00:00+00:00"`. - * @param \Google\Protobuf\Timestamp $endTime Required. End time of the range of transfer runs. For example, - * `"2017-05-30T00:00:00+00:00"`. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleTransferRunsRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Protobuf\Timestamp $startTime, \Google\Protobuf\Timestamp $endTime): self - { - return (new self()) - ->setParent($parent) - ->setStartTime($startTime) - ->setEndTime($endTime); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Transfer configuration name in the form: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - * @type \Google\Protobuf\Timestamp $start_time - * Required. Start time of the range of transfer runs. For example, - * `"2017-05-25T00:00:00+00:00"`. - * @type \Google\Protobuf\Timestamp $end_time - * Required. End time of the range of transfer runs. For example, - * `"2017-05-30T00:00:00+00:00"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. Transfer configuration name in the form: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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. Transfer configuration name in the form: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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. Start time of the range of transfer runs. For example, - * `"2017-05-25T00:00:00+00:00"`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. Start time of the range of transfer runs. For example, - * `"2017-05-25T00:00:00+00:00"`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Required. End time of the range of transfer runs. For example, - * `"2017-05-30T00:00:00+00:00"`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. End time of the range of transfer runs. For example, - * `"2017-05-30T00:00:00+00:00"`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsResponse.php deleted file mode 100644 index 673793b8f344..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/ScheduleTransferRunsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse - */ -class ScheduleTransferRunsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transfer runs that were scheduled. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; - */ - private $runs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $runs - * The transfer runs that were scheduled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * The transfer runs that were scheduled. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRuns() - { - return $this->runs; - } - - /** - * The transfer runs that were scheduled. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; - * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRuns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun::class); - $this->runs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest.php deleted file mode 100644 index 2248a14c5c92..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest - */ -class StartManualTransferRunsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Transfer configuration name in the form: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - protected $time; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Transfer configuration name in the form: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - * @type \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest\TimeRange $requested_time_range - * A time_range start and end timestamp for historical data files or reports - * that are scheduled to be transferred by the scheduled transfer run. - * requested_time_range must be a past time and cannot include future time - * values. - * @type \Google\Protobuf\Timestamp $requested_run_time - * A run_time timestamp for historical data files or reports - * that are scheduled to be transferred by the scheduled transfer run. - * requested_run_time must be a past time and cannot include future time - * values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. Transfer configuration name in the form: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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. Transfer configuration name in the form: - * `projects/{project_id}/transferConfigs/{config_id}` or - * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_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; - } - - /** - * A time_range start and end timestamp for historical data files or reports - * that are scheduled to be transferred by the scheduled transfer run. - * requested_time_range must be a past time and cannot include future time - * values. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange requested_time_range = 3; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest\TimeRange|null - */ - public function getRequestedTimeRange() - { - return $this->readOneof(3); - } - - public function hasRequestedTimeRange() - { - return $this->hasOneof(3); - } - - /** - * A time_range start and end timestamp for historical data files or reports - * that are scheduled to be transferred by the scheduled transfer run. - * requested_time_range must be a past time and cannot include future time - * values. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange requested_time_range = 3; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest\TimeRange $var - * @return $this - */ - public function setRequestedTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest\TimeRange::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A run_time timestamp for historical data files or reports - * that are scheduled to be transferred by the scheduled transfer run. - * requested_run_time must be a past time and cannot include future time - * values. - * - * Generated from protobuf field .google.protobuf.Timestamp requested_run_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestedRunTime() - { - return $this->readOneof(4); - } - - public function hasRequestedRunTime() - { - return $this->hasOneof(4); - } - - /** - * A run_time timestamp for historical data files or reports - * that are scheduled to be transferred by the scheduled transfer run. - * requested_run_time must be a past time and cannot include future time - * values. - * - * Generated from protobuf field .google.protobuf.Timestamp requested_run_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestedRunTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getTime() - { - return $this->whichOneof("time"); - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest/TimeRange.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest/TimeRange.php deleted file mode 100644 index 3916e079bfe7..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsRequest/TimeRange.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange - */ -class TimeRange extends \Google\Protobuf\Internal\Message -{ - /** - * Start time of the range of transfer runs. For example, - * `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than - * the end_time. Creates transfer runs where run_time is in the range - * between start_time (inclusive) and end_time (exclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * End time of the range of transfer runs. For example, - * `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. - * Creates transfer runs where run_time is in the range between start_time - * (inclusive) and end_time (exclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Start time of the range of transfer runs. For example, - * `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than - * the end_time. Creates transfer runs where run_time is in the range - * between start_time (inclusive) and end_time (exclusive). - * @type \Google\Protobuf\Timestamp $end_time - * End time of the range of transfer runs. For example, - * `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. - * Creates transfer runs where run_time is in the range between start_time - * (inclusive) and end_time (exclusive). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Start time of the range of transfer runs. For example, - * `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than - * the end_time. Creates transfer runs where run_time is in the range - * between start_time (inclusive) and end_time (exclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @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); - } - - /** - * Start time of the range of transfer runs. For example, - * `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than - * the end_time. Creates transfer runs where run_time is in the range - * between start_time (inclusive) and end_time (exclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * End time of the range of transfer runs. For example, - * `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. - * Creates transfer runs where run_time is in the range between start_time - * (inclusive) and end_time (exclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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); - } - - /** - * End time of the range of transfer runs. For example, - * `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. - * Creates transfer runs where run_time is in the range between start_time - * (inclusive) and end_time (exclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimeRange::class, \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest_TimeRange::class); - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsResponse.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsResponse.php deleted file mode 100644 index 2c891f31e726..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/StartManualTransferRunsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse - */ -class StartManualTransferRunsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transfer runs that were created. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; - */ - private $runs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $runs - * The transfer runs that were created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * The transfer runs that were created. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRuns() - { - return $this->runs; - } - - /** - * The transfer runs that were created. - * - * Generated from protobuf field repeated .google.cloud.bigquery.datatransfer.v1.TransferRun runs = 1; - * @param array<\Google\Cloud\BigQuery\DataTransfer\V1\TransferRun>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRuns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun::class); - $this->runs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TimeBasedSchedule.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TimeBasedSchedule.php deleted file mode 100644 index 11981b94a608..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TimeBasedSchedule.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule - */ -class TimeBasedSchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Data transfer schedule. - * If the data source does not support a custom schedule, this should be - * empty. If it is empty, the default value for the data source will be used. - * The specified times are in UTC. - * Examples of valid format: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * See more explanation about the format here: - * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - * NOTE: The minimum interval time between recurring transfers depends on the - * data source; refer to the documentation for your data source. - * - * Generated from protobuf field string schedule = 1; - */ - protected $schedule = ''; - /** - * Specifies time to start scheduling transfer runs. The first run will be - * scheduled at or after the start time according to a recurrence pattern - * defined in the schedule string. The start time can be changed at any - * moment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * Defines time to stop scheduling transfer runs. A transfer run cannot be - * scheduled at or after the end time. The end time can be changed at any - * moment. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $schedule - * Data transfer schedule. - * If the data source does not support a custom schedule, this should be - * empty. If it is empty, the default value for the data source will be used. - * The specified times are in UTC. - * Examples of valid format: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * See more explanation about the format here: - * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - * NOTE: The minimum interval time between recurring transfers depends on the - * data source; refer to the documentation for your data source. - * @type \Google\Protobuf\Timestamp $start_time - * Specifies time to start scheduling transfer runs. The first run will be - * scheduled at or after the start time according to a recurrence pattern - * defined in the schedule string. The start time can be changed at any - * moment. - * @type \Google\Protobuf\Timestamp $end_time - * Defines time to stop scheduling transfer runs. A transfer run cannot be - * scheduled at or after the end time. The end time can be changed at any - * moment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Data transfer schedule. - * If the data source does not support a custom schedule, this should be - * empty. If it is empty, the default value for the data source will be used. - * The specified times are in UTC. - * Examples of valid format: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * See more explanation about the format here: - * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - * NOTE: The minimum interval time between recurring transfers depends on the - * data source; refer to the documentation for your data source. - * - * Generated from protobuf field string schedule = 1; - * @return string - */ - public function getSchedule() - { - return $this->schedule; - } - - /** - * Data transfer schedule. - * If the data source does not support a custom schedule, this should be - * empty. If it is empty, the default value for the data source will be used. - * The specified times are in UTC. - * Examples of valid format: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * See more explanation about the format here: - * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - * NOTE: The minimum interval time between recurring transfers depends on the - * data source; refer to the documentation for your data source. - * - * Generated from protobuf field string schedule = 1; - * @param string $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkString($var, True); - $this->schedule = $var; - - return $this; - } - - /** - * Specifies time to start scheduling transfer runs. The first run will be - * scheduled at or after the start time according to a recurrence pattern - * defined in the schedule string. The start time can be changed at any - * moment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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); - } - - /** - * Specifies time to start scheduling transfer runs. The first run will be - * scheduled at or after the start time according to a recurrence pattern - * defined in the schedule string. The start time can be changed at any - * moment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Defines time to stop scheduling transfer runs. A transfer run cannot be - * scheduled at or after the end time. The end time can be changed at any - * moment. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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); - } - - /** - * Defines time to stop scheduling transfer runs. A transfer run cannot be - * scheduled at or after the end time. The end time can be changed at any - * moment. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferConfig.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferConfig.php deleted file mode 100644 index e02892d345a5..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferConfig.php +++ /dev/null @@ -1,980 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.TransferConfig - */ -class TransferConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the transfer config. - * Transfer config names have the form either - * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or - * `projects/{project_id}/transferConfigs/{config_id}`, - * where `config_id` is usually a UUID, even though it is not - * guaranteed or required. The name is ignored when creating a transfer - * config. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * User specified display name for the data transfer. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * Data source ID. This cannot be changed once data transfer is created. The - * full list of available data source IDs can be returned through an API call: - * https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list - * - * Generated from protobuf field string data_source_id = 5; - */ - protected $data_source_id = ''; - /** - * Parameters specific to each data source. For more information see the - * bq tab in the 'Setting up a data transfer' section for each data source. - * For example the parameters for Cloud Storage transfers are listed here: - * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - * - * Generated from protobuf field .google.protobuf.Struct params = 9; - */ - protected $params = null; - /** - * Data transfer schedule. - * If the data source does not support a custom schedule, this should be - * empty. If it is empty, the default value for the data source will be used. - * The specified times are in UTC. - * Examples of valid format: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * See more explanation about the format here: - * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - * NOTE: The minimum interval time between recurring transfers depends on the - * data source; refer to the documentation for your data source. - * - * Generated from protobuf field string schedule = 7; - */ - protected $schedule = ''; - /** - * Options customizing the data transfer schedule. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptions schedule_options = 24; - */ - protected $schedule_options = null; - /** - * Options customizing different types of data transfer schedule. - * This field replaces "schedule" and "schedule_options" fields. - * ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2 schedule_options_v2 = 31; - */ - protected $schedule_options_v2 = null; - /** - * The number of days to look back to automatically refresh the data. - * For example, if `data_refresh_window_days = 10`, then every day - * BigQuery reingests data for [today-10, today-1], rather than ingesting data - * for just [today-1]. - * Only valid if the data source supports the feature. Set the value to 0 - * to use the default value. - * - * Generated from protobuf field int32 data_refresh_window_days = 12; - */ - protected $data_refresh_window_days = 0; - /** - * Is this config disabled. When set to true, no runs will be scheduled for - * this transfer config. - * - * Generated from protobuf field bool disabled = 13; - */ - protected $disabled = false; - /** - * Output only. Data transfer modification time. Ignored by server on input. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Next time when data transfer will run. - * - * Generated from protobuf field .google.protobuf.Timestamp next_run_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_run_time = null; - /** - * Output only. State of the most recently updated transfer run. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Deprecated. Unique ID of the user on whose behalf transfer is done. - * - * Generated from protobuf field int64 user_id = 11; - */ - protected $user_id = 0; - /** - * Output only. Region in which BigQuery dataset is located. - * - * Generated from protobuf field string dataset_region = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dataset_region = ''; - /** - * Pub/Sub topic where notifications will be sent after transfer runs - * associated with this transfer config finish. - * The format for specifying a pubsub topic is: - * `projects/{project_id}/topics/{topic_id}` - * - * Generated from protobuf field string notification_pubsub_topic = 15; - */ - protected $notification_pubsub_topic = ''; - /** - * Email notifications will be sent according to these preferences - * to the email address of the user who owns this transfer config. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 18; - */ - protected $email_preferences = null; - /** - * Output only. Information about the user whose credentials are used to - * transfer data. Populated only for `transferConfigs.get` requests. In case - * the user information is not available, this field will not be populated. - * - * Generated from protobuf field optional .google.cloud.bigquery.datatransfer.v1.UserInfo owner_info = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $owner_info = null; - /** - * The encryption configuration part. Currently, it is only used for the - * optional KMS key name. The BigQuery service account of your project must be - * granted permissions to use the key. Read methods will return the key name - * applied in effect. Write methods will apply the key if it is present, or - * otherwise try to apply project default keys if it is absent. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration encryption_configuration = 28; - */ - protected $encryption_configuration = null; - /** - * Output only. Error code with detailed information about reason of the - * latest config failure. - * - * Generated from protobuf field .google.rpc.Status error = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the transfer config. - * Transfer config names have the form either - * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or - * `projects/{project_id}/transferConfigs/{config_id}`, - * where `config_id` is usually a UUID, even though it is not - * guaranteed or required. The name is ignored when creating a transfer - * config. - * @type string $destination_dataset_id - * The BigQuery target dataset id. - * @type string $display_name - * User specified display name for the data transfer. - * @type string $data_source_id - * Data source ID. This cannot be changed once data transfer is created. The - * full list of available data source IDs can be returned through an API call: - * https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list - * @type \Google\Protobuf\Struct $params - * Parameters specific to each data source. For more information see the - * bq tab in the 'Setting up a data transfer' section for each data source. - * For example the parameters for Cloud Storage transfers are listed here: - * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - * @type string $schedule - * Data transfer schedule. - * If the data source does not support a custom schedule, this should be - * empty. If it is empty, the default value for the data source will be used. - * The specified times are in UTC. - * Examples of valid format: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * See more explanation about the format here: - * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - * NOTE: The minimum interval time between recurring transfers depends on the - * data source; refer to the documentation for your data source. - * @type \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptions $schedule_options - * Options customizing the data transfer schedule. - * @type \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptionsV2 $schedule_options_v2 - * Options customizing different types of data transfer schedule. - * This field replaces "schedule" and "schedule_options" fields. - * ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. - * @type int $data_refresh_window_days - * The number of days to look back to automatically refresh the data. - * For example, if `data_refresh_window_days = 10`, then every day - * BigQuery reingests data for [today-10, today-1], rather than ingesting data - * for just [today-1]. - * Only valid if the data source supports the feature. Set the value to 0 - * to use the default value. - * @type bool $disabled - * Is this config disabled. When set to true, no runs will be scheduled for - * this transfer config. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Data transfer modification time. Ignored by server on input. - * @type \Google\Protobuf\Timestamp $next_run_time - * Output only. Next time when data transfer will run. - * @type int $state - * Output only. State of the most recently updated transfer run. - * @type int|string $user_id - * Deprecated. Unique ID of the user on whose behalf transfer is done. - * @type string $dataset_region - * Output only. Region in which BigQuery dataset is located. - * @type string $notification_pubsub_topic - * Pub/Sub topic where notifications will be sent after transfer runs - * associated with this transfer config finish. - * The format for specifying a pubsub topic is: - * `projects/{project_id}/topics/{topic_id}` - * @type \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences $email_preferences - * Email notifications will be sent according to these preferences - * to the email address of the user who owns this transfer config. - * @type \Google\Cloud\BigQuery\DataTransfer\V1\UserInfo $owner_info - * Output only. Information about the user whose credentials are used to - * transfer data. Populated only for `transferConfigs.get` requests. In case - * the user information is not available, this field will not be populated. - * @type \Google\Cloud\BigQuery\DataTransfer\V1\EncryptionConfiguration $encryption_configuration - * The encryption configuration part. Currently, it is only used for the - * optional KMS key name. The BigQuery service account of your project must be - * granted permissions to use the key. Read methods will return the key name - * applied in effect. Write methods will apply the key if it is present, or - * otherwise try to apply project default keys if it is absent. - * @type \Google\Rpc\Status $error - * Output only. Error code with detailed information about reason of the - * latest config failure. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the transfer config. - * Transfer config names have the form either - * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or - * `projects/{project_id}/transferConfigs/{config_id}`, - * where `config_id` is usually a UUID, even though it is not - * guaranteed or required. The name is ignored when creating a transfer - * config. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the transfer config. - * Transfer config names have the form either - * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or - * `projects/{project_id}/transferConfigs/{config_id}`, - * where `config_id` is usually a UUID, even though it is not - * guaranteed or required. The name is ignored when creating a transfer - * config. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The BigQuery target dataset id. - * - * Generated from protobuf field string destination_dataset_id = 2; - * @return string - */ - public function getDestinationDatasetId() - { - return $this->readOneof(2); - } - - public function hasDestinationDatasetId() - { - return $this->hasOneof(2); - } - - /** - * The BigQuery target dataset id. - * - * Generated from protobuf field string destination_dataset_id = 2; - * @param string $var - * @return $this - */ - public function setDestinationDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * User specified display name for the data transfer. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User specified display name for the data transfer. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Data source ID. This cannot be changed once data transfer is created. The - * full list of available data source IDs can be returned through an API call: - * https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list - * - * Generated from protobuf field string data_source_id = 5; - * @return string - */ - public function getDataSourceId() - { - return $this->data_source_id; - } - - /** - * Data source ID. This cannot be changed once data transfer is created. The - * full list of available data source IDs can be returned through an API call: - * https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list - * - * Generated from protobuf field string data_source_id = 5; - * @param string $var - * @return $this - */ - public function setDataSourceId($var) - { - GPBUtil::checkString($var, True); - $this->data_source_id = $var; - - return $this; - } - - /** - * Parameters specific to each data source. For more information see the - * bq tab in the 'Setting up a data transfer' section for each data source. - * For example the parameters for Cloud Storage transfers are listed here: - * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - * - * Generated from protobuf field .google.protobuf.Struct params = 9; - * @return \Google\Protobuf\Struct|null - */ - public function getParams() - { - return $this->params; - } - - public function hasParams() - { - return isset($this->params); - } - - public function clearParams() - { - unset($this->params); - } - - /** - * Parameters specific to each data source. For more information see the - * bq tab in the 'Setting up a data transfer' section for each data source. - * For example the parameters for Cloud Storage transfers are listed here: - * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - * - * Generated from protobuf field .google.protobuf.Struct params = 9; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParams($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->params = $var; - - return $this; - } - - /** - * Data transfer schedule. - * If the data source does not support a custom schedule, this should be - * empty. If it is empty, the default value for the data source will be used. - * The specified times are in UTC. - * Examples of valid format: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * See more explanation about the format here: - * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - * NOTE: The minimum interval time between recurring transfers depends on the - * data source; refer to the documentation for your data source. - * - * Generated from protobuf field string schedule = 7; - * @return string - */ - public function getSchedule() - { - return $this->schedule; - } - - /** - * Data transfer schedule. - * If the data source does not support a custom schedule, this should be - * empty. If it is empty, the default value for the data source will be used. - * The specified times are in UTC. - * Examples of valid format: - * `1st,3rd monday of month 15:30`, - * `every wed,fri of jan,jun 13:15`, and - * `first sunday of quarter 00:00`. - * See more explanation about the format here: - * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - * NOTE: The minimum interval time between recurring transfers depends on the - * data source; refer to the documentation for your data source. - * - * Generated from protobuf field string schedule = 7; - * @param string $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkString($var, True); - $this->schedule = $var; - - return $this; - } - - /** - * Options customizing the data transfer schedule. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptions schedule_options = 24; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptions|null - */ - public function getScheduleOptions() - { - return $this->schedule_options; - } - - public function hasScheduleOptions() - { - return isset($this->schedule_options); - } - - public function clearScheduleOptions() - { - unset($this->schedule_options); - } - - /** - * Options customizing the data transfer schedule. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptions schedule_options = 24; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptions $var - * @return $this - */ - public function setScheduleOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptions::class); - $this->schedule_options = $var; - - return $this; - } - - /** - * Options customizing different types of data transfer schedule. - * This field replaces "schedule" and "schedule_options" fields. - * ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2 schedule_options_v2 = 31; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptionsV2|null - */ - public function getScheduleOptionsV2() - { - return $this->schedule_options_v2; - } - - public function hasScheduleOptionsV2() - { - return isset($this->schedule_options_v2); - } - - public function clearScheduleOptionsV2() - { - unset($this->schedule_options_v2); - } - - /** - * Options customizing different types of data transfer schedule. - * This field replaces "schedule" and "schedule_options" fields. - * ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2 schedule_options_v2 = 31; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptionsV2 $var - * @return $this - */ - public function setScheduleOptionsV2($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\ScheduleOptionsV2::class); - $this->schedule_options_v2 = $var; - - return $this; - } - - /** - * The number of days to look back to automatically refresh the data. - * For example, if `data_refresh_window_days = 10`, then every day - * BigQuery reingests data for [today-10, today-1], rather than ingesting data - * for just [today-1]. - * Only valid if the data source supports the feature. Set the value to 0 - * to use the default value. - * - * Generated from protobuf field int32 data_refresh_window_days = 12; - * @return int - */ - public function getDataRefreshWindowDays() - { - return $this->data_refresh_window_days; - } - - /** - * The number of days to look back to automatically refresh the data. - * For example, if `data_refresh_window_days = 10`, then every day - * BigQuery reingests data for [today-10, today-1], rather than ingesting data - * for just [today-1]. - * Only valid if the data source supports the feature. Set the value to 0 - * to use the default value. - * - * Generated from protobuf field int32 data_refresh_window_days = 12; - * @param int $var - * @return $this - */ - public function setDataRefreshWindowDays($var) - { - GPBUtil::checkInt32($var); - $this->data_refresh_window_days = $var; - - return $this; - } - - /** - * Is this config disabled. When set to true, no runs will be scheduled for - * this transfer config. - * - * Generated from protobuf field bool disabled = 13; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Is this config disabled. When set to true, no runs will be scheduled for - * this transfer config. - * - * Generated from protobuf field bool disabled = 13; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Output only. Data transfer modification time. Ignored by server on input. - * - * 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. Data transfer modification time. Ignored by server on input. - * - * 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; - } - - /** - * Output only. Next time when data transfer will run. - * - * Generated from protobuf field .google.protobuf.Timestamp next_run_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextRunTime() - { - return $this->next_run_time; - } - - public function hasNextRunTime() - { - return isset($this->next_run_time); - } - - public function clearNextRunTime() - { - unset($this->next_run_time); - } - - /** - * Output only. Next time when data transfer will run. - * - * Generated from protobuf field .google.protobuf.Timestamp next_run_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextRunTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_run_time = $var; - - return $this; - } - - /** - * Output only. State of the most recently updated transfer run. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the most recently updated transfer run. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class); - $this->state = $var; - - return $this; - } - - /** - * Deprecated. Unique ID of the user on whose behalf transfer is done. - * - * Generated from protobuf field int64 user_id = 11; - * @return int|string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * Deprecated. Unique ID of the user on whose behalf transfer is done. - * - * Generated from protobuf field int64 user_id = 11; - * @param int|string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkInt64($var); - $this->user_id = $var; - - return $this; - } - - /** - * Output only. Region in which BigQuery dataset is located. - * - * Generated from protobuf field string dataset_region = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatasetRegion() - { - return $this->dataset_region; - } - - /** - * Output only. Region in which BigQuery dataset is located. - * - * Generated from protobuf field string dataset_region = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatasetRegion($var) - { - GPBUtil::checkString($var, True); - $this->dataset_region = $var; - - return $this; - } - - /** - * Pub/Sub topic where notifications will be sent after transfer runs - * associated with this transfer config finish. - * The format for specifying a pubsub topic is: - * `projects/{project_id}/topics/{topic_id}` - * - * Generated from protobuf field string notification_pubsub_topic = 15; - * @return string - */ - public function getNotificationPubsubTopic() - { - return $this->notification_pubsub_topic; - } - - /** - * Pub/Sub topic where notifications will be sent after transfer runs - * associated with this transfer config finish. - * The format for specifying a pubsub topic is: - * `projects/{project_id}/topics/{topic_id}` - * - * Generated from protobuf field string notification_pubsub_topic = 15; - * @param string $var - * @return $this - */ - public function setNotificationPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->notification_pubsub_topic = $var; - - return $this; - } - - /** - * Email notifications will be sent according to these preferences - * to the email address of the user who owns this transfer config. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 18; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences|null - */ - public function getEmailPreferences() - { - return $this->email_preferences; - } - - public function hasEmailPreferences() - { - return isset($this->email_preferences); - } - - public function clearEmailPreferences() - { - unset($this->email_preferences); - } - - /** - * Email notifications will be sent according to these preferences - * to the email address of the user who owns this transfer config. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 18; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences $var - * @return $this - */ - public function setEmailPreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences::class); - $this->email_preferences = $var; - - return $this; - } - - /** - * Output only. Information about the user whose credentials are used to - * transfer data. Populated only for `transferConfigs.get` requests. In case - * the user information is not available, this field will not be populated. - * - * Generated from protobuf field optional .google.cloud.bigquery.datatransfer.v1.UserInfo owner_info = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\UserInfo|null - */ - public function getOwnerInfo() - { - return $this->owner_info; - } - - public function hasOwnerInfo() - { - return isset($this->owner_info); - } - - public function clearOwnerInfo() - { - unset($this->owner_info); - } - - /** - * Output only. Information about the user whose credentials are used to - * transfer data. Populated only for `transferConfigs.get` requests. In case - * the user information is not available, this field will not be populated. - * - * Generated from protobuf field optional .google.cloud.bigquery.datatransfer.v1.UserInfo owner_info = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\UserInfo $var - * @return $this - */ - public function setOwnerInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\UserInfo::class); - $this->owner_info = $var; - - return $this; - } - - /** - * The encryption configuration part. Currently, it is only used for the - * optional KMS key name. The BigQuery service account of your project must be - * granted permissions to use the key. Read methods will return the key name - * applied in effect. Write methods will apply the key if it is present, or - * otherwise try to apply project default keys if it is absent. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration encryption_configuration = 28; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\EncryptionConfiguration|null - */ - public function getEncryptionConfiguration() - { - return $this->encryption_configuration; - } - - public function hasEncryptionConfiguration() - { - return isset($this->encryption_configuration); - } - - public function clearEncryptionConfiguration() - { - unset($this->encryption_configuration); - } - - /** - * The encryption configuration part. Currently, it is only used for the - * optional KMS key name. The BigQuery service account of your project must be - * granted permissions to use the key. Read methods will return the key name - * applied in effect. Write methods will apply the key if it is present, or - * otherwise try to apply project default keys if it is absent. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration encryption_configuration = 28; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\EncryptionConfiguration $var - * @return $this - */ - public function setEncryptionConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\EncryptionConfiguration::class); - $this->encryption_configuration = $var; - - return $this; - } - - /** - * Output only. Error code with detailed information about reason of the - * latest config failure. - * - * Generated from protobuf field .google.rpc.Status error = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Error code with detailed information about reason of the - * latest config failure. - * - * Generated from protobuf field .google.rpc.Status error = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage.php deleted file mode 100644 index a870acd7fa2d..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.TransferMessage - */ -class TransferMessage extends \Google\Protobuf\Internal\Message -{ - /** - * Time when message was logged. - * - * Generated from protobuf field .google.protobuf.Timestamp message_time = 1; - */ - protected $message_time = null; - /** - * Message severity. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity severity = 2; - */ - protected $severity = 0; - /** - * Message text. - * - * Generated from protobuf field string message_text = 3; - */ - protected $message_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $message_time - * Time when message was logged. - * @type int $severity - * Message severity. - * @type string $message_text - * Message text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Time when message was logged. - * - * Generated from protobuf field .google.protobuf.Timestamp message_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getMessageTime() - { - return $this->message_time; - } - - public function hasMessageTime() - { - return isset($this->message_time); - } - - public function clearMessageTime() - { - unset($this->message_time); - } - - /** - * Time when message was logged. - * - * Generated from protobuf field .google.protobuf.Timestamp message_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setMessageTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->message_time = $var; - - return $this; - } - - /** - * Message severity. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity severity = 2; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Message severity. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity severity = 2; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage\MessageSeverity::class); - $this->severity = $var; - - return $this; - } - - /** - * Message text. - * - * Generated from protobuf field string message_text = 3; - * @return string - */ - public function getMessageText() - { - return $this->message_text; - } - - /** - * Message text. - * - * Generated from protobuf field string message_text = 3; - * @param string $var - * @return $this - */ - public function setMessageText($var) - { - GPBUtil::checkString($var, True); - $this->message_text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage/MessageSeverity.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage/MessageSeverity.php deleted file mode 100644 index 60b5fec68483..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferMessage/MessageSeverity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity - */ -class MessageSeverity -{ - /** - * No severity specified. - * - * Generated from protobuf enum MESSAGE_SEVERITY_UNSPECIFIED = 0; - */ - const MESSAGE_SEVERITY_UNSPECIFIED = 0; - /** - * Informational message. - * - * Generated from protobuf enum INFO = 1; - */ - const INFO = 1; - /** - * Warning message. - * - * Generated from protobuf enum WARNING = 2; - */ - const WARNING = 2; - /** - * Error message. - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - - private static $valueToName = [ - self::MESSAGE_SEVERITY_UNSPECIFIED => 'MESSAGE_SEVERITY_UNSPECIFIED', - self::INFO => 'INFO', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MessageSeverity::class, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage_MessageSeverity::class); - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferRun.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferRun.php deleted file mode 100644 index 849c9f95aec3..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferRun.php +++ /dev/null @@ -1,707 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.TransferRun - */ -class TransferRun extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the transfer run. - * Transfer run names have the form - * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. - * The name is ignored when creating a transfer run. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Minimum time after which a transfer run can be started. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; - */ - protected $schedule_time = null; - /** - * For batch transfer runs, specifies the date and time of the data should be - * ingested. - * - * Generated from protobuf field .google.protobuf.Timestamp run_time = 10; - */ - protected $run_time = null; - /** - * Status of the transfer run. - * - * Generated from protobuf field .google.rpc.Status error_status = 21; - */ - protected $error_status = null; - /** - * Output only. Time when transfer run was started. - * Parameter ignored by server for input requests. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. Time when transfer run ended. - * Parameter ignored by server for input requests. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Last time the data transfer run state was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Parameters specific to each data source. For more information - * see the bq tab in the 'Setting up a data transfer' section for each data - * source. For example the parameters for Cloud Storage transfers are listed - * here: - * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - * - * Generated from protobuf field .google.protobuf.Struct params = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $params = null; - /** - * Output only. Data source id. - * - * Generated from protobuf field string data_source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_source_id = ''; - /** - * Data transfer run state. Ignored for input requests. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 8; - */ - protected $state = 0; - /** - * Deprecated. Unique ID of the user on whose behalf transfer is done. - * - * Generated from protobuf field int64 user_id = 11; - */ - protected $user_id = 0; - /** - * Output only. Describes the schedule of this transfer run if it was - * created as part of a regular schedule. For batch transfer runs that are - * scheduled manually, this is empty. - * NOTE: the system might choose to delay the schedule depending on the - * current load, so `schedule_time` doesn't always match this. - * - * Generated from protobuf field string schedule = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $schedule = ''; - /** - * Output only. Pub/Sub topic where a notification will be sent after this - * transfer run finishes. - * The format for specifying a pubsub topic is: - * `projects/{project_id}/topics/{topic_id}` - * - * Generated from protobuf field string notification_pubsub_topic = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $notification_pubsub_topic = ''; - /** - * Output only. Email notifications will be sent according to these - * preferences to the email address of the user who owns the transfer config - * this run was derived from. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $email_preferences = null; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the transfer run. - * Transfer run names have the form - * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. - * The name is ignored when creating a transfer run. - * @type \Google\Protobuf\Timestamp $schedule_time - * Minimum time after which a transfer run can be started. - * @type \Google\Protobuf\Timestamp $run_time - * For batch transfer runs, specifies the date and time of the data should be - * ingested. - * @type \Google\Rpc\Status $error_status - * Status of the transfer run. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. Time when transfer run was started. - * Parameter ignored by server for input requests. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. Time when transfer run ended. - * Parameter ignored by server for input requests. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last time the data transfer run state was updated. - * @type \Google\Protobuf\Struct $params - * Output only. Parameters specific to each data source. For more information - * see the bq tab in the 'Setting up a data transfer' section for each data - * source. For example the parameters for Cloud Storage transfers are listed - * here: - * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - * @type string $destination_dataset_id - * Output only. The BigQuery target dataset id. - * @type string $data_source_id - * Output only. Data source id. - * @type int $state - * Data transfer run state. Ignored for input requests. - * @type int|string $user_id - * Deprecated. Unique ID of the user on whose behalf transfer is done. - * @type string $schedule - * Output only. Describes the schedule of this transfer run if it was - * created as part of a regular schedule. For batch transfer runs that are - * scheduled manually, this is empty. - * NOTE: the system might choose to delay the schedule depending on the - * current load, so `schedule_time` doesn't always match this. - * @type string $notification_pubsub_topic - * Output only. Pub/Sub topic where a notification will be sent after this - * transfer run finishes. - * The format for specifying a pubsub topic is: - * `projects/{project_id}/topics/{topic_id}` - * @type \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences $email_preferences - * Output only. Email notifications will be sent according to these - * preferences to the email address of the user who owns the transfer config - * this run was derived from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the transfer run. - * Transfer run names have the form - * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. - * The name is ignored when creating a transfer run. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the transfer run. - * Transfer run names have the form - * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. - * The name is ignored when creating a transfer run. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Minimum time after which a transfer run can be started. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Minimum time after which a transfer run can be started. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * For batch transfer runs, specifies the date and time of the data should be - * ingested. - * - * Generated from protobuf field .google.protobuf.Timestamp run_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRunTime() - { - return $this->run_time; - } - - public function hasRunTime() - { - return isset($this->run_time); - } - - public function clearRunTime() - { - unset($this->run_time); - } - - /** - * For batch transfer runs, specifies the date and time of the data should be - * ingested. - * - * Generated from protobuf field .google.protobuf.Timestamp run_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRunTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->run_time = $var; - - return $this; - } - - /** - * Status of the transfer run. - * - * Generated from protobuf field .google.rpc.Status error_status = 21; - * @return \Google\Rpc\Status|null - */ - public function getErrorStatus() - { - return $this->error_status; - } - - public function hasErrorStatus() - { - return isset($this->error_status); - } - - public function clearErrorStatus() - { - unset($this->error_status); - } - - /** - * Status of the transfer run. - * - * Generated from protobuf field .google.rpc.Status error_status = 21; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setErrorStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error_status = $var; - - return $this; - } - - /** - * Output only. Time when transfer run was started. - * Parameter ignored by server for input requests. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.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. Time when transfer run was started. - * Parameter ignored by server for input requests. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.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. Time when transfer run ended. - * Parameter ignored by server for input requests. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.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. Time when transfer run ended. - * Parameter ignored by server for input requests. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.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. Last time the data transfer run state was 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. Last time the data transfer run state was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Parameters specific to each data source. For more information - * see the bq tab in the 'Setting up a data transfer' section for each data - * source. For example the parameters for Cloud Storage transfers are listed - * here: - * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - * - * Generated from protobuf field .google.protobuf.Struct params = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Struct|null - */ - public function getParams() - { - return $this->params; - } - - public function hasParams() - { - return isset($this->params); - } - - public function clearParams() - { - unset($this->params); - } - - /** - * Output only. Parameters specific to each data source. For more information - * see the bq tab in the 'Setting up a data transfer' section for each data - * source. For example the parameters for Cloud Storage transfers are listed - * here: - * https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - * - * Generated from protobuf field .google.protobuf.Struct params = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParams($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->params = $var; - - return $this; - } - - /** - * Output only. The BigQuery target dataset id. - * - * Generated from protobuf field string destination_dataset_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDestinationDatasetId() - { - return $this->readOneof(2); - } - - public function hasDestinationDatasetId() - { - return $this->hasOneof(2); - } - - /** - * Output only. The BigQuery target dataset id. - * - * Generated from protobuf field string destination_dataset_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDestinationDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Output only. Data source id. - * - * Generated from protobuf field string data_source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDataSourceId() - { - return $this->data_source_id; - } - - /** - * Output only. Data source id. - * - * Generated from protobuf field string data_source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDataSourceId($var) - { - GPBUtil::checkString($var, True); - $this->data_source_id = $var; - - return $this; - } - - /** - * Data transfer run state. Ignored for input requests. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 8; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Data transfer run state. Ignored for input requests. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferState state = 8; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class); - $this->state = $var; - - return $this; - } - - /** - * Deprecated. Unique ID of the user on whose behalf transfer is done. - * - * Generated from protobuf field int64 user_id = 11; - * @return int|string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * Deprecated. Unique ID of the user on whose behalf transfer is done. - * - * Generated from protobuf field int64 user_id = 11; - * @param int|string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkInt64($var); - $this->user_id = $var; - - return $this; - } - - /** - * Output only. Describes the schedule of this transfer run if it was - * created as part of a regular schedule. For batch transfer runs that are - * scheduled manually, this is empty. - * NOTE: the system might choose to delay the schedule depending on the - * current load, so `schedule_time` doesn't always match this. - * - * Generated from protobuf field string schedule = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSchedule() - { - return $this->schedule; - } - - /** - * Output only. Describes the schedule of this transfer run if it was - * created as part of a regular schedule. For batch transfer runs that are - * scheduled manually, this is empty. - * NOTE: the system might choose to delay the schedule depending on the - * current load, so `schedule_time` doesn't always match this. - * - * Generated from protobuf field string schedule = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkString($var, True); - $this->schedule = $var; - - return $this; - } - - /** - * Output only. Pub/Sub topic where a notification will be sent after this - * transfer run finishes. - * The format for specifying a pubsub topic is: - * `projects/{project_id}/topics/{topic_id}` - * - * Generated from protobuf field string notification_pubsub_topic = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNotificationPubsubTopic() - { - return $this->notification_pubsub_topic; - } - - /** - * Output only. Pub/Sub topic where a notification will be sent after this - * transfer run finishes. - * The format for specifying a pubsub topic is: - * `projects/{project_id}/topics/{topic_id}` - * - * Generated from protobuf field string notification_pubsub_topic = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNotificationPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->notification_pubsub_topic = $var; - - return $this; - } - - /** - * Output only. Email notifications will be sent according to these - * preferences to the email address of the user who owns the transfer config - * this run was derived from. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences|null - */ - public function getEmailPreferences() - { - return $this->email_preferences; - } - - public function hasEmailPreferences() - { - return isset($this->email_preferences); - } - - public function clearEmailPreferences() - { - unset($this->email_preferences); - } - - /** - * Output only. Email notifications will be sent according to these - * preferences to the email address of the user who owns the transfer config - * this run was derived from. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.EmailPreferences email_preferences = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences $var - * @return $this - */ - public function setEmailPreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\EmailPreferences::class); - $this->email_preferences = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferState.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferState.php deleted file mode 100644 index 37f2117d5072..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferState.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.TransferState - */ -class TransferState -{ - /** - * State placeholder (0). - * - * Generated from protobuf enum TRANSFER_STATE_UNSPECIFIED = 0; - */ - const TRANSFER_STATE_UNSPECIFIED = 0; - /** - * Data transfer is scheduled and is waiting to be picked up by - * data transfer backend (2). - * - * Generated from protobuf enum PENDING = 2; - */ - const PENDING = 2; - /** - * Data transfer is in progress (3). - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - /** - * Data transfer completed successfully (4). - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * Data transfer failed (5). - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * Data transfer is cancelled (6). - * - * Generated from protobuf enum CANCELLED = 6; - */ - const CANCELLED = 6; - - private static $valueToName = [ - self::TRANSFER_STATE_UNSPECIFIED => 'TRANSFER_STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - ]; - - 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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferType.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferType.php deleted file mode 100644 index 175c432ce5db..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/TransferType.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.TransferType - */ -class TransferType -{ - /** - * Invalid or Unknown transfer type placeholder. - * - * Generated from protobuf enum TRANSFER_TYPE_UNSPECIFIED = 0; - */ - const TRANSFER_TYPE_UNSPECIFIED = 0; - /** - * Batch data transfer. - * - * Generated from protobuf enum BATCH = 1; - */ - const BATCH = 1; - /** - * Streaming data transfer. Streaming data source currently doesn't - * support multiple transfer configs per project. - * - * Generated from protobuf enum STREAMING = 2; - */ - const STREAMING = 2; - - private static $valueToName = [ - self::TRANSFER_TYPE_UNSPECIFIED => 'TRANSFER_TYPE_UNSPECIFIED', - self::BATCH => 'BATCH', - self::STREAMING => 'STREAMING', - ]; - - 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/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UnenrollDataSourcesRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UnenrollDataSourcesRequest.php deleted file mode 100644 index b95df4cd08eb..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UnenrollDataSourcesRequest.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest - */ -class UnenrollDataSourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project resource in the form: - * `projects/{project_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Data sources that are unenrolled. It is required to provide at least one - * data source id. - * - * Generated from protobuf field repeated string data_source_ids = 2; - */ - private $data_source_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the project resource in the form: - * `projects/{project_id}` - * @type array|\Google\Protobuf\Internal\RepeatedField $data_source_ids - * Data sources that are unenrolled. It is required to provide at least one - * data source id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project resource in the form: - * `projects/{project_id}` - * - * 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 project resource in the form: - * `projects/{project_id}` - * - * 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; - } - - /** - * Data sources that are unenrolled. It is required to provide at least one - * data source id. - * - * Generated from protobuf field repeated string data_source_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataSourceIds() - { - return $this->data_source_ids; - } - - /** - * Data sources that are unenrolled. It is required to provide at least one - * data source id. - * - * Generated from protobuf field repeated string data_source_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataSourceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_source_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UpdateTransferConfigRequest.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UpdateTransferConfigRequest.php deleted file mode 100644 index a6a1b12a9307..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UpdateTransferConfigRequest.php +++ /dev/null @@ -1,388 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest - */ -class UpdateTransferConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Data transfer configuration to create. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transfer_config = null; - /** - * Deprecated: Authorization code was required when - * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - * in any data sources. Use `version_info` instead. - * Optional OAuth2 authorization code to use with this transfer configuration. - * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - * and new credentials are needed, as indicated by `CheckValidCreds`. In order - * to obtain authorization_code, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * update the transfer config. - * - * Generated from protobuf field string authorization_code = 3 [deprecated = true]; - * @deprecated - */ - protected $authorization_code = ''; - /** - * Required. Required list of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional version info. This parameter replaces `authorization_code` which - * is no longer used in any data sources. This is required only if - * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - * are needed, as indicated by `CheckValidCreds`. In order to obtain version - * info, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * update the transfer config. - * - * Generated from protobuf field string version_info = 5; - */ - protected $version_info = ''; - /** - * Optional service account email. If this field is set, the transfer config - * will be created with this service account's credentials. It requires that - * the requesting user calling this API has permissions to act as this service - * account. - * Note that not all data sources support service account credentials when - * creating a transfer config. For the latest list of data sources, read about - * [using service - * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - * - * Generated from protobuf field string service_account_name = 6; - */ - protected $service_account_name = ''; - - /** - * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transferConfig Required. Data transfer configuration to create. - * @param \Google\Protobuf\FieldMask $updateMask Required. Required list of fields to be updated in this request. - * - * @return \Google\Cloud\BigQuery\DataTransfer\V1\UpdateTransferConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transferConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTransferConfig($transferConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transfer_config - * Required. Data transfer configuration to create. - * @type string $authorization_code - * Deprecated: Authorization code was required when - * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - * in any data sources. Use `version_info` instead. - * Optional OAuth2 authorization code to use with this transfer configuration. - * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - * and new credentials are needed, as indicated by `CheckValidCreds`. In order - * to obtain authorization_code, make a request to the following URL: - *
-     *           https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-     *           
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * update the transfer config. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Required list of fields to be updated in this request. - * @type string $version_info - * Optional version info. This parameter replaces `authorization_code` which - * is no longer used in any data sources. This is required only if - * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - * are needed, as indicated by `CheckValidCreds`. In order to obtain version - * info, make a request to the following URL: - *
-     *           https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-     *           
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * update the transfer config. - * @type string $service_account_name - * Optional service account email. If this field is set, the transfer config - * will be created with this service account's credentials. It requires that - * the requesting user calling this API has permissions to act as this service - * account. - * Note that not all data sources support service account credentials when - * creating a transfer config. For the latest list of data sources, read about - * [using service - * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datatransfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. Data transfer configuration to create. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig|null - */ - public function getTransferConfig() - { - return $this->transfer_config; - } - - public function hasTransferConfig() - { - return isset($this->transfer_config); - } - - public function clearTransferConfig() - { - unset($this->transfer_config); - } - - /** - * Required. Data transfer configuration to create. - * - * Generated from protobuf field .google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $var - * @return $this - */ - public function setTransferConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig::class); - $this->transfer_config = $var; - - return $this; - } - - /** - * Deprecated: Authorization code was required when - * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - * in any data sources. Use `version_info` instead. - * Optional OAuth2 authorization code to use with this transfer configuration. - * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - * and new credentials are needed, as indicated by `CheckValidCreds`. In order - * to obtain authorization_code, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * update the transfer config. - * - * Generated from protobuf field string authorization_code = 3 [deprecated = true]; - * @return string - * @deprecated - */ - public function getAuthorizationCode() - { - @trigger_error('authorization_code is deprecated.', E_USER_DEPRECATED); - return $this->authorization_code; - } - - /** - * Deprecated: Authorization code was required when - * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - * in any data sources. Use `version_info` instead. - * Optional OAuth2 authorization code to use with this transfer configuration. - * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - * and new credentials are needed, as indicated by `CheckValidCreds`. In order - * to obtain authorization_code, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * update the transfer config. - * - * Generated from protobuf field string authorization_code = 3 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setAuthorizationCode($var) - { - @trigger_error('authorization_code is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->authorization_code = $var; - - return $this; - } - - /** - * Required. Required list of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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. Required list of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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 version info. This parameter replaces `authorization_code` which - * is no longer used in any data sources. This is required only if - * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - * are needed, as indicated by `CheckValidCreds`. In order to obtain version - * info, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * update the transfer config. - * - * Generated from protobuf field string version_info = 5; - * @return string - */ - public function getVersionInfo() - { - return $this->version_info; - } - - /** - * Optional version info. This parameter replaces `authorization_code` which - * is no longer used in any data sources. This is required only if - * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - * are needed, as indicated by `CheckValidCreds`. In order to obtain version - * info, make a request to the following URL: - *
-     * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-     * 
- * * The client_id is the OAuth client_id of the data source as - * returned by ListDataSources method. - * * data_source_scopes are the scopes returned by ListDataSources - * method. - * Note that this should not be set when `service_account_name` is used to - * update the transfer config. - * - * Generated from protobuf field string version_info = 5; - * @param string $var - * @return $this - */ - public function setVersionInfo($var) - { - GPBUtil::checkString($var, True); - $this->version_info = $var; - - return $this; - } - - /** - * Optional service account email. If this field is set, the transfer config - * will be created with this service account's credentials. It requires that - * the requesting user calling this API has permissions to act as this service - * account. - * Note that not all data sources support service account credentials when - * creating a transfer config. For the latest list of data sources, read about - * [using service - * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - * - * Generated from protobuf field string service_account_name = 6; - * @return string - */ - public function getServiceAccountName() - { - return $this->service_account_name; - } - - /** - * Optional service account email. If this field is set, the transfer config - * will be created with this service account's credentials. It requires that - * the requesting user calling this API has permissions to act as this service - * account. - * Note that not all data sources support service account credentials when - * creating a transfer config. For the latest list of data sources, read about - * [using service - * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - * - * Generated from protobuf field string service_account_name = 6; - * @param string $var - * @return $this - */ - public function setServiceAccountName($var) - { - GPBUtil::checkString($var, True); - $this->service_account_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UserInfo.php b/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UserInfo.php deleted file mode 100644 index c1443d0e955d..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/proto/src/Google/Cloud/BigQuery/DataTransfer/V1/UserInfo.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.bigquery.datatransfer.v1.UserInfo - */ -class UserInfo extends \Google\Protobuf\Internal\Message -{ - /** - * E-mail address of the user. - * - * Generated from protobuf field optional string email = 1; - */ - protected $email = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * E-mail address of the user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * E-mail address of the user. - * - * Generated from protobuf field optional string email = 1; - * @return string - */ - public function getEmail() - { - return isset($this->email) ? $this->email : ''; - } - - public function hasEmail() - { - return isset($this->email); - } - - public function clearEmail() - { - unset($this->email); - } - - /** - * E-mail address of the user. - * - * Generated from protobuf field optional string email = 1; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/check_valid_creds.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/check_valid_creds.php deleted file mode 100644 index fd44c27b79c6..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/check_valid_creds.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CheckValidCredsResponse $response */ - $response = $dataTransferServiceClient->checkValidCreds($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 = DataTransferServiceClient::dataSourceName('[PROJECT]', '[DATA_SOURCE]'); - - check_valid_creds_sample($formattedName); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/create_transfer_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/create_transfer_config.php deleted file mode 100644 index 8fd517d92263..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/create_transfer_config.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setTransferConfig($transferConfig); - - // Call the API and handle any network failures. - try { - /** @var TransferConfig $response */ - $response = $dataTransferServiceClient->createTransferConfig($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 = DataTransferServiceClient::projectName('[PROJECT]'); - - create_transfer_config_sample($formattedParent); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_config.php deleted file mode 100644 index b61329e4e465..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_config.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $dataTransferServiceClient->deleteTransferConfig($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 = DataTransferServiceClient::transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - - delete_transfer_config_sample($formattedName); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_run.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_run.php deleted file mode 100644 index ce7b3ea6cf04..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/delete_transfer_run.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $dataTransferServiceClient->deleteTransferRun($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 = DataTransferServiceClient::runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); - - delete_transfer_run_sample($formattedName); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/enroll_data_sources.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/enroll_data_sources.php deleted file mode 100644 index 61f2edc53140..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/enroll_data_sources.php +++ /dev/null @@ -1,62 +0,0 @@ -enrollDataSources($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_data_source.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_data_source.php deleted file mode 100644 index c39115e7a0da..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_data_source.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataSource $response */ - $response = $dataTransferServiceClient->getDataSource($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 = DataTransferServiceClient::dataSourceName('[PROJECT]', '[DATA_SOURCE]'); - - get_data_source_sample($formattedName); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_location.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_location.php deleted file mode 100644 index c1d7d545dd69..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/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 bigquerydatatransfer_v1_generated_DataTransferService_GetLocation_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_config.php deleted file mode 100644 index 61aa88b01764..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_config.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TransferConfig $response */ - $response = $dataTransferServiceClient->getTransferConfig($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 = DataTransferServiceClient::transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - - get_transfer_config_sample($formattedName); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_run.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_run.php deleted file mode 100644 index a47824de7290..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/get_transfer_run.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TransferRun $response */ - $response = $dataTransferServiceClient->getTransferRun($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 = DataTransferServiceClient::runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); - - get_transfer_run_sample($formattedName); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_data_sources.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_data_sources.php deleted file mode 100644 index ed56eb6de375..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_data_sources.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTransferServiceClient->listDataSources($request); - - /** @var DataSource $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 = DataTransferServiceClient::projectName('[PROJECT]'); - - list_data_sources_sample($formattedParent); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_locations.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_locations.php deleted file mode 100644 index 292209afe3af..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/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 bigquerydatatransfer_v1_generated_DataTransferService_ListLocations_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_configs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_configs.php deleted file mode 100644 index 83ed0e4f60bb..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_configs.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTransferServiceClient->listTransferConfigs($request); - - /** @var TransferConfig $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 = DataTransferServiceClient::projectName('[PROJECT]'); - - list_transfer_configs_sample($formattedParent); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_logs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_logs.php deleted file mode 100644 index ae83b475dd8c..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_logs.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTransferServiceClient->listTransferLogs($request); - - /** @var TransferMessage $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 = DataTransferServiceClient::runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); - - list_transfer_logs_sample($formattedParent); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_runs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_runs.php deleted file mode 100644 index fdf0bc8552e5..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/list_transfer_runs.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTransferServiceClient->listTransferRuns($request); - - /** @var TransferRun $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 = DataTransferServiceClient::transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - - list_transfer_runs_sample($formattedParent); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/schedule_transfer_runs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/schedule_transfer_runs.php deleted file mode 100644 index eb4bc5505a14..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/schedule_transfer_runs.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setStartTime($startTime) - ->setEndTime($endTime); - - // Call the API and handle any network failures. - try { - /** @var ScheduleTransferRunsResponse $response */ - $response = $dataTransferServiceClient->scheduleTransferRuns($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 = DataTransferServiceClient::transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - - schedule_transfer_runs_sample($formattedParent); -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php deleted file mode 100644 index 38bf28def1e7..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php +++ /dev/null @@ -1,60 +0,0 @@ -startManualTransferRuns($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/unenroll_data_sources.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/unenroll_data_sources.php deleted file mode 100644 index 0bdd9433964c..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/unenroll_data_sources.php +++ /dev/null @@ -1,59 +0,0 @@ -unenrollDataSources($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/update_transfer_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/update_transfer_config.php deleted file mode 100644 index 1a25f828d7b2..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/samples/V1/DataTransferServiceClient/update_transfer_config.php +++ /dev/null @@ -1,63 +0,0 @@ -setTransferConfig($transferConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var TransferConfig $response */ - $response = $dataTransferServiceClient->updateTransferConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/Client/DataTransferServiceClient.php b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/Client/DataTransferServiceClient.php deleted file mode 100644 index 64b5a5fe8ab7..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/Client/DataTransferServiceClient.php +++ /dev/null @@ -1,936 +0,0 @@ - checkValidCredsAsync(CheckValidCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTransferConfigAsync(CreateTransferConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTransferConfigAsync(DeleteTransferConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTransferRunAsync(DeleteTransferRunRequest $request, array $optionalArgs = []) - * @method PromiseInterface enrollDataSourcesAsync(EnrollDataSourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataSourceAsync(GetDataSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTransferConfigAsync(GetTransferConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTransferRunAsync(GetTransferRunRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataSourcesAsync(ListDataSourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTransferConfigsAsync(ListTransferConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTransferLogsAsync(ListTransferLogsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTransferRunsAsync(ListTransferRunsRequest $request, array $optionalArgs = []) - * @method PromiseInterface scheduleTransferRunsAsync(ScheduleTransferRunsRequest $request, array $optionalArgs = []) - * @method PromiseInterface startManualTransferRunsAsync(StartManualTransferRunsRequest $request, array $optionalArgs = []) - * @method PromiseInterface unenrollDataSourcesAsync(UnenrollDataSourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTransferConfigAsync(UpdateTransferConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class DataTransferServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.datatransfer.v1.DataTransferService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigquerydatatransfer.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigquerydatatransfer.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_transfer_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_transfer_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_transfer_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_transfer_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_source - * resource. - * - * @param string $project - * @param string $dataSource - * - * @return string The formatted data_source resource. - */ - public static function dataSourceName(string $project, string $dataSource): string - { - return self::getPathTemplate('dataSource')->render([ - 'project' => $project, - 'data_source' => $dataSource, - ]); - } - - /** - * 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 project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_data_source resource. - * - * @param string $project - * @param string $dataSource - * - * @return string The formatted project_data_source resource. - */ - public static function projectDataSourceName(string $project, string $dataSource): string - { - return self::getPathTemplate('projectDataSource')->render([ - 'project' => $project, - 'data_source' => $dataSource, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_source resource. - * - * @param string $project - * @param string $location - * @param string $dataSource - * - * @return string The formatted project_location_data_source resource. - */ - public static function projectLocationDataSourceName(string $project, string $location, string $dataSource): string - { - return self::getPathTemplate('projectLocationDataSource')->render([ - 'project' => $project, - 'location' => $location, - 'data_source' => $dataSource, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_transfer_config resource. - * - * @param string $project - * @param string $location - * @param string $transferConfig - * - * @return string The formatted project_location_transfer_config resource. - */ - public static function projectLocationTransferConfigName(string $project, string $location, string $transferConfig): string - { - return self::getPathTemplate('projectLocationTransferConfig')->render([ - 'project' => $project, - 'location' => $location, - 'transfer_config' => $transferConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_transfer_config_run resource. - * - * @param string $project - * @param string $location - * @param string $transferConfig - * @param string $run - * - * @return string The formatted project_location_transfer_config_run resource. - */ - public static function projectLocationTransferConfigRunName(string $project, string $location, string $transferConfig, string $run): string - { - return self::getPathTemplate('projectLocationTransferConfigRun')->render([ - 'project' => $project, - 'location' => $location, - 'transfer_config' => $transferConfig, - 'run' => $run, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_transfer_config resource. - * - * @param string $project - * @param string $transferConfig - * - * @return string The formatted project_transfer_config resource. - */ - public static function projectTransferConfigName(string $project, string $transferConfig): string - { - return self::getPathTemplate('projectTransferConfig')->render([ - 'project' => $project, - 'transfer_config' => $transferConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_transfer_config_run resource. - * - * @param string $project - * @param string $transferConfig - * @param string $run - * - * @return string The formatted project_transfer_config_run resource. - */ - public static function projectTransferConfigRunName(string $project, string $transferConfig, string $run): string - { - return self::getPathTemplate('projectTransferConfigRun')->render([ - 'project' => $project, - 'transfer_config' => $transferConfig, - 'run' => $run, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a run - * resource. - * - * @param string $project - * @param string $transferConfig - * @param string $run - * - * @return string The formatted run resource. - */ - public static function runName(string $project, string $transferConfig, string $run): string - { - return self::getPathTemplate('run')->render([ - 'project' => $project, - 'transfer_config' => $transferConfig, - 'run' => $run, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * transfer_config resource. - * - * @param string $project - * @param string $transferConfig - * - * @return string The formatted transfer_config resource. - */ - public static function transferConfigName(string $project, string $transferConfig): string - { - return self::getPathTemplate('transferConfig')->render([ - 'project' => $project, - 'transfer_config' => $transferConfig, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataSource: projects/{project}/dataSources/{data_source} - * - location: projects/{project}/locations/{location} - * - project: projects/{project} - * - projectDataSource: projects/{project}/dataSources/{data_source} - * - projectLocationDataSource: projects/{project}/locations/{location}/dataSources/{data_source} - * - projectLocationTransferConfig: projects/{project}/locations/{location}/transferConfigs/{transfer_config} - * - projectLocationTransferConfigRun: projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run} - * - projectTransferConfig: projects/{project}/transferConfigs/{transfer_config} - * - projectTransferConfigRun: projects/{project}/transferConfigs/{transfer_config}/runs/{run} - * - run: projects/{project}/transferConfigs/{transfer_config}/runs/{run} - * - transferConfig: projects/{project}/transferConfigs/{transfer_config} - * - * 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 'bigquerydatatransfer.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); - } - - /** - * Returns true if valid credentials exist for the given data source and - * requesting user. - * - * The async variant is {@see DataTransferServiceClient::checkValidCredsAsync()} . - * - * @example samples/V1/DataTransferServiceClient/check_valid_creds.php - * - * @param CheckValidCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CheckValidCredsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function checkValidCreds(CheckValidCredsRequest $request, array $callOptions = []): CheckValidCredsResponse - { - return $this->startApiCall('CheckValidCreds', $request, $callOptions)->wait(); - } - - /** - * Creates a new data transfer configuration. - * - * The async variant is - * {@see DataTransferServiceClient::createTransferConfigAsync()} . - * - * @example samples/V1/DataTransferServiceClient/create_transfer_config.php - * - * @param CreateTransferConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransferConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTransferConfig(CreateTransferConfigRequest $request, array $callOptions = []): TransferConfig - { - return $this->startApiCall('CreateTransferConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes a data transfer configuration, including any associated transfer - * runs and logs. - * - * The async variant is - * {@see DataTransferServiceClient::deleteTransferConfigAsync()} . - * - * @example samples/V1/DataTransferServiceClient/delete_transfer_config.php - * - * @param DeleteTransferConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteTransferConfig(DeleteTransferConfigRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTransferConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified transfer run. - * - * The async variant is {@see DataTransferServiceClient::deleteTransferRunAsync()} - * . - * - * @example samples/V1/DataTransferServiceClient/delete_transfer_run.php - * - * @param DeleteTransferRunRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteTransferRun(DeleteTransferRunRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTransferRun', $request, $callOptions)->wait(); - } - - /** - * Enroll data sources in a user project. This allows users to create transfer - * configurations for these data sources. They will also appear in the - * ListDataSources RPC and as such, will appear in the - * [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents - * can be found in the public guide for - * [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and - * [Data Transfer - * Service](https://cloud.google.com/bigquery/docs/working-with-transfers). - * - * The async variant is {@see DataTransferServiceClient::enrollDataSourcesAsync()} - * . - * - * @example samples/V1/DataTransferServiceClient/enroll_data_sources.php - * - * @param EnrollDataSourcesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 enrollDataSources(EnrollDataSourcesRequest $request, array $callOptions = []): void - { - $this->startApiCall('EnrollDataSources', $request, $callOptions)->wait(); - } - - /** - * Retrieves a supported data source and returns its settings. - * - * The async variant is {@see DataTransferServiceClient::getDataSourceAsync()} . - * - * @example samples/V1/DataTransferServiceClient/get_data_source.php - * - * @param GetDataSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataSource - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataSource(GetDataSourceRequest $request, array $callOptions = []): DataSource - { - return $this->startApiCall('GetDataSource', $request, $callOptions)->wait(); - } - - /** - * Returns information about a data transfer config. - * - * The async variant is {@see DataTransferServiceClient::getTransferConfigAsync()} - * . - * - * @example samples/V1/DataTransferServiceClient/get_transfer_config.php - * - * @param GetTransferConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransferConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTransferConfig(GetTransferConfigRequest $request, array $callOptions = []): TransferConfig - { - return $this->startApiCall('GetTransferConfig', $request, $callOptions)->wait(); - } - - /** - * Returns information about the particular transfer run. - * - * The async variant is {@see DataTransferServiceClient::getTransferRunAsync()} . - * - * @example samples/V1/DataTransferServiceClient/get_transfer_run.php - * - * @param GetTransferRunRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransferRun - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTransferRun(GetTransferRunRequest $request, array $callOptions = []): TransferRun - { - return $this->startApiCall('GetTransferRun', $request, $callOptions)->wait(); - } - - /** - * Lists supported data sources and returns their settings. - * - * The async variant is {@see DataTransferServiceClient::listDataSourcesAsync()} . - * - * @example samples/V1/DataTransferServiceClient/list_data_sources.php - * - * @param ListDataSourcesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listDataSources(ListDataSourcesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataSources', $request, $callOptions); - } - - /** - * Returns information about all transfer configs owned by a project in the - * specified location. - * - * The async variant is - * {@see DataTransferServiceClient::listTransferConfigsAsync()} . - * - * @example samples/V1/DataTransferServiceClient/list_transfer_configs.php - * - * @param ListTransferConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTransferConfigs(ListTransferConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTransferConfigs', $request, $callOptions); - } - - /** - * Returns log messages for the transfer run. - * - * The async variant is {@see DataTransferServiceClient::listTransferLogsAsync()} . - * - * @example samples/V1/DataTransferServiceClient/list_transfer_logs.php - * - * @param ListTransferLogsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTransferLogs(ListTransferLogsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTransferLogs', $request, $callOptions); - } - - /** - * Returns information about running and completed transfer runs. - * - * The async variant is {@see DataTransferServiceClient::listTransferRunsAsync()} . - * - * @example samples/V1/DataTransferServiceClient/list_transfer_runs.php - * - * @param ListTransferRunsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTransferRuns(ListTransferRunsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTransferRuns', $request, $callOptions); - } - - /** - * Creates transfer runs for a time range [start_time, end_time]. - * For each date - or whatever granularity the data source supports - in the - * range, one transfer run is created. - * Note that runs are created per UTC time in the time range. - * DEPRECATED: use StartManualTransferRuns instead. - * - * The async variant is - * {@see DataTransferServiceClient::scheduleTransferRunsAsync()} . - * - * @example samples/V1/DataTransferServiceClient/schedule_transfer_runs.php - * - * @param ScheduleTransferRunsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ScheduleTransferRunsResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @deprecated This method will be removed in the next major version update. - */ - public function scheduleTransferRuns(ScheduleTransferRunsRequest $request, array $callOptions = []): ScheduleTransferRunsResponse - { - return $this->startApiCall('ScheduleTransferRuns', $request, $callOptions)->wait(); - } - - /** - * Start manual transfer runs to be executed now with schedule_time equal to - * current time. The transfer runs can be created for a time range where the - * run_time is between start_time (inclusive) and end_time (exclusive), or for - * a specific run_time. - * - * The async variant is - * {@see DataTransferServiceClient::startManualTransferRunsAsync()} . - * - * @example samples/V1/DataTransferServiceClient/start_manual_transfer_runs.php - * - * @param StartManualTransferRunsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return StartManualTransferRunsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function startManualTransferRuns(StartManualTransferRunsRequest $request, array $callOptions = []): StartManualTransferRunsResponse - { - return $this->startApiCall('StartManualTransferRuns', $request, $callOptions)->wait(); - } - - /** - * Unenroll data sources in a user project. This allows users to remove - * transfer configurations for these data sources. They will no longer appear - * in the ListDataSources RPC and will also no longer appear in the [BigQuery - * UI](https://console.cloud.google.com/bigquery). Data transfers - * configurations of unenrolled data sources will not be scheduled. - * - * The async variant is - * {@see DataTransferServiceClient::unenrollDataSourcesAsync()} . - * - * @example samples/V1/DataTransferServiceClient/unenroll_data_sources.php - * - * @param UnenrollDataSourcesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 unenrollDataSources(UnenrollDataSourcesRequest $request, array $callOptions = []): void - { - $this->startApiCall('UnenrollDataSources', $request, $callOptions)->wait(); - } - - /** - * Updates a data transfer configuration. - * All fields must be set, even if they are not updated. - * - * The async variant is - * {@see DataTransferServiceClient::updateTransferConfigAsync()} . - * - * @example samples/V1/DataTransferServiceClient/update_transfer_config.php - * - * @param UpdateTransferConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransferConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTransferConfig(UpdateTransferConfigRequest $request, array $callOptions = []): TransferConfig - { - return $this->startApiCall('UpdateTransferConfig', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DataTransferServiceClient::getLocationAsync()} . - * - * @example samples/V1/DataTransferServiceClient/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 DataTransferServiceClient::listLocationsAsync()} . - * - * @example samples/V1/DataTransferServiceClient/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/BigQueryDataTransfer/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 23bf9fbef1f5..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.bigquery.datatransfer.v1", - "libraryPackage": "Google\\Cloud\\BigQuery\\DataTransfer\\V1", - "services": { - "DataTransferService": { - "clients": { - "grpc": { - "libraryClient": "DataTransferServiceGapicClient", - "rpcs": { - "CheckValidCreds": { - "methods": [ - "checkValidCreds" - ] - }, - "CreateTransferConfig": { - "methods": [ - "createTransferConfig" - ] - }, - "DeleteTransferConfig": { - "methods": [ - "deleteTransferConfig" - ] - }, - "DeleteTransferRun": { - "methods": [ - "deleteTransferRun" - ] - }, - "EnrollDataSources": { - "methods": [ - "enrollDataSources" - ] - }, - "GetDataSource": { - "methods": [ - "getDataSource" - ] - }, - "GetTransferConfig": { - "methods": [ - "getTransferConfig" - ] - }, - "GetTransferRun": { - "methods": [ - "getTransferRun" - ] - }, - "ListDataSources": { - "methods": [ - "listDataSources" - ] - }, - "ListTransferConfigs": { - "methods": [ - "listTransferConfigs" - ] - }, - "ListTransferLogs": { - "methods": [ - "listTransferLogs" - ] - }, - "ListTransferRuns": { - "methods": [ - "listTransferRuns" - ] - }, - "ScheduleTransferRuns": { - "methods": [ - "scheduleTransferRuns" - ] - }, - "StartManualTransferRuns": { - "methods": [ - "startManualTransferRuns" - ] - }, - "UnenrollDataSources": { - "methods": [ - "unenrollDataSources" - ] - }, - "UpdateTransferConfig": { - "methods": [ - "updateTransferConfig" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_client_config.json b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_client_config.json deleted file mode 100644 index 80caf7d9cba5..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_client_config.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.datatransfer.v1.DataTransferService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ], - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 20000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CheckValidCreds": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateTransferConfig": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTransferConfig": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteTransferRun": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "EnrollDataSources": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataSource": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTransferConfig": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTransferRun": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDataSources": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTransferConfigs": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTransferLogs": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTransferRuns": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ScheduleTransferRuns": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StartManualTransferRuns": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UnenrollDataSources": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateTransferConfig": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_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/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_descriptor_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_descriptor_config.php deleted file mode 100644 index fa7c2336fc25..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_descriptor_config.php +++ /dev/null @@ -1,300 +0,0 @@ - [ - 'google.cloud.bigquery.datatransfer.v1.DataTransferService' => [ - 'CheckValidCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\CheckValidCredsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateTransferConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteTransferConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTransferRun' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EnrollDataSources' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataSource' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\DataSource', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTransferConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTransferRun' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\TransferRun', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDataSources' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataSources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ListDataSourcesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTransferConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTransferConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ListTransferConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTransferLogs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTransferMessages', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ListTransferLogsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTransferRuns' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTransferRuns', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ScheduleTransferRuns' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\ScheduleTransferRunsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'StartManualTransferRuns' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UnenrollDataSources' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateTransferConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig', - 'headerParams' => [ - [ - 'keyName' => 'transfer_config.name', - 'fieldAccessors' => [ - 'getTransferConfig', - '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' => [ - 'dataSource' => 'projects/{project}/dataSources/{data_source}', - 'location' => 'projects/{project}/locations/{location}', - 'project' => 'projects/{project}', - 'projectDataSource' => 'projects/{project}/dataSources/{data_source}', - 'projectLocationDataSource' => 'projects/{project}/locations/{location}/dataSources/{data_source}', - 'projectLocationTransferConfig' => 'projects/{project}/locations/{location}/transferConfigs/{transfer_config}', - 'projectLocationTransferConfigRun' => 'projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}', - 'projectTransferConfig' => 'projects/{project}/transferConfigs/{transfer_config}', - 'projectTransferConfigRun' => 'projects/{project}/transferConfigs/{transfer_config}/runs/{run}', - 'run' => 'projects/{project}/transferConfigs/{transfer_config}/runs/{run}', - 'transferConfig' => 'projects/{project}/transferConfigs/{transfer_config}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_rest_client_config.php b/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_rest_client_config.php deleted file mode 100644 index ba2556ef3d8d..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/src/V1/resources/data_transfer_service_rest_client_config.php +++ /dev/null @@ -1,339 +0,0 @@ - [ - 'google.cloud.bigquery.datatransfer.v1.DataTransferService' => [ - 'CheckValidCreds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/dataSources/*}:checkValidCreds', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateTransferConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/transferConfigs', - 'body' => 'transfer_config', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/transferConfigs', - 'body' => 'transfer_config', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteTransferConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/transferConfigs/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/transferConfigs/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTransferRun' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/transferConfigs/*/runs/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EnrollDataSources' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}:enrollDataSources', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*}:enrollDataSources', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataSource' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataSources/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/dataSources/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTransferConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/transferConfigs/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/transferConfigs/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTransferRun' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/transferConfigs/*/runs/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDataSources' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataSources', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/dataSources', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTransferConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/transferConfigs', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/transferConfigs', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTransferLogs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogs', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTransferRuns' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/transferConfigs/*}/runs', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/transferConfigs/*}/runs', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ScheduleTransferRuns' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'StartManualTransferRuns' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/transferConfigs/*}:startManualRuns', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/transferConfigs/*}:startManualRuns', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UnenrollDataSources' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}:unenrollDataSources', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateTransferConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}', - 'body' => 'transfer_config', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{transfer_config.name=projects/*/transferConfigs/*}', - 'body' => 'transfer_config', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'transfer_config.name' => [ - 'getters' => [ - 'getTransferConfig', - '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', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/BigQueryDataTransfer/v1/tests/Unit/V1/Client/DataTransferServiceClientTest.php b/owl-bot-staging/BigQueryDataTransfer/v1/tests/Unit/V1/Client/DataTransferServiceClientTest.php deleted file mode 100644 index b68964a97156..000000000000 --- a/owl-bot-staging/BigQueryDataTransfer/v1/tests/Unit/V1/Client/DataTransferServiceClientTest.php +++ /dev/null @@ -1,1373 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataTransferServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataTransferServiceClient($options); - } - - /** @test */ - public function checkValidCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $hasValidCreds = false; - $expectedResponse = new CheckValidCredsResponse(); - $expectedResponse->setHasValidCreds($hasValidCreds); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); - $request = (new CheckValidCredsRequest()) - ->setName($formattedName); - $response = $gapicClient->checkValidCreds($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.bigquery.datatransfer.v1.DataTransferService/CheckValidCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkValidCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); - $request = (new CheckValidCredsRequest()) - ->setName($formattedName); - try { - $gapicClient->checkValidCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTransferConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destinationDatasetId = 'destinationDatasetId1541564179'; - $displayName = 'displayName1615086568'; - $dataSourceId = 'dataSourceId-1015796374'; - $schedule = 'schedule-697920873'; - $dataRefreshWindowDays = 327632845; - $disabled = true; - $userId = 147132913; - $datasetRegion = 'datasetRegion959248539'; - $notificationPubsubTopic = 'notificationPubsubTopic1794281191'; - $expectedResponse = new TransferConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDestinationDatasetId($destinationDatasetId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDataSourceId($dataSourceId); - $expectedResponse->setSchedule($schedule); - $expectedResponse->setDataRefreshWindowDays($dataRefreshWindowDays); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setUserId($userId); - $expectedResponse->setDatasetRegion($datasetRegion); - $expectedResponse->setNotificationPubsubTopic($notificationPubsubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $transferConfig = new TransferConfig(); - $request = (new CreateTransferConfigRequest()) - ->setParent($formattedParent) - ->setTransferConfig($transferConfig); - $response = $gapicClient->createTransferConfig($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.bigquery.datatransfer.v1.DataTransferService/CreateTransferConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTransferConfig(); - $this->assertProtobufEquals($transferConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTransferConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->projectName('[PROJECT]'); - $transferConfig = new TransferConfig(); - $request = (new CreateTransferConfigRequest()) - ->setParent($formattedParent) - ->setTransferConfig($transferConfig); - try { - $gapicClient->createTransferConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTransferConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - $request = (new DeleteTransferConfigRequest()) - ->setName($formattedName); - $gapicClient->deleteTransferConfig($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/DeleteTransferConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTransferConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - $request = (new DeleteTransferConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTransferConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTransferRunTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); - $request = (new DeleteTransferRunRequest()) - ->setName($formattedName); - $gapicClient->deleteTransferRun($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/DeleteTransferRun', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTransferRunExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); - $request = (new DeleteTransferRunRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTransferRun($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enrollDataSourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - $request = new EnrollDataSourcesRequest(); - $gapicClient->enrollDataSources($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/EnrollDataSources', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enrollDataSourcesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 EnrollDataSourcesRequest(); - try { - $gapicClient->enrollDataSources($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dataSourceId = 'dataSourceId-1015796374'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $clientId = 'clientId-1904089585'; - $supportsMultipleTransfers = true; - $updateDeadlineSeconds = 991471694; - $defaultSchedule = 'defaultSchedule-800168235'; - $supportsCustomSchedule = true; - $helpUrl = 'helpUrl-789431439'; - $defaultDataRefreshWindowDays = 1804935157; - $manualRunsDisabled = true; - $expectedResponse = new DataSource(); - $expectedResponse->setName($name2); - $expectedResponse->setDataSourceId($dataSourceId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setClientId($clientId); - $expectedResponse->setSupportsMultipleTransfers($supportsMultipleTransfers); - $expectedResponse->setUpdateDeadlineSeconds($updateDeadlineSeconds); - $expectedResponse->setDefaultSchedule($defaultSchedule); - $expectedResponse->setSupportsCustomSchedule($supportsCustomSchedule); - $expectedResponse->setHelpUrl($helpUrl); - $expectedResponse->setDefaultDataRefreshWindowDays($defaultDataRefreshWindowDays); - $expectedResponse->setManualRunsDisabled($manualRunsDisabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); - $request = (new GetDataSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataSource($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.bigquery.datatransfer.v1.DataTransferService/GetDataSource', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataSourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); - $request = (new GetDataSourceRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataSource($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTransferConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $destinationDatasetId = 'destinationDatasetId1541564179'; - $displayName = 'displayName1615086568'; - $dataSourceId = 'dataSourceId-1015796374'; - $schedule = 'schedule-697920873'; - $dataRefreshWindowDays = 327632845; - $disabled = true; - $userId = 147132913; - $datasetRegion = 'datasetRegion959248539'; - $notificationPubsubTopic = 'notificationPubsubTopic1794281191'; - $expectedResponse = new TransferConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDestinationDatasetId($destinationDatasetId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDataSourceId($dataSourceId); - $expectedResponse->setSchedule($schedule); - $expectedResponse->setDataRefreshWindowDays($dataRefreshWindowDays); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setUserId($userId); - $expectedResponse->setDatasetRegion($datasetRegion); - $expectedResponse->setNotificationPubsubTopic($notificationPubsubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - $request = (new GetTransferConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getTransferConfig($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.bigquery.datatransfer.v1.DataTransferService/GetTransferConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTransferConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - $request = (new GetTransferConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getTransferConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTransferRunTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $destinationDatasetId = 'destinationDatasetId1541564179'; - $dataSourceId = 'dataSourceId-1015796374'; - $userId = 147132913; - $schedule = 'schedule-697920873'; - $notificationPubsubTopic = 'notificationPubsubTopic1794281191'; - $expectedResponse = new TransferRun(); - $expectedResponse->setName($name2); - $expectedResponse->setDestinationDatasetId($destinationDatasetId); - $expectedResponse->setDataSourceId($dataSourceId); - $expectedResponse->setUserId($userId); - $expectedResponse->setSchedule($schedule); - $expectedResponse->setNotificationPubsubTopic($notificationPubsubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); - $request = (new GetTransferRunRequest()) - ->setName($formattedName); - $response = $gapicClient->getTransferRun($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.bigquery.datatransfer.v1.DataTransferService/GetTransferRun', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTransferRunExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); - $request = (new GetTransferRunRequest()) - ->setName($formattedName); - try { - $gapicClient->getTransferRun($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataSourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataSourcesElement = new DataSource(); - $dataSources = [ - $dataSourcesElement, - ]; - $expectedResponse = new ListDataSourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataSources($dataSources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListDataSourcesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataSources($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataSources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListDataSources', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataSourcesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->projectName('[PROJECT]'); - $request = (new ListDataSourcesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataSources($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransferConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $transferConfigsElement = new TransferConfig(); - $transferConfigs = [ - $transferConfigsElement, - ]; - $expectedResponse = new ListTransferConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTransferConfigs($transferConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListTransferConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTransferConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTransferConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransferConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->projectName('[PROJECT]'); - $request = (new ListTransferConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTransferConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransferLogsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $transferMessagesElement = new TransferMessage(); - $transferMessages = [ - $transferMessagesElement, - ]; - $expectedResponse = new ListTransferLogsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTransferMessages($transferMessages); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); - $request = (new ListTransferLogsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTransferLogs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTransferMessages()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferLogs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransferLogsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->runName('[PROJECT]', '[TRANSFER_CONFIG]', '[RUN]'); - $request = (new ListTransferLogsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTransferLogs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransferRunsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $transferRunsElement = new TransferRun(); - $transferRuns = [ - $transferRunsElement, - ]; - $expectedResponse = new ListTransferRunsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTransferRuns($transferRuns); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - $request = (new ListTransferRunsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTransferRuns($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTransferRuns()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferRuns', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransferRunsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - $request = (new ListTransferRunsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTransferRuns($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function scheduleTransferRunsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ScheduleTransferRunsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - $startTime = new Timestamp(); - $endTime = new Timestamp(); - $request = (new ScheduleTransferRunsRequest()) - ->setParent($formattedParent) - ->setStartTime($startTime) - ->setEndTime($endTime); - $response = $gapicClient->scheduleTransferRuns($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.bigquery.datatransfer.v1.DataTransferService/ScheduleTransferRuns', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getStartTime(); - $this->assertProtobufEquals($startTime, $actualValue); - $actualValue = $actualRequestObject->getEndTime(); - $this->assertProtobufEquals($endTime, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function scheduleTransferRunsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->transferConfigName('[PROJECT]', '[TRANSFER_CONFIG]'); - $startTime = new Timestamp(); - $endTime = new Timestamp(); - $request = (new ScheduleTransferRunsRequest()) - ->setParent($formattedParent) - ->setStartTime($startTime) - ->setEndTime($endTime); - try { - $gapicClient->scheduleTransferRuns($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startManualTransferRunsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new StartManualTransferRunsResponse(); - $transport->addResponse($expectedResponse); - $request = new StartManualTransferRunsRequest(); - $response = $gapicClient->startManualTransferRuns($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.bigquery.datatransfer.v1.DataTransferService/StartManualTransferRuns', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startManualTransferRunsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 StartManualTransferRunsRequest(); - try { - $gapicClient->startManualTransferRuns($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function unenrollDataSourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - $request = new UnenrollDataSourcesRequest(); - $gapicClient->unenrollDataSources($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.datatransfer.v1.DataTransferService/UnenrollDataSources', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function unenrollDataSourcesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 UnenrollDataSourcesRequest(); - try { - $gapicClient->unenrollDataSources($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTransferConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destinationDatasetId = 'destinationDatasetId1541564179'; - $displayName = 'displayName1615086568'; - $dataSourceId = 'dataSourceId-1015796374'; - $schedule = 'schedule-697920873'; - $dataRefreshWindowDays = 327632845; - $disabled = true; - $userId = 147132913; - $datasetRegion = 'datasetRegion959248539'; - $notificationPubsubTopic = 'notificationPubsubTopic1794281191'; - $expectedResponse = new TransferConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDestinationDatasetId($destinationDatasetId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDataSourceId($dataSourceId); - $expectedResponse->setSchedule($schedule); - $expectedResponse->setDataRefreshWindowDays($dataRefreshWindowDays); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setUserId($userId); - $expectedResponse->setDatasetRegion($datasetRegion); - $expectedResponse->setNotificationPubsubTopic($notificationPubsubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $transferConfig = new TransferConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateTransferConfigRequest()) - ->setTransferConfig($transferConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateTransferConfig($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.bigquery.datatransfer.v1.DataTransferService/UpdateTransferConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getTransferConfig(); - $this->assertProtobufEquals($transferConfig, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTransferConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $transferConfig = new TransferConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateTransferConfigRequest()) - ->setTransferConfig($transferConfig) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateTransferConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 checkValidCredsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $hasValidCreds = false; - $expectedResponse = new CheckValidCredsResponse(); - $expectedResponse->setHasValidCreds($hasValidCreds); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataSourceName('[PROJECT]', '[DATA_SOURCE]'); - $request = (new CheckValidCredsRequest()) - ->setName($formattedName); - $response = $gapicClient->checkValidCredsAsync($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.bigquery.datatransfer.v1.DataTransferService/CheckValidCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationEntities.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationEntities.php deleted file mode 100644 index 28064ec72497d2b18389ba2661dbef4568868935..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4645 zcmcIoOK;mo5RNR#j#joSuVY6wf|gZ-#z9*OQHwrg=b;B}3$-Ohl2f!GKv2|5VMCKF z9}e6=J@wGv(sO|RhaUS2a_+h4xwFfMXj_%&B=w1+cfOgO{l1yy>^?M~n&?ArpXkJr z9WvnhXPontaHeHAhGJ-3-yIH##VN*#scOXHIj-K~nynru)Em7Iz|=NeOCe=$WEdlj z6cx>I2gSZR`q3rUS@A?20j_H3#naN{heUKobyQ;W%nw4kd_rtfRtUG>t{xFb9>|U? z?lVZSMj^$j4=El6km8fl4nm41+cp=z6ntd#0&(zXx_wPmINO0B6z;ZaOR5f@WljAF zHhZ5N%9>382vDJWRUwwrN0e?sGwmZJIC0mDtc7V(GFb)`_iH zs_7V387we%epHw74nPvVpe zR!mjgQ;9aHlBe>iYFOp+WLFcA|1#|m|Bz!_%{a2j`3aU~SampTRkPy<6bl+CWU0zq zLhV_yZflIiHA5e&qqh@m1oo{aA%c5s%Y9W-owN86heYnFAW26)G2`2IOhuf3s7yMa zK2Uw3R0e}k7kf}*wnHXUUf)44x6sZT)D~RujCod=_@FTHVPWD=OIz>y4rEg;T0Ysm z(zNyHYQ8C@rGdw3AEA6DgcFaszHOYHI}>_J3gf45yc@%D)cAbZ53XqK23+&Kzwg_# z3J;aB=mdoF7rf^$uuP>$F6XWAPYSJtW&K;jdN$OI=lCW{(PoiPaEa|qHS?;Hd{s%m zs$9o6(DFdFO-(+N*n&m60Jl)uk?m)8et}DFXG@QG&*>~S@RywOJqiJx#X6&av`~|L z67W|`JFf@Wr4UsJJ&B7bt5^hnN;E;W0|HUEvM1*6me#f^^*M zwuM?_uOZZP*Kh`<>z&G8FPFeswA49nHXF_T+yX{uv0XXt!kQ#rL77_XsC_8(;Ag7r z{#CJ1DUj?$vECViSZyBeCB;kUg?AxsKM=*Si!c1AaZxiAR>I+3@Hj3$_h|($gU4~< zdenz6#(a)}e{n_d2`okn z>cCgaqNf(Tj8e{->7925e-kj8Qg5~NWgJ)M(!)pC4CI82E5x={eIzki=RI<61h}Ag zo^^?aJ~XCkfJ*o38d#cZC5mV>DDPfu;Tf*6@(^q9!EGqg>AYRsLN_j;D~78(c?^N2 z@k6xa*Y^B6bH)b=nWZx-`!2EIs*E3_tOI0}z=x|j`5SDzu_8WqS`a>%dlBD8w;aQf zHRh3n_nu0Y){UG_a(5zF*C-53tX?1D`Lbunc^t>t%DGA9) zNl4L>&^@lz1fdQkAx;0aS7{u=^I~-sEwhC9QYrkMM!9gSUAIsF32hn zNP`x=OehIj)ibymNP<##wN#FCQWrhXQ-w$JS*n;p*X93_t}FCFFSe!m;+oc$t^?F; zAxBh^eH~R4PUjF02ve!`8c&3aedipp80UOqr6T-G<4uHp;!1UaJ_*g*ce%y#uZh1Z zza-GT_}wXBWa~|uQ_=Q#4GqhG8W(;>>mm7iz(u`mf{gI?}Qx z;0M>L8MG7#@Am}Sn7RxfOqv=QNbn^BQwGh3c0?~@AIEWj=-J>NTDOR4SdOF_BMClD zYinternalAddGeneratedFile( - ' -ß -@google/cloud/bigquery/migration/v2/migration_error_details.proto"google.cloud.bigquery.migration.v2google/rpc/error_details.proto"² -ResourceErrorDetail4 - resource_info ( 2.google.rpc.ResourceInfoBàAK - error_details ( 2/.google.cloud.bigquery.migration.v2.ErrorDetailBàA - error_count (BàA"‡ - ErrorDetailH -location ( 21.google.cloud.bigquery.migration.v2.ErrorLocationBàA. - -error_info ( 2.google.rpc.ErrorInfoBàA"7 - ErrorLocation -line (BàA -column (BàABÖ -&com.google.cloud.bigquery.migration.v2BMigrationErrorDetailsProtoPZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpbª"Google.Cloud.BigQuery.Migration.V2Ê"Google\\Cloud\\BigQuery\\Migration\\V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationMetrics.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/MigrationMetrics.php deleted file mode 100644 index 21788890345126b0a90954c3308ebc80bdc8cdbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1890 zcmbVN&2G~`5XMbg(oMy|P>6bA300d);DC#Ia7nAUp=pImgNS-SmLmUb(iM(v>~*Aq z`T{&kZ@dOK-hd15!R)T>1o}fEr+9Y0Z)d)loq4$vokZv{?vQ}QHX|N(PBA+nIEq6S zx}lGqbTA+>cEeFbeG+RJw~z3fqaJ?MKIlCHXcDHeOAI^=!=XM*7DBQiq6)?`trk!-;QWwzy<3&nPRfVmmf?y$mY)ua-?_(&_WHC=Pn&;KNWJCC<+fPZKokpZO0|$5XRV|AfV$x(KCQYdwbN3#2 zOM(`vNY?%b8hF)`V6fJ%rI4Jj!Jl&|>Nc8>La0enoyDbkMPJX+*9fO|IYPux`=X#Z z@u`}qENTlmi7YGnvzu^nl@54M08VY9IU$KqqoQj!A^<%+p-gRz7JsALKnNN#W_@0s zEU4w2Gq0V-A);@kBF|Bo1fGQOqEz(1KxS&^yxK(=>OF)Um==AR3a@y1|CYLhDxlBi zi_FZaOJKf_7QGNA9?9&yii))J#~%zc`z+WOz`lu8Z)z-Lr*m*x(W`lGynCjH$Nnwz zb|$U)T|uj`7;@KZ>TE9kIibZ{?<()x5|zKPaMT!vm#q(oV|s%`&Q|dNBj z+vUqbgJtoSuOF?rRXf(dinternalAddGeneratedFile( - ' -Ô -:google/cloud/bigquery/migration/v2/migration_service.proto"google.cloud.bigquery.migration.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto;google/cloud/bigquery/migration/v2/migration_entities.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"³ -CreateMigrationWorkflowRequest9 -parent ( B)àAúA# -!locations.googleapis.com/LocationV -migration_workflow ( 25.google.cloud.bigquery.migration.v2.MigrationWorkflowBàA"– -GetMigrationWorkflowRequestH -name ( B:àAúA4 -2bigquerymigration.googleapis.com/MigrationWorkflow- - read_mask ( 2.google.protobuf.FieldMask"° -ListMigrationWorkflowsRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location- - read_mask ( 2.google.protobuf.FieldMask - page_size ( - -page_token ( " -ListMigrationWorkflowsResponseR -migration_workflows ( 25.google.cloud.bigquery.migration.v2.MigrationWorkflow -next_page_token ( "j -DeleteMigrationWorkflowRequestH -name ( B:àAúA4 -2bigquerymigration.googleapis.com/MigrationWorkflow"i -StartMigrationWorkflowRequestH -name ( B:àAúA4 -2bigquerymigration.googleapis.com/MigrationWorkflow"™ -GetMigrationSubtaskRequestG -name ( B9àAúA3 -1bigquerymigration.googleapis.com/MigrationSubtask2 - read_mask ( 2.google.protobuf.FieldMaskBàA"ä -ListMigrationSubtasksRequestJ -parent ( B:àAúA4 -2bigquerymigration.googleapis.com/MigrationWorkflow2 - read_mask ( 2.google.protobuf.FieldMaskBàA - page_size (BàA - -page_token ( BàA -filter ( BàA"Š -ListMigrationSubtasksResponseP -migration_subtasks ( 24.google.cloud.bigquery.migration.v2.MigrationSubtask -next_page_token ( 2Ë -MigrationServiceû -CreateMigrationWorkflowB.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest5.google.cloud.bigquery.migration.v2.MigrationWorkflow"eÚAparent,migration_workflow‚Óä“C"-/v2/{parent=projects/*/locations/*}/workflows:migration_workflowÌ -GetMigrationWorkflow?.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest5.google.cloud.bigquery.migration.v2.MigrationWorkflow"<ÚAname‚Óä“/-/v2/{name=projects/*/locations/*/workflows/*}ß -ListMigrationWorkflowsA.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequestB.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse">ÚAparent‚Óä“/-/v2/{parent=projects/*/locations/*}/workflows³ -DeleteMigrationWorkflowB.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.google.protobuf.Empty"<ÚAname‚Óä“/*-/v2/{name=projects/*/locations/*/workflows/*}º -StartMigrationWorkflowA.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.google.protobuf.Empty"EÚAname‚Óä“8"3/v2/{name=projects/*/locations/*/workflows/*}:start:*Ô -GetMigrationSubtask>.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest4.google.cloud.bigquery.migration.v2.MigrationSubtask"GÚAname‚Óä“:8/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}ç -ListMigrationSubtasks@.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequestA.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse"IÚAparent‚Óä“:8/v2/{parent=projects/*/locations/*/workflows/*}/subtasksTÊA bigquerymigration.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÑ -&com.google.cloud.bigquery.migration.v2BMigrationServiceProtoPZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpbª"Google.Cloud.BigQuery.Migration.V2Ê"Google\\Cloud\\BigQuery\\Migration\\V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationConfig.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationConfig.php deleted file mode 100644 index 7bf3333eef5aef13d4089156d2f090f7b2681551..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4030 zcmbuC-E!Mh5XbA-P2x>r%PQ@dUJ12B(}Bw1!T=71v12FkG>)Cv%}~ZOMwX9lQCU)@ zBQpup7vLRu0l4QOxa0|X&r7i9=*u5rP>0+kk^ zH!2PF$!m`|SEZRgL9T9@rFpqT9o2LV{_jAu%&|UE_;&zIbw*rU)rfT5skI1IM=DkO z#~j%|WXOIkK=xZ9vVU1V0MHE8b){a6KICNh86^C%y`iCNl1uTcn)Fb22fC?KT{ZM; zboQAvRt=XRWqs|~Gc_h$Vg_wfBm0jfpUKufv@HzIGbz;AVe!IP^_wOoj;R{`I&n2e zx2ffHaA~D7AvB6Id$RvH_$BJb-$W)!{mQ$(3Ud0gZ)RS-Yz=i5)6e&K!&EJo{!M^wi{JSU{K6&0 zG>3ka1X}k^7$ndfLNf0TsR9H_h&eBAa=?=$D!TkEH_W+s4{{E{Bka;3yv1$AWX1Pj zH_%6~Y~mKPQhGmID?mQ@pkZnJe6vTv!syXmxMO+L_UK?S{_@`dTcP`H5W+kdgaKe% zx>J6dL_gMub5?c&9Ol7u$W8S*d2K{EmIgcJPm|zI(DM8=hM_u#jNGX{rV-BH<3#E% z0^21ZRtsM2BA~zDiGaPpHU^@*mZNG0iEw^mCvvyVEn^tEi#6GKpSld%k$GN zH;$QI5N*q)6NfDB_%3IDp2YJ`WF12>BW(myD-yZKfr&D*!!2W26ZU3Ti{f&e^+^(O zt*fP6Y{1TFSdK*HIY>zYs@KY~B6JV+=rqn0A-Q`f2rXk6o(~K@F>S+}Mal}Cm*{*P zhsF`ImWREOf3*zes^JkC>+(vKlyS{crDJPWYL)y;3i2!EMm&Pd%o-7X=jO^^CW+k& zLTRDBT!IYyjdzRCYS$Zs7iZm0ckx4zE(&g*2AEMCWu3CjXj(!rD`@2Alr1&bK&eO^q9)=j2MP!=~Q{ z6#a`gQ6euiSC>3%f8W5ZTLw2E!&;Ca`w~^=WrET}b5Ve8Hfs!3mvDtyF^67jQ!-O| z|CVJd9O6$cMRqx7#R6niN*#UZQNlaNEIS_=&ch_`z3i+e@h)uFtG#Ni+HGJa18jB= zPa3VNup#1`i^gfS*KD5&X>kv-)n4zSS$olI2pLg?T=;TOJ#ALI!fo*mVO5EfkJ5nS?Pi#3BeIGFCkU+o3RqKKnji zPdtWrL#d874Lfjb7R3i}Zx&2=1H2dTvSr3D@%!a$E&aBds{NIM4{_#9P*ZC6*5(5~ zjCE4q*Zs*N?CGspX=2?pnyR*r(`ht!*u#T`zkl11kNF&`@HtcotEUppp~_|X&u~#c sm{!@i%3IO?!n}$D>u{4#yiXrRv((4_bhj`J{_7yfSNh}H8+Zfo4+$L`UjP6A diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationDetails.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationDetails.php deleted file mode 100644 index a5cc48171d100a173aaa613a47fcf486c4ac92e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1792 zcmbtV+ioL85XBB;+v|7ozpg2xKBtjC!%EM};QG2Frw=|xf z?e4LZUFCrv;1_u3Q+VYE_zIrs%Xn-lL0H01@ZIwL!Fp}%QV8~E8;Ls?2C+Rc@D^oCjGRgsRlp zylK8F${IK}Bu&S$(|JJhfGCmUVs%0Us$8UdmbU@8FQ0-(Bs|JkaLO==yEvv(#zm(y z?`jTWoBHmM6)haaamn~pkH1;gFcn|I-)pe{f9CErT()nw#-DACUv7;*Z8v_cg7$_%U(sjl?bpj!JDDeYU&3}#%S|&(nBE<|koAvs6E*L1*eK4`U52v$ ziFw=jtpd*;V}1abeL!zcv3)mb=WEhg;EIvYsaoj?ZD>jWN@eS7)-qleelJjpoU1by9FDw zBx7Zb6h3o`EY80UPh%X?JW-(uG9o!*8rqZ57$-E8NJTVuq^ou-c42!`IHab^1=?hZ zZW#+9{;a^)+O(GtwY&51c3CsKs=V#Fi#fYWe9{{6$IP8(O#6FzZL`7N!t?Ld#+fy8 z-x|5Ejr`ht9Q@MA{oD2*v!I}`d*k;uELbpn?f8RL`^otJW$8uVI(J+!(|+`XUPlTj z?|ciN!Uymbd<5%DoJeg25`MDBGiPq+%)7JTIzTUR2Ylc}fP*IsEUp0uoC#(#4^N`$ z6galoETA5672{?PcY8zJY8t~AGBjinw?W4)W3C69?Xk$wCe-~B0bgh{>PlS7d~IIW z1SfvzC7Ljq%MGR{-GFa~W@%-HuZU~)*OcvWXVo|~MRW%vTPPduv$q0MO^81GA0U3Wp`(~d2*<1B3qN2j=! z)~M?@iaf=FN3fY4V-6zX{z+1I46w}KtXrmd9#E@I!E+jLP3DwwU0-*#2DvNLglyTj zMkS+o^PXmnpF2+8XIoOImRAK^hYR#)Szsyr4Z)8saRABxKMjoZ>oRKrrrUk4l*p|G1^c0F!rbq zm7;{+QJ$g)nNdnEn)#Kj#9T%tTZ+D^FMz`H77nFUpdv$Jhjc%u0RQAwL%QSmtd8_fOfL=+B z|3iz7gN+{7I!lP(FMMvMyI75i%`}(Yb`In^1WM$VOJ`ahTwQ(QhftcJ+F3j7boPn=XC2a`rPSGWvsWg^oiO?UAF}8XD diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationUsability.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationUsability.php deleted file mode 100644 index e741adf2e14f..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/GPBMetadata/Google/Cloud/Bigquery/Migration/V2/TranslationUsability.php +++ /dev/null @@ -1,42 +0,0 @@ -internalAddGeneratedFile( - ' -Ø ->google/cloud/bigquery/migration/v2/translation_usability.proto"google.cloud.bigquery.migration.v2google/api/resource.proto"ö -GcsReportLogMessage -severity (  -category (  - file_path (  -filename (  -source_script_line ( -source_script_column ( -message (  -script_context (  -action (  -effect - (  - object_name ( BÕ -&com.google.cloud.bigquery.migration.v2BTranslationUsabilityProtoPZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpbª"Google.Cloud.BigQuery.Migration.V2Ê"Google\\Cloud\\BigQuery\\Migration\\V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/AzureSynapseDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/AzureSynapseDialect.php deleted file mode 100644 index 4cd1024c3f8c..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/AzureSynapseDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.AzureSynapseDialect - */ -class AzureSynapseDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/BigQueryDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/BigQueryDialect.php deleted file mode 100644 index 633c28794cb2..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/BigQueryDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.BigQueryDialect - */ -class BigQueryDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/CreateMigrationWorkflowRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/CreateMigrationWorkflowRequest.php deleted file mode 100644 index cf86b9f22bb6..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/CreateMigrationWorkflowRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - */ -class CreateMigrationWorkflowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project to which this migration workflow belongs. - * Example: `projects/foo/locations/bar` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The migration workflow to create. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $migration_workflow = null; - - /** - * @param string $parent Required. The name of the project to which this migration workflow belongs. - * Example: `projects/foo/locations/bar` - * Please see {@see MigrationServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow $migrationWorkflow Required. The migration workflow to create. - * - * @return \Google\Cloud\BigQuery\Migration\V2\CreateMigrationWorkflowRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow $migrationWorkflow): self - { - return (new self()) - ->setParent($parent) - ->setMigrationWorkflow($migrationWorkflow); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project to which this migration workflow belongs. - * Example: `projects/foo/locations/bar` - * @type \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow $migration_workflow - * Required. The migration workflow to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project to which this migration workflow belongs. - * Example: `projects/foo/locations/bar` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project to which this migration workflow belongs. - * Example: `projects/foo/locations/bar` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The migration workflow to create. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow|null - */ - public function getMigrationWorkflow() - { - return $this->migration_workflow; - } - - public function hasMigrationWorkflow() - { - return isset($this->migration_workflow); - } - - public function clearMigrationWorkflow() - { - unset($this->migration_workflow); - } - - /** - * Required. The migration workflow to create. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow $var - * @return $this - */ - public function setMigrationWorkflow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow::class); - $this->migration_workflow = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DB2Dialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DB2Dialect.php deleted file mode 100644 index 1b6645ef9a1a..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DB2Dialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.DB2Dialect - */ -class DB2Dialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DeleteMigrationWorkflowRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DeleteMigrationWorkflowRequest.php deleted file mode 100644 index 8d1a839efb89..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/DeleteMigrationWorkflowRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - */ -class DeleteMigrationWorkflowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * Please see {@see MigrationServiceClient::migrationWorkflowName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Migration\V2\DeleteMigrationWorkflowRequest - * - * @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 unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * - * 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/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Dialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Dialect.php deleted file mode 100644 index 85655db62741..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Dialect.php +++ /dev/null @@ -1,603 +0,0 @@ -google.cloud.bigquery.migration.v2.Dialect - */ -class Dialect extends \Google\Protobuf\Internal\Message -{ - protected $dialect_value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Migration\V2\BigQueryDialect $bigquery_dialect - * The BigQuery dialect - * @type \Google\Cloud\BigQuery\Migration\V2\HiveQLDialect $hiveql_dialect - * The HiveQL dialect - * @type \Google\Cloud\BigQuery\Migration\V2\RedshiftDialect $redshift_dialect - * The Redshift dialect - * @type \Google\Cloud\BigQuery\Migration\V2\TeradataDialect $teradata_dialect - * The Teradata dialect - * @type \Google\Cloud\BigQuery\Migration\V2\OracleDialect $oracle_dialect - * The Oracle dialect - * @type \Google\Cloud\BigQuery\Migration\V2\SparkSQLDialect $sparksql_dialect - * The SparkSQL dialect - * @type \Google\Cloud\BigQuery\Migration\V2\SnowflakeDialect $snowflake_dialect - * The Snowflake dialect - * @type \Google\Cloud\BigQuery\Migration\V2\NetezzaDialect $netezza_dialect - * The Netezza dialect - * @type \Google\Cloud\BigQuery\Migration\V2\AzureSynapseDialect $azure_synapse_dialect - * The Azure Synapse dialect - * @type \Google\Cloud\BigQuery\Migration\V2\VerticaDialect $vertica_dialect - * The Vertica dialect - * @type \Google\Cloud\BigQuery\Migration\V2\SQLServerDialect $sql_server_dialect - * The SQL Server dialect - * @type \Google\Cloud\BigQuery\Migration\V2\PostgresqlDialect $postgresql_dialect - * The Postgresql dialect - * @type \Google\Cloud\BigQuery\Migration\V2\PrestoDialect $presto_dialect - * The Presto dialect - * @type \Google\Cloud\BigQuery\Migration\V2\MySQLDialect $mysql_dialect - * The MySQL dialect - * @type \Google\Cloud\BigQuery\Migration\V2\DB2Dialect $db2_dialect - * DB2 dialect - * @type \Google\Cloud\BigQuery\Migration\V2\SQLiteDialect $sqlite_dialect - * SQLite dialect - * @type \Google\Cloud\BigQuery\Migration\V2\GreenplumDialect $greenplum_dialect - * Greenplum dialect - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - - /** - * The BigQuery dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.BigQueryDialect bigquery_dialect = 1; - * @return \Google\Cloud\BigQuery\Migration\V2\BigQueryDialect|null - */ - public function getBigqueryDialect() - { - return $this->readOneof(1); - } - - public function hasBigqueryDialect() - { - return $this->hasOneof(1); - } - - /** - * The BigQuery dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.BigQueryDialect bigquery_dialect = 1; - * @param \Google\Cloud\BigQuery\Migration\V2\BigQueryDialect $var - * @return $this - */ - public function setBigqueryDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\BigQueryDialect::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The HiveQL dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.HiveQLDialect hiveql_dialect = 2; - * @return \Google\Cloud\BigQuery\Migration\V2\HiveQLDialect|null - */ - public function getHiveqlDialect() - { - return $this->readOneof(2); - } - - public function hasHiveqlDialect() - { - return $this->hasOneof(2); - } - - /** - * The HiveQL dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.HiveQLDialect hiveql_dialect = 2; - * @param \Google\Cloud\BigQuery\Migration\V2\HiveQLDialect $var - * @return $this - */ - public function setHiveqlDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\HiveQLDialect::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The Redshift dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.RedshiftDialect redshift_dialect = 3; - * @return \Google\Cloud\BigQuery\Migration\V2\RedshiftDialect|null - */ - public function getRedshiftDialect() - { - return $this->readOneof(3); - } - - public function hasRedshiftDialect() - { - return $this->hasOneof(3); - } - - /** - * The Redshift dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.RedshiftDialect redshift_dialect = 3; - * @param \Google\Cloud\BigQuery\Migration\V2\RedshiftDialect $var - * @return $this - */ - public function setRedshiftDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\RedshiftDialect::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The Teradata dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect teradata_dialect = 4; - * @return \Google\Cloud\BigQuery\Migration\V2\TeradataDialect|null - */ - public function getTeradataDialect() - { - return $this->readOneof(4); - } - - public function hasTeradataDialect() - { - return $this->hasOneof(4); - } - - /** - * The Teradata dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect teradata_dialect = 4; - * @param \Google\Cloud\BigQuery\Migration\V2\TeradataDialect $var - * @return $this - */ - public function setTeradataDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TeradataDialect::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The Oracle dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.OracleDialect oracle_dialect = 5; - * @return \Google\Cloud\BigQuery\Migration\V2\OracleDialect|null - */ - public function getOracleDialect() - { - return $this->readOneof(5); - } - - public function hasOracleDialect() - { - return $this->hasOneof(5); - } - - /** - * The Oracle dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.OracleDialect oracle_dialect = 5; - * @param \Google\Cloud\BigQuery\Migration\V2\OracleDialect $var - * @return $this - */ - public function setOracleDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\OracleDialect::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The SparkSQL dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SparkSQLDialect sparksql_dialect = 6; - * @return \Google\Cloud\BigQuery\Migration\V2\SparkSQLDialect|null - */ - public function getSparksqlDialect() - { - return $this->readOneof(6); - } - - public function hasSparksqlDialect() - { - return $this->hasOneof(6); - } - - /** - * The SparkSQL dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SparkSQLDialect sparksql_dialect = 6; - * @param \Google\Cloud\BigQuery\Migration\V2\SparkSQLDialect $var - * @return $this - */ - public function setSparksqlDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SparkSQLDialect::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The Snowflake dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SnowflakeDialect snowflake_dialect = 7; - * @return \Google\Cloud\BigQuery\Migration\V2\SnowflakeDialect|null - */ - public function getSnowflakeDialect() - { - return $this->readOneof(7); - } - - public function hasSnowflakeDialect() - { - return $this->hasOneof(7); - } - - /** - * The Snowflake dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SnowflakeDialect snowflake_dialect = 7; - * @param \Google\Cloud\BigQuery\Migration\V2\SnowflakeDialect $var - * @return $this - */ - public function setSnowflakeDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SnowflakeDialect::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The Netezza dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NetezzaDialect netezza_dialect = 8; - * @return \Google\Cloud\BigQuery\Migration\V2\NetezzaDialect|null - */ - public function getNetezzaDialect() - { - return $this->readOneof(8); - } - - public function hasNetezzaDialect() - { - return $this->hasOneof(8); - } - - /** - * The Netezza dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NetezzaDialect netezza_dialect = 8; - * @param \Google\Cloud\BigQuery\Migration\V2\NetezzaDialect $var - * @return $this - */ - public function setNetezzaDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\NetezzaDialect::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * The Azure Synapse dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.AzureSynapseDialect azure_synapse_dialect = 9; - * @return \Google\Cloud\BigQuery\Migration\V2\AzureSynapseDialect|null - */ - public function getAzureSynapseDialect() - { - return $this->readOneof(9); - } - - public function hasAzureSynapseDialect() - { - return $this->hasOneof(9); - } - - /** - * The Azure Synapse dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.AzureSynapseDialect azure_synapse_dialect = 9; - * @param \Google\Cloud\BigQuery\Migration\V2\AzureSynapseDialect $var - * @return $this - */ - public function setAzureSynapseDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\AzureSynapseDialect::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * The Vertica dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.VerticaDialect vertica_dialect = 10; - * @return \Google\Cloud\BigQuery\Migration\V2\VerticaDialect|null - */ - public function getVerticaDialect() - { - return $this->readOneof(10); - } - - public function hasVerticaDialect() - { - return $this->hasOneof(10); - } - - /** - * The Vertica dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.VerticaDialect vertica_dialect = 10; - * @param \Google\Cloud\BigQuery\Migration\V2\VerticaDialect $var - * @return $this - */ - public function setVerticaDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\VerticaDialect::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * The SQL Server dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SQLServerDialect sql_server_dialect = 11; - * @return \Google\Cloud\BigQuery\Migration\V2\SQLServerDialect|null - */ - public function getSqlServerDialect() - { - return $this->readOneof(11); - } - - public function hasSqlServerDialect() - { - return $this->hasOneof(11); - } - - /** - * The SQL Server dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SQLServerDialect sql_server_dialect = 11; - * @param \Google\Cloud\BigQuery\Migration\V2\SQLServerDialect $var - * @return $this - */ - public function setSqlServerDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SQLServerDialect::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * The Postgresql dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.PostgresqlDialect postgresql_dialect = 12; - * @return \Google\Cloud\BigQuery\Migration\V2\PostgresqlDialect|null - */ - public function getPostgresqlDialect() - { - return $this->readOneof(12); - } - - public function hasPostgresqlDialect() - { - return $this->hasOneof(12); - } - - /** - * The Postgresql dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.PostgresqlDialect postgresql_dialect = 12; - * @param \Google\Cloud\BigQuery\Migration\V2\PostgresqlDialect $var - * @return $this - */ - public function setPostgresqlDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\PostgresqlDialect::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * The Presto dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.PrestoDialect presto_dialect = 13; - * @return \Google\Cloud\BigQuery\Migration\V2\PrestoDialect|null - */ - public function getPrestoDialect() - { - return $this->readOneof(13); - } - - public function hasPrestoDialect() - { - return $this->hasOneof(13); - } - - /** - * The Presto dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.PrestoDialect presto_dialect = 13; - * @param \Google\Cloud\BigQuery\Migration\V2\PrestoDialect $var - * @return $this - */ - public function setPrestoDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\PrestoDialect::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * The MySQL dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MySQLDialect mysql_dialect = 14; - * @return \Google\Cloud\BigQuery\Migration\V2\MySQLDialect|null - */ - public function getMysqlDialect() - { - return $this->readOneof(14); - } - - public function hasMysqlDialect() - { - return $this->hasOneof(14); - } - - /** - * The MySQL dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MySQLDialect mysql_dialect = 14; - * @param \Google\Cloud\BigQuery\Migration\V2\MySQLDialect $var - * @return $this - */ - public function setMysqlDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\MySQLDialect::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * DB2 dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.DB2Dialect db2_dialect = 15; - * @return \Google\Cloud\BigQuery\Migration\V2\DB2Dialect|null - */ - public function getDb2Dialect() - { - return $this->readOneof(15); - } - - public function hasDb2Dialect() - { - return $this->hasOneof(15); - } - - /** - * DB2 dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.DB2Dialect db2_dialect = 15; - * @param \Google\Cloud\BigQuery\Migration\V2\DB2Dialect $var - * @return $this - */ - public function setDb2Dialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\DB2Dialect::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * SQLite dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SQLiteDialect sqlite_dialect = 16; - * @return \Google\Cloud\BigQuery\Migration\V2\SQLiteDialect|null - */ - public function getSqliteDialect() - { - return $this->readOneof(16); - } - - public function hasSqliteDialect() - { - return $this->hasOneof(16); - } - - /** - * SQLite dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SQLiteDialect sqlite_dialect = 16; - * @param \Google\Cloud\BigQuery\Migration\V2\SQLiteDialect $var - * @return $this - */ - public function setSqliteDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SQLiteDialect::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Greenplum dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.GreenplumDialect greenplum_dialect = 17; - * @return \Google\Cloud\BigQuery\Migration\V2\GreenplumDialect|null - */ - public function getGreenplumDialect() - { - return $this->readOneof(17); - } - - public function hasGreenplumDialect() - { - return $this->hasOneof(17); - } - - /** - * Greenplum dialect - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.GreenplumDialect greenplum_dialect = 17; - * @param \Google\Cloud\BigQuery\Migration\V2\GreenplumDialect $var - * @return $this - */ - public function setGreenplumDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\GreenplumDialect::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * @return string - */ - public function getDialectValue() - { - return $this->whichOneof("dialect_value"); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorDetail.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorDetail.php deleted file mode 100644 index b12388d8d92f..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorDetail.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.bigquery.migration.v2.ErrorDetail - */ -class ErrorDetail extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The exact location within the resource (if applicable). - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.ErrorLocation location = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $location = null; - /** - * Required. Describes the cause of the error with structured detail. - * - * Generated from protobuf field .google.rpc.ErrorInfo error_info = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $error_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Migration\V2\ErrorLocation $location - * Optional. The exact location within the resource (if applicable). - * @type \Google\Rpc\ErrorInfo $error_info - * Required. Describes the cause of the error with structured detail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationErrorDetails::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The exact location within the resource (if applicable). - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.ErrorLocation location = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Migration\V2\ErrorLocation|null - */ - public function getLocation() - { - return $this->location; - } - - public function hasLocation() - { - return isset($this->location); - } - - public function clearLocation() - { - unset($this->location); - } - - /** - * Optional. The exact location within the resource (if applicable). - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.ErrorLocation location = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Migration\V2\ErrorLocation $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\ErrorLocation::class); - $this->location = $var; - - return $this; - } - - /** - * Required. Describes the cause of the error with structured detail. - * - * Generated from protobuf field .google.rpc.ErrorInfo error_info = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Rpc\ErrorInfo|null - */ - public function getErrorInfo() - { - return $this->error_info; - } - - public function hasErrorInfo() - { - return isset($this->error_info); - } - - public function clearErrorInfo() - { - unset($this->error_info); - } - - /** - * Required. Describes the cause of the error with structured detail. - * - * Generated from protobuf field .google.rpc.ErrorInfo error_info = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Rpc\ErrorInfo $var - * @return $this - */ - public function setErrorInfo($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\ErrorInfo::class); - $this->error_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorLocation.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorLocation.php deleted file mode 100644 index b2d7144c0b51..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ErrorLocation.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.bigquery.migration.v2.ErrorLocation - */ -class ErrorLocation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If applicable, denotes the line where the error occurred. A zero - * value means that there is no line information. - * - * Generated from protobuf field int32 line = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $line = 0; - /** - * Optional. If applicable, denotes the column where the error occurred. A - * zero value means that there is no columns information. - * - * Generated from protobuf field int32 column = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $column = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $line - * Optional. If applicable, denotes the line where the error occurred. A zero - * value means that there is no line information. - * @type int $column - * Optional. If applicable, denotes the column where the error occurred. A - * zero value means that there is no columns information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationErrorDetails::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If applicable, denotes the line where the error occurred. A zero - * value means that there is no line information. - * - * Generated from protobuf field int32 line = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getLine() - { - return $this->line; - } - - /** - * Optional. If applicable, denotes the line where the error occurred. A zero - * value means that there is no line information. - * - * Generated from protobuf field int32 line = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setLine($var) - { - GPBUtil::checkInt32($var); - $this->line = $var; - - return $this; - } - - /** - * Optional. If applicable, denotes the column where the error occurred. A - * zero value means that there is no columns information. - * - * Generated from protobuf field int32 column = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getColumn() - { - return $this->column; - } - - /** - * Optional. If applicable, denotes the column where the error occurred. A - * zero value means that there is no columns information. - * - * Generated from protobuf field int32 column = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkInt32($var); - $this->column = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GcsReportLogMessage.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GcsReportLogMessage.php deleted file mode 100644 index 94d6aa4ab8bc..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GcsReportLogMessage.php +++ /dev/null @@ -1,415 +0,0 @@ -google.cloud.bigquery.migration.v2.GcsReportLogMessage - */ -class GcsReportLogMessage extends \Google\Protobuf\Internal\Message -{ - /** - * Severity of the translation record. - * - * Generated from protobuf field string severity = 1; - */ - protected $severity = ''; - /** - * Category of the error/warning. Example: SyntaxError - * - * Generated from protobuf field string category = 2; - */ - protected $category = ''; - /** - * The file path in which the error occurred - * - * Generated from protobuf field string file_path = 3; - */ - protected $file_path = ''; - /** - * The file name in which the error occurred - * - * Generated from protobuf field string filename = 4; - */ - protected $filename = ''; - /** - * Specifies the row from the source text where the error occurred (0 based, - * -1 for messages without line location). Example: 2 - * - * Generated from protobuf field int32 source_script_line = 5; - */ - protected $source_script_line = 0; - /** - * Specifies the column from the source texts where the error occurred. (0 - * based, -1 for messages without column location) example: 6 - * - * Generated from protobuf field int32 source_script_column = 6; - */ - protected $source_script_column = 0; - /** - * Detailed message of the record. - * - * Generated from protobuf field string message = 7; - */ - protected $message = ''; - /** - * The script context (obfuscated) in which the error occurred - * - * Generated from protobuf field string script_context = 8; - */ - protected $script_context = ''; - /** - * Category of the error/warning. Example: SyntaxError - * - * Generated from protobuf field string action = 9; - */ - protected $action = ''; - /** - * Effect of the error/warning. Example: COMPATIBILITY - * - * Generated from protobuf field string effect = 10; - */ - protected $effect = ''; - /** - * Name of the affected object in the log message. - * - * Generated from protobuf field string object_name = 11; - */ - protected $object_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $severity - * Severity of the translation record. - * @type string $category - * Category of the error/warning. Example: SyntaxError - * @type string $file_path - * The file path in which the error occurred - * @type string $filename - * The file name in which the error occurred - * @type int $source_script_line - * Specifies the row from the source text where the error occurred (0 based, - * -1 for messages without line location). Example: 2 - * @type int $source_script_column - * Specifies the column from the source texts where the error occurred. (0 - * based, -1 for messages without column location) example: 6 - * @type string $message - * Detailed message of the record. - * @type string $script_context - * The script context (obfuscated) in which the error occurred - * @type string $action - * Category of the error/warning. Example: SyntaxError - * @type string $effect - * Effect of the error/warning. Example: COMPATIBILITY - * @type string $object_name - * Name of the affected object in the log message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationUsability::initOnce(); - parent::__construct($data); - } - - /** - * Severity of the translation record. - * - * Generated from protobuf field string severity = 1; - * @return string - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Severity of the translation record. - * - * Generated from protobuf field string severity = 1; - * @param string $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkString($var, True); - $this->severity = $var; - - return $this; - } - - /** - * Category of the error/warning. Example: SyntaxError - * - * Generated from protobuf field string category = 2; - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * Category of the error/warning. Example: SyntaxError - * - * Generated from protobuf field string category = 2; - * @param string $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkString($var, True); - $this->category = $var; - - return $this; - } - - /** - * The file path in which the error occurred - * - * Generated from protobuf field string file_path = 3; - * @return string - */ - public function getFilePath() - { - return $this->file_path; - } - - /** - * The file path in which the error occurred - * - * Generated from protobuf field string file_path = 3; - * @param string $var - * @return $this - */ - public function setFilePath($var) - { - GPBUtil::checkString($var, True); - $this->file_path = $var; - - return $this; - } - - /** - * The file name in which the error occurred - * - * Generated from protobuf field string filename = 4; - * @return string - */ - public function getFilename() - { - return $this->filename; - } - - /** - * The file name in which the error occurred - * - * Generated from protobuf field string filename = 4; - * @param string $var - * @return $this - */ - public function setFilename($var) - { - GPBUtil::checkString($var, True); - $this->filename = $var; - - return $this; - } - - /** - * Specifies the row from the source text where the error occurred (0 based, - * -1 for messages without line location). Example: 2 - * - * Generated from protobuf field int32 source_script_line = 5; - * @return int - */ - public function getSourceScriptLine() - { - return $this->source_script_line; - } - - /** - * Specifies the row from the source text where the error occurred (0 based, - * -1 for messages without line location). Example: 2 - * - * Generated from protobuf field int32 source_script_line = 5; - * @param int $var - * @return $this - */ - public function setSourceScriptLine($var) - { - GPBUtil::checkInt32($var); - $this->source_script_line = $var; - - return $this; - } - - /** - * Specifies the column from the source texts where the error occurred. (0 - * based, -1 for messages without column location) example: 6 - * - * Generated from protobuf field int32 source_script_column = 6; - * @return int - */ - public function getSourceScriptColumn() - { - return $this->source_script_column; - } - - /** - * Specifies the column from the source texts where the error occurred. (0 - * based, -1 for messages without column location) example: 6 - * - * Generated from protobuf field int32 source_script_column = 6; - * @param int $var - * @return $this - */ - public function setSourceScriptColumn($var) - { - GPBUtil::checkInt32($var); - $this->source_script_column = $var; - - return $this; - } - - /** - * Detailed message of the record. - * - * Generated from protobuf field string message = 7; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Detailed message of the record. - * - * 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; - } - - /** - * The script context (obfuscated) in which the error occurred - * - * Generated from protobuf field string script_context = 8; - * @return string - */ - public function getScriptContext() - { - return $this->script_context; - } - - /** - * The script context (obfuscated) in which the error occurred - * - * Generated from protobuf field string script_context = 8; - * @param string $var - * @return $this - */ - public function setScriptContext($var) - { - GPBUtil::checkString($var, True); - $this->script_context = $var; - - return $this; - } - - /** - * Category of the error/warning. Example: SyntaxError - * - * Generated from protobuf field string action = 9; - * @return string - */ - public function getAction() - { - return $this->action; - } - - /** - * Category of the error/warning. Example: SyntaxError - * - * Generated from protobuf field string action = 9; - * @param string $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkString($var, True); - $this->action = $var; - - return $this; - } - - /** - * Effect of the error/warning. Example: COMPATIBILITY - * - * Generated from protobuf field string effect = 10; - * @return string - */ - public function getEffect() - { - return $this->effect; - } - - /** - * Effect of the error/warning. Example: COMPATIBILITY - * - * Generated from protobuf field string effect = 10; - * @param string $var - * @return $this - */ - public function setEffect($var) - { - GPBUtil::checkString($var, True); - $this->effect = $var; - - return $this; - } - - /** - * Name of the affected object in the log message. - * - * Generated from protobuf field string object_name = 11; - * @return string - */ - public function getObjectName() - { - return $this->object_name; - } - - /** - * Name of the affected object in the log message. - * - * Generated from protobuf field string object_name = 11; - * @param string $var - * @return $this - */ - public function setObjectName($var) - { - GPBUtil::checkString($var, True); - $this->object_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationSubtaskRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationSubtaskRequest.php deleted file mode 100644 index ac8f15bd9e87..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationSubtaskRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - */ -class GetMigrationSubtaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier for the migration subtask. - * Example: `projects/123/locations/us/workflows/1234/subtasks/543` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_mask = null; - - /** - * @param string $name Required. The unique identifier for the migration subtask. - * Example: `projects/123/locations/us/workflows/1234/subtasks/543` - * Please see {@see MigrationServiceClient::migrationSubtaskName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Migration\V2\GetMigrationSubtaskRequest - * - * @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 unique identifier for the migration subtask. - * Example: `projects/123/locations/us/workflows/1234/subtasks/543` - * @type \Google\Protobuf\FieldMask $read_mask - * Optional. The list of fields to be retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier for the migration subtask. - * Example: `projects/123/locations/us/workflows/1234/subtasks/543` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique identifier for the migration subtask. - * Example: `projects/123/locations/us/workflows/1234/subtasks/543` - * - * 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 list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * Optional. The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationWorkflowRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationWorkflowRequest.php deleted file mode 100644 index cf20c5101842..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GetMigrationWorkflowRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - */ -class GetMigrationWorkflowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; - */ - protected $read_mask = null; - - /** - * @param string $name Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * Please see {@see MigrationServiceClient::migrationWorkflowName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Migration\V2\GetMigrationWorkflowRequest - * - * @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 unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * @type \Google\Protobuf\FieldMask $read_mask - * The list of fields to be retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GreenplumDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GreenplumDialect.php deleted file mode 100644 index f07458775fb2..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/GreenplumDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.GreenplumDialect - */ -class GreenplumDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/HiveQLDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/HiveQLDialect.php deleted file mode 100644 index 4eba620616c9..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/HiveQLDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.HiveQLDialect - */ -class HiveQLDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksRequest.php deleted file mode 100644 index 5cdf51450e54..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksRequest.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - */ -class ListMigrationSubtasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_mask = null; - /** - * Optional. The maximum number of migration tasks to return. The service may - * return fewer than this number. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from previous `ListMigrationSubtasks` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * 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 filter to apply. This can be used to get the subtasks of a - * specific tasks in a workflow, e.g. `migration_task = "ab012"` where - * `"ab012"` is the task ID (not the name in the named map). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * Please see {@see MigrationServiceClient::migrationWorkflowName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Migration\V2\ListMigrationSubtasksRequest - * - * @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 migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * @type \Google\Protobuf\FieldMask $read_mask - * Optional. The list of fields to be retrieved. - * @type int $page_size - * Optional. The maximum number of migration tasks to return. The service may - * return fewer than this number. - * @type string $page_token - * Optional. A page token, received from previous `ListMigrationSubtasks` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * must match the call that provided the page token. - * @type string $filter - * Optional. The filter to apply. This can be used to get the subtasks of a - * specific tasks in a workflow, e.g. `migration_task = "ab012"` where - * `"ab012"` is the task ID (not the name in the named map). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * - * 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 migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * Optional. The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - - /** - * Optional. The maximum number of migration tasks to return. The service may - * return fewer than this number. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of migration tasks to return. The service may - * return fewer than this number. - * - * 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. A page token, received from previous `ListMigrationSubtasks` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * 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. A page token, received from previous `ListMigrationSubtasks` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * 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 filter to apply. This can be used to get the subtasks of a - * specific tasks in a workflow, e.g. `migration_task = "ab012"` where - * `"ab012"` is the task ID (not the name in the named map). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter to apply. This can be used to get the subtasks of a - * specific tasks in a workflow, e.g. `migration_task = "ab012"` where - * `"ab012"` is the task ID (not the name in the named map). - * - * 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/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksResponse.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksResponse.php deleted file mode 100644 index 5ef10e1eda97..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationSubtasksResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - */ -class ListMigrationSubtasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The migration subtasks for the specified task. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationSubtask migration_subtasks = 1; - */ - private $migration_subtasks; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\Migration\V2\MigrationSubtask>|\Google\Protobuf\Internal\RepeatedField $migration_subtasks - * The migration subtasks for the specified task. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); - parent::__construct($data); - } - - /** - * The migration subtasks for the specified task. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationSubtask migration_subtasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMigrationSubtasks() - { - return $this->migration_subtasks; - } - - /** - * The migration subtasks for the specified task. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationSubtask migration_subtasks = 1; - * @param array<\Google\Cloud\BigQuery\Migration\V2\MigrationSubtask>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMigrationSubtasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\MigrationSubtask::class); - $this->migration_subtasks = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsRequest.php deleted file mode 100644 index e3637ad33ae3..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsRequest.php +++ /dev/null @@ -1,214 +0,0 @@ -google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - */ -class ListMigrationWorkflowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; - */ - protected $read_mask = null; - /** - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * Please see {@see MigrationServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Migration\V2\ListMigrationWorkflowsRequest - * - * @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 project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * @type \Google\Protobuf\FieldMask $read_mask - * The list of fields to be retrieved. - * @type int $page_size - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * @type string $page_token - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * - * 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 project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * The list of fields to be retrieved. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - - /** - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4; - * @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/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsResponse.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsResponse.php deleted file mode 100644 index 41d31c2cfebd..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ListMigrationWorkflowsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - */ -class ListMigrationWorkflowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The migration workflows for the specified project / location. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflows = 1; - */ - private $migration_workflows; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow>|\Google\Protobuf\Internal\RepeatedField $migration_workflows - * The migration workflows for the specified project / location. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); - parent::__construct($data); - } - - /** - * The migration workflows for the specified project / location. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflows = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMigrationWorkflows() - { - return $this->migration_workflows; - } - - /** - * The migration workflows for the specified project / location. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.MigrationWorkflow migration_workflows = 1; - * @param array<\Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMigrationWorkflows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow::class); - $this->migration_workflows = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Literal.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Literal.php deleted file mode 100644 index bf0dc573e7ed..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Literal.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.bigquery.migration.v2.Literal - */ -class Literal extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The identifier of the literal entry. - * - * Generated from protobuf field string relative_path = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $relative_path = ''; - protected $literal_data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $literal_string - * Literal string data. - * @type string $literal_bytes - * Literal byte data. - * @type string $relative_path - * Required. The identifier of the literal entry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); - parent::__construct($data); - } - - /** - * Literal string data. - * - * Generated from protobuf field string literal_string = 2; - * @return string - */ - public function getLiteralString() - { - return $this->readOneof(2); - } - - public function hasLiteralString() - { - return $this->hasOneof(2); - } - - /** - * Literal string data. - * - * Generated from protobuf field string literal_string = 2; - * @param string $var - * @return $this - */ - public function setLiteralString($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Literal byte data. - * - * Generated from protobuf field bytes literal_bytes = 3; - * @return string - */ - public function getLiteralBytes() - { - return $this->readOneof(3); - } - - public function hasLiteralBytes() - { - return $this->hasOneof(3); - } - - /** - * Literal byte data. - * - * Generated from protobuf field bytes literal_bytes = 3; - * @param string $var - * @return $this - */ - public function setLiteralBytes($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. The identifier of the literal entry. - * - * Generated from protobuf field string relative_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRelativePath() - { - return $this->relative_path; - } - - /** - * Required. The identifier of the literal entry. - * - * Generated from protobuf field string relative_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRelativePath($var) - { - GPBUtil::checkString($var, True); - $this->relative_path = $var; - - return $this; - } - - /** - * @return string - */ - public function getLiteralData() - { - return $this->whichOneof("literal_data"); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask.php deleted file mode 100644 index 89a6b5afbe96..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask.php +++ /dev/null @@ -1,449 +0,0 @@ -google.cloud.bigquery.migration.v2.MigrationSubtask - */ -class MigrationSubtask extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Immutable. The resource name for the migration subtask. The ID - * is server-generated. - * Example: `projects/123/locations/us/workflows/345/subtasks/678` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * The unique ID of the task to which this subtask belongs. - * - * Generated from protobuf field string task_id = 2; - */ - protected $task_id = ''; - /** - * The type of the Subtask. The migration service does not check whether this - * is a known type. It is up to the task creator (i.e. orchestrator or worker) - * to ensure it only creates subtasks for which there are compatible workers - * polling for Subtasks. - * - * Generated from protobuf field string type = 3; - */ - protected $type = ''; - /** - * Output only. The current state of the subtask. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationSubtask.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. An explanation that may be populated when the task is in - * FAILED state. - * - * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $processing_error = null; - /** - * Output only. Provides details to errors and issues encountered while - * processing the subtask. Presence of error details does not mean that the - * subtask failed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $resource_error_details; - /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. - * - * Generated from protobuf field int32 resource_error_count = 13; - */ - protected $resource_error_count = 0; - /** - * Time when the subtask was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - */ - protected $create_time = null; - /** - * Time when the subtask was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8; - */ - protected $last_update_time = null; - /** - * The metrics for the subtask. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11; - */ - private $metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Immutable. The resource name for the migration subtask. The ID - * is server-generated. - * Example: `projects/123/locations/us/workflows/345/subtasks/678` - * @type string $task_id - * The unique ID of the task to which this subtask belongs. - * @type string $type - * The type of the Subtask. The migration service does not check whether this - * is a known type. It is up to the task creator (i.e. orchestrator or worker) - * to ensure it only creates subtasks for which there are compatible workers - * polling for Subtasks. - * @type int $state - * Output only. The current state of the subtask. - * @type \Google\Rpc\ErrorInfo $processing_error - * Output only. An explanation that may be populated when the task is in - * FAILED state. - * @type array<\Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail>|\Google\Protobuf\Internal\RepeatedField $resource_error_details - * Output only. Provides details to errors and issues encountered while - * processing the subtask. Presence of error details does not mean that the - * subtask failed. - * @type int $resource_error_count - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. - * @type \Google\Protobuf\Timestamp $create_time - * Time when the subtask was created. - * @type \Google\Protobuf\Timestamp $last_update_time - * Time when the subtask was last updated. - * @type array<\Google\Cloud\BigQuery\Migration\V2\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $metrics - * The metrics for the subtask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Immutable. The resource name for the migration subtask. The ID - * is server-generated. - * Example: `projects/123/locations/us/workflows/345/subtasks/678` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Immutable. The resource name for the migration subtask. The ID - * is server-generated. - * Example: `projects/123/locations/us/workflows/345/subtasks/678` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The unique ID of the task to which this subtask belongs. - * - * Generated from protobuf field string task_id = 2; - * @return string - */ - public function getTaskId() - { - return $this->task_id; - } - - /** - * The unique ID of the task to which this subtask belongs. - * - * Generated from protobuf field string task_id = 2; - * @param string $var - * @return $this - */ - public function setTaskId($var) - { - GPBUtil::checkString($var, True); - $this->task_id = $var; - - return $this; - } - - /** - * The type of the Subtask. The migration service does not check whether this - * is a known type. It is up to the task creator (i.e. orchestrator or worker) - * to ensure it only creates subtasks for which there are compatible workers - * polling for Subtasks. - * - * Generated from protobuf field string type = 3; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the Subtask. The migration service does not check whether this - * is a known type. It is up to the task creator (i.e. orchestrator or worker) - * to ensure it only creates subtasks for which there are compatible workers - * polling for Subtasks. - * - * Generated from protobuf field string type = 3; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Output only. The current state of the subtask. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationSubtask.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the subtask. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationSubtask.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\MigrationSubtask\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. An explanation that may be populated when the task is in - * FAILED state. - * - * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\ErrorInfo|null - */ - public function getProcessingError() - { - return $this->processing_error; - } - - public function hasProcessingError() - { - return isset($this->processing_error); - } - - public function clearProcessingError() - { - unset($this->processing_error); - } - - /** - * Output only. An explanation that may be populated when the task is in - * FAILED state. - * - * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\ErrorInfo $var - * @return $this - */ - public function setProcessingError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\ErrorInfo::class); - $this->processing_error = $var; - - return $this; - } - - /** - * Output only. Provides details to errors and issues encountered while - * processing the subtask. Presence of error details does not mean that the - * subtask failed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceErrorDetails() - { - return $this->resource_error_details; - } - - /** - * Output only. Provides details to errors and issues encountered while - * processing the subtask. Presence of error details does not mean that the - * subtask failed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceErrorDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail::class); - $this->resource_error_details = $arr; - - return $this; - } - - /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. - * - * Generated from protobuf field int32 resource_error_count = 13; - * @return int - */ - public function getResourceErrorCount() - { - return $this->resource_error_count; - } - - /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. - * - * Generated from protobuf field int32 resource_error_count = 13; - * @param int $var - * @return $this - */ - public function setResourceErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->resource_error_count = $var; - - return $this; - } - - /** - * Time when the subtask was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - * @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); - } - - /** - * Time when the subtask was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Time when the subtask was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastUpdateTime() - { - return $this->last_update_time; - } - - public function hasLastUpdateTime() - { - return isset($this->last_update_time); - } - - public function clearLastUpdateTime() - { - unset($this->last_update_time); - } - - /** - * Time when the subtask was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_update_time = $var; - - return $this; - } - - /** - * The metrics for the subtask. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetrics() - { - return $this->metrics; - } - - /** - * The metrics for the subtask. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11; - * @param array<\Google\Cloud\BigQuery\Migration\V2\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\TimeSeries::class); - $this->metrics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask/State.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask/State.php deleted file mode 100644 index 69f3698eaf48..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationSubtask/State.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.bigquery.migration.v2.MigrationSubtask.State - */ -class State -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The subtask is ready, i.e. it is ready for execution. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The subtask is running, i.e. it is assigned to a worker for execution. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The subtask finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The subtask finished unsuccessfully. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * The subtask is paused, i.e., it will not be scheduled. If it was already - * assigned,it might still finish but no new lease renewals will be granted. - * - * Generated from protobuf enum PAUSED = 5; - */ - const PAUSED = 5; - /** - * The subtask is pending a dependency. It will be scheduled once its - * dependencies are done. - * - * Generated from protobuf enum PENDING_DEPENDENCY = 6; - */ - const PENDING_DEPENDENCY = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::PAUSED => 'PAUSED', - self::PENDING_DEPENDENCY => 'PENDING_DEPENDENCY', - ]; - - 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\BigQuery\Migration\V2\MigrationSubtask_State::class); - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask.php deleted file mode 100644 index 38a9467bd6cb..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask.php +++ /dev/null @@ -1,609 +0,0 @@ -google.cloud.bigquery.migration.v2.MigrationTask - */ -class MigrationTask extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Immutable. The unique identifier for the migration task. The - * ID is server-generated. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $id = ''; - /** - * The type of the task. This must be one of the supported task types: - * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - * Translation_Snowflake2BQ, Translation_Netezza2BQ, - * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * Output only. The current state of the task. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTask.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. An explanation that may be populated when the task is in - * FAILED state. - * - * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $processing_error = null; - /** - * Time when the task was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - */ - protected $create_time = null; - /** - * Time when the task was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7; - */ - protected $last_update_time = null; - /** - * Output only. Provides details to errors and issues encountered while - * processing the task. Presence of error details does not mean that the task - * failed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $resource_error_details; - /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. - * - * Generated from protobuf field int32 resource_error_count = 18; - */ - protected $resource_error_count = 0; - /** - * The metrics for the task. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19; - */ - private $metrics; - /** - * Output only. The result of the task. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTaskResult task_result = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $task_result = null; - /** - * Count of all the processing errors in this task and its subtasks. - * - * Generated from protobuf field int32 total_processing_error_count = 21; - */ - protected $total_processing_error_count = 0; - /** - * Count of all the resource errors in this task and its subtasks. - * - * Generated from protobuf field int32 total_resource_error_count = 22; - */ - protected $total_resource_error_count = 0; - protected $task_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Migration\V2\TranslationConfigDetails $translation_config_details - * Task configuration for CW Batch/Offline SQL Translation. - * @type \Google\Cloud\BigQuery\Migration\V2\TranslationDetails $translation_details - * Task details for unified SQL Translation. - * @type string $id - * Output only. Immutable. The unique identifier for the migration task. The - * ID is server-generated. - * @type string $type - * The type of the task. This must be one of the supported task types: - * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - * Translation_Snowflake2BQ, Translation_Netezza2BQ, - * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. - * @type int $state - * Output only. The current state of the task. - * @type \Google\Rpc\ErrorInfo $processing_error - * Output only. An explanation that may be populated when the task is in - * FAILED state. - * @type \Google\Protobuf\Timestamp $create_time - * Time when the task was created. - * @type \Google\Protobuf\Timestamp $last_update_time - * Time when the task was last updated. - * @type array<\Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail>|\Google\Protobuf\Internal\RepeatedField $resource_error_details - * Output only. Provides details to errors and issues encountered while - * processing the task. Presence of error details does not mean that the task - * failed. - * @type int $resource_error_count - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. - * @type array<\Google\Cloud\BigQuery\Migration\V2\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $metrics - * The metrics for the task. - * @type \Google\Cloud\BigQuery\Migration\V2\MigrationTaskResult $task_result - * Output only. The result of the task. - * @type int $total_processing_error_count - * Count of all the processing errors in this task and its subtasks. - * @type int $total_resource_error_count - * Count of all the resource errors in this task and its subtasks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); - parent::__construct($data); - } - - /** - * Task configuration for CW Batch/Offline SQL Translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationConfigDetails translation_config_details = 14; - * @return \Google\Cloud\BigQuery\Migration\V2\TranslationConfigDetails|null - */ - public function getTranslationConfigDetails() - { - return $this->readOneof(14); - } - - public function hasTranslationConfigDetails() - { - return $this->hasOneof(14); - } - - /** - * Task configuration for CW Batch/Offline SQL Translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationConfigDetails translation_config_details = 14; - * @param \Google\Cloud\BigQuery\Migration\V2\TranslationConfigDetails $var - * @return $this - */ - public function setTranslationConfigDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TranslationConfigDetails::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Task details for unified SQL Translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationDetails translation_details = 16; - * @return \Google\Cloud\BigQuery\Migration\V2\TranslationDetails|null - */ - public function getTranslationDetails() - { - return $this->readOneof(16); - } - - public function hasTranslationDetails() - { - return $this->hasOneof(16); - } - - /** - * Task details for unified SQL Translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationDetails translation_details = 16; - * @param \Google\Cloud\BigQuery\Migration\V2\TranslationDetails $var - * @return $this - */ - public function setTranslationDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TranslationDetails::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Output only. Immutable. The unique identifier for the migration task. The - * ID is server-generated. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. Immutable. The unique identifier for the migration task. The - * ID is server-generated. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The type of the task. This must be one of the supported task types: - * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - * Translation_Snowflake2BQ, Translation_Netezza2BQ, - * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the task. This must be one of the supported task types: - * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - * Translation_Snowflake2BQ, Translation_Netezza2BQ, - * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. - * - * 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; - } - - /** - * Output only. The current state of the task. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTask.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the task. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTask.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\MigrationTask\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. An explanation that may be populated when the task is in - * FAILED state. - * - * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\ErrorInfo|null - */ - public function getProcessingError() - { - return $this->processing_error; - } - - public function hasProcessingError() - { - return isset($this->processing_error); - } - - public function clearProcessingError() - { - unset($this->processing_error); - } - - /** - * Output only. An explanation that may be populated when the task is in - * FAILED state. - * - * Generated from protobuf field .google.rpc.ErrorInfo processing_error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\ErrorInfo $var - * @return $this - */ - public function setProcessingError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\ErrorInfo::class); - $this->processing_error = $var; - - return $this; - } - - /** - * Time when the task was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @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); - } - - /** - * Time when the task was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Time when the task was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastUpdateTime() - { - return $this->last_update_time; - } - - public function hasLastUpdateTime() - { - return isset($this->last_update_time); - } - - public function clearLastUpdateTime() - { - unset($this->last_update_time); - } - - /** - * Time when the task was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_update_time = $var; - - return $this; - } - - /** - * Output only. Provides details to errors and issues encountered while - * processing the task. Presence of error details does not mean that the task - * failed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceErrorDetails() - { - return $this->resource_error_details; - } - - /** - * Output only. Provides details to errors and issues encountered while - * processing the task. Presence of error details does not mean that the task - * failed. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ResourceErrorDetail resource_error_details = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceErrorDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail::class); - $this->resource_error_details = $arr; - - return $this; - } - - /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. - * - * Generated from protobuf field int32 resource_error_count = 18; - * @return int - */ - public function getResourceErrorCount() - { - return $this->resource_error_count; - } - - /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. - * - * Generated from protobuf field int32 resource_error_count = 18; - * @param int $var - * @return $this - */ - public function setResourceErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->resource_error_count = $var; - - return $this; - } - - /** - * The metrics for the task. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetrics() - { - return $this->metrics; - } - - /** - * The metrics for the task. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19; - * @param array<\Google\Cloud\BigQuery\Migration\V2\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\TimeSeries::class); - $this->metrics = $arr; - - return $this; - } - - /** - * Output only. The result of the task. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTaskResult task_result = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Migration\V2\MigrationTaskResult|null - */ - public function getTaskResult() - { - return $this->task_result; - } - - public function hasTaskResult() - { - return isset($this->task_result); - } - - public function clearTaskResult() - { - unset($this->task_result); - } - - /** - * Output only. The result of the task. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationTaskResult task_result = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Migration\V2\MigrationTaskResult $var - * @return $this - */ - public function setTaskResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\MigrationTaskResult::class); - $this->task_result = $var; - - return $this; - } - - /** - * Count of all the processing errors in this task and its subtasks. - * - * Generated from protobuf field int32 total_processing_error_count = 21; - * @return int - */ - public function getTotalProcessingErrorCount() - { - return $this->total_processing_error_count; - } - - /** - * Count of all the processing errors in this task and its subtasks. - * - * Generated from protobuf field int32 total_processing_error_count = 21; - * @param int $var - * @return $this - */ - public function setTotalProcessingErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->total_processing_error_count = $var; - - return $this; - } - - /** - * Count of all the resource errors in this task and its subtasks. - * - * Generated from protobuf field int32 total_resource_error_count = 22; - * @return int - */ - public function getTotalResourceErrorCount() - { - return $this->total_resource_error_count; - } - - /** - * Count of all the resource errors in this task and its subtasks. - * - * Generated from protobuf field int32 total_resource_error_count = 22; - * @param int $var - * @return $this - */ - public function setTotalResourceErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->total_resource_error_count = $var; - - return $this; - } - - /** - * @return string - */ - public function getTaskDetails() - { - return $this->whichOneof("task_details"); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask/State.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask/State.php deleted file mode 100644 index e55eb83b5525..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTask/State.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.bigquery.migration.v2.MigrationTask.State - */ -class State -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The task is waiting for orchestration. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The task is assigned to an orchestrator. - * - * Generated from protobuf enum ORCHESTRATING = 2; - */ - const ORCHESTRATING = 2; - /** - * The task is running, i.e. its subtasks are ready for execution. - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - /** - * Tha task is paused. Assigned subtasks can continue, but no new subtasks - * will be scheduled. - * - * Generated from protobuf enum PAUSED = 4; - */ - const PAUSED = 4; - /** - * The task finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 5; - */ - const SUCCEEDED = 5; - /** - * The task finished unsuccessfully. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::ORCHESTRATING => 'ORCHESTRATING', - self::RUNNING => 'RUNNING', - self::PAUSED => 'PAUSED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\BigQuery\Migration\V2\MigrationTask_State::class); - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTaskResult.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTaskResult.php deleted file mode 100644 index b232b1eab376..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationTaskResult.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.bigquery.migration.v2.MigrationTaskResult - */ -class MigrationTaskResult extends \Google\Protobuf\Internal\Message -{ - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Migration\V2\TranslationTaskResult $translation_task_result - * Details specific to translation task types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); - parent::__construct($data); - } - - /** - * Details specific to translation task types. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationTaskResult translation_task_result = 2; - * @return \Google\Cloud\BigQuery\Migration\V2\TranslationTaskResult|null - */ - public function getTranslationTaskResult() - { - return $this->readOneof(2); - } - - public function hasTranslationTaskResult() - { - return $this->hasOneof(2); - } - - /** - * Details specific to translation task types. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationTaskResult translation_task_result = 2; - * @param \Google\Cloud\BigQuery\Migration\V2\TranslationTaskResult $var - * @return $this - */ - public function setTranslationTaskResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TranslationTaskResult::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow.php deleted file mode 100644 index 09dd9ef34d5e..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow.php +++ /dev/null @@ -1,278 +0,0 @@ -google.cloud.bigquery.migration.v2.MigrationWorkflow - */ -class MigrationWorkflow extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Immutable. Identifier. The unique identifier for the migration - * workflow. The ID is server-generated. - * Example: `projects/123/locations/us/workflows/345` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * The display name of the workflow. This can be set to give a workflow - * a descriptive name. There is no guarantee or enforcement of uniqueness. - * - * Generated from protobuf field string display_name = 6; - */ - protected $display_name = ''; - /** - * The tasks in a workflow in a named map. The name (i.e. key) has no - * meaning and is merely a convenient way to address a specific task - * in a workflow. - * - * Generated from protobuf field map tasks = 2; - */ - private $tasks; - /** - * Output only. That status of the workflow. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Time when the workflow was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - */ - protected $create_time = null; - /** - * Time when the workflow was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; - */ - protected $last_update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Immutable. Identifier. The unique identifier for the migration - * workflow. The ID is server-generated. - * Example: `projects/123/locations/us/workflows/345` - * @type string $display_name - * The display name of the workflow. This can be set to give a workflow - * a descriptive name. There is no guarantee or enforcement of uniqueness. - * @type array|\Google\Protobuf\Internal\MapField $tasks - * The tasks in a workflow in a named map. The name (i.e. key) has no - * meaning and is merely a convenient way to address a specific task - * in a workflow. - * @type int $state - * Output only. That status of the workflow. - * @type \Google\Protobuf\Timestamp $create_time - * Time when the workflow was created. - * @type \Google\Protobuf\Timestamp $last_update_time - * Time when the workflow was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Immutable. Identifier. The unique identifier for the migration - * workflow. The ID is server-generated. - * Example: `projects/123/locations/us/workflows/345` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Immutable. Identifier. The unique identifier for the migration - * workflow. The ID is server-generated. - * Example: `projects/123/locations/us/workflows/345` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The display name of the workflow. This can be set to give a workflow - * a descriptive name. There is no guarantee or enforcement of uniqueness. - * - * Generated from protobuf field string display_name = 6; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the workflow. This can be set to give a workflow - * a descriptive name. There is no guarantee or enforcement of uniqueness. - * - * Generated from protobuf field string display_name = 6; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The tasks in a workflow in a named map. The name (i.e. key) has no - * meaning and is merely a convenient way to address a specific task - * in a workflow. - * - * Generated from protobuf field map tasks = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * The tasks in a workflow in a named map. The name (i.e. key) has no - * meaning and is merely a convenient way to address a specific task - * in a workflow. - * - * Generated from protobuf field map tasks = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\MigrationTask::class); - $this->tasks = $arr; - - return $this; - } - - /** - * Output only. That status of the workflow. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. That status of the workflow. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.MigrationWorkflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow\State::class); - $this->state = $var; - - return $this; - } - - /** - * Time when the workflow was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @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); - } - - /** - * Time when the workflow was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Time when the workflow was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastUpdateTime() - { - return $this->last_update_time; - } - - public function hasLastUpdateTime() - { - return isset($this->last_update_time); - } - - public function clearLastUpdateTime() - { - unset($this->last_update_time); - } - - /** - * Time when the workflow was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow/State.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow/State.php deleted file mode 100644 index a3d08c0f69bd..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MigrationWorkflow/State.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.bigquery.migration.v2.MigrationWorkflow.State - */ -class State -{ - /** - * Workflow state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Workflow is in draft status, i.e. tasks are not yet eligible for - * execution. - * - * Generated from protobuf enum DRAFT = 1; - */ - const DRAFT = 1; - /** - * Workflow is running (i.e. tasks are eligible for execution). - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * Workflow is paused. Tasks currently in progress may continue, but no - * further tasks will be scheduled. - * - * Generated from protobuf enum PAUSED = 3; - */ - const PAUSED = 3; - /** - * Workflow is complete. There should not be any task in a non-terminal - * state, but if they are (e.g. forced termination), they will not be - * scheduled. - * - * Generated from protobuf enum COMPLETED = 4; - */ - const COMPLETED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::DRAFT => 'DRAFT', - self::RUNNING => 'RUNNING', - self::PAUSED => 'PAUSED', - self::COMPLETED => 'COMPLETED', - ]; - - 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\BigQuery\Migration\V2\MigrationWorkflow_State::class); - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MySQLDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MySQLDialect.php deleted file mode 100644 index 0537001d6700..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/MySQLDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.MySQLDialect - */ -class MySQLDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey.php deleted file mode 100644 index 685893ad9db5..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.bigquery.migration.v2.NameMappingKey - */ -class NameMappingKey extends \Google\Protobuf\Internal\Message -{ - /** - * The type of object that is being mapped. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey.Type type = 1; - */ - protected $type = 0; - /** - * The database name (BigQuery project ID equivalent in the source data - * warehouse). - * - * Generated from protobuf field string database = 2; - */ - protected $database = ''; - /** - * The schema name (BigQuery dataset equivalent in the source data warehouse). - * - * Generated from protobuf field string schema = 3; - */ - protected $schema = ''; - /** - * The relation name (BigQuery table or view equivalent in the source data - * warehouse). - * - * Generated from protobuf field string relation = 4; - */ - protected $relation = ''; - /** - * The attribute name (BigQuery column equivalent in the source data - * warehouse). - * - * Generated from protobuf field string attribute = 5; - */ - protected $attribute = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The type of object that is being mapped. - * @type string $database - * The database name (BigQuery project ID equivalent in the source data - * warehouse). - * @type string $schema - * The schema name (BigQuery dataset equivalent in the source data warehouse). - * @type string $relation - * The relation name (BigQuery table or view equivalent in the source data - * warehouse). - * @type string $attribute - * The attribute name (BigQuery column equivalent in the source data - * warehouse). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - - /** - * The type of object that is being mapped. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of object that is being mapped. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\NameMappingKey\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The database name (BigQuery project ID equivalent in the source data - * warehouse). - * - * Generated from protobuf field string database = 2; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * The database name (BigQuery project ID equivalent in the source data - * warehouse). - * - * Generated from protobuf field string database = 2; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The schema name (BigQuery dataset equivalent in the source data warehouse). - * - * Generated from protobuf field string schema = 3; - * @return string - */ - public function getSchema() - { - return $this->schema; - } - - /** - * The schema name (BigQuery dataset equivalent in the source data warehouse). - * - * Generated from protobuf field string schema = 3; - * @param string $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkString($var, True); - $this->schema = $var; - - return $this; - } - - /** - * The relation name (BigQuery table or view equivalent in the source data - * warehouse). - * - * Generated from protobuf field string relation = 4; - * @return string - */ - public function getRelation() - { - return $this->relation; - } - - /** - * The relation name (BigQuery table or view equivalent in the source data - * warehouse). - * - * Generated from protobuf field string relation = 4; - * @param string $var - * @return $this - */ - public function setRelation($var) - { - GPBUtil::checkString($var, True); - $this->relation = $var; - - return $this; - } - - /** - * The attribute name (BigQuery column equivalent in the source data - * warehouse). - * - * Generated from protobuf field string attribute = 5; - * @return string - */ - public function getAttribute() - { - return $this->attribute; - } - - /** - * The attribute name (BigQuery column equivalent in the source data - * warehouse). - * - * Generated from protobuf field string attribute = 5; - * @param string $var - * @return $this - */ - public function setAttribute($var) - { - GPBUtil::checkString($var, True); - $this->attribute = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey/Type.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey/Type.php deleted file mode 100644 index dac0840dcc6e..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingKey/Type.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.bigquery.migration.v2.NameMappingKey.Type - */ -class Type -{ - /** - * Unspecified name mapping type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * The object being mapped is a database. - * - * Generated from protobuf enum DATABASE = 1; - */ - const DATABASE = 1; - /** - * The object being mapped is a schema. - * - * Generated from protobuf enum SCHEMA = 2; - */ - const SCHEMA = 2; - /** - * The object being mapped is a relation. - * - * Generated from protobuf enum RELATION = 3; - */ - const RELATION = 3; - /** - * The object being mapped is an attribute. - * - * Generated from protobuf enum ATTRIBUTE = 4; - */ - const ATTRIBUTE = 4; - /** - * The object being mapped is a relation alias. - * - * Generated from protobuf enum RELATION_ALIAS = 5; - */ - const RELATION_ALIAS = 5; - /** - * The object being mapped is a an attribute alias. - * - * Generated from protobuf enum ATTRIBUTE_ALIAS = 6; - */ - const ATTRIBUTE_ALIAS = 6; - /** - * The object being mapped is a function. - * - * Generated from protobuf enum FUNCTION = 7; - */ - const PBFUNCTION = 7; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::DATABASE => 'DATABASE', - self::SCHEMA => 'SCHEMA', - self::RELATION => 'RELATION', - self::ATTRIBUTE => 'ATTRIBUTE', - self::RELATION_ALIAS => 'RELATION_ALIAS', - self::ATTRIBUTE_ALIAS => 'ATTRIBUTE_ALIAS', - self::PBFUNCTION => 'FUNCTION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\BigQuery\Migration\V2\NameMappingKey_Type::class); - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingValue.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingValue.php deleted file mode 100644 index 9720101da805..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NameMappingValue.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.bigquery.migration.v2.NameMappingValue - */ -class NameMappingValue extends \Google\Protobuf\Internal\Message -{ - /** - * The database name (BigQuery project ID equivalent in the target data - * warehouse). - * - * Generated from protobuf field string database = 1; - */ - protected $database = ''; - /** - * The schema name (BigQuery dataset equivalent in the target data warehouse). - * - * Generated from protobuf field string schema = 2; - */ - protected $schema = ''; - /** - * The relation name (BigQuery table or view equivalent in the target data - * warehouse). - * - * Generated from protobuf field string relation = 3; - */ - protected $relation = ''; - /** - * The attribute name (BigQuery column equivalent in the target data - * warehouse). - * - * Generated from protobuf field string attribute = 4; - */ - protected $attribute = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * The database name (BigQuery project ID equivalent in the target data - * warehouse). - * @type string $schema - * The schema name (BigQuery dataset equivalent in the target data warehouse). - * @type string $relation - * The relation name (BigQuery table or view equivalent in the target data - * warehouse). - * @type string $attribute - * The attribute name (BigQuery column equivalent in the target data - * warehouse). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - - /** - * The database name (BigQuery project ID equivalent in the target data - * warehouse). - * - * Generated from protobuf field string database = 1; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * The database name (BigQuery project ID equivalent in the target data - * warehouse). - * - * Generated from protobuf field string database = 1; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The schema name (BigQuery dataset equivalent in the target data warehouse). - * - * Generated from protobuf field string schema = 2; - * @return string - */ - public function getSchema() - { - return $this->schema; - } - - /** - * The schema name (BigQuery dataset equivalent in the target data warehouse). - * - * Generated from protobuf field string schema = 2; - * @param string $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkString($var, True); - $this->schema = $var; - - return $this; - } - - /** - * The relation name (BigQuery table or view equivalent in the target data - * warehouse). - * - * Generated from protobuf field string relation = 3; - * @return string - */ - public function getRelation() - { - return $this->relation; - } - - /** - * The relation name (BigQuery table or view equivalent in the target data - * warehouse). - * - * Generated from protobuf field string relation = 3; - * @param string $var - * @return $this - */ - public function setRelation($var) - { - GPBUtil::checkString($var, True); - $this->relation = $var; - - return $this; - } - - /** - * The attribute name (BigQuery column equivalent in the target data - * warehouse). - * - * Generated from protobuf field string attribute = 4; - * @return string - */ - public function getAttribute() - { - return $this->attribute; - } - - /** - * The attribute name (BigQuery column equivalent in the target data - * warehouse). - * - * Generated from protobuf field string attribute = 4; - * @param string $var - * @return $this - */ - public function setAttribute($var) - { - GPBUtil::checkString($var, True); - $this->attribute = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NetezzaDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NetezzaDialect.php deleted file mode 100644 index 1a722f2364c1..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/NetezzaDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.NetezzaDialect - */ -class NetezzaDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMapping.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMapping.php deleted file mode 100644 index 8f6205ed4689..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMapping.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.bigquery.migration.v2.ObjectNameMapping - */ -class ObjectNameMapping extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the object in source that is being mapped. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey source = 1; - */ - protected $source = null; - /** - * The desired target name of the object that is being mapped. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingValue target = 2; - */ - protected $target = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Migration\V2\NameMappingKey $source - * The name of the object in source that is being mapped. - * @type \Google\Cloud\BigQuery\Migration\V2\NameMappingValue $target - * The desired target name of the object that is being mapped. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - - /** - * The name of the object in source that is being mapped. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey source = 1; - * @return \Google\Cloud\BigQuery\Migration\V2\NameMappingKey|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * The name of the object in source that is being mapped. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey source = 1; - * @param \Google\Cloud\BigQuery\Migration\V2\NameMappingKey $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\NameMappingKey::class); - $this->source = $var; - - return $this; - } - - /** - * The desired target name of the object that is being mapped. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingValue target = 2; - * @return \Google\Cloud\BigQuery\Migration\V2\NameMappingValue|null - */ - public function getTarget() - { - return $this->target; - } - - public function hasTarget() - { - return isset($this->target); - } - - public function clearTarget() - { - unset($this->target); - } - - /** - * The desired target name of the object that is being mapped. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingValue target = 2; - * @param \Google\Cloud\BigQuery\Migration\V2\NameMappingValue $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\NameMappingValue::class); - $this->target = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMappingList.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMappingList.php deleted file mode 100644 index 6dba3633d75d..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ObjectNameMappingList.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.bigquery.migration.v2.ObjectNameMappingList - */ -class ObjectNameMappingList extends \Google\Protobuf\Internal\Message -{ - /** - * The elements of the object name map. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ObjectNameMapping name_map = 1; - */ - private $name_map; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\Migration\V2\ObjectNameMapping>|\Google\Protobuf\Internal\RepeatedField $name_map - * The elements of the object name map. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - - /** - * The elements of the object name map. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ObjectNameMapping name_map = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNameMap() - { - return $this->name_map; - } - - /** - * The elements of the object name map. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ObjectNameMapping name_map = 1; - * @param array<\Google\Cloud\BigQuery\Migration\V2\ObjectNameMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNameMap($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\ObjectNameMapping::class); - $this->name_map = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/OracleDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/OracleDialect.php deleted file mode 100644 index 3d3708230e6d..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/OracleDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.OracleDialect - */ -class OracleDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Point.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Point.php deleted file mode 100644 index 19294ba7a81d..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/Point.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.bigquery.migration.v2.Point - */ -class Point extends \Google\Protobuf\Internal\Message -{ - /** - * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time does not need to be supplied, but if it is supplied, it must - * equal the end time. For `DELTA` metrics, the start and end time should - * specify a non-zero interval, with subsequent points specifying contiguous - * and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - * time should specify a non-zero interval, with subsequent points specifying - * the same start time and increasing end times, until an event resets the - * cumulative value to zero and sets a new start time for the following - * points. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TimeInterval interval = 1; - */ - protected $interval = null; - /** - * The value of the data point. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TypedValue value = 2; - */ - protected $value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Migration\V2\TimeInterval $interval - * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time does not need to be supplied, but if it is supplied, it must - * equal the end time. For `DELTA` metrics, the start and end time should - * specify a non-zero interval, with subsequent points specifying contiguous - * and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - * time should specify a non-zero interval, with subsequent points specifying - * the same start time and increasing end times, until an event resets the - * cumulative value to zero and sets a new start time for the following - * points. - * @type \Google\Cloud\BigQuery\Migration\V2\TypedValue $value - * The value of the data point. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationMetrics::initOnce(); - parent::__construct($data); - } - - /** - * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time does not need to be supplied, but if it is supplied, it must - * equal the end time. For `DELTA` metrics, the start and end time should - * specify a non-zero interval, with subsequent points specifying contiguous - * and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - * time should specify a non-zero interval, with subsequent points specifying - * the same start time and increasing end times, until an event resets the - * cumulative value to zero and sets a new start time for the following - * points. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TimeInterval interval = 1; - * @return \Google\Cloud\BigQuery\Migration\V2\TimeInterval|null - */ - public function getInterval() - { - return $this->interval; - } - - public function hasInterval() - { - return isset($this->interval); - } - - public function clearInterval() - { - unset($this->interval); - } - - /** - * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time does not need to be supplied, but if it is supplied, it must - * equal the end time. For `DELTA` metrics, the start and end time should - * specify a non-zero interval, with subsequent points specifying contiguous - * and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - * time should specify a non-zero interval, with subsequent points specifying - * the same start time and increasing end times, until an event resets the - * cumulative value to zero and sets a new start time for the following - * points. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TimeInterval interval = 1; - * @param \Google\Cloud\BigQuery\Migration\V2\TimeInterval $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TimeInterval::class); - $this->interval = $var; - - return $this; - } - - /** - * The value of the data point. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TypedValue value = 2; - * @return \Google\Cloud\BigQuery\Migration\V2\TypedValue|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * The value of the data point. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TypedValue value = 2; - * @param \Google\Cloud\BigQuery\Migration\V2\TypedValue $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TypedValue::class); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PostgresqlDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PostgresqlDialect.php deleted file mode 100644 index 9be7ec3ba359..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PostgresqlDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.PostgresqlDialect - */ -class PostgresqlDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PrestoDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PrestoDialect.php deleted file mode 100644 index ede9e320ec01..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/PrestoDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.PrestoDialect - */ -class PrestoDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/RedshiftDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/RedshiftDialect.php deleted file mode 100644 index a2130a53a9af..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/RedshiftDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.RedshiftDialect - */ -class RedshiftDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ResourceErrorDetail.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ResourceErrorDetail.php deleted file mode 100644 index a28217d83d87..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/ResourceErrorDetail.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.bigquery.migration.v2.ResourceErrorDetail - */ -class ResourceErrorDetail extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Information about the resource where the error is located. - * - * Generated from protobuf field .google.rpc.ResourceInfo resource_info = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_info = null; - /** - * Required. The error details for the resource. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ErrorDetail error_details = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $error_details; - /** - * Required. How many errors there are in total for the resource. Truncation - * can be indicated by having an `error_count` that is higher than the size of - * `error_details`. - * - * Generated from protobuf field int32 error_count = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $error_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\ResourceInfo $resource_info - * Required. Information about the resource where the error is located. - * @type array<\Google\Cloud\BigQuery\Migration\V2\ErrorDetail>|\Google\Protobuf\Internal\RepeatedField $error_details - * Required. The error details for the resource. - * @type int $error_count - * Required. How many errors there are in total for the resource. Truncation - * can be indicated by having an `error_count` that is higher than the size of - * `error_details`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationErrorDetails::initOnce(); - parent::__construct($data); - } - - /** - * Required. Information about the resource where the error is located. - * - * Generated from protobuf field .google.rpc.ResourceInfo resource_info = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Rpc\ResourceInfo|null - */ - public function getResourceInfo() - { - return $this->resource_info; - } - - public function hasResourceInfo() - { - return isset($this->resource_info); - } - - public function clearResourceInfo() - { - unset($this->resource_info); - } - - /** - * Required. Information about the resource where the error is located. - * - * Generated from protobuf field .google.rpc.ResourceInfo resource_info = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Rpc\ResourceInfo $var - * @return $this - */ - public function setResourceInfo($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\ResourceInfo::class); - $this->resource_info = $var; - - return $this; - } - - /** - * Required. The error details for the resource. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ErrorDetail error_details = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorDetails() - { - return $this->error_details; - } - - /** - * Required. The error details for the resource. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.ErrorDetail error_details = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\BigQuery\Migration\V2\ErrorDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\ErrorDetail::class); - $this->error_details = $arr; - - return $this; - } - - /** - * Required. How many errors there are in total for the resource. Truncation - * can be indicated by having an `error_count` that is higher than the size of - * `error_details`. - * - * Generated from protobuf field int32 error_count = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getErrorCount() - { - return $this->error_count; - } - - /** - * Required. How many errors there are in total for the resource. Truncation - * can be indicated by having an `error_count` that is higher than the size of - * `error_details`. - * - * Generated from protobuf field int32 error_count = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->error_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLServerDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLServerDialect.php deleted file mode 100644 index f535d05ac4af..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLServerDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.SQLServerDialect - */ -class SQLServerDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLiteDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLiteDialect.php deleted file mode 100644 index 49887f66be65..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SQLiteDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.SQLiteDialect - */ -class SQLiteDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SnowflakeDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SnowflakeDialect.php deleted file mode 100644 index b0edf5c26f67..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SnowflakeDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.SnowflakeDialect - */ -class SnowflakeDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnv.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnv.php deleted file mode 100644 index 83549de530ab..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnv.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.bigquery.migration.v2.SourceEnv - */ -class SourceEnv extends \Google\Protobuf\Internal\Message -{ - /** - * The default database name to fully qualify SQL objects when their database - * name is missing. - * - * Generated from protobuf field string default_database = 1; - */ - protected $default_database = ''; - /** - * The schema search path. When SQL objects are missing schema name, - * translation engine will search through this list to find the value. - * - * Generated from protobuf field repeated string schema_search_path = 2; - */ - private $schema_search_path; - /** - * Optional. Expects a valid BigQuery dataset ID that exists, e.g., - * project-123.metadata_store_123. If specified, translation will search and - * read the required schema information from a metadata store in this dataset. - * If metadata store doesn't exist, translation will parse the metadata file - * and upload the schema info to a temp table in the dataset to speed up - * future translation jobs. - * - * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metadata_store_dataset = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $default_database - * The default database name to fully qualify SQL objects when their database - * name is missing. - * @type array|\Google\Protobuf\Internal\RepeatedField $schema_search_path - * The schema search path. When SQL objects are missing schema name, - * translation engine will search through this list to find the value. - * @type string $metadata_store_dataset - * Optional. Expects a valid BigQuery dataset ID that exists, e.g., - * project-123.metadata_store_123. If specified, translation will search and - * read the required schema information from a metadata store in this dataset. - * If metadata store doesn't exist, translation will parse the metadata file - * and upload the schema info to a temp table in the dataset to speed up - * future translation jobs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - - /** - * The default database name to fully qualify SQL objects when their database - * name is missing. - * - * Generated from protobuf field string default_database = 1; - * @return string - */ - public function getDefaultDatabase() - { - return $this->default_database; - } - - /** - * The default database name to fully qualify SQL objects when their database - * name is missing. - * - * Generated from protobuf field string default_database = 1; - * @param string $var - * @return $this - */ - public function setDefaultDatabase($var) - { - GPBUtil::checkString($var, True); - $this->default_database = $var; - - return $this; - } - - /** - * The schema search path. When SQL objects are missing schema name, - * translation engine will search through this list to find the value. - * - * Generated from protobuf field repeated string schema_search_path = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSchemaSearchPath() - { - return $this->schema_search_path; - } - - /** - * The schema search path. When SQL objects are missing schema name, - * translation engine will search through this list to find the value. - * - * Generated from protobuf field repeated string schema_search_path = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSchemaSearchPath($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->schema_search_path = $arr; - - return $this; - } - - /** - * Optional. Expects a valid BigQuery dataset ID that exists, e.g., - * project-123.metadata_store_123. If specified, translation will search and - * read the required schema information from a metadata store in this dataset. - * If metadata store doesn't exist, translation will parse the metadata file - * and upload the schema info to a temp table in the dataset to speed up - * future translation jobs. - * - * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMetadataStoreDataset() - { - return $this->metadata_store_dataset; - } - - /** - * Optional. Expects a valid BigQuery dataset ID that exists, e.g., - * project-123.metadata_store_123. If specified, translation will search and - * read the required schema information from a metadata store in this dataset. - * If metadata store doesn't exist, translation will parse the metadata file - * and upload the schema info to a temp table in the dataset to speed up - * future translation jobs. - * - * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMetadataStoreDataset($var) - { - GPBUtil::checkString($var, True); - $this->metadata_store_dataset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnvironment.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnvironment.php deleted file mode 100644 index 95e9b3842155..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceEnvironment.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.bigquery.migration.v2.SourceEnvironment - */ -class SourceEnvironment extends \Google\Protobuf\Internal\Message -{ - /** - * The default database name to fully qualify SQL objects when their database - * name is missing. - * - * Generated from protobuf field string default_database = 1; - */ - protected $default_database = ''; - /** - * The schema search path. When SQL objects are missing schema name, - * translation engine will search through this list to find the value. - * - * Generated from protobuf field repeated string schema_search_path = 2; - */ - private $schema_search_path; - /** - * Optional. Expects a validQ BigQuery dataset ID that exists, e.g., - * project-123.metadata_store_123. If specified, translation will search and - * read the required schema information from a metadata store in this dataset. - * If metadata store doesn't exist, translation will parse the metadata file - * and upload the schema info to a temp table in the dataset to speed up - * future translation jobs. - * - * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metadata_store_dataset = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $default_database - * The default database name to fully qualify SQL objects when their database - * name is missing. - * @type array|\Google\Protobuf\Internal\RepeatedField $schema_search_path - * The schema search path. When SQL objects are missing schema name, - * translation engine will search through this list to find the value. - * @type string $metadata_store_dataset - * Optional. Expects a validQ BigQuery dataset ID that exists, e.g., - * project-123.metadata_store_123. If specified, translation will search and - * read the required schema information from a metadata store in this dataset. - * If metadata store doesn't exist, translation will parse the metadata file - * and upload the schema info to a temp table in the dataset to speed up - * future translation jobs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); - parent::__construct($data); - } - - /** - * The default database name to fully qualify SQL objects when their database - * name is missing. - * - * Generated from protobuf field string default_database = 1; - * @return string - */ - public function getDefaultDatabase() - { - return $this->default_database; - } - - /** - * The default database name to fully qualify SQL objects when their database - * name is missing. - * - * Generated from protobuf field string default_database = 1; - * @param string $var - * @return $this - */ - public function setDefaultDatabase($var) - { - GPBUtil::checkString($var, True); - $this->default_database = $var; - - return $this; - } - - /** - * The schema search path. When SQL objects are missing schema name, - * translation engine will search through this list to find the value. - * - * Generated from protobuf field repeated string schema_search_path = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSchemaSearchPath() - { - return $this->schema_search_path; - } - - /** - * The schema search path. When SQL objects are missing schema name, - * translation engine will search through this list to find the value. - * - * Generated from protobuf field repeated string schema_search_path = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSchemaSearchPath($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->schema_search_path = $arr; - - return $this; - } - - /** - * Optional. Expects a validQ BigQuery dataset ID that exists, e.g., - * project-123.metadata_store_123. If specified, translation will search and - * read the required schema information from a metadata store in this dataset. - * If metadata store doesn't exist, translation will parse the metadata file - * and upload the schema info to a temp table in the dataset to speed up - * future translation jobs. - * - * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMetadataStoreDataset() - { - return $this->metadata_store_dataset; - } - - /** - * Optional. Expects a validQ BigQuery dataset ID that exists, e.g., - * project-123.metadata_store_123. If specified, translation will search and - * read the required schema information from a metadata store in this dataset. - * If metadata store doesn't exist, translation will parse the metadata file - * and upload the schema info to a temp table in the dataset to speed up - * future translation jobs. - * - * Generated from protobuf field string metadata_store_dataset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMetadataStoreDataset($var) - { - GPBUtil::checkString($var, True); - $this->metadata_store_dataset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceSpec.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceSpec.php deleted file mode 100644 index 143506f1f801..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceSpec.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.bigquery.migration.v2.SourceSpec - */ -class SourceSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The optional field to specify the encoding of the sql bytes. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $base_uri - * The base URI for all files to be read in as sources for translation. - * @type \Google\Cloud\BigQuery\Migration\V2\Literal $literal - * Source literal. - * @type string $encoding - * Optional. The optional field to specify the encoding of the sql bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); - parent::__construct($data); - } - - /** - * The base URI for all files to be read in as sources for translation. - * - * Generated from protobuf field string base_uri = 1; - * @return string - */ - public function getBaseUri() - { - return $this->readOneof(1); - } - - public function hasBaseUri() - { - return $this->hasOneof(1); - } - - /** - * The base URI for all files to be read in as sources for translation. - * - * Generated from protobuf field string base_uri = 1; - * @param string $var - * @return $this - */ - public function setBaseUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Source literal. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.Literal literal = 2; - * @return \Google\Cloud\BigQuery\Migration\V2\Literal|null - */ - public function getLiteral() - { - return $this->readOneof(2); - } - - public function hasLiteral() - { - return $this->hasOneof(2); - } - - /** - * Source literal. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.Literal literal = 2; - * @param \Google\Cloud\BigQuery\Migration\V2\Literal $var - * @return $this - */ - public function setLiteral($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\Literal::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. The optional field to specify the encoding of the sql bytes. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The optional field to specify the encoding of the sql bytes. - * - * 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; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceTargetMapping.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceTargetMapping.php deleted file mode 100644 index 6748f2073f03..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SourceTargetMapping.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.bigquery.migration.v2.SourceTargetMapping - */ -class SourceTargetMapping extends \Google\Protobuf\Internal\Message -{ - /** - * The source SQL or the path to it. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceSpec source_spec = 1; - */ - protected $source_spec = null; - /** - * The target SQL or the path for it. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TargetSpec target_spec = 2; - */ - protected $target_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Migration\V2\SourceSpec $source_spec - * The source SQL or the path to it. - * @type \Google\Cloud\BigQuery\Migration\V2\TargetSpec $target_spec - * The target SQL or the path for it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); - parent::__construct($data); - } - - /** - * The source SQL or the path to it. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceSpec source_spec = 1; - * @return \Google\Cloud\BigQuery\Migration\V2\SourceSpec|null - */ - public function getSourceSpec() - { - return $this->source_spec; - } - - public function hasSourceSpec() - { - return isset($this->source_spec); - } - - public function clearSourceSpec() - { - unset($this->source_spec); - } - - /** - * The source SQL or the path to it. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceSpec source_spec = 1; - * @param \Google\Cloud\BigQuery\Migration\V2\SourceSpec $var - * @return $this - */ - public function setSourceSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SourceSpec::class); - $this->source_spec = $var; - - return $this; - } - - /** - * The target SQL or the path for it. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TargetSpec target_spec = 2; - * @return \Google\Cloud\BigQuery\Migration\V2\TargetSpec|null - */ - public function getTargetSpec() - { - return $this->target_spec; - } - - public function hasTargetSpec() - { - return isset($this->target_spec); - } - - public function clearTargetSpec() - { - unset($this->target_spec); - } - - /** - * The target SQL or the path for it. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TargetSpec target_spec = 2; - * @param \Google\Cloud\BigQuery\Migration\V2\TargetSpec $var - * @return $this - */ - public function setTargetSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\TargetSpec::class); - $this->target_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SparkSQLDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SparkSQLDialect.php deleted file mode 100644 index a933fa68324d..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/SparkSQLDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.SparkSQLDialect - */ -class SparkSQLDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/StartMigrationWorkflowRequest.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/StartMigrationWorkflowRequest.php deleted file mode 100644 index 28129d124acf..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/StartMigrationWorkflowRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - */ -class StartMigrationWorkflowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * Please see {@see MigrationServiceClient::migrationWorkflowName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Migration\V2\StartMigrationWorkflowRequest - * - * @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 unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * - * 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/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TargetSpec.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TargetSpec.php deleted file mode 100644 index 81a5fa9cf538..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TargetSpec.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.bigquery.migration.v2.TargetSpec - */ -class TargetSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The relative path for the target data. Given source file - * `base_uri/input/sql`, the output would be - * `target_base_uri/sql/relative_path/input.sql`. - * - * Generated from protobuf field string relative_path = 1; - */ - protected $relative_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $relative_path - * The relative path for the target data. Given source file - * `base_uri/input/sql`, the output would be - * `target_base_uri/sql/relative_path/input.sql`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); - parent::__construct($data); - } - - /** - * The relative path for the target data. Given source file - * `base_uri/input/sql`, the output would be - * `target_base_uri/sql/relative_path/input.sql`. - * - * Generated from protobuf field string relative_path = 1; - * @return string - */ - public function getRelativePath() - { - return $this->relative_path; - } - - /** - * The relative path for the target data. Given source file - * `base_uri/input/sql`, the output would be - * `target_base_uri/sql/relative_path/input.sql`. - * - * Generated from protobuf field string relative_path = 1; - * @param string $var - * @return $this - */ - public function setRelativePath($var) - { - GPBUtil::checkString($var, True); - $this->relative_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect.php deleted file mode 100644 index b50e261eeb92..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.migration.v2.TeradataDialect - */ -class TeradataDialect extends \Google\Protobuf\Internal\Message -{ - /** - * Which Teradata sub-dialect mode the user specifies. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect.Mode mode = 1; - */ - protected $mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * Which Teradata sub-dialect mode the user specifies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - - /** - * Which Teradata sub-dialect mode the user specifies. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect.Mode mode = 1; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Which Teradata sub-dialect mode the user specifies. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TeradataDialect.Mode mode = 1; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\TeradataDialect\Mode::class); - $this->mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect/Mode.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect/Mode.php deleted file mode 100644 index 8565d3737289..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TeradataDialect/Mode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.bigquery.migration.v2.TeradataDialect.Mode - */ -class Mode -{ - /** - * Unspecified mode. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Teradata SQL mode. - * - * Generated from protobuf enum SQL = 1; - */ - const SQL = 1; - /** - * BTEQ mode (which includes SQL). - * - * Generated from protobuf enum BTEQ = 2; - */ - const BTEQ = 2; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::SQL => 'SQL', - self::BTEQ => 'BTEQ', - ]; - - 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\BigQuery\Migration\V2\TeradataDialect_Mode::class); - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeInterval.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeInterval.php deleted file mode 100644 index ecb718c94a98..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeInterval.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.bigquery.migration.v2.TimeInterval - */ -class TimeInterval extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The beginning of the time interval. The default value - * for the start time is the end time. The start time must not be - * later than the end time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $start_time = null; - /** - * Required. The end of the time interval. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Optional. The beginning of the time interval. The default value - * for the start time is the end time. The start time must not be - * later than the end time. - * @type \Google\Protobuf\Timestamp $end_time - * Required. The end of the time interval. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The beginning of the time interval. The default value - * for the start time is the end time. The start time must not be - * later than the end time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.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 beginning of the time interval. The default value - * for the start time is the end time. The start time must not be - * later than the end time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.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; - } - - /** - * Required. The end of the time interval. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The end of the time interval. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeSeries.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeSeries.php deleted file mode 100644 index 2ea97494c4de..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TimeSeries.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.bigquery.migration.v2.TimeSeries - */ -class TimeSeries extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the metric. - * If the metric is not known by the service yet, it will be auto-created. - * - * Generated from protobuf field string metric = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $metric = ''; - /** - * Required. The value type of the time series. - * - * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value_type = 0; - /** - * Optional. The metric kind of the time series. - * If present, it must be the same as the metric kind of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * this field specifies the metric kind of the new descriptor and must be - * either `GAUGE` (the default) or `CUMULATIVE`. - * - * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metric_kind = 0; - /** - * Required. The data points of this time series. When listing time series, - * points are returned in reverse time order. - * When creating a time series, this field must contain exactly one point and - * the point's type must be the same as the value type of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * the value type of the descriptor is determined by the point's type, which - * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $points; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metric - * Required. The name of the metric. - * If the metric is not known by the service yet, it will be auto-created. - * @type int $value_type - * Required. The value type of the time series. - * @type int $metric_kind - * Optional. The metric kind of the time series. - * If present, it must be the same as the metric kind of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * this field specifies the metric kind of the new descriptor and must be - * either `GAUGE` (the default) or `CUMULATIVE`. - * @type array<\Google\Cloud\BigQuery\Migration\V2\Point>|\Google\Protobuf\Internal\RepeatedField $points - * Required. The data points of this time series. When listing time series, - * points are returned in reverse time order. - * When creating a time series, this field must contain exactly one point and - * the point's type must be the same as the value type of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * the value type of the descriptor is determined by the point's type, which - * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the metric. - * If the metric is not known by the service yet, it will be auto-created. - * - * Generated from protobuf field string metric = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMetric() - { - return $this->metric; - } - - /** - * Required. The name of the metric. - * If the metric is not known by the service yet, it will be auto-created. - * - * Generated from protobuf field string metric = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMetric($var) - { - GPBUtil::checkString($var, True); - $this->metric = $var; - - return $this; - } - - /** - * Required. The value type of the time series. - * - * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getValueType() - { - return $this->value_type; - } - - /** - * Required. The value type of the time series. - * - * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setValueType($var) - { - GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\ValueType::class); - $this->value_type = $var; - - return $this; - } - - /** - * Optional. The metric kind of the time series. - * If present, it must be the same as the metric kind of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * this field specifies the metric kind of the new descriptor and must be - * either `GAUGE` (the default) or `CUMULATIVE`. - * - * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMetricKind() - { - return $this->metric_kind; - } - - /** - * Optional. The metric kind of the time series. - * If present, it must be the same as the metric kind of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * this field specifies the metric kind of the new descriptor and must be - * either `GAUGE` (the default) or `CUMULATIVE`. - * - * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMetricKind($var) - { - GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\MetricKind::class); - $this->metric_kind = $var; - - return $this; - } - - /** - * Required. The data points of this time series. When listing time series, - * points are returned in reverse time order. - * When creating a time series, this field must contain exactly one point and - * the point's type must be the same as the value type of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * the value type of the descriptor is determined by the point's type, which - * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPoints() - { - return $this->points; - } - - /** - * Required. The data points of this time series. When listing time series, - * points are returned in reverse time order. - * When creating a time series, this field must contain exactly one point and - * the point's type must be the same as the value type of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * the value type of the descriptor is determined by the point's type, which - * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\BigQuery\Migration\V2\Point>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\Point::class); - $this->points = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationConfigDetails.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationConfigDetails.php deleted file mode 100644 index 73e902b8d2f1..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationConfigDetails.php +++ /dev/null @@ -1,372 +0,0 @@ -google.cloud.bigquery.migration.v2.TranslationConfigDetails - */ -class TranslationConfigDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The dialect of the input files. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect source_dialect = 3; - */ - protected $source_dialect = null; - /** - * The target dialect for the engine to translate the input to. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect target_dialect = 4; - */ - protected $target_dialect = null; - /** - * The default source environment values for the translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnv source_env = 6; - */ - protected $source_env = null; - /** - * The indicator to show translation request initiator. - * - * Generated from protobuf field string request_source = 8; - */ - protected $request_source = ''; - /** - * The types of output to generate, e.g. sql, metadata etc. If not specified, - * a default set of targets will be generated. Some additional target types - * may be slower to generate. See the documentation for the set of available - * target types. - * - * Generated from protobuf field repeated string target_types = 9; - */ - private $target_types; - protected $source_location; - protected $target_location; - protected $output_name_mapping; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_source_path - * The Cloud Storage path for a directory of files to translate in a task. - * @type string $gcs_target_path - * The Cloud Storage path to write back the corresponding input files to. - * @type \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList $name_mapping_list - * The mapping of objects to their desired output names in list form. - * @type \Google\Cloud\BigQuery\Migration\V2\Dialect $source_dialect - * The dialect of the input files. - * @type \Google\Cloud\BigQuery\Migration\V2\Dialect $target_dialect - * The target dialect for the engine to translate the input to. - * @type \Google\Cloud\BigQuery\Migration\V2\SourceEnv $source_env - * The default source environment values for the translation. - * @type string $request_source - * The indicator to show translation request initiator. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_types - * The types of output to generate, e.g. sql, metadata etc. If not specified, - * a default set of targets will be generated. Some additional target types - * may be slower to generate. See the documentation for the set of available - * target types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage path for a directory of files to translate in a task. - * - * Generated from protobuf field string gcs_source_path = 1; - * @return string - */ - public function getGcsSourcePath() - { - return $this->readOneof(1); - } - - public function hasGcsSourcePath() - { - return $this->hasOneof(1); - } - - /** - * The Cloud Storage path for a directory of files to translate in a task. - * - * Generated from protobuf field string gcs_source_path = 1; - * @param string $var - * @return $this - */ - public function setGcsSourcePath($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The Cloud Storage path to write back the corresponding input files to. - * - * Generated from protobuf field string gcs_target_path = 2; - * @return string - */ - public function getGcsTargetPath() - { - return $this->readOneof(2); - } - - public function hasGcsTargetPath() - { - return $this->hasOneof(2); - } - - /** - * The Cloud Storage path to write back the corresponding input files to. - * - * Generated from protobuf field string gcs_target_path = 2; - * @param string $var - * @return $this - */ - public function setGcsTargetPath($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The mapping of objects to their desired output names in list form. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.ObjectNameMappingList name_mapping_list = 5; - * @return \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList|null - */ - public function getNameMappingList() - { - return $this->readOneof(5); - } - - public function hasNameMappingList() - { - return $this->hasOneof(5); - } - - /** - * The mapping of objects to their desired output names in list form. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.ObjectNameMappingList name_mapping_list = 5; - * @param \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList $var - * @return $this - */ - public function setNameMappingList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The dialect of the input files. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect source_dialect = 3; - * @return \Google\Cloud\BigQuery\Migration\V2\Dialect|null - */ - public function getSourceDialect() - { - return $this->source_dialect; - } - - public function hasSourceDialect() - { - return isset($this->source_dialect); - } - - public function clearSourceDialect() - { - unset($this->source_dialect); - } - - /** - * The dialect of the input files. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect source_dialect = 3; - * @param \Google\Cloud\BigQuery\Migration\V2\Dialect $var - * @return $this - */ - public function setSourceDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\Dialect::class); - $this->source_dialect = $var; - - return $this; - } - - /** - * The target dialect for the engine to translate the input to. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect target_dialect = 4; - * @return \Google\Cloud\BigQuery\Migration\V2\Dialect|null - */ - public function getTargetDialect() - { - return $this->target_dialect; - } - - public function hasTargetDialect() - { - return isset($this->target_dialect); - } - - public function clearTargetDialect() - { - unset($this->target_dialect); - } - - /** - * The target dialect for the engine to translate the input to. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.Dialect target_dialect = 4; - * @param \Google\Cloud\BigQuery\Migration\V2\Dialect $var - * @return $this - */ - public function setTargetDialect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\Dialect::class); - $this->target_dialect = $var; - - return $this; - } - - /** - * The default source environment values for the translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnv source_env = 6; - * @return \Google\Cloud\BigQuery\Migration\V2\SourceEnv|null - */ - public function getSourceEnv() - { - return $this->source_env; - } - - public function hasSourceEnv() - { - return isset($this->source_env); - } - - public function clearSourceEnv() - { - unset($this->source_env); - } - - /** - * The default source environment values for the translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnv source_env = 6; - * @param \Google\Cloud\BigQuery\Migration\V2\SourceEnv $var - * @return $this - */ - public function setSourceEnv($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SourceEnv::class); - $this->source_env = $var; - - return $this; - } - - /** - * The indicator to show translation request initiator. - * - * Generated from protobuf field string request_source = 8; - * @return string - */ - public function getRequestSource() - { - return $this->request_source; - } - - /** - * The indicator to show translation request initiator. - * - * Generated from protobuf field string request_source = 8; - * @param string $var - * @return $this - */ - public function setRequestSource($var) - { - GPBUtil::checkString($var, True); - $this->request_source = $var; - - return $this; - } - - /** - * The types of output to generate, e.g. sql, metadata etc. If not specified, - * a default set of targets will be generated. Some additional target types - * may be slower to generate. See the documentation for the set of available - * target types. - * - * Generated from protobuf field repeated string target_types = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetTypes() - { - return $this->target_types; - } - - /** - * The types of output to generate, e.g. sql, metadata etc. If not specified, - * a default set of targets will be generated. Some additional target types - * may be slower to generate. See the documentation for the set of available - * target types. - * - * Generated from protobuf field repeated string target_types = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_types = $arr; - - return $this; - } - - /** - * @return string - */ - public function getSourceLocation() - { - return $this->whichOneof("source_location"); - } - - /** - * @return string - */ - public function getTargetLocation() - { - return $this->whichOneof("target_location"); - } - - /** - * @return string - */ - public function getOutputNameMapping() - { - return $this->whichOneof("output_name_mapping"); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationDetails.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationDetails.php deleted file mode 100644 index 3b03ce6d4ce4..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationDetails.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.bigquery.migration.v2.TranslationDetails - */ -class TranslationDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The mapping from source to target SQL. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.SourceTargetMapping source_target_mapping = 1; - */ - private $source_target_mapping; - /** - * The base URI for all writes to persistent storage. - * - * Generated from protobuf field string target_base_uri = 2; - */ - protected $target_base_uri = ''; - /** - * The default source environment values for the translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnvironment source_environment = 3; - */ - protected $source_environment = null; - /** - * The list of literal targets that will be directly returned to the response. - * Each entry consists of the constructed path, EXCLUDING the base path. Not - * providing a target_base_uri will prevent writing to persistent storage. - * - * Generated from protobuf field repeated string target_return_literals = 4; - */ - private $target_return_literals; - /** - * The types of output to generate, e.g. sql, metadata, - * lineage_from_sql_scripts, etc. If not specified, a default set of - * targets will be generated. Some additional target types may be slower to - * generate. See the documentation for the set of available target types. - * - * Generated from protobuf field repeated string target_types = 5; - */ - private $target_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping>|\Google\Protobuf\Internal\RepeatedField $source_target_mapping - * The mapping from source to target SQL. - * @type string $target_base_uri - * The base URI for all writes to persistent storage. - * @type \Google\Cloud\BigQuery\Migration\V2\SourceEnvironment $source_environment - * The default source environment values for the translation. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_return_literals - * The list of literal targets that will be directly returned to the response. - * Each entry consists of the constructed path, EXCLUDING the base path. Not - * providing a target_base_uri will prevent writing to persistent storage. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_types - * The types of output to generate, e.g. sql, metadata, - * lineage_from_sql_scripts, etc. If not specified, a default set of - * targets will be generated. Some additional target types may be slower to - * generate. See the documentation for the set of available target types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); - parent::__construct($data); - } - - /** - * The mapping from source to target SQL. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.SourceTargetMapping source_target_mapping = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSourceTargetMapping() - { - return $this->source_target_mapping; - } - - /** - * The mapping from source to target SQL. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.SourceTargetMapping source_target_mapping = 1; - * @param array<\Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSourceTargetMapping($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping::class); - $this->source_target_mapping = $arr; - - return $this; - } - - /** - * The base URI for all writes to persistent storage. - * - * Generated from protobuf field string target_base_uri = 2; - * @return string - */ - public function getTargetBaseUri() - { - return $this->target_base_uri; - } - - /** - * The base URI for all writes to persistent storage. - * - * Generated from protobuf field string target_base_uri = 2; - * @param string $var - * @return $this - */ - public function setTargetBaseUri($var) - { - GPBUtil::checkString($var, True); - $this->target_base_uri = $var; - - return $this; - } - - /** - * The default source environment values for the translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnvironment source_environment = 3; - * @return \Google\Cloud\BigQuery\Migration\V2\SourceEnvironment|null - */ - public function getSourceEnvironment() - { - return $this->source_environment; - } - - public function hasSourceEnvironment() - { - return isset($this->source_environment); - } - - public function clearSourceEnvironment() - { - unset($this->source_environment); - } - - /** - * The default source environment values for the translation. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.SourceEnvironment source_environment = 3; - * @param \Google\Cloud\BigQuery\Migration\V2\SourceEnvironment $var - * @return $this - */ - public function setSourceEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SourceEnvironment::class); - $this->source_environment = $var; - - return $this; - } - - /** - * The list of literal targets that will be directly returned to the response. - * Each entry consists of the constructed path, EXCLUDING the base path. Not - * providing a target_base_uri will prevent writing to persistent storage. - * - * Generated from protobuf field repeated string target_return_literals = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetReturnLiterals() - { - return $this->target_return_literals; - } - - /** - * The list of literal targets that will be directly returned to the response. - * Each entry consists of the constructed path, EXCLUDING the base path. Not - * providing a target_base_uri will prevent writing to persistent storage. - * - * Generated from protobuf field repeated string target_return_literals = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetReturnLiterals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_return_literals = $arr; - - return $this; - } - - /** - * The types of output to generate, e.g. sql, metadata, - * lineage_from_sql_scripts, etc. If not specified, a default set of - * targets will be generated. Some additional target types may be slower to - * generate. See the documentation for the set of available target types. - * - * Generated from protobuf field repeated string target_types = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetTypes() - { - return $this->target_types; - } - - /** - * The types of output to generate, e.g. sql, metadata, - * lineage_from_sql_scripts, etc. If not specified, a default set of - * targets will be generated. Some additional target types may be slower to - * generate. See the documentation for the set of available target types. - * - * Generated from protobuf field repeated string target_types = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord.php deleted file mode 100644 index 4f2bf754676d..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.bigquery.migration.v2.TranslationReportRecord - */ -class TranslationReportRecord extends \Google\Protobuf\Internal\Message -{ - /** - * Severity of the translation record. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity severity = 1; - */ - protected $severity = 0; - /** - * Specifies the row from the source text where the error occurred (0 based). - * Example: 2 - * - * Generated from protobuf field int32 script_line = 2; - */ - protected $script_line = 0; - /** - * Specifies the column from the source texts where the error occurred. (0 - * based) example: 6 - * - * Generated from protobuf field int32 script_column = 3; - */ - protected $script_column = 0; - /** - * Category of the error/warning. Example: SyntaxError - * - * Generated from protobuf field string category = 4; - */ - protected $category = ''; - /** - * Detailed message of the record. - * - * Generated from protobuf field string message = 5; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $severity - * Severity of the translation record. - * @type int $script_line - * Specifies the row from the source text where the error occurred (0 based). - * Example: 2 - * @type int $script_column - * Specifies the column from the source texts where the error occurred. (0 - * based) example: 6 - * @type string $category - * Category of the error/warning. Example: SyntaxError - * @type string $message - * Detailed message of the record. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationSuggestion::initOnce(); - parent::__construct($data); - } - - /** - * Severity of the translation record. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity severity = 1; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Severity of the translation record. - * - * Generated from protobuf field .google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity severity = 1; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\TranslationReportRecord\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Specifies the row from the source text where the error occurred (0 based). - * Example: 2 - * - * Generated from protobuf field int32 script_line = 2; - * @return int - */ - public function getScriptLine() - { - return $this->script_line; - } - - /** - * Specifies the row from the source text where the error occurred (0 based). - * Example: 2 - * - * Generated from protobuf field int32 script_line = 2; - * @param int $var - * @return $this - */ - public function setScriptLine($var) - { - GPBUtil::checkInt32($var); - $this->script_line = $var; - - return $this; - } - - /** - * Specifies the column from the source texts where the error occurred. (0 - * based) example: 6 - * - * Generated from protobuf field int32 script_column = 3; - * @return int - */ - public function getScriptColumn() - { - return $this->script_column; - } - - /** - * Specifies the column from the source texts where the error occurred. (0 - * based) example: 6 - * - * Generated from protobuf field int32 script_column = 3; - * @param int $var - * @return $this - */ - public function setScriptColumn($var) - { - GPBUtil::checkInt32($var); - $this->script_column = $var; - - return $this; - } - - /** - * Category of the error/warning. Example: SyntaxError - * - * Generated from protobuf field string category = 4; - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * Category of the error/warning. Example: SyntaxError - * - * Generated from protobuf field string category = 4; - * @param string $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkString($var, True); - $this->category = $var; - - return $this; - } - - /** - * Detailed message of the record. - * - * Generated from protobuf field string message = 5; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Detailed message of the record. - * - * Generated from protobuf field string message = 5; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord/Severity.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord/Severity.php deleted file mode 100644 index 52cf5ab95075..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationReportRecord/Severity.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity - */ -class Severity -{ - /** - * SeverityType not specified. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * INFO type. - * - * Generated from protobuf enum INFO = 1; - */ - const INFO = 1; - /** - * WARNING type. The translated query may still provide useful information - * if all the report records are WARNING. - * - * Generated from protobuf enum WARNING = 2; - */ - const WARNING = 2; - /** - * ERROR type. Translation failed. - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::INFO => 'INFO', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Severity::class, \Google\Cloud\BigQuery\Migration\V2\TranslationReportRecord_Severity::class); - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationTaskResult.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationTaskResult.php deleted file mode 100644 index 7f35cd749ddc..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TranslationTaskResult.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.bigquery.migration.v2.TranslationTaskResult - */ -class TranslationTaskResult extends \Google\Protobuf\Internal\Message -{ - /** - * The list of the translated literals. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Literal translated_literals = 1; - */ - private $translated_literals; - /** - * The records from the aggregate CSV report for a migration workflow. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.GcsReportLogMessage report_log_messages = 2; - */ - private $report_log_messages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\Migration\V2\Literal>|\Google\Protobuf\Internal\RepeatedField $translated_literals - * The list of the translated literals. - * @type array<\Google\Cloud\BigQuery\Migration\V2\GcsReportLogMessage>|\Google\Protobuf\Internal\RepeatedField $report_log_messages - * The records from the aggregate CSV report for a migration workflow. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationEntities::initOnce(); - parent::__construct($data); - } - - /** - * The list of the translated literals. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Literal translated_literals = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTranslatedLiterals() - { - return $this->translated_literals; - } - - /** - * The list of the translated literals. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.Literal translated_literals = 1; - * @param array<\Google\Cloud\BigQuery\Migration\V2\Literal>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTranslatedLiterals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\Literal::class); - $this->translated_literals = $arr; - - return $this; - } - - /** - * The records from the aggregate CSV report for a migration workflow. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.GcsReportLogMessage report_log_messages = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReportLogMessages() - { - return $this->report_log_messages; - } - - /** - * The records from the aggregate CSV report for a migration workflow. - * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.GcsReportLogMessage report_log_messages = 2; - * @param array<\Google\Cloud\BigQuery\Migration\V2\GcsReportLogMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReportLogMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\GcsReportLogMessage::class); - $this->report_log_messages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TypedValue.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TypedValue.php deleted file mode 100644 index f1f140446f87..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/TypedValue.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.bigquery.migration.v2.TypedValue - */ -class TypedValue extends \Google\Protobuf\Internal\Message -{ - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $bool_value - * A Boolean value: `true` or `false`. - * @type int|string $int64_value - * A 64-bit integer. Its range is approximately `+/-9.2x10^18`. - * @type float $double_value - * A 64-bit double-precision floating-point number. Its magnitude - * is approximately `+/-10^(+/-300)` and it has 16 significant digits of - * precision. - * @type string $string_value - * A variable-length string value. - * @type \Google\Api\Distribution $distribution_value - * A distribution value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationMetrics::initOnce(); - parent::__construct($data); - } - - /** - * A Boolean value: `true` or `false`. - * - * Generated from protobuf field bool bool_value = 1; - * @return bool - */ - public function getBoolValue() - { - return $this->readOneof(1); - } - - public function hasBoolValue() - { - return $this->hasOneof(1); - } - - /** - * A Boolean value: `true` or `false`. - * - * Generated from protobuf field bool bool_value = 1; - * @param bool $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A 64-bit integer. Its range is approximately `+/-9.2x10^18`. - * - * Generated from protobuf field int64 int64_value = 2; - * @return int|string - */ - public function getInt64Value() - { - return $this->readOneof(2); - } - - public function hasInt64Value() - { - return $this->hasOneof(2); - } - - /** - * A 64-bit integer. Its range is approximately `+/-9.2x10^18`. - * - * Generated from protobuf field int64 int64_value = 2; - * @param int|string $var - * @return $this - */ - public function setInt64Value($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A 64-bit double-precision floating-point number. Its magnitude - * is approximately `+/-10^(+/-300)` and it has 16 significant digits of - * precision. - * - * Generated from protobuf field double double_value = 3; - * @return float - */ - public function getDoubleValue() - { - return $this->readOneof(3); - } - - public function hasDoubleValue() - { - return $this->hasOneof(3); - } - - /** - * A 64-bit double-precision floating-point number. Its magnitude - * is approximately `+/-10^(+/-300)` and it has 16 significant digits of - * precision. - * - * Generated from protobuf field double double_value = 3; - * @param float $var - * @return $this - */ - public function setDoubleValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A variable-length string value. - * - * Generated from protobuf field string string_value = 4; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(4); - } - - public function hasStringValue() - { - return $this->hasOneof(4); - } - - /** - * A variable-length string value. - * - * Generated from protobuf field string string_value = 4; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A distribution value. - * - * Generated from protobuf field .google.api.Distribution distribution_value = 5; - * @return \Google\Api\Distribution|null - */ - public function getDistributionValue() - { - return $this->readOneof(5); - } - - public function hasDistributionValue() - { - return $this->hasOneof(5); - } - - /** - * A distribution value. - * - * Generated from protobuf field .google.api.Distribution distribution_value = 5; - * @param \Google\Api\Distribution $var - * @return $this - */ - public function setDistributionValue($var) - { - GPBUtil::checkMessage($var, \Google\Api\Distribution::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/VerticaDialect.php b/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/VerticaDialect.php deleted file mode 100644 index c00c7444c8b1..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/proto/src/Google/Cloud/BigQuery/Migration/V2/VerticaDialect.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.bigquery.migration.v2.VerticaDialect - */ -class VerticaDialect extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/create_migration_workflow.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/create_migration_workflow.php deleted file mode 100644 index 7ac5039b3269..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/create_migration_workflow.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setMigrationWorkflow($migrationWorkflow); - - // Call the API and handle any network failures. - try { - /** @var MigrationWorkflow $response */ - $response = $migrationServiceClient->createMigrationWorkflow($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 = MigrationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_migration_workflow_sample($formattedParent); -} -// [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/delete_migration_workflow.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/delete_migration_workflow.php deleted file mode 100644 index 4e68d8af9c8f..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/delete_migration_workflow.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $migrationServiceClient->deleteMigrationWorkflow($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 = MigrationServiceClient::migrationWorkflowName( - '[PROJECT]', - '[LOCATION]', - '[WORKFLOW]' - ); - - delete_migration_workflow_sample($formattedName); -} -// [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_subtask.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_subtask.php deleted file mode 100644 index 7deb48d19f70..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_subtask.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var MigrationSubtask $response */ - $response = $migrationServiceClient->getMigrationSubtask($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 = MigrationServiceClient::migrationSubtaskName( - '[PROJECT]', - '[LOCATION]', - '[WORKFLOW]', - '[SUBTASK]' - ); - - get_migration_subtask_sample($formattedName); -} -// [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_workflow.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_workflow.php deleted file mode 100644 index 15b66eb6713e..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/get_migration_workflow.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var MigrationWorkflow $response */ - $response = $migrationServiceClient->getMigrationWorkflow($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 = MigrationServiceClient::migrationWorkflowName( - '[PROJECT]', - '[LOCATION]', - '[WORKFLOW]' - ); - - get_migration_workflow_sample($formattedName); -} -// [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_subtasks.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_subtasks.php deleted file mode 100644 index b7ccdc34948f..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_subtasks.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationServiceClient->listMigrationSubtasks($request); - - /** @var MigrationSubtask $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 = MigrationServiceClient::migrationWorkflowName( - '[PROJECT]', - '[LOCATION]', - '[WORKFLOW]' - ); - - list_migration_subtasks_sample($formattedParent); -} -// [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_workflows.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_workflows.php deleted file mode 100644 index 8c4720d6cb52..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/list_migration_workflows.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationServiceClient->listMigrationWorkflows($request); - - /** @var MigrationWorkflow $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 = MigrationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_migration_workflows_sample($formattedParent); -} -// [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/start_migration_workflow.php b/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/start_migration_workflow.php deleted file mode 100644 index fe557b31bd70..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/samples/V2/MigrationServiceClient/start_migration_workflow.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $migrationServiceClient->startMigrationWorkflow($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 = MigrationServiceClient::migrationWorkflowName( - '[PROJECT]', - '[LOCATION]', - '[WORKFLOW]' - ); - - start_migration_workflow_sample($formattedName); -} -// [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/Client/MigrationServiceClient.php b/owl-bot-staging/BigQueryMigration/v2/src/V2/Client/MigrationServiceClient.php deleted file mode 100644 index 988db052413d..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/src/V2/Client/MigrationServiceClient.php +++ /dev/null @@ -1,454 +0,0 @@ - createMigrationWorkflowAsync(CreateMigrationWorkflowRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMigrationWorkflowAsync(DeleteMigrationWorkflowRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMigrationSubtaskAsync(GetMigrationSubtaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMigrationWorkflowAsync(GetMigrationWorkflowRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMigrationSubtasksAsync(ListMigrationSubtasksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMigrationWorkflowsAsync(ListMigrationWorkflowsRequest $request, array $optionalArgs = []) - * @method PromiseInterface startMigrationWorkflowAsync(StartMigrationWorkflowRequest $request, array $optionalArgs = []) - */ -final class MigrationServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.migration.v2.MigrationService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigquerymigration.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigquerymigration.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/migration_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/migration_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/migration_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/migration_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * migration_subtask resource. - * - * @param string $project - * @param string $location - * @param string $workflow - * @param string $subtask - * - * @return string The formatted migration_subtask resource. - */ - public static function migrationSubtaskName(string $project, string $location, string $workflow, string $subtask): string - { - return self::getPathTemplate('migrationSubtask')->render([ - 'project' => $project, - 'location' => $location, - 'workflow' => $workflow, - 'subtask' => $subtask, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * migration_workflow resource. - * - * @param string $project - * @param string $location - * @param string $workflow - * - * @return string The formatted migration_workflow resource. - */ - public static function migrationWorkflowName(string $project, string $location, string $workflow): string - { - return self::getPathTemplate('migrationWorkflow')->render([ - 'project' => $project, - 'location' => $location, - 'workflow' => $workflow, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - migrationSubtask: projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask} - * - migrationWorkflow: projects/{project}/locations/{location}/workflows/{workflow} - * - * 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 'bigquerymigration.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a migration workflow. - * - * The async variant is - * {@see MigrationServiceClient::createMigrationWorkflowAsync()} . - * - * @example samples/V2/MigrationServiceClient/create_migration_workflow.php - * - * @param CreateMigrationWorkflowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MigrationWorkflow - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMigrationWorkflow(CreateMigrationWorkflowRequest $request, array $callOptions = []): MigrationWorkflow - { - return $this->startApiCall('CreateMigrationWorkflow', $request, $callOptions)->wait(); - } - - /** - * Deletes a migration workflow by name. - * - * The async variant is - * {@see MigrationServiceClient::deleteMigrationWorkflowAsync()} . - * - * @example samples/V2/MigrationServiceClient/delete_migration_workflow.php - * - * @param DeleteMigrationWorkflowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteMigrationWorkflow(DeleteMigrationWorkflowRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteMigrationWorkflow', $request, $callOptions)->wait(); - } - - /** - * Gets a previously created migration subtask. - * - * The async variant is {@see MigrationServiceClient::getMigrationSubtaskAsync()} . - * - * @example samples/V2/MigrationServiceClient/get_migration_subtask.php - * - * @param GetMigrationSubtaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MigrationSubtask - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMigrationSubtask(GetMigrationSubtaskRequest $request, array $callOptions = []): MigrationSubtask - { - return $this->startApiCall('GetMigrationSubtask', $request, $callOptions)->wait(); - } - - /** - * Gets a previously created migration workflow. - * - * The async variant is {@see MigrationServiceClient::getMigrationWorkflowAsync()} - * . - * - * @example samples/V2/MigrationServiceClient/get_migration_workflow.php - * - * @param GetMigrationWorkflowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MigrationWorkflow - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMigrationWorkflow(GetMigrationWorkflowRequest $request, array $callOptions = []): MigrationWorkflow - { - return $this->startApiCall('GetMigrationWorkflow', $request, $callOptions)->wait(); - } - - /** - * Lists previously created migration subtasks. - * - * The async variant is {@see MigrationServiceClient::listMigrationSubtasksAsync()} - * . - * - * @example samples/V2/MigrationServiceClient/list_migration_subtasks.php - * - * @param ListMigrationSubtasksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listMigrationSubtasks(ListMigrationSubtasksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMigrationSubtasks', $request, $callOptions); - } - - /** - * Lists previously created migration workflow. - * - * The async variant is - * {@see MigrationServiceClient::listMigrationWorkflowsAsync()} . - * - * @example samples/V2/MigrationServiceClient/list_migration_workflows.php - * - * @param ListMigrationWorkflowsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listMigrationWorkflows(ListMigrationWorkflowsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMigrationWorkflows', $request, $callOptions); - } - - /** - * Starts a previously created migration workflow. I.e., the state transitions - * from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - * An error will be signaled if the state is anything other than DRAFT or - * RUNNING. - * - * The async variant is - * {@see MigrationServiceClient::startMigrationWorkflowAsync()} . - * - * @example samples/V2/MigrationServiceClient/start_migration_workflow.php - * - * @param StartMigrationWorkflowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 startMigrationWorkflow(StartMigrationWorkflowRequest $request, array $callOptions = []): void - { - $this->startApiCall('StartMigrationWorkflow', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/gapic_metadata.json b/owl-bot-staging/BigQueryMigration/v2/src/V2/gapic_metadata.json deleted file mode 100644 index f29fa4dd179b..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.bigquery.migration.v2", - "libraryPackage": "Google\\Cloud\\BigQuery\\Migration\\V2", - "services": { - "MigrationService": { - "clients": { - "grpc": { - "libraryClient": "MigrationServiceGapicClient", - "rpcs": { - "CreateMigrationWorkflow": { - "methods": [ - "createMigrationWorkflow" - ] - }, - "DeleteMigrationWorkflow": { - "methods": [ - "deleteMigrationWorkflow" - ] - }, - "GetMigrationSubtask": { - "methods": [ - "getMigrationSubtask" - ] - }, - "GetMigrationWorkflow": { - "methods": [ - "getMigrationWorkflow" - ] - }, - "ListMigrationSubtasks": { - "methods": [ - "listMigrationSubtasks" - ] - }, - "ListMigrationWorkflows": { - "methods": [ - "listMigrationWorkflows" - ] - }, - "StartMigrationWorkflow": { - "methods": [ - "startMigrationWorkflow" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_client_config.json b/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_client_config.json deleted file mode 100644 index 177fac8a03f3..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_client_config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.migration.v2.MigrationService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 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": { - "CreateMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetMigrationSubtask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListMigrationSubtasks": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListMigrationWorkflows": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "StartMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_descriptor_config.php b/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_descriptor_config.php deleted file mode 100644 index 4b8ec9bd0660..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_descriptor_config.php +++ /dev/null @@ -1,133 +0,0 @@ - [ - 'google.cloud.bigquery.migration.v2.MigrationService' => [ - 'CreateMigrationWorkflow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteMigrationWorkflow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMigrationSubtask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\MigrationSubtask', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMigrationWorkflow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\MigrationWorkflow', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListMigrationSubtasks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMigrationSubtasks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\ListMigrationSubtasksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMigrationWorkflows' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMigrationWorkflows', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Migration\V2\ListMigrationWorkflowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'StartMigrationWorkflow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'location' => 'projects/{project}/locations/{location}', - 'migrationSubtask' => 'projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}', - 'migrationWorkflow' => 'projects/{project}/locations/{location}/workflows/{workflow}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_rest_client_config.php b/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_rest_client_config.php deleted file mode 100644 index efc080cd9643..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/src/V2/resources/migration_service_rest_client_config.php +++ /dev/null @@ -1,107 +0,0 @@ - [ - 'google.cloud.bigquery.migration.v2.MigrationService' => [ - 'CreateMigrationWorkflow' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/workflows', - 'body' => 'migration_workflow', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteMigrationWorkflow' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/workflows/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMigrationSubtask' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMigrationWorkflow' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/workflows/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListMigrationSubtasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/workflows/*}/subtasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMigrationWorkflows' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/workflows', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'StartMigrationWorkflow' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/workflows/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryMigration/v2/tests/Unit/V2/Client/MigrationServiceClientTest.php b/owl-bot-staging/BigQueryMigration/v2/tests/Unit/V2/Client/MigrationServiceClientTest.php deleted file mode 100644 index 684815e9be91..000000000000 --- a/owl-bot-staging/BigQueryMigration/v2/tests/Unit/V2/Client/MigrationServiceClientTest.php +++ /dev/null @@ -1,581 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MigrationServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MigrationServiceClient($options); - } - - /** @test */ - public function createMigrationWorkflowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new MigrationWorkflow(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $migrationWorkflow = new MigrationWorkflow(); - $request = (new CreateMigrationWorkflowRequest()) - ->setParent($formattedParent) - ->setMigrationWorkflow($migrationWorkflow); - $response = $gapicClient->createMigrationWorkflow($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.bigquery.migration.v2.MigrationService/CreateMigrationWorkflow', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMigrationWorkflow(); - $this->assertProtobufEquals($migrationWorkflow, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMigrationWorkflowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $migrationWorkflow = new MigrationWorkflow(); - $request = (new CreateMigrationWorkflowRequest()) - ->setParent($formattedParent) - ->setMigrationWorkflow($migrationWorkflow); - try { - $gapicClient->createMigrationWorkflow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMigrationWorkflowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $request = (new DeleteMigrationWorkflowRequest()) - ->setName($formattedName); - $gapicClient->deleteMigrationWorkflow($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.migration.v2.MigrationService/DeleteMigrationWorkflow', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMigrationWorkflowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $request = (new DeleteMigrationWorkflowRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteMigrationWorkflow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMigrationSubtaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $taskId = 'taskId-1537240555'; - $type = 'type3575610'; - $resourceErrorCount = 929997465; - $expectedResponse = new MigrationSubtask(); - $expectedResponse->setName($name2); - $expectedResponse->setTaskId($taskId); - $expectedResponse->setType($type); - $expectedResponse->setResourceErrorCount($resourceErrorCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->migrationSubtaskName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[SUBTASK]'); - $request = (new GetMigrationSubtaskRequest()) - ->setName($formattedName); - $response = $gapicClient->getMigrationSubtask($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.bigquery.migration.v2.MigrationService/GetMigrationSubtask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMigrationSubtaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->migrationSubtaskName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[SUBTASK]'); - $request = (new GetMigrationSubtaskRequest()) - ->setName($formattedName); - try { - $gapicClient->getMigrationSubtask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMigrationWorkflowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new MigrationWorkflow(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $request = (new GetMigrationWorkflowRequest()) - ->setName($formattedName); - $response = $gapicClient->getMigrationWorkflow($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.bigquery.migration.v2.MigrationService/GetMigrationWorkflow', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMigrationWorkflowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $request = (new GetMigrationWorkflowRequest()) - ->setName($formattedName); - try { - $gapicClient->getMigrationWorkflow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigrationSubtasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $migrationSubtasksElement = new MigrationSubtask(); - $migrationSubtasks = [ - $migrationSubtasksElement, - ]; - $expectedResponse = new ListMigrationSubtasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMigrationSubtasks($migrationSubtasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $request = (new ListMigrationSubtasksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listMigrationSubtasks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMigrationSubtasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.migration.v2.MigrationService/ListMigrationSubtasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigrationSubtasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $request = (new ListMigrationSubtasksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listMigrationSubtasks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigrationWorkflowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $migrationWorkflowsElement = new MigrationWorkflow(); - $migrationWorkflows = [ - $migrationWorkflowsElement, - ]; - $expectedResponse = new ListMigrationWorkflowsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMigrationWorkflows($migrationWorkflows); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMigrationWorkflowsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listMigrationWorkflows($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMigrationWorkflows()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.migration.v2.MigrationService/ListMigrationWorkflows', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigrationWorkflowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListMigrationWorkflowsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listMigrationWorkflows($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startMigrationWorkflowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $request = (new StartMigrationWorkflowRequest()) - ->setName($formattedName); - $gapicClient->startMigrationWorkflow($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.migration.v2.MigrationService/StartMigrationWorkflow', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startMigrationWorkflowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->migrationWorkflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $request = (new StartMigrationWorkflowRequest()) - ->setName($formattedName); - try { - $gapicClient->startMigrationWorkflow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMigrationWorkflowAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new MigrationWorkflow(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $migrationWorkflow = new MigrationWorkflow(); - $request = (new CreateMigrationWorkflowRequest()) - ->setParent($formattedParent) - ->setMigrationWorkflow($migrationWorkflow); - $response = $gapicClient->createMigrationWorkflowAsync($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.bigquery.migration.v2.MigrationService/CreateMigrationWorkflow', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMigrationWorkflow(); - $this->assertProtobufEquals($migrationWorkflow, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Reservation/V1/Reservation.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Reservation/V1/Reservation.php deleted file mode 100644 index fa91d4470232dc1fac410f955473b6c28c26a9da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13099 zcmd5@OKcm*87}qa$d;*bY%xj@F&hJM1e>&(#7St&&XS^J+7iW3l=G+(c1exojY%%E zyR@UaYLOg*AT5lbL3`+>=&db!Y=K^iB0cnwW7|U^plA;5B?XEW=_$SRpPAj|>@F$o z(uPr;sO9`K|NHR`_tKU2%{F=}u}oS-S4^^%sO=`qnHz7Ymgqfz;4CdYxnvJDRrBAgOvo>ujZJ>dreIqVJ}3Vi5hdVyapz zb^E;dZ;~B>P)lhNqpj3QV!4!EC8n~an9Ald+if#PciYTbyKR=cyKUY$e-WX2Lotkm z@EF}i3HWPwY7MoXFibePo;al%Rkfv>s?t!u2{JAuwv~oKfZo4$yVI&uZWEMXtyL$d zpGojN>Dp6m4Ro@Qu=y)dHGzsY3oVoAEv2!!NQ}C!woOeh!O~1-hnS9X>66pXSjW=s z)a}G+&SNIyV{##3>K!7Uo=E7#?C7nFjBmQZp7Uw5hxX*Qx+%9>8r6cQ%%95MPZB^65k%A4mBL!yC(LG3>Z??_d;0HRSjNw(qxHSN6MFqz- zm1a9QZMj|FTnB4(`q+ZG*V)UeA>KObB=~p9YQb-l}2pXZuCmu;ePDk+x zbkt~QX0@(BGE&Xm_z*lE#*dpEcpT&0r6C)h!=_CdB9l8!rO zhd-Bx@pEXh(}q+^I8`(l)f4Dsv(qrus!nzwWmJ{UyJ|yK^xgOrY%qZ@qj9nYiBxOF zr{Td=`mD{zfsT~SbE4S{igx9l1<{zWrlnSDh+)qDG>SHrcdh5l5}7++$R=`JRrFM@ zb8u2433VzZXcuQeKW~$|X{7F2pY~D>taP89PpnL^R@i+{`f?oMoaGfct=Uw~ zCPV_B7Tt$)jS=ELq;*=RnT3eiY6eOQaAL_9wG_|d$jShqw4_hmyuq_${ zbdqx0F*v(#q9YI~c zIiIh-o|nrpL|G}W74xw%DThXx6F~}{UatTv9;ShhQoguYC@#k$5Ful7u2Q&>2cF>b zl3Z8;$%ZrcB45ZKMbPthDH0;kvcD7G{@}o`1PyaLyLS~2(QZGicD;8``dtLYb2Rf3 zA)k~9w6%tbm(W;S0p~M$@yK5ITps#LK8M4mC$OR*D3lnMG@`Kor0|^Oj>+_SI}i@e zwF0}+hY>Whq8g^~%y`f;K&oylI}o(cTQl}YF<6#8GPPTTXTGTPEfn{2Vzi+zC3u-e zvNI?cpwwZ=7~$o`Gw4{0ylYm4(`oUDN^hbQ%S2Rzt%XHb7Pssew#-Q1K=DP=AU%EM z!JP03xZ?&Z=z=Y6Aw2Fv>*zr0OF2ygZMc{*dnInCYnFa6gywjV_=D1BZq*Yj3oKS% zzypT*1{4{q7z^=g@%m!05b-mM&!AJJwXMM@3y$1^Nw%tNHPu$tN-Whj(W{!iW3_%z z8+tH7^GR+&4IHp~oRO z{kpO}=(;OLE&my?R7iVhj)&^QIS(I2qs*;X5}%NM1_t19-2ePOF3!VxaQ%ml?)Sip z*V_&CA(@7j4R8A_{Sx%mmj|bOjBcyC!He-^dT|}szp2V2>N**{X&Y_vQKPy5)G9WV!Lq__~Fha6nz%1Kuc!{A20MlRr;X_3fUqcgb zYqhGm+a}id5>U0>gOb;@S_SA~FKb>IW4-c)V2N7Th_#rk@rPnQZf_e$k6c^JRx7WU zyj|xJG*K#)@+$@CQCVC3%0|9SJK_e49b<~{!R zJS)s89FqSA4JeeTCcj?JK^(y*bi7ZcX=c2;=@Wm zc{JH&-7b^iHPE*_zJ+FZ#p)hzn=t39jFtgII-vAjXf4-?qStSB4{)^nlE+D&VNUWC zdeVkY49nEcc(!7}E41>lO918*QNT-tIf0@f-Z_C=95Ux)7B`K?{{usJ(W5=I^N?)+ zZS;6=Wjv(we;Yw3R<+xtYlsKwdQcUnwqTxCTO8nou&0g@&8EMSL+2r12H~yv$B+Se z!{wL3ow|5`6+Uo7_f;TuMX5CaSb(cFz+P1Lf#TB7h0_3i^D3=$ZS%QWL z@W*_)R4%MjobEU}*8Lw~$&K~caQf5Drx6zXZXND59SNXu8+`W zcL2rT+LvdcsF5|qd>w{tMLtx0+fTOFQ z0qLE6dDcoKJ!WjCjiU5IkPKpz3%3uMUT7x%mxbH=xiRo!Fn!R((1YA|iGW(|yNi`& zuDY|#OL$N{;J-kp*%JlC*-G;cnoJH+R+2*IBgoSbJa&v)2pZ z3zqF2!S4^DnLfB>&R)5%28jO}LC0v}=nmWlz7#Bpd&q2AL-f+Z zp)j4W`(e_bDy@HQ3XO$py8im(G^4U-DiR3((8+ob`jEQfSGH)VydVT8I7) z9i|V@3ff`%2yN!C1T$|BdfP-F4ng`pV!0>74Vh=cjmY7ixtB4#_$B^l1U+IM=fV-O z9Ew#Jtu1Z9j-=P|qEGsz&EOY9NbBN_8g|MJ)dii_+*G!Z;q%MZzI>dO5;vyD?08km z9a>Hfblgl6U`U!v{|m9ln}}|x2aP>1-Qcp`-j`2ylc=x7cr{&M;&zuD*jXGbxtLqw zS7R~gblsRx!1U;)v!x#dhmtOfY3V#p9cta0h|2BZ_lD4MZVtCBF9!?H9;EjrjsZiS z8>I8uw3Oz#*S+jOySio0cwoTU?|ddphr^(MkYBxNnr$PKO5M40$5M}T-2y*BzUjPg zaptgvY=%AyKbJJ&M+wdBpCjlr{OB!^%Cj-ZUG~cyC5n5LB5z#dL%IE{XZZE)j^=P9 zHVi3X*!==XyLM4<`*!W;L#LM6TOY|Bed{BcRd-&Y?~o*gW0N<|e`YV+wB8P(uZOUO to38gm;02M|7=ve?ecJim{2BgEh42an{i&&1@A3KtTghLO*h6~={SQsP>G}Ww diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php deleted file mode 100644 index 041fc0363a57..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.bigquery.reservation.v1.Assignment - */ -class Assignment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the resource. E.g.: - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. - * The assignment_id must only contain lower case alphanumeric characters or - * dashes and the max length is 64 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The resource which will use the reservation. E.g. - * `projects/myproject`, `folders/123`, or `organizations/456`. - * - * Generated from protobuf field string assignee = 4; - */ - protected $assignee = ''; - /** - * Which type of jobs will use the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3; - */ - protected $job_type = 0; - /** - * Output only. State of the assignment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.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. Name of the resource. E.g.: - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. - * The assignment_id must only contain lower case alphanumeric characters or - * dashes and the max length is 64 characters. - * @type string $assignee - * The resource which will use the reservation. E.g. - * `projects/myproject`, `folders/123`, or `organizations/456`. - * @type int $job_type - * Which type of jobs will use the reservation. - * @type int $state - * Output only. State of the assignment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the resource. E.g.: - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. - * The assignment_id must only contain lower case alphanumeric characters or - * dashes and the max length is 64 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of the resource. E.g.: - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. - * The assignment_id must only contain lower case alphanumeric characters or - * dashes and the max length is 64 characters. - * - * 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; - } - - /** - * The resource which will use the reservation. E.g. - * `projects/myproject`, `folders/123`, or `organizations/456`. - * - * Generated from protobuf field string assignee = 4; - * @return string - */ - public function getAssignee() - { - return $this->assignee; - } - - /** - * The resource which will use the reservation. E.g. - * `projects/myproject`, `folders/123`, or `organizations/456`. - * - * Generated from protobuf field string assignee = 4; - * @param string $var - * @return $this - */ - public function setAssignee($var) - { - GPBUtil::checkString($var, True); - $this->assignee = $var; - - return $this; - } - - /** - * Which type of jobs will use the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3; - * @return int - */ - public function getJobType() - { - return $this->job_type; - } - - /** - * Which type of jobs will use the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3; - * @param int $var - * @return $this - */ - public function setJobType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment\JobType::class); - $this->job_type = $var; - - return $this; - } - - /** - * Output only. State of the assignment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the assignment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php deleted file mode 100644 index 27d2d076d829..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.bigquery.reservation.v1.Assignment.JobType - */ -class JobType -{ - /** - * Invalid type. Requests with this value will be rejected with - * error code `google.rpc.Code.INVALID_ARGUMENT`. - * - * Generated from protobuf enum JOB_TYPE_UNSPECIFIED = 0; - */ - const JOB_TYPE_UNSPECIFIED = 0; - /** - * Pipeline (load/export) jobs from the project will use the reservation. - * - * Generated from protobuf enum PIPELINE = 1; - */ - const PIPELINE = 1; - /** - * Query jobs from the project will use the reservation. - * - * Generated from protobuf enum QUERY = 2; - */ - const QUERY = 2; - /** - * BigQuery ML jobs that use services external to BigQuery for model - * training. These jobs will not utilize idle slots from other reservations. - * - * Generated from protobuf enum ML_EXTERNAL = 3; - */ - const ML_EXTERNAL = 3; - /** - * Background jobs that BigQuery runs for the customers in the background. - * - * Generated from protobuf enum BACKGROUND = 4; - */ - const BACKGROUND = 4; - - private static $valueToName = [ - self::JOB_TYPE_UNSPECIFIED => 'JOB_TYPE_UNSPECIFIED', - self::PIPELINE => 'PIPELINE', - self::QUERY => 'QUERY', - self::ML_EXTERNAL => 'ML_EXTERNAL', - self::BACKGROUND => 'BACKGROUND', - ]; - - 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(JobType::class, \Google\Cloud\BigQuery\Reservation\V1\Assignment_JobType::class); - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php deleted file mode 100644 index 434bfa37de78..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.reservation.v1.Assignment.State - */ -class State -{ - /** - * Invalid state value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Queries from assignee will be executed as on-demand, if related - * assignment is pending. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * Assignment is ready. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::ACTIVE => 'ACTIVE', - ]; - - 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\BigQuery\Reservation\V1\Assignment_State::class); - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/BiReservation.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/BiReservation.php deleted file mode 100644 index 65b19149239a..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/BiReservation.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.bigquery.reservation.v1.BiReservation - */ -class BiReservation extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the singleton BI reservation. - * Reservation names have the form - * `projects/{project_id}/locations/{location_id}/biReservation`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The last update timestamp of a reservation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Size of a reservation, in bytes. - * - * Generated from protobuf field int64 size = 4; - */ - protected $size = 0; - /** - * Preferred tables to use BI capacity for. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5; - */ - private $preferred_tables; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the singleton BI reservation. - * Reservation names have the form - * `projects/{project_id}/locations/{location_id}/biReservation`. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of a reservation. - * @type int|string $size - * Size of a reservation, in bytes. - * @type array<\Google\Cloud\BigQuery\Reservation\V1\TableReference>|\Google\Protobuf\Internal\RepeatedField $preferred_tables - * Preferred tables to use BI capacity for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the singleton BI reservation. - * Reservation names have the form - * `projects/{project_id}/locations/{location_id}/biReservation`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the singleton BI reservation. - * Reservation names have the form - * `projects/{project_id}/locations/{location_id}/biReservation`. - * - * 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; - } - - /** - * Output only. The last update timestamp of a reservation. - * - * 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. The last update timestamp of a reservation. - * - * 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; - } - - /** - * Size of a reservation, in bytes. - * - * Generated from protobuf field int64 size = 4; - * @return int|string - */ - public function getSize() - { - return $this->size; - } - - /** - * Size of a reservation, in bytes. - * - * Generated from protobuf field int64 size = 4; - * @param int|string $var - * @return $this - */ - public function setSize($var) - { - GPBUtil::checkInt64($var); - $this->size = $var; - - return $this; - } - - /** - * Preferred tables to use BI capacity for. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPreferredTables() - { - return $this->preferred_tables; - } - - /** - * Preferred tables to use BI capacity for. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5; - * @param array<\Google\Cloud\BigQuery\Reservation\V1\TableReference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPreferredTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\TableReference::class); - $this->preferred_tables = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php deleted file mode 100644 index 7ff9f6aaaa0e..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php +++ /dev/null @@ -1,466 +0,0 @@ -google.cloud.bigquery.reservation.v1.CapacityCommitment - */ -class CapacityCommitment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the capacity commitment, e.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * The commitment_id must only contain lower case alphanumeric characters or - * dashes. It must start with a letter and must not end - * with a dash. Its maximum length is 64 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Number of slots in this commitment. - * - * Generated from protobuf field int64 slot_count = 2; - */ - protected $slot_count = 0; - /** - * Capacity commitment commitment plan. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3; - */ - protected $plan = 0; - /** - * Output only. State of the commitment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The start of the current commitment period. It is applicable - * only for ACTIVE capacity commitments. - * - * Generated from protobuf field .google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $commitment_start_time = null; - /** - * Output only. The end of the current commitment period. It is applicable - * only for ACTIVE capacity commitments. - * - * Generated from protobuf field .google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $commitment_end_time = null; - /** - * Output only. For FAILED commitment plan, provides the reason of failure. - * - * Generated from protobuf field .google.rpc.Status failure_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_status = null; - /** - * The plan this capacity commitment is converted to after commitment_end_time - * passes. Once the plan is changed, committed period is extended according to - * commitment plan. Only applicable for ANNUAL and TRIAL commitments. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan renewal_plan = 8; - */ - protected $renewal_plan = 0; - /** - * Applicable only for commitments located within one of the BigQuery - * multi-regions (US or EU). - * If set to true, this commitment is placed in the organization's - * secondary region which is designated for disaster recovery purposes. - * If false, this commitment is placed in the organization's default region. - * NOTE: this is a preview feature. Project must be allow-listed in order to - * set this field. - * - * Generated from protobuf field bool multi_region_auxiliary = 10; - */ - protected $multi_region_auxiliary = false; - /** - * Edition of the capacity commitment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12; - */ - protected $edition = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the capacity commitment, e.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * The commitment_id must only contain lower case alphanumeric characters or - * dashes. It must start with a letter and must not end - * with a dash. Its maximum length is 64 characters. - * @type int|string $slot_count - * Number of slots in this commitment. - * @type int $plan - * Capacity commitment commitment plan. - * @type int $state - * Output only. State of the commitment. - * @type \Google\Protobuf\Timestamp $commitment_start_time - * Output only. The start of the current commitment period. It is applicable - * only for ACTIVE capacity commitments. - * @type \Google\Protobuf\Timestamp $commitment_end_time - * Output only. The end of the current commitment period. It is applicable - * only for ACTIVE capacity commitments. - * @type \Google\Rpc\Status $failure_status - * Output only. For FAILED commitment plan, provides the reason of failure. - * @type int $renewal_plan - * The plan this capacity commitment is converted to after commitment_end_time - * passes. Once the plan is changed, committed period is extended according to - * commitment plan. Only applicable for ANNUAL and TRIAL commitments. - * @type bool $multi_region_auxiliary - * Applicable only for commitments located within one of the BigQuery - * multi-regions (US or EU). - * If set to true, this commitment is placed in the organization's - * secondary region which is designated for disaster recovery purposes. - * If false, this commitment is placed in the organization's default region. - * NOTE: this is a preview feature. Project must be allow-listed in order to - * set this field. - * @type int $edition - * Edition of the capacity commitment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the capacity commitment, e.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * The commitment_id must only contain lower case alphanumeric characters or - * dashes. It must start with a letter and must not end - * with a dash. Its maximum length is 64 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the capacity commitment, e.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * The commitment_id must only contain lower case alphanumeric characters or - * dashes. It must start with a letter and must not end - * with a dash. Its maximum length is 64 characters. - * - * 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; - } - - /** - * Number of slots in this commitment. - * - * Generated from protobuf field int64 slot_count = 2; - * @return int|string - */ - public function getSlotCount() - { - return $this->slot_count; - } - - /** - * Number of slots in this commitment. - * - * Generated from protobuf field int64 slot_count = 2; - * @param int|string $var - * @return $this - */ - public function setSlotCount($var) - { - GPBUtil::checkInt64($var); - $this->slot_count = $var; - - return $this; - } - - /** - * Capacity commitment commitment plan. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3; - * @return int - */ - public function getPlan() - { - return $this->plan; - } - - /** - * Capacity commitment commitment plan. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3; - * @param int $var - * @return $this - */ - public function setPlan($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment\CommitmentPlan::class); - $this->plan = $var; - - return $this; - } - - /** - * Output only. State of the commitment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the commitment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The start of the current commitment period. It is applicable - * only for ACTIVE capacity commitments. - * - * Generated from protobuf field .google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitmentStartTime() - { - return $this->commitment_start_time; - } - - public function hasCommitmentStartTime() - { - return isset($this->commitment_start_time); - } - - public function clearCommitmentStartTime() - { - unset($this->commitment_start_time); - } - - /** - * Output only. The start of the current commitment period. It is applicable - * only for ACTIVE capacity commitments. - * - * Generated from protobuf field .google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitmentStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commitment_start_time = $var; - - return $this; - } - - /** - * Output only. The end of the current commitment period. It is applicable - * only for ACTIVE capacity commitments. - * - * Generated from protobuf field .google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitmentEndTime() - { - return $this->commitment_end_time; - } - - public function hasCommitmentEndTime() - { - return isset($this->commitment_end_time); - } - - public function clearCommitmentEndTime() - { - unset($this->commitment_end_time); - } - - /** - * Output only. The end of the current commitment period. It is applicable - * only for ACTIVE capacity commitments. - * - * Generated from protobuf field .google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitmentEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commitment_end_time = $var; - - return $this; - } - - /** - * Output only. For FAILED commitment plan, provides the reason of failure. - * - * Generated from protobuf field .google.rpc.Status failure_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getFailureStatus() - { - return $this->failure_status; - } - - public function hasFailureStatus() - { - return isset($this->failure_status); - } - - public function clearFailureStatus() - { - unset($this->failure_status); - } - - /** - * Output only. For FAILED commitment plan, provides the reason of failure. - * - * Generated from protobuf field .google.rpc.Status failure_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setFailureStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->failure_status = $var; - - return $this; - } - - /** - * The plan this capacity commitment is converted to after commitment_end_time - * passes. Once the plan is changed, committed period is extended according to - * commitment plan. Only applicable for ANNUAL and TRIAL commitments. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan renewal_plan = 8; - * @return int - */ - public function getRenewalPlan() - { - return $this->renewal_plan; - } - - /** - * The plan this capacity commitment is converted to after commitment_end_time - * passes. Once the plan is changed, committed period is extended according to - * commitment plan. Only applicable for ANNUAL and TRIAL commitments. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan renewal_plan = 8; - * @param int $var - * @return $this - */ - public function setRenewalPlan($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment\CommitmentPlan::class); - $this->renewal_plan = $var; - - return $this; - } - - /** - * Applicable only for commitments located within one of the BigQuery - * multi-regions (US or EU). - * If set to true, this commitment is placed in the organization's - * secondary region which is designated for disaster recovery purposes. - * If false, this commitment is placed in the organization's default region. - * NOTE: this is a preview feature. Project must be allow-listed in order to - * set this field. - * - * Generated from protobuf field bool multi_region_auxiliary = 10; - * @return bool - */ - public function getMultiRegionAuxiliary() - { - return $this->multi_region_auxiliary; - } - - /** - * Applicable only for commitments located within one of the BigQuery - * multi-regions (US or EU). - * If set to true, this commitment is placed in the organization's - * secondary region which is designated for disaster recovery purposes. - * If false, this commitment is placed in the organization's default region. - * NOTE: this is a preview feature. Project must be allow-listed in order to - * set this field. - * - * Generated from protobuf field bool multi_region_auxiliary = 10; - * @param bool $var - * @return $this - */ - public function setMultiRegionAuxiliary($var) - { - GPBUtil::checkBool($var); - $this->multi_region_auxiliary = $var; - - return $this; - } - - /** - * Edition of the capacity commitment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12; - * @return int - */ - public function getEdition() - { - return $this->edition; - } - - /** - * Edition of the capacity commitment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12; - * @param int $var - * @return $this - */ - public function setEdition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Edition::class); - $this->edition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php deleted file mode 100644 index 5cae6f7ebca5..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan - */ -class CommitmentPlan -{ - /** - * Invalid plan value. Requests with this value will be rejected with - * error code `google.rpc.Code.INVALID_ARGUMENT`. - * - * Generated from protobuf enum COMMITMENT_PLAN_UNSPECIFIED = 0; - */ - const COMMITMENT_PLAN_UNSPECIFIED = 0; - /** - * Flex commitments have committed period of 1 minute after becoming ACTIVE. - * After that, they are not in a committed period anymore and can be removed - * any time. - * - * Generated from protobuf enum FLEX = 3; - */ - const FLEX = 3; - /** - * Same as FLEX, should only be used if flat-rate commitments are still - * available. - * - * Generated from protobuf enum FLEX_FLAT_RATE = 7 [deprecated = true]; - */ - const FLEX_FLAT_RATE = 7; - /** - * Trial commitments have a committed period of 182 days after becoming - * ACTIVE. After that, they are converted to a new commitment based on the - * `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so - * that it can be deleted right after committed period ends. - * - * Generated from protobuf enum TRIAL = 5; - */ - const TRIAL = 5; - /** - * Monthly commitments have a committed period of 30 days after becoming - * ACTIVE. After that, they are not in a committed period anymore and can be - * removed any time. - * - * Generated from protobuf enum MONTHLY = 2; - */ - const MONTHLY = 2; - /** - * Same as MONTHLY, should only be used if flat-rate commitments are still - * available. - * - * Generated from protobuf enum MONTHLY_FLAT_RATE = 8 [deprecated = true]; - */ - const MONTHLY_FLAT_RATE = 8; - /** - * Annual commitments have a committed period of 365 days after becoming - * ACTIVE. After that they are converted to a new commitment based on the - * renewal_plan. - * - * Generated from protobuf enum ANNUAL = 4; - */ - const ANNUAL = 4; - /** - * Same as ANNUAL, should only be used if flat-rate commitments are still - * available. - * - * Generated from protobuf enum ANNUAL_FLAT_RATE = 9 [deprecated = true]; - */ - const ANNUAL_FLAT_RATE = 9; - /** - * 3-year commitments have a committed period of 1095(3 * 365) days after - * becoming ACTIVE. After that they are converted to a new commitment based - * on the renewal_plan. - * - * Generated from protobuf enum THREE_YEAR = 10; - */ - const THREE_YEAR = 10; - /** - * Should only be used for `renewal_plan` and is only meaningful if - * edition is specified to values other than EDITION_UNSPECIFIED. Otherwise - * CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will - * be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. If the - * renewal_plan is NONE, capacity commitment will be removed at the end of - * its commitment period. - * - * Generated from protobuf enum NONE = 6; - */ - const NONE = 6; - - private static $valueToName = [ - self::COMMITMENT_PLAN_UNSPECIFIED => 'COMMITMENT_PLAN_UNSPECIFIED', - self::FLEX => 'FLEX', - self::FLEX_FLAT_RATE => 'FLEX_FLAT_RATE', - self::TRIAL => 'TRIAL', - self::MONTHLY => 'MONTHLY', - self::MONTHLY_FLAT_RATE => 'MONTHLY_FLAT_RATE', - self::ANNUAL => 'ANNUAL', - self::ANNUAL_FLAT_RATE => 'ANNUAL_FLAT_RATE', - self::THREE_YEAR => 'THREE_YEAR', - self::NONE => 'NONE', - ]; - - 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(CommitmentPlan::class, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment_CommitmentPlan::class); - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php deleted file mode 100644 index 7ca01cf2c1b3..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.bigquery.reservation.v1.CapacityCommitment.State - */ -class State -{ - /** - * Invalid state value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Capacity commitment is pending provisioning. Pending capacity commitment - * does not contribute to the project's slot_capacity. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * Once slots are provisioned, capacity commitment becomes active. - * slot_count is added to the project's slot_capacity. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * Capacity commitment is failed to be activated by the backend. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::ACTIVE => 'ACTIVE', - 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(State::class, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment_State::class); - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateAssignmentRequest.php deleted file mode 100644 index 3dbab04fdca5..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateAssignmentRequest.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.bigquery.reservation.v1.CreateAssignmentRequest - */ -class CreateAssignmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name of the assignment - * E.g. `projects/myproject/locations/US/reservations/team1-prod` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Assignment resource to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 2; - */ - protected $assignment = null; - /** - * The optional assignment ID. Assignment name will be generated automatically - * if this field is empty. - * This field must only contain lower case alphanumeric characters or dashes. - * Max length is 64 characters. - * - * Generated from protobuf field string assignment_id = 4; - */ - protected $assignment_id = ''; - - /** - * @param string $parent Required. The parent resource name of the assignment - * E.g. `projects/myproject/locations/US/reservations/team1-prod` - * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment Assignment resource to create. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\CreateAssignmentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment): self - { - return (new self()) - ->setParent($parent) - ->setAssignment($assignment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name of the assignment - * E.g. `projects/myproject/locations/US/reservations/team1-prod` - * @type \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment - * Assignment resource to create. - * @type string $assignment_id - * The optional assignment ID. Assignment name will be generated automatically - * if this field is empty. - * This field must only contain lower case alphanumeric characters or dashes. - * Max length is 64 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name of the assignment - * E.g. `projects/myproject/locations/US/reservations/team1-prod` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name of the assignment - * E.g. `projects/myproject/locations/US/reservations/team1-prod` - * - * 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; - } - - /** - * Assignment resource to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 2; - * @return \Google\Cloud\BigQuery\Reservation\V1\Assignment|null - */ - public function getAssignment() - { - return $this->assignment; - } - - public function hasAssignment() - { - return isset($this->assignment); - } - - public function clearAssignment() - { - unset($this->assignment); - } - - /** - * Assignment resource to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 2; - * @param \Google\Cloud\BigQuery\Reservation\V1\Assignment $var - * @return $this - */ - public function setAssignment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); - $this->assignment = $var; - - return $this; - } - - /** - * The optional assignment ID. Assignment name will be generated automatically - * if this field is empty. - * This field must only contain lower case alphanumeric characters or dashes. - * Max length is 64 characters. - * - * Generated from protobuf field string assignment_id = 4; - * @return string - */ - public function getAssignmentId() - { - return $this->assignment_id; - } - - /** - * The optional assignment ID. Assignment name will be generated automatically - * if this field is empty. - * This field must only contain lower case alphanumeric characters or dashes. - * Max length is 64 characters. - * - * Generated from protobuf field string assignment_id = 4; - * @param string $var - * @return $this - */ - public function setAssignmentId($var) - { - GPBUtil::checkString($var, True); - $this->assignment_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateCapacityCommitmentRequest.php deleted file mode 100644 index 9329e35d14d5..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateCapacityCommitmentRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest - */ -class CreateCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Content of the capacity commitment to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2; - */ - protected $capacity_commitment = null; - /** - * If true, fail the request if another project in the organization has a - * capacity commitment. - * - * Generated from protobuf field bool enforce_single_admin_project_per_org = 4; - */ - protected $enforce_single_admin_project_per_org = false; - /** - * The optional capacity commitment ID. Capacity commitment name will be - * generated automatically if this field is empty. - * This field must only contain lower case alphanumeric characters or dashes. - * The first and last character cannot be a dash. Max length is 64 characters. - * NOTE: this ID won't be kept if the capacity commitment is split or merged. - * - * Generated from protobuf field string capacity_commitment_id = 5; - */ - protected $capacity_commitment_id = ''; - - /** - * @param string $parent Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * Please see {@see ReservationServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacityCommitment Content of the capacity commitment to create. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\CreateCapacityCommitmentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacityCommitment): self - { - return (new self()) - ->setParent($parent) - ->setCapacityCommitment($capacityCommitment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * @type \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacity_commitment - * Content of the capacity commitment to create. - * @type bool $enforce_single_admin_project_per_org - * If true, fail the request if another project in the organization has a - * capacity commitment. - * @type string $capacity_commitment_id - * The optional capacity commitment ID. Capacity commitment name will be - * generated automatically if this field is empty. - * This field must only contain lower case alphanumeric characters or dashes. - * The first and last character cannot be a dash. Max length is 64 characters. - * NOTE: this ID won't be kept if the capacity commitment is split or merged. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * - * 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; - } - - /** - * Content of the capacity commitment to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2; - * @return \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment|null - */ - public function getCapacityCommitment() - { - return $this->capacity_commitment; - } - - public function hasCapacityCommitment() - { - return isset($this->capacity_commitment); - } - - public function clearCapacityCommitment() - { - unset($this->capacity_commitment); - } - - /** - * Content of the capacity commitment to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2; - * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $var - * @return $this - */ - public function setCapacityCommitment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); - $this->capacity_commitment = $var; - - return $this; - } - - /** - * If true, fail the request if another project in the organization has a - * capacity commitment. - * - * Generated from protobuf field bool enforce_single_admin_project_per_org = 4; - * @return bool - */ - public function getEnforceSingleAdminProjectPerOrg() - { - return $this->enforce_single_admin_project_per_org; - } - - /** - * If true, fail the request if another project in the organization has a - * capacity commitment. - * - * Generated from protobuf field bool enforce_single_admin_project_per_org = 4; - * @param bool $var - * @return $this - */ - public function setEnforceSingleAdminProjectPerOrg($var) - { - GPBUtil::checkBool($var); - $this->enforce_single_admin_project_per_org = $var; - - return $this; - } - - /** - * The optional capacity commitment ID. Capacity commitment name will be - * generated automatically if this field is empty. - * This field must only contain lower case alphanumeric characters or dashes. - * The first and last character cannot be a dash. Max length is 64 characters. - * NOTE: this ID won't be kept if the capacity commitment is split or merged. - * - * Generated from protobuf field string capacity_commitment_id = 5; - * @return string - */ - public function getCapacityCommitmentId() - { - return $this->capacity_commitment_id; - } - - /** - * The optional capacity commitment ID. Capacity commitment name will be - * generated automatically if this field is empty. - * This field must only contain lower case alphanumeric characters or dashes. - * The first and last character cannot be a dash. Max length is 64 characters. - * NOTE: this ID won't be kept if the capacity commitment is split or merged. - * - * Generated from protobuf field string capacity_commitment_id = 5; - * @param string $var - * @return $this - */ - public function setCapacityCommitmentId($var) - { - GPBUtil::checkString($var, True); - $this->capacity_commitment_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationRequest.php deleted file mode 100644 index ade4f1d52ee1..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.bigquery.reservation.v1.CreateReservationRequest - */ -class CreateReservationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Project, location. E.g., - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The reservation ID. It must only contain lower case alphanumeric - * characters or dashes. It must start with a letter and must not end - * with a dash. Its maximum length is 64 characters. - * - * Generated from protobuf field string reservation_id = 2; - */ - protected $reservation_id = ''; - /** - * Definition of the new reservation to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 3; - */ - protected $reservation = null; - - /** - * @param string $parent Required. Project, location. E.g., - * `projects/myproject/locations/US` - * Please see {@see ReservationServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation Definition of the new reservation to create. - * @param string $reservationId The reservation ID. It must only contain lower case alphanumeric - * characters or dashes. It must start with a letter and must not end - * with a dash. Its maximum length is 64 characters. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\CreateReservationRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation, string $reservationId): self - { - return (new self()) - ->setParent($parent) - ->setReservation($reservation) - ->setReservationId($reservationId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Project, location. E.g., - * `projects/myproject/locations/US` - * @type string $reservation_id - * The reservation ID. It must only contain lower case alphanumeric - * characters or dashes. It must start with a letter and must not end - * with a dash. Its maximum length is 64 characters. - * @type \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation - * Definition of the new reservation to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Project, location. E.g., - * `projects/myproject/locations/US` - * - * 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. Project, location. E.g., - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The reservation ID. It must only contain lower case alphanumeric - * characters or dashes. It must start with a letter and must not end - * with a dash. Its maximum length is 64 characters. - * - * Generated from protobuf field string reservation_id = 2; - * @return string - */ - public function getReservationId() - { - return $this->reservation_id; - } - - /** - * The reservation ID. It must only contain lower case alphanumeric - * characters or dashes. It must start with a letter and must not end - * with a dash. Its maximum length is 64 characters. - * - * Generated from protobuf field string reservation_id = 2; - * @param string $var - * @return $this - */ - public function setReservationId($var) - { - GPBUtil::checkString($var, True); - $this->reservation_id = $var; - - return $this; - } - - /** - * Definition of the new reservation to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 3; - * @return \Google\Cloud\BigQuery\Reservation\V1\Reservation|null - */ - public function getReservation() - { - return $this->reservation; - } - - public function hasReservation() - { - return isset($this->reservation); - } - - public function clearReservation() - { - unset($this->reservation); - } - - /** - * Definition of the new reservation to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 3; - * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation $var - * @return $this - */ - public function setReservation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation::class); - $this->reservation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteAssignmentRequest.php deleted file mode 100644 index 3f39a0587e8e..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteAssignmentRequest.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest - */ -class DeleteAssignmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource, e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource, e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * Please see {@see ReservationServiceClient::assignmentName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\DeleteAssignmentRequest - * - * @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. Name of the resource, e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource, e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * - * 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. Name of the resource, e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * - * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteCapacityCommitmentRequest.php deleted file mode 100644 index dc012790ec91..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteCapacityCommitmentRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest - */ -class DeleteCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the capacity commitment to delete. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Can be used to force delete commitments even if assignments exist. Deleting - * commitments with assignments may cause queries to fail if they no longer - * have access to slots. - * - * Generated from protobuf field bool force = 3; - */ - protected $force = false; - - /** - * @param string $name Required. Resource name of the capacity commitment to delete. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * Please see {@see ReservationServiceClient::capacityCommitmentName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\DeleteCapacityCommitmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the capacity commitment to delete. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * @type bool $force - * Can be used to force delete commitments even if assignments exist. Deleting - * commitments with assignments may cause queries to fail if they no longer - * have access to slots. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the capacity commitment to delete. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the capacity commitment to delete. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * - * 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; - } - - /** - * Can be used to force delete commitments even if assignments exist. Deleting - * commitments with assignments may cause queries to fail if they no longer - * have access to slots. - * - * Generated from protobuf field bool force = 3; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Can be used to force delete commitments even if assignments exist. Deleting - * commitments with assignments may cause queries to fail if they no longer - * have access to slots. - * - * Generated from protobuf field bool force = 3; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php deleted file mode 100644 index 745b2051ee75..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.bigquery.reservation.v1.DeleteReservationRequest - */ -class DeleteReservationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\DeleteReservationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * - * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Edition.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Edition.php deleted file mode 100644 index 1e3cae77d674..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Edition.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.bigquery.reservation.v1.Edition - */ -class Edition -{ - /** - * Default value, which will be treated as ENTERPRISE. - * - * Generated from protobuf enum EDITION_UNSPECIFIED = 0; - */ - const EDITION_UNSPECIFIED = 0; - /** - * Standard edition. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * Enterprise edition. - * - * Generated from protobuf enum ENTERPRISE = 2; - */ - const ENTERPRISE = 2; - /** - * Enterprise plus edition. - * - * Generated from protobuf enum ENTERPRISE_PLUS = 3; - */ - const ENTERPRISE_PLUS = 3; - - private static $valueToName = [ - self::EDITION_UNSPECIFIED => 'EDITION_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::ENTERPRISE => 'ENTERPRISE', - self::ENTERPRISE_PLUS => 'ENTERPRISE_PLUS', - ]; - - 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetBiReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetBiReservationRequest.php deleted file mode 100644 index 2c7408d233fc..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetBiReservationRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.reservation.v1.GetBiReservationRequest - */ -class GetBiReservationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the requested reservation, for example: - * `projects/{project_id}/locations/{location_id}/biReservation` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the requested reservation, for example: - * `projects/{project_id}/locations/{location_id}/biReservation` - * Please see {@see ReservationServiceClient::biReservationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\GetBiReservationRequest - * - * @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. Name of the requested reservation, for example: - * `projects/{project_id}/locations/{location_id}/biReservation` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the requested reservation, for example: - * `projects/{project_id}/locations/{location_id}/biReservation` - * - * 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. Name of the requested reservation, for example: - * `projects/{project_id}/locations/{location_id}/biReservation` - * - * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetCapacityCommitmentRequest.php deleted file mode 100644 index 785336d7ba0b..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetCapacityCommitmentRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest - */ -class GetCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the capacity commitment to retrieve. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the capacity commitment to retrieve. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * Please see {@see ReservationServiceClient::capacityCommitmentName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\GetCapacityCommitmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the capacity commitment to retrieve. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the capacity commitment to retrieve. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the capacity commitment to retrieve. E.g., - * `projects/myproject/locations/US/capacityCommitments/123` - * - * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php deleted file mode 100644 index 0b048b21d39d..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.bigquery.reservation.v1.GetReservationRequest - */ -class GetReservationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\GetReservationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the reservation to retrieve. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * - * 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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsRequest.php deleted file mode 100644 index 821a46e9140e..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.bigquery.reservation.v1.ListAssignmentsRequest - */ -class ListAssignmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name e.g.: - * `projects/myproject/locations/US/reservations/team1-prod` - * Or: - * `projects/myproject/locations/US/reservations/-` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource name e.g.: - * - * `projects/myproject/locations/US/reservations/team1-prod` - * - * Or: - * - * `projects/myproject/locations/US/reservations/-` - * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\ListAssignmentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name e.g.: - * `projects/myproject/locations/US/reservations/team1-prod` - * Or: - * `projects/myproject/locations/US/reservations/-` - * @type int $page_size - * The maximum number of items to return per page. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name e.g.: - * `projects/myproject/locations/US/reservations/team1-prod` - * Or: - * `projects/myproject/locations/US/reservations/-` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name e.g.: - * `projects/myproject/locations/US/reservations/team1-prod` - * Or: - * `projects/myproject/locations/US/reservations/-` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsResponse.php deleted file mode 100644 index 86846c01f893..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListAssignmentsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.bigquery.reservation.v1.ListAssignmentsResponse - */ -class ListAssignmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of assignments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; - */ - private $assignments; - /** - * 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\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $assignments - * List of assignments visible to the user. - * @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\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * List of assignments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssignments() - { - return $this->assignments; - } - - /** - * List of assignments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; - * @param array<\Google\Cloud\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssignments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); - $this->assignments = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsRequest.php deleted file mode 100644 index 74d24a845b98..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest - */ -class ListCapacityCommitmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * Please see {@see ReservationServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\ListCapacityCommitmentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the parent reservation. E.g., - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsResponse.php deleted file mode 100644 index 3775a9f7af41..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListCapacityCommitmentsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse - */ -class ListCapacityCommitmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of capacity commitments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitments = 1; - */ - private $capacity_commitments; - /** - * 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\BigQuery\Reservation\V1\CapacityCommitment>|\Google\Protobuf\Internal\RepeatedField $capacity_commitments - * List of capacity commitments visible to the user. - * @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\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * List of capacity commitments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCapacityCommitments() - { - return $this->capacity_commitments; - } - - /** - * List of capacity commitments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitments = 1; - * @param array<\Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCapacityCommitments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); - $this->capacity_commitments = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsRequest.php deleted file mode 100644 index a7badf9061a2..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.bigquery.reservation.v1.ListReservationsRequest - */ -class ListReservationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name containing project and location, e.g.: - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource name containing project and location, e.g.: - * `projects/myproject/locations/US` - * Please see {@see ReservationServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\ListReservationsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name containing project and location, e.g.: - * `projects/myproject/locations/US` - * @type int $page_size - * The maximum number of items to return per page. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name containing project and location, e.g.: - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name containing project and location, e.g.: - * `projects/myproject/locations/US` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsResponse.php deleted file mode 100644 index 01a522f87675..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.bigquery.reservation.v1.ListReservationsResponse - */ -class ListReservationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of reservations visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Reservation reservations = 1; - */ - private $reservations; - /** - * 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\BigQuery\Reservation\V1\Reservation>|\Google\Protobuf\Internal\RepeatedField $reservations - * List of reservations visible to the user. - * @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\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * List of reservations visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Reservation reservations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReservations() - { - return $this->reservations; - } - - /** - * List of reservations visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Reservation reservations = 1; - * @param array<\Google\Cloud\BigQuery\Reservation\V1\Reservation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReservations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\Reservation::class); - $this->reservations = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php deleted file mode 100644 index 4cba4685918d..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest - */ -class MergeCapacityCommitmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Parent resource that identifies admin project and location e.g., - * `projects/myproject/locations/us` - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Ids of capacity commitments to merge. - * These capacity commitments must exist under admin project and location - * specified in the parent. - * ID is the last portion of capacity commitment name e.g., 'abc' for - * projects/myproject/locations/US/capacityCommitments/abc - * - * Generated from protobuf field repeated string capacity_commitment_ids = 2; - */ - private $capacity_commitment_ids; - - /** - * @param string $parent Parent resource that identifies admin project and location e.g., - * `projects/myproject/locations/us` - * @param string[] $capacityCommitmentIds Ids of capacity commitments to merge. - * These capacity commitments must exist under admin project and location - * specified in the parent. - * ID is the last portion of capacity commitment name e.g., 'abc' for - * projects/myproject/locations/US/capacityCommitments/abc - * - * @return \Google\Cloud\BigQuery\Reservation\V1\MergeCapacityCommitmentsRequest - * - * @experimental - */ - public static function build(string $parent, array $capacityCommitmentIds): self - { - return (new self()) - ->setParent($parent) - ->setCapacityCommitmentIds($capacityCommitmentIds); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Parent resource that identifies admin project and location e.g., - * `projects/myproject/locations/us` - * @type array|\Google\Protobuf\Internal\RepeatedField $capacity_commitment_ids - * Ids of capacity commitments to merge. - * These capacity commitments must exist under admin project and location - * specified in the parent. - * ID is the last portion of capacity commitment name e.g., 'abc' for - * projects/myproject/locations/US/capacityCommitments/abc - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Parent resource that identifies admin project and location e.g., - * `projects/myproject/locations/us` - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Parent resource that identifies admin project and location e.g., - * `projects/myproject/locations/us` - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Ids of capacity commitments to merge. - * These capacity commitments must exist under admin project and location - * specified in the parent. - * ID is the last portion of capacity commitment name e.g., 'abc' for - * projects/myproject/locations/US/capacityCommitments/abc - * - * Generated from protobuf field repeated string capacity_commitment_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCapacityCommitmentIds() - { - return $this->capacity_commitment_ids; - } - - /** - * Ids of capacity commitments to merge. - * These capacity commitments must exist under admin project and location - * specified in the parent. - * ID is the last portion of capacity commitment name e.g., 'abc' for - * projects/myproject/locations/US/capacityCommitments/abc - * - * Generated from protobuf field repeated string capacity_commitment_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCapacityCommitmentIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->capacity_commitment_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php deleted file mode 100644 index 9c82141891e1..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.bigquery.reservation.v1.MoveAssignmentRequest - */ -class MoveAssignmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the assignment, - * e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The new reservation ID, e.g.: - * `projects/myotherproject/locations/US/reservations/team2-prod` - * - * Generated from protobuf field string destination_id = 3 [(.google.api.resource_reference) = { - */ - protected $destination_id = ''; - /** - * The optional assignment ID. A new assignment name is generated if this - * field is empty. - * This field can contain only lowercase alphanumeric characters or dashes. - * Max length is 64 characters. - * - * Generated from protobuf field string assignment_id = 5; - */ - protected $assignment_id = ''; - - /** - * @param string $name Required. The resource name of the assignment, - * e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * Please see {@see ReservationServiceClient::assignmentName()} for help formatting this field. - * @param string $destinationId The new reservation ID, e.g.: - * `projects/myotherproject/locations/US/reservations/team2-prod` - * - * @return \Google\Cloud\BigQuery\Reservation\V1\MoveAssignmentRequest - * - * @experimental - */ - public static function build(string $name, string $destinationId): self - { - return (new self()) - ->setName($name) - ->setDestinationId($destinationId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the assignment, - * e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * @type string $destination_id - * The new reservation ID, e.g.: - * `projects/myotherproject/locations/US/reservations/team2-prod` - * @type string $assignment_id - * The optional assignment ID. A new assignment name is generated if this - * field is empty. - * This field can contain only lowercase alphanumeric characters or dashes. - * Max length is 64 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the assignment, - * e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * - * 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 assignment, - * e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The new reservation ID, e.g.: - * `projects/myotherproject/locations/US/reservations/team2-prod` - * - * Generated from protobuf field string destination_id = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getDestinationId() - { - return $this->destination_id; - } - - /** - * The new reservation ID, e.g.: - * `projects/myotherproject/locations/US/reservations/team2-prod` - * - * Generated from protobuf field string destination_id = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDestinationId($var) - { - GPBUtil::checkString($var, True); - $this->destination_id = $var; - - return $this; - } - - /** - * The optional assignment ID. A new assignment name is generated if this - * field is empty. - * This field can contain only lowercase alphanumeric characters or dashes. - * Max length is 64 characters. - * - * Generated from protobuf field string assignment_id = 5; - * @return string - */ - public function getAssignmentId() - { - return $this->assignment_id; - } - - /** - * The optional assignment ID. A new assignment name is generated if this - * field is empty. - * This field can contain only lowercase alphanumeric characters or dashes. - * Max length is 64 characters. - * - * Generated from protobuf field string assignment_id = 5; - * @param string $var - * @return $this - */ - public function setAssignmentId($var) - { - GPBUtil::checkString($var, True); - $this->assignment_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php deleted file mode 100644 index 9c806e7cf943..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php +++ /dev/null @@ -1,489 +0,0 @@ -google.cloud.bigquery.reservation.v1.Reservation - */ -class Reservation extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the reservation, e.g., - * `projects/*/locations/*/reservations/team1-prod`. - * The reservation_id must only contain lower case alphanumeric characters or - * dashes. It must start with a letter and must not end with a dash. Its - * maximum length is 64 characters. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Minimum slots available to this reservation. A slot is a unit of - * computational power in BigQuery, and serves as the unit of parallelism. - * Queries using this reservation might use more slots during runtime if - * ignore_idle_slots is set to false. - * If total slot_capacity of the reservation and its siblings - * exceeds the total slot_count of all capacity commitments, the request will - * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. - * NOTE: for reservations in US or EU multi-regions, slot capacity constraints - * are checked separately for default and auxiliary regions. See - * multi_region_auxiliary flag for more details. - * - * Generated from protobuf field int64 slot_capacity = 2; - */ - protected $slot_capacity = 0; - /** - * If false, any query or pipeline job using this reservation will use idle - * slots from other reservations within the same admin project. If true, a - * query or pipeline job using this reservation will execute with the slot - * capacity specified in the slot_capacity field at most. - * - * Generated from protobuf field bool ignore_idle_slots = 4; - */ - protected $ignore_idle_slots = false; - /** - * The configuration parameters for the auto scaling feature. Note this is an - * alpha feature. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7; - */ - protected $autoscale = null; - /** - * Job concurrency target which sets a soft upper bound on the number of jobs - * that can run concurrently in this reservation. This is a soft target due to - * asynchronous nature of the system and various optimizations for small - * queries. - * Default value is 0 which means that concurrency target will be - * automatically computed by the system. - * NOTE: this field is exposed as `target_job_concurrency` in the Information - * Schema, DDL and BQ CLI. - * - * Generated from protobuf field int64 concurrency = 16; - */ - protected $concurrency = 0; - /** - * Output only. Creation time of the reservation. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creation_time = null; - /** - * Output only. Last update time of the reservation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Applicable only for reservations located within one of the BigQuery - * multi-regions (US or EU). - * If set to true, this reservation is placed in the organization's - * secondary region which is designated for disaster recovery purposes. - * If false, this reservation is placed in the organization's default region. - * NOTE: this is a preview feature. Project must be allow-listed in order to - * set this field. - * - * Generated from protobuf field bool multi_region_auxiliary = 14; - */ - protected $multi_region_auxiliary = false; - /** - * Edition of the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17; - */ - protected $edition = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the reservation, e.g., - * `projects/*/locations/*/reservations/team1-prod`. - * The reservation_id must only contain lower case alphanumeric characters or - * dashes. It must start with a letter and must not end with a dash. Its - * maximum length is 64 characters. - * @type int|string $slot_capacity - * Minimum slots available to this reservation. A slot is a unit of - * computational power in BigQuery, and serves as the unit of parallelism. - * Queries using this reservation might use more slots during runtime if - * ignore_idle_slots is set to false. - * If total slot_capacity of the reservation and its siblings - * exceeds the total slot_count of all capacity commitments, the request will - * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. - * NOTE: for reservations in US or EU multi-regions, slot capacity constraints - * are checked separately for default and auxiliary regions. See - * multi_region_auxiliary flag for more details. - * @type bool $ignore_idle_slots - * If false, any query or pipeline job using this reservation will use idle - * slots from other reservations within the same admin project. If true, a - * query or pipeline job using this reservation will execute with the slot - * capacity specified in the slot_capacity field at most. - * @type \Google\Cloud\BigQuery\Reservation\V1\Reservation\Autoscale $autoscale - * The configuration parameters for the auto scaling feature. Note this is an - * alpha feature. - * @type int|string $concurrency - * Job concurrency target which sets a soft upper bound on the number of jobs - * that can run concurrently in this reservation. This is a soft target due to - * asynchronous nature of the system and various optimizations for small - * queries. - * Default value is 0 which means that concurrency target will be - * automatically computed by the system. - * NOTE: this field is exposed as `target_job_concurrency` in the Information - * Schema, DDL and BQ CLI. - * @type \Google\Protobuf\Timestamp $creation_time - * Output only. Creation time of the reservation. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of the reservation. - * @type bool $multi_region_auxiliary - * Applicable only for reservations located within one of the BigQuery - * multi-regions (US or EU). - * If set to true, this reservation is placed in the organization's - * secondary region which is designated for disaster recovery purposes. - * If false, this reservation is placed in the organization's default region. - * NOTE: this is a preview feature. Project must be allow-listed in order to - * set this field. - * @type int $edition - * Edition of the reservation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the reservation, e.g., - * `projects/*/locations/*/reservations/team1-prod`. - * The reservation_id must only contain lower case alphanumeric characters or - * dashes. It must start with a letter and must not end with a dash. Its - * maximum length is 64 characters. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the reservation, e.g., - * `projects/*/locations/*/reservations/team1-prod`. - * The reservation_id must only contain lower case alphanumeric characters or - * dashes. It must start with a letter and must not end with a dash. Its - * maximum length is 64 characters. - * - * 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; - } - - /** - * Minimum slots available to this reservation. A slot is a unit of - * computational power in BigQuery, and serves as the unit of parallelism. - * Queries using this reservation might use more slots during runtime if - * ignore_idle_slots is set to false. - * If total slot_capacity of the reservation and its siblings - * exceeds the total slot_count of all capacity commitments, the request will - * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. - * NOTE: for reservations in US or EU multi-regions, slot capacity constraints - * are checked separately for default and auxiliary regions. See - * multi_region_auxiliary flag for more details. - * - * Generated from protobuf field int64 slot_capacity = 2; - * @return int|string - */ - public function getSlotCapacity() - { - return $this->slot_capacity; - } - - /** - * Minimum slots available to this reservation. A slot is a unit of - * computational power in BigQuery, and serves as the unit of parallelism. - * Queries using this reservation might use more slots during runtime if - * ignore_idle_slots is set to false. - * If total slot_capacity of the reservation and its siblings - * exceeds the total slot_count of all capacity commitments, the request will - * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. - * NOTE: for reservations in US or EU multi-regions, slot capacity constraints - * are checked separately for default and auxiliary regions. See - * multi_region_auxiliary flag for more details. - * - * Generated from protobuf field int64 slot_capacity = 2; - * @param int|string $var - * @return $this - */ - public function setSlotCapacity($var) - { - GPBUtil::checkInt64($var); - $this->slot_capacity = $var; - - return $this; - } - - /** - * If false, any query or pipeline job using this reservation will use idle - * slots from other reservations within the same admin project. If true, a - * query or pipeline job using this reservation will execute with the slot - * capacity specified in the slot_capacity field at most. - * - * Generated from protobuf field bool ignore_idle_slots = 4; - * @return bool - */ - public function getIgnoreIdleSlots() - { - return $this->ignore_idle_slots; - } - - /** - * If false, any query or pipeline job using this reservation will use idle - * slots from other reservations within the same admin project. If true, a - * query or pipeline job using this reservation will execute with the slot - * capacity specified in the slot_capacity field at most. - * - * Generated from protobuf field bool ignore_idle_slots = 4; - * @param bool $var - * @return $this - */ - public function setIgnoreIdleSlots($var) - { - GPBUtil::checkBool($var); - $this->ignore_idle_slots = $var; - - return $this; - } - - /** - * The configuration parameters for the auto scaling feature. Note this is an - * alpha feature. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7; - * @return \Google\Cloud\BigQuery\Reservation\V1\Reservation\Autoscale|null - */ - public function getAutoscale() - { - return $this->autoscale; - } - - public function hasAutoscale() - { - return isset($this->autoscale); - } - - public function clearAutoscale() - { - unset($this->autoscale); - } - - /** - * The configuration parameters for the auto scaling feature. Note this is an - * alpha feature. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7; - * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation\Autoscale $var - * @return $this - */ - public function setAutoscale($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation\Autoscale::class); - $this->autoscale = $var; - - return $this; - } - - /** - * Job concurrency target which sets a soft upper bound on the number of jobs - * that can run concurrently in this reservation. This is a soft target due to - * asynchronous nature of the system and various optimizations for small - * queries. - * Default value is 0 which means that concurrency target will be - * automatically computed by the system. - * NOTE: this field is exposed as `target_job_concurrency` in the Information - * Schema, DDL and BQ CLI. - * - * Generated from protobuf field int64 concurrency = 16; - * @return int|string - */ - public function getConcurrency() - { - return $this->concurrency; - } - - /** - * Job concurrency target which sets a soft upper bound on the number of jobs - * that can run concurrently in this reservation. This is a soft target due to - * asynchronous nature of the system and various optimizations for small - * queries. - * Default value is 0 which means that concurrency target will be - * automatically computed by the system. - * NOTE: this field is exposed as `target_job_concurrency` in the Information - * Schema, DDL and BQ CLI. - * - * Generated from protobuf field int64 concurrency = 16; - * @param int|string $var - * @return $this - */ - public function setConcurrency($var) - { - GPBUtil::checkInt64($var); - $this->concurrency = $var; - - return $this; - } - - /** - * Output only. Creation time of the reservation. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreationTime() - { - return $this->creation_time; - } - - public function hasCreationTime() - { - return isset($this->creation_time); - } - - public function clearCreationTime() - { - unset($this->creation_time); - } - - /** - * Output only. Creation time of the reservation. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->creation_time = $var; - - return $this; - } - - /** - * Output only. Last update time of the reservation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last update time of the reservation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Applicable only for reservations located within one of the BigQuery - * multi-regions (US or EU). - * If set to true, this reservation is placed in the organization's - * secondary region which is designated for disaster recovery purposes. - * If false, this reservation is placed in the organization's default region. - * NOTE: this is a preview feature. Project must be allow-listed in order to - * set this field. - * - * Generated from protobuf field bool multi_region_auxiliary = 14; - * @return bool - */ - public function getMultiRegionAuxiliary() - { - return $this->multi_region_auxiliary; - } - - /** - * Applicable only for reservations located within one of the BigQuery - * multi-regions (US or EU). - * If set to true, this reservation is placed in the organization's - * secondary region which is designated for disaster recovery purposes. - * If false, this reservation is placed in the organization's default region. - * NOTE: this is a preview feature. Project must be allow-listed in order to - * set this field. - * - * Generated from protobuf field bool multi_region_auxiliary = 14; - * @param bool $var - * @return $this - */ - public function setMultiRegionAuxiliary($var) - { - GPBUtil::checkBool($var); - $this->multi_region_auxiliary = $var; - - return $this; - } - - /** - * Edition of the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17; - * @return int - */ - public function getEdition() - { - return $this->edition; - } - - /** - * Edition of the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17; - * @param int $var - * @return $this - */ - public function setEdition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Edition::class); - $this->edition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php deleted file mode 100644 index e81fa3770b43..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.bigquery.reservation.v1.Reservation.Autoscale - */ -class Autoscale extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The slot capacity added to this reservation when autoscale - * happens. Will be between [0, max_slots]. - * - * Generated from protobuf field int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $current_slots = 0; - /** - * Number of slots to be scaled when needed. - * - * Generated from protobuf field int64 max_slots = 2; - */ - protected $max_slots = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $current_slots - * Output only. The slot capacity added to this reservation when autoscale - * happens. Will be between [0, max_slots]. - * @type int|string $max_slots - * Number of slots to be scaled when needed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The slot capacity added to this reservation when autoscale - * happens. Will be between [0, max_slots]. - * - * Generated from protobuf field int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getCurrentSlots() - { - return $this->current_slots; - } - - /** - * Output only. The slot capacity added to this reservation when autoscale - * happens. Will be between [0, max_slots]. - * - * Generated from protobuf field int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setCurrentSlots($var) - { - GPBUtil::checkInt64($var); - $this->current_slots = $var; - - return $this; - } - - /** - * Number of slots to be scaled when needed. - * - * Generated from protobuf field int64 max_slots = 2; - * @return int|string - */ - public function getMaxSlots() - { - return $this->max_slots; - } - - /** - * Number of slots to be scaled when needed. - * - * Generated from protobuf field int64 max_slots = 2; - * @param int|string $var - * @return $this - */ - public function setMaxSlots($var) - { - GPBUtil::checkInt64($var); - $this->max_slots = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Autoscale::class, \Google\Cloud\BigQuery\Reservation\V1\Reservation_Autoscale::class); - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsRequest.php deleted file mode 100644 index c21a1dea6c94..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest - */ -class SearchAllAssignmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name with location (project name could be the - * wildcard '-'), e.g.: - * `projects/-/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Please specify resource name as assignee in the query. - * Examples: - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * - * Generated from protobuf field string query = 2; - */ - protected $query = ''; - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name with location (project name could be the - * wildcard '-'), e.g.: - * `projects/-/locations/US`. Please see - * {@see ReservationServiceClient::locationName()} for help formatting this field. - * @param string $query Please specify resource name as assignee in the query. - * - * Examples: - * - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * - * @return \Google\Cloud\BigQuery\Reservation\V1\SearchAllAssignmentsRequest - * - * @experimental - */ - public static function build(string $parent, string $query): self - { - return (new self()) - ->setParent($parent) - ->setQuery($query); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name with location (project name could be the - * wildcard '-'), e.g.: - * `projects/-/locations/US`. - * @type string $query - * Please specify resource name as assignee in the query. - * Examples: - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * @type int $page_size - * The maximum number of items to return per page. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name with location (project name could be the - * wildcard '-'), e.g.: - * `projects/-/locations/US`. - * - * 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 with location (project name could be the - * wildcard '-'), e.g.: - * `projects/-/locations/US`. - * - * 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; - } - - /** - * Please specify resource name as assignee in the query. - * Examples: - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * - * Generated from protobuf field string query = 2; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Please specify resource name as assignee in the query. - * Examples: - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * - * Generated from protobuf field string query = 2; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 4; - * @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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsResponse.php deleted file mode 100644 index 1864b05872c0..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAllAssignmentsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse - */ -class SearchAllAssignmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of assignments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; - */ - private $assignments; - /** - * 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\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $assignments - * List of assignments visible to the user. - * @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\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * List of assignments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssignments() - { - return $this->assignments; - } - - /** - * List of assignments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; - * @param array<\Google\Cloud\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssignments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); - $this->assignments = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsRequest.php deleted file mode 100644 index 2965aef34365..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest - */ -class SearchAssignmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the admin project(containing project and - * location), e.g.: - * `projects/myproject/locations/US`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Please specify resource name as assignee in the query. - * Examples: - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * - * Generated from protobuf field string query = 2; - */ - protected $query = ''; - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the admin project(containing project and - * location), e.g.: - * `projects/myproject/locations/US`. Please see - * {@see ReservationServiceClient::locationName()} for help formatting this field. - * @param string $query Please specify resource name as assignee in the query. - * - * Examples: - * - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * - * @return \Google\Cloud\BigQuery\Reservation\V1\SearchAssignmentsRequest - * - * @experimental - */ - public static function build(string $parent, string $query): self - { - return (new self()) - ->setParent($parent) - ->setQuery($query); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the admin project(containing project and - * location), e.g.: - * `projects/myproject/locations/US`. - * @type string $query - * Please specify resource name as assignee in the query. - * Examples: - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * @type int $page_size - * The maximum number of items to return per page. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the admin project(containing project and - * location), e.g.: - * `projects/myproject/locations/US`. - * - * 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 admin project(containing project and - * location), e.g.: - * `projects/myproject/locations/US`. - * - * 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; - } - - /** - * Please specify resource name as assignee in the query. - * Examples: - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * - * Generated from protobuf field string query = 2; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Please specify resource name as assignee in the query. - * Examples: - * * `assignee=projects/myproject` - * * `assignee=folders/123` - * * `assignee=organizations/456` - * - * Generated from protobuf field string query = 2; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return per page. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 4; - * @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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsResponse.php deleted file mode 100644 index f7f802f7c0c8..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SearchAssignmentsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse - */ -class SearchAssignmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of assignments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; - */ - private $assignments; - /** - * 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\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $assignments - * List of assignments visible to the user. - * @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\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * List of assignments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssignments() - { - return $this->assignments; - } - - /** - * List of assignments visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.Assignment assignments = 1; - * @param array<\Google\Cloud\BigQuery\Reservation\V1\Assignment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssignments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); - $this->assignments = $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/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentRequest.php deleted file mode 100644 index ef7d9a88c90e..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest - */ -class SplitCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name e.g.,: - * `projects/myproject/locations/US/capacityCommitments/123` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Number of slots in the capacity commitment after the split. - * - * Generated from protobuf field int64 slot_count = 2; - */ - protected $slot_count = 0; - - /** - * @param string $name Required. The resource name e.g.,: - * `projects/myproject/locations/US/capacityCommitments/123` - * Please see {@see ReservationServiceClient::capacityCommitmentName()} for help formatting this field. - * @param int $slotCount Number of slots in the capacity commitment after the split. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\SplitCapacityCommitmentRequest - * - * @experimental - */ - public static function build(string $name, int $slotCount): self - { - return (new self()) - ->setName($name) - ->setSlotCount($slotCount); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name e.g.,: - * `projects/myproject/locations/US/capacityCommitments/123` - * @type int|string $slot_count - * Number of slots in the capacity commitment after the split. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name e.g.,: - * `projects/myproject/locations/US/capacityCommitments/123` - * - * 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 e.g.,: - * `projects/myproject/locations/US/capacityCommitments/123` - * - * 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; - } - - /** - * Number of slots in the capacity commitment after the split. - * - * Generated from protobuf field int64 slot_count = 2; - * @return int|string - */ - public function getSlotCount() - { - return $this->slot_count; - } - - /** - * Number of slots in the capacity commitment after the split. - * - * Generated from protobuf field int64 slot_count = 2; - * @param int|string $var - * @return $this - */ - public function setSlotCount($var) - { - GPBUtil::checkInt64($var); - $this->slot_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentResponse.php deleted file mode 100644 index dfe6cb372ee1..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SplitCapacityCommitmentResponse.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse - */ -class SplitCapacityCommitmentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * First capacity commitment, result of a split. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment first = 1; - */ - protected $first = null; - /** - * Second capacity commitment, result of a split. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment second = 2; - */ - protected $second = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $first - * First capacity commitment, result of a split. - * @type \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $second - * Second capacity commitment, result of a split. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * First capacity commitment, result of a split. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment first = 1; - * @return \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment|null - */ - public function getFirst() - { - return $this->first; - } - - public function hasFirst() - { - return isset($this->first); - } - - public function clearFirst() - { - unset($this->first); - } - - /** - * First capacity commitment, result of a split. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment first = 1; - * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $var - * @return $this - */ - public function setFirst($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); - $this->first = $var; - - return $this; - } - - /** - * Second capacity commitment, result of a split. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment second = 2; - * @return \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment|null - */ - public function getSecond() - { - return $this->second; - } - - public function hasSecond() - { - return isset($this->second); - } - - public function clearSecond() - { - unset($this->second); - } - - /** - * Second capacity commitment, result of a split. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment second = 2; - * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $var - * @return $this - */ - public function setSecond($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); - $this->second = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/TableReference.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/TableReference.php deleted file mode 100644 index a90214c8e1bb..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/TableReference.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.bigquery.reservation.v1.TableReference - */ -class TableReference extends \Google\Protobuf\Internal\Message -{ - /** - * The assigned project ID of the project. - * - * Generated from protobuf field string project_id = 1; - */ - protected $project_id = ''; - /** - * The ID of the dataset in the above project. - * - * Generated from protobuf field string dataset_id = 2; - */ - protected $dataset_id = ''; - /** - * The ID of the table in the above dataset. - * - * Generated from protobuf field string table_id = 3; - */ - protected $table_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * The assigned project ID of the project. - * @type string $dataset_id - * The ID of the dataset in the above project. - * @type string $table_id - * The ID of the table in the above dataset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * The assigned project ID of the project. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The assigned project ID of the project. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * The ID of the dataset in the above project. - * - * Generated from protobuf field string dataset_id = 2; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * The ID of the dataset in the above project. - * - * Generated from protobuf field string dataset_id = 2; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - - /** - * The ID of the table in the above dataset. - * - * Generated from protobuf field string table_id = 3; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * The ID of the table in the above dataset. - * - * Generated from protobuf field string table_id = 3; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateAssignmentRequest.php deleted file mode 100644 index 9cf9c1ac0556..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateAssignmentRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest - */ -class UpdateAssignmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Content of the assignment to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 1; - */ - protected $assignment = null; - /** - * Standard field mask for the set of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment Content of the assignment to update. - * @param \Google\Protobuf\FieldMask $updateMask Standard field mask for the set of fields to be updated. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\UpdateAssignmentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAssignment($assignment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Reservation\V1\Assignment $assignment - * Content of the assignment to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Standard field mask for the set of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Content of the assignment to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 1; - * @return \Google\Cloud\BigQuery\Reservation\V1\Assignment|null - */ - public function getAssignment() - { - return $this->assignment; - } - - public function hasAssignment() - { - return isset($this->assignment); - } - - public function clearAssignment() - { - unset($this->assignment); - } - - /** - * Content of the assignment to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment assignment = 1; - * @param \Google\Cloud\BigQuery\Reservation\V1\Assignment $var - * @return $this - */ - public function setAssignment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment::class); - $this->assignment = $var; - - return $this; - } - - /** - * Standard field mask for the set of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Standard field mask for the set of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateBiReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateBiReservationRequest.php deleted file mode 100644 index f38c800ad548..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateBiReservationRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest - */ -class UpdateBiReservationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * A reservation to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.BiReservation bi_reservation = 1; - */ - protected $bi_reservation = null; - /** - * A list of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\BigQuery\Reservation\V1\BiReservation $biReservation A reservation to update. - * @param \Google\Protobuf\FieldMask $updateMask A list of fields to be updated in this request. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\UpdateBiReservationRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\Reservation\V1\BiReservation $biReservation, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBiReservation($biReservation) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Reservation\V1\BiReservation $bi_reservation - * A reservation to update. - * @type \Google\Protobuf\FieldMask $update_mask - * A list of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * A reservation to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.BiReservation bi_reservation = 1; - * @return \Google\Cloud\BigQuery\Reservation\V1\BiReservation|null - */ - public function getBiReservation() - { - return $this->bi_reservation; - } - - public function hasBiReservation() - { - return isset($this->bi_reservation); - } - - public function clearBiReservation() - { - unset($this->bi_reservation); - } - - /** - * A reservation to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.BiReservation bi_reservation = 1; - * @param \Google\Cloud\BigQuery\Reservation\V1\BiReservation $var - * @return $this - */ - public function setBiReservation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\BiReservation::class); - $this->bi_reservation = $var; - - return $this; - } - - /** - * A list of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * A list of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateCapacityCommitmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateCapacityCommitmentRequest.php deleted file mode 100644 index b60c38af791f..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateCapacityCommitmentRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest - */ -class UpdateCapacityCommitmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Content of the capacity commitment to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 1; - */ - protected $capacity_commitment = null; - /** - * Standard field mask for the set of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacityCommitment Content of the capacity commitment to update. - * @param \Google\Protobuf\FieldMask $updateMask Standard field mask for the set of fields to be updated. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\UpdateCapacityCommitmentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacityCommitment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCapacityCommitment($capacityCommitment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $capacity_commitment - * Content of the capacity commitment to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Standard field mask for the set of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Content of the capacity commitment to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 1; - * @return \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment|null - */ - public function getCapacityCommitment() - { - return $this->capacity_commitment; - } - - public function hasCapacityCommitment() - { - return isset($this->capacity_commitment); - } - - public function clearCapacityCommitment() - { - unset($this->capacity_commitment); - } - - /** - * Content of the capacity commitment to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 1; - * @param \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment $var - * @return $this - */ - public function setCapacityCommitment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment::class); - $this->capacity_commitment = $var; - - return $this; - } - - /** - * Standard field mask for the set of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Standard field mask for the set of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateReservationRequest.php deleted file mode 100644 index 001b97e55e2a..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/UpdateReservationRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.bigquery.reservation.v1.UpdateReservationRequest - */ -class UpdateReservationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Content of the reservation to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 1; - */ - protected $reservation = null; - /** - * Standard field mask for the set of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation Content of the reservation to update. - * @param \Google\Protobuf\FieldMask $updateMask Standard field mask for the set of fields to be updated. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\UpdateReservationRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setReservation($reservation) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Reservation\V1\Reservation $reservation - * Content of the reservation to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Standard field mask for the set of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Content of the reservation to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 1; - * @return \Google\Cloud\BigQuery\Reservation\V1\Reservation|null - */ - public function getReservation() - { - return $this->reservation; - } - - public function hasReservation() - { - return isset($this->reservation); - } - - public function clearReservation() - { - unset($this->reservation); - } - - /** - * Content of the reservation to update. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation reservation = 1; - * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation $var - * @return $this - */ - public function setReservation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation::class); - $this->reservation = $var; - - return $this; - } - - /** - * Standard field mask for the set of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Standard field mask for the set of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_assignment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_assignment.php deleted file mode 100644 index d5baf3ac5d8d..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_assignment.php +++ /dev/null @@ -1,110 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var Assignment $response */ - $response = $reservationServiceClient->createAssignment($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 = ReservationServiceClient::reservationName( - '[PROJECT]', - '[LOCATION]', - '[RESERVATION]' - ); - - create_assignment_sample($formattedParent); -} -// [END bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_capacity_commitment.php deleted file mode 100644 index 7285b583f0e5..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_capacity_commitment.php +++ /dev/null @@ -1,72 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var CapacityCommitment $response */ - $response = $reservationServiceClient->createCapacityCommitment($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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_capacity_commitment_sample($formattedParent); -} -// [END bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation.php deleted file mode 100644 index c12c794dba85..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation.php +++ /dev/null @@ -1,72 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var Reservation $response */ - $response = $reservationServiceClient->createReservation($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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_reservation_sample($formattedParent); -} -// [END bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_assignment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_assignment.php deleted file mode 100644 index 1aacfc39838a..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_assignment.php +++ /dev/null @@ -1,89 +0,0 @@ -` - * and `` - * - * In this example, deletion of the `` assignment won't - * affect the other assignment ``. After said deletion, - * queries from `project1` will still use `res1` while queries from - * `project2` will switch to use on-demand mode. - * - * @param string $formattedName Name of the resource, e.g. - * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - * Please see {@see ReservationServiceClient::assignmentName()} for help formatting this field. - */ -function delete_assignment_sample(string $formattedName): void -{ - // Create a client. - $reservationServiceClient = new ReservationServiceClient(); - - // Prepare the request message. - $request = (new DeleteAssignmentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $reservationServiceClient->deleteAssignment($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 = ReservationServiceClient::assignmentName( - '[PROJECT]', - '[LOCATION]', - '[RESERVATION]', - '[ASSIGNMENT]' - ); - - delete_assignment_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_capacity_commitment.php deleted file mode 100644 index 517fdcbacd57..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_capacity_commitment.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $reservationServiceClient->deleteCapacityCommitment($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 = ReservationServiceClient::capacityCommitmentName( - '[PROJECT]', - '[LOCATION]', - '[CAPACITY_COMMITMENT]' - ); - - delete_capacity_commitment_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation.php deleted file mode 100644 index 71dcc51c2648..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $reservationServiceClient->deleteReservation($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 = ReservationServiceClient::reservationName( - '[PROJECT]', - '[LOCATION]', - '[RESERVATION]' - ); - - delete_reservation_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_bi_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_bi_reservation.php deleted file mode 100644 index 5dd1e2e6a678..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_bi_reservation.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BiReservation $response */ - $response = $reservationServiceClient->getBiReservation($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 = ReservationServiceClient::biReservationName('[PROJECT]', '[LOCATION]'); - - get_bi_reservation_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_capacity_commitment.php deleted file mode 100644 index da0a087521bd..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_capacity_commitment.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CapacityCommitment $response */ - $response = $reservationServiceClient->getCapacityCommitment($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 = ReservationServiceClient::capacityCommitmentName( - '[PROJECT]', - '[LOCATION]', - '[CAPACITY_COMMITMENT]' - ); - - get_capacity_commitment_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation.php deleted file mode 100644 index 9b3ec448caee..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Reservation $response */ - $response = $reservationServiceClient->getReservation($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 = ReservationServiceClient::reservationName( - '[PROJECT]', - '[LOCATION]', - '[RESERVATION]' - ); - - get_reservation_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_assignments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_assignments.php deleted file mode 100644 index 5aa935e5c914..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_assignments.php +++ /dev/null @@ -1,106 +0,0 @@ -` - * and `` - * - * In this example, ListAssignments will just return the above two assignments - * for reservation `res1`, and no expansion/merge will happen. - * - * The wildcard "-" can be used for - * reservations in the request. In that case all assignments belongs to the - * specified project and location will be listed. - * - * **Note** "-" cannot be used for projects nor locations. - * - * @param string $formattedParent The parent resource name e.g.: - * - * `projects/myproject/locations/US/reservations/team1-prod` - * - * Or: - * - * `projects/myproject/locations/US/reservations/-` - * Please see {@see ReservationServiceClient::reservationName()} for help formatting this field. - */ -function list_assignments_sample(string $formattedParent): void -{ - // Create a client. - $reservationServiceClient = new ReservationServiceClient(); - - // Prepare the request message. - $request = (new ListAssignmentsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $reservationServiceClient->listAssignments($request); - - /** @var Assignment $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 = ReservationServiceClient::reservationName( - '[PROJECT]', - '[LOCATION]', - '[RESERVATION]' - ); - - list_assignments_sample($formattedParent); -} -// [END bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_capacity_commitments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_capacity_commitments.php deleted file mode 100644 index 0f2b30e94d34..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_capacity_commitments.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $reservationServiceClient->listCapacityCommitments($request); - - /** @var CapacityCommitment $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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_capacity_commitments_sample($formattedParent); -} -// [END bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservations.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservations.php deleted file mode 100644 index 6a7f0288ac41..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservations.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $reservationServiceClient->listReservations($request); - - /** @var Reservation $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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_reservations_sample($formattedParent); -} -// [END bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/merge_capacity_commitments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/merge_capacity_commitments.php deleted file mode 100644 index a894deeac331..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/merge_capacity_commitments.php +++ /dev/null @@ -1,63 +0,0 @@ -mergeCapacityCommitments($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/move_assignment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/move_assignment.php deleted file mode 100644 index e2ac5b2d9b86..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/move_assignment.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Assignment $response */ - $response = $reservationServiceClient->moveAssignment($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 = ReservationServiceClient::assignmentName( - '[PROJECT]', - '[LOCATION]', - '[RESERVATION]', - '[ASSIGNMENT]' - ); - - move_assignment_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_all_assignments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_all_assignments.php deleted file mode 100644 index 6be032006ec9..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_all_assignments.php +++ /dev/null @@ -1,97 +0,0 @@ -folder->organization) happens in this API. - * 3. Parent here is `projects/*/locations/*`, instead of - * `projects/*/locations/*reservations/*`. - * - * @param string $formattedParent The resource name with location (project name could be the - * wildcard '-'), e.g.: - * `projects/-/locations/US`. Please see - * {@see ReservationServiceClient::locationName()} for help formatting this field. - */ -function search_all_assignments_sample(string $formattedParent): void -{ - // Create a client. - $reservationServiceClient = new ReservationServiceClient(); - - // Prepare the request message. - $request = (new SearchAllAssignmentsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $reservationServiceClient->searchAllAssignments($request); - - /** @var Assignment $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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - search_all_assignments_sample($formattedParent); -} -// [END bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_assignments.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_assignments.php deleted file mode 100644 index 492d7ee69f37..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/search_assignments.php +++ /dev/null @@ -1,100 +0,0 @@ -folder->organization) happens in this API. - * 3. Parent here is `projects/*/locations/*`, instead of - * `projects/*/locations/*reservations/*`. - * - * **Note** "-" cannot be used for projects - * nor locations. - * - * @param string $formattedParent The resource name of the admin project(containing project and - * location), e.g.: - * `projects/myproject/locations/US`. Please see - * {@see ReservationServiceClient::locationName()} for help formatting this field. - */ -function search_assignments_sample(string $formattedParent): void -{ - // Create a client. - $reservationServiceClient = new ReservationServiceClient(); - - // Prepare the request message. - $request = (new SearchAssignmentsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $reservationServiceClient->searchAssignments($request); - - /** @var Assignment $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 = ReservationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - search_assignments_sample($formattedParent); -} -// [END bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/split_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/split_capacity_commitment.php deleted file mode 100644 index 8b64bf3ad918..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/split_capacity_commitment.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SplitCapacityCommitmentResponse $response */ - $response = $reservationServiceClient->splitCapacityCommitment($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 = ReservationServiceClient::capacityCommitmentName( - '[PROJECT]', - '[LOCATION]', - '[CAPACITY_COMMITMENT]' - ); - - split_capacity_commitment_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_assignment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_assignment.php deleted file mode 100644 index 165918ebdc33..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_assignment.php +++ /dev/null @@ -1,59 +0,0 @@ -updateAssignment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_bi_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_bi_reservation.php deleted file mode 100644 index 0b9afd0d6f84..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_bi_reservation.php +++ /dev/null @@ -1,64 +0,0 @@ -updateBiReservation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_capacity_commitment.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_capacity_commitment.php deleted file mode 100644 index f874b135046f..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_capacity_commitment.php +++ /dev/null @@ -1,63 +0,0 @@ -updateCapacityCommitment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_reservation.php deleted file mode 100644 index 0c1ab7f41205..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/update_reservation.php +++ /dev/null @@ -1,57 +0,0 @@ -updateReservation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php b/owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php deleted file mode 100644 index 0c70f8f7d0b1..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php +++ /dev/null @@ -1,1047 +0,0 @@ - createAssignmentAsync(CreateAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCapacityCommitmentAsync(CreateCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReservationAsync(CreateReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAssignmentAsync(DeleteAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCapacityCommitmentAsync(DeleteCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReservationAsync(DeleteReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBiReservationAsync(GetBiReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCapacityCommitmentAsync(GetCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReservationAsync(GetReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAssignmentsAsync(ListAssignmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCapacityCommitmentsAsync(ListCapacityCommitmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReservationsAsync(ListReservationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface mergeCapacityCommitmentsAsync(MergeCapacityCommitmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface moveAssignmentAsync(MoveAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchAllAssignmentsAsync(SearchAllAssignmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchAssignmentsAsync(SearchAssignmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface splitCapacityCommitmentAsync(SplitCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAssignmentAsync(UpdateAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBiReservationAsync(UpdateBiReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCapacityCommitmentAsync(UpdateCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateReservationAsync(UpdateReservationRequest $request, array $optionalArgs = []) - */ -final class ReservationServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.reservation.v1.ReservationService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigqueryreservation.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigqueryreservation.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigquery', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/reservation_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/reservation_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/reservation_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/reservation_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a assignment - * resource. - * - * @param string $project - * @param string $location - * @param string $reservation - * @param string $assignment - * - * @return string The formatted assignment resource. - */ - public static function assignmentName(string $project, string $location, string $reservation, string $assignment): string - { - return self::getPathTemplate('assignment')->render([ - 'project' => $project, - 'location' => $location, - 'reservation' => $reservation, - 'assignment' => $assignment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * bi_reservation resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted bi_reservation resource. - */ - public static function biReservationName(string $project, string $location): string - { - return self::getPathTemplate('biReservation')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * capacity_commitment resource. - * - * @param string $project - * @param string $location - * @param string $capacityCommitment - * - * @return string The formatted capacity_commitment resource. - */ - public static function capacityCommitmentName(string $project, string $location, string $capacityCommitment): string - { - return self::getPathTemplate('capacityCommitment')->render([ - 'project' => $project, - 'location' => $location, - 'capacity_commitment' => $capacityCommitment, - ]); - } - - /** - * 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 reservation - * resource. - * - * @param string $project - * @param string $location - * @param string $reservation - * - * @return string The formatted reservation resource. - */ - public static function reservationName(string $project, string $location, string $reservation): string - { - return self::getPathTemplate('reservation')->render([ - 'project' => $project, - 'location' => $location, - 'reservation' => $reservation, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - assignment: projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment} - * - biReservation: projects/{project}/locations/{location}/biReservation - * - capacityCommitment: projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment} - * - location: projects/{project}/locations/{location} - * - reservation: projects/{project}/locations/{location}/reservations/{reservation} - * - * 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 'bigqueryreservation.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an assignment object which allows the given project to submit jobs - * of a certain type using slots from the specified reservation. - * - * Currently a - * resource (project, folder, organization) can only have one assignment per - * each (job_type, location) combination, and that reservation will be used - * for all jobs of the matching type. - * - * Different assignments can be created on different levels of the - * projects, folders or organization hierarchy. During query execution, - * the assignment is looked up at the project, folder and organization levels - * in that order. The first assignment found is applied to the query. - * - * When creating assignments, it does not matter if other assignments exist at - * higher levels. - * - * Example: - * - * * The organization `organizationA` contains two projects, `project1` - * and `project2`. - * * Assignments for all three entities (`organizationA`, `project1`, and - * `project2`) could all be created and mapped to the same or different - * reservations. - * - * "None" assignments represent an absence of the assignment. Projects - * assigned to None use on-demand pricing. To create a "None" assignment, use - * "none" as a reservation_id in the parent. Example parent: - * `projects/myproject/locations/US/reservations/none`. - * - * Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have - * 'bigquery.admin' permissions on the project using the reservation - * and the project that owns this reservation. - * - * Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment - * does not match location of the reservation. - * - * The async variant is {@see ReservationServiceClient::createAssignmentAsync()} . - * - * @example samples/V1/ReservationServiceClient/create_assignment.php - * - * @param CreateAssignmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Assignment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAssignment(CreateAssignmentRequest $request, array $callOptions = []): Assignment - { - return $this->startApiCall('CreateAssignment', $request, $callOptions)->wait(); - } - - /** - * Creates a new capacity commitment resource. - * - * The async variant is - * {@see ReservationServiceClient::createCapacityCommitmentAsync()} . - * - * @example samples/V1/ReservationServiceClient/create_capacity_commitment.php - * - * @param CreateCapacityCommitmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CapacityCommitment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCapacityCommitment(CreateCapacityCommitmentRequest $request, array $callOptions = []): CapacityCommitment - { - return $this->startApiCall('CreateCapacityCommitment', $request, $callOptions)->wait(); - } - - /** - * Creates a new reservation resource. - * - * The async variant is {@see ReservationServiceClient::createReservationAsync()} . - * - * @example samples/V1/ReservationServiceClient/create_reservation.php - * - * @param CreateReservationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Reservation - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReservation(CreateReservationRequest $request, array $callOptions = []): Reservation - { - return $this->startApiCall('CreateReservation', $request, $callOptions)->wait(); - } - - /** - * Deletes a assignment. No expansion will happen. - * - * Example: - * - * * Organization `organizationA` contains two projects, `project1` and - * `project2`. - * * Reservation `res1` exists and was created previously. - * * CreateAssignment was used previously to define the following - * associations between entities and reservations: `` - * and `` - * - * In this example, deletion of the `` assignment won't - * affect the other assignment ``. After said deletion, - * queries from `project1` will still use `res1` while queries from - * `project2` will switch to use on-demand mode. - * - * The async variant is {@see ReservationServiceClient::deleteAssignmentAsync()} . - * - * @example samples/V1/ReservationServiceClient/delete_assignment.php - * - * @param DeleteAssignmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteAssignment(DeleteAssignmentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAssignment', $request, $callOptions)->wait(); - } - - /** - * Deletes a capacity commitment. Attempting to delete capacity commitment - * before its commitment_end_time will fail with the error code - * `google.rpc.Code.FAILED_PRECONDITION`. - * - * The async variant is - * {@see ReservationServiceClient::deleteCapacityCommitmentAsync()} . - * - * @example samples/V1/ReservationServiceClient/delete_capacity_commitment.php - * - * @param DeleteCapacityCommitmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteCapacityCommitment(DeleteCapacityCommitmentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteCapacityCommitment', $request, $callOptions)->wait(); - } - - /** - * Deletes a reservation. - * Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - * assignments. - * - * The async variant is {@see ReservationServiceClient::deleteReservationAsync()} . - * - * @example samples/V1/ReservationServiceClient/delete_reservation.php - * - * @param DeleteReservationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteReservation(DeleteReservationRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteReservation', $request, $callOptions)->wait(); - } - - /** - * Retrieves a BI reservation. - * - * The async variant is {@see ReservationServiceClient::getBiReservationAsync()} . - * - * @example samples/V1/ReservationServiceClient/get_bi_reservation.php - * - * @param GetBiReservationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BiReservation - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBiReservation(GetBiReservationRequest $request, array $callOptions = []): BiReservation - { - return $this->startApiCall('GetBiReservation', $request, $callOptions)->wait(); - } - - /** - * Returns information about the capacity commitment. - * - * The async variant is - * {@see ReservationServiceClient::getCapacityCommitmentAsync()} . - * - * @example samples/V1/ReservationServiceClient/get_capacity_commitment.php - * - * @param GetCapacityCommitmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CapacityCommitment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCapacityCommitment(GetCapacityCommitmentRequest $request, array $callOptions = []): CapacityCommitment - { - return $this->startApiCall('GetCapacityCommitment', $request, $callOptions)->wait(); - } - - /** - * Returns information about the reservation. - * - * The async variant is {@see ReservationServiceClient::getReservationAsync()} . - * - * @example samples/V1/ReservationServiceClient/get_reservation.php - * - * @param GetReservationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Reservation - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReservation(GetReservationRequest $request, array $callOptions = []): Reservation - { - return $this->startApiCall('GetReservation', $request, $callOptions)->wait(); - } - - /** - * Lists assignments. - * - * Only explicitly created assignments will be returned. - * - * Example: - * - * * Organization `organizationA` contains two projects, `project1` and - * `project2`. - * * Reservation `res1` exists and was created previously. - * * CreateAssignment was used previously to define the following - * associations between entities and reservations: `` - * and `` - * - * In this example, ListAssignments will just return the above two assignments - * for reservation `res1`, and no expansion/merge will happen. - * - * The wildcard "-" can be used for - * reservations in the request. In that case all assignments belongs to the - * specified project and location will be listed. - * - * **Note** "-" cannot be used for projects nor locations. - * - * The async variant is {@see ReservationServiceClient::listAssignmentsAsync()} . - * - * @example samples/V1/ReservationServiceClient/list_assignments.php - * - * @param ListAssignmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAssignments(ListAssignmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAssignments', $request, $callOptions); - } - - /** - * Lists all the capacity commitments for the admin project. - * - * The async variant is - * {@see ReservationServiceClient::listCapacityCommitmentsAsync()} . - * - * @example samples/V1/ReservationServiceClient/list_capacity_commitments.php - * - * @param ListCapacityCommitmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCapacityCommitments(ListCapacityCommitmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCapacityCommitments', $request, $callOptions); - } - - /** - * Lists all the reservations for the project in the specified location. - * - * The async variant is {@see ReservationServiceClient::listReservationsAsync()} . - * - * @example samples/V1/ReservationServiceClient/list_reservations.php - * - * @param ListReservationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listReservations(ListReservationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReservations', $request, $callOptions); - } - - /** - * Merges capacity commitments of the same plan into a single commitment. - * - * The resulting capacity commitment has the greater commitment_end_time - * out of the to-be-merged capacity commitments. - * - * Attempting to merge capacity commitments of different plan will fail - * with the error code `google.rpc.Code.FAILED_PRECONDITION`. - * - * The async variant is - * {@see ReservationServiceClient::mergeCapacityCommitmentsAsync()} . - * - * @example samples/V1/ReservationServiceClient/merge_capacity_commitments.php - * - * @param MergeCapacityCommitmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CapacityCommitment - * - * @throws ApiException Thrown if the API call fails. - */ - public function mergeCapacityCommitments(MergeCapacityCommitmentsRequest $request, array $callOptions = []): CapacityCommitment - { - return $this->startApiCall('MergeCapacityCommitments', $request, $callOptions)->wait(); - } - - /** - * Moves an assignment under a new reservation. - * - * This differs from removing an existing assignment and recreating a new one - * by providing a transactional change that ensures an assignee always has an - * associated reservation. - * - * The async variant is {@see ReservationServiceClient::moveAssignmentAsync()} . - * - * @example samples/V1/ReservationServiceClient/move_assignment.php - * - * @param MoveAssignmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Assignment - * - * @throws ApiException Thrown if the API call fails. - */ - public function moveAssignment(MoveAssignmentRequest $request, array $callOptions = []): Assignment - { - return $this->startApiCall('MoveAssignment', $request, $callOptions)->wait(); - } - - /** - * Looks up assignments for a specified resource for a particular region. - * If the request is about a project: - * - * 1. Assignments created on the project will be returned if they exist. - * 2. Otherwise assignments created on the closest ancestor will be - * returned. - * 3. Assignments for different JobTypes will all be returned. - * - * The same logic applies if the request is about a folder. - * - * If the request is about an organization, then assignments created on the - * organization will be returned (organization doesn't have ancestors). - * - * Comparing to ListAssignments, there are some behavior - * differences: - * - * 1. permission on the assignee will be verified in this API. - * 2. Hierarchy lookup (project->folder->organization) happens in this API. - * 3. Parent here is `projects/*/locations/*`, instead of - * `projects/*/locations/*reservations/*`. - * - * The async variant is - * {@see ReservationServiceClient::searchAllAssignmentsAsync()} . - * - * @example samples/V1/ReservationServiceClient/search_all_assignments.php - * - * @param SearchAllAssignmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 searchAllAssignments(SearchAllAssignmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchAllAssignments', $request, $callOptions); - } - - /** - * Deprecated: Looks up assignments for a specified resource for a particular - * region. If the request is about a project: - * - * 1. Assignments created on the project will be returned if they exist. - * 2. Otherwise assignments created on the closest ancestor will be - * returned. - * 3. Assignments for different JobTypes will all be returned. - * - * The same logic applies if the request is about a folder. - * - * If the request is about an organization, then assignments created on the - * organization will be returned (organization doesn't have ancestors). - * - * Comparing to ListAssignments, there are some behavior - * differences: - * - * 1. permission on the assignee will be verified in this API. - * 2. Hierarchy lookup (project->folder->organization) happens in this API. - * 3. Parent here is `projects/*/locations/*`, instead of - * `projects/*/locations/*reservations/*`. - * - * **Note** "-" cannot be used for projects - * nor locations. - * - * The async variant is {@see ReservationServiceClient::searchAssignmentsAsync()} . - * - * @example samples/V1/ReservationServiceClient/search_assignments.php - * - * @param SearchAssignmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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. - * - * @deprecated This method will be removed in the next major version update. - */ - public function searchAssignments(SearchAssignmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchAssignments', $request, $callOptions); - } - - /** - * Splits capacity commitment to two commitments of the same plan and - * `commitment_end_time`. - * - * A common use case is to enable downgrading commitments. - * - * For example, in order to downgrade from 10000 slots to 8000, you might - * split a 10000 capacity commitment into commitments of 2000 and 8000. Then, - * you delete the first one after the commitment end time passes. - * - * The async variant is - * {@see ReservationServiceClient::splitCapacityCommitmentAsync()} . - * - * @example samples/V1/ReservationServiceClient/split_capacity_commitment.php - * - * @param SplitCapacityCommitmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SplitCapacityCommitmentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function splitCapacityCommitment(SplitCapacityCommitmentRequest $request, array $callOptions = []): SplitCapacityCommitmentResponse - { - return $this->startApiCall('SplitCapacityCommitment', $request, $callOptions)->wait(); - } - - /** - * Updates an existing assignment. - * - * Only the `priority` field can be updated. - * - * The async variant is {@see ReservationServiceClient::updateAssignmentAsync()} . - * - * @example samples/V1/ReservationServiceClient/update_assignment.php - * - * @param UpdateAssignmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Assignment - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAssignment(UpdateAssignmentRequest $request, array $callOptions = []): Assignment - { - return $this->startApiCall('UpdateAssignment', $request, $callOptions)->wait(); - } - - /** - * Updates a BI reservation. - * - * Only fields specified in the `field_mask` are updated. - * - * A singleton BI reservation always exists with default size 0. - * In order to reserve BI capacity it needs to be updated to an amount - * greater than 0. In order to release BI capacity reservation size - * must be set to 0. - * - * The async variant is {@see ReservationServiceClient::updateBiReservationAsync()} - * . - * - * @example samples/V1/ReservationServiceClient/update_bi_reservation.php - * - * @param UpdateBiReservationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BiReservation - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBiReservation(UpdateBiReservationRequest $request, array $callOptions = []): BiReservation - { - return $this->startApiCall('UpdateBiReservation', $request, $callOptions)->wait(); - } - - /** - * Updates an existing capacity commitment. - * - * Only `plan` and `renewal_plan` fields can be updated. - * - * Plan can only be changed to a plan of a longer commitment period. - * Attempting to change to a plan with shorter commitment period will fail - * with the error code `google.rpc.Code.FAILED_PRECONDITION`. - * - * The async variant is - * {@see ReservationServiceClient::updateCapacityCommitmentAsync()} . - * - * @example samples/V1/ReservationServiceClient/update_capacity_commitment.php - * - * @param UpdateCapacityCommitmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CapacityCommitment - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCapacityCommitment(UpdateCapacityCommitmentRequest $request, array $callOptions = []): CapacityCommitment - { - return $this->startApiCall('UpdateCapacityCommitment', $request, $callOptions)->wait(); - } - - /** - * Updates an existing reservation resource. - * - * The async variant is {@see ReservationServiceClient::updateReservationAsync()} . - * - * @example samples/V1/ReservationServiceClient/update_reservation.php - * - * @param UpdateReservationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Reservation - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateReservation(UpdateReservationRequest $request, array $callOptions = []): Reservation - { - return $this->startApiCall('UpdateReservation', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 13f6c3398442..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.bigquery.reservation.v1", - "libraryPackage": "Google\\Cloud\\BigQuery\\Reservation\\V1", - "services": { - "ReservationService": { - "clients": { - "grpc": { - "libraryClient": "ReservationServiceGapicClient", - "rpcs": { - "CreateAssignment": { - "methods": [ - "createAssignment" - ] - }, - "CreateCapacityCommitment": { - "methods": [ - "createCapacityCommitment" - ] - }, - "CreateReservation": { - "methods": [ - "createReservation" - ] - }, - "DeleteAssignment": { - "methods": [ - "deleteAssignment" - ] - }, - "DeleteCapacityCommitment": { - "methods": [ - "deleteCapacityCommitment" - ] - }, - "DeleteReservation": { - "methods": [ - "deleteReservation" - ] - }, - "GetBiReservation": { - "methods": [ - "getBiReservation" - ] - }, - "GetCapacityCommitment": { - "methods": [ - "getCapacityCommitment" - ] - }, - "GetReservation": { - "methods": [ - "getReservation" - ] - }, - "ListAssignments": { - "methods": [ - "listAssignments" - ] - }, - "ListCapacityCommitments": { - "methods": [ - "listCapacityCommitments" - ] - }, - "ListReservations": { - "methods": [ - "listReservations" - ] - }, - "MergeCapacityCommitments": { - "methods": [ - "mergeCapacityCommitments" - ] - }, - "MoveAssignment": { - "methods": [ - "moveAssignment" - ] - }, - "SearchAllAssignments": { - "methods": [ - "searchAllAssignments" - ] - }, - "SearchAssignments": { - "methods": [ - "searchAssignments" - ] - }, - "SplitCapacityCommitment": { - "methods": [ - "splitCapacityCommitment" - ] - }, - "UpdateAssignment": { - "methods": [ - "updateAssignment" - ] - }, - "UpdateBiReservation": { - "methods": [ - "updateBiReservation" - ] - }, - "UpdateCapacityCommitment": { - "methods": [ - "updateCapacityCommitment" - ] - }, - "UpdateReservation": { - "methods": [ - "updateReservation" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json deleted file mode 100644 index 84c5b772f6f0..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.reservation.v1.ReservationService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "CreateAssignment": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCapacityCommitment": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateReservation": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAssignment": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteCapacityCommitment": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteReservation": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetBiReservation": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCapacityCommitment": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetReservation": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAssignments": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCapacityCommitments": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListReservations": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "MergeCapacityCommitments": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "MoveAssignment": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SearchAllAssignments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SearchAssignments": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SplitCapacityCommitment": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAssignment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateBiReservation": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateCapacityCommitment": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateReservation": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php deleted file mode 100644 index 64ce8be98798..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php +++ /dev/null @@ -1,331 +0,0 @@ - [ - 'google.cloud.bigquery.reservation.v1.ReservationService' => [ - 'CreateAssignment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Assignment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCapacityCommitment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReservation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAssignment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCapacityCommitment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReservation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBiReservation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\BiReservation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCapacityCommitment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReservation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAssignments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAssignments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ListAssignmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCapacityCommitments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCapacityCommitments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ListCapacityCommitmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListReservations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReservations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ListReservationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'MergeCapacityCommitments' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'MoveAssignment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Assignment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SearchAllAssignments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAssignments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\SearchAllAssignmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchAssignments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAssignments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\SearchAssignmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SplitCapacityCommitment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\SplitCapacityCommitmentResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAssignment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Assignment', - 'headerParams' => [ - [ - 'keyName' => 'assignment.name', - 'fieldAccessors' => [ - 'getAssignment', - 'getName', - ], - ], - ], - ], - 'UpdateBiReservation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\BiReservation', - 'headerParams' => [ - [ - 'keyName' => 'bi_reservation.name', - 'fieldAccessors' => [ - 'getBiReservation', - 'getName', - ], - ], - ], - ], - 'UpdateCapacityCommitment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment', - 'headerParams' => [ - [ - 'keyName' => 'capacity_commitment.name', - 'fieldAccessors' => [ - 'getCapacityCommitment', - 'getName', - ], - ], - ], - ], - 'UpdateReservation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', - 'headerParams' => [ - [ - 'keyName' => 'reservation.name', - 'fieldAccessors' => [ - 'getReservation', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'assignment' => 'projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}', - 'biReservation' => 'projects/{project}/locations/{location}/biReservation', - 'capacityCommitment' => 'projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}', - 'location' => 'projects/{project}/locations/{location}', - 'reservation' => 'projects/{project}/locations/{location}/reservations/{reservation}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php deleted file mode 100644 index f9074a563915..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php +++ /dev/null @@ -1,274 +0,0 @@ - [ - 'google.cloud.bigquery.reservation.v1.ReservationService' => [ - 'CreateAssignment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reservations/*}/assignments', - 'body' => 'assignment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCapacityCommitment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/capacityCommitments', - 'body' => 'capacity_commitment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReservation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reservations', - 'body' => 'reservation', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAssignment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*/assignments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCapacityCommitment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/capacityCommitments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReservation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBiReservation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/biReservation}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCapacityCommitment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/capacityCommitments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReservation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAssignments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reservations/*}/assignments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCapacityCommitments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/capacityCommitments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListReservations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reservations', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'MergeCapacityCommitments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/capacityCommitments:merge', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'MoveAssignment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SearchAllAssignments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:searchAllAssignments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchAssignments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:searchAssignments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SplitCapacityCommitment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/capacityCommitments/*}:split', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAssignment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}', - 'body' => 'assignment', - 'placeholders' => [ - 'assignment.name' => [ - 'getters' => [ - 'getAssignment', - 'getName', - ], - ], - ], - ], - 'UpdateBiReservation' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{bi_reservation.name=projects/*/locations/*/biReservation}', - 'body' => 'bi_reservation', - 'placeholders' => [ - 'bi_reservation.name' => [ - 'getters' => [ - 'getBiReservation', - 'getName', - ], - ], - ], - ], - 'UpdateCapacityCommitment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{capacity_commitment.name=projects/*/locations/*/capacityCommitments/*}', - 'body' => 'capacity_commitment', - 'placeholders' => [ - 'capacity_commitment.name' => [ - 'getters' => [ - 'getCapacityCommitment', - 'getName', - ], - ], - ], - ], - 'UpdateReservation' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{reservation.name=projects/*/locations/*/reservations/*}', - 'body' => 'reservation', - 'placeholders' => [ - 'reservation.name' => [ - 'getters' => [ - 'getReservation', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php b/owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php deleted file mode 100644 index a421c4e18cf0..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php +++ /dev/null @@ -1,1506 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ReservationServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ReservationServiceClient($options); - } - - /** @test */ - public function createAssignmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $assignee = 'assignee-369881649'; - $expectedResponse = new Assignment(); - $expectedResponse->setName($name); - $expectedResponse->setAssignee($assignee); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new CreateAssignmentRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createAssignment($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.bigquery.reservation.v1.ReservationService/CreateAssignment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAssignmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new CreateAssignmentRequest()) - ->setParent($formattedParent); - try { - $gapicClient->createAssignment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCapacityCommitmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $slotCount = 191518834; - $multiRegionAuxiliary = false; - $expectedResponse = new CapacityCommitment(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCount($slotCount); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new CreateCapacityCommitmentRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createCapacityCommitment($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.bigquery.reservation.v1.ReservationService/CreateCapacityCommitment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCapacityCommitmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 CreateCapacityCommitmentRequest()) - ->setParent($formattedParent); - try { - $gapicClient->createCapacityCommitment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReservationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $slotCapacity = 1516717605; - $ignoreIdleSlots = false; - $concurrency = 1476186003; - $multiRegionAuxiliary = false; - $expectedResponse = new Reservation(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCapacity($slotCapacity); - $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); - $expectedResponse->setConcurrency($concurrency); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new CreateReservationRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createReservation($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.bigquery.reservation.v1.ReservationService/CreateReservation', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReservationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 CreateReservationRequest()) - ->setParent($formattedParent); - try { - $gapicClient->createReservation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAssignmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assignmentName('[PROJECT]', '[LOCATION]', '[RESERVATION]', '[ASSIGNMENT]'); - $request = (new DeleteAssignmentRequest()) - ->setName($formattedName); - $gapicClient->deleteAssignment($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/DeleteAssignment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAssignmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->assignmentName('[PROJECT]', '[LOCATION]', '[RESERVATION]', '[ASSIGNMENT]'); - $request = (new DeleteAssignmentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAssignment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCapacityCommitmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); - $request = (new DeleteCapacityCommitmentRequest()) - ->setName($formattedName); - $gapicClient->deleteCapacityCommitment($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/DeleteCapacityCommitment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCapacityCommitmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); - $request = (new DeleteCapacityCommitmentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteCapacityCommitment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReservationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new DeleteReservationRequest()) - ->setName($formattedName); - $gapicClient->deleteReservation($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/DeleteReservation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReservationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new DeleteReservationRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteReservation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBiReservationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $size = 3530753; - $expectedResponse = new BiReservation(); - $expectedResponse->setName($name2); - $expectedResponse->setSize($size); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->biReservationName('[PROJECT]', '[LOCATION]'); - $request = (new GetBiReservationRequest()) - ->setName($formattedName); - $response = $gapicClient->getBiReservation($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.bigquery.reservation.v1.ReservationService/GetBiReservation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBiReservationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->biReservationName('[PROJECT]', '[LOCATION]'); - $request = (new GetBiReservationRequest()) - ->setName($formattedName); - try { - $gapicClient->getBiReservation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCapacityCommitmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $slotCount = 191518834; - $multiRegionAuxiliary = false; - $expectedResponse = new CapacityCommitment(); - $expectedResponse->setName($name2); - $expectedResponse->setSlotCount($slotCount); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); - $request = (new GetCapacityCommitmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getCapacityCommitment($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.bigquery.reservation.v1.ReservationService/GetCapacityCommitment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCapacityCommitmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); - $request = (new GetCapacityCommitmentRequest()) - ->setName($formattedName); - try { - $gapicClient->getCapacityCommitment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReservationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $slotCapacity = 1516717605; - $ignoreIdleSlots = false; - $concurrency = 1476186003; - $multiRegionAuxiliary = false; - $expectedResponse = new Reservation(); - $expectedResponse->setName($name2); - $expectedResponse->setSlotCapacity($slotCapacity); - $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); - $expectedResponse->setConcurrency($concurrency); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new GetReservationRequest()) - ->setName($formattedName); - $response = $gapicClient->getReservation($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.bigquery.reservation.v1.ReservationService/GetReservation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReservationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new GetReservationRequest()) - ->setName($formattedName); - try { - $gapicClient->getReservation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssignmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $assignmentsElement = new Assignment(); - $assignments = [ - $assignmentsElement, - ]; - $expectedResponse = new ListAssignmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAssignments($assignments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new ListAssignmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAssignments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAssignments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/ListAssignments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssignmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new ListAssignmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAssignments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCapacityCommitmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $capacityCommitmentsElement = new CapacityCommitment(); - $capacityCommitments = [ - $capacityCommitmentsElement, - ]; - $expectedResponse = new ListCapacityCommitmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCapacityCommitments($capacityCommitments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCapacityCommitmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCapacityCommitments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCapacityCommitments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/ListCapacityCommitments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCapacityCommitmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListCapacityCommitmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCapacityCommitments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReservationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $reservationsElement = new Reservation(); - $reservations = [ - $reservationsElement, - ]; - $expectedResponse = new ListReservationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReservations($reservations); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListReservationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReservations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReservations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/ListReservations', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReservationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListReservationsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReservations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mergeCapacityCommitmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $slotCount = 191518834; - $multiRegionAuxiliary = false; - $expectedResponse = new CapacityCommitment(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCount($slotCount); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $transport->addResponse($expectedResponse); - $request = new MergeCapacityCommitmentsRequest(); - $response = $gapicClient->mergeCapacityCommitments($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.bigquery.reservation.v1.ReservationService/MergeCapacityCommitments', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mergeCapacityCommitmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 MergeCapacityCommitmentsRequest(); - try { - $gapicClient->mergeCapacityCommitments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function moveAssignmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $assignee = 'assignee-369881649'; - $expectedResponse = new Assignment(); - $expectedResponse->setName($name2); - $expectedResponse->setAssignee($assignee); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assignmentName('[PROJECT]', '[LOCATION]', '[RESERVATION]', '[ASSIGNMENT]'); - $request = (new MoveAssignmentRequest()) - ->setName($formattedName); - $response = $gapicClient->moveAssignment($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.bigquery.reservation.v1.ReservationService/MoveAssignment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function moveAssignmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->assignmentName('[PROJECT]', '[LOCATION]', '[RESERVATION]', '[ASSIGNMENT]'); - $request = (new MoveAssignmentRequest()) - ->setName($formattedName); - try { - $gapicClient->moveAssignment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchAllAssignmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $assignmentsElement = new Assignment(); - $assignments = [ - $assignmentsElement, - ]; - $expectedResponse = new SearchAllAssignmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAssignments($assignments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new SearchAllAssignmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->searchAllAssignments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAssignments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/SearchAllAssignments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchAllAssignmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 SearchAllAssignmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->searchAllAssignments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchAssignmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $assignmentsElement = new Assignment(); - $assignments = [ - $assignmentsElement, - ]; - $expectedResponse = new SearchAssignmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAssignments($assignments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new SearchAssignmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->searchAssignments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAssignments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.reservation.v1.ReservationService/SearchAssignments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchAssignmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 SearchAssignmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->searchAssignments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function splitCapacityCommitmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SplitCapacityCommitmentResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); - $request = (new SplitCapacityCommitmentRequest()) - ->setName($formattedName); - $response = $gapicClient->splitCapacityCommitment($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.bigquery.reservation.v1.ReservationService/SplitCapacityCommitment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function splitCapacityCommitmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->capacityCommitmentName('[PROJECT]', '[LOCATION]', '[CAPACITY_COMMITMENT]'); - $request = (new SplitCapacityCommitmentRequest()) - ->setName($formattedName); - try { - $gapicClient->splitCapacityCommitment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAssignmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $assignee = 'assignee-369881649'; - $expectedResponse = new Assignment(); - $expectedResponse->setName($name); - $expectedResponse->setAssignee($assignee); - $transport->addResponse($expectedResponse); - $request = new UpdateAssignmentRequest(); - $response = $gapicClient->updateAssignment($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.bigquery.reservation.v1.ReservationService/UpdateAssignment', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAssignmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 UpdateAssignmentRequest(); - try { - $gapicClient->updateAssignment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBiReservationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $size = 3530753; - $expectedResponse = new BiReservation(); - $expectedResponse->setName($name); - $expectedResponse->setSize($size); - $transport->addResponse($expectedResponse); - $request = new UpdateBiReservationRequest(); - $response = $gapicClient->updateBiReservation($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.bigquery.reservation.v1.ReservationService/UpdateBiReservation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBiReservationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 UpdateBiReservationRequest(); - try { - $gapicClient->updateBiReservation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCapacityCommitmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $slotCount = 191518834; - $multiRegionAuxiliary = false; - $expectedResponse = new CapacityCommitment(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCount($slotCount); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $transport->addResponse($expectedResponse); - $request = new UpdateCapacityCommitmentRequest(); - $response = $gapicClient->updateCapacityCommitment($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.bigquery.reservation.v1.ReservationService/UpdateCapacityCommitment', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCapacityCommitmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 UpdateCapacityCommitmentRequest(); - try { - $gapicClient->updateCapacityCommitment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateReservationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $slotCapacity = 1516717605; - $ignoreIdleSlots = false; - $concurrency = 1476186003; - $multiRegionAuxiliary = false; - $expectedResponse = new Reservation(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCapacity($slotCapacity); - $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); - $expectedResponse->setConcurrency($concurrency); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $transport->addResponse($expectedResponse); - $request = new UpdateReservationRequest(); - $response = $gapicClient->updateReservation($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.bigquery.reservation.v1.ReservationService/UpdateReservation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateReservationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 UpdateReservationRequest(); - try { - $gapicClient->updateReservation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAssignmentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $assignee = 'assignee-369881649'; - $expectedResponse = new Assignment(); - $expectedResponse->setName($name); - $expectedResponse->setAssignee($assignee); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new CreateAssignmentRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createAssignmentAsync($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.bigquery.reservation.v1.ReservationService/CreateAssignment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php deleted file mode 100644 index e94a47965444..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - ' -Ã -2google/cloud/bigquery/storage/v1/annotations.proto google.cloud.bigquery.storage.v1 google/protobuf/descriptor.protoBÀ -$com.google.cloud.bigquery.storage.v1BAnnotationsProtoPZ>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepbª Google.Cloud.BigQuery.Storage.V1Ê Google\\Cloud\\BigQuery\\Storage\\V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php deleted file mode 100644 index c40bcd2e29750c4d1abb1012d4f0eb81c3a0dbeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1165 zcmb7D-EPw`7$s#w%>1ZCLfgazrc_!d4Oa!OIy%(9jiRkB>)1sVsd5~*wUoxec7_Jp z3-Jg%0yjJX?}F{5VWO%Ky+|YHeCIp<&UfCtjps3V4v%R>1y(eG{uNYn3S+?)Cp?6H zGM!QZ317r4qyjXS5>LFz%yFC ztW~iP{4=t|07Q5}WsC`h$HUesRXD&3d⁣Ya0%)m2r5Zl*7BI9RNT=EG29jF7OpV z{fiSnWCTiumHsO;Ibjh~42SHCzE1;AaVV*-T*Xe4h$zM*XbJ`qp_M(DavE$o=KB5( zxKuSXBhlmVdXb_c!lBopk_Z-Sc|#4Y*Jo7agES|Vy{xUFV^dg3HP-7ZA{$VNgx>59 zp`a=e(Sg-%2(I%ttL()g%XBn@Aa8r5O{(NTQ??6!ZGip%amUTPMAl2R^b%!WqRU#T z0`6H0Mr2MG*xdn-Bo*1nC(<5nJJ6}zFTDpvi#(%*i=c%SnY&NH)(yC@Unai!loq*< z!KU_iLUI5 zedf*^d{Le8)y(0T>DXni#r{G5 z_N@TZq#>I$q?7i+q!ndJLl?ClONf`H(Ztb$ygZLOkp3N;=U2P=%I&9{d}Hy~F1internalAddGeneratedFile( - ' -· -+google/cloud/bigquery/storage/v1/avro.proto google.cloud.bigquery.storage.v1" - -AvroSchema -schema ( "A -AvroRows -serialized_binary_rows (  - row_count (B"A -AvroSerializationOptions% -enable_display_name_attribute (B¹ -$com.google.cloud.bigquery.storage.v1B AvroProtoPZ>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepbª Google.Cloud.BigQuery.Storage.V1Ê Google\\Cloud\\BigQuery\\Storage\\V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php deleted file mode 100644 index b136e094cddd..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - ' -® -/google/cloud/bigquery/storage/v1/protobuf.proto google.cloud.bigquery.storage.v1 google/protobuf/descriptor.proto"I - ProtoSchema: -proto_descriptor ( 2 .google.protobuf.DescriptorProto"$ - ProtoRows -serialized_rows ( B½ -$com.google.cloud.bigquery.storage.v1B ProtoBufProtoPZ>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepbª Google.Cloud.BigQuery.Storage.V1Ê Google\\Cloud\\BigQuery\\Storage\\V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php deleted file mode 100644 index b6dc4a5859a8ae18fcbcc9fa6638ee7200c7b512..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8911 zcmc&)&2J-F5#P?&CgmjKd9$;V@$Swvy@NJ0ld*R^!|ZM{Uv0acm`&_pJDJ^)q1CZF zNwc=Q>26OpL^;3-1gBjj1c(blLP8vnxFT`mupE$<17gI10}_J20KtWNuixvmlX&ff zAaaS-uc}^Ey{cbTz3%&uoNWhQmlw^p=^DP-kT-T^f7_HD*Y@qY-IO;vo13O9*X@>L zHBC1u%ej(VELCMKSEzmtSv|Ys*3Ef&%eJ?gW~$z_JB`$awe_`*>F%aH-*$~HGxhAY z_?cv)0oq2(^c{! zIh~EBRhK>A@bTX@%hRp4w{7YLyY0=-AJ}vtq8DSfX_;;R zWITDxY&J6Hw(-oe-IKAFO&&M{E7>z9YO3qnJA-fk8G@d<_F2dgVR9C-D!ywPt+S9+ zH8z^&;DUq^wW@`g>KiTR6ueJd!*NXa1hH6l>X`3_-|4}_Qu5YAizlGkXoUHeM}(RU zGlb^L8}O3_NS+Lu2#2yHgR-Q6vLuJH#L?g`#rs%!yNdi5Vy(uyKZ4eHlC!mIJHq)7azG!bxJ!lrI8| z6I|iDhXgx3iuk&4zw6Yos?bmg7L>n9Fq6e}@y)VnG%BX&Ar6*JEJdDAvM}ZtE}qql zBuldsnLB?`hyJDBf}8A|#bLCJHr6Yb#|$2@m&Dqa!escWS@+2jOrrdT?gg@EhEP;2 zeT$R#4w+;`q0BJuOlBb7GCtG;Kk9Y6gNhBKv{9l!!f{Qkx~|#KTUNW9W`xox7M!CJ z%l3{Z?8`$eP>r1oH}W&X(oyC662t<$qLdzbYaGvT3w`TxPu=V9sfd6ix}9++9>TczO)kTE z!`D%$gGJ6n?-*`yrV_aX=b}qyyTSIAlwXWM{J>!WCwT-D1}2G)S>-X`$I>_Y>!%_M z_50EbWEBX@NmQn8yO`{TU*DdgClpJk2arVbxy)EIloKVMhY5Vf!(j{s4U_vYN`qW@ zaDZ5gc#tf@ba+@)j5#yP)JyeOulv-OAjX{K)wj)-G4mpmGS^=UbytP)(6}F7lE@cf zGVmG~HO@p0U>B?N-LhukWo+QEIi)d%>9VowV?oZVqk;<$B;^ zWD|0;3m9YRS48k5#<8g&iBrM7yX!`?W0DF0dmMmE00|ESL(k44c|?B-fxex?*$B}A zg>t;1h!rIAsf4mj;zBVXeGEubw;D4PaVE$fywe_OZKN=E6Mfvv-kZ9_1 z^nMCcbo^;IXt#m^&B0sk@8+Yz1T-)~hy}01D0Yap%L9rCnb;I3Y4_Ek4T=WS9S1K~ zurl)4r7h+_vCGhzN6A9~+Lf^VJnV01_7Bi0VVG!CMe@=ijHk#okywC9ZYHxSg0De> zeHOlE0LDcJsQgfZi;Jco!D>;HFzF)I`ZS=A_5PVq1yYk>nK@1xw)JdoF7Z1&ZFwhY- zEu8)_n5H~d@kJoe4P)t~VCn4>ep$zYLHPc<84!16N>zQ`Ud57I3H1k>wGYh1q%Ok1SX?CB`Yvew;RDBPNyH8>_iYQ z*d;AHo-B%?BOnfSmcPruWrAFUDVF;>UIckK90wQ{*s z*0ZIYb_iK7z`3fLS=MyCNY?YEwPFt8^;MXuRLh#WqN~gJFZVujuB;TQRRrT9gpfF2 zJ>VI}dGA7@h)`b0>3p^N{;C!q!5Q_XLkktecr88}5tJ_!k@G2vA0slnTFEYHE2@qK zVnwZHmvrsDYFX8>7A)r~@fUIGyjaTTD_S*FPkXOWsaE3SR13aTTC3`%yk1s|i&~ue z?R<7cdzYEHS}v^@a<~~#Q9?Pk94^J^5__Z-v*q_!Sy5tMj89Tw@2*tzidJ4PWVv(W zQJVrj=hwFdky?6pYgT|3jAO!O1}+Xr;!^sfF__F)TVJB@59ka-{w|>#ank6z)gkl! zRX)PRb2~A>bit;l;F3qNo~ze_tD`woBfR{XJA8lh%|HD022 zrqW9!FLfhDUv}UX3;oH~@W=kVbc6h!9vQ#bAp=w!K`Sg9psze&3D8A(`dlS}whZ0p zg4-Wv%p>w3Vhmf3TG6!Y!9;*&@Eb8|QBWnQNpDKzw-TH?G~JT7`=8w*7Gd8zr{Lsf zK4ccXP3|#^Xj^b1Qxbchs8>FFTKrUfvhDkhH=j!F?Cfw&!*SQ>_}k%&vAKSPteD<% znufn=yRG!EV=yI>f>llO$1p1*Rdn#Ih%gD?4v-ZQF6GH{^#ad|oyY*syu6^?WL^%| zqkcX%@VjmR$fpv(LH|qc^gr?gYGKRWlQHoSS$nQ_slse|tSm5FqDJ=bX2ljIlq9o`&-T_qWy zMufz|gaMK;!t*~(r^GL%0g(7RQa^+hSl$uGo>$2H+*NlHw4#k*yBC^C3f|VRH&I)5SVS;EgRd*F#vFWL;cP7M=g!8@hvY@}MMW}8zo7JheuA71=JUF&y~dpGQF_V};;gFa`E1I)hYclKD{ ov%fKhw7z}kjqttgT<{%4n3Uh@d;P4}E5+af>MF!ha(q}}iA+1+pV?4xh}LmzIc+r%Y- z$w*6W9;@t-sD9uv&+;6#*=x5+pjuwnw;d8_s+upWd*!-X$d~FjP?dVUz#zVsUJf&OPJX*nc3JDAdMUc zX=Fo?Mooe=_SZK7EXSl&tqCxA4J!WpUemEHl`@mz-z}ROwrexnbnKt;M32?B=}>~I zr)Aqc*J8Hks$8M$T4eREDlxh2E#E^AJXQy0Rk%~oA&rvDNZ^`IBTuLm*go1nwuRpSh&>Au}4+QeyP z$)R~}{*|Iu}7mwZ@cykTze-KTSkX4#sl{R3N7P3k^T2Fo+0-C;^ z4#E&hjwSDn-OJ>03Z=guFO9*N7@Bd9htgk$(1QBNpEMh|RSKm3T7Ys2j}N=2c=ab}erh?{tNgIb5AYbIvI?i1kXs8ka=!k(QA%6G6Jygq=M z6;Subnd&kM3DLHZM5_s{YzLG=85zUrUuopfTslul;^M{w2ZFTvfDNZ zXyTGE;?Z~`B0SV215m}(~vqT>mMFd+d`!_ zlG~uzT@p(p1rx;u{e_W6y{ifEzhu9iOcv}q;@QsgT;4!sjS0g>Y6@1 z^q5R{PK5WSd-AtgSQaP|$0^rfi4uoc{J0otr$v!c)2s9R1Gf+h1`BM_0R^Mxl@44F z(~|_EfnrPb++jR9f#MsRr4sMiQKJF_Bd}v0q~`<(C*F(G@;sEWxOCeSF|`2-huQ33e@R9E>+cq?=Tg z?1;odtA-ooM))}nFYTB@J5nzoah?>W?pM`9ty12r6^vYYw}KC~Qh5*8`9jWkx>u_d za;0LakYB!_q~MG9$Ub@gaCs_w8*X|%=J!}w8x0!u;vf*&tDqRC9GG2!>pXYPaaiWZ zxB4Nh4XV(fS)C|G5oakG>A_(|G{3B6B(v7ljZ3|#@sZp-OwY*-} zjbgdFtJhDMI|noRezlB;pNCn!S}h+ePpy?;DPq;WO{aEgUbk{q;8kkw!Rz@)=YJHHJedPNB_<7!&3_ ZxHG)p-;>i@WY{}*&=Zn!9P2|L;6I+MB4+>q diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php deleted file mode 100644 index ee9b8d1dd02fe8f4421bea32f096c12b83358010..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1875 zcmbtV-EQMV6vj!KHYdAfunr6P-HVowrFj&1C5 zwFUKscmy7Sr`Stg0*M*haaJuWv?Vv0Idjf;eto|0e+bthe1ZGarx9V)!HZkW))a?P zzydq)@FH0*X@u=y6S^La6pVXgJQ|x=>*?m_+%yi7$fj+)3WAkKTecS@PHW+=eo1I_ z+lpBbkri#-oU|BOcvMM&0erHdaY$^6`-VECj5vf5tDj<6U4db#IfgaOFs!SSGXUEo zag0rY1-}92zc5*Nu8m_x82>wVKP~IHD|x{IfJ}0dQBGtbeIlCv>d~mwJv$*W|_xqIP?i)ea<0>Z_M- zo26X?SXt3z{|7`Hl8wo1HoBS~!u4_Y^ z&qh;2>*^P})x#xr%Gp>nP=>zb${RMcxzo1#7W z04nNuJU~_XDb!4Ts7=kz&_Mg*q1Q1rbRbUR0oCLua3Eyq4TM2o8}}z2T3ucT|h+)p~!GJ?%mIj z1B_;aK}RGb3Al-NInyUR`%-o@G#*(GmDN8aIOYWLpRH9P{YukCYDho5%$CIVdk;3P zRq&8GNa%9%$QMYsI4e%SmvF`xO3D`s=Zj0hIZDnK%GJrATNNwk6hSJfl2xz@rp572EGcwvXRh-|t-Asb;od@8AyLAAN#2@&Et; diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php deleted file mode 100644 index 0b1e665e3d46..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php +++ /dev/null @@ -1,547 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsRequest - */ -class AppendRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * * In the first request to an AppendRows connection. - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * For explicitly created write streams, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * For the special default stream, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * * r1: {write_stream: stream_name_1} - * * r2: {write_stream: /*omit*/} - * * r3: {write_stream: /*omit*/} - * * r4: {write_stream: stream_name_2} - * * r5: {write_stream: stream_name_2} - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $write_stream = ''; - /** - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - */ - protected $offset = null; - /** - * Id set by client to annotate its identity. Only initial request setting is - * respected. - * - * Generated from protobuf field string trace_id = 6; - */ - protected $trace_id = ''; - /** - * A map to indicate how to interpret missing value for some fields. Missing - * values are fields present in user schema but missing in rows. The key is - * the field name. The value is the interpretation of missing values for the - * field. - * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - * missing values in field foo are interpreted as NULL, all missing values in - * field bar are interpreted as the default value of field bar in table - * schema. - * If a field is not in this map and has missing values, the missing values - * in this field are interpreted as NULL. - * This field only applies to the current request, it won't affect other - * requests on the connection. - * Currently, field name can only be top-level column name, can't be a struct - * field path like 'foo.bar'. - * - * Generated from protobuf field map missing_value_interpretations = 7; - */ - private $missing_value_interpretations; - /** - * Optional. Default missing value interpretation for all columns in the - * table. When a value is specified on an `AppendRowsRequest`, it is applied - * to all requests on the connection from that point forward, until a - * subsequent `AppendRowsRequest` sets it to a different value. - * `missing_value_interpretation` can override - * `default_missing_value_interpretation`. For example, if you want to write - * `NULL` instead of using default values for some columns, you can set - * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_missing_value_interpretation = 0; - protected $rows; - - /** - * @param string $writeStream Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * - * * In the first request to an AppendRows connection. - * - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * - * For explicitly created write streams, the format is: - * - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * - * For the special default stream, the format is: - * - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * - * * r1: {write_stream: stream_name_1} - * - * * r2: {write_stream: /*omit*/} - * - * * r3: {write_stream: /*omit*/} - * - * * r4: {write_stream: stream_name_2} - * - * * r5: {write_stream: stream_name_2} - * - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. Please see - * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest - * - * @experimental - */ - public static function build(string $writeStream): self - { - return (new self()) - ->setWriteStream($writeStream); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $write_stream - * Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * * In the first request to an AppendRows connection. - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * For explicitly created write streams, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * For the special default stream, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * * r1: {write_stream: stream_name_1} - * * r2: {write_stream: /*omit*/} - * * r3: {write_stream: /*omit*/} - * * r4: {write_stream: stream_name_2} - * * r5: {write_stream: stream_name_2} - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. - * @type \Google\Protobuf\Int64Value $offset - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData $proto_rows - * Rows in proto format. - * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData $arrow_rows - * Rows in arrow format. This is an experimental feature only selected for - * allowlisted customers. - * @type string $trace_id - * Id set by client to annotate its identity. Only initial request setting is - * respected. - * @type array|\Google\Protobuf\Internal\MapField $missing_value_interpretations - * A map to indicate how to interpret missing value for some fields. Missing - * values are fields present in user schema but missing in rows. The key is - * the field name. The value is the interpretation of missing values for the - * field. - * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - * missing values in field foo are interpreted as NULL, all missing values in - * field bar are interpreted as the default value of field bar in table - * schema. - * If a field is not in this map and has missing values, the missing values - * in this field are interpreted as NULL. - * This field only applies to the current request, it won't affect other - * requests on the connection. - * Currently, field name can only be top-level column name, can't be a struct - * field path like 'foo.bar'. - * @type int $default_missing_value_interpretation - * Optional. Default missing value interpretation for all columns in the - * table. When a value is specified on an `AppendRowsRequest`, it is applied - * to all requests on the connection from that point forward, until a - * subsequent `AppendRowsRequest` sets it to a different value. - * `missing_value_interpretation` can override - * `default_missing_value_interpretation`. For example, if you want to write - * `NULL` instead of using default values for some columns, you can set - * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * * In the first request to an AppendRows connection. - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * For explicitly created write streams, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * For the special default stream, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * * r1: {write_stream: stream_name_1} - * * r2: {write_stream: /*omit*/} - * * r3: {write_stream: /*omit*/} - * * r4: {write_stream: stream_name_2} - * * r5: {write_stream: stream_name_2} - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getWriteStream() - { - return $this->write_stream; - } - - /** - * Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * * In the first request to an AppendRows connection. - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * For explicitly created write streams, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * For the special default stream, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * * r1: {write_stream: stream_name_1} - * * r2: {write_stream: /*omit*/} - * * r3: {write_stream: /*omit*/} - * * r4: {write_stream: stream_name_2} - * * r5: {write_stream: stream_name_2} - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWriteStream($var) - { - GPBUtil::checkString($var, True); - $this->write_stream = $var; - - return $this; - } - - /** - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getOffset() - { - return $this->offset; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * Returns the unboxed value from getOffset() - - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @return int|string|null - */ - public function getOffsetUnwrapped() - { - return $this->readWrapperValue("offset"); - } - - /** - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->offset = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @param int|string|null $var - * @return $this - */ - public function setOffsetUnwrapped($var) - { - $this->writeWrapperValue("offset", $var); - return $this;} - - /** - * Rows in proto format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4; - * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData|null - */ - public function getProtoRows() - { - return $this->readOneof(4); - } - - public function hasProtoRows() - { - return $this->hasOneof(4); - } - - /** - * Rows in proto format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4; - * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData $var - * @return $this - */ - public function setProtoRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Rows in arrow format. This is an experimental feature only selected for - * allowlisted customers. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; - * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData|null - */ - public function getArrowRows() - { - return $this->readOneof(5); - } - - public function hasArrowRows() - { - return $this->hasOneof(5); - } - - /** - * Rows in arrow format. This is an experimental feature only selected for - * allowlisted customers. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; - * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData $var - * @return $this - */ - public function setArrowRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Id set by client to annotate its identity. Only initial request setting is - * respected. - * - * Generated from protobuf field string trace_id = 6; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * Id set by client to annotate its identity. Only initial request setting is - * respected. - * - * Generated from protobuf field string trace_id = 6; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - - /** - * A map to indicate how to interpret missing value for some fields. Missing - * values are fields present in user schema but missing in rows. The key is - * the field name. The value is the interpretation of missing values for the - * field. - * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - * missing values in field foo are interpreted as NULL, all missing values in - * field bar are interpreted as the default value of field bar in table - * schema. - * If a field is not in this map and has missing values, the missing values - * in this field are interpreted as NULL. - * This field only applies to the current request, it won't affect other - * requests on the connection. - * Currently, field name can only be top-level column name, can't be a struct - * field path like 'foo.bar'. - * - * Generated from protobuf field map missing_value_interpretations = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMissingValueInterpretations() - { - return $this->missing_value_interpretations; - } - - /** - * A map to indicate how to interpret missing value for some fields. Missing - * values are fields present in user schema but missing in rows. The key is - * the field name. The value is the interpretation of missing values for the - * field. - * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - * missing values in field foo are interpreted as NULL, all missing values in - * field bar are interpreted as the default value of field bar in table - * schema. - * If a field is not in this map and has missing values, the missing values - * in this field are interpreted as NULL. - * This field only applies to the current request, it won't affect other - * requests on the connection. - * Currently, field name can only be top-level column name, can't be a struct - * field path like 'foo.bar'. - * - * Generated from protobuf field map missing_value_interpretations = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMissingValueInterpretations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\MissingValueInterpretation::class); - $this->missing_value_interpretations = $arr; - - return $this; - } - - /** - * Optional. Default missing value interpretation for all columns in the - * table. When a value is specified on an `AppendRowsRequest`, it is applied - * to all requests on the connection from that point forward, until a - * subsequent `AppendRowsRequest` sets it to a different value. - * `missing_value_interpretation` can override - * `default_missing_value_interpretation`. For example, if you want to write - * `NULL` instead of using default values for some columns, you can set - * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDefaultMissingValueInterpretation() - { - return $this->default_missing_value_interpretation; - } - - /** - * Optional. Default missing value interpretation for all columns in the - * table. When a value is specified on an `AppendRowsRequest`, it is applied - * to all requests on the connection from that point forward, until a - * subsequent `AppendRowsRequest` sets it to a different value. - * `missing_value_interpretation` can override - * `default_missing_value_interpretation`. For example, if you want to write - * `NULL` instead of using default values for some columns, you can set - * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDefaultMissingValueInterpretation($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\MissingValueInterpretation::class); - $this->default_missing_value_interpretation = $var; - - return $this; - } - - /** - * @return string - */ - public function getRows() - { - return $this->whichOneof("rows"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php deleted file mode 100644 index 111dfc08c23d..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData - */ -class ArrowData extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Arrow Schema used to serialize the data. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; - */ - protected $writer_schema = null; - /** - * Required. Serialized row data in Arrow format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; - */ - protected $rows = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $writer_schema - * Optional. Arrow Schema used to serialize the data. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $rows - * Required. Serialized row data in Arrow format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Arrow Schema used to serialize the data. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null - */ - public function getWriterSchema() - { - return $this->writer_schema; - } - - public function hasWriterSchema() - { - return isset($this->writer_schema); - } - - public function clearWriterSchema() - { - unset($this->writer_schema); - } - - /** - * Optional. Arrow Schema used to serialize the data. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var - * @return $this - */ - public function setWriterSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); - $this->writer_schema = $var; - - return $this; - } - - /** - * Required. Serialized row data in Arrow format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch|null - */ - public function getRows() - { - return $this->rows; - } - - public function hasRows() - { - return isset($this->rows); - } - - public function clearRows() - { - unset($this->rows); - } - - /** - * Required. Serialized row data in Arrow format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $var - * @return $this - */ - public function setRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch::class); - $this->rows = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ArrowData::class, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest_ArrowData::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php deleted file mode 100644 index f5b70f6fd729..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation - */ -class MissingValueInterpretation -{ - /** - * Invalid missing value interpretation. Requests with this value will be - * rejected. - * - * Generated from protobuf enum MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0; - */ - const MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0; - /** - * Missing value is interpreted as NULL. - * - * Generated from protobuf enum NULL_VALUE = 1; - */ - const NULL_VALUE = 1; - /** - * Missing value is interpreted as column default value if declared in the - * table schema, NULL otherwise. - * - * Generated from protobuf enum DEFAULT_VALUE = 2; - */ - const DEFAULT_VALUE = 2; - - private static $valueToName = [ - self::MISSING_VALUE_INTERPRETATION_UNSPECIFIED => 'MISSING_VALUE_INTERPRETATION_UNSPECIFIED', - self::NULL_VALUE => 'NULL_VALUE', - self::DEFAULT_VALUE => 'DEFAULT_VALUE', - ]; - - 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(MissingValueInterpretation::class, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest_MissingValueInterpretation::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php deleted file mode 100644 index d9dd9af3d1a5..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData - */ -class ProtoData extends \Google\Protobuf\Internal\Message -{ - /** - * The protocol buffer schema used to serialize the data. Provide this value - * whenever: - * * You send the first request of an RPC connection. - * * You change the input schema. - * * You specify a new destination table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; - */ - protected $writer_schema = null; - /** - * Serialized row data in protobuf message format. - * Currently, the backend expects the serialized rows to adhere to - * proto2 semantics when appending rows, particularly with respect to - * how default values are encoded. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; - */ - protected $rows = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\ProtoSchema $writer_schema - * The protocol buffer schema used to serialize the data. Provide this value - * whenever: - * * You send the first request of an RPC connection. - * * You change the input schema. - * * You specify a new destination table. - * @type \Google\Cloud\BigQuery\Storage\V1\ProtoRows $rows - * Serialized row data in protobuf message format. - * Currently, the backend expects the serialized rows to adhere to - * proto2 semantics when appending rows, particularly with respect to - * how default values are encoded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * The protocol buffer schema used to serialize the data. Provide this value - * whenever: - * * You send the first request of an RPC connection. - * * You change the input schema. - * * You specify a new destination table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; - * @return \Google\Cloud\BigQuery\Storage\V1\ProtoSchema|null - */ - public function getWriterSchema() - { - return $this->writer_schema; - } - - public function hasWriterSchema() - { - return isset($this->writer_schema); - } - - public function clearWriterSchema() - { - unset($this->writer_schema); - } - - /** - * The protocol buffer schema used to serialize the data. Provide this value - * whenever: - * * You send the first request of an RPC connection. - * * You change the input schema. - * * You specify a new destination table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; - * @param \Google\Cloud\BigQuery\Storage\V1\ProtoSchema $var - * @return $this - */ - public function setWriterSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ProtoSchema::class); - $this->writer_schema = $var; - - return $this; - } - - /** - * Serialized row data in protobuf message format. - * Currently, the backend expects the serialized rows to adhere to - * proto2 semantics when appending rows, particularly with respect to - * how default values are encoded. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\ProtoRows|null - */ - public function getRows() - { - return $this->rows; - } - - public function hasRows() - { - return isset($this->rows); - } - - public function clearRows() - { - unset($this->rows); - } - - /** - * Serialized row data in protobuf message format. - * Currently, the backend expects the serialized rows to adhere to - * proto2 semantics when appending rows, particularly with respect to - * how default values are encoded. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\ProtoRows $var - * @return $this - */ - public function setRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ProtoRows::class); - $this->rows = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProtoData::class, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest_ProtoData::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php deleted file mode 100644 index 0b2fff4bf05a..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php +++ /dev/null @@ -1,279 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsResponse - */ -class AppendRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * If backend detects a schema update, pass it to user so that user can - * use it to input new type of message. It will be empty when no schema - * updates have occurred. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; - */ - protected $updated_schema = null; - /** - * If a request failed due to corrupted rows, no rows in the batch will be - * appended. The API will return row level error info, so that the caller can - * remove the bad rows and retry the request. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; - */ - private $row_errors; - /** - * The target of the append operation. Matches the write_stream in the - * corresponding request. - * - * Generated from protobuf field string write_stream = 5; - */ - protected $write_stream = ''; - protected $response; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $append_result - * Result if the append is successful. - * @type \Google\Rpc\Status $error - * Error returned when problems were encountered. If present, - * it indicates rows were not accepted into the system. - * Users can retry or continue with other append requests within the - * same connection. - * Additional information about error signalling: - * ALREADY_EXISTS: Happens when an append specified an offset, and the - * backend already has received data at this offset. Typically encountered - * in retry scenarios, and can be ignored. - * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond - * the current end of the stream. - * INVALID_ARGUMENT: Indicates a malformed request or data. - * ABORTED: Request processing is aborted because of prior failures. The - * request can be retried if previous failure is addressed. - * INTERNAL: Indicates server side error(s) that can be retried. - * @type \Google\Cloud\BigQuery\Storage\V1\TableSchema $updated_schema - * If backend detects a schema update, pass it to user so that user can - * use it to input new type of message. It will be empty when no schema - * updates have occurred. - * @type array<\Google\Cloud\BigQuery\Storage\V1\RowError>|\Google\Protobuf\Internal\RepeatedField $row_errors - * If a request failed due to corrupted rows, no rows in the batch will be - * appended. The API will return row level error info, so that the caller can - * remove the bad rows and retry the request. - * @type string $write_stream - * The target of the append operation. Matches the write_stream in the - * corresponding request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Result if the append is successful. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1; - * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult|null - */ - public function getAppendResult() - { - return $this->readOneof(1); - } - - public function hasAppendResult() - { - return $this->hasOneof(1); - } - - /** - * Result if the append is successful. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1; - * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $var - * @return $this - */ - public function setAppendResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Error returned when problems were encountered. If present, - * it indicates rows were not accepted into the system. - * Users can retry or continue with other append requests within the - * same connection. - * Additional information about error signalling: - * ALREADY_EXISTS: Happens when an append specified an offset, and the - * backend already has received data at this offset. Typically encountered - * in retry scenarios, and can be ignored. - * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond - * the current end of the stream. - * INVALID_ARGUMENT: Indicates a malformed request or data. - * ABORTED: Request processing is aborted because of prior failures. The - * request can be retried if previous failure is addressed. - * INTERNAL: Indicates server side error(s) that can be retried. - * - * Generated from protobuf field .google.rpc.Status error = 2; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->readOneof(2); - } - - public function hasError() - { - return $this->hasOneof(2); - } - - /** - * Error returned when problems were encountered. If present, - * it indicates rows were not accepted into the system. - * Users can retry or continue with other append requests within the - * same connection. - * Additional information about error signalling: - * ALREADY_EXISTS: Happens when an append specified an offset, and the - * backend already has received data at this offset. Typically encountered - * in retry scenarios, and can be ignored. - * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond - * the current end of the stream. - * INVALID_ARGUMENT: Indicates a malformed request or data. - * ABORTED: Request processing is aborted because of prior failures. The - * request can be retried if previous failure is addressed. - * INTERNAL: Indicates server side error(s) that can be retried. - * - * Generated from protobuf field .google.rpc.Status error = 2; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If backend detects a schema update, pass it to user so that user can - * use it to input new type of message. It will be empty when no schema - * updates have occurred. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; - * @return \Google\Cloud\BigQuery\Storage\V1\TableSchema|null - */ - public function getUpdatedSchema() - { - return $this->updated_schema; - } - - public function hasUpdatedSchema() - { - return isset($this->updated_schema); - } - - public function clearUpdatedSchema() - { - unset($this->updated_schema); - } - - /** - * If backend detects a schema update, pass it to user so that user can - * use it to input new type of message. It will be empty when no schema - * updates have occurred. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; - * @param \Google\Cloud\BigQuery\Storage\V1\TableSchema $var - * @return $this - */ - public function setUpdatedSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableSchema::class); - $this->updated_schema = $var; - - return $this; - } - - /** - * If a request failed due to corrupted rows, no rows in the batch will be - * appended. The API will return row level error info, so that the caller can - * remove the bad rows and retry the request. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRowErrors() - { - return $this->row_errors; - } - - /** - * If a request failed due to corrupted rows, no rows in the batch will be - * appended. The API will return row level error info, so that the caller can - * remove the bad rows and retry the request. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; - * @param array<\Google\Cloud\BigQuery\Storage\V1\RowError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRowErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\RowError::class); - $this->row_errors = $arr; - - return $this; - } - - /** - * The target of the append operation. Matches the write_stream in the - * corresponding request. - * - * Generated from protobuf field string write_stream = 5; - * @return string - */ - public function getWriteStream() - { - return $this->write_stream; - } - - /** - * The target of the append operation. Matches the write_stream in the - * corresponding request. - * - * Generated from protobuf field string write_stream = 5; - * @param string $var - * @return $this - */ - public function setWriteStream($var) - { - GPBUtil::checkString($var, True); - $this->write_stream = $var; - - return $this; - } - - /** - * @return string - */ - public function getResponse() - { - return $this->whichOneof("response"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php deleted file mode 100644 index 62d0e99a8d29..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult - */ -class AppendResult extends \Google\Protobuf\Internal\Message -{ - /** - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - */ - protected $offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int64Value $offset - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - * @return \Google\Protobuf\Int64Value|null - */ - public function getOffset() - { - return $this->offset; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * Returns the unboxed value from getOffset() - - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - * @return int|string|null - */ - public function getOffsetUnwrapped() - { - return $this->readWrapperValue("offset"); - } - - /** - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->offset = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - * @param int|string|null $var - * @return $this - */ - public function setOffsetUnwrapped($var) - { - $this->writeWrapperValue("offset", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AppendResult::class, \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse_AppendResult::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php deleted file mode 100644 index 96ecf21ef673..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.bigquery.storage.v1.ArrowRecordBatch - */ -class ArrowRecordBatch extends \Google\Protobuf\Internal\Message -{ - /** - * IPC-serialized Arrow RecordBatch. - * - * Generated from protobuf field bytes serialized_record_batch = 1; - */ - protected $serialized_record_batch = ''; - /** - * [Deprecated] The count of rows in `serialized_record_batch`. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @deprecated - */ - protected $row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serialized_record_batch - * IPC-serialized Arrow RecordBatch. - * @type int|string $row_count - * [Deprecated] The count of rows in `serialized_record_batch`. - * Please use the format-independent ReadRowsResponse.row_count instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); - parent::__construct($data); - } - - /** - * IPC-serialized Arrow RecordBatch. - * - * Generated from protobuf field bytes serialized_record_batch = 1; - * @return string - */ - public function getSerializedRecordBatch() - { - return $this->serialized_record_batch; - } - - /** - * IPC-serialized Arrow RecordBatch. - * - * Generated from protobuf field bytes serialized_record_batch = 1; - * @param string $var - * @return $this - */ - public function setSerializedRecordBatch($var) - { - GPBUtil::checkString($var, False); - $this->serialized_record_batch = $var; - - return $this; - } - - /** - * [Deprecated] The count of rows in `serialized_record_batch`. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @return int|string - * @deprecated - */ - public function getRowCount() - { - @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); - return $this->row_count; - } - - /** - * [Deprecated] The count of rows in `serialized_record_batch`. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @param int|string $var - * @return $this - * @deprecated - */ - public function setRowCount($var) - { - @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php deleted file mode 100644 index 0e081bad2c8d..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.bigquery.storage.v1.ArrowSchema - */ -class ArrowSchema extends \Google\Protobuf\Internal\Message -{ - /** - * IPC serialized Arrow schema. - * - * Generated from protobuf field bytes serialized_schema = 1; - */ - protected $serialized_schema = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serialized_schema - * IPC serialized Arrow schema. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); - parent::__construct($data); - } - - /** - * IPC serialized Arrow schema. - * - * Generated from protobuf field bytes serialized_schema = 1; - * @return string - */ - public function getSerializedSchema() - { - return $this->serialized_schema; - } - - /** - * IPC serialized Arrow schema. - * - * Generated from protobuf field bytes serialized_schema = 1; - * @param string $var - * @return $this - */ - public function setSerializedSchema($var) - { - GPBUtil::checkString($var, False); - $this->serialized_schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php deleted file mode 100644 index 9cbf862501c9..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.bigquery.storage.v1.ArrowSerializationOptions - */ -class ArrowSerializationOptions extends \Google\Protobuf\Internal\Message -{ - /** - * The compression codec to use for Arrow buffers in serialized record - * batches. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; - */ - protected $buffer_compression = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $buffer_compression - * The compression codec to use for Arrow buffers in serialized record - * batches. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); - parent::__construct($data); - } - - /** - * The compression codec to use for Arrow buffers in serialized record - * batches. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; - * @return int - */ - public function getBufferCompression() - { - return $this->buffer_compression; - } - - /** - * The compression codec to use for Arrow buffers in serialized record - * batches. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; - * @param int $var - * @return $this - */ - public function setBufferCompression($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions\CompressionCodec::class); - $this->buffer_compression = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php deleted file mode 100644 index 08496a159dfe..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec - */ -class CompressionCodec -{ - /** - * If unspecified no compression will be used. - * - * Generated from protobuf enum COMPRESSION_UNSPECIFIED = 0; - */ - const COMPRESSION_UNSPECIFIED = 0; - /** - * LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md) - * - * Generated from protobuf enum LZ4_FRAME = 1; - */ - const LZ4_FRAME = 1; - /** - * Zstandard compression. - * - * Generated from protobuf enum ZSTD = 2; - */ - const ZSTD = 2; - - private static $valueToName = [ - self::COMPRESSION_UNSPECIFIED => 'COMPRESSION_UNSPECIFIED', - self::LZ4_FRAME => 'LZ4_FRAME', - self::ZSTD => 'ZSTD', - ]; - - 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(CompressionCodec::class, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions_CompressionCodec::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php deleted file mode 100644 index 95057dfc33ed..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.bigquery.storage.v1.AvroRows - */ -class AvroRows extends \Google\Protobuf\Internal\Message -{ - /** - * Binary serialized rows in a block. - * - * Generated from protobuf field bytes serialized_binary_rows = 1; - */ - protected $serialized_binary_rows = ''; - /** - * [Deprecated] The count of rows in the returning block. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @deprecated - */ - protected $row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serialized_binary_rows - * Binary serialized rows in a block. - * @type int|string $row_count - * [Deprecated] The count of rows in the returning block. - * Please use the format-independent ReadRowsResponse.row_count instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); - parent::__construct($data); - } - - /** - * Binary serialized rows in a block. - * - * Generated from protobuf field bytes serialized_binary_rows = 1; - * @return string - */ - public function getSerializedBinaryRows() - { - return $this->serialized_binary_rows; - } - - /** - * Binary serialized rows in a block. - * - * Generated from protobuf field bytes serialized_binary_rows = 1; - * @param string $var - * @return $this - */ - public function setSerializedBinaryRows($var) - { - GPBUtil::checkString($var, False); - $this->serialized_binary_rows = $var; - - return $this; - } - - /** - * [Deprecated] The count of rows in the returning block. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @return int|string - * @deprecated - */ - public function getRowCount() - { - @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); - return $this->row_count; - } - - /** - * [Deprecated] The count of rows in the returning block. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @param int|string $var - * @return $this - * @deprecated - */ - public function setRowCount($var) - { - @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php deleted file mode 100644 index 95f031edf513..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.bigquery.storage.v1.AvroSchema - */ -class AvroSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Json serialized schema, as described at - * https://avro.apache.org/docs/1.8.1/spec.html. - * - * Generated from protobuf field string schema = 1; - */ - protected $schema = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $schema - * Json serialized schema, as described at - * https://avro.apache.org/docs/1.8.1/spec.html. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); - parent::__construct($data); - } - - /** - * Json serialized schema, as described at - * https://avro.apache.org/docs/1.8.1/spec.html. - * - * Generated from protobuf field string schema = 1; - * @return string - */ - public function getSchema() - { - return $this->schema; - } - - /** - * Json serialized schema, as described at - * https://avro.apache.org/docs/1.8.1/spec.html. - * - * Generated from protobuf field string schema = 1; - * @param string $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkString($var, True); - $this->schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php deleted file mode 100644 index a144d2b4e6b0..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.bigquery.storage.v1.AvroSerializationOptions - */ -class AvroSerializationOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Enable displayName attribute in Avro schema. - * The Avro specification requires field names to be alphanumeric. By - * default, in cases when column names do not conform to these requirements - * (e.g. non-ascii unicode codepoints) and Avro is requested as an output - * format, the CreateReadSession call will fail. - * Setting this field to true, populates avro field names with a placeholder - * value and populates a "displayName" attribute for every avro field with the - * original column name. - * - * Generated from protobuf field bool enable_display_name_attribute = 1; - */ - protected $enable_display_name_attribute = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_display_name_attribute - * Enable displayName attribute in Avro schema. - * The Avro specification requires field names to be alphanumeric. By - * default, in cases when column names do not conform to these requirements - * (e.g. non-ascii unicode codepoints) and Avro is requested as an output - * format, the CreateReadSession call will fail. - * Setting this field to true, populates avro field names with a placeholder - * value and populates a "displayName" attribute for every avro field with the - * original column name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); - parent::__construct($data); - } - - /** - * Enable displayName attribute in Avro schema. - * The Avro specification requires field names to be alphanumeric. By - * default, in cases when column names do not conform to these requirements - * (e.g. non-ascii unicode codepoints) and Avro is requested as an output - * format, the CreateReadSession call will fail. - * Setting this field to true, populates avro field names with a placeholder - * value and populates a "displayName" attribute for every avro field with the - * original column name. - * - * Generated from protobuf field bool enable_display_name_attribute = 1; - * @return bool - */ - public function getEnableDisplayNameAttribute() - { - return $this->enable_display_name_attribute; - } - - /** - * Enable displayName attribute in Avro schema. - * The Avro specification requires field names to be alphanumeric. By - * default, in cases when column names do not conform to these requirements - * (e.g. non-ascii unicode codepoints) and Avro is requested as an output - * format, the CreateReadSession call will fail. - * Setting this field to true, populates avro field names with a placeholder - * value and populates a "displayName" attribute for every avro field with the - * original column name. - * - * Generated from protobuf field bool enable_display_name_attribute = 1; - * @param bool $var - * @return $this - */ - public function setEnableDisplayNameAttribute($var) - { - GPBUtil::checkBool($var); - $this->enable_display_name_attribute = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php deleted file mode 100644 index 50e1addd8cf0..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest - */ -class BatchCommitWriteStreamsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The group of streams that will be committed atomically. - * - * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $write_streams; - - /** - * @param string $parent Required. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. Please see - * {@see BigQueryWriteClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\BatchCommitWriteStreamsRequest - * - * @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. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $write_streams - * Required. The group of streams that will be committed atomically. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The group of streams that will be committed atomically. - * - * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWriteStreams() - { - return $this->write_streams; - } - - /** - * Required. The group of streams that will be committed atomically. - * - * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWriteStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->write_streams = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php deleted file mode 100644 index a3647346dc3b..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse - */ -class BatchCommitWriteStreamsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The time at which streams were committed in microseconds granularity. - * This field will only exist when there are no stream errors. - * **Note** if this field is not set, it means the commit was not successful. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; - */ - protected $commit_time = null; - /** - * Stream level error if commit failed. Only streams with error will be in - * the list. - * If empty, there is no error and all streams are committed successfully. - * If non empty, certain streams have errors and ZERO stream is committed due - * to atomicity guarantee. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; - */ - private $stream_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which streams were committed in microseconds granularity. - * This field will only exist when there are no stream errors. - * **Note** if this field is not set, it means the commit was not successful. - * @type array<\Google\Cloud\BigQuery\Storage\V1\StorageError>|\Google\Protobuf\Internal\RepeatedField $stream_errors - * Stream level error if commit failed. Only streams with error will be in - * the list. - * If empty, there is no error and all streams are committed successfully. - * If non empty, certain streams have errors and ZERO stream is committed due - * to atomicity guarantee. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * The time at which streams were committed in microseconds granularity. - * This field will only exist when there are no stream errors. - * **Note** if this field is not set, it means the commit was not successful. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which streams were committed in microseconds granularity. - * This field will only exist when there are no stream errors. - * **Note** if this field is not set, it means the commit was not successful. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - - /** - * Stream level error if commit failed. Only streams with error will be in - * the list. - * If empty, there is no error and all streams are committed successfully. - * If non empty, certain streams have errors and ZERO stream is committed due - * to atomicity guarantee. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStreamErrors() - { - return $this->stream_errors; - } - - /** - * Stream level error if commit failed. Only streams with error will be in - * the list. - * If empty, there is no error and all streams are committed successfully. - * If non empty, certain streams have errors and ZERO stream is committed due - * to atomicity guarantee. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; - * @param array<\Google\Cloud\BigQuery\Storage\V1\StorageError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStreamErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\StorageError::class); - $this->stream_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php deleted file mode 100644 index b27b6f13ecc3..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.bigquery.storage.v1.CreateReadSessionRequest - */ -class CreateReadSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The request project that owns the session, in the form of - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Session to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $read_session = null; - /** - * Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * - * Generated from protobuf field int32 max_stream_count = 3; - */ - protected $max_stream_count = 0; - /** - * The minimum preferred stream count. This parameter can be used to inform - * the service that there is a desired lower bound on the number of streams. - * This is typically a target parallelism of the client (e.g. a Spark - * cluster with N-workers would set this to a low multiple of N to ensure - * good cluster utilization). - * The system will make a best effort to provide at least this number of - * streams, but in some cases might provide less. - * - * Generated from protobuf field int32 preferred_min_stream_count = 4; - */ - protected $preferred_min_stream_count = 0; - - /** - * @param string $parent Required. The request project that owns the session, in the form of - * `projects/{project_id}`. Please see - * {@see BigQueryReadClient::projectName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession $readSession Required. Session to be created. - * @param int $maxStreamCount Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * - * @return \Google\Cloud\BigQuery\Storage\V1\CreateReadSessionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\Storage\V1\ReadSession $readSession, int $maxStreamCount): self - { - return (new self()) - ->setParent($parent) - ->setReadSession($readSession) - ->setMaxStreamCount($maxStreamCount); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The request project that owns the session, in the form of - * `projects/{project_id}`. - * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession $read_session - * Required. Session to be created. - * @type int $max_stream_count - * Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * @type int $preferred_min_stream_count - * The minimum preferred stream count. This parameter can be used to inform - * the service that there is a desired lower bound on the number of streams. - * This is typically a target parallelism of the client (e.g. a Spark - * cluster with N-workers would set this to a low multiple of N to ensure - * good cluster utilization). - * The system will make a best effort to provide at least this number of - * streams, but in some cases might provide less. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. The request project that owns the session, in the form of - * `projects/{project_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 request project that owns the session, in the form of - * `projects/{project_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. Session to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession|null - */ - public function getReadSession() - { - return $this->read_session; - } - - public function hasReadSession() - { - return isset($this->read_session); - } - - public function clearReadSession() - { - unset($this->read_session); - } - - /** - * Required. Session to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession $var - * @return $this - */ - public function setReadSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession::class); - $this->read_session = $var; - - return $this; - } - - /** - * Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * - * Generated from protobuf field int32 max_stream_count = 3; - * @return int - */ - public function getMaxStreamCount() - { - return $this->max_stream_count; - } - - /** - * Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * - * Generated from protobuf field int32 max_stream_count = 3; - * @param int $var - * @return $this - */ - public function setMaxStreamCount($var) - { - GPBUtil::checkInt32($var); - $this->max_stream_count = $var; - - return $this; - } - - /** - * The minimum preferred stream count. This parameter can be used to inform - * the service that there is a desired lower bound on the number of streams. - * This is typically a target parallelism of the client (e.g. a Spark - * cluster with N-workers would set this to a low multiple of N to ensure - * good cluster utilization). - * The system will make a best effort to provide at least this number of - * streams, but in some cases might provide less. - * - * Generated from protobuf field int32 preferred_min_stream_count = 4; - * @return int - */ - public function getPreferredMinStreamCount() - { - return $this->preferred_min_stream_count; - } - - /** - * The minimum preferred stream count. This parameter can be used to inform - * the service that there is a desired lower bound on the number of streams. - * This is typically a target parallelism of the client (e.g. a Spark - * cluster with N-workers would set this to a low multiple of N to ensure - * good cluster utilization). - * The system will make a best effort to provide at least this number of - * streams, but in some cases might provide less. - * - * Generated from protobuf field int32 preferred_min_stream_count = 4; - * @param int $var - * @return $this - */ - public function setPreferredMinStreamCount($var) - { - GPBUtil::checkInt32($var); - $this->preferred_min_stream_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php deleted file mode 100644 index 5f861cd2387f..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.bigquery.storage.v1.CreateWriteStreamRequest - */ -class CreateWriteStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Stream to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $write_stream = null; - - /** - * @param string $parent Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. Please see - * {@see BigQueryWriteClient::tableName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Storage\V1\WriteStream $writeStream Required. Stream to be created. - * - * @return \Google\Cloud\BigQuery\Storage\V1\CreateWriteStreamRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\Storage\V1\WriteStream $writeStream): self - { - return (new self()) - ->setParent($parent) - ->setWriteStream($writeStream); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * @type \Google\Cloud\BigQuery\Storage\V1\WriteStream $write_stream - * Required. Stream to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Stream to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\Storage\V1\WriteStream|null - */ - public function getWriteStream() - { - return $this->write_stream; - } - - public function hasWriteStream() - { - return isset($this->write_stream); - } - - public function clearWriteStream() - { - unset($this->write_stream); - } - - /** - * Required. Stream to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\Storage\V1\WriteStream $var - * @return $this - */ - public function setWriteStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream::class); - $this->write_stream = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php deleted file mode 100644 index c5e81f0da7a1..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.bigquery.storage.v1.DataFormat - */ -class DataFormat -{ - /** - * Data format is unspecified. - * - * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; - */ - const DATA_FORMAT_UNSPECIFIED = 0; - /** - * Avro is a standard open source row based file format. - * See https://avro.apache.org/ for more details. - * - * Generated from protobuf enum AVRO = 1; - */ - const AVRO = 1; - /** - * Arrow is a standard open source column-based message format. - * See https://arrow.apache.org/ for more details. - * - * Generated from protobuf enum ARROW = 2; - */ - const ARROW = 2; - - private static $valueToName = [ - self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', - self::AVRO => 'AVRO', - self::ARROW => 'ARROW', - ]; - - 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/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php deleted file mode 100644 index 320ada00d1f1..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest - */ -class FinalizeWriteStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. Please see - * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\FinalizeWriteStreamRequest - * - * @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. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * 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. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * 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/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php deleted file mode 100644 index 8e028e4fa78a..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse - */ -class FinalizeWriteStreamResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Number of rows in the finalized stream. - * - * 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 - * Number of rows in the finalized stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Number of rows in the finalized stream. - * - * Generated from protobuf field int64 row_count = 1; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * Number of rows in the finalized stream. - * - * 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; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php deleted file mode 100644 index c89d647475b8..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.bigquery.storage.v1.FlushRowsRequest - */ -class FlushRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The stream that is the target of the flush operation. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $write_stream = ''; - /** - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - */ - protected $offset = null; - - /** - * @param string $writeStream Required. The stream that is the target of the flush operation. Please see - * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\FlushRowsRequest - * - * @experimental - */ - public static function build(string $writeStream): self - { - return (new self()) - ->setWriteStream($writeStream); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $write_stream - * Required. The stream that is the target of the flush operation. - * @type \Google\Protobuf\Int64Value $offset - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. The stream that is the target of the flush operation. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getWriteStream() - { - return $this->write_stream; - } - - /** - * Required. The stream that is the target of the flush operation. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWriteStream($var) - { - GPBUtil::checkString($var, True); - $this->write_stream = $var; - - return $this; - } - - /** - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getOffset() - { - return $this->offset; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * Returns the unboxed value from getOffset() - - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @return int|string|null - */ - public function getOffsetUnwrapped() - { - return $this->readWrapperValue("offset"); - } - - /** - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->offset = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @param int|string|null $var - * @return $this - */ - public function setOffsetUnwrapped($var) - { - $this->writeWrapperValue("offset", $var); - return $this;} - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php deleted file mode 100644 index 2bf496a5d445..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.storage.v1.FlushRowsResponse - */ -class FlushRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The rows before this offset (including this offset) are flushed. - * - * Generated from protobuf field int64 offset = 1; - */ - protected $offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $offset - * The rows before this offset (including this offset) are flushed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * The rows before this offset (including this offset) are flushed. - * - * Generated from protobuf field int64 offset = 1; - * @return int|string - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The rows before this offset (including this offset) are flushed. - * - * Generated from protobuf field int64 offset = 1; - * @param int|string $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt64($var); - $this->offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php deleted file mode 100644 index 9c23aa9e45f1..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.bigquery.storage.v1.GetWriteStreamRequest - */ -class GetWriteStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Indicates whether to get full or partial view of the WriteStream. If - * not set, view returned will be basic. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; - */ - protected $view = 0; - - /** - * @param string $name Required. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. Please see - * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\GetWriteStreamRequest - * - * @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. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * @type int $view - * Indicates whether to get full or partial view of the WriteStream. If - * not set, view returned will be basic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * 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. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * 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; - } - - /** - * Indicates whether to get full or partial view of the WriteStream. If - * not set, view returned will be basic. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Indicates whether to get full or partial view of the WriteStream. If - * not set, view returned will be basic. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStreamView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php deleted file mode 100644 index da06f296e683..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.bigquery.storage.v1.ProtoRows - */ -class ProtoRows extends \Google\Protobuf\Internal\Message -{ - /** - * A sequence of rows serialized as a Protocol Buffer. - * See https://developers.google.com/protocol-buffers/docs/overview for more - * information on deserializing this field. - * - * Generated from protobuf field repeated bytes serialized_rows = 1; - */ - private $serialized_rows; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $serialized_rows - * A sequence of rows serialized as a Protocol Buffer. - * See https://developers.google.com/protocol-buffers/docs/overview for more - * information on deserializing this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Protobuf::initOnce(); - parent::__construct($data); - } - - /** - * A sequence of rows serialized as a Protocol Buffer. - * See https://developers.google.com/protocol-buffers/docs/overview for more - * information on deserializing this field. - * - * Generated from protobuf field repeated bytes serialized_rows = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSerializedRows() - { - return $this->serialized_rows; - } - - /** - * A sequence of rows serialized as a Protocol Buffer. - * See https://developers.google.com/protocol-buffers/docs/overview for more - * information on deserializing this field. - * - * Generated from protobuf field repeated bytes serialized_rows = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSerializedRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->serialized_rows = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php deleted file mode 100644 index 6f20a5f57e4e..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.bigquery.storage.v1.ProtoSchema - */ -class ProtoSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Descriptor for input message. The provided descriptor must be self - * contained, such that data rows sent can be fully decoded using only the - * single descriptor. For data rows that are compositions of multiple - * independent messages, this means the descriptor may need to be transformed - * to only use nested types: - * https://developers.google.com/protocol-buffers/docs/proto#nested - * For additional information for how proto types and values map onto BigQuery - * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - * - * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; - */ - protected $proto_descriptor = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\DescriptorProto $proto_descriptor - * Descriptor for input message. The provided descriptor must be self - * contained, such that data rows sent can be fully decoded using only the - * single descriptor. For data rows that are compositions of multiple - * independent messages, this means the descriptor may need to be transformed - * to only use nested types: - * https://developers.google.com/protocol-buffers/docs/proto#nested - * For additional information for how proto types and values map onto BigQuery - * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Protobuf::initOnce(); - parent::__construct($data); - } - - /** - * Descriptor for input message. The provided descriptor must be self - * contained, such that data rows sent can be fully decoded using only the - * single descriptor. For data rows that are compositions of multiple - * independent messages, this means the descriptor may need to be transformed - * to only use nested types: - * https://developers.google.com/protocol-buffers/docs/proto#nested - * For additional information for how proto types and values map onto BigQuery - * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - * - * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; - * @return \Google\Protobuf\DescriptorProto|null - */ - public function getProtoDescriptor() - { - return $this->proto_descriptor; - } - - public function hasProtoDescriptor() - { - return isset($this->proto_descriptor); - } - - public function clearProtoDescriptor() - { - unset($this->proto_descriptor); - } - - /** - * Descriptor for input message. The provided descriptor must be self - * contained, such that data rows sent can be fully decoded using only the - * single descriptor. For data rows that are compositions of multiple - * independent messages, this means the descriptor may need to be transformed - * to only use nested types: - * https://developers.google.com/protocol-buffers/docs/proto#nested - * For additional information for how proto types and values map onto BigQuery - * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - * - * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; - * @param \Google\Protobuf\DescriptorProto $var - * @return $this - */ - public function setProtoDescriptor($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DescriptorProto::class); - $this->proto_descriptor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php deleted file mode 100644 index c8a2f8817402..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadRowsRequest - */ -class ReadRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Stream to read rows from. - * - * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $read_stream = ''; - /** - * The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * - * Generated from protobuf field int64 offset = 2; - */ - protected $offset = 0; - - /** - * @param string $readStream Required. Stream to read rows from. Please see - * {@see BigQueryReadClient::readStreamName()} for help formatting this field. - * @param int $offset The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * - * @return \Google\Cloud\BigQuery\Storage\V1\ReadRowsRequest - * - * @experimental - */ - public static function build(string $readStream, int $offset): self - { - return (new self()) - ->setReadStream($readStream) - ->setOffset($offset); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $read_stream - * Required. Stream to read rows from. - * @type int|string $offset - * The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Stream to read rows from. - * - * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getReadStream() - { - return $this->read_stream; - } - - /** - * Required. Stream to read rows from. - * - * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setReadStream($var) - { - GPBUtil::checkString($var, True); - $this->read_stream = $var; - - return $this; - } - - /** - * The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * - * Generated from protobuf field int64 offset = 2; - * @return int|string - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * - * Generated from protobuf field int64 offset = 2; - * @param int|string $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt64($var); - $this->offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php deleted file mode 100644 index 870309d3a0eb..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php +++ /dev/null @@ -1,406 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadRowsResponse - */ -class ReadRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Number of serialized rows in the rows block. - * - * Generated from protobuf field int64 row_count = 6; - */ - protected $row_count = 0; - /** - * Statistics for the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; - */ - protected $stats = null; - /** - * Throttling state. If unset, the latest response still describes - * the current throttling status. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; - */ - protected $throttle_state = null; - /** - * Optional. If the row data in this ReadRowsResponse is compressed, then - * uncompressed byte size is the original size of the uncompressed row data. - * If it is set to a value greater than 0, then decompress into a buffer of - * size uncompressed_byte_size using the compression codec that was requested - * during session creation time and which is specified in - * TableReadOptions.response_compression_codec in ReadSession. - * This value is not set if no response_compression_codec was not requested - * and it is -1 if the requested compression would not have reduced the size - * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's - * behavior described here https://github.com/apache/arrow/issues/15102 where - * the uncompressed length may be set to -1 to indicate that the data that - * follows is not compressed, which can be useful for cases where compression - * does not yield appreciable savings. When uncompressed_byte_size is not - * greater than 0, the client should skip decompression. - * - * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $uncompressed_byte_size = null; - protected $rows; - protected $schema; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\AvroRows $avro_rows - * Serialized row data in AVRO format. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $arrow_record_batch - * Serialized row data in Arrow RecordBatch format. - * @type int|string $row_count - * Number of serialized rows in the rows block. - * @type \Google\Cloud\BigQuery\Storage\V1\StreamStats $stats - * Statistics for the stream. - * @type \Google\Cloud\BigQuery\Storage\V1\ThrottleState $throttle_state - * Throttling state. If unset, the latest response still describes - * the current throttling status. - * @type \Google\Cloud\BigQuery\Storage\V1\AvroSchema $avro_schema - * Output only. Avro schema. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $arrow_schema - * Output only. Arrow schema. - * @type int|string $uncompressed_byte_size - * Optional. If the row data in this ReadRowsResponse is compressed, then - * uncompressed byte size is the original size of the uncompressed row data. - * If it is set to a value greater than 0, then decompress into a buffer of - * size uncompressed_byte_size using the compression codec that was requested - * during session creation time and which is specified in - * TableReadOptions.response_compression_codec in ReadSession. - * This value is not set if no response_compression_codec was not requested - * and it is -1 if the requested compression would not have reduced the size - * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's - * behavior described here https://github.com/apache/arrow/issues/15102 where - * the uncompressed length may be set to -1 to indicate that the data that - * follows is not compressed, which can be useful for cases where compression - * does not yield appreciable savings. When uncompressed_byte_size is not - * greater than 0, the client should skip decompression. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Serialized row data in AVRO format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3; - * @return \Google\Cloud\BigQuery\Storage\V1\AvroRows|null - */ - public function getAvroRows() - { - return $this->readOneof(3); - } - - public function hasAvroRows() - { - return $this->hasOneof(3); - } - - /** - * Serialized row data in AVRO format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3; - * @param \Google\Cloud\BigQuery\Storage\V1\AvroRows $var - * @return $this - */ - public function setAvroRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroRows::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Serialized row data in Arrow RecordBatch format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch|null - */ - public function getArrowRecordBatch() - { - return $this->readOneof(4); - } - - public function hasArrowRecordBatch() - { - return $this->hasOneof(4); - } - - /** - * Serialized row data in Arrow RecordBatch format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $var - * @return $this - */ - public function setArrowRecordBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Number of serialized rows in the rows block. - * - * Generated from protobuf field int64 row_count = 6; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * Number of serialized rows in the rows block. - * - * Generated from protobuf field int64 row_count = 6; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - - /** - * Statistics for the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\StreamStats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Statistics for the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\StreamStats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\StreamStats::class); - $this->stats = $var; - - return $this; - } - - /** - * Throttling state. If unset, the latest response still describes - * the current throttling status. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; - * @return \Google\Cloud\BigQuery\Storage\V1\ThrottleState|null - */ - public function getThrottleState() - { - return $this->throttle_state; - } - - public function hasThrottleState() - { - return isset($this->throttle_state); - } - - public function clearThrottleState() - { - unset($this->throttle_state); - } - - /** - * Throttling state. If unset, the latest response still describes - * the current throttling status. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; - * @param \Google\Cloud\BigQuery\Storage\V1\ThrottleState $var - * @return $this - */ - public function setThrottleState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ThrottleState::class); - $this->throttle_state = $var; - - return $this; - } - - /** - * Output only. Avro schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\AvroSchema|null - */ - public function getAvroSchema() - { - return $this->readOneof(7); - } - - public function hasAvroSchema() - { - return $this->hasOneof(7); - } - - /** - * Output only. Avro schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\AvroSchema $var - * @return $this - */ - public function setAvroSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSchema::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Output only. Arrow schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null - */ - public function getArrowSchema() - { - return $this->readOneof(8); - } - - public function hasArrowSchema() - { - return $this->hasOneof(8); - } - - /** - * Output only. Arrow schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var - * @return $this - */ - public function setArrowSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Optional. If the row data in this ReadRowsResponse is compressed, then - * uncompressed byte size is the original size of the uncompressed row data. - * If it is set to a value greater than 0, then decompress into a buffer of - * size uncompressed_byte_size using the compression codec that was requested - * during session creation time and which is specified in - * TableReadOptions.response_compression_codec in ReadSession. - * This value is not set if no response_compression_codec was not requested - * and it is -1 if the requested compression would not have reduced the size - * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's - * behavior described here https://github.com/apache/arrow/issues/15102 where - * the uncompressed length may be set to -1 to indicate that the data that - * follows is not compressed, which can be useful for cases where compression - * does not yield appreciable savings. When uncompressed_byte_size is not - * greater than 0, the client should skip decompression. - * - * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getUncompressedByteSize() - { - return isset($this->uncompressed_byte_size) ? $this->uncompressed_byte_size : 0; - } - - public function hasUncompressedByteSize() - { - return isset($this->uncompressed_byte_size); - } - - public function clearUncompressedByteSize() - { - unset($this->uncompressed_byte_size); - } - - /** - * Optional. If the row data in this ReadRowsResponse is compressed, then - * uncompressed byte size is the original size of the uncompressed row data. - * If it is set to a value greater than 0, then decompress into a buffer of - * size uncompressed_byte_size using the compression codec that was requested - * during session creation time and which is specified in - * TableReadOptions.response_compression_codec in ReadSession. - * This value is not set if no response_compression_codec was not requested - * and it is -1 if the requested compression would not have reduced the size - * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's - * behavior described here https://github.com/apache/arrow/issues/15102 where - * the uncompressed length may be set to -1 to indicate that the data that - * follows is not compressed, which can be useful for cases where compression - * does not yield appreciable savings. When uncompressed_byte_size is not - * greater than 0, the client should skip decompression. - * - * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setUncompressedByteSize($var) - { - GPBUtil::checkInt64($var); - $this->uncompressed_byte_size = $var; - - return $this; - } - - /** - * @return string - */ - public function getRows() - { - return $this->whichOneof("rows"); - } - - /** - * @return string - */ - public function getSchema() - { - return $this->whichOneof("schema"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php deleted file mode 100644 index c574355892c3..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php +++ /dev/null @@ -1,604 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadSession - */ -class ReadSession extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Unique identifier for the session, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Time at which the session becomes invalid. After this time, - * subsequent requests to read this Session will return errors. The - * expire_time is automatically assigned and currently cannot be specified or - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - * supported. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $data_format = 0; - /** - * Immutable. Table that this ReadSession is reading from, in the form - * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - * - * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $table = ''; - /** - * Optional. Any modifiers which are applied when reading from the specified - * table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $table_modifiers = null; - /** - * Optional. Read options for this session (e.g. column selection, filters). - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_options = null; - /** - * Output only. A list of streams created with the session. - * At least one stream is created with the session. In the future, larger - * request_stream_count values *may* result in this list being unpopulated, - * in that case, the user will need to use a List method to get the streams - * instead, which is not yet available. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $streams; - /** - * Output only. An estimate on the number of bytes this session will scan when - * all streams are completely consumed. This estimate is based on - * metadata from the table which might be incomplete or stale. - * - * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $estimated_total_bytes_scanned = 0; - /** - * Output only. A pre-projected estimate of the total physical size of files - * (in bytes) that this session will scan when all streams are consumed. This - * estimate is independent of the selected columns and can be based on - * incomplete or stale metadata from the table. This field is only set for - * BigLake tables. - * - * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $estimated_total_physical_file_size = 0; - /** - * Output only. An estimate on the number of rows present in this session's - * streams. This estimate is based on metadata from the table which might be - * incomplete or stale. - * - * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $estimated_row_count = 0; - /** - * Optional. ID set by client to annotate a session identity. This does not - * need to be strictly unique, but instead the same ID should be used to group - * logically connected sessions (e.g. All using the same ID for all sessions - * needed to complete a Spark SQL query is reasonable). - * Maximum length is 256 bytes. - * - * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $trace_id = ''; - protected $schema; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Unique identifier for the session, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}`. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. Time at which the session becomes invalid. After this time, - * subsequent requests to read this Session will return errors. The - * expire_time is automatically assigned and currently cannot be specified or - * updated. - * @type int $data_format - * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - * supported. - * @type \Google\Cloud\BigQuery\Storage\V1\AvroSchema $avro_schema - * Output only. Avro schema. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $arrow_schema - * Output only. Arrow schema. - * @type string $table - * Immutable. Table that this ReadSession is reading from, in the form - * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers $table_modifiers - * Optional. Any modifiers which are applied when reading from the specified - * table. - * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions $read_options - * Optional. Read options for this session (e.g. column selection, filters). - * @type array<\Google\Cloud\BigQuery\Storage\V1\ReadStream>|\Google\Protobuf\Internal\RepeatedField $streams - * Output only. A list of streams created with the session. - * At least one stream is created with the session. In the future, larger - * request_stream_count values *may* result in this list being unpopulated, - * in that case, the user will need to use a List method to get the streams - * instead, which is not yet available. - * @type int|string $estimated_total_bytes_scanned - * Output only. An estimate on the number of bytes this session will scan when - * all streams are completely consumed. This estimate is based on - * metadata from the table which might be incomplete or stale. - * @type int|string $estimated_total_physical_file_size - * Output only. A pre-projected estimate of the total physical size of files - * (in bytes) that this session will scan when all streams are consumed. This - * estimate is independent of the selected columns and can be based on - * incomplete or stale metadata from the table. This field is only set for - * BigLake tables. - * @type int|string $estimated_row_count - * Output only. An estimate on the number of rows present in this session's - * streams. This estimate is based on metadata from the table which might be - * incomplete or stale. - * @type string $trace_id - * Optional. ID set by client to annotate a session identity. This does not - * need to be strictly unique, but instead the same ID should be used to group - * logically connected sessions (e.g. All using the same ID for all sessions - * needed to complete a Spark SQL query is reasonable). - * Maximum length is 256 bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Unique identifier for the session, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Unique identifier for the session, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}`. - * - * 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. Time at which the session becomes invalid. After this time, - * subsequent requests to read this Session will return errors. The - * expire_time is automatically assigned and currently cannot be specified or - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. Time at which the session becomes invalid. After this time, - * subsequent requests to read this Session will return errors. The - * expire_time is automatically assigned and currently cannot be specified or - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - * supported. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - * supported. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * Output only. Avro schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\AvroSchema|null - */ - public function getAvroSchema() - { - return $this->readOneof(4); - } - - public function hasAvroSchema() - { - return $this->hasOneof(4); - } - - /** - * Output only. Avro schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\AvroSchema $var - * @return $this - */ - public function setAvroSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSchema::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Output only. Arrow schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null - */ - public function getArrowSchema() - { - return $this->readOneof(5); - } - - public function hasArrowSchema() - { - return $this->hasOneof(5); - } - - /** - * Output only. Arrow schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var - * @return $this - */ - public function setArrowSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Immutable. Table that this ReadSession is reading from, in the form - * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - * - * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * Immutable. Table that this ReadSession is reading from, in the form - * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - * - * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->table = $var; - - return $this; - } - - /** - * Optional. Any modifiers which are applied when reading from the specified - * table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers|null - */ - public function getTableModifiers() - { - return $this->table_modifiers; - } - - public function hasTableModifiers() - { - return isset($this->table_modifiers); - } - - public function clearTableModifiers() - { - unset($this->table_modifiers); - } - - /** - * Optional. Any modifiers which are applied when reading from the specified - * table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers $var - * @return $this - */ - public function setTableModifiers($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers::class); - $this->table_modifiers = $var; - - return $this; - } - - /** - * Optional. Read options for this session (e.g. column selection, filters). - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions|null - */ - public function getReadOptions() - { - return $this->read_options; - } - - public function hasReadOptions() - { - return isset($this->read_options); - } - - public function clearReadOptions() - { - unset($this->read_options); - } - - /** - * Optional. Read options for this session (e.g. column selection, filters). - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions $var - * @return $this - */ - public function setReadOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions::class); - $this->read_options = $var; - - return $this; - } - - /** - * Output only. A list of streams created with the session. - * At least one stream is created with the session. In the future, larger - * request_stream_count values *may* result in this list being unpopulated, - * in that case, the user will need to use a List method to get the streams - * instead, which is not yet available. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStreams() - { - return $this->streams; - } - - /** - * Output only. A list of streams created with the session. - * At least one stream is created with the session. In the future, larger - * request_stream_count values *may* result in this list being unpopulated, - * in that case, the user will need to use a List method to get the streams - * instead, which is not yet available. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\BigQuery\Storage\V1\ReadStream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); - $this->streams = $arr; - - return $this; - } - - /** - * Output only. An estimate on the number of bytes this session will scan when - * all streams are completely consumed. This estimate is based on - * metadata from the table which might be incomplete or stale. - * - * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getEstimatedTotalBytesScanned() - { - return $this->estimated_total_bytes_scanned; - } - - /** - * Output only. An estimate on the number of bytes this session will scan when - * all streams are completely consumed. This estimate is based on - * metadata from the table which might be incomplete or stale. - * - * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setEstimatedTotalBytesScanned($var) - { - GPBUtil::checkInt64($var); - $this->estimated_total_bytes_scanned = $var; - - return $this; - } - - /** - * Output only. A pre-projected estimate of the total physical size of files - * (in bytes) that this session will scan when all streams are consumed. This - * estimate is independent of the selected columns and can be based on - * incomplete or stale metadata from the table. This field is only set for - * BigLake tables. - * - * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getEstimatedTotalPhysicalFileSize() - { - return $this->estimated_total_physical_file_size; - } - - /** - * Output only. A pre-projected estimate of the total physical size of files - * (in bytes) that this session will scan when all streams are consumed. This - * estimate is independent of the selected columns and can be based on - * incomplete or stale metadata from the table. This field is only set for - * BigLake tables. - * - * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setEstimatedTotalPhysicalFileSize($var) - { - GPBUtil::checkInt64($var); - $this->estimated_total_physical_file_size = $var; - - return $this; - } - - /** - * Output only. An estimate on the number of rows present in this session's - * streams. This estimate is based on metadata from the table which might be - * incomplete or stale. - * - * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getEstimatedRowCount() - { - return $this->estimated_row_count; - } - - /** - * Output only. An estimate on the number of rows present in this session's - * streams. This estimate is based on metadata from the table which might be - * incomplete or stale. - * - * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setEstimatedRowCount($var) - { - GPBUtil::checkInt64($var); - $this->estimated_row_count = $var; - - return $this; - } - - /** - * Optional. ID set by client to annotate a session identity. This does not - * need to be strictly unique, but instead the same ID should be used to group - * logically connected sessions (e.g. All using the same ID for all sessions - * needed to complete a Spark SQL query is reasonable). - * Maximum length is 256 bytes. - * - * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * Optional. ID set by client to annotate a session identity. This does not - * need to be strictly unique, but instead the same ID should be used to group - * logically connected sessions (e.g. All using the same ID for all sessions - * needed to complete a Spark SQL query is reasonable). - * Maximum length is 256 bytes. - * - * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - - /** - * @return string - */ - public function getSchema() - { - return $this->whichOneof("schema"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php deleted file mode 100644 index 059cd772f343..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadSession.TableModifiers - */ -class TableModifiers extends \Google\Protobuf\Internal\Message -{ - /** - * The snapshot time of the table. If not set, interpreted as now. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $snapshot_time - * The snapshot time of the table. If not set, interpreted as now. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * The snapshot time of the table. If not set, interpreted as now. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The snapshot time of the table. If not set, interpreted as now. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableModifiers::class, \Google\Cloud\BigQuery\Storage\V1\ReadSession_TableModifiers::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php deleted file mode 100644 index 092d49e3d216..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php +++ /dev/null @@ -1,471 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions - */ -class TableReadOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The names of the fields in the table to be returned. If no - * field names are specified, then all fields in the table are returned. - * Nested fields -- the child elements of a STRUCT field -- can be selected - * individually using their fully-qualified names, and will be returned as - * record fields containing only the selected nested fields. If a STRUCT - * field is specified in the selected fields list, all of the child elements - * will be returned. - * As an example, consider a table with the following schema: - * { - * "name": "struct_field", - * "type": "RECORD", - * "mode": "NULLABLE", - * "fields": [ - * { - * "name": "string_field1", - * "type": "STRING", - * . "mode": "NULLABLE" - * }, - * { - * "name": "string_field2", - * "type": "STRING", - * "mode": "NULLABLE" - * } - * ] - * } - * Specifying "struct_field" in the selected fields list will result in a - * read session schema with the following logical structure: - * struct_field { - * string_field1 - * string_field2 - * } - * Specifying "struct_field.string_field1" in the selected fields list will - * result in a read session schema with the following logical structure: - * struct_field { - * string_field1 - * } - * The order of the fields in the read session schema is derived from the - * table schema and does not correspond to the order in which the fields are - * specified in this list. - * - * Generated from protobuf field repeated string selected_fields = 1; - */ - private $selected_fields; - /** - * SQL text filtering statement, similar to a WHERE clause in a query. - * Aggregates are not supported. - * Examples: "int_field > 5" - * "date_field = CAST('2014-9-27' as DATE)" - * "nullable_field is not NULL" - * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - * "numeric_field BETWEEN 1.0 AND 5.0" - * Restricted to a maximum length for 1 MB. - * - * Generated from protobuf field string row_restriction = 2; - */ - protected $row_restriction = ''; - /** - * Optional. Specifies a table sampling percentage. Specifically, the query - * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - * sampling percentage is applied at the data block granularity. It will - * randomly choose for each data block whether to read the rows in that data - * block. For more details, see - * https://cloud.google.com/bigquery/docs/table-sampling) - * - * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sample_percentage = null; - /** - * Optional. Set response_compression_codec when creating a read session to - * enable application-level compression of ReadRows responses. - * - * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $response_compression_codec = null; - protected $output_format_serialization_options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $selected_fields - * Optional. The names of the fields in the table to be returned. If no - * field names are specified, then all fields in the table are returned. - * Nested fields -- the child elements of a STRUCT field -- can be selected - * individually using their fully-qualified names, and will be returned as - * record fields containing only the selected nested fields. If a STRUCT - * field is specified in the selected fields list, all of the child elements - * will be returned. - * As an example, consider a table with the following schema: - * { - * "name": "struct_field", - * "type": "RECORD", - * "mode": "NULLABLE", - * "fields": [ - * { - * "name": "string_field1", - * "type": "STRING", - * . "mode": "NULLABLE" - * }, - * { - * "name": "string_field2", - * "type": "STRING", - * "mode": "NULLABLE" - * } - * ] - * } - * Specifying "struct_field" in the selected fields list will result in a - * read session schema with the following logical structure: - * struct_field { - * string_field1 - * string_field2 - * } - * Specifying "struct_field.string_field1" in the selected fields list will - * result in a read session schema with the following logical structure: - * struct_field { - * string_field1 - * } - * The order of the fields in the read session schema is derived from the - * table schema and does not correspond to the order in which the fields are - * specified in this list. - * @type string $row_restriction - * SQL text filtering statement, similar to a WHERE clause in a query. - * Aggregates are not supported. - * Examples: "int_field > 5" - * "date_field = CAST('2014-9-27' as DATE)" - * "nullable_field is not NULL" - * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - * "numeric_field BETWEEN 1.0 AND 5.0" - * Restricted to a maximum length for 1 MB. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $arrow_serialization_options - * Optional. Options specific to the Apache Arrow output format. - * @type \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions $avro_serialization_options - * Optional. Options specific to the Apache Avro output format - * @type float $sample_percentage - * Optional. Specifies a table sampling percentage. Specifically, the query - * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - * sampling percentage is applied at the data block granularity. It will - * randomly choose for each data block whether to read the rows in that data - * block. For more details, see - * https://cloud.google.com/bigquery/docs/table-sampling) - * @type int $response_compression_codec - * Optional. Set response_compression_codec when creating a read session to - * enable application-level compression of ReadRows responses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The names of the fields in the table to be returned. If no - * field names are specified, then all fields in the table are returned. - * Nested fields -- the child elements of a STRUCT field -- can be selected - * individually using their fully-qualified names, and will be returned as - * record fields containing only the selected nested fields. If a STRUCT - * field is specified in the selected fields list, all of the child elements - * will be returned. - * As an example, consider a table with the following schema: - * { - * "name": "struct_field", - * "type": "RECORD", - * "mode": "NULLABLE", - * "fields": [ - * { - * "name": "string_field1", - * "type": "STRING", - * . "mode": "NULLABLE" - * }, - * { - * "name": "string_field2", - * "type": "STRING", - * "mode": "NULLABLE" - * } - * ] - * } - * Specifying "struct_field" in the selected fields list will result in a - * read session schema with the following logical structure: - * struct_field { - * string_field1 - * string_field2 - * } - * Specifying "struct_field.string_field1" in the selected fields list will - * result in a read session schema with the following logical structure: - * struct_field { - * string_field1 - * } - * The order of the fields in the read session schema is derived from the - * table schema and does not correspond to the order in which the fields are - * specified in this list. - * - * Generated from protobuf field repeated string selected_fields = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSelectedFields() - { - return $this->selected_fields; - } - - /** - * Optional. The names of the fields in the table to be returned. If no - * field names are specified, then all fields in the table are returned. - * Nested fields -- the child elements of a STRUCT field -- can be selected - * individually using their fully-qualified names, and will be returned as - * record fields containing only the selected nested fields. If a STRUCT - * field is specified in the selected fields list, all of the child elements - * will be returned. - * As an example, consider a table with the following schema: - * { - * "name": "struct_field", - * "type": "RECORD", - * "mode": "NULLABLE", - * "fields": [ - * { - * "name": "string_field1", - * "type": "STRING", - * . "mode": "NULLABLE" - * }, - * { - * "name": "string_field2", - * "type": "STRING", - * "mode": "NULLABLE" - * } - * ] - * } - * Specifying "struct_field" in the selected fields list will result in a - * read session schema with the following logical structure: - * struct_field { - * string_field1 - * string_field2 - * } - * Specifying "struct_field.string_field1" in the selected fields list will - * result in a read session schema with the following logical structure: - * struct_field { - * string_field1 - * } - * The order of the fields in the read session schema is derived from the - * table schema and does not correspond to the order in which the fields are - * specified in this list. - * - * Generated from protobuf field repeated string selected_fields = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSelectedFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->selected_fields = $arr; - - return $this; - } - - /** - * SQL text filtering statement, similar to a WHERE clause in a query. - * Aggregates are not supported. - * Examples: "int_field > 5" - * "date_field = CAST('2014-9-27' as DATE)" - * "nullable_field is not NULL" - * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - * "numeric_field BETWEEN 1.0 AND 5.0" - * Restricted to a maximum length for 1 MB. - * - * Generated from protobuf field string row_restriction = 2; - * @return string - */ - public function getRowRestriction() - { - return $this->row_restriction; - } - - /** - * SQL text filtering statement, similar to a WHERE clause in a query. - * Aggregates are not supported. - * Examples: "int_field > 5" - * "date_field = CAST('2014-9-27' as DATE)" - * "nullable_field is not NULL" - * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - * "numeric_field BETWEEN 1.0 AND 5.0" - * Restricted to a maximum length for 1 MB. - * - * Generated from protobuf field string row_restriction = 2; - * @param string $var - * @return $this - */ - public function setRowRestriction($var) - { - GPBUtil::checkString($var, True); - $this->row_restriction = $var; - - return $this; - } - - /** - * Optional. Options specific to the Apache Arrow output format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions|null - */ - public function getArrowSerializationOptions() - { - return $this->readOneof(3); - } - - public function hasArrowSerializationOptions() - { - return $this->hasOneof(3); - } - - /** - * Optional. Options specific to the Apache Arrow output format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $var - * @return $this - */ - public function setArrowSerializationOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Options specific to the Apache Avro output format - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions|null - */ - public function getAvroSerializationOptions() - { - return $this->readOneof(4); - } - - public function hasAvroSerializationOptions() - { - return $this->hasOneof(4); - } - - /** - * Optional. Options specific to the Apache Avro output format - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions $var - * @return $this - */ - public function setAvroSerializationOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. Specifies a table sampling percentage. Specifically, the query - * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - * sampling percentage is applied at the data block granularity. It will - * randomly choose for each data block whether to read the rows in that data - * block. For more details, see - * https://cloud.google.com/bigquery/docs/table-sampling) - * - * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getSamplePercentage() - { - return isset($this->sample_percentage) ? $this->sample_percentage : 0.0; - } - - public function hasSamplePercentage() - { - return isset($this->sample_percentage); - } - - public function clearSamplePercentage() - { - unset($this->sample_percentage); - } - - /** - * Optional. Specifies a table sampling percentage. Specifically, the query - * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - * sampling percentage is applied at the data block granularity. It will - * randomly choose for each data block whether to read the rows in that data - * block. For more details, see - * https://cloud.google.com/bigquery/docs/table-sampling) - * - * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setSamplePercentage($var) - { - GPBUtil::checkDouble($var); - $this->sample_percentage = $var; - - return $this; - } - - /** - * Optional. Set response_compression_codec when creating a read session to - * enable application-level compression of ReadRows responses. - * - * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getResponseCompressionCodec() - { - return isset($this->response_compression_codec) ? $this->response_compression_codec : 0; - } - - public function hasResponseCompressionCodec() - { - return isset($this->response_compression_codec); - } - - public function clearResponseCompressionCodec() - { - unset($this->response_compression_codec); - } - - /** - * Optional. Set response_compression_codec when creating a read session to - * enable application-level compression of ReadRows responses. - * - * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setResponseCompressionCodec($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions\ResponseCompressionCodec::class); - $this->response_compression_codec = $var; - - return $this; - } - - /** - * @return string - */ - public function getOutputFormatSerializationOptions() - { - return $this->whichOneof("output_format_serialization_options"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableReadOptions::class, \Google\Cloud\BigQuery\Storage\V1\ReadSession_TableReadOptions::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php deleted file mode 100644 index e64ed46852b7..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec - */ -class ResponseCompressionCodec -{ - /** - * Default is no compression. - * - * Generated from protobuf enum RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0; - */ - const RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0; - /** - * Use raw LZ4 compression. - * - * Generated from protobuf enum RESPONSE_COMPRESSION_CODEC_LZ4 = 2; - */ - const RESPONSE_COMPRESSION_CODEC_LZ4 = 2; - - private static $valueToName = [ - self::RESPONSE_COMPRESSION_CODEC_UNSPECIFIED => 'RESPONSE_COMPRESSION_CODEC_UNSPECIFIED', - self::RESPONSE_COMPRESSION_CODEC_LZ4 => 'RESPONSE_COMPRESSION_CODEC_LZ4', - ]; - - 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(ResponseCompressionCodec::class, \Google\Cloud\BigQuery\Storage\V1\ReadSession_TableReadOptions_ResponseCompressionCodec::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php deleted file mode 100644 index c2f22fa51496..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadStream - */ -class ReadStream extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the stream, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of the stream, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the stream, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of the stream, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - * - * 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; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php deleted file mode 100644 index 123eae533c94..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.bigquery.storage.v1.RowError - */ -class RowError extends \Google\Protobuf\Internal\Message -{ - /** - * Index of the malformed row in the request. - * - * Generated from protobuf field int64 index = 1; - */ - protected $index = 0; - /** - * Structured error reason for a row error. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; - */ - protected $code = 0; - /** - * Description of the issue encountered when processing the row. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $index - * Index of the malformed row in the request. - * @type int $code - * Structured error reason for a row error. - * @type string $message - * Description of the issue encountered when processing the row. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Index of the malformed row in the request. - * - * Generated from protobuf field int64 index = 1; - * @return int|string - */ - public function getIndex() - { - return $this->index; - } - - /** - * Index of the malformed row in the request. - * - * Generated from protobuf field int64 index = 1; - * @param int|string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt64($var); - $this->index = $var; - - return $this; - } - - /** - * Structured error reason for a row error. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Structured error reason for a row error. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\RowError\RowErrorCode::class); - $this->code = $var; - - return $this; - } - - /** - * Description of the issue encountered when processing the row. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Description of the issue encountered when processing the row. - * - * Generated from protobuf field string message = 3; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php deleted file mode 100644 index 753c651381c7..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.bigquery.storage.v1.RowError.RowErrorCode - */ -class RowErrorCode -{ - /** - * Default error. - * - * Generated from protobuf enum ROW_ERROR_CODE_UNSPECIFIED = 0; - */ - const ROW_ERROR_CODE_UNSPECIFIED = 0; - /** - * One or more fields in the row has errors. - * - * Generated from protobuf enum FIELDS_ERROR = 1; - */ - const FIELDS_ERROR = 1; - - private static $valueToName = [ - self::ROW_ERROR_CODE_UNSPECIFIED => 'ROW_ERROR_CODE_UNSPECIFIED', - self::FIELDS_ERROR => 'FIELDS_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(RowErrorCode::class, \Google\Cloud\BigQuery\Storage\V1\RowError_RowErrorCode::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php deleted file mode 100644 index 7536ed18b71f..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.bigquery.storage.v1.SplitReadStreamRequest - */ -class SplitReadStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the stream to split. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A value in the range (0.0, 1.0) that specifies the fractional point at - * which the original stream should be split. The actual split point is - * evaluated on pre-filtered rows, so if a filter is provided, then there is - * no guarantee that the division of the rows between the new child streams - * will be proportional to this fractional value. Additionally, because the - * server-side unit for assigning data is collections of rows, this fraction - * will always map to a data storage boundary on the server side. - * - * Generated from protobuf field double fraction = 2; - */ - protected $fraction = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the stream to split. - * @type float $fraction - * A value in the range (0.0, 1.0) that specifies the fractional point at - * which the original stream should be split. The actual split point is - * evaluated on pre-filtered rows, so if a filter is provided, then there is - * no guarantee that the division of the rows between the new child streams - * will be proportional to this fractional value. Additionally, because the - * server-side unit for assigning data is collections of rows, this fraction - * will always map to a data storage boundary on the server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the stream to split. - * - * 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. Name of the stream to split. - * - * 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; - } - - /** - * A value in the range (0.0, 1.0) that specifies the fractional point at - * which the original stream should be split. The actual split point is - * evaluated on pre-filtered rows, so if a filter is provided, then there is - * no guarantee that the division of the rows between the new child streams - * will be proportional to this fractional value. Additionally, because the - * server-side unit for assigning data is collections of rows, this fraction - * will always map to a data storage boundary on the server side. - * - * Generated from protobuf field double fraction = 2; - * @return float - */ - public function getFraction() - { - return $this->fraction; - } - - /** - * A value in the range (0.0, 1.0) that specifies the fractional point at - * which the original stream should be split. The actual split point is - * evaluated on pre-filtered rows, so if a filter is provided, then there is - * no guarantee that the division of the rows between the new child streams - * will be proportional to this fractional value. Additionally, because the - * server-side unit for assigning data is collections of rows, this fraction - * will always map to a data storage boundary on the server side. - * - * Generated from protobuf field double fraction = 2; - * @param float $var - * @return $this - */ - public function setFraction($var) - { - GPBUtil::checkDouble($var); - $this->fraction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php deleted file mode 100644 index 272562b4ea98..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.bigquery.storage.v1.SplitReadStreamResponse - */ -class SplitReadStreamResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Primary stream, which contains the beginning portion of - * |original_stream|. An empty value indicates that the original stream can no - * longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; - */ - protected $primary_stream = null; - /** - * Remainder stream, which contains the tail of |original_stream|. An empty - * value indicates that the original stream can no longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; - */ - protected $remainder_stream = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream $primary_stream - * Primary stream, which contains the beginning portion of - * |original_stream|. An empty value indicates that the original stream can no - * longer be split. - * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream $remainder_stream - * Remainder stream, which contains the tail of |original_stream|. An empty - * value indicates that the original stream can no longer be split. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Primary stream, which contains the beginning portion of - * |original_stream|. An empty value indicates that the original stream can no - * longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadStream|null - */ - public function getPrimaryStream() - { - return $this->primary_stream; - } - - public function hasPrimaryStream() - { - return isset($this->primary_stream); - } - - public function clearPrimaryStream() - { - unset($this->primary_stream); - } - - /** - * Primary stream, which contains the beginning portion of - * |original_stream|. An empty value indicates that the original stream can no - * longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream $var - * @return $this - */ - public function setPrimaryStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); - $this->primary_stream = $var; - - return $this; - } - - /** - * Remainder stream, which contains the tail of |original_stream|. An empty - * value indicates that the original stream can no longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadStream|null - */ - public function getRemainderStream() - { - return $this->remainder_stream; - } - - public function hasRemainderStream() - { - return isset($this->remainder_stream); - } - - public function clearRemainderStream() - { - unset($this->remainder_stream); - } - - /** - * Remainder stream, which contains the tail of |original_stream|. An empty - * value indicates that the original stream can no longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream $var - * @return $this - */ - public function setRemainderStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); - $this->remainder_stream = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php deleted file mode 100644 index c5d4423b5b73..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.bigquery.storage.v1.StorageError - */ -class StorageError extends \Google\Protobuf\Internal\Message -{ - /** - * BigQuery Storage specific error code. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; - */ - protected $code = 0; - /** - * Name of the failed entity. - * - * Generated from protobuf field string entity = 2; - */ - protected $entity = ''; - /** - * Message that describes the error. - * - * Generated from protobuf field string error_message = 3; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * BigQuery Storage specific error code. - * @type string $entity - * Name of the failed entity. - * @type string $error_message - * Message that describes the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * BigQuery Storage specific error code. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * BigQuery Storage specific error code. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\StorageError\StorageErrorCode::class); - $this->code = $var; - - return $this; - } - - /** - * Name of the failed entity. - * - * Generated from protobuf field string entity = 2; - * @return string - */ - public function getEntity() - { - return $this->entity; - } - - /** - * Name of the failed entity. - * - * 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; - } - - /** - * Message that describes the error. - * - * Generated from protobuf field string error_message = 3; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * Message that describes the error. - * - * Generated from protobuf field string error_message = 3; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php deleted file mode 100644 index 47c1405c8364..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode - */ -class StorageErrorCode -{ - /** - * Default error. - * - * Generated from protobuf enum STORAGE_ERROR_CODE_UNSPECIFIED = 0; - */ - const STORAGE_ERROR_CODE_UNSPECIFIED = 0; - /** - * Table is not found in the system. - * - * Generated from protobuf enum TABLE_NOT_FOUND = 1; - */ - const TABLE_NOT_FOUND = 1; - /** - * Stream is already committed. - * - * Generated from protobuf enum STREAM_ALREADY_COMMITTED = 2; - */ - const STREAM_ALREADY_COMMITTED = 2; - /** - * Stream is not found. - * - * Generated from protobuf enum STREAM_NOT_FOUND = 3; - */ - const STREAM_NOT_FOUND = 3; - /** - * Invalid Stream type. - * For example, you try to commit a stream that is not pending. - * - * Generated from protobuf enum INVALID_STREAM_TYPE = 4; - */ - const INVALID_STREAM_TYPE = 4; - /** - * Invalid Stream state. - * For example, you try to commit a stream that is not finalized or is - * garbaged. - * - * Generated from protobuf enum INVALID_STREAM_STATE = 5; - */ - const INVALID_STREAM_STATE = 5; - /** - * Stream is finalized. - * - * Generated from protobuf enum STREAM_FINALIZED = 6; - */ - const STREAM_FINALIZED = 6; - /** - * There is a schema mismatch and it is caused by user schema has extra - * field than bigquery schema. - * - * Generated from protobuf enum SCHEMA_MISMATCH_EXTRA_FIELDS = 7; - */ - const SCHEMA_MISMATCH_EXTRA_FIELDS = 7; - /** - * Offset already exists. - * - * Generated from protobuf enum OFFSET_ALREADY_EXISTS = 8; - */ - const OFFSET_ALREADY_EXISTS = 8; - /** - * Offset out of range. - * - * Generated from protobuf enum OFFSET_OUT_OF_RANGE = 9; - */ - const OFFSET_OUT_OF_RANGE = 9; - /** - * Customer-managed encryption key (CMEK) not provided for CMEK-enabled - * data. - * - * Generated from protobuf enum CMEK_NOT_PROVIDED = 10; - */ - const CMEK_NOT_PROVIDED = 10; - /** - * Customer-managed encryption key (CMEK) was incorrectly provided. - * - * Generated from protobuf enum INVALID_CMEK_PROVIDED = 11; - */ - const INVALID_CMEK_PROVIDED = 11; - /** - * There is an encryption error while using customer-managed encryption key. - * - * Generated from protobuf enum CMEK_ENCRYPTION_ERROR = 12; - */ - const CMEK_ENCRYPTION_ERROR = 12; - /** - * Key Management Service (KMS) service returned an error, which can be - * retried. - * - * Generated from protobuf enum KMS_SERVICE_ERROR = 13; - */ - const KMS_SERVICE_ERROR = 13; - /** - * Permission denied while using customer-managed encryption key. - * - * Generated from protobuf enum KMS_PERMISSION_DENIED = 14; - */ - const KMS_PERMISSION_DENIED = 14; - - private static $valueToName = [ - self::STORAGE_ERROR_CODE_UNSPECIFIED => 'STORAGE_ERROR_CODE_UNSPECIFIED', - self::TABLE_NOT_FOUND => 'TABLE_NOT_FOUND', - self::STREAM_ALREADY_COMMITTED => 'STREAM_ALREADY_COMMITTED', - self::STREAM_NOT_FOUND => 'STREAM_NOT_FOUND', - self::INVALID_STREAM_TYPE => 'INVALID_STREAM_TYPE', - self::INVALID_STREAM_STATE => 'INVALID_STREAM_STATE', - self::STREAM_FINALIZED => 'STREAM_FINALIZED', - self::SCHEMA_MISMATCH_EXTRA_FIELDS => 'SCHEMA_MISMATCH_EXTRA_FIELDS', - self::OFFSET_ALREADY_EXISTS => 'OFFSET_ALREADY_EXISTS', - self::OFFSET_OUT_OF_RANGE => 'OFFSET_OUT_OF_RANGE', - self::CMEK_NOT_PROVIDED => 'CMEK_NOT_PROVIDED', - self::INVALID_CMEK_PROVIDED => 'INVALID_CMEK_PROVIDED', - self::CMEK_ENCRYPTION_ERROR => 'CMEK_ENCRYPTION_ERROR', - self::KMS_SERVICE_ERROR => 'KMS_SERVICE_ERROR', - self::KMS_PERMISSION_DENIED => 'KMS_PERMISSION_DENIED', - ]; - - 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(StorageErrorCode::class, \Google\Cloud\BigQuery\Storage\V1\StorageError_StorageErrorCode::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php deleted file mode 100644 index 595b148d28d7..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.bigquery.storage.v1.StreamStats - */ -class StreamStats extends \Google\Protobuf\Internal\Message -{ - /** - * Represents the progress of the current stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; - */ - protected $progress = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress $progress - * Represents the progress of the current stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Represents the progress of the current stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress|null - */ - public function getProgress() - { - return $this->progress; - } - - public function hasProgress() - { - return isset($this->progress); - } - - public function clearProgress() - { - unset($this->progress); - } - - /** - * Represents the progress of the current stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress::class); - $this->progress = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php deleted file mode 100644 index 0c145546b306..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.bigquery.storage.v1.StreamStats.Progress - */ -class Progress extends \Google\Protobuf\Internal\Message -{ - /** - * The fraction of rows assigned to the stream that have been processed by - * the server so far, not including the rows in the current response - * message. - * This value, along with `at_response_end`, can be used to interpolate - * the progress made as the rows in the message are being processed using - * the following formula: `at_response_start + (at_response_end - - * at_response_start) * rows_processed_from_response / rows_in_response`. - * Note that if a filter is provided, the `at_response_end` value of the - * previous response may not necessarily be equal to the - * `at_response_start` value of the current response. - * - * Generated from protobuf field double at_response_start = 1; - */ - protected $at_response_start = 0.0; - /** - * Similar to `at_response_start`, except that this value includes the - * rows in the current response. - * - * Generated from protobuf field double at_response_end = 2; - */ - protected $at_response_end = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $at_response_start - * The fraction of rows assigned to the stream that have been processed by - * the server so far, not including the rows in the current response - * message. - * This value, along with `at_response_end`, can be used to interpolate - * the progress made as the rows in the message are being processed using - * the following formula: `at_response_start + (at_response_end - - * at_response_start) * rows_processed_from_response / rows_in_response`. - * Note that if a filter is provided, the `at_response_end` value of the - * previous response may not necessarily be equal to the - * `at_response_start` value of the current response. - * @type float $at_response_end - * Similar to `at_response_start`, except that this value includes the - * rows in the current response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * The fraction of rows assigned to the stream that have been processed by - * the server so far, not including the rows in the current response - * message. - * This value, along with `at_response_end`, can be used to interpolate - * the progress made as the rows in the message are being processed using - * the following formula: `at_response_start + (at_response_end - - * at_response_start) * rows_processed_from_response / rows_in_response`. - * Note that if a filter is provided, the `at_response_end` value of the - * previous response may not necessarily be equal to the - * `at_response_start` value of the current response. - * - * Generated from protobuf field double at_response_start = 1; - * @return float - */ - public function getAtResponseStart() - { - return $this->at_response_start; - } - - /** - * The fraction of rows assigned to the stream that have been processed by - * the server so far, not including the rows in the current response - * message. - * This value, along with `at_response_end`, can be used to interpolate - * the progress made as the rows in the message are being processed using - * the following formula: `at_response_start + (at_response_end - - * at_response_start) * rows_processed_from_response / rows_in_response`. - * Note that if a filter is provided, the `at_response_end` value of the - * previous response may not necessarily be equal to the - * `at_response_start` value of the current response. - * - * Generated from protobuf field double at_response_start = 1; - * @param float $var - * @return $this - */ - public function setAtResponseStart($var) - { - GPBUtil::checkDouble($var); - $this->at_response_start = $var; - - return $this; - } - - /** - * Similar to `at_response_start`, except that this value includes the - * rows in the current response. - * - * Generated from protobuf field double at_response_end = 2; - * @return float - */ - public function getAtResponseEnd() - { - return $this->at_response_end; - } - - /** - * Similar to `at_response_start`, except that this value includes the - * rows in the current response. - * - * Generated from protobuf field double at_response_end = 2; - * @param float $var - * @return $this - */ - public function setAtResponseEnd($var) - { - GPBUtil::checkDouble($var); - $this->at_response_end = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Progress::class, \Google\Cloud\BigQuery\Storage\V1\StreamStats_Progress::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php deleted file mode 100644 index f435b08ae188..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php +++ /dev/null @@ -1,535 +0,0 @@ -google.cloud.bigquery.storage.v1.TableFieldSchema - */ -class TableFieldSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field name. The name must contain only letters (a-z, A-Z), - * numbers (0-9), or underscores (_), and must start with a letter or - * underscore. The maximum length is 128 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The field data type. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Optional. The field mode. The default value is NULLABLE. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = 0; - /** - * Optional. Describes the nested schema fields if the type property is set to - * STRUCT. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $fields; - /** - * Optional. The field description. The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Maximum length of values of this field for STRINGS or BYTES. - * If max_length is not specified, no maximum length constraint is imposed - * on this field. - * If type = "STRING", then max_length represents the maximum UTF-8 - * length of strings in this field. - * If type = "BYTES", then max_length represents the maximum number of - * bytes in this field. - * It is invalid to set this field if type is not "STRING" or "BYTES". - * - * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_length = 0; - /** - * Optional. Precision (maximum number of total digits in base 10) and scale - * (maximum number of digits in the fractional part in base 10) constraints - * for values of this field for NUMERIC or BIGNUMERIC. - * It is invalid to set precision or scale if type is not "NUMERIC" or - * "BIGNUMERIC". - * If precision and scale are not specified, no value range constraint is - * imposed on this field insofar as values are permitted by the type. - * Values of this NUMERIC or BIGNUMERIC field must be in this range when: - * * Precision (P) and scale (S) are specified: - * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - * * Precision (P) is specified but not scale (and thus scale is - * interpreted to be equal to zero): - * [-10^P + 1, 10^P - 1]. - * Acceptable values for precision and scale if both are specified: - * * If type = "NUMERIC": - * 1 <= precision - scale <= 29 and 0 <= scale <= 9. - * * If type = "BIGNUMERIC": - * 1 <= precision - scale <= 38 and 0 <= scale <= 38. - * Acceptable values for precision if only precision is specified but not - * scale (and thus scale is interpreted to be equal to zero): - * * If type = "NUMERIC": 1 <= precision <= 29. - * * If type = "BIGNUMERIC": 1 <= precision <= 38. - * If scale is specified but not precision, then it is invalid. - * - * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $precision = 0; - /** - * Optional. See documentation for precision. - * - * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scale = 0; - /** - * Optional. A SQL expression to specify the [default value] - * (https://cloud.google.com/bigquery/docs/default-values) for this field. - * - * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_value_expression = ''; - /** - * Optional. The subtype of the RANGE, if the type of this field is RANGE. If - * the type is RANGE, this field is required. Possible values for the field - * element type of a RANGE include: - * * DATE - * * DATETIME - * * TIMESTAMP - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $range_element_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The field name. The name must contain only letters (a-z, A-Z), - * numbers (0-9), or underscores (_), and must start with a letter or - * underscore. The maximum length is 128 characters. - * @type int $type - * Required. The field data type. - * @type int $mode - * Optional. The field mode. The default value is NULLABLE. - * @type array<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema>|\Google\Protobuf\Internal\RepeatedField $fields - * Optional. Describes the nested schema fields if the type property is set to - * STRUCT. - * @type string $description - * Optional. The field description. The maximum length is 1,024 characters. - * @type int|string $max_length - * Optional. Maximum length of values of this field for STRINGS or BYTES. - * If max_length is not specified, no maximum length constraint is imposed - * on this field. - * If type = "STRING", then max_length represents the maximum UTF-8 - * length of strings in this field. - * If type = "BYTES", then max_length represents the maximum number of - * bytes in this field. - * It is invalid to set this field if type is not "STRING" or "BYTES". - * @type int|string $precision - * Optional. Precision (maximum number of total digits in base 10) and scale - * (maximum number of digits in the fractional part in base 10) constraints - * for values of this field for NUMERIC or BIGNUMERIC. - * It is invalid to set precision or scale if type is not "NUMERIC" or - * "BIGNUMERIC". - * If precision and scale are not specified, no value range constraint is - * imposed on this field insofar as values are permitted by the type. - * Values of this NUMERIC or BIGNUMERIC field must be in this range when: - * * Precision (P) and scale (S) are specified: - * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - * * Precision (P) is specified but not scale (and thus scale is - * interpreted to be equal to zero): - * [-10^P + 1, 10^P - 1]. - * Acceptable values for precision and scale if both are specified: - * * If type = "NUMERIC": - * 1 <= precision - scale <= 29 and 0 <= scale <= 9. - * * If type = "BIGNUMERIC": - * 1 <= precision - scale <= 38 and 0 <= scale <= 38. - * Acceptable values for precision if only precision is specified but not - * scale (and thus scale is interpreted to be equal to zero): - * * If type = "NUMERIC": 1 <= precision <= 29. - * * If type = "BIGNUMERIC": 1 <= precision <= 38. - * If scale is specified but not precision, then it is invalid. - * @type int|string $scale - * Optional. See documentation for precision. - * @type string $default_value_expression - * Optional. A SQL expression to specify the [default value] - * (https://cloud.google.com/bigquery/docs/default-values) for this field. - * @type \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType $range_element_type - * Optional. The subtype of the RANGE, if the type of this field is RANGE. If - * the type is RANGE, this field is required. Possible values for the field - * element type of a RANGE include: - * * DATE - * * DATETIME - * * TIMESTAMP - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field name. The name must contain only letters (a-z, A-Z), - * numbers (0-9), or underscores (_), and must start with a letter or - * underscore. The maximum length is 128 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The field name. The name must contain only letters (a-z, A-Z), - * numbers (0-9), or underscores (_), and must start with a letter or - * underscore. The maximum length is 128 characters. - * - * 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. The field data type. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The field data type. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. The field mode. The default value is NULLABLE. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. The field mode. The default value is NULLABLE. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Optional. Describes the nested schema fields if the type property is set to - * STRUCT. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Optional. Describes the nested schema fields if the type property is set to - * STRUCT. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema::class); - $this->fields = $arr; - - return $this; - } - - /** - * Optional. The field description. The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The field description. The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Maximum length of values of this field for STRINGS or BYTES. - * If max_length is not specified, no maximum length constraint is imposed - * on this field. - * If type = "STRING", then max_length represents the maximum UTF-8 - * length of strings in this field. - * If type = "BYTES", then max_length represents the maximum number of - * bytes in this field. - * It is invalid to set this field if type is not "STRING" or "BYTES". - * - * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMaxLength() - { - return $this->max_length; - } - - /** - * Optional. Maximum length of values of this field for STRINGS or BYTES. - * If max_length is not specified, no maximum length constraint is imposed - * on this field. - * If type = "STRING", then max_length represents the maximum UTF-8 - * length of strings in this field. - * If type = "BYTES", then max_length represents the maximum number of - * bytes in this field. - * It is invalid to set this field if type is not "STRING" or "BYTES". - * - * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMaxLength($var) - { - GPBUtil::checkInt64($var); - $this->max_length = $var; - - return $this; - } - - /** - * Optional. Precision (maximum number of total digits in base 10) and scale - * (maximum number of digits in the fractional part in base 10) constraints - * for values of this field for NUMERIC or BIGNUMERIC. - * It is invalid to set precision or scale if type is not "NUMERIC" or - * "BIGNUMERIC". - * If precision and scale are not specified, no value range constraint is - * imposed on this field insofar as values are permitted by the type. - * Values of this NUMERIC or BIGNUMERIC field must be in this range when: - * * Precision (P) and scale (S) are specified: - * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - * * Precision (P) is specified but not scale (and thus scale is - * interpreted to be equal to zero): - * [-10^P + 1, 10^P - 1]. - * Acceptable values for precision and scale if both are specified: - * * If type = "NUMERIC": - * 1 <= precision - scale <= 29 and 0 <= scale <= 9. - * * If type = "BIGNUMERIC": - * 1 <= precision - scale <= 38 and 0 <= scale <= 38. - * Acceptable values for precision if only precision is specified but not - * scale (and thus scale is interpreted to be equal to zero): - * * If type = "NUMERIC": 1 <= precision <= 29. - * * If type = "BIGNUMERIC": 1 <= precision <= 38. - * If scale is specified but not precision, then it is invalid. - * - * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getPrecision() - { - return $this->precision; - } - - /** - * Optional. Precision (maximum number of total digits in base 10) and scale - * (maximum number of digits in the fractional part in base 10) constraints - * for values of this field for NUMERIC or BIGNUMERIC. - * It is invalid to set precision or scale if type is not "NUMERIC" or - * "BIGNUMERIC". - * If precision and scale are not specified, no value range constraint is - * imposed on this field insofar as values are permitted by the type. - * Values of this NUMERIC or BIGNUMERIC field must be in this range when: - * * Precision (P) and scale (S) are specified: - * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - * * Precision (P) is specified but not scale (and thus scale is - * interpreted to be equal to zero): - * [-10^P + 1, 10^P - 1]. - * Acceptable values for precision and scale if both are specified: - * * If type = "NUMERIC": - * 1 <= precision - scale <= 29 and 0 <= scale <= 9. - * * If type = "BIGNUMERIC": - * 1 <= precision - scale <= 38 and 0 <= scale <= 38. - * Acceptable values for precision if only precision is specified but not - * scale (and thus scale is interpreted to be equal to zero): - * * If type = "NUMERIC": 1 <= precision <= 29. - * * If type = "BIGNUMERIC": 1 <= precision <= 38. - * If scale is specified but not precision, then it is invalid. - * - * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setPrecision($var) - { - GPBUtil::checkInt64($var); - $this->precision = $var; - - return $this; - } - - /** - * Optional. See documentation for precision. - * - * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getScale() - { - return $this->scale; - } - - /** - * Optional. See documentation for precision. - * - * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setScale($var) - { - GPBUtil::checkInt64($var); - $this->scale = $var; - - return $this; - } - - /** - * Optional. A SQL expression to specify the [default value] - * (https://cloud.google.com/bigquery/docs/default-values) for this field. - * - * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDefaultValueExpression() - { - return $this->default_value_expression; - } - - /** - * Optional. A SQL expression to specify the [default value] - * (https://cloud.google.com/bigquery/docs/default-values) for this field. - * - * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDefaultValueExpression($var) - { - GPBUtil::checkString($var, True); - $this->default_value_expression = $var; - - return $this; - } - - /** - * Optional. The subtype of the RANGE, if the type of this field is RANGE. If - * the type is RANGE, this field is required. Possible values for the field - * element type of a RANGE include: - * * DATE - * * DATETIME - * * TIMESTAMP - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType|null - */ - public function getRangeElementType() - { - return $this->range_element_type; - } - - public function hasRangeElementType() - { - return isset($this->range_element_type); - } - - public function clearRangeElementType() - { - unset($this->range_element_type); - } - - /** - * Optional. The subtype of the RANGE, if the type of this field is RANGE. If - * the type is RANGE, this field is required. Possible values for the field - * element type of a RANGE include: - * * DATE - * * DATETIME - * * TIMESTAMP - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType $var - * @return $this - */ - public function setRangeElementType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType::class); - $this->range_element_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php deleted file mode 100644 index 3ce7bc2b9dac..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType - */ -class FieldElementType extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of a field element. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. The type of a field element. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of a field element. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of a field element. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Type::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldElementType::class, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema_FieldElementType::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php deleted file mode 100644 index 8fc99eec5196..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.bigquery.storage.v1.TableFieldSchema.Mode - */ -class Mode -{ - /** - * Illegal value - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Generated from protobuf enum NULLABLE = 1; - */ - const NULLABLE = 1; - /** - * Generated from protobuf enum REQUIRED = 2; - */ - const REQUIRED = 2; - /** - * Generated from protobuf enum REPEATED = 3; - */ - const REPEATED = 3; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::NULLABLE => 'NULLABLE', - self::REQUIRED => 'REQUIRED', - 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\BigQuery\Storage\V1\TableFieldSchema_Mode::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php deleted file mode 100644 index bf9405b5ff75..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.bigquery.storage.v1.TableFieldSchema.Type - */ -class Type -{ - /** - * Illegal value - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * 64K, UTF8 - * - * Generated from protobuf enum STRING = 1; - */ - const STRING = 1; - /** - * 64-bit signed - * - * Generated from protobuf enum INT64 = 2; - */ - const INT64 = 2; - /** - * 64-bit IEEE floating point - * - * Generated from protobuf enum DOUBLE = 3; - */ - const DOUBLE = 3; - /** - * Aggregate type - * - * Generated from protobuf enum STRUCT = 4; - */ - const STRUCT = 4; - /** - * 64K, Binary - * - * Generated from protobuf enum BYTES = 5; - */ - const BYTES = 5; - /** - * 2-valued - * - * Generated from protobuf enum BOOL = 6; - */ - const BOOL = 6; - /** - * 64-bit signed usec since UTC epoch - * - * Generated from protobuf enum TIMESTAMP = 7; - */ - const TIMESTAMP = 7; - /** - * Civil date - Year, Month, Day - * - * Generated from protobuf enum DATE = 8; - */ - const DATE = 8; - /** - * Civil time - Hour, Minute, Second, Microseconds - * - * Generated from protobuf enum TIME = 9; - */ - const TIME = 9; - /** - * Combination of civil date and civil time - * - * Generated from protobuf enum DATETIME = 10; - */ - const DATETIME = 10; - /** - * Geography object - * - * Generated from protobuf enum GEOGRAPHY = 11; - */ - const GEOGRAPHY = 11; - /** - * Numeric value - * - * Generated from protobuf enum NUMERIC = 12; - */ - const NUMERIC = 12; - /** - * BigNumeric value - * - * Generated from protobuf enum BIGNUMERIC = 13; - */ - const BIGNUMERIC = 13; - /** - * Interval - * - * Generated from protobuf enum INTERVAL = 14; - */ - const INTERVAL = 14; - /** - * JSON, String - * - * Generated from protobuf enum JSON = 15; - */ - const JSON = 15; - /** - * RANGE - * - * Generated from protobuf enum RANGE = 16; - */ - const RANGE = 16; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::STRING => 'STRING', - self::INT64 => 'INT64', - self::DOUBLE => 'DOUBLE', - self::STRUCT => 'STRUCT', - self::BYTES => 'BYTES', - self::BOOL => 'BOOL', - self::TIMESTAMP => 'TIMESTAMP', - self::DATE => 'DATE', - self::TIME => 'TIME', - self::DATETIME => 'DATETIME', - self::GEOGRAPHY => 'GEOGRAPHY', - self::NUMERIC => 'NUMERIC', - self::BIGNUMERIC => 'BIGNUMERIC', - self::INTERVAL => 'INTERVAL', - self::JSON => 'JSON', - self::RANGE => 'RANGE', - ]; - - 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\BigQuery\Storage\V1\TableFieldSchema_Type::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php deleted file mode 100644 index 8aaba43df1d9..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.bigquery.storage.v1.TableSchema - */ -class TableSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Describes the fields in a table. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema>|\Google\Protobuf\Internal\RepeatedField $fields - * Describes the fields in a table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); - parent::__construct($data); - } - - /** - * Describes the fields in a table. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Describes the fields in a table. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; - * @param array<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema::class); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php deleted file mode 100644 index 2680abd3dee0..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.bigquery.storage.v1.ThrottleState - */ -class ThrottleState extends \Google\Protobuf\Internal\Message -{ - /** - * How much this connection is being throttled. Zero means no throttling, - * 100 means fully throttled. - * - * Generated from protobuf field int32 throttle_percent = 1; - */ - protected $throttle_percent = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $throttle_percent - * How much this connection is being throttled. Zero means no throttling, - * 100 means fully throttled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * How much this connection is being throttled. Zero means no throttling, - * 100 means fully throttled. - * - * Generated from protobuf field int32 throttle_percent = 1; - * @return int - */ - public function getThrottlePercent() - { - return $this->throttle_percent; - } - - /** - * How much this connection is being throttled. Zero means no throttling, - * 100 means fully throttled. - * - * Generated from protobuf field int32 throttle_percent = 1; - * @param int $var - * @return $this - */ - public function setThrottlePercent($var) - { - GPBUtil::checkInt32($var); - $this->throttle_percent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php deleted file mode 100644 index c49dce81a82e..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php +++ /dev/null @@ -1,341 +0,0 @@ -google.cloud.bigquery.storage.v1.WriteStream - */ -class WriteStream extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the stream, in the form - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Immutable. Type of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Output only. Create time of the stream. For the _default stream, this is - * the creation_time of the table. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Commit time of the stream. - * If a stream is of `COMMITTED` type, then it will have a commit_time same as - * `create_time`. If the stream is of `PENDING` type, empty commit_time - * means it is not committed. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $commit_time = null; - /** - * Output only. The schema of the destination table. It is only returned in - * `CreateWriteStream` response. Caller should generate data that's - * compatible with this schema to send in initial `AppendRowsRequest`. - * The table schema could go out of date during the life time of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $table_schema = null; - /** - * Immutable. Mode of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $write_mode = 0; - /** - * Immutable. The geographic location where the stream's dataset resides. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of the stream, in the form - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * @type int $type - * Immutable. Type of the stream. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create time of the stream. For the _default stream, this is - * the creation_time of the table. - * @type \Google\Protobuf\Timestamp $commit_time - * Output only. Commit time of the stream. - * If a stream is of `COMMITTED` type, then it will have a commit_time same as - * `create_time`. If the stream is of `PENDING` type, empty commit_time - * means it is not committed. - * @type \Google\Cloud\BigQuery\Storage\V1\TableSchema $table_schema - * Output only. The schema of the destination table. It is only returned in - * `CreateWriteStream` response. Caller should generate data that's - * compatible with this schema to send in initial `AppendRowsRequest`. - * The table schema could go out of date during the life time of the stream. - * @type int $write_mode - * Immutable. Mode of the stream. - * @type string $location - * Immutable. The geographic location where the stream's dataset resides. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the stream, in the form - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of the stream, in the form - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * 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; - } - - /** - * Immutable. Type of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Immutable. Type of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. Create time of the stream. For the _default stream, this is - * the creation_time of the table. - * - * 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. Create time of the stream. For the _default stream, this is - * the creation_time of the table. - * - * 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. Commit time of the stream. - * If a stream is of `COMMITTED` type, then it will have a commit_time same as - * `create_time`. If the stream is of `PENDING` type, empty commit_time - * means it is not committed. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * Output only. Commit time of the stream. - * If a stream is of `COMMITTED` type, then it will have a commit_time same as - * `create_time`. If the stream is of `PENDING` type, empty commit_time - * means it is not committed. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - - /** - * Output only. The schema of the destination table. It is only returned in - * `CreateWriteStream` response. Caller should generate data that's - * compatible with this schema to send in initial `AppendRowsRequest`. - * The table schema could go out of date during the life time of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\TableSchema|null - */ - public function getTableSchema() - { - return $this->table_schema; - } - - public function hasTableSchema() - { - return isset($this->table_schema); - } - - public function clearTableSchema() - { - unset($this->table_schema); - } - - /** - * Output only. The schema of the destination table. It is only returned in - * `CreateWriteStream` response. Caller should generate data that's - * compatible with this schema to send in initial `AppendRowsRequest`. - * The table schema could go out of date during the life time of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\TableSchema $var - * @return $this - */ - public function setTableSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableSchema::class); - $this->table_schema = $var; - - return $this; - } - - /** - * Immutable. Mode of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getWriteMode() - { - return $this->write_mode; - } - - /** - * Immutable. Mode of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setWriteMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream\WriteMode::class); - $this->write_mode = $var; - - return $this; - } - - /** - * Immutable. The geographic location where the stream's dataset resides. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Immutable. The geographic location where the stream's dataset resides. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php deleted file mode 100644 index f8c772aef35d..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.bigquery.storage.v1.WriteStream.Type - */ -class Type -{ - /** - * Unknown type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Data will commit automatically and appear as soon as the write is - * acknowledged. - * - * Generated from protobuf enum COMMITTED = 1; - */ - const COMMITTED = 1; - /** - * Data is invisible until the stream is committed. - * - * Generated from protobuf enum PENDING = 2; - */ - const PENDING = 2; - /** - * Data is only visible up to the offset to which it was flushed. - * - * Generated from protobuf enum BUFFERED = 3; - */ - const BUFFERED = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::COMMITTED => 'COMMITTED', - self::PENDING => 'PENDING', - self::BUFFERED => 'BUFFERED', - ]; - - 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\BigQuery\Storage\V1\WriteStream_Type::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php deleted file mode 100644 index 1f21103bc93d..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.bigquery.storage.v1.WriteStream.WriteMode - */ -class WriteMode -{ - /** - * Unknown type. - * - * Generated from protobuf enum WRITE_MODE_UNSPECIFIED = 0; - */ - const WRITE_MODE_UNSPECIFIED = 0; - /** - * Insert new records into the table. - * It is the default value if customers do not specify it. - * - * Generated from protobuf enum INSERT = 1; - */ - const INSERT = 1; - - private static $valueToName = [ - self::WRITE_MODE_UNSPECIFIED => 'WRITE_MODE_UNSPECIFIED', - self::INSERT => 'INSERT', - ]; - - 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(WriteMode::class, \Google\Cloud\BigQuery\Storage\V1\WriteStream_WriteMode::class); - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php deleted file mode 100644 index 5d008746e9fe..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.bigquery.storage.v1.WriteStreamView - */ -class WriteStreamView -{ - /** - * The default / unset value. - * - * Generated from protobuf enum WRITE_STREAM_VIEW_UNSPECIFIED = 0; - */ - const WRITE_STREAM_VIEW_UNSPECIFIED = 0; - /** - * The BASIC projection returns basic metadata about a write stream. The - * basic view does not include schema information. This is the default view - * returned by GetWriteStream. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * The FULL projection returns all available write stream metadata, including - * the schema. CreateWriteStream returns the full projection of write stream - * metadata. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::WRITE_STREAM_VIEW_UNSPECIFIED => 'WRITE_STREAM_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); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php deleted file mode 100644 index 9f0268f26fe2..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setReadSession($readSession); - - // Call the API and handle any network failures. - try { - /** @var ReadSession $response */ - $response = $bigQueryReadClient->createReadSession($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 = BigQueryReadClient::projectName('[PROJECT]'); - - create_read_session_sample($formattedParent); -} -// [END bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php deleted file mode 100644 index 8c6fabde6488..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php +++ /dev/null @@ -1,87 +0,0 @@ -setReadStream($formattedReadStream); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigQueryReadClient->readRows($request); - - /** @var ReadRowsResponse $element */ - foreach ($stream->readAll() 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 -{ - $formattedReadStream = BigQueryReadClient::readStreamName( - '[PROJECT]', - '[LOCATION]', - '[SESSION]', - '[STREAM]' - ); - - read_rows_sample($formattedReadStream); -} -// [END bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php deleted file mode 100644 index d4ca17c4ca0a..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SplitReadStreamResponse $response */ - $response = $bigQueryReadClient->splitReadStream($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 = BigQueryReadClient::readStreamName( - '[PROJECT]', - '[LOCATION]', - '[SESSION]', - '[STREAM]' - ); - - split_read_stream_sample($formattedName); -} -// [END bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php deleted file mode 100644 index ce8a38bab12b..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php +++ /dev/null @@ -1,143 +0,0 @@ -setWriteStream($formattedWriteStream); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $bigQueryWriteClient->appendRows(); - $stream->writeAll([$request,]); - - /** @var AppendRowsResponse $element */ - foreach ($stream->closeWriteAndReadAll() 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 -{ - $formattedWriteStream = BigQueryWriteClient::writeStreamName( - '[PROJECT]', - '[DATASET]', - '[TABLE]', - '[STREAM]' - ); - - append_rows_sample($formattedWriteStream); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php deleted file mode 100644 index dee9cd4ef5c4..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent) - ->setWriteStreams($writeStreams); - - // Call the API and handle any network failures. - try { - /** @var BatchCommitWriteStreamsResponse $response */ - $response = $bigQueryWriteClient->batchCommitWriteStreams($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 = BigQueryWriteClient::tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStreamsElement = '[WRITE_STREAMS]'; - - batch_commit_write_streams_sample($formattedParent, $writeStreamsElement); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php deleted file mode 100644 index 42802be34b6c..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent) - ->setWriteStream($writeStream); - - // Call the API and handle any network failures. - try { - /** @var WriteStream $response */ - $response = $bigQueryWriteClient->createWriteStream($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 = BigQueryWriteClient::tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - - create_write_stream_sample($formattedParent); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php deleted file mode 100644 index 980109a2d895..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var FinalizeWriteStreamResponse $response */ - $response = $bigQueryWriteClient->finalizeWriteStream($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 = BigQueryWriteClient::writeStreamName( - '[PROJECT]', - '[DATASET]', - '[TABLE]', - '[STREAM]' - ); - - finalize_write_stream_sample($formattedName); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php deleted file mode 100644 index 413fe426771e..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php +++ /dev/null @@ -1,83 +0,0 @@ -setWriteStream($formattedWriteStream); - - // Call the API and handle any network failures. - try { - /** @var FlushRowsResponse $response */ - $response = $bigQueryWriteClient->flushRows($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 -{ - $formattedWriteStream = BigQueryWriteClient::writeStreamName( - '[PROJECT]', - '[DATASET]', - '[TABLE]', - '[STREAM]' - ); - - flush_rows_sample($formattedWriteStream); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php deleted file mode 100644 index d8bbaf0d5d06..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var WriteStream $response */ - $response = $bigQueryWriteClient->getWriteStream($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 = BigQueryWriteClient::writeStreamName( - '[PROJECT]', - '[DATASET]', - '[TABLE]', - '[STREAM]' - ); - - get_write_stream_sample($formattedName); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php deleted file mode 100644 index c08dc6a41419..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php +++ /dev/null @@ -1,388 +0,0 @@ - createReadSessionAsync(CreateReadSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface splitReadStreamAsync(SplitReadStreamRequest $request, array $optionalArgs = []) - */ -final class BigQueryReadClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.storage.v1.BigQueryRead'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigquerystorage.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigquerystorage.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigquery', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/big_query_read_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/big_query_read_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/big_query_read_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/big_query_read_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a read_session - * resource. - * - * @param string $project - * @param string $location - * @param string $session - * - * @return string The formatted read_session resource. - */ - public static function readSessionName(string $project, string $location, string $session): string - { - return self::getPathTemplate('readSession')->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a read_stream - * resource. - * - * @param string $project - * @param string $location - * @param string $session - * @param string $stream - * - * @return string The formatted read_stream resource. - */ - public static function readStreamName(string $project, string $location, string $session, string $stream): string - { - return self::getPathTemplate('readStream')->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - 'stream' => $stream, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $dataset - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName(string $project, string $dataset, string $table): string - { - return self::getPathTemplate('table')->render([ - 'project' => $project, - 'dataset' => $dataset, - 'table' => $table, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - project: projects/{project} - * - readSession: projects/{project}/locations/{location}/sessions/{session} - * - readStream: projects/{project}/locations/{location}/sessions/{session}/streams/{stream} - * - table: projects/{project}/datasets/{dataset}/tables/{table} - * - * 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 'bigquerystorage.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new read session. A read session divides the contents of a - * BigQuery table into one or more streams, which can then be used to read - * data from the table. The read session also specifies properties of the - * data to be read, such as a list of columns or a push-down filter describing - * the rows to be returned. - * - * A particular row can be read by at most one stream. When the caller has - * reached the end of each stream in the session, then all the data in the - * table has been read. - * - * Data is assigned to each stream such that roughly the same number of - * rows can be read from each stream. Because the server-side unit for - * assigning data is collections of rows, the API does not guarantee that - * each stream will return the same number or rows. Additionally, the - * limits are enforced based on the number of pre-filtered rows, so some - * filters can lead to lopsided assignments. - * - * Read sessions automatically expire 6 hours after they are created and do - * not require manual clean-up by the caller. - * - * The async variant is {@see BigQueryReadClient::createReadSessionAsync()} . - * - * @example samples/V1/BigQueryReadClient/create_read_session.php - * - * @param CreateReadSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReadSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReadSession(CreateReadSessionRequest $request, array $callOptions = []): ReadSession - { - return $this->startApiCall('CreateReadSession', $request, $callOptions)->wait(); - } - - /** - * Reads rows from the stream in the format prescribed by the ReadSession. - * Each response contains one or more table rows, up to a maximum of 100 MiB - * per response; read requests which attempt to read individual rows larger - * than 100 MiB will fail. - * - * Each request also returns a set of stream statistics reflecting the current - * state of the stream. - * - * @example samples/V1/BigQueryReadClient/read_rows.php - * - * @param ReadRowsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function readRows(ReadRowsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ReadRows', $request, $callOptions); - } - - /** - * Splits a given `ReadStream` into two `ReadStream` objects. These - * `ReadStream` objects are referred to as the primary and the residual - * streams of the split. The original `ReadStream` can still be read from in - * the same manner as before. Both of the returned `ReadStream` objects can - * also be read from, and the rows returned by both child streams will be - * the same as the rows read from the original stream. - * - * Moreover, the two child streams will be allocated back-to-back in the - * original `ReadStream`. Concretely, it is guaranteed that for streams - * original, primary, and residual, that original[0-j] = primary[0-j] and - * original[j-n] = residual[0-m] once the streams have been read to - * completion. - * - * The async variant is {@see BigQueryReadClient::splitReadStreamAsync()} . - * - * @example samples/V1/BigQueryReadClient/split_read_stream.php - * - * @param SplitReadStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SplitReadStreamResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function splitReadStream(SplitReadStreamRequest $request, array $callOptions = []): SplitReadStreamResponse - { - return $this->startApiCall('SplitReadStream', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php deleted file mode 100644 index 7d828b8088c8..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php +++ /dev/null @@ -1,454 +0,0 @@ - batchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createWriteStreamAsync(CreateWriteStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface finalizeWriteStreamAsync(FinalizeWriteStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface flushRowsAsync(FlushRowsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getWriteStreamAsync(GetWriteStreamRequest $request, array $optionalArgs = []) - */ -final class BigQueryWriteClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.storage.v1.BigQueryWrite'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigquerystorage.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigquerystorage.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigquery', - 'https://www.googleapis.com/auth/bigquery.insertdata', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/big_query_write_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/big_query_write_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/big_query_write_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/big_query_write_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $dataset - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName(string $project, string $dataset, string $table): string - { - return self::getPathTemplate('table')->render([ - 'project' => $project, - 'dataset' => $dataset, - 'table' => $table, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a write_stream - * resource. - * - * @param string $project - * @param string $dataset - * @param string $table - * @param string $stream - * - * @return string The formatted write_stream resource. - */ - public static function writeStreamName(string $project, string $dataset, string $table, string $stream): string - { - return self::getPathTemplate('writeStream')->render([ - 'project' => $project, - 'dataset' => $dataset, - 'table' => $table, - 'stream' => $stream, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - table: projects/{project}/datasets/{dataset}/tables/{table} - * - writeStream: projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream} - * - * 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 'bigquerystorage.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); - } - - /** - * Appends data to the given stream. - * - * If `offset` is specified, the `offset` is checked against the end of - * stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an - * attempt is made to append to an offset beyond the current end of the stream - * or `ALREADY_EXISTS` if user provides an `offset` that has already been - * written to. User can retry with adjusted offset within the same RPC - * connection. If `offset` is not specified, append happens at the end of the - * stream. - * - * The response contains an optional offset at which the append - * happened. No offset information will be returned for appends to a - * default stream. - * - * Responses are received in the same order in which requests are sent. - * There will be one response for each successful inserted request. Responses - * may optionally embed error information if the originating AppendRequest was - * not successfully processed. - * - * The specifics of when successfully appended data is made visible to the - * table are governed by the type of stream: - * - * * For COMMITTED streams (which includes the default stream), data is - * visible immediately upon successful append. - * - * * For BUFFERED streams, data is made visible via a subsequent `FlushRows` - * rpc which advances a cursor to a newer offset in the stream. - * - * * For PENDING streams, data is not made visible until the stream itself is - * finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly - * committed via the `BatchCommitWriteStreams` rpc. - * - * @example samples/V1/BigQueryWriteClient/append_rows.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function appendRows(array $callOptions = []): BidiStream - { - return $this->startApiCall('AppendRows', null, $callOptions); - } - - /** - * Atomically commits a group of `PENDING` streams that belong to the same - * `parent` table. - * - * Streams must be finalized before commit and cannot be committed multiple - * times. Once a stream is committed, data in the stream becomes available - * for read operations. - * - * The async variant is {@see BigQueryWriteClient::batchCommitWriteStreamsAsync()} - * . - * - * @example samples/V1/BigQueryWriteClient/batch_commit_write_streams.php - * - * @param BatchCommitWriteStreamsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BatchCommitWriteStreamsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchCommitWriteStreams(BatchCommitWriteStreamsRequest $request, array $callOptions = []): BatchCommitWriteStreamsResponse - { - return $this->startApiCall('BatchCommitWriteStreams', $request, $callOptions)->wait(); - } - - /** - * Creates a write stream to the given table. - * Additionally, every table has a special stream named '_default' - * to which data can be written. This stream doesn't need to be created using - * CreateWriteStream. It is a stream that can be used simultaneously by any - * number of clients. Data written to this stream is considered committed as - * soon as an acknowledgement is received. - * - * The async variant is {@see BigQueryWriteClient::createWriteStreamAsync()} . - * - * @example samples/V1/BigQueryWriteClient/create_write_stream.php - * - * @param CreateWriteStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return WriteStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function createWriteStream(CreateWriteStreamRequest $request, array $callOptions = []): WriteStream - { - return $this->startApiCall('CreateWriteStream', $request, $callOptions)->wait(); - } - - /** - * Finalize a write stream so that no new data can be appended to the - * stream. Finalize is not supported on the '_default' stream. - * - * The async variant is {@see BigQueryWriteClient::finalizeWriteStreamAsync()} . - * - * @example samples/V1/BigQueryWriteClient/finalize_write_stream.php - * - * @param FinalizeWriteStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FinalizeWriteStreamResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function finalizeWriteStream(FinalizeWriteStreamRequest $request, array $callOptions = []): FinalizeWriteStreamResponse - { - return $this->startApiCall('FinalizeWriteStream', $request, $callOptions)->wait(); - } - - /** - * Flushes rows to a BUFFERED stream. - * - * If users are appending rows to BUFFERED stream, flush operation is - * required in order for the rows to become available for reading. A - * Flush operation flushes up to any previously flushed offset in a BUFFERED - * stream, to the offset specified in the request. - * - * Flush is not supported on the _default stream, since it is not BUFFERED. - * - * The async variant is {@see BigQueryWriteClient::flushRowsAsync()} . - * - * @example samples/V1/BigQueryWriteClient/flush_rows.php - * - * @param FlushRowsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FlushRowsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function flushRows(FlushRowsRequest $request, array $callOptions = []): FlushRowsResponse - { - return $this->startApiCall('FlushRows', $request, $callOptions)->wait(); - } - - /** - * Gets information about a write stream. - * - * The async variant is {@see BigQueryWriteClient::getWriteStreamAsync()} . - * - * @example samples/V1/BigQueryWriteClient/get_write_stream.php - * - * @param GetWriteStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return WriteStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function getWriteStream(GetWriteStreamRequest $request, array $callOptions = []): WriteStream - { - return $this->startApiCall('GetWriteStream', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 35b88c9b5daf..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.bigquery.storage.v1", - "libraryPackage": "Google\\Cloud\\BigQuery\\Storage\\V1", - "services": { - "BigQueryRead": { - "clients": { - "grpc": { - "libraryClient": "BigQueryReadGapicClient", - "rpcs": { - "CreateReadSession": { - "methods": [ - "createReadSession" - ] - }, - "ReadRows": { - "methods": [ - "readRows" - ] - }, - "SplitReadStream": { - "methods": [ - "splitReadStream" - ] - } - } - } - } - }, - "BigQueryWrite": { - "clients": { - "grpc": { - "libraryClient": "BigQueryWriteGapicClient", - "rpcs": { - "AppendRows": { - "methods": [ - "appendRows" - ] - }, - "BatchCommitWriteStreams": { - "methods": [ - "batchCommitWriteStreams" - ] - }, - "CreateWriteStream": { - "methods": [ - "createWriteStream" - ] - }, - "FinalizeWriteStream": { - "methods": [ - "finalizeWriteStream" - ] - }, - "FlushRows": { - "methods": [ - "flushRows" - ] - }, - "GetWriteStream": { - "methods": [ - "getWriteStream" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json deleted file mode 100644 index 780af364091c..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.storage.v1.BigQueryRead": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateReadSession": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ReadRows": { - "timeout_millis": 86400000 - }, - "SplitReadStream": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php deleted file mode 100644 index 38011adeeb9a..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php +++ /dev/null @@ -1,74 +0,0 @@ - [ - 'google.cloud.bigquery.storage.v1.BigQueryRead' => [ - 'CreateReadSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\ReadSession', - 'headerParams' => [ - [ - 'keyName' => 'read_session.table', - 'fieldAccessors' => [ - 'getReadSession', - 'getTable', - ], - ], - ], - ], - 'ReadRows' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\ReadRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'read_stream', - 'fieldAccessors' => [ - 'getReadStream', - ], - ], - ], - ], - 'SplitReadStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\SplitReadStreamResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'project' => 'projects/{project}', - 'readSession' => 'projects/{project}/locations/{location}/sessions/{session}', - 'readStream' => 'projects/{project}/locations/{location}/sessions/{session}/streams/{stream}', - 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php deleted file mode 100644 index 7733f1719340..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php +++ /dev/null @@ -1,63 +0,0 @@ - [ - 'google.cloud.bigquery.storage.v1.BigQueryRead' => [ - 'CreateReadSession' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{read_session.table=projects/*/datasets/*/tables/*}', - 'body' => '*', - 'placeholders' => [ - 'read_session.table' => [ - 'getters' => [ - 'getReadSession', - 'getTable', - ], - ], - ], - ], - 'ReadRows' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}', - 'placeholders' => [ - 'read_stream' => [ - 'getters' => [ - 'getReadStream', - ], - ], - ], - ], - 'SplitReadStream' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*/streams/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json deleted file mode 100644 index c24690087513..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.storage.v1.BigQueryWrite": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_4_codes": [ - "UNAVAILABLE" - ], - "retry_policy_5_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE", - "RESOURCE_EXHAUSTED" - ], - "retry_policy_6_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE", - "RESOURCE_EXHAUSTED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "retry_policy_5_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "retry_policy_6_params": { - "initial_retry_delay_millis": 10000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 120000, - "initial_rpc_timeout_millis": 1200000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 1200000, - "total_timeout_millis": 1200000 - } - }, - "methods": { - "AppendRows": { - "timeout_millis": 86400000 - }, - "BatchCommitWriteStreams": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "CreateWriteStream": { - "timeout_millis": 1200000, - "retry_codes_name": "retry_policy_6_codes", - "retry_params_name": "retry_policy_6_params" - }, - "FinalizeWriteStream": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "FlushRows": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "GetWriteStream": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php deleted file mode 100644 index 60b87fa400a8..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php +++ /dev/null @@ -1,107 +0,0 @@ - [ - 'google.cloud.bigquery.storage.v1.BigQueryWrite' => [ - 'AppendRows' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'write_stream', - 'fieldAccessors' => [ - 'getWriteStream', - ], - ], - ], - ], - 'BatchCommitWriteStreams' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\BatchCommitWriteStreamsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateWriteStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\WriteStream', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'FinalizeWriteStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\FinalizeWriteStreamResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'FlushRows' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\FlushRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'write_stream', - 'fieldAccessors' => [ - 'getWriteStream', - ], - ], - ], - ], - 'GetWriteStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\WriteStream', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', - 'writeStream' => 'projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php deleted file mode 100644 index 3279f1679d8b..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php +++ /dev/null @@ -1,90 +0,0 @@ - [ - 'google.cloud.bigquery.storage.v1.BigQueryWrite' => [ - 'BatchCommitWriteStreams' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/datasets/*/tables/*}', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'write_streams', - ], - ], - 'CreateWriteStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/datasets/*/tables/*}', - 'body' => 'write_stream', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'FinalizeWriteStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/datasets/*/tables/*/streams/*}', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FlushRows' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}', - 'body' => '*', - 'placeholders' => [ - 'write_stream' => [ - 'getters' => [ - 'getWriteStream', - ], - ], - ], - ], - 'GetWriteStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/datasets/*/tables/*/streams/*}', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php deleted file mode 100644 index cd753856f172..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php +++ /dev/null @@ -1,338 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigQueryReadClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigQueryReadClient($options); - } - - /** @test */ - public function createReadSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $table = 'table110115790'; - $estimatedTotalBytesScanned = 452788190; - $estimatedTotalPhysicalFileSize = 938325754; - $estimatedRowCount = 1745583577; - $traceId = 'traceId1270300245'; - $expectedResponse = new ReadSession(); - $expectedResponse->setName($name); - $expectedResponse->setTable($table); - $expectedResponse->setEstimatedTotalBytesScanned($estimatedTotalBytesScanned); - $expectedResponse->setEstimatedTotalPhysicalFileSize($estimatedTotalPhysicalFileSize); - $expectedResponse->setEstimatedRowCount($estimatedRowCount); - $expectedResponse->setTraceId($traceId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $readSession = new ReadSession(); - $request = (new CreateReadSessionRequest()) - ->setParent($formattedParent) - ->setReadSession($readSession); - $response = $gapicClient->createReadSession($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.bigquery.storage.v1.BigQueryRead/CreateReadSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReadSession(); - $this->assertProtobufEquals($readSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReadSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->projectName('[PROJECT]'); - $readSession = new ReadSession(); - $request = (new CreateReadSessionRequest()) - ->setParent($formattedParent) - ->setReadSession($readSession); - try { - $gapicClient->createReadSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $rowCount = 1340416618; - $uncompressedByteSize = 2094376525; - $expectedResponse = new ReadRowsResponse(); - $expectedResponse->setRowCount($rowCount); - $expectedResponse->setUncompressedByteSize($uncompressedByteSize); - $transport->addResponse($expectedResponse); - $rowCount2 = 349815907; - $uncompressedByteSize2 = 1643824294; - $expectedResponse2 = new ReadRowsResponse(); - $expectedResponse2->setRowCount($rowCount2); - $expectedResponse2->setUncompressedByteSize($uncompressedByteSize2); - $transport->addResponse($expectedResponse2); - $rowCount3 = 349815906; - $uncompressedByteSize3 = 1643824295; - $expectedResponse3 = new ReadRowsResponse(); - $expectedResponse3->setRowCount($rowCount3); - $expectedResponse3->setUncompressedByteSize($uncompressedByteSize3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedReadStream = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); - $request = (new ReadRowsRequest()) - ->setReadStream($formattedReadStream); - $serverStream = $gapicClient->readRows($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/ReadRows', $actualFuncCall); - $actualValue = $actualRequestObject->getReadStream(); - $this->assertProtobufEquals($formattedReadStream, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readRowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $formattedReadStream = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); - $request = (new ReadRowsRequest()) - ->setReadStream($formattedReadStream); - $serverStream = $gapicClient->readRows($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function splitReadStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SplitReadStreamResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); - $request = (new SplitReadStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->splitReadStream($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.bigquery.storage.v1.BigQueryRead/SplitReadStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function splitReadStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); - $request = (new SplitReadStreamRequest()) - ->setName($formattedName); - try { - $gapicClient->splitReadStream($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReadSessionAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $table = 'table110115790'; - $estimatedTotalBytesScanned = 452788190; - $estimatedTotalPhysicalFileSize = 938325754; - $estimatedRowCount = 1745583577; - $traceId = 'traceId1270300245'; - $expectedResponse = new ReadSession(); - $expectedResponse->setName($name); - $expectedResponse->setTable($table); - $expectedResponse->setEstimatedTotalBytesScanned($estimatedTotalBytesScanned); - $expectedResponse->setEstimatedTotalPhysicalFileSize($estimatedTotalPhysicalFileSize); - $expectedResponse->setEstimatedRowCount($estimatedRowCount); - $expectedResponse->setTraceId($traceId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $readSession = new ReadSession(); - $request = (new CreateReadSessionRequest()) - ->setParent($formattedParent) - ->setReadSession($readSession); - $response = $gapicClient->createReadSessionAsync($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.bigquery.storage.v1.BigQueryRead/CreateReadSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReadSession(); - $this->assertProtobufEquals($readSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php deleted file mode 100644 index 3a279b3cf38b..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php +++ /dev/null @@ -1,537 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigQueryWriteClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigQueryWriteClient($options); - } - - /** @test */ - public function appendRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $writeStream = 'writeStream-1431753760'; - $expectedResponse = new AppendRowsResponse(); - $expectedResponse->setWriteStream($writeStream); - $transport->addResponse($expectedResponse); - $writeStream2 = 'writeStream2-1525825645'; - $expectedResponse2 = new AppendRowsResponse(); - $expectedResponse2->setWriteStream($writeStream2); - $transport->addResponse($expectedResponse2); - $writeStream3 = 'writeStream3-1525825644'; - $expectedResponse3 = new AppendRowsResponse(); - $expectedResponse3->setWriteStream($writeStream3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedWriteStream4 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = new AppendRowsRequest(); - $request->setWriteStream($formattedWriteStream4); - $formattedWriteStream5 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request2 = new AppendRowsRequest(); - $request2->setWriteStream($formattedWriteStream5); - $formattedWriteStream6 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request3 = new AppendRowsRequest(); - $request3->setWriteStream($formattedWriteStream6); - $bidi = $gapicClient->appendRows(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/AppendRows', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function appendRowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->appendRows(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCommitWriteStreamsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCommitWriteStreamsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStreams = []; - $request = (new BatchCommitWriteStreamsRequest()) - ->setParent($formattedParent) - ->setWriteStreams($writeStreams); - $response = $gapicClient->batchCommitWriteStreams($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.bigquery.storage.v1.BigQueryWrite/BatchCommitWriteStreams', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWriteStreams(); - $this->assertProtobufEquals($writeStreams, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCommitWriteStreamsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStreams = []; - $request = (new BatchCommitWriteStreamsRequest()) - ->setParent($formattedParent) - ->setWriteStreams($writeStreams); - try { - $gapicClient->batchCommitWriteStreams($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWriteStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $location = 'location1901043637'; - $expectedResponse = new WriteStream(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStream = new WriteStream(); - $request = (new CreateWriteStreamRequest()) - ->setParent($formattedParent) - ->setWriteStream($writeStream); - $response = $gapicClient->createWriteStream($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.bigquery.storage.v1.BigQueryWrite/CreateWriteStream', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWriteStream(); - $this->assertProtobufEquals($writeStream, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWriteStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStream = new WriteStream(); - $request = (new CreateWriteStreamRequest()) - ->setParent($formattedParent) - ->setWriteStream($writeStream); - try { - $gapicClient->createWriteStream($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function finalizeWriteStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $rowCount = 1340416618; - $expectedResponse = new FinalizeWriteStreamResponse(); - $expectedResponse->setRowCount($rowCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new FinalizeWriteStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->finalizeWriteStream($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.bigquery.storage.v1.BigQueryWrite/FinalizeWriteStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function finalizeWriteStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new FinalizeWriteStreamRequest()) - ->setName($formattedName); - try { - $gapicClient->finalizeWriteStream($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function flushRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $offset2 = 755984506; - $expectedResponse = new FlushRowsResponse(); - $expectedResponse->setOffset($offset2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedWriteStream = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new FlushRowsRequest()) - ->setWriteStream($formattedWriteStream); - $response = $gapicClient->flushRows($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.bigquery.storage.v1.BigQueryWrite/FlushRows', $actualFuncCall); - $actualValue = $actualRequestObject->getWriteStream(); - $this->assertProtobufEquals($formattedWriteStream, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function flushRowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedWriteStream = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new FlushRowsRequest()) - ->setWriteStream($formattedWriteStream); - try { - $gapicClient->flushRows($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWriteStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $expectedResponse = new WriteStream(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new GetWriteStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->getWriteStream($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.bigquery.storage.v1.BigQueryWrite/GetWriteStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWriteStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new GetWriteStreamRequest()) - ->setName($formattedName); - try { - $gapicClient->getWriteStream($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCommitWriteStreamsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCommitWriteStreamsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStreams = []; - $request = (new BatchCommitWriteStreamsRequest()) - ->setParent($formattedParent) - ->setWriteStreams($writeStreams); - $response = $gapicClient->batchCommitWriteStreamsAsync($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.bigquery.storage.v1.BigQueryWrite/BatchCommitWriteStreams', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWriteStreams(); - $this->assertProtobufEquals($writeStreams, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php deleted file mode 100644 index 6b6c3b1fe5b0264a139b3841c8799d1bad9e0545..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10449 zcmcgyOKcoT8K&(dYuDsiYbV}G2%Szy9PhX%p6q6`?RA#+BaRm*9vmkU(MY5AOncm9 zrn~9xan>wZ2_z5_D*OXn)37m>km$#ccJEkXBoQ7-FO;45O zi+r_`PF5@3FU%uUsT;m8i;*?HC>22OAsPO; z&F#8Xkzuz0{<~oLu(cIfM&0@fShyhX7c}?54 z>{@BVB^ftdWJ16}xK|o(Foee8R2rq*hW~JIYs0x)7UXJRG~CW}X@1P!uy{7;)oKX- zn?N4ZAzTS~FQNagqHE8_8hDD$Qw7_oj8gUr*;9N)!?p4i3Svey+0VoVb_i0-+Z?J~ z;FXww$MMLAN|*SU*e_x?L26v`EElwlMt*ND5C4^2iY-2#O^zqV&hxQ)gp#}yqJ%GS znhUv{d-5j10Us1391b!=8xU5=Mnq2ZsI15BRZJJ+hLe%jRI^-H2 zu)>riOVi_vSO2Pye5}u+S1Wa=Srr~@7`9P^bAqV}QSenbJMsXbFPW79Poa$PSlOyh zjnI`wVI}+~8WST^qwsa6pzuZ7qpS+u7U|S2G*+oMec)h!>VP~7Qy02V?P#33#OJTr zfwxar&2FM2iEnWRjXpH@nf3SzI=E-lnt3mDi%>3G_h{^;iA4+^@YR>BjiFn%YpOIv{|^6uSsY!wWIIC z31i~d(YT1A57v-K3=l*B#qk{j2%=i9I~B%>u+`}FI6j4r+2*@JIi>@_#<=nw37sh# z9y!$Sxll2*p*0RCg4cmGVQ_j4Wtw!&GD#dB;H(I+$Q(5!QaVf7LX*p8-E7z7`J(${ z2~9A_axjYUE~L_NNZ5dDp^~CWlS;%l&`W%P=V5GxR@MO$%1UyV@<19X3HJPV#T(F8-!3v}OaBy=*#cA~t- zYv{P+Sv3o4*0RU=ow84+kQX=?5eko1HMy3+;T3e4uTUmuN!N4g|+GyxhVSd$j$y+LPzLls1#~YO!)W=nt-yyYLIJb*@vrJd3!%FeG0Hq zd={OIMk|hMfe;%fcpAl<=peaUnNSc&(?<(S&!n5sMZHUwQtqRJ^bb6VPTbwnw^qvc z?%XY|EUn#KTUkE-DJT$LDz4mFUc0k;Tp}NqHi};)A4c#IG`_TPySTox1%jjWqkd;; zWqln!9>~^FCgzG{ow1&*Gx`=bDMT?J3p;2H@(Vb=SvI9)@qAbG4M2LIJm8d%(uaQ9 zfV2+m;O{{#X)Yr5Xr|C>!bS%lF$R0RJH!%%!=y<>^NrT^pC~!lrg`T z&?!bJy6XaNcAzd3RR6pO?`d?@aNV-YR!x;1H&7-v$V-n4-F+IV$IOLN(W=>wXO-HgRf)N9WA50k4}>6B>Lus6(}drI4yVy z=}|`<#GPuEZ$YTqG~jiMh7KE%t3@$BkUKjS-SnQ;v91{Iy!-1sfn6igXu}Z65(}hH>Iy55S#A@4toFBr5m%b_vTt`1n2;RH@evZZl)5WX8%9$3AfdJ|G?l~VW(G{bG-=0I0i@a+ruE?}EjKRl8lO-%3w%E;nTId$*(Wqf3PkHyL zuAnioE$&i%xAY4xZKUMHWf`b2{5x0St%$Gx;crhyE-L3p5B)thVF9R}%2t{;q^FvCaa{2}K2)MP+!0>Fx%f*B!+(n5=c}6 zA&{Q&E;B4#lU@+y)Y2ye)N;+JFG5YbR+ypi6as25Kxkou4}Tkcp6r(N%EhFl0LMuI zaYzdKGmJ`G;whlc^!GjfGXOPliRuN^grLx+4=;T6sV>8HfF(BO{nb?Q+R|U)tiTC? zkOKdc`uYte*O>|uSqDvT)(O=_7YBb|LMUp?;8%s;I#L7IN*LC^*i`1@#GqoPWDgvK z8WN89nS>6LROZ|Ic(%KCaXF!1A4U<&!tYD8L#Zqz2|}pbMi8BSihmABVOhdg#{C`C zFAEZ7|J=vn=dkdRd`pXrD z)izpryYL!?Iv?-FDsePLkpCXUDbY{smC*@70jzH9l0^H=P!Yj@l+f|?clW16g|0mU);5FF&gYV}BUJB0J2CC?#{eBh4UzJ_ zpp%vr%J(^`oNr;%dp1;%B_|@CVoui z=YD}YQheF1-X@PtLJbJ{e+XLLjeXaqReZ3IRvRt-m{1_cezhJ>IX|WdQSR3g!duY6 zB^sMv!}5Ld6ar7DoYF2L6umrvB+tGFP{KyaN4rrA7L@CQxfgoRDQ$@zzk*7ZWPNxw z^?OyaNl9T!9}0?=-V|lbJ4rs7$8YxM@AyfXhif-)G-N*r7ykk+Z+Jf;u%0wQ-773+7dtgOfJp~;fj~lsfd<~)p6CDnbmZ(ReS)Vhk=Grn*hQti6!m`LsSqfYs6;7xtH+;Y!E3#L zj3{gsO`}4ZCf3n3x{#*bFKi#87r3jJ!skIb_Vz9IRF3?VV^umllcSRCIoo6O7@_|G D#C!^S diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableTableAdmin.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableTableAdmin.php deleted file mode 100644 index 6b8f62546804422842a32d76f63a53106a7ef6f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15587 zcmc&*U2Ggz74F!MYu|O8kuR+id#dtmC%3cH;z++Bj|yW$9{mcXmBw zcV?KGwd+<9YI%Z(N`R2c&qIMqMIat%5du}>1;j%TAj%6e2vq_hRKXK(ed64|*_qw> z*|puk195lGJ@@>6=iGB=EFLdk`%97j zUZlULD1U@>rJ>rUQdX18tNH7yqf`_}DJ)Y~g*<0f$PreBo0)lp%5}xIlj6xb*@-?y zub?FS&uo_JS~+PuiUa>lX?9W5HAhqG+RLEZLb9sVZ57yb(pH;#+0hI=NfxZ=Wp(;& zlJO+8Q>Fp7SV#)dR*8AQG=;0WqguLBFD$8c+0snMuvURIo2{viYgF>f^jW?wVW(A- z(@e%}wnNB;q+>Nz@9xQ@r8-SZpQmyY2Djb63IT@8nOY&I>jtrcq1)MPOQ#l#u!W0t zP1T*=)?C)qdL^%JD4UvL^|o|PSkiz+HSQHkGM#Ip%-?x(k4W#ZFTvZx{o97Gg z&#D3Ow%zl}UYA`n^qSSwbxp4oR!owry*bv6*QF*~+r7l@QV6tX8>Z8PvhGqEAJ-N8 z)-JYP*8n0MrC|oIrI~r|DUIi0u2ON+?lJ(@w3{d-Z5~E%8tB3&0e@=qjm6mSHvSEY%(rhcIb|A`mSps84ZX5&&)njX%d z`yki%QLgYXIwS1LyvW1@2ihqxZ~CeZ@dgzDA45abjzz69-bXp~0|%T%gC(VWt7(q+ z(;ufl%AG+EMzYLP`YZS3htMFyJNb=1H0BjrR6jg|21r?CGUI1Zf-NXI+onpz7|lGA zVj_2jV~Vr9L96mQEWz_A!Ni4HST(53iOf_u2PW%PpuKVrK7&pgCfFP5C$HbG_ls1@ z0b&BM^bmNb22pH}AAnyHQ6jnkw#t{}54uVc5#>5MxxzQ)>Qty-Lrmn|oVcmC&E;47 z5MH!Y=zi`-@LWI#XiRZGoDTN`l_pOk?h|N~_c2A=tZR-vK9KAOJu~5}J2gt(AWJ94 z&;j}fPN4o<>NX9t5&4%AI^|h%*)ke8bj7qc4CiCcrpxFM4{)1r$kVFJY!zb4-vks` zvJ7+0*jiKcnkwX;^X5~2hGM`Jk|Xn#+8&RiQOnpWf|ZJpB&?ssx#xuFCy%f*EXS#RB;*&I;7>cA!WxHZLZqgsS}C^)qO0UrAzVEYgkW0=At*+cQzSJnl(pL<;aN1K>J>&!s#B04F17p| z!b>!aX@Kn65%MY;dtPUWu}>VoB%xzImj4$!z1xo_uNxJuy1i)Bn+^T4($JvQa}#;@ zq5C2_*dUCxGHdC<#U!!vB6lkl`J9XUWrWiD@V~l1t6RP6CfyV zORd3>i1wwHls|y_!Km_Q(P?oOSOoY2_*M1t_Buhiy@&b&a)&0J%sE`%kB*dE8y6YA zQsc_+^r7R68*2HMXYrne!l!~Z^mMMDL6fAltteKd2(Bgn*D#=nZCRQFpw0jzqN%vS z7q7wEHM;cEbR~G|1$2Uz!IELv4r5+7%1T}ECZ#5_VOfGAnkS11^J`?O;GG{t1K>|p zo?s zni3fvcobP=YoHTJi0+6SM%cN7wuTR(e#fcPgh^!X7b)r%9dX{rM^U1}M^rF6piTO) z{3(Q?3JX<5{LT9sre52ySI`*g90XGrBQLcb#(Fb=uWca_9o)9m(6P47xtkwH!@_`~ zd69*&ga=v}D})d4U)IqvRyhUf{uuAqQ0@dr8hLKHyMhiImR8eX)(F`}&$kq(6PZ-J z9=;%c6pe5O-8L0zl&He_!`|q&ulTcsPKTT(T!q#`6`BiID1@mn{#{V*d(gHqDcCt# zY`wSez7GwHGrDio@VIZ(kjNy%O~b@tz2zGKU|u0zqx)wIV`xOo7D!jmkO})+&e$f> z*K#tH@9ceBE$3@)+v~SqOHj6hE-9mVriRIl=#CTne7bA3OY(q))kIp z?0Ix=iO#tM!p8bA9AEzq2j)e?-1b}a<4LkSI>^(2iOuCp%X#cxPDp*En$y`?-ayQ*yk?PufIxYf+VkBVHaWc#Y0fdS~DivtkL5pWP8V; zi9NW&2U#R-Ml%t{^Gi*J-E=TTVvKT(A|Pk}G2L@c^DEBylUl+B)kg$>9cR+YQ963w7pRc8rD&Mah-l|i!aEh~dK z3fJ9*thCW2>mY*tu@Av>1P#FJ6*YePB-5YF&n_UG=l7ZPgpeceS>PW@D8WFA{)lJe zu*`e9n1~w*%hz{u$JnjhtV6m^0B`okYk&I3*Zb1)40&hd6-KcD=h)AyWyem>q&0pk z2Y=sA)0K8sn!#TogA_WZqGEV2F7U1o5)&td&YpYElw0rQZ%B7?)93)*5yzc$c5@#~-v!<1NsJY+(l z`-E5ANfLecL-t#EhIzd!x$ti!bkH}-#}ShYAE6K`#>&+@xl_W*!IuW!@R*Y?P}6oL ze74E2HAt3y7jEu@x;PxsxCGI6sn$CHHYqgfuM9Y{Gu_FZ<&dNJJLTE7{|4}-ake5~ ziU*%owxnBZNb6;1+Z%5DM>ysOG-CKM5m%kr9zZTE6k*uFRUD+C)ObPaDZD2oG2D?K z>FDop#JIeJSm@Jr8zq0z8?r)yZbG)*MFiu%4}lxh=tKo>5WP?%CLezq9JoOoMf0|k zn{0&^J==9aVli`#hH4vKSKt_6l+Mt72Zm=s%~+I`g6M^n!l2ae+8Gv`yLIg!KG z!6>1F=!MX+rM9?}!$jCwxS45PUs5nxlArDYS?T(=dsTw6@H)qc_jL|@E*v_%bV7qL zv*)Rdm*gjVkdfR;iq}erZ2zJsJ@(49=K_yjE#iyea>iUoPGonpl!M*#UZl7pFZQ5b zjlccft_o3gM?#0&FVFD#a5>v)g*zf(vU3Sn31aL%8e{GaU3r_`qEa6|BhUAsWV!9O zl_>Wiv?RXkmZ+A*M<~>afxs^V1U`U<#8Mo5xwDg-VrsJ6zFC{U2t|%Yo=ZEbbZ>2o z;6#-D0W^eAkz83KI$RH#P_&ENGI`k>f>}Hl>m7b2N{)9zQgXb*?}1-PVHdL6QGW3e z3USln5!y!2W9_QHR}j)ioD~iuv7O~_ z=i)adGz^if z$V&2a=0)O+R-q0w^`6AT>TZ$GmGe1srgIw5yVf`0B!?xZ*@2fl|+lkiD7 z6Q6|cIL>14;FDtWADBe7ZnmN(Q7x)2CI1>g%Lx}+0`AXtax)#k;=31{^<35YI*FdW zlr6&@CDHfa;4Od=_lqFx)=T)@BDHxw<$Wj=JtiQD)3C3C4iBezgS8>cd8k#vH53a;0d^cp`J5K z^Zef*_MKX$-{qzjiP=(Oixj;zO5M!d5d?(-r6{yM;N_oc!Y8~R_Q{M(HcN@JS-~fp trHr!Ko0-xeojPB5*!_5KmVFcJ`GgkUV}(zA13sUnl=Jfyo diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Common.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Common.php deleted file mode 100644 index 3fe1a1d11e7fa4dadd2491da241faffff1178828..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1093 zcma)5-EPw`7^SWFk#|#iRiO!)F|-biR4O;frJ%OyN-tO|S|))aRZik&mQvetoJj-q z33wA8g$rH-iKpO;)1(svL2hh0=bZ05-_Og}>O!H%c+3RT)UXiySJ+%Ith6*TkTLet z)rx5x$hG1z(+jrw!D#6pmFy zNYFJ)6b%?2&jxRqp&>QY8(XqB*pj_|M)uA-U4(*|CJ7!|5%d{h_*Cl0Jiv*e2986X zEV<_g5w@8(wSvNfC6|EVVD*) z_FR?(nkysq44{NW%#@|eURuZ7u$dfR;Z~j_AvcojVWU%aJvzpknN*9e%{vp=lsE4W z#VWH~a44yvYemS;)=tH`diIKMJ@mt{O!*XA+A4!&A&=0H8hY|yy=*jdm{YXeu`PEl zI|pAX=>Ak?69u(~JR{ALq|rom7y^4=!q0#S)2!f1>vqFI2n=YmG+?D!g}1%V17|A_ z9NPt_^w~H;_m~KCbnRd0r#-YchmO&REv^)6?4#yb|ima3#vG5 zhOL+KyW8_?^y{&mXRA5`S!CLwLG+fkx)h&5&%;o(?g!XjI15Z7&ueRlZc=|#QXqSe= zh~-_(#O;U|#?lu2C_sN}$s8m(e_%08)*?^V;&C~DFMv>Oz2pS!_=%f;ybv9W11SiG z-4BNGY{$eYdEq+!0fm38Kq^dTvI;A#9&#}uww)&TV0EawwxLcH{x;6u%84JOIQb1E zSsu|`0^hBdw~LFGPz$Lol#5Fk z?sJ2h={ZyKE68XL#Th7!fZQ!~pDE`=334CST&!q!q*GV1zjJdbv`g`C z^&8*EV)>_#nfH=`#5Z&r(6E_Yc%(=@xpUh;UwIFZ0}9GrW`iA?OLU=+o)C1Y#pH8X;lv^ zy+*5vwznZut-Y@8x7r7_W-l8TyQfkc9*5cGCzl^D%qzEu`BDm_MEYCE#UH8Wxuti( z(=5_Ve5VJxHj!3+ zn=)TX(tvf%U%#SR=13n0l~MZdhyikio7HcSI@}r3kvcIvB@8F8^dz6+|iW9I)JgIq9TE`|INWFLrnmbi++6N_h2 zru@sr9_N7kTx71|qzRkzXr5mOJc}~rkC%cAYKP#r4d78&Vpqy&Kq(QI6wy);M-+AS9hc1=ODVF{p;I50f2EFJh=U44-m-5i%5a(SWcnwmvgT18gO}RL&m!B>L z*A9&2crI3tksc82Sj?g73>DqA3}4zaoPl321&BL0H*bX2h^oVf?7W~1EX(!Ia20Gd zhKgkx(;RRQFPHLAMJSmeMJ_ss(?XbfEdRF{+*=p~mH=Ut^<6WG8FVAZis6m>LW zZTOU@MW+0_rRK8GRk358NC9H~Mt%)4b1!6oROl|>ggaNoln{1^;+w9b4})f@0D09g zaI&7GnlA28n8vE1oM70g%ac5n@4?2U7?789>A^(le@&14&oRg^CZ3$Yd+fA1!On4@ z8?3QWtP?z*@_Db9yGxO|7{7=I76vZ+*ewRlTg$>L*u3H!c?=IKt%LR<_KtF6pQ{{p zkF|>;w+88YtJ_oB(wlBJCg~WO!fNzozx4$w zC3djUn*%(3A0A}mWCPZsm-WV8J)01%Q^~-y(6zF8CNo4@Ryoy37*Ra&hk}MoCV68T z3Y~4?seCGDARU!_;rj$qV|hJxE#O@cRXi&5>w@|7PJins=@AsJT>u9o&j3(j9M3;u zu#?deM~qJ(Ma`ja!dks0Og13x`(bAdrr~Mq`EM~4_JT=n8h66GykF$4x669#u<2$; zpE&C*65^jvr9Z((*RJf0sm`*I32J+8Pb<9*`No&{tZmR)TIgJ;56j9`ZL@~q>MGhp2I7s>y9`Jcy*A$WN6@*4-i_*LB zaaO{pc2IYaJA6_ce4Ledd(3((Ml!hSow-XO%pJU>y5a(e MkMyr;W-tTz4-)fWng9R* diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Table.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Table.php deleted file mode 100644 index 8bd9c50772afd8e16b7cb9d080951b572ce67276..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6294 zcmbtYOLH386*eGb=^#s}ZI@;2*ge?JXgnUs;PH$LkK<{eB{N1q0C~n!Ou8DlppH>@ zyB``eE_PXGovQ3psZ@SMR#{}9shZtXW#?6PsbrONAI(DoEIZoJx_!@gZ=dfwk9$9V zWFOdYL*6AOadeM#(Dm(#7W6=p(2+n4OuM|8}Fg1 zYxz!_WaXY^_4*{;GJ2lg!Uw%`Xqf4vOq%_hVt@dqen?zfZxea9n%g6u-qAh1xyx*u zIbqvWsBQCU<^e#vue+|?ppftiWc;)JR^MpLuBUtWbJK7&!!$fY?;GFa{vXO+z3&pV zJUO@Pn{CgqOqm)~%r@EnK<1cq?oHdm?|mo-yQxwa;O94srbir8?>7s?Z99hTSxyzF zX0tuwjT}cuwm%TdQaGb4Z}UB7vnMwBQ1%?3Os+1=4)J`)e8Bci0fwWe<_upcw$a=% zNWYUK2l|m=Ioa&^tHvPnOlw5&c515=$VQkS;)tW*#XDHaf^qfFwm zu-9!P?Fb%td?Xe?Q)i1=*8~8IDO6~>BRneJUqAld3*06qToMx;yPc*Q^#yYB43y5)@XdbS=6_P{S>zNNz-2CLHrG#yrf!Adi%L=W0ZEStuP|Q zGB@WVC%94t-21_(4F_TrP0_*L*?_$7f)G@@x9Y=7-nE>hpohb&B%5y8K zG~%kJ=L~X@pOlDHf(=Zg{-LRL^+Tg?AYz0e-hCq?GushX3{omXtmo*a-`5?(8*D8x zK0bL9(kNpqNuTsBY&yh7XqKk95QO$0zG;z3APk2Q3KIr**$!+Fv+WFQ_MsvysK~bG zgR3J08X62I`MVIrkFOw|hmCqeX{Z|3XzfY4@>My0MvB8)v0Q8vl~VDWVtF?nk}kpd zYDp=V)q=LC6w3{@td#R=JS<&?i~HqSuOiYaL~E*2cotuhF5t@aQL9uN#XSxhP5d?l z7iT(Iy8jL_N6^7HxZPCyMPJZ8EJvw~K-1@EE1Rb+Uts_oX4@_tFF z6&ugA{c^pk=8HQ;wSasBEbkRdrD8oEO1^-lrv~|sQuef{esyf-Ian<#d#Y9`m!6?4 zHXv5dKUVh?jm||mFruraVqR$!D`h?!p(0bu`PwriKNyTkE3mY)Un<3yvf68<*@R?} zDtY1KH3Ms&o5E%?&6Dq^n3;crVeY11iKk)OFfsFDbB1HVF=5&<7mAm5{0zKDMr1gE%gVGqSxVB|sXDX|_YU#!FF$))M~; z0gM+%de$84yYVCr@M~CS#b%)KZw!jq&U^*V{l3)HepwYt^g%i~Ivrr@wDvze^~zJg zEEawRYglz`%XA52^Jj3mrq-*Ka$RM5T&!qJS~;a&%%heAfkv`_3B6YS6oL;IDsiaVPXn1O8Qu`#`$M}Y4U8ZtvP<5H!`t| zJm2HH?HbOLG5{o~$$x}lS(qmveyG3HO#e_jLhWMnMfDrnj$%aI zfwT0T-U|}!{FIHeRaj%)w=3#B-^xexx59UjV&^hpgfO2$)HiV(tSgFT7NlEYzfWgl z{eOhjk#_$AN=ieNI+BOuDLk3D4^f8o)|Rc9j;8&lE$;DdMuzZ-ghgN-IA&m z)E#BN)X>KBv1Flre!t$R?5Q`05OTS98mF^r5|F0?rBg`FUass0T&_l9#rD2O~xx&q)iYpjKf#ivsfDcyGn} z$FM@o4mWut<$QOSaGkO4DEUHn*+3AK%=JY{ko#*=4l~Xr^yu}r=Ms8p!2QW9ON{Mg z!KH!N3IAa^;XYizVAVW}p1sVD?g;O!vF$8iA&EtRtM?*o@^jF1XFMs|(D+0XPJRI} zv4JaaDW~M0>{qoJ2?;R}x?E6d1B;}0{}#I+LG|;8 zVe+ro5prC5GQ_A|=5P2(hs$MJmi!K8ffu>aq%2P*{|Fu)r}HUodPO`fh_%}V*gSc0 zbOWwqo7bq+RIOgwujSQQRNz5}^Ar!|{vC#^c(Mp`Y(T^)dFOzgIjZzpw;KB9KC4;5 zYw)v{d6Lf2IY0VqBE)sn$FuXyUF`}-<$Vl-n_ME(Mbdk$TkaD zOa<$Z_BjzJj6`uLLND}5JMDH^OuVokai7H&AsYu||KNyhZtNa?fM^n?vBzxE3&Wnz z7TdfhXd7Q>r_Y1Mv&N!0k62;}G zPm_ckNe%cO2>wKA+vgrh1Qqz0=ShnPTyX01?=b##(xraFkbK*=n+BfXVL&8s5O}Qq zh-gh|J0FF(-gPpF=1`^pm+$Tdg2e&#-3^v_F^@zTAEK#k_m~(aPJU8DR41-bN?q-&4{~OocSGxozOEL#hV*a zEuq=z3?tscde(O^+QzMxo7@TfU?@N#xtm}zzaLLXS2QjI7dNo)@BBo zEvO9MjnAPJ(^r|!r?=9vzM`)%urieJ#eq>&=Fdf#)JFvM-wf8uaiYOdw0{*Yg}V=x zRCHHbqnMX(CuhAxT*h0h6|frn07_4_kD5OGD|b-Lx{3J?Ol1yibYMC>-8J^%f zcHJwPn1l)0Rm>_(Wvy-ay1XP4IBXgwn#vYn{#a1k3(uml3X@%VH6^%%OW5^4&RHdH zF2pQ#ote8(RxgGDpj29NW>9CLYAnEnx=r++n7vuoT!*qc;KmZnFrW2VkaZTF{5<>= zN_fhRPoQ$jvaT`~Xfy!MsGnwSbi7#qE5G8TRn^&`%Tj z_fqLSmvZO^W9-w{HGQXyALAZHFjsFb{Mm#g)p2iel=)1Czk)%^^E8cpGI` zTNpcdNKSdsasDj8`#4Hpn->S<7?h~d^RV#Eisy%EXJC!sVlRAi!ln_&AzO`KQF}Fe z{#u;XGqv?xDPWUOQ@N!kYwNi2$H2gKm4!PRzO(5Y$M1iOb6Ul=m62@^bZlD*+4gax eJ*h_fCl80Cgoogle.bigtable.admin.v2.AppProfile - */ -class AppProfile extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the app profile. Values are of the form - * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Strongly validated etag for optimistic concurrency control. Preserve the - * value returned from `GetAppProfile` when calling `UpdateAppProfile` to - * fail the request if there has been a modification in the mean time. The - * `update_mask` of the request need not include `etag` for this protection - * to apply. - * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and - * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more - * details. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * Long form description of the use case for this AppProfile. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - protected $routing_policy; - protected $isolation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the app profile. Values are of the form - * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * @type string $etag - * Strongly validated etag for optimistic concurrency control. Preserve the - * value returned from `GetAppProfile` when calling `UpdateAppProfile` to - * fail the request if there has been a modification in the mean time. The - * `update_mask` of the request need not include `etag` for this protection - * to apply. - * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and - * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more - * details. - * @type string $description - * Long form description of the use case for this AppProfile. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny $multi_cluster_routing_use_any - * Use a multi-cluster routing policy. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting $single_cluster_routing - * Use a single-cluster routing policy. - * @type int $priority - * This field has been deprecated in favor of `standard_isolation.priority`. - * If you set this field, `standard_isolation.priority` will be set instead. - * The priority of requests sent using this app profile. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation $standard_isolation - * The standard options used for isolating this app profile's traffic from - * other use cases. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly $data_boost_isolation_read_only - * Specifies that this app profile is intended for read-only usage via the - * Data Boost feature. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the app profile. Values are of the form - * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the app profile. Values are of the form - * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * 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; - } - - /** - * Strongly validated etag for optimistic concurrency control. Preserve the - * value returned from `GetAppProfile` when calling `UpdateAppProfile` to - * fail the request if there has been a modification in the mean time. The - * `update_mask` of the request need not include `etag` for this protection - * to apply. - * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and - * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more - * details. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Strongly validated etag for optimistic concurrency control. Preserve the - * value returned from `GetAppProfile` when calling `UpdateAppProfile` to - * fail the request if there has been a modification in the mean time. The - * `update_mask` of the request need not include `etag` for this protection - * to apply. - * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and - * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more - * details. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Long form description of the use case for this AppProfile. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Long form description of the use case for this AppProfile. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Use a multi-cluster routing policy. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny|null - */ - public function getMultiClusterRoutingUseAny() - { - return $this->readOneof(5); - } - - public function hasMultiClusterRoutingUseAny() - { - return $this->hasOneof(5); - } - - /** - * Use a multi-cluster routing policy. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny $var - * @return $this - */ - public function setMultiClusterRoutingUseAny($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Use a single-cluster routing policy. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting|null - */ - public function getSingleClusterRouting() - { - return $this->readOneof(6); - } - - public function hasSingleClusterRouting() - { - return $this->hasOneof(6); - } - - /** - * Use a single-cluster routing policy. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting $var - * @return $this - */ - public function setSingleClusterRouting($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * This field has been deprecated in favor of `standard_isolation.priority`. - * If you set this field, `standard_isolation.priority` will be set instead. - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; - * @return int - * @deprecated - */ - public function getPriority() - { - @trigger_error('priority is deprecated.', E_USER_DEPRECATED); - return $this->readOneof(7); - } - - public function hasPriority() - { - @trigger_error('priority is deprecated.', E_USER_DEPRECATED); - return $this->hasOneof(7); - } - - /** - * This field has been deprecated in favor of `standard_isolation.priority`. - * If you set this field, `standard_isolation.priority` will be set instead. - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setPriority($var) - { - @trigger_error('priority is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\Priority::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The standard options used for isolating this app profile's traffic from - * other use cases. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.StandardIsolation standard_isolation = 11; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation|null - */ - public function getStandardIsolation() - { - return $this->readOneof(11); - } - - public function hasStandardIsolation() - { - return $this->hasOneof(11); - } - - /** - * The standard options used for isolating this app profile's traffic from - * other use cases. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.StandardIsolation standard_isolation = 11; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation $var - * @return $this - */ - public function setStandardIsolation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Specifies that this app profile is intended for read-only usage via the - * Data Boost feature. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly data_boost_isolation_read_only = 10; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly|null - */ - public function getDataBoostIsolationReadOnly() - { - return $this->readOneof(10); - } - - public function hasDataBoostIsolationReadOnly() - { - return $this->hasOneof(10); - } - - /** - * Specifies that this app profile is intended for read-only usage via the - * Data Boost feature. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly data_boost_isolation_read_only = 10; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly $var - * @return $this - */ - public function setDataBoostIsolationReadOnly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * @return string - */ - public function getRoutingPolicy() - { - return $this->whichOneof("routing_policy"); - } - - /** - * @return string - */ - public function getIsolation() - { - return $this->whichOneof("isolation"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php deleted file mode 100644 index 7a8e71fd8019..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php +++ /dev/null @@ -1,90 +0,0 @@ -google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly - */ -class DataBoostIsolationReadOnly extends \Google\Protobuf\Internal\Message -{ - /** - * The Compute Billing Owner for this Data Boost App Profile. - * - * Generated from protobuf field optional .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner compute_billing_owner = 1; - */ - protected $compute_billing_owner = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $compute_billing_owner - * The Compute Billing Owner for this Data Boost App Profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The Compute Billing Owner for this Data Boost App Profile. - * - * Generated from protobuf field optional .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner compute_billing_owner = 1; - * @return int - */ - public function getComputeBillingOwner() - { - return isset($this->compute_billing_owner) ? $this->compute_billing_owner : 0; - } - - public function hasComputeBillingOwner() - { - return isset($this->compute_billing_owner); - } - - public function clearComputeBillingOwner() - { - unset($this->compute_billing_owner); - } - - /** - * The Compute Billing Owner for this Data Boost App Profile. - * - * Generated from protobuf field optional .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner compute_billing_owner = 1; - * @param int $var - * @return $this - */ - public function setComputeBillingOwner($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly\ComputeBillingOwner::class); - $this->compute_billing_owner = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataBoostIsolationReadOnly::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_DataBoostIsolationReadOnly::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php deleted file mode 100644 index 7da3c3942452..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php +++ /dev/null @@ -1,60 +0,0 @@ -google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner - */ -class ComputeBillingOwner -{ - /** - * Unspecified value. - * - * Generated from protobuf enum COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; - */ - const COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; - /** - * The host Cloud Project containing the targeted Bigtable Instance / - * Table pays for compute. - * - * Generated from protobuf enum HOST_PAYS = 1; - */ - const HOST_PAYS = 1; - - private static $valueToName = [ - self::COMPUTE_BILLING_OWNER_UNSPECIFIED => 'COMPUTE_BILLING_OWNER_UNSPECIFIED', - self::HOST_PAYS => 'HOST_PAYS', - ]; - - 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(ComputeBillingOwner::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_DataBoostIsolationReadOnly_ComputeBillingOwner::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php deleted file mode 100644 index 455a007dbf2b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php +++ /dev/null @@ -1,123 +0,0 @@ -google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny - */ -class MultiClusterRoutingUseAny extends \Google\Protobuf\Internal\Message -{ - /** - * The set of clusters to route to. The order is ignored; clusters will be - * tried in order of distance. If left empty, all clusters are eligible. - * - * Generated from protobuf field repeated string cluster_ids = 1; - */ - private $cluster_ids; - protected $affinity; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $cluster_ids - * The set of clusters to route to. The order is ignored; clusters will be - * tried in order of distance. If left empty, all clusters are eligible. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny\RowAffinity $row_affinity - * Row affinity sticky routing based on the row key of the request. - * Requests that span multiple rows are routed non-deterministically. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The set of clusters to route to. The order is ignored; clusters will be - * tried in order of distance. If left empty, all clusters are eligible. - * - * Generated from protobuf field repeated string cluster_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClusterIds() - { - return $this->cluster_ids; - } - - /** - * The set of clusters to route to. The order is ignored; clusters will be - * tried in order of distance. If left empty, all clusters are eligible. - * - * Generated from protobuf field repeated string cluster_ids = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClusterIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cluster_ids = $arr; - - return $this; - } - - /** - * Row affinity sticky routing based on the row key of the request. - * Requests that span multiple rows are routed non-deterministically. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny\RowAffinity|null - */ - public function getRowAffinity() - { - return $this->readOneof(3); - } - - public function hasRowAffinity() - { - return $this->hasOneof(3); - } - - /** - * Row affinity sticky routing based on the row key of the request. - * Requests that span multiple rows are routed non-deterministically. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny\RowAffinity $var - * @return $this - */ - public function setRowAffinity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny\RowAffinity::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getAffinity() - { - return $this->whichOneof("affinity"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MultiClusterRoutingUseAny::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_MultiClusterRoutingUseAny::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny/RowAffinity.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny/RowAffinity.php deleted file mode 100644 index f553b0a42fad..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny/RowAffinity.php +++ /dev/null @@ -1,44 +0,0 @@ -google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity - */ -class RowAffinity extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RowAffinity::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_MultiClusterRoutingUseAny_RowAffinity::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php deleted file mode 100644 index df376e17c64e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php +++ /dev/null @@ -1,67 +0,0 @@ -google.bigtable.admin.v2.AppProfile.Priority - */ -class Priority -{ - /** - * Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation. - * - * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; - */ - const PRIORITY_UNSPECIFIED = 0; - /** - * Generated from protobuf enum PRIORITY_LOW = 1; - */ - const PRIORITY_LOW = 1; - /** - * Generated from protobuf enum PRIORITY_MEDIUM = 2; - */ - const PRIORITY_MEDIUM = 2; - /** - * Generated from protobuf enum PRIORITY_HIGH = 3; - */ - const PRIORITY_HIGH = 3; - - private static $valueToName = [ - self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', - self::PRIORITY_LOW => 'PRIORITY_LOW', - self::PRIORITY_MEDIUM => 'PRIORITY_MEDIUM', - self::PRIORITY_HIGH => 'PRIORITY_HIGH', - ]; - - 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(Priority::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_Priority::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php deleted file mode 100644 index 5bd27b02ed0b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php +++ /dev/null @@ -1,114 +0,0 @@ -google.bigtable.admin.v2.AppProfile.SingleClusterRouting - */ -class SingleClusterRouting extends \Google\Protobuf\Internal\Message -{ - /** - * The cluster to which read/write requests should be routed. - * - * Generated from protobuf field string cluster_id = 1; - */ - protected $cluster_id = ''; - /** - * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are - * allowed by this app profile. It is unsafe to send these requests to - * the same table/row/column in multiple clusters. - * - * Generated from protobuf field bool allow_transactional_writes = 2; - */ - protected $allow_transactional_writes = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_id - * The cluster to which read/write requests should be routed. - * @type bool $allow_transactional_writes - * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are - * allowed by this app profile. It is unsafe to send these requests to - * the same table/row/column in multiple clusters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The cluster to which read/write requests should be routed. - * - * Generated from protobuf field string cluster_id = 1; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * The cluster to which read/write requests should be routed. - * - * Generated from protobuf field string cluster_id = 1; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - - /** - * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are - * allowed by this app profile. It is unsafe to send these requests to - * the same table/row/column in multiple clusters. - * - * Generated from protobuf field bool allow_transactional_writes = 2; - * @return bool - */ - public function getAllowTransactionalWrites() - { - return $this->allow_transactional_writes; - } - - /** - * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are - * allowed by this app profile. It is unsafe to send these requests to - * the same table/row/column in multiple clusters. - * - * Generated from protobuf field bool allow_transactional_writes = 2; - * @param bool $var - * @return $this - */ - public function setAllowTransactionalWrites($var) - { - GPBUtil::checkBool($var); - $this->allow_transactional_writes = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SingleClusterRouting::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_SingleClusterRouting::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php deleted file mode 100644 index 3638ebc75214..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php +++ /dev/null @@ -1,71 +0,0 @@ -google.bigtable.admin.v2.AppProfile.StandardIsolation - */ -class StandardIsolation extends \Google\Protobuf\Internal\Message -{ - /** - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 1; - */ - protected $priority = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $priority - * The priority of requests sent using this app profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 1; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 1; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\Priority::class); - $this->priority = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StandardIsolation::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_StandardIsolation::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView.php deleted file mode 100644 index a5533981fbc1..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView.php +++ /dev/null @@ -1,203 +0,0 @@ -google.bigtable.admin.v2.AuthorizedView - */ -class AuthorizedView extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of this AuthorizedView. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * The etag for this AuthorizedView. - * If this is provided on update, it must match the server's etag. The server - * returns ABORTED error on a mismatched etag. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - /** - * Set to true to make the AuthorizedView protected against deletion. - * The parent Table and containing Instance cannot be deleted if an - * AuthorizedView has this bit set. - * - * Generated from protobuf field bool deletion_protection = 4; - */ - protected $deletion_protection = false; - protected $authorized_view; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of this AuthorizedView. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` - * @type \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView $subset_view - * An AuthorizedView permitting access to an explicit subset of a Table. - * @type string $etag - * The etag for this AuthorizedView. - * If this is provided on update, it must match the server's etag. The server - * returns ABORTED error on a mismatched etag. - * @type bool $deletion_protection - * Set to true to make the AuthorizedView protected against deletion. - * The parent Table and containing Instance cannot be deleted if an - * AuthorizedView has this bit set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of this AuthorizedView. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of this AuthorizedView. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * An AuthorizedView permitting access to an explicit subset of a Table. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.SubsetView subset_view = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView|null - */ - public function getSubsetView() - { - return $this->readOneof(2); - } - - public function hasSubsetView() - { - return $this->hasOneof(2); - } - - /** - * An AuthorizedView permitting access to an explicit subset of a Table. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.SubsetView subset_view = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView $var - * @return $this - */ - public function setSubsetView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The etag for this AuthorizedView. - * If this is provided on update, it must match the server's etag. The server - * returns ABORTED error on a mismatched etag. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The etag for this AuthorizedView. - * If this is provided on update, it must match the server's etag. The server - * returns ABORTED error on a mismatched etag. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Set to true to make the AuthorizedView protected against deletion. - * The parent Table and containing Instance cannot be deleted if an - * AuthorizedView has this bit set. - * - * Generated from protobuf field bool deletion_protection = 4; - * @return bool - */ - public function getDeletionProtection() - { - return $this->deletion_protection; - } - - /** - * Set to true to make the AuthorizedView protected against deletion. - * The parent Table and containing Instance cannot be deleted if an - * AuthorizedView has this bit set. - * - * Generated from protobuf field bool deletion_protection = 4; - * @param bool $var - * @return $this - */ - public function setDeletionProtection($var) - { - GPBUtil::checkBool($var); - $this->deletion_protection = $var; - - return $this; - } - - /** - * @return string - */ - public function getAuthorizedView() - { - return $this->whichOneof("authorized_view"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/FamilySubsets.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/FamilySubsets.php deleted file mode 100644 index 3a6359fca96d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/FamilySubsets.php +++ /dev/null @@ -1,120 +0,0 @@ -google.bigtable.admin.v2.AuthorizedView.FamilySubsets - */ -class FamilySubsets extends \Google\Protobuf\Internal\Message -{ - /** - * Individual exact column qualifiers to be included in the AuthorizedView. - * - * Generated from protobuf field repeated bytes qualifiers = 1; - */ - private $qualifiers; - /** - * Prefixes for qualifiers to be included in the AuthorizedView. Every - * qualifier starting with one of these prefixes is included in the - * AuthorizedView. To provide access to all qualifiers, include the empty - * string as a prefix - * (""). - * - * Generated from protobuf field repeated bytes qualifier_prefixes = 2; - */ - private $qualifier_prefixes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $qualifiers - * Individual exact column qualifiers to be included in the AuthorizedView. - * @type array|\Google\Protobuf\Internal\RepeatedField $qualifier_prefixes - * Prefixes for qualifiers to be included in the AuthorizedView. Every - * qualifier starting with one of these prefixes is included in the - * AuthorizedView. To provide access to all qualifiers, include the empty - * string as a prefix - * (""). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Individual exact column qualifiers to be included in the AuthorizedView. - * - * Generated from protobuf field repeated bytes qualifiers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQualifiers() - { - return $this->qualifiers; - } - - /** - * Individual exact column qualifiers to be included in the AuthorizedView. - * - * Generated from protobuf field repeated bytes qualifiers = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQualifiers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->qualifiers = $arr; - - return $this; - } - - /** - * Prefixes for qualifiers to be included in the AuthorizedView. Every - * qualifier starting with one of these prefixes is included in the - * AuthorizedView. To provide access to all qualifiers, include the empty - * string as a prefix - * (""). - * - * Generated from protobuf field repeated bytes qualifier_prefixes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQualifierPrefixes() - { - return $this->qualifier_prefixes; - } - - /** - * Prefixes for qualifiers to be included in the AuthorizedView. Every - * qualifier starting with one of these prefixes is included in the - * AuthorizedView. To provide access to all qualifiers, include the empty - * string as a prefix - * (""). - * - * Generated from protobuf field repeated bytes qualifier_prefixes = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQualifierPrefixes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->qualifier_prefixes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FamilySubsets::class, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView_FamilySubsets::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/ResponseView.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/ResponseView.php deleted file mode 100644 index de81a7c072d4..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/ResponseView.php +++ /dev/null @@ -1,72 +0,0 @@ -google.bigtable.admin.v2.AuthorizedView.ResponseView - */ -class ResponseView -{ - /** - * Uses the default view for each method as documented in the request. - * - * Generated from protobuf enum RESPONSE_VIEW_UNSPECIFIED = 0; - */ - const RESPONSE_VIEW_UNSPECIFIED = 0; - /** - * Only populates `name`. - * - * Generated from protobuf enum NAME_ONLY = 1; - */ - const NAME_ONLY = 1; - /** - * Only populates the AuthorizedView's basic metadata. This includes: - * name, deletion_protection, etag. - * - * Generated from protobuf enum BASIC = 2; - */ - const BASIC = 2; - /** - * Populates every fields. - * - * Generated from protobuf enum FULL = 3; - */ - const FULL = 3; - - private static $valueToName = [ - self::RESPONSE_VIEW_UNSPECIFIED => 'RESPONSE_VIEW_UNSPECIFIED', - self::NAME_ONLY => 'NAME_ONLY', - 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(ResponseView::class, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView_ResponseView::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/SubsetView.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/SubsetView.php deleted file mode 100644 index e20712a5b644..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AuthorizedView/SubsetView.php +++ /dev/null @@ -1,112 +0,0 @@ -google.bigtable.admin.v2.AuthorizedView.SubsetView - */ -class SubsetView extends \Google\Protobuf\Internal\Message -{ - /** - * Row prefixes to be included in the AuthorizedView. - * To provide access to all rows, include the empty string as a prefix (""). - * - * Generated from protobuf field repeated bytes row_prefixes = 1; - */ - private $row_prefixes; - /** - * Map from column family name to the columns in this family to be included - * in the AuthorizedView. - * - * Generated from protobuf field map family_subsets = 2; - */ - private $family_subsets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $row_prefixes - * Row prefixes to be included in the AuthorizedView. - * To provide access to all rows, include the empty string as a prefix (""). - * @type array|\Google\Protobuf\Internal\MapField $family_subsets - * Map from column family name to the columns in this family to be included - * in the AuthorizedView. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Row prefixes to be included in the AuthorizedView. - * To provide access to all rows, include the empty string as a prefix (""). - * - * Generated from protobuf field repeated bytes row_prefixes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRowPrefixes() - { - return $this->row_prefixes; - } - - /** - * Row prefixes to be included in the AuthorizedView. - * To provide access to all rows, include the empty string as a prefix (""). - * - * Generated from protobuf field repeated bytes row_prefixes = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRowPrefixes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->row_prefixes = $arr; - - return $this; - } - - /** - * Map from column family name to the columns in this family to be included - * in the AuthorizedView. - * - * Generated from protobuf field map family_subsets = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFamilySubsets() - { - return $this->family_subsets; - } - - /** - * Map from column family name to the columns in this family to be included - * in the AuthorizedView. - * - * Generated from protobuf field map family_subsets = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFamilySubsets($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\FamilySubsets::class); - $this->family_subsets = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SubsetView::class, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView_SubsetView::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php deleted file mode 100644 index 87c9350253d9..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php +++ /dev/null @@ -1,101 +0,0 @@ -google.bigtable.admin.v2.AutoscalingLimits - */ -class AutoscalingLimits extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum number of nodes to scale down to. - * - * Generated from protobuf field int32 min_serve_nodes = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_serve_nodes = 0; - /** - * Required. Maximum number of nodes to scale up to. - * - * Generated from protobuf field int32 max_serve_nodes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_serve_nodes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_serve_nodes - * Required. Minimum number of nodes to scale down to. - * @type int $max_serve_nodes - * Required. Maximum number of nodes to scale up to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum number of nodes to scale down to. - * - * Generated from protobuf field int32 min_serve_nodes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMinServeNodes() - { - return $this->min_serve_nodes; - } - - /** - * Required. Minimum number of nodes to scale down to. - * - * Generated from protobuf field int32 min_serve_nodes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMinServeNodes($var) - { - GPBUtil::checkInt32($var); - $this->min_serve_nodes = $var; - - return $this; - } - - /** - * Required. Maximum number of nodes to scale up to. - * - * Generated from protobuf field int32 max_serve_nodes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMaxServeNodes() - { - return $this->max_serve_nodes; - } - - /** - * Required. Maximum number of nodes to scale up to. - * - * Generated from protobuf field int32 max_serve_nodes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMaxServeNodes($var) - { - GPBUtil::checkInt32($var); - $this->max_serve_nodes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php deleted file mode 100644 index 4825251531fe..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php +++ /dev/null @@ -1,133 +0,0 @@ -google.bigtable.admin.v2.AutoscalingTargets - */ -class AutoscalingTargets extends \Google\Protobuf\Internal\Message -{ - /** - * The cpu utilization that the Autoscaler should be trying to achieve. - * This number is on a scale from 0 (no utilization) to - * 100 (total utilization), and is limited between 10 and 80, otherwise it - * will return INVALID_ARGUMENT error. - * - * Generated from protobuf field int32 cpu_utilization_percent = 2; - */ - protected $cpu_utilization_percent = 0; - /** - * The storage utilization that the Autoscaler should be trying to achieve. - * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD - * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, - * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, - * it will be treated as if it were set to the default value: 2560 for SSD, - * 8192 for HDD. - * - * Generated from protobuf field int32 storage_utilization_gib_per_node = 3; - */ - protected $storage_utilization_gib_per_node = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cpu_utilization_percent - * The cpu utilization that the Autoscaler should be trying to achieve. - * This number is on a scale from 0 (no utilization) to - * 100 (total utilization), and is limited between 10 and 80, otherwise it - * will return INVALID_ARGUMENT error. - * @type int $storage_utilization_gib_per_node - * The storage utilization that the Autoscaler should be trying to achieve. - * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD - * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, - * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, - * it will be treated as if it were set to the default value: 2560 for SSD, - * 8192 for HDD. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The cpu utilization that the Autoscaler should be trying to achieve. - * This number is on a scale from 0 (no utilization) to - * 100 (total utilization), and is limited between 10 and 80, otherwise it - * will return INVALID_ARGUMENT error. - * - * Generated from protobuf field int32 cpu_utilization_percent = 2; - * @return int - */ - public function getCpuUtilizationPercent() - { - return $this->cpu_utilization_percent; - } - - /** - * The cpu utilization that the Autoscaler should be trying to achieve. - * This number is on a scale from 0 (no utilization) to - * 100 (total utilization), and is limited between 10 and 80, otherwise it - * will return INVALID_ARGUMENT error. - * - * Generated from protobuf field int32 cpu_utilization_percent = 2; - * @param int $var - * @return $this - */ - public function setCpuUtilizationPercent($var) - { - GPBUtil::checkInt32($var); - $this->cpu_utilization_percent = $var; - - return $this; - } - - /** - * The storage utilization that the Autoscaler should be trying to achieve. - * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD - * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, - * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, - * it will be treated as if it were set to the default value: 2560 for SSD, - * 8192 for HDD. - * - * Generated from protobuf field int32 storage_utilization_gib_per_node = 3; - * @return int - */ - public function getStorageUtilizationGibPerNode() - { - return $this->storage_utilization_gib_per_node; - } - - /** - * The storage utilization that the Autoscaler should be trying to achieve. - * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD - * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, - * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, - * it will be treated as if it were set to the default value: 2560 for SSD, - * 8192 for HDD. - * - * Generated from protobuf field int32 storage_utilization_gib_per_node = 3; - * @param int $var - * @return $this - */ - public function setStorageUtilizationGibPerNode($var) - { - GPBUtil::checkInt32($var); - $this->storage_utilization_gib_per_node = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php deleted file mode 100644 index f5dc03ee44e3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php +++ /dev/null @@ -1,573 +0,0 @@ -google.bigtable.admin.v2.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * A globally unique identifier for the backup which cannot be - * changed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` - * The final segment of the name must be between 1 and 50 characters - * in length. - * The backup is stored in the cluster identified by the prefix of the backup - * name of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. Immutable. Name of the table from which this backup was created. - * This needs to be in the same instance as the backup. Values are of the form - * `projects/{project}/instances/{instance}/tables/{source_table}`. - * - * Generated from protobuf field string source_table = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - */ - protected $source_table = ''; - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: - * projects//instances//clusters//backups/ - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_backup = ''; - /** - * Required. The expiration time of the backup. - * When creating a backup or updating its `expire_time`, the value must be - * greater than the backup creation time by: - * - At least 6 hours - * - At most 90 days - * Once the `expire_time` has passed, Cloud Bigtable will delete the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $expire_time = null; - /** - * Output only. `start_time` is the time that the backup was started - * (i.e. approximately the time the - * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] - * request is received). The row data in this backup will be no older than - * this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. `end_time` is the time that the backup was finished. The row - * data in the backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Size of the backup in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The encryption information for the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_info = null; - /** - * Indicates the backup type of the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; - */ - protected $backup_type = 0; - /** - * The time at which the hot backup will be converted to a standard backup. - * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the - * hot backup to a standard backup. This value must be greater than the backup - * creation time by: - * - At least 24 hours - * This field only applies for hot backups. When creating or updating a - * standard backup, attempting to set this field will fail the request. - * - * Generated from protobuf field .google.protobuf.Timestamp hot_to_standard_time = 12; - */ - protected $hot_to_standard_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A globally unique identifier for the backup which cannot be - * changed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` - * The final segment of the name must be between 1 and 50 characters - * in length. - * The backup is stored in the cluster identified by the prefix of the backup - * name of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type string $source_table - * Required. Immutable. Name of the table from which this backup was created. - * This needs to be in the same instance as the backup. Values are of the form - * `projects/{project}/instances/{instance}/tables/{source_table}`. - * @type string $source_backup - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: - * projects//instances//clusters//backups/ - * @type \Google\Protobuf\Timestamp $expire_time - * Required. The expiration time of the backup. - * When creating a backup or updating its `expire_time`, the value must be - * greater than the backup creation time by: - * - At least 6 hours - * - At most 90 days - * Once the `expire_time` has passed, Cloud Bigtable will delete the backup. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. `start_time` is the time that the backup was started - * (i.e. approximately the time the - * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] - * request is received). The row data in this backup will be no older than - * this timestamp. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. `end_time` is the time that the backup was finished. The row - * data in the backup will be no newer than this timestamp. - * @type int|string $size_bytes - * Output only. Size of the backup in bytes. - * @type int $state - * Output only. The current state of the backup. - * @type \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo $encryption_info - * Output only. The encryption information for the backup. - * @type int $backup_type - * Indicates the backup type of the backup. - * @type \Google\Protobuf\Timestamp $hot_to_standard_time - * The time at which the hot backup will be converted to a standard backup. - * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the - * hot backup to a standard backup. This value must be greater than the backup - * creation time by: - * - At least 24 hours - * This field only applies for hot backups. When creating or updating a - * standard backup, attempting to set this field will fail the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * A globally unique identifier for the backup which cannot be - * changed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` - * The final segment of the name must be between 1 and 50 characters - * in length. - * The backup is stored in the cluster identified by the prefix of the backup - * name of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A globally unique identifier for the backup which cannot be - * changed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` - * The final segment of the name must be between 1 and 50 characters - * in length. - * The backup is stored in the cluster identified by the prefix of the backup - * name of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. Name of the table from which this backup was created. - * This needs to be in the same instance as the backup. Values are of the form - * `projects/{project}/instances/{instance}/tables/{source_table}`. - * - * Generated from protobuf field string source_table = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceTable() - { - return $this->source_table; - } - - /** - * Required. Immutable. Name of the table from which this backup was created. - * This needs to be in the same instance as the backup. Values are of the form - * `projects/{project}/instances/{instance}/tables/{source_table}`. - * - * Generated from protobuf field string source_table = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceTable($var) - { - GPBUtil::checkString($var, True); - $this->source_table = $var; - - return $this; - } - - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: - * projects//instances//clusters//backups/ - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceBackup() - { - return $this->source_backup; - } - - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: - * projects//instances//clusters//backups/ - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->source_backup = $var; - - return $this; - } - - /** - * Required. The expiration time of the backup. - * When creating a backup or updating its `expire_time`, the value must be - * greater than the backup creation time by: - * - At least 6 hours - * - At most 90 days - * Once the `expire_time` has passed, Cloud Bigtable will delete the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Required. The expiration time of the backup. - * When creating a backup or updating its `expire_time`, the value must be - * greater than the backup creation time by: - * - At least 6 hours - * - At most 90 days - * Once the `expire_time` has passed, Cloud Bigtable will delete the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. `start_time` is the time that the backup was started - * (i.e. approximately the time the - * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] - * request is received). The row data in this backup will be no older than - * this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.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. `start_time` is the time that the backup was started - * (i.e. approximately the time the - * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] - * request is received). The row data in this backup will be no older than - * this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.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. `end_time` is the time that the backup was finished. The row - * data in the backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.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. `end_time` is the time that the backup was finished. The row - * data in the backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.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. Size of the backup in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. Size of the backup in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Backup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The encryption information for the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo|null - */ - public function getEncryptionInfo() - { - return $this->encryption_info; - } - - public function hasEncryptionInfo() - { - return isset($this->encryption_info); - } - - public function clearEncryptionInfo() - { - unset($this->encryption_info); - } - - /** - * Output only. The encryption information for the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo $var - * @return $this - */ - public function setEncryptionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo::class); - $this->encryption_info = $var; - - return $this; - } - - /** - * Indicates the backup type of the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; - * @return int - */ - public function getBackupType() - { - return $this->backup_type; - } - - /** - * Indicates the backup type of the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; - * @param int $var - * @return $this - */ - public function setBackupType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Backup\BackupType::class); - $this->backup_type = $var; - - return $this; - } - - /** - * The time at which the hot backup will be converted to a standard backup. - * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the - * hot backup to a standard backup. This value must be greater than the backup - * creation time by: - * - At least 24 hours - * This field only applies for hot backups. When creating or updating a - * standard backup, attempting to set this field will fail the request. - * - * Generated from protobuf field .google.protobuf.Timestamp hot_to_standard_time = 12; - * @return \Google\Protobuf\Timestamp|null - */ - public function getHotToStandardTime() - { - return $this->hot_to_standard_time; - } - - public function hasHotToStandardTime() - { - return isset($this->hot_to_standard_time); - } - - public function clearHotToStandardTime() - { - unset($this->hot_to_standard_time); - } - - /** - * The time at which the hot backup will be converted to a standard backup. - * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the - * hot backup to a standard backup. This value must be greater than the backup - * creation time by: - * - At least 24 hours - * This field only applies for hot backups. When creating or updating a - * standard backup, attempting to set this field will fail the request. - * - * Generated from protobuf field .google.protobuf.Timestamp hot_to_standard_time = 12; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setHotToStandardTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->hot_to_standard_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/BackupType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/BackupType.php deleted file mode 100644 index cf2244ea9b7e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/BackupType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.bigtable.admin.v2.Backup.BackupType - */ -class BackupType -{ - /** - * Not specified. - * - * Generated from protobuf enum BACKUP_TYPE_UNSPECIFIED = 0; - */ - const BACKUP_TYPE_UNSPECIFIED = 0; - /** - * The default type for Cloud Bigtable managed backups. Supported for - * backups created in both HDD and SSD instances. Requires optimization when - * restored to a table in an SSD instance. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * A backup type with faster restore to SSD performance. Only supported for - * backups created in SSD instances. A new SSD table restored from a hot - * backup reaches production performance more quickly than a standard - * backup. - * - * Generated from protobuf enum HOT = 2; - */ - const HOT = 2; - - private static $valueToName = [ - self::BACKUP_TYPE_UNSPECIFIED => 'BACKUP_TYPE_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::HOT => 'HOT', - ]; - - 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(BackupType::class, \Google\Cloud\Bigtable\Admin\V2\Backup_BackupType::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php deleted file mode 100644 index 1e7867d2bd8a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php +++ /dev/null @@ -1,65 +0,0 @@ -google.bigtable.admin.v2.Backup.State - */ -class State -{ - /** - * Not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The pending backup is still being created. Operations on the - * backup may fail with `FAILED_PRECONDITION` in this state. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The backup is complete and ready for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - ]; - - 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\Bigtable\Admin\V2\Backup_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php deleted file mode 100644 index a9680225f63e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php +++ /dev/null @@ -1,243 +0,0 @@ -google.bigtable.admin.v2.BackupInfo - */ -class BackupInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the backup. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $backup = ''; - /** - * Output only. The time that the backup was started. Row data in the backup - * will be no older than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. This time that the backup was finished. Row data in the - * backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Name of the table the backup was created from. - * - * Generated from protobuf field string source_table = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_table = ''; - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: - * projects//instances//clusters//backups/ - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_backup = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $backup - * Output only. Name of the backup. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The time that the backup was started. Row data in the backup - * will be no older than this timestamp. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. This time that the backup was finished. Row data in the - * backup will be no newer than this timestamp. - * @type string $source_table - * Output only. Name of the table the backup was created from. - * @type string $source_backup - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: - * projects//instances//clusters//backups/ - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the backup. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Output only. Name of the backup. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * Output only. The time that the backup was started. Row data in the backup - * will be no older than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.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 that the backup was started. Row data in the backup - * will be no older than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.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. This time that the backup was finished. Row data in the - * backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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. This time that the backup was finished. Row data in the - * backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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. Name of the table the backup was created from. - * - * Generated from protobuf field string source_table = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceTable() - { - return $this->source_table; - } - - /** - * Output only. Name of the table the backup was created from. - * - * Generated from protobuf field string source_table = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceTable($var) - { - GPBUtil::checkString($var, True); - $this->source_table = $var; - - return $this; - } - - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: - * projects//instances//clusters//backups/ - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceBackup() - { - return $this->source_backup; - } - - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: - * projects//instances//clusters//backups/ - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->source_backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php deleted file mode 100644 index 49dbf3a36659..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php +++ /dev/null @@ -1,93 +0,0 @@ -google.bigtable.admin.v2.ChangeStreamConfig - */ -class ChangeStreamConfig extends \Google\Protobuf\Internal\Message -{ - /** - * How long the change stream should be retained. Change stream data older - * than the retention period will not be returned when reading the change - * stream from the table. - * Values must be at least 1 day and at most 7 days, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration retention_period = 1; - */ - protected $retention_period = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $retention_period - * How long the change stream should be retained. Change stream data older - * than the retention period will not be returned when reading the change - * stream from the table. - * Values must be at least 1 day and at most 7 days, and will be truncated to - * microsecond granularity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * How long the change stream should be retained. Change stream data older - * than the retention period will not be returned when reading the change - * stream from the table. - * Values must be at least 1 day and at most 7 days, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration retention_period = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getRetentionPeriod() - { - return $this->retention_period; - } - - public function hasRetentionPeriod() - { - return isset($this->retention_period); - } - - public function clearRetentionPeriod() - { - unset($this->retention_period); - } - - /** - * How long the change stream should be retained. Change stream data older - * than the retention period will not be returned when reading the change - * stream from the table. - * Values must be at least 1 day and at most 7 days, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration retention_period = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRetentionPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->retention_period = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php deleted file mode 100644 index 543b4f861565..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php +++ /dev/null @@ -1,215 +0,0 @@ -google.bigtable.admin.v2.CheckConsistencyRequest - */ -class CheckConsistencyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The token created using GenerateConsistencyToken for the Table. - * - * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $consistency_token = ''; - protected $mode; - - /** - * @param string $name Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * @param string $consistencyToken Required. The token created using GenerateConsistencyToken for the Table. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CheckConsistencyRequest - * - * @experimental - */ - public static function build(string $name, string $consistencyToken): self - { - return (new self()) - ->setName($name) - ->setConsistencyToken($consistencyToken); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type string $consistency_token - * Required. The token created using GenerateConsistencyToken for the Table. - * @type \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites $standard_read_remote_writes - * Checks that reads using an app profile with `StandardIsolation` can - * see all writes committed before the token was created, even if the - * read and write target different clusters. - * @type \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites $data_boost_read_local_writes - * Checks that reads using an app profile with `DataBoostIsolationReadOnly` - * can see all writes committed before the token was created, but only if - * the read and write target the same cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The token created using GenerateConsistencyToken for the Table. - * - * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConsistencyToken() - { - return $this->consistency_token; - } - - /** - * Required. The token created using GenerateConsistencyToken for the Table. - * - * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConsistencyToken($var) - { - GPBUtil::checkString($var, True); - $this->consistency_token = $var; - - return $this; - } - - /** - * Checks that reads using an app profile with `StandardIsolation` can - * see all writes committed before the token was created, even if the - * read and write target different clusters. - * - * Generated from protobuf field .google.bigtable.admin.v2.StandardReadRemoteWrites standard_read_remote_writes = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites|null - */ - public function getStandardReadRemoteWrites() - { - return $this->readOneof(3); - } - - public function hasStandardReadRemoteWrites() - { - return $this->hasOneof(3); - } - - /** - * Checks that reads using an app profile with `StandardIsolation` can - * see all writes committed before the token was created, even if the - * read and write target different clusters. - * - * Generated from protobuf field .google.bigtable.admin.v2.StandardReadRemoteWrites standard_read_remote_writes = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites $var - * @return $this - */ - public function setStandardReadRemoteWrites($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Checks that reads using an app profile with `DataBoostIsolationReadOnly` - * can see all writes committed before the token was created, but only if - * the read and write target the same cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.DataBoostReadLocalWrites data_boost_read_local_writes = 4; - * @return \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites|null - */ - public function getDataBoostReadLocalWrites() - { - return $this->readOneof(4); - } - - public function hasDataBoostReadLocalWrites() - { - return $this->hasOneof(4); - } - - /** - * Checks that reads using an app profile with `DataBoostIsolationReadOnly` - * can see all writes committed before the token was created, but only if - * the read and write target the same cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.DataBoostReadLocalWrites data_boost_read_local_writes = 4; - * @param \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites $var - * @return $this - */ - public function setDataBoostReadLocalWrites($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getMode() - { - return $this->whichOneof("mode"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php deleted file mode 100644 index 86e789432683..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -google.bigtable.admin.v2.CheckConsistencyResponse - */ -class CheckConsistencyResponse extends \Google\Protobuf\Internal\Message -{ - /** - * True only if the token is consistent. A token is consistent if replication - * has caught up with the restrictions specified in the request. - * - * Generated from protobuf field bool consistent = 1; - */ - protected $consistent = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $consistent - * True only if the token is consistent. A token is consistent if replication - * has caught up with the restrictions specified in the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * True only if the token is consistent. A token is consistent if replication - * has caught up with the restrictions specified in the request. - * - * Generated from protobuf field bool consistent = 1; - * @return bool - */ - public function getConsistent() - { - return $this->consistent; - } - - /** - * True only if the token is consistent. A token is consistent if replication - * has caught up with the restrictions specified in the request. - * - * Generated from protobuf field bool consistent = 1; - * @param bool $var - * @return $this - */ - public function setConsistent($var) - { - GPBUtil::checkBool($var); - $this->consistent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php deleted file mode 100644 index f85b6bce6a47..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php +++ /dev/null @@ -1,349 +0,0 @@ -google.bigtable.admin.v2.Cluster - */ -class Cluster extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Immutable. The location where this cluster's nodes and storage reside. For - * best performance, clients should be located as close as possible to this - * cluster. Currently only zones are supported, so values should be of the - * form `projects/{project}/locations/{zone}`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $location = ''; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * The number of nodes allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * - * Generated from protobuf field int32 serve_nodes = 4; - */ - protected $serve_nodes = 0; - /** - * Immutable. The node scaling factor of this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $node_scaling_factor = 0; - /** - * Immutable. The type of storage used by this cluster to serve its - * parent instance's tables, unless explicitly overridden. - * - * Generated from protobuf field .google.bigtable.admin.v2.StorageType default_storage_type = 5 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $default_storage_type = 0; - /** - * Immutable. The encryption configuration for CMEK-protected clusters. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $encryption_config = null; - protected $config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. - * @type string $location - * Immutable. The location where this cluster's nodes and storage reside. For - * best performance, clients should be located as close as possible to this - * cluster. Currently only zones are supported, so values should be of the - * form `projects/{project}/locations/{zone}`. - * @type int $state - * Output only. The current state of the cluster. - * @type int $serve_nodes - * The number of nodes allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * @type int $node_scaling_factor - * Immutable. The node scaling factor of this cluster. - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig $cluster_config - * Configuration for this cluster. - * @type int $default_storage_type - * Immutable. The type of storage used by this cluster to serve its - * parent instance's tables, unless explicitly overridden. - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig $encryption_config - * Immutable. The encryption configuration for CMEK-protected clusters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. - * - * 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; - } - - /** - * Immutable. The location where this cluster's nodes and storage reside. For - * best performance, clients should be located as close as possible to this - * cluster. Currently only zones are supported, so values should be of the - * form `projects/{project}/locations/{zone}`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Immutable. The location where this cluster's nodes and storage reside. For - * best performance, clients should be located as close as possible to this - * cluster. Currently only zones are supported, so values should be of the - * form `projects/{project}/locations/{zone}`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * The number of nodes allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * - * Generated from protobuf field int32 serve_nodes = 4; - * @return int - */ - public function getServeNodes() - { - return $this->serve_nodes; - } - - /** - * The number of nodes allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * - * Generated from protobuf field int32 serve_nodes = 4; - * @param int $var - * @return $this - */ - public function setServeNodes($var) - { - GPBUtil::checkInt32($var); - $this->serve_nodes = $var; - - return $this; - } - - /** - * Immutable. The node scaling factor of this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getNodeScalingFactor() - { - return $this->node_scaling_factor; - } - - /** - * Immutable. The node scaling factor of this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setNodeScalingFactor($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\NodeScalingFactor::class); - $this->node_scaling_factor = $var; - - return $this; - } - - /** - * Configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterConfig cluster_config = 7; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig|null - */ - public function getClusterConfig() - { - return $this->readOneof(7); - } - - public function hasClusterConfig() - { - return $this->hasOneof(7); - } - - /** - * Configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterConfig cluster_config = 7; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig $var - * @return $this - */ - public function setClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Immutable. The type of storage used by this cluster to serve its - * parent instance's tables, unless explicitly overridden. - * - * Generated from protobuf field .google.bigtable.admin.v2.StorageType default_storage_type = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getDefaultStorageType() - { - return $this->default_storage_type; - } - - /** - * Immutable. The type of storage used by this cluster to serve its - * parent instance's tables, unless explicitly overridden. - * - * Generated from protobuf field .google.bigtable.admin.v2.StorageType default_storage_type = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setDefaultStorageType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\StorageType::class); - $this->default_storage_type = $var; - - return $this; - } - - /** - * Immutable. The encryption configuration for CMEK-protected clusters. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Immutable. The encryption configuration for CMEK-protected clusters. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php deleted file mode 100644 index 997961367dd3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php +++ /dev/null @@ -1,124 +0,0 @@ -google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig - */ -class ClusterAutoscalingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Autoscaling limits for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autoscaling_limits = null; - /** - * Required. Autoscaling targets for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autoscaling_targets = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits $autoscaling_limits - * Required. Autoscaling limits for this cluster. - * @type \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets $autoscaling_targets - * Required. Autoscaling targets for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Autoscaling limits for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits|null - */ - public function getAutoscalingLimits() - { - return $this->autoscaling_limits; - } - - public function hasAutoscalingLimits() - { - return isset($this->autoscaling_limits); - } - - public function clearAutoscalingLimits() - { - unset($this->autoscaling_limits); - } - - /** - * Required. Autoscaling limits for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits $var - * @return $this - */ - public function setAutoscalingLimits($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits::class); - $this->autoscaling_limits = $var; - - return $this; - } - - /** - * Required. Autoscaling targets for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets|null - */ - public function getAutoscalingTargets() - { - return $this->autoscaling_targets; - } - - public function hasAutoscalingTargets() - { - return isset($this->autoscaling_targets); - } - - public function clearAutoscalingTargets() - { - unset($this->autoscaling_targets); - } - - /** - * Required. Autoscaling targets for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets $var - * @return $this - */ - public function setAutoscalingTargets($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets::class); - $this->autoscaling_targets = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterAutoscalingConfig::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_ClusterAutoscalingConfig::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php deleted file mode 100644 index b8856b291e62..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php +++ /dev/null @@ -1,80 +0,0 @@ -google.bigtable.admin.v2.Cluster.ClusterConfig - */ -class ClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Autoscaling configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; - */ - protected $cluster_autoscaling_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig $cluster_autoscaling_config - * Autoscaling configuration for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Autoscaling configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig|null - */ - public function getClusterAutoscalingConfig() - { - return $this->cluster_autoscaling_config; - } - - public function hasClusterAutoscalingConfig() - { - return isset($this->cluster_autoscaling_config); - } - - public function clearClusterAutoscalingConfig() - { - unset($this->cluster_autoscaling_config); - } - - /** - * Autoscaling configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig $var - * @return $this - */ - public function setClusterAutoscalingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig::class); - $this->cluster_autoscaling_config = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterConfig::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_ClusterConfig::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php deleted file mode 100644 index 3294a44ba562..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php +++ /dev/null @@ -1,107 +0,0 @@ -google.bigtable.admin.v2.Cluster.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Describes the Cloud KMS encryption key that will be used to protect the - * destination Bigtable cluster. The requirements for this key are: - * 1) The Cloud Bigtable service account associated with the project that - * contains this cluster must be granted the - * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. - * 2) Only regional keys can be used and the region of the CMEK key must - * match the region of the cluster. - * 3) All clusters within an instance must use the same CMEK key. - * Values are of the form - * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.resource_reference) = { - */ - protected $kms_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Describes the Cloud KMS encryption key that will be used to protect the - * destination Bigtable cluster. The requirements for this key are: - * 1) The Cloud Bigtable service account associated with the project that - * contains this cluster must be granted the - * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. - * 2) Only regional keys can be used and the region of the CMEK key must - * match the region of the cluster. - * 3) All clusters within an instance must use the same CMEK key. - * Values are of the form - * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Describes the Cloud KMS encryption key that will be used to protect the - * destination Bigtable cluster. The requirements for this key are: - * 1) The Cloud Bigtable service account associated with the project that - * contains this cluster must be granted the - * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. - * 2) Only regional keys can be used and the region of the CMEK key must - * match the region of the cluster. - * 3) All clusters within an instance must use the same CMEK key. - * Values are of the form - * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Describes the Cloud KMS encryption key that will be used to protect the - * destination Bigtable cluster. The requirements for this key are: - * 1) The Cloud Bigtable service account associated with the project that - * contains this cluster must be granted the - * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. - * 2) Only regional keys can be used and the region of the CMEK key must - * match the region of the cluster. - * 3) All clusters within an instance must use the same CMEK key. - * Values are of the form - * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EncryptionConfig::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_EncryptionConfig::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/NodeScalingFactor.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/NodeScalingFactor.php deleted file mode 100644 index c5f625fd27e6..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/NodeScalingFactor.php +++ /dev/null @@ -1,67 +0,0 @@ -google.bigtable.admin.v2.Cluster.NodeScalingFactor - */ -class NodeScalingFactor -{ - /** - * No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X. - * - * Generated from protobuf enum NODE_SCALING_FACTOR_UNSPECIFIED = 0; - */ - const NODE_SCALING_FACTOR_UNSPECIFIED = 0; - /** - * The cluster is running with a scaling factor of 1. - * - * Generated from protobuf enum NODE_SCALING_FACTOR_1X = 1; - */ - const NODE_SCALING_FACTOR_1X = 1; - /** - * The cluster is running with a scaling factor of 2. - * All node count values must be in increments of 2 with this scaling factor - * enabled, otherwise an INVALID_ARGUMENT error will be returned. - * - * Generated from protobuf enum NODE_SCALING_FACTOR_2X = 2; - */ - const NODE_SCALING_FACTOR_2X = 2; - - private static $valueToName = [ - self::NODE_SCALING_FACTOR_UNSPECIFIED => 'NODE_SCALING_FACTOR_UNSPECIFIED', - self::NODE_SCALING_FACTOR_1X => 'NODE_SCALING_FACTOR_1X', - self::NODE_SCALING_FACTOR_2X => 'NODE_SCALING_FACTOR_2X', - ]; - - 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(NodeScalingFactor::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_NodeScalingFactor::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php deleted file mode 100644 index fc392006912f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.bigtable.admin.v2.Cluster.State - */ -class State -{ - /** - * The state of the cluster could not be determined. - * - * Generated from protobuf enum STATE_NOT_KNOWN = 0; - */ - const STATE_NOT_KNOWN = 0; - /** - * The cluster has been successfully created and is ready to serve requests. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * The cluster is currently being created, and may be destroyed - * if the creation process encounters an error. - * A cluster may not be able to serve requests while being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The cluster is currently being resized, and may revert to its previous - * node count if the process encounters an error. - * A cluster is still capable of serving requests while being resized, - * but may exhibit performance as if its number of allocated nodes is - * between the starting and requested states. - * - * Generated from protobuf enum RESIZING = 3; - */ - const RESIZING = 3; - /** - * The cluster has no backing nodes. The data (tables) still - * exist, but no operations can be performed on the cluster. - * - * Generated from protobuf enum DISABLED = 4; - */ - const DISABLED = 4; - - private static $valueToName = [ - self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', - self::READY => 'READY', - self::CREATING => 'CREATING', - self::RESIZING => 'RESIZING', - 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\Bigtable\Admin\V2\Cluster_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php deleted file mode 100644 index 12959e605d65..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php +++ /dev/null @@ -1,157 +0,0 @@ -google.bigtable.admin.v2.ColumnFamily - */ -class ColumnFamily extends \Google\Protobuf\Internal\Message -{ - /** - * Garbage collection rule specified as a protobuf. - * Must serialize to at most 500 bytes. - * NOTE: Garbage collection executes opportunistically in the background, and - * so it's possible for reads to return a cell even if it matches the active - * GC expression for its family. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; - */ - protected $gc_rule = null; - /** - * The type of data stored in each of this family's cell values, including its - * full encoding. If omitted, the family only serves raw untyped bytes. - * For now, only the `Aggregate` type is supported. - * `Aggregate` can only be set at family creation and is immutable afterwards. - * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations - * - * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 3; - */ - protected $value_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\GcRule $gc_rule - * Garbage collection rule specified as a protobuf. - * Must serialize to at most 500 bytes. - * NOTE: Garbage collection executes opportunistically in the background, and - * so it's possible for reads to return a cell even if it matches the active - * GC expression for its family. - * @type \Google\Cloud\Bigtable\Admin\V2\Type $value_type - * The type of data stored in each of this family's cell values, including its - * full encoding. If omitted, the family only serves raw untyped bytes. - * For now, only the `Aggregate` type is supported. - * `Aggregate` can only be set at family creation and is immutable afterwards. - * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Garbage collection rule specified as a protobuf. - * Must serialize to at most 500 bytes. - * NOTE: Garbage collection executes opportunistically in the background, and - * so it's possible for reads to return a cell even if it matches the active - * GC expression for its family. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\GcRule|null - */ - public function getGcRule() - { - return $this->gc_rule; - } - - public function hasGcRule() - { - return isset($this->gc_rule); - } - - public function clearGcRule() - { - unset($this->gc_rule); - } - - /** - * Garbage collection rule specified as a protobuf. - * Must serialize to at most 500 bytes. - * NOTE: Garbage collection executes opportunistically in the background, and - * so it's possible for reads to return a cell even if it matches the active - * GC expression for its family. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\GcRule $var - * @return $this - */ - public function setGcRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule::class); - $this->gc_rule = $var; - - return $this; - } - - /** - * The type of data stored in each of this family's cell values, including its - * full encoding. If omitted, the family only serves raw untyped bytes. - * For now, only the `Aggregate` type is supported. - * `Aggregate` can only be set at family creation and is immutable afterwards. - * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations - * - * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\Type|null - */ - public function getValueType() - { - return $this->value_type; - } - - public function hasValueType() - { - return isset($this->value_type); - } - - public function clearValueType() - { - unset($this->value_type); - } - - /** - * The type of data stored in each of this family's cell values, including its - * full encoding. If omitted, the family only serves raw untyped bytes. - * For now, only the `Aggregate` type is supported. - * `Aggregate` can only be set at family creation and is immutable afterwards. - * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations - * - * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\Type $var - * @return $this - */ - public function setValueType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); - $this->value_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php deleted file mode 100644 index 0efc355bd7d8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php +++ /dev/null @@ -1,172 +0,0 @@ -google.bigtable.admin.v2.CopyBackupMetadata - */ -class CopyBackupMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the backup being created through the copy operation. - * Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Information about the source backup that is being copied from. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; - */ - protected $source_backup_info = null; - /** - * The progress of the - * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 3; - */ - protected $progress = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the backup being created through the copy operation. - * Values are of the form - * `projects//instances//clusters//backups/`. - * @type \Google\Cloud\Bigtable\Admin\V2\BackupInfo $source_backup_info - * Information about the source backup that is being copied from. - * @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress - * The progress of the - * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] - * operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The name of the backup being created through the copy operation. - * Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the backup being created through the copy operation. - * Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Information about the source backup that is being copied from. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\BackupInfo|null - */ - public function getSourceBackupInfo() - { - return $this->source_backup_info; - } - - public function hasSourceBackupInfo() - { - return isset($this->source_backup_info); - } - - public function clearSourceBackupInfo() - { - unset($this->source_backup_info); - } - - /** - * Information about the source backup that is being copied from. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\BackupInfo $var - * @return $this - */ - public function setSourceBackupInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\BackupInfo::class); - $this->source_backup_info = $var; - - return $this; - } - - /** - * The progress of the - * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null - */ - public function getProgress() - { - return $this->progress; - } - - public function hasProgress() - { - return isset($this->progress); - } - - public function clearProgress() - { - unset($this->progress); - } - - /** - * The progress of the - * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class); - $this->progress = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php deleted file mode 100644 index 8f004b2b6ee0..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php +++ /dev/null @@ -1,286 +0,0 @@ -google.bigtable.admin.v2.CopyBackupRequest - */ -class CopyBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exist. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_id = ''; - /** - * Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $source_backup = ''; - /** - * Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $expire_time = null; - - /** - * @param string $parent Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exist. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * @param string $backupId Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @param string $sourceBackup Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. Please see - * {@see BigtableTableAdminClient::backupName()} for help formatting this field. - * @param \Google\Protobuf\Timestamp $expireTime Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CopyBackupRequest - * - * @experimental - */ - public static function build(string $parent, string $backupId, string $sourceBackup, \Google\Protobuf\Timestamp $expireTime): self - { - return (new self()) - ->setParent($parent) - ->setBackupId($backupId) - ->setSourceBackup($sourceBackup) - ->setExpireTime($expireTime); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exist. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type string $backup_id - * Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @type string $source_backup - * Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. - * @type \Google\Protobuf\Timestamp $expire_time - * Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exist. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exist. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupId() - { - return $this->backup_id; - } - - /** - * Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - - /** - * Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSourceBackup() - { - return $this->source_backup; - } - - /** - * Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->source_backup = $var; - - return $this; - } - - /** - * Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php deleted file mode 100644 index 12b67e4093aa..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php +++ /dev/null @@ -1,217 +0,0 @@ -google.bigtable.admin.v2.CreateAppProfileRequest - */ -class CreateAppProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * - * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_profile_id = ''; - /** - * Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_profile = null; - /** - * If true, ignore safety checks when creating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 4; - */ - protected $ignore_warnings = false; - - /** - * @param string $parent Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * @param string $appProfileId Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateAppProfileRequest - * - * @experimental - */ - public static function build(string $parent, string $appProfileId, \Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile): self - { - return (new self()) - ->setParent($parent) - ->setAppProfileId($appProfileId) - ->setAppProfile($appProfile); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. - * @type string $app_profile_id - * Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile $app_profile - * Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * @type bool $ignore_warnings - * If true, ignore safety checks when creating the app profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * - * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * - * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile|null - */ - public function getAppProfile() - { - return $this->app_profile; - } - - public function hasAppProfile() - { - return isset($this->app_profile); - } - - public function clearAppProfile() - { - unset($this->app_profile); - } - - /** - * Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $var - * @return $this - */ - public function setAppProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile::class); - $this->app_profile = $var; - - return $this; - } - - /** - * If true, ignore safety checks when creating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 4; - * @return bool - */ - public function getIgnoreWarnings() - { - return $this->ignore_warnings; - } - - /** - * If true, ignore safety checks when creating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 4; - * @param bool $var - * @return $this - */ - public function setIgnoreWarnings($var) - { - GPBUtil::checkBool($var); - $this->ignore_warnings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewMetadata.php deleted file mode 100644 index e2172d832ac3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.bigtable.admin.v2.CreateAuthorizedViewMetadata - */ -class CreateAuthorizedViewMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this CreateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest $original_request - * The request that prompted the initiation of this CreateInstance operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this CreateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this CreateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewRequest.php deleted file mode 100644 index 0329adcb6e04..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAuthorizedViewRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.bigtable.admin.v2.CreateAuthorizedViewRequest - */ -class CreateAuthorizedViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. This is the name of the table the AuthorizedView belongs to. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id of the AuthorizedView to create. This AuthorizedView must - * not already exist. The `authorized_view_id` appended to `parent` forms the - * full AuthorizedView name of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. - * - * Generated from protobuf field string authorized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorized_view_id = ''; - /** - * Required. The AuthorizedView to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorized_view = null; - - /** - * @param string $parent Required. This is the name of the table the AuthorizedView belongs to. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView Required. The AuthorizedView to create. - * @param string $authorizedViewId Required. The id of the AuthorizedView to create. This AuthorizedView must - * not already exist. The `authorized_view_id` appended to `parent` forms the - * full AuthorizedView name of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView, string $authorizedViewId): self - { - return (new self()) - ->setParent($parent) - ->setAuthorizedView($authorizedView) - ->setAuthorizedViewId($authorizedViewId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. This is the name of the table the AuthorizedView belongs to. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type string $authorized_view_id - * Required. The id of the AuthorizedView to create. This AuthorizedView must - * not already exist. The `authorized_view_id` appended to `parent` forms the - * full AuthorizedView name of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. - * @type \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorized_view - * Required. The AuthorizedView to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. This is the name of the table the AuthorizedView belongs to. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. This is the name of the table the AuthorizedView belongs to. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The id of the AuthorizedView to create. This AuthorizedView must - * not already exist. The `authorized_view_id` appended to `parent` forms the - * full AuthorizedView name of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. - * - * Generated from protobuf field string authorized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAuthorizedViewId() - { - return $this->authorized_view_id; - } - - /** - * Required. The id of the AuthorizedView to create. This AuthorizedView must - * not already exist. The `authorized_view_id` appended to `parent` forms the - * full AuthorizedView name of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. - * - * Generated from protobuf field string authorized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAuthorizedViewId($var) - { - GPBUtil::checkString($var, True); - $this->authorized_view_id = $var; - - return $this; - } - - /** - * Required. The AuthorizedView to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView|null - */ - public function getAuthorizedView() - { - return $this->authorized_view; - } - - public function hasAuthorizedView() - { - return isset($this->authorized_view); - } - - public function clearAuthorizedView() - { - unset($this->authorized_view); - } - - /** - * Required. The AuthorizedView to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $var - * @return $this - */ - public function setAuthorizedView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView::class); - $this->authorized_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php deleted file mode 100644 index 557de786e6de..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php +++ /dev/null @@ -1,190 +0,0 @@ -google.bigtable.admin.v2.CreateBackupMetadata - */ -class CreateBackupMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the backup being created. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The name of the table the backup is created from. - * - * Generated from protobuf field string source_table = 2; - */ - protected $source_table = ''; - /** - * The time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the backup being created. - * @type string $source_table - * The name of the table the backup is created from. - * @type \Google\Protobuf\Timestamp $start_time - * The time at which this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * If set, the time at which this operation finished or was cancelled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The name of the backup being created. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the backup being created. - * - * 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 name of the table the backup is created from. - * - * Generated from protobuf field string source_table = 2; - * @return string - */ - public function getSourceTable() - { - return $this->source_table; - } - - /** - * The name of the table the backup is created from. - * - * Generated from protobuf field string source_table = 2; - * @param string $var - * @return $this - */ - public function setSourceTable($var) - { - GPBUtil::checkString($var, True); - $this->source_table = $var; - - return $this; - } - - /** - * The time at which this operation started. - * - * 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 at which this operation started. - * - * 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; - } - - /** - * If set, the time at which this operation finished or was cancelled. - * - * 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); - } - - /** - * If set, the time at which this operation finished or was cancelled. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php deleted file mode 100644 index 8022a0ae61ec..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.bigtable.admin.v2.CreateBackupRequest - */ -class CreateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_id = ''; - /** - * Required. The backup to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - - /** - * @param string $parent Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * @param string $backupId Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @param \Google\Cloud\Bigtable\Admin\V2\Backup $backup Required. The backup to create. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateBackupRequest - * - * @experimental - */ - public static function build(string $parent, string $backupId, \Google\Cloud\Bigtable\Admin\V2\Backup $backup): self - { - return (new self()) - ->setParent($parent) - ->setBackupId($backupId) - ->setBackup($backup); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type string $backup_id - * Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @type \Google\Cloud\Bigtable\Admin\V2\Backup $backup - * Required. The backup to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupId() - { - return $this->backup_id; - } - - /** - * Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - - /** - * Required. The backup to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. The backup to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Backup::class); - $this->backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php deleted file mode 100644 index c752a40618c5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php +++ /dev/null @@ -1,223 +0,0 @@ -google.bigtable.admin.v2.CreateClusterMetadata - */ -class CreateClusterMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this CreateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - /** - * Keys: the full `name` of each table that existed in the instance when - * CreateCluster was first called, i.e. - * `projects//instances//tables/
`. Any table added - * to the instance by a later API call will be created in the new cluster by - * that API call, not this one. - * Values: information on how much of a table's data has been copied to the - * newly-created cluster so far. - * - * Generated from protobuf field map tables = 4; - */ - private $tables; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest $original_request - * The request that prompted the initiation of this CreateCluster operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * @type array|\Google\Protobuf\Internal\MapField $tables - * Keys: the full `name` of each table that existed in the instance when - * CreateCluster was first called, i.e. - * `projects//instances//tables/
`. Any table added - * to the instance by a later API call will be created in the new cluster by - * that API call, not this one. - * Values: information on how much of a table's data has been copied to the - * newly-created cluster so far. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this CreateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this CreateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - - /** - * Keys: the full `name` of each table that existed in the instance when - * CreateCluster was first called, i.e. - * `projects//instances//tables/
`. Any table added - * to the instance by a later API call will be created in the new cluster by - * that API call, not this one. - * Values: information on how much of a table's data has been copied to the - * newly-created cluster so far. - * - * Generated from protobuf field map tables = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTables() - { - return $this->tables; - } - - /** - * Keys: the full `name` of each table that existed in the instance when - * CreateCluster was first called, i.e. - * `projects//instances//tables/
`. Any table added - * to the instance by a later API call will be created in the new cluster by - * that API call, not this one. - * Values: information on how much of a table's data has been copied to the - * newly-created cluster so far. - * - * Generated from protobuf field map tables = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata\TableProgress::class); - $this->tables = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php deleted file mode 100644 index 6fbf11f7cc3b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php +++ /dev/null @@ -1,139 +0,0 @@ -google.bigtable.admin.v2.CreateClusterMetadata.TableProgress - */ -class TableProgress extends \Google\Protobuf\Internal\Message -{ - /** - * Estimate of the size of the table to be copied. - * - * Generated from protobuf field int64 estimated_size_bytes = 2; - */ - protected $estimated_size_bytes = 0; - /** - * Estimate of the number of bytes copied so far for this table. - * This will eventually reach 'estimated_size_bytes' unless the table copy - * is CANCELLED. - * - * Generated from protobuf field int64 estimated_copied_bytes = 3; - */ - protected $estimated_copied_bytes = 0; - /** - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $estimated_size_bytes - * Estimate of the size of the table to be copied. - * @type int|string $estimated_copied_bytes - * Estimate of the number of bytes copied so far for this table. - * This will eventually reach 'estimated_size_bytes' unless the table copy - * is CANCELLED. - * @type int $state - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Estimate of the size of the table to be copied. - * - * Generated from protobuf field int64 estimated_size_bytes = 2; - * @return int|string - */ - public function getEstimatedSizeBytes() - { - return $this->estimated_size_bytes; - } - - /** - * Estimate of the size of the table to be copied. - * - * Generated from protobuf field int64 estimated_size_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setEstimatedSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->estimated_size_bytes = $var; - - return $this; - } - - /** - * Estimate of the number of bytes copied so far for this table. - * This will eventually reach 'estimated_size_bytes' unless the table copy - * is CANCELLED. - * - * Generated from protobuf field int64 estimated_copied_bytes = 3; - * @return int|string - */ - public function getEstimatedCopiedBytes() - { - return $this->estimated_copied_bytes; - } - - /** - * Estimate of the number of bytes copied so far for this table. - * This will eventually reach 'estimated_size_bytes' unless the table copy - * is CANCELLED. - * - * Generated from protobuf field int64 estimated_copied_bytes = 3; - * @param int|string $var - * @return $this - */ - public function setEstimatedCopiedBytes($var) - { - GPBUtil::checkInt64($var); - $this->estimated_copied_bytes = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata\TableProgress\State::class); - $this->state = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableProgress::class, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata_TableProgress::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php deleted file mode 100644 index f5fc34634589..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php +++ /dev/null @@ -1,76 +0,0 @@ -google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State - */ -class State -{ - /** - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The table has not yet begun copying to the new cluster. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The table is actively being copied to the new cluster. - * - * Generated from protobuf enum COPYING = 2; - */ - const COPYING = 2; - /** - * The table has been fully copied to the new cluster. - * - * Generated from protobuf enum COMPLETED = 3; - */ - const COMPLETED = 3; - /** - * The table was deleted before it finished copying to the new cluster. - * Note that tables deleted after completion will stay marked as - * COMPLETED, not CANCELLED. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::COPYING => 'COPYING', - self::COMPLETED => 'COMPLETED', - self::CANCELLED => 'CANCELLED', - ]; - - 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\Bigtable\Admin\V2\CreateClusterMetadata_TableProgress_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php deleted file mode 100644 index 8a849b579320..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.bigtable.admin.v2.CreateClusterRequest - */ -class CreateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_id = ''; - /** - * Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - - /** - * @param string $parent Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * @param string $clusterId Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest - * - * @experimental - */ - public static function build(string $parent, string $clusterId, \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster): self - { - return (new self()) - ->setParent($parent) - ->setClusterId($clusterId) - ->setCluster($cluster); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. - * @type string $cluster_id - * Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster - * Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - - /** - * Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php deleted file mode 100644 index dd7f505c0775..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.bigtable.admin.v2.CreateInstanceMetadata - */ -class CreateInstanceMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this CreateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest $original_request - * The request that prompted the initiation of this CreateInstance operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this CreateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this CreateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php deleted file mode 100644 index 7af92a99c778..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.bigtable.admin.v2.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * - * Generated from protobuf field map clusters = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $clusters; - - /** - * @param string $parent Required. The unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. Please see - * {@see BigtableInstanceAdminClient::projectName()} for help formatting this field. - * @param string $instanceId Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * @param \Google\Cloud\Bigtable\Admin\V2\Instance $instance Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * @param array $clusters Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, string $instanceId, \Google\Cloud\Bigtable\Admin\V2\Instance $instance, array $clusters): self - { - return (new self()) - ->setParent($parent) - ->setInstanceId($instanceId) - ->setInstance($instance) - ->setClusters($clusters); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. - * @type string $instance_id - * Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * @type \Google\Cloud\Bigtable\Admin\V2\Instance $instance - * Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * @type array|\Google\Protobuf\Internal\MapField $clusters - * Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. - * - * 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 unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * - * Generated from protobuf field map clusters = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * - * Generated from protobuf field map clusters = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->clusters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php deleted file mode 100644 index ad6178e78b9b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php +++ /dev/null @@ -1,173 +0,0 @@ -google.bigtable.admin.v2.CreateTableFromSnapshotMetadata - */ -class CreateTableFromSnapshotMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this CreateTableFromSnapshot - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest $original_request - * The request that prompted the initiation of this CreateTableFromSnapshot - * operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this CreateTableFromSnapshot - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this CreateTableFromSnapshot - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php deleted file mode 100644 index 2dfa7bc94901..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.bigtable.admin.v2.CreateTableFromSnapshotRequest - */ -class CreateTableFromSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table_id = ''; - /** - * Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string source_snapshot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $source_snapshot = ''; - - /** - * @param string $parent Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. - * @param string $tableId Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * @param string $sourceSnapshot Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. Please see - * {@see BigtableTableAdminClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest - * - * @experimental - */ - public static function build(string $parent, string $tableId, string $sourceSnapshot): self - { - return (new self()) - ->setParent($parent) - ->setTableId($tableId) - ->setSourceSnapshot($sourceSnapshot); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * @type string $table_id - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * @type string $source_snapshot - * Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - - /** - * Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string source_snapshot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSourceSnapshot() - { - return $this->source_snapshot; - } - - /** - * Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string source_snapshot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->source_snapshot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php deleted file mode 100644 index 06608297cf48..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php +++ /dev/null @@ -1,265 +0,0 @@ -google.bigtable.admin.v2.CreateTableRequest - */ -class CreateTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table_id = ''; - /** - * Required. The Table to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table = null; - /** - * The optional list of row keys that will be used to initially split the - * table into several tablets (tablets are similar to HBase regions). - * Given two split keys, `s1` and `s2`, three tablets will be created, - * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. - * Example: - * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` - * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` - * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; - */ - private $initial_splits; - - /** - * @param string $parent Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. - * @param string $tableId Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * @param \Google\Cloud\Bigtable\Admin\V2\Table $table Required. The Table to create. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateTableRequest - * - * @experimental - */ - public static function build(string $parent, string $tableId, \Google\Cloud\Bigtable\Admin\V2\Table $table): self - { - return (new self()) - ->setParent($parent) - ->setTableId($tableId) - ->setTable($table); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * @type string $table_id - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * @type \Google\Cloud\Bigtable\Admin\V2\Table $table - * Required. The Table to create. - * @type array<\Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split>|\Google\Protobuf\Internal\RepeatedField $initial_splits - * The optional list of row keys that will be used to initially split the - * table into several tablets (tablets are similar to HBase regions). - * Given two split keys, `s1` and `s2`, three tablets will be created, - * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. - * Example: - * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` - * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` - * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - - /** - * Required. The Table to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Table|null - */ - public function getTable() - { - return $this->table; - } - - public function hasTable() - { - return isset($this->table); - } - - public function clearTable() - { - unset($this->table); - } - - /** - * Required. The Table to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Table $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table::class); - $this->table = $var; - - return $this; - } - - /** - * The optional list of row keys that will be used to initially split the - * table into several tablets (tablets are similar to HBase regions). - * Given two split keys, `s1` and `s2`, three tablets will be created, - * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. - * Example: - * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` - * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` - * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInitialSplits() - { - return $this->initial_splits; - } - - /** - * The optional list of row keys that will be used to initially split the - * table into several tablets (tablets are similar to HBase regions). - * Given two split keys, `s1` and `s2`, three tablets will be created, - * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. - * Example: - * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` - * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` - * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; - * @param array<\Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInitialSplits($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split::class); - $this->initial_splits = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php deleted file mode 100644 index af1990b8531e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php +++ /dev/null @@ -1,70 +0,0 @@ -google.bigtable.admin.v2.CreateTableRequest.Split - */ -class Split extends \Google\Protobuf\Internal\Message -{ - /** - * Row key to use as an initial tablet boundary. - * - * Generated from protobuf field bytes key = 1; - */ - protected $key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Row key to use as an initial tablet boundary. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Row key to use as an initial tablet boundary. - * - * Generated from protobuf field bytes key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Row key to use as an initial tablet boundary. - * - * Generated from protobuf field bytes key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, False); - $this->key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Split::class, \Google\Cloud\Bigtable\Admin\V2\CreateTableRequest_Split::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DataBoostReadLocalWrites.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DataBoostReadLocalWrites.php deleted file mode 100644 index 6d8e2927312c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DataBoostReadLocalWrites.php +++ /dev/null @@ -1,34 +0,0 @@ -google.bigtable.admin.v2.DataBoostReadLocalWrites - */ -class DataBoostReadLocalWrites extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php deleted file mode 100644 index d5e04caa49fc..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.bigtable.admin.v2.DeleteAppProfileRequest - */ -class DeleteAppProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. If true, ignore safety checks when deleting the app profile. - * - * Generated from protobuf field bool ignore_warnings = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ignore_warnings = false; - - /** - * @param string $name Required. The unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. Please see - * {@see BigtableInstanceAdminClient::appProfileName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteAppProfileRequest - * - * @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 unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * @type bool $ignore_warnings - * Required. If true, ignore safety checks when deleting the app profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. If true, ignore safety checks when deleting the app profile. - * - * Generated from protobuf field bool ignore_warnings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getIgnoreWarnings() - { - return $this->ignore_warnings; - } - - /** - * Required. If true, ignore safety checks when deleting the app profile. - * - * Generated from protobuf field bool ignore_warnings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setIgnoreWarnings($var) - { - GPBUtil::checkBool($var); - $this->ignore_warnings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAuthorizedViewRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAuthorizedViewRequest.php deleted file mode 100644 index e623fe8ebb9d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAuthorizedViewRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.bigtable.admin.v2.DeleteAuthorizedViewRequest - */ -class DeleteAuthorizedViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the AuthorizedView to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The current etag of the AuthorizedView. - * If an etag is provided and does not match the current etag of the - * AuthorizedView, deletion will be blocked and an ABORTED error will be - * returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The unique name of the AuthorizedView to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. Please see - * {@see BigtableTableAdminClient::authorizedViewName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteAuthorizedViewRequest - * - * @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 unique name of the AuthorizedView to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. - * @type string $etag - * Optional. The current etag of the AuthorizedView. - * If an etag is provided and does not match the current etag of the - * AuthorizedView, deletion will be blocked and an ABORTED error will be - * returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the AuthorizedView to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the AuthorizedView to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. - * - * 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 current etag of the AuthorizedView. - * If an etag is provided and does not match the current etag of the - * AuthorizedView, deletion will be blocked and an ABORTED error will be - * returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The current etag of the AuthorizedView. - * If an etag is provided and does not match the current etag of the - * AuthorizedView, deletion will be blocked and an ABORTED error will be - * returned. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php deleted file mode 100644 index 6bd500313c94..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup to delete. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the backup to delete. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. Please see - * {@see BigtableTableAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteBackupRequest - * - * @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. Name of the backup to delete. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup to delete. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * - * 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. Name of the backup to delete. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php deleted file mode 100644 index 690cdb21a15f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.DeleteClusterRequest - */ -class DeleteClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableInstanceAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteClusterRequest - * - * @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 unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php deleted file mode 100644 index bcbc1c1a1e58..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteInstanceRequest - * - * @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 unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php deleted file mode 100644 index b83ec8b2043b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.bigtable.admin.v2.DeleteSnapshotRequest - */ -class DeleteSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. Please see - * {@see BigtableTableAdminClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteSnapshotRequest - * - * @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 unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php deleted file mode 100644 index 3bd4eac51dc3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.DeleteTableRequest - */ -class DeleteTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteTableRequest - * - * @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 unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php deleted file mode 100644 index a005c44024c4..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.bigtable.admin.v2.DropRowRangeRequest - */ -class DropRowRangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table on which to drop a range of rows. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - protected $target; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the table on which to drop a range of rows. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type string $row_key_prefix - * Delete all rows that start with this row key prefix. Prefix cannot be - * zero length. - * @type bool $delete_all_data_from_table - * Delete all rows in the table. Setting this to false is a no-op. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table on which to drop a range of rows. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the table on which to drop a range of rows. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Delete all rows that start with this row key prefix. Prefix cannot be - * zero length. - * - * Generated from protobuf field bytes row_key_prefix = 2; - * @return string - */ - public function getRowKeyPrefix() - { - return $this->readOneof(2); - } - - public function hasRowKeyPrefix() - { - return $this->hasOneof(2); - } - - /** - * Delete all rows that start with this row key prefix. Prefix cannot be - * zero length. - * - * Generated from protobuf field bytes row_key_prefix = 2; - * @param string $var - * @return $this - */ - public function setRowKeyPrefix($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Delete all rows in the table. Setting this to false is a no-op. - * - * Generated from protobuf field bool delete_all_data_from_table = 3; - * @return bool - */ - public function getDeleteAllDataFromTable() - { - return $this->readOneof(3); - } - - public function hasDeleteAllDataFromTable() - { - return $this->hasOneof(3); - } - - /** - * Delete all rows in the table. Setting this to false is a no-op. - * - * Generated from protobuf field bool delete_all_data_from_table = 3; - * @param bool $var - * @return $this - */ - public function setDeleteAllDataFromTable($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php deleted file mode 100644 index d13861cd38e2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php +++ /dev/null @@ -1,160 +0,0 @@ -google.bigtable.admin.v2.EncryptionInfo - */ -class EncryptionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The type of encryption used to protect this resource. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_type = 0; - /** - * Output only. The status of encrypt/decrypt calls on underlying data for - * this resource. Regardless of status, the existing data is always encrypted - * at rest. - * - * Generated from protobuf field .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_status = null; - /** - * Output only. The version of the Cloud KMS key specified in the parent - * cluster that is in use for the data underlying this table. - * - * Generated from protobuf field string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $kms_key_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $encryption_type - * Output only. The type of encryption used to protect this resource. - * @type \Google\Rpc\Status $encryption_status - * Output only. The status of encrypt/decrypt calls on underlying data for - * this resource. Regardless of status, the existing data is always encrypted - * at rest. - * @type string $kms_key_version - * Output only. The version of the Cloud KMS key specified in the parent - * cluster that is in use for the data underlying this table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The type of encryption used to protect this resource. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEncryptionType() - { - return $this->encryption_type; - } - - /** - * Output only. The type of encryption used to protect this resource. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEncryptionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo\EncryptionType::class); - $this->encryption_type = $var; - - return $this; - } - - /** - * Output only. The status of encrypt/decrypt calls on underlying data for - * this resource. Regardless of status, the existing data is always encrypted - * at rest. - * - * Generated from protobuf field .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getEncryptionStatus() - { - return $this->encryption_status; - } - - public function hasEncryptionStatus() - { - return isset($this->encryption_status); - } - - public function clearEncryptionStatus() - { - unset($this->encryption_status); - } - - /** - * Output only. The status of encrypt/decrypt calls on underlying data for - * this resource. Regardless of status, the existing data is always encrypted - * at rest. - * - * Generated from protobuf field .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setEncryptionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->encryption_status = $var; - - return $this; - } - - /** - * Output only. The version of the Cloud KMS key specified in the parent - * cluster that is in use for the data underlying this table. - * - * Generated from protobuf field string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsKeyVersion() - { - return $this->kms_key_version; - } - - /** - * Output only. The version of the Cloud KMS key specified in the parent - * cluster that is in use for the data underlying this table. - * - * Generated from protobuf field string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKeyVersion($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php deleted file mode 100644 index 076657b976c4..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php +++ /dev/null @@ -1,72 +0,0 @@ -google.bigtable.admin.v2.EncryptionInfo.EncryptionType - */ -class EncryptionType -{ - /** - * Encryption type was not specified, though data at rest remains encrypted. - * - * Generated from protobuf enum ENCRYPTION_TYPE_UNSPECIFIED = 0; - */ - const ENCRYPTION_TYPE_UNSPECIFIED = 0; - /** - * The data backing this resource is encrypted at rest with a key that is - * fully managed by Google. No key version or status will be populated. - * This is the default state. - * - * Generated from protobuf enum GOOGLE_DEFAULT_ENCRYPTION = 1; - */ - const GOOGLE_DEFAULT_ENCRYPTION = 1; - /** - * The data backing this resource is encrypted at rest with a key that is - * managed by the customer. - * The in-use version of the key and its status are populated for - * CMEK-protected tables. - * CMEK-protected backups are pinned to the key version that was in use at - * the time the backup was taken. This key version is populated but its - * status is not tracked and is reported as `UNKNOWN`. - * - * Generated from protobuf enum CUSTOMER_MANAGED_ENCRYPTION = 2; - */ - const CUSTOMER_MANAGED_ENCRYPTION = 2; - - private static $valueToName = [ - self::ENCRYPTION_TYPE_UNSPECIFIED => 'ENCRYPTION_TYPE_UNSPECIFIED', - self::GOOGLE_DEFAULT_ENCRYPTION => 'GOOGLE_DEFAULT_ENCRYPTION', - self::CUSTOMER_MANAGED_ENCRYPTION => 'CUSTOMER_MANAGED_ENCRYPTION', - ]; - - 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(EncryptionType::class, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo_EncryptionType::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php deleted file mode 100644 index 58f3cb15f627..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php +++ /dev/null @@ -1,180 +0,0 @@ -google.bigtable.admin.v2.GcRule - */ -class GcRule extends \Google\Protobuf\Internal\Message -{ - protected $rule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_num_versions - * Delete all cells in a column except the most recent N. - * @type \Google\Protobuf\Duration $max_age - * Delete cells in a column older than the given age. - * Values must be at least one millisecond, and will be truncated to - * microsecond granularity. - * @type \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection $intersection - * Delete cells that would be deleted by every nested rule. - * @type \Google\Cloud\Bigtable\Admin\V2\GcRule\Union $union - * Delete cells that would be deleted by any nested rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Delete all cells in a column except the most recent N. - * - * Generated from protobuf field int32 max_num_versions = 1; - * @return int - */ - public function getMaxNumVersions() - { - return $this->readOneof(1); - } - - public function hasMaxNumVersions() - { - return $this->hasOneof(1); - } - - /** - * Delete all cells in a column except the most recent N. - * - * Generated from protobuf field int32 max_num_versions = 1; - * @param int $var - * @return $this - */ - public function setMaxNumVersions($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Delete cells in a column older than the given age. - * Values must be at least one millisecond, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxAge() - { - return $this->readOneof(2); - } - - public function hasMaxAge() - { - return $this->hasOneof(2); - } - - /** - * Delete cells in a column older than the given age. - * Values must be at least one millisecond, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxAge($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Delete cells that would be deleted by every nested rule. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Intersection intersection = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection|null - */ - public function getIntersection() - { - return $this->readOneof(3); - } - - public function hasIntersection() - { - return $this->hasOneof(3); - } - - /** - * Delete cells that would be deleted by every nested rule. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Intersection intersection = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection $var - * @return $this - */ - public function setIntersection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Delete cells that would be deleted by any nested rule. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Union union = 4; - * @return \Google\Cloud\Bigtable\Admin\V2\GcRule\Union|null - */ - public function getUnion() - { - return $this->readOneof(4); - } - - public function hasUnion() - { - return $this->hasOneof(4); - } - - /** - * Delete cells that would be deleted by any nested rule. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Union union = 4; - * @param \Google\Cloud\Bigtable\Admin\V2\GcRule\Union $var - * @return $this - */ - public function setUnion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule\Union::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getRule() - { - return $this->whichOneof("rule"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php deleted file mode 100644 index 3cdcac56ac62..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php +++ /dev/null @@ -1,70 +0,0 @@ -google.bigtable.admin.v2.GcRule.Intersection - */ -class Intersection extends \Google\Protobuf\Internal\Message -{ - /** - * Only delete cells which would be deleted by every element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - */ - private $rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Only delete cells which would be deleted by every element of `rules`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Only delete cells which would be deleted by every element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Only delete cells which would be deleted by every element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\GcRule::class); - $this->rules = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Intersection::class, \Google\Cloud\Bigtable\Admin\V2\GcRule_Intersection::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php deleted file mode 100644 index 0569197be3ac..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php +++ /dev/null @@ -1,70 +0,0 @@ -google.bigtable.admin.v2.GcRule.Union - */ -class Union extends \Google\Protobuf\Internal\Message -{ - /** - * Delete cells which would be deleted by any element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - */ - private $rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Delete cells which would be deleted by any element of `rules`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Delete cells which would be deleted by any element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Delete cells which would be deleted by any element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\GcRule::class); - $this->rules = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Union::class, \Google\Cloud\Bigtable\Admin\V2\GcRule_Union::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php deleted file mode 100644 index de27631825e5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.GenerateConsistencyTokenRequest - */ -class GenerateConsistencyTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenRequest - * - * @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 unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php deleted file mode 100644 index 6b02098b9ffc..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.bigtable.admin.v2.GenerateConsistencyTokenResponse - */ -class GenerateConsistencyTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated consistency token. - * - * Generated from protobuf field string consistency_token = 1; - */ - protected $consistency_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $consistency_token - * The generated consistency token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The generated consistency token. - * - * Generated from protobuf field string consistency_token = 1; - * @return string - */ - public function getConsistencyToken() - { - return $this->consistency_token; - } - - /** - * The generated consistency token. - * - * Generated from protobuf field string consistency_token = 1; - * @param string $var - * @return $this - */ - public function setConsistencyToken($var) - { - GPBUtil::checkString($var, True); - $this->consistency_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php deleted file mode 100644 index 017793bbb5ff..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.GetAppProfileRequest - */ -class GetAppProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. Please see - * {@see BigtableInstanceAdminClient::appProfileName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetAppProfileRequest - * - * @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 unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAuthorizedViewRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAuthorizedViewRequest.php deleted file mode 100644 index 385c1c34c266..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAuthorizedViewRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.bigtable.admin.v2.GetAuthorizedViewRequest - */ -class GetAuthorizedViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested AuthorizedView. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The resource_view to be applied to the returned AuthorizedView's - * fields. Default to BASIC. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The unique name of the requested AuthorizedView. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. Please see - * {@see BigtableTableAdminClient::authorizedViewName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetAuthorizedViewRequest - * - * @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 unique name of the requested AuthorizedView. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. - * @type int $view - * Optional. The resource_view to be applied to the returned AuthorizedView's - * fields. Default to BASIC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested AuthorizedView. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the requested AuthorizedView. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. - * - * 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 resource_view to be applied to the returned AuthorizedView's - * fields. Default to BASIC. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The resource_view to be applied to the returned AuthorizedView's - * fields. Default to BASIC. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\ResponseView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php deleted file mode 100644 index 5f73e6f2900e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the backup. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. Please see - * {@see BigtableTableAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetBackupRequest - * - * @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. Name of the backup. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * - * 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. Name of the backup. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php deleted file mode 100644 index 037844cc19a3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.GetClusterRequest - */ -class GetClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableInstanceAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetClusterRequest - * - * @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 unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php deleted file mode 100644 index 28ca52c590cd..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php deleted file mode 100644 index 5b3547a68e7a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.bigtable.admin.v2.GetSnapshotRequest - */ -class GetSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. Please see - * {@see BigtableTableAdminClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetSnapshotRequest - * - * @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 unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php deleted file mode 100644 index 34142b7797a5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.bigtable.admin.v2.GetTableRequest - */ -class GetTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The view to be applied to the returned table's fields. - * Defaults to `SCHEMA_VIEW` if unspecified. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - */ - protected $view = 0; - - /** - * @param string $name Required. The unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetTableRequest - * - * @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 unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type int $view - * The view to be applied to the returned table's fields. - * Defaults to `SCHEMA_VIEW` if unspecified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The view to be applied to the returned table's fields. - * Defaults to `SCHEMA_VIEW` if unspecified. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The view to be applied to the returned table's fields. - * Defaults to `SCHEMA_VIEW` if unspecified. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\View::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php deleted file mode 100644 index 4d75a90e66ee..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php +++ /dev/null @@ -1,315 +0,0 @@ -google.bigtable.admin.v2.HotTablet - */ -class HotTablet extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the hot tablet. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Name of the table that contains the tablet. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string table_name = 2 [(.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * Output only. The start time of the hot tablet. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The end time of the hot tablet. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Tablet Start Key (inclusive). - * - * Generated from protobuf field string start_key = 5; - */ - protected $start_key = ''; - /** - * Tablet End Key (inclusive). - * - * Generated from protobuf field string end_key = 6; - */ - protected $end_key = ''; - /** - * Output only. The average CPU usage spent by a node on this tablet over the - * start_time to end_time time range. The percentage is the amount of CPU used - * by the node to serve the tablet, from 0% (tablet was not interacted with) - * to 100% (the node spent all cycles serving the hot tablet). - * - * Generated from protobuf field float node_cpu_usage_percent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_cpu_usage_percent = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the hot tablet. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. - * @type string $table_name - * Name of the table that contains the tablet. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The start time of the hot tablet. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The end time of the hot tablet. - * @type string $start_key - * Tablet Start Key (inclusive). - * @type string $end_key - * Tablet End Key (inclusive). - * @type float $node_cpu_usage_percent - * Output only. The average CPU usage spent by a node on this tablet over the - * start_time to end_time time range. The percentage is the amount of CPU used - * by the node to serve the tablet, from 0% (tablet was not interacted with) - * to 100% (the node spent all cycles serving the hot tablet). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the hot tablet. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the hot tablet. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. - * - * 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; - } - - /** - * Name of the table that contains the tablet. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string table_name = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Name of the table that contains the tablet. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string table_name = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * Output only. The start time of the hot tablet. - * - * 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 start time of the hot tablet. - * - * 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 end time of the hot tablet. - * - * 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 end time of the hot tablet. - * - * 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; - } - - /** - * Tablet Start Key (inclusive). - * - * Generated from protobuf field string start_key = 5; - * @return string - */ - public function getStartKey() - { - return $this->start_key; - } - - /** - * Tablet Start Key (inclusive). - * - * Generated from protobuf field string start_key = 5; - * @param string $var - * @return $this - */ - public function setStartKey($var) - { - GPBUtil::checkString($var, True); - $this->start_key = $var; - - return $this; - } - - /** - * Tablet End Key (inclusive). - * - * Generated from protobuf field string end_key = 6; - * @return string - */ - public function getEndKey() - { - return $this->end_key; - } - - /** - * Tablet End Key (inclusive). - * - * Generated from protobuf field string end_key = 6; - * @param string $var - * @return $this - */ - public function setEndKey($var) - { - GPBUtil::checkString($var, True); - $this->end_key = $var; - - return $this; - } - - /** - * Output only. The average CPU usage spent by a node on this tablet over the - * start_time to end_time time range. The percentage is the amount of CPU used - * by the node to serve the tablet, from 0% (tablet was not interacted with) - * to 100% (the node spent all cycles serving the hot tablet). - * - * Generated from protobuf field float node_cpu_usage_percent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getNodeCpuUsagePercent() - { - return $this->node_cpu_usage_percent; - } - - /** - * Output only. The average CPU usage spent by a node on this tablet over the - * start_time to end_time time range. The percentage is the amount of CPU used - * by the node to serve the tablet, from 0% (tablet was not interacted with) - * to 100% (the node spent all cycles serving the hot tablet). - * - * Generated from protobuf field float node_cpu_usage_percent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setNodeCpuUsagePercent($var) - { - GPBUtil::checkFloat($var); - $this->node_cpu_usage_percent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php deleted file mode 100644 index 69fc8d87d690..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php +++ /dev/null @@ -1,354 +0,0 @@ -google.bigtable.admin.v2.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the instance. Values are of the form - * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The descriptive name for this instance as it appears in UIs. - * Can be changed at any time, but should be kept globally unique - * to avoid confusion. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * (`OutputOnly`) - * The current state of the instance. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.State state = 3; - */ - protected $state = 0; - /** - * The type of the instance. Defaults to `PRODUCTION`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.Type type = 4; - */ - protected $type = 0; - /** - * Labels are a flexible and lightweight mechanism for organizing cloud - * resources into groups that reflect a customer's organizational needs and - * deployment strategies. They can be used to filter resources and aggregate - * metrics. - * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. - * * Keys and values must both be under 128 bytes. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * Output only. A server-assigned timestamp representing when this Instance - * was created. For instances created before this field was added (August - * 2021), this value is `seconds: 0, nanos: 1`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the instance. Values are of the form - * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - * @type string $display_name - * Required. The descriptive name for this instance as it appears in UIs. - * Can be changed at any time, but should be kept globally unique - * to avoid confusion. - * @type int $state - * (`OutputOnly`) - * The current state of the instance. - * @type int $type - * The type of the instance. Defaults to `PRODUCTION`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels are a flexible and lightweight mechanism for organizing cloud - * resources into groups that reflect a customer's organizational needs and - * deployment strategies. They can be used to filter resources and aggregate - * metrics. - * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. - * * Keys and values must both be under 128 bytes. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. A server-assigned timestamp representing when this Instance - * was created. For instances created before this field was added (August - * 2021), this value is `seconds: 0, nanos: 1`. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the instance. Values are of the form - * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the instance. Values are of the form - * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The descriptive name for this instance as it appears in UIs. - * Can be changed at any time, but should be kept globally unique - * to avoid confusion. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The descriptive name for this instance as it appears in UIs. - * Can be changed at any time, but should be kept globally unique - * to avoid confusion. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * (`OutputOnly`) - * The current state of the instance. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.State state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * (`OutputOnly`) - * The current state of the instance. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.State state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * The type of the instance. Defaults to `PRODUCTION`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.Type type = 4; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the instance. Defaults to `PRODUCTION`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.Type type = 4; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Instance\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Labels are a flexible and lightweight mechanism for organizing cloud - * resources into groups that reflect a customer's organizational needs and - * deployment strategies. They can be used to filter resources and aggregate - * metrics. - * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. - * * Keys and values must both be under 128 bytes. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels are a flexible and lightweight mechanism for organizing cloud - * resources into groups that reflect a customer's organizational needs and - * deployment strategies. They can be used to filter resources and aggregate - * metrics. - * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. - * * Keys and values must both be under 128 bytes. - * - * Generated from protobuf field map labels = 5; - * @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. A server-assigned timestamp representing when this Instance - * was created. For instances created before this field was added (August - * 2021), this value is `seconds: 0, nanos: 1`. - * - * 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. A server-assigned timestamp representing when this Instance - * was created. For instances created before this field was added (August - * 2021), this value is `seconds: 0, nanos: 1`. - * - * 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. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php deleted file mode 100644 index 8442f3728c83..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php +++ /dev/null @@ -1,66 +0,0 @@ -google.bigtable.admin.v2.Instance.State - */ -class State -{ - /** - * The state of the instance could not be determined. - * - * Generated from protobuf enum STATE_NOT_KNOWN = 0; - */ - const STATE_NOT_KNOWN = 0; - /** - * The instance has been successfully created and can serve requests - * to its tables. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * The instance is currently being created, and may be destroyed - * if the creation process encounters an error. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - - private static $valueToName = [ - self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', - self::READY => 'READY', - self::CREATING => 'CREATING', - ]; - - 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\Bigtable\Admin\V2\Instance_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php deleted file mode 100644 index 8e68c47b9d0f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php +++ /dev/null @@ -1,68 +0,0 @@ -google.bigtable.admin.v2.Instance.Type - */ -class Type -{ - /** - * The type of the instance is unspecified. If set when creating an - * instance, a `PRODUCTION` instance will be created. If set when updating - * an instance, the type will be left unchanged. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * An instance meant for production use. `serve_nodes` must be set - * on the cluster. - * - * Generated from protobuf enum PRODUCTION = 1; - */ - const PRODUCTION = 1; - /** - * DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces - * a higher minimum node count than DEVELOPMENT. - * - * Generated from protobuf enum DEVELOPMENT = 2; - */ - const DEVELOPMENT = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PRODUCTION => 'PRODUCTION', - self::DEVELOPMENT => 'DEVELOPMENT', - ]; - - 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\Bigtable\Admin\V2\Instance_Type::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php deleted file mode 100644 index 42d6c478cd5c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.bigtable.admin.v2.ListAppProfilesRequest - */ -class ListAppProfilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListAppProfilesRequest - * - * @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 unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. - * @type int $page_size - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * @type string $page_token - * The value of `next_page_token` returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. - * - * 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 unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. - * - * 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; - } - - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 2; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php deleted file mode 100644 index c49770b40a07..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php +++ /dev/null @@ -1,155 +0,0 @@ -google.bigtable.admin.v2.ListAppProfilesResponse - */ -class ListAppProfilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested app profiles. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; - */ - private $app_profiles; - /** - * Set if not all app profiles could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations from which AppProfile information could not be retrieved, - * due to an outage or some other transient condition. - * AppProfiles from these locations may be missing from `app_profiles`. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 3; - */ - private $failed_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\AppProfile>|\Google\Protobuf\Internal\RepeatedField $app_profiles - * The list of requested app profiles. - * @type string $next_page_token - * Set if not all app profiles could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * @type array|\Google\Protobuf\Internal\RepeatedField $failed_locations - * Locations from which AppProfile information could not be retrieved, - * due to an outage or some other transient condition. - * AppProfiles from these locations may be missing from `app_profiles`. - * Values are of the form `projects//locations/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested app profiles. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAppProfiles() - { - return $this->app_profiles; - } - - /** - * The list of requested app profiles. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\AppProfile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAppProfiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\AppProfile::class); - $this->app_profiles = $arr; - - return $this; - } - - /** - * Set if not all app profiles could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Set if not all app profiles could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations from which AppProfile information could not be retrieved, - * due to an outage or some other transient condition. - * AppProfiles from these locations may be missing from `app_profiles`. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFailedLocations() - { - return $this->failed_locations; - } - - /** - * Locations from which AppProfile information could not be retrieved, - * due to an outage or some other transient condition. - * AppProfiles from these locations may be missing from `app_profiles`. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFailedLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->failed_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsRequest.php deleted file mode 100644 index 4a02cb12c2c3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsRequest.php +++ /dev/null @@ -1,222 +0,0 @@ -google.bigtable.admin.v2.ListAuthorizedViewsRequest - */ -class ListAuthorizedViewsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table for which AuthorizedViews should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The resource_view to be applied to the returned views' fields. - * Default to NAME_ONLY. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $parent Required. The unique name of the table for which AuthorizedViews should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsRequest - * - * @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 unique name of the table for which AuthorizedViews should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type int $page_size - * Optional. Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * @type string $page_token - * Optional. The value of `next_page_token` returned by a previous call. - * @type int $view - * Optional. The resource_view to be applied to the returned views' fields. - * Default to NAME_ONLY. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table for which AuthorizedViews should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The unique name of the table for which AuthorizedViews should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * 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 results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * 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. The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The resource_view to be applied to the returned views' fields. - * Default to NAME_ONLY. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The resource_view to be applied to the returned views' fields. - * Default to NAME_ONLY. - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\ResponseView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsResponse.php deleted file mode 100644 index 83d26b843966..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAuthorizedViewsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.bigtable.admin.v2.ListAuthorizedViewsResponse - */ -class ListAuthorizedViewsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The AuthorizedViews present in the requested table. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; - */ - private $authorized_views; - /** - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\AuthorizedView>|\Google\Protobuf\Internal\RepeatedField $authorized_views - * The AuthorizedViews present in the requested table. - * @type string $next_page_token - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The AuthorizedViews present in the requested table. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAuthorizedViews() - { - return $this->authorized_views; - } - - /** - * The AuthorizedViews present in the requested table. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\AuthorizedView>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAuthorizedViews($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView::class); - $this->authorized_views = $arr; - - return $this; - } - - /** - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php deleted file mode 100644 index 6f5666e3bdbd..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php +++ /dev/null @@ -1,429 +0,0 @@ -google.bigtable.admin.v2.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * A filter expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is - * roughly synonymous with equality. Filter rules are case insensitive. - * The fields eligible for filtering are: - * * `name` - * * `source_table` - * * `state` - * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * To filter on multiple expressions, provide each separate expression within - * parentheses. By default, each expression is an AND expression. However, - * you can include AND, OR, and NOT expressions explicitly. - * Some examples of using filters are: - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `source_table:prod` - * --> The source_table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * An expression for specifying the sort order of the results of the request. - * The string value should specify one or more fields in - * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at - * https://aip.dev/132#ordering. - * Fields supported are: - * * name - * * source_table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * For example, "start_time". The default sorting order is ascending. - * To specify descending order for the field, a suffix " desc" should - * be appended to the field name. For example, "start_time desc". - * Redundant space characters in the syntax are insigificant. - * If order_by is empty, results will be sorted by `start_time` in descending - * order starting from the most recently created backup. - * - * Generated from protobuf field string order_by = 3; - */ - protected $order_by = ''; - /** - * Number of backups to be returned in the response. If 0 or - * less, defaults to the server's maximum allowed page size. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * If non-empty, `page_token` should contain a - * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] - * from a previous - * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the - * same `parent` and with the same `filter`. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListBackupsRequest - * - * @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 cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * @type string $filter - * A filter expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is - * roughly synonymous with equality. Filter rules are case insensitive. - * The fields eligible for filtering are: - * * `name` - * * `source_table` - * * `state` - * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * To filter on multiple expressions, provide each separate expression within - * parentheses. By default, each expression is an AND expression. However, - * you can include AND, OR, and NOT expressions explicitly. - * Some examples of using filters are: - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `source_table:prod` - * --> The source_table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB - * @type string $order_by - * An expression for specifying the sort order of the results of the request. - * The string value should specify one or more fields in - * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at - * https://aip.dev/132#ordering. - * Fields supported are: - * * name - * * source_table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * For example, "start_time". The default sorting order is ascending. - * To specify descending order for the field, a suffix " desc" should - * be appended to the field name. For example, "start_time desc". - * Redundant space characters in the syntax are insigificant. - * If order_by is empty, results will be sorted by `start_time` in descending - * order starting from the most recently created backup. - * @type int $page_size - * Number of backups to be returned in the response. If 0 or - * less, defaults to the server's maximum allowed page size. - * @type string $page_token - * If non-empty, `page_token` should contain a - * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] - * from a previous - * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the - * same `parent` and with the same `filter`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * 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 cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * 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; - } - - /** - * A filter expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is - * roughly synonymous with equality. Filter rules are case insensitive. - * The fields eligible for filtering are: - * * `name` - * * `source_table` - * * `state` - * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * To filter on multiple expressions, provide each separate expression within - * parentheses. By default, each expression is an AND expression. However, - * you can include AND, OR, and NOT expressions explicitly. - * Some examples of using filters are: - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `source_table:prod` - * --> The source_table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is - * roughly synonymous with equality. Filter rules are case insensitive. - * The fields eligible for filtering are: - * * `name` - * * `source_table` - * * `state` - * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * To filter on multiple expressions, provide each separate expression within - * parentheses. By default, each expression is an AND expression. However, - * you can include AND, OR, and NOT expressions explicitly. - * Some examples of using filters are: - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `source_table:prod` - * --> The source_table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * An expression for specifying the sort order of the results of the request. - * The string value should specify one or more fields in - * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at - * https://aip.dev/132#ordering. - * Fields supported are: - * * name - * * source_table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * For example, "start_time". The default sorting order is ascending. - * To specify descending order for the field, a suffix " desc" should - * be appended to the field name. For example, "start_time desc". - * Redundant space characters in the syntax are insigificant. - * If order_by is empty, results will be sorted by `start_time` in descending - * order starting from the most recently created backup. - * - * Generated from protobuf field string order_by = 3; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * An expression for specifying the sort order of the results of the request. - * The string value should specify one or more fields in - * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at - * https://aip.dev/132#ordering. - * Fields supported are: - * * name - * * source_table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * For example, "start_time". The default sorting order is ascending. - * To specify descending order for the field, a suffix " desc" should - * be appended to the field name. For example, "start_time desc". - * Redundant space characters in the syntax are insigificant. - * If order_by is empty, results will be sorted by `start_time` in descending - * order starting from the most recently created backup. - * - * Generated from protobuf field string order_by = 3; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Number of backups to be returned in the response. If 0 or - * less, defaults to the server's maximum allowed page size. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of backups to be returned in the response. If 0 or - * less, defaults to the server's maximum allowed page size. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If non-empty, `page_token` should contain a - * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] - * from a previous - * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the - * same `parent` and with the same `filter`. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If non-empty, `page_token` should contain a - * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] - * from a previous - * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the - * same `parent` and with the same `filter`. - * - * Generated from protobuf field string page_token = 5; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php deleted file mode 100644 index c9792bd915b6..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.bigtable.admin.v2.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching backups. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Backup backups = 1; - */ - private $backups; - /** - * `next_page_token` can be sent in a subsequent - * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call - * to fetch more of the matching backups. - * - * 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\Bigtable\Admin\V2\Backup>|\Google\Protobuf\Internal\RepeatedField $backups - * The list of matching backups. - * @type string $next_page_token - * `next_page_token` can be sent in a subsequent - * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call - * to fetch more of the matching backups. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching backups. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Backup backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackups() - { - return $this->backups; - } - - /** - * The list of matching backups. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Backup backups = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Backup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * `next_page_token` can be sent in a subsequent - * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call - * to fetch more of the matching backups. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * `next_page_token` can be sent in a subsequent - * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call - * to fetch more of the matching backups. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php deleted file mode 100644 index 00a12138e516..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -google.bigtable.admin.v2.ListClustersRequest - */ -class ListClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListClustersRequest - * - * @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 unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. - * @type string $page_token - * DEPRECATED: This field is unused and ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. - * - * 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 unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. - * - * 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; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php deleted file mode 100644 index 84ccf514aa70..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.bigtable.admin.v2.ListClustersResponse - */ -class ListClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested clusters. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Cluster clusters = 1; - */ - private $clusters; - /** - * Locations from which Cluster information could not be retrieved, - * due to an outage or some other transient condition. - * Clusters from these locations may be missing from `clusters`, - * or may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - */ - private $failed_locations; - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters - * The list of requested clusters. - * @type array|\Google\Protobuf\Internal\RepeatedField $failed_locations - * Locations from which Cluster information could not be retrieved, - * due to an outage or some other transient condition. - * Clusters from these locations may be missing from `clusters`, - * or may only have partial information returned. - * Values are of the form `projects//locations/` - * @type string $next_page_token - * DEPRECATED: This field is unused and ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested clusters. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Cluster clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * The list of requested clusters. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Cluster clusters = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Cluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->clusters = $arr; - - return $this; - } - - /** - * Locations from which Cluster information could not be retrieved, - * due to an outage or some other transient condition. - * Clusters from these locations may be missing from `clusters`, - * or may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFailedLocations() - { - return $this->failed_locations; - } - - /** - * Locations from which Cluster information could not be retrieved, - * due to an outage or some other transient condition. - * Clusters from these locations may be missing from `clusters`, - * or may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFailedLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->failed_locations = $arr; - - return $this; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php deleted file mode 100644 index 2fcefef12c29..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php +++ /dev/null @@ -1,291 +0,0 @@ -google.bigtable.admin.v2.ListHotTabletsRequest - */ -class ListHotTabletsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The start time to list hot tablets. The hot tablets in the response will - * have start times between the requested start time and end time. Start time - * defaults to Now if it is unset, and end time defaults to Now - 24 hours if - * it is unset. The start time should be less than the end time, and the - * maximum allowed time range between start time and end time is 48 hours. - * Start time and end time should have values between Now and Now - 14 days. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * The end time to list hot tablets. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - /** - * Maximum number of results per page. - * A page_size that is empty or zero lets the server choose the number of - * items to return. A page_size which is strictly positive will return at most - * that many items. A negative page_size will cause an error. - * Following the first request, subsequent paginated calls do not need a - * page_size field. If a page_size is set in subsequent calls, it must match - * the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableInstanceAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListHotTabletsRequest - * - * @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 cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type \Google\Protobuf\Timestamp $start_time - * The start time to list hot tablets. The hot tablets in the response will - * have start times between the requested start time and end time. Start time - * defaults to Now if it is unset, and end time defaults to Now - 24 hours if - * it is unset. The start time should be less than the end time, and the - * maximum allowed time range between start time and end time is 48 hours. - * Start time and end time should have values between Now and Now - 14 days. - * @type \Google\Protobuf\Timestamp $end_time - * The end time to list hot tablets. - * @type int $page_size - * Maximum number of results per page. - * A page_size that is empty or zero lets the server choose the number of - * items to return. A page_size which is strictly positive will return at most - * that many items. A negative page_size will cause an error. - * Following the first request, subsequent paginated calls do not need a - * page_size field. If a page_size is set in subsequent calls, it must match - * the page_size given in the first request. - * @type string $page_token - * The value of `next_page_token` returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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 cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The start time to list hot tablets. The hot tablets in the response will - * have start times between the requested start time and end time. Start time - * defaults to Now if it is unset, and end time defaults to Now - 24 hours if - * it is unset. The start time should be less than the end time, and the - * maximum allowed time range between start time and end time is 48 hours. - * Start time and end time should have values between Now and Now - 14 days. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 start time to list hot tablets. The hot tablets in the response will - * have start times between the requested start time and end time. Start time - * defaults to Now if it is unset, and end time defaults to Now - 24 hours if - * it is unset. The start time should be less than the end time, and the - * maximum allowed time range between start time and end time is 48 hours. - * Start time and end time should have values between Now and Now - 14 days. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 end time to list hot tablets. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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 end time to list hot tablets. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Maximum number of results per page. - * A page_size that is empty or zero lets the server choose the number of - * items to return. A page_size which is strictly positive will return at most - * that many items. A negative page_size will cause an error. - * Following the first request, subsequent paginated calls do not need a - * page_size field. If a page_size is set in subsequent calls, it must match - * the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of results per page. - * A page_size that is empty or zero lets the server choose the number of - * items to return. A page_size which is strictly positive will return at most - * that many items. A negative page_size will cause an error. - * Following the first request, subsequent paginated calls do not need a - * page_size field. If a page_size is set in subsequent calls, it must match - * the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 5; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php deleted file mode 100644 index 39b6a733dade..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php +++ /dev/null @@ -1,125 +0,0 @@ -google.bigtable.admin.v2.ListHotTabletsResponse - */ -class ListHotTabletsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of hot tablets in the tables of the requested cluster that fall - * within the requested time range. Hot tablets are ordered by node cpu usage - * percent. If there are multiple hot tablets that correspond to the same - * tablet within a 15-minute interval, only the hot tablet with the highest - * node cpu usage will be included in the response. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; - */ - private $hot_tablets; - /** - * Set if not all hot tablets could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\HotTablet>|\Google\Protobuf\Internal\RepeatedField $hot_tablets - * List of hot tablets in the tables of the requested cluster that fall - * within the requested time range. Hot tablets are ordered by node cpu usage - * percent. If there are multiple hot tablets that correspond to the same - * tablet within a 15-minute interval, only the hot tablet with the highest - * node cpu usage will be included in the response. - * @type string $next_page_token - * Set if not all hot tablets could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of hot tablets in the tables of the requested cluster that fall - * within the requested time range. Hot tablets are ordered by node cpu usage - * percent. If there are multiple hot tablets that correspond to the same - * tablet within a 15-minute interval, only the hot tablet with the highest - * node cpu usage will be included in the response. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHotTablets() - { - return $this->hot_tablets; - } - - /** - * List of hot tablets in the tables of the requested cluster that fall - * within the requested time range. Hot tablets are ordered by node cpu usage - * percent. If there are multiple hot tablets that correspond to the same - * tablet within a 15-minute interval, only the hot tablet with the highest - * node cpu usage will be included in the response. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\HotTablet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHotTablets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\HotTablet::class); - $this->hot_tablets = $arr; - - return $this; - } - - /** - * Set if not all hot tablets could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Set if not all hot tablets could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php deleted file mode 100644 index e0d88b2803fa..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.bigtable.admin.v2.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. Please see - * {@see BigtableInstanceAdminClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListInstancesRequest - * - * @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 unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. - * @type string $page_token - * DEPRECATED: This field is unused and ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. - * - * 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 unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. - * - * 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; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php deleted file mode 100644 index 6e08425dbe3e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php +++ /dev/null @@ -1,155 +0,0 @@ -google.bigtable.admin.v2.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested instances. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Instance instances = 1; - */ - private $instances; - /** - * Locations from which Instance information could not be retrieved, - * due to an outage or some other transient condition. - * Instances whose Clusters are all in one of the failed locations - * may be missing from `instances`, and Instances with at least one - * Cluster in a failed location may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - */ - private $failed_locations; - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * The list of requested instances. - * @type array|\Google\Protobuf\Internal\RepeatedField $failed_locations - * Locations from which Instance information could not be retrieved, - * due to an outage or some other transient condition. - * Instances whose Clusters are all in one of the failed locations - * may be missing from `instances`, and Instances with at least one - * Cluster in a failed location may only have partial information returned. - * Values are of the form `projects//locations/` - * @type string $next_page_token - * DEPRECATED: This field is unused and ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested instances. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * The list of requested instances. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Instance instances = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * Locations from which Instance information could not be retrieved, - * due to an outage or some other transient condition. - * Instances whose Clusters are all in one of the failed locations - * may be missing from `instances`, and Instances with at least one - * Cluster in a failed location may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFailedLocations() - { - return $this->failed_locations; - } - - /** - * Locations from which Instance information could not be retrieved, - * due to an outage or some other transient condition. - * Instances whose Clusters are all in one of the failed locations - * may be missing from `instances`, and Instances with at least one - * Cluster in a failed location may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFailedLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->failed_locations = $arr; - - return $this; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php deleted file mode 100644 index 5ee84a207816..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.bigtable.admin.v2.ListSnapshotsRequest - */ -class ListSnapshotsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of snapshots to return per page. - * CURRENTLY UNIMPLEMENTED AND IGNORED. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListSnapshotsRequest - * - * @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 unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * @type int $page_size - * The maximum number of snapshots to return per page. - * CURRENTLY UNIMPLEMENTED AND IGNORED. - * @type string $page_token - * The value of `next_page_token` returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * 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 unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of snapshots to return per page. - * CURRENTLY UNIMPLEMENTED AND IGNORED. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of snapshots to return per page. - * CURRENTLY UNIMPLEMENTED AND IGNORED. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php deleted file mode 100644 index c3d9df13f7e0..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php +++ /dev/null @@ -1,114 +0,0 @@ -google.bigtable.admin.v2.ListSnapshotsResponse - */ -class ListSnapshotsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The snapshots present in the requested cluster. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; - */ - private $snapshots; - /** - * Set if not all snapshots could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\Snapshot>|\Google\Protobuf\Internal\RepeatedField $snapshots - * The snapshots present in the requested cluster. - * @type string $next_page_token - * Set if not all snapshots could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The snapshots present in the requested cluster. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSnapshots() - { - return $this->snapshots; - } - - /** - * The snapshots present in the requested cluster. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Snapshot>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSnapshots($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Snapshot::class); - $this->snapshots = $arr; - - return $this; - } - - /** - * Set if not all snapshots could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Set if not all snapshots could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php deleted file mode 100644 index d10580296a66..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php +++ /dev/null @@ -1,217 +0,0 @@ -google.bigtable.admin.v2.ListTablesRequest - */ -class ListTablesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The view to be applied to the returned tables' fields. - * NAME_ONLY view (default) and REPLICATION_VIEW are supported. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - */ - protected $view = 0; - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListTablesRequest - * - * @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 unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. - * @type int $view - * The view to be applied to the returned tables' fields. - * NAME_ONLY view (default) and REPLICATION_VIEW are supported. - * @type int $page_size - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * @type string $page_token - * The value of `next_page_token` returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The view to be applied to the returned tables' fields. - * NAME_ONLY view (default) and REPLICATION_VIEW are supported. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The view to be applied to the returned tables' fields. - * NAME_ONLY view (default) and REPLICATION_VIEW are supported. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\View::class); - $this->view = $var; - - return $this; - } - - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php deleted file mode 100644 index 1dac80ef82f5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.bigtable.admin.v2.ListTablesResponse - */ -class ListTablesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The tables present in the requested instance. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Table tables = 1; - */ - private $tables; - /** - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\Table>|\Google\Protobuf\Internal\RepeatedField $tables - * The tables present in the requested instance. - * @type string $next_page_token - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The tables present in the requested instance. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Table tables = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTables() - { - return $this->tables; - } - - /** - * The tables present in the requested instance. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Table tables = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Table>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Table::class); - $this->tables = $arr; - - return $this; - } - - /** - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php deleted file mode 100644 index 8960e4680f7d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.bigtable.admin.v2.ModifyColumnFamiliesRequest - */ -class ModifyColumnFamiliesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $modifications; - /** - * Optional. If true, ignore safety checks when modifying the column families. - * - * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_warnings = false; - - /** - * @param string $name Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * @param \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification[] $modifications Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * - * @return \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest - * - * @experimental - */ - public static function build(string $name, array $modifications): self - { - return (new self()) - ->setName($name) - ->setModifications($modifications); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type array<\Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification>|\Google\Protobuf\Internal\RepeatedField $modifications - * Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * @type bool $ignore_warnings - * Optional. If true, ignore safety checks when modifying the column families. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModifications() - { - return $this->modifications; - } - - /** - * Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification::class); - $this->modifications = $arr; - - return $this; - } - - /** - * Optional. If true, ignore safety checks when modifying the column families. - * - * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreWarnings() - { - return $this->ignore_warnings; - } - - /** - * Optional. If true, ignore safety checks when modifying the column families. - * - * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreWarnings($var) - { - GPBUtil::checkBool($var); - $this->ignore_warnings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php deleted file mode 100644 index 0675f7d22032..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php +++ /dev/null @@ -1,239 +0,0 @@ -google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification - */ -class Modification extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the column family to be modified. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` - * mod should be updated, ignored for other modification types. If unset or - * empty, we treat it as updating `gc_rule` to be backward compatible. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - protected $mod; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The ID of the column family to be modified. - * @type \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $create - * Create a new column family with the specified schema, or fail if - * one already exists with the given ID. - * @type \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $update - * Update an existing column family to the specified schema, or fail - * if no column family exists with the given ID. - * @type bool $drop - * Drop (delete) the column family with the given ID, or fail if no such - * family exists. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` - * mod should be updated, ignored for other modification types. If unset or - * empty, we treat it as updating `gc_rule` to be backward compatible. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the column family to be modified. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The ID of the column family to be modified. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Create a new column family with the specified schema, or fail if - * one already exists with the given ID. - * - * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily create = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\ColumnFamily|null - */ - public function getCreate() - { - return $this->readOneof(2); - } - - public function hasCreate() - { - return $this->hasOneof(2); - } - - /** - * Create a new column family with the specified schema, or fail if - * one already exists with the given ID. - * - * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily create = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $var - * @return $this - */ - public function setCreate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Update an existing column family to the specified schema, or fail - * if no column family exists with the given ID. - * - * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily update = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\ColumnFamily|null - */ - public function getUpdate() - { - return $this->readOneof(3); - } - - public function hasUpdate() - { - return $this->hasOneof(3); - } - - /** - * Update an existing column family to the specified schema, or fail - * if no column family exists with the given ID. - * - * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily update = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $var - * @return $this - */ - public function setUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Drop (delete) the column family with the given ID, or fail if no such - * family exists. - * - * Generated from protobuf field bool drop = 4; - * @return bool - */ - public function getDrop() - { - return $this->readOneof(4); - } - - public function hasDrop() - { - return $this->hasOneof(4); - } - - /** - * Drop (delete) the column family with the given ID, or fail if no such - * family exists. - * - * Generated from protobuf field bool drop = 4; - * @param bool $var - * @return $this - */ - public function setDrop($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` - * mod should be updated, ignored for other modification types. If unset or - * empty, we treat it as updating `gc_rule` to be backward compatible. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` - * mod should be updated, ignored for other modification types. If unset or - * empty, we treat it as updating `gc_rule` to be backward compatible. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * @return string - */ - public function getMod() - { - return $this->whichOneof("mod"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Modification::class, \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest_Modification::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php deleted file mode 100644 index 31e8504969ea..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php +++ /dev/null @@ -1,164 +0,0 @@ -google.bigtable.admin.v2.OperationProgress - */ -class OperationProgress extends \Google\Protobuf\Internal\Message -{ - /** - * Percent completion of the operation. - * Values are between 0 and 100 inclusive. - * - * Generated from protobuf field int32 progress_percent = 1; - */ - protected $progress_percent = 0; - /** - * Time the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * If set, the time at which this operation failed or was completed - * successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $progress_percent - * Percent completion of the operation. - * Values are between 0 and 100 inclusive. - * @type \Google\Protobuf\Timestamp $start_time - * Time the request was received. - * @type \Google\Protobuf\Timestamp $end_time - * If set, the time at which this operation failed or was completed - * successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Common::initOnce(); - parent::__construct($data); - } - - /** - * Percent completion of the operation. - * Values are between 0 and 100 inclusive. - * - * Generated from protobuf field int32 progress_percent = 1; - * @return int - */ - public function getProgressPercent() - { - return $this->progress_percent; - } - - /** - * Percent completion of the operation. - * Values are between 0 and 100 inclusive. - * - * Generated from protobuf field int32 progress_percent = 1; - * @param int $var - * @return $this - */ - public function setProgressPercent($var) - { - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - - /** - * Time the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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); - } - - /** - * Time the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * If set, the time at which this operation failed or was completed - * successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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); - } - - /** - * If set, the time at which this operation failed or was completed - * successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php deleted file mode 100644 index 6a51fb65bbe8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php +++ /dev/null @@ -1,114 +0,0 @@ -google.bigtable.admin.v2.OptimizeRestoredTableMetadata - */ -class OptimizeRestoredTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the restored table being optimized. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The progress of the post-restore optimizations. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 2; - */ - protected $progress = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the restored table being optimized. - * @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress - * The progress of the post-restore optimizations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Name of the restored table being optimized. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the restored table being optimized. - * - * 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 progress of the post-restore optimizations. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null - */ - public function getProgress() - { - return $this->progress; - } - - public function hasProgress() - { - return isset($this->progress); - } - - public function clearProgress() - { - unset($this->progress); - } - - /** - * The progress of the post-restore optimizations. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class); - $this->progress = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php deleted file mode 100644 index 60d2f7c47f64..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.bigtable.admin.v2.PartialUpdateClusterMetadata - */ -class PartialUpdateClusterMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 1; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2; - */ - protected $finish_time = null; - /** - * The original request for PartialUpdateCluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; - */ - protected $original_request = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * @type \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest $original_request - * The original request for PartialUpdateCluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - - /** - * The original request for PartialUpdateCluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The original request for PartialUpdateCluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest::class); - $this->original_request = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php deleted file mode 100644 index c5cb2b443eef..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.bigtable.admin.v2.PartialUpdateClusterRequest - */ -class PartialUpdateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Required. The subset of Cluster fields which should be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * @param \Google\Protobuf\FieldMask $updateMask Required. The subset of Cluster fields which should be replaced. - * - * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster - * Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The subset of Cluster fields which should be replaced. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Required. The subset of Cluster fields which should be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The subset of Cluster fields which should be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php deleted file mode 100644 index 91e4ac7d79eb..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.bigtable.admin.v2.PartialUpdateInstanceRequest - */ -class PartialUpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Instance which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\Instance $instance Required. The Instance which will (partially) replace the current value. - * @param \Google\Protobuf\FieldMask $updateMask Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * - * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Instance $instance - * Required. The Instance which will (partially) replace the current value. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Instance which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The Instance which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php deleted file mode 100644 index d470c27dc7b8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php +++ /dev/null @@ -1,112 +0,0 @@ -google.bigtable.admin.v2.RestoreInfo - */ -class RestoreInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 1; - */ - protected $source_type = 0; - protected $source_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $source_type - * The type of the restore source. - * @type \Google\Cloud\Bigtable\Admin\V2\BackupInfo $backup_info - * Information about the backup used to restore the table. The backup - * may no longer exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 1; - * @return int - */ - public function getSourceType() - { - return $this->source_type; - } - - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 1; - * @param int $var - * @return $this - */ - public function setSourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\RestoreSourceType::class); - $this->source_type = $var; - - return $this; - } - - /** - * Information about the backup used to restore the table. The backup - * may no longer exist. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\BackupInfo|null - */ - public function getBackupInfo() - { - return $this->readOneof(2); - } - - public function hasBackupInfo() - { - return $this->hasOneof(2); - } - - /** - * Information about the backup used to restore the table. The backup - * may no longer exist. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\BackupInfo $var - * @return $this - */ - public function setBackupInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\BackupInfo::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getSourceInfo() - { - return $this->whichOneof("source_info"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php deleted file mode 100644 index f69bc82f8d8a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php +++ /dev/null @@ -1,54 +0,0 @@ -google.bigtable.admin.v2.RestoreSourceType - */ -class RestoreSourceType -{ - /** - * No restore associated. - * - * Generated from protobuf enum RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; - */ - const RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; - /** - * A backup was used as the source of the restore. - * - * Generated from protobuf enum BACKUP = 1; - */ - const BACKUP = 1; - - private static $valueToName = [ - self::RESTORE_SOURCE_TYPE_UNSPECIFIED => 'RESTORE_SOURCE_TYPE_UNSPECIFIED', - self::BACKUP => 'BACKUP', - ]; - - 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php deleted file mode 100644 index c487dd2c61b1..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php +++ /dev/null @@ -1,257 +0,0 @@ -google.bigtable.admin.v2.RestoreTableMetadata - */ -class RestoreTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the table being created and restored to. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 2; - */ - protected $source_type = 0; - /** - * If exists, the name of the long-running operation that will be used to - * track the post-restore optimization process to optimize the performance of - * the restored table. The metadata type of the long-running operation is - * [OptimizeRestoreTableMetadata][]. The response type is - * [Empty][google.protobuf.Empty]. This long-running operation may be - * automatically created by the system if applicable after the - * RestoreTable long-running operation completes successfully. This operation - * may not be created if the table is already optimized or the restore was - * not successful. - * - * Generated from protobuf field string optimize_table_operation_name = 4; - */ - protected $optimize_table_operation_name = ''; - /** - * The progress of the - * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 5; - */ - protected $progress = null; - protected $source_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the table being created and restored to. - * @type int $source_type - * The type of the restore source. - * @type \Google\Cloud\Bigtable\Admin\V2\BackupInfo $backup_info - * @type string $optimize_table_operation_name - * If exists, the name of the long-running operation that will be used to - * track the post-restore optimization process to optimize the performance of - * the restored table. The metadata type of the long-running operation is - * [OptimizeRestoreTableMetadata][]. The response type is - * [Empty][google.protobuf.Empty]. This long-running operation may be - * automatically created by the system if applicable after the - * RestoreTable long-running operation completes successfully. This operation - * may not be created if the table is already optimized or the restore was - * not successful. - * @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress - * The progress of the - * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] - * operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Name of the table being created and restored to. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the table being created and restored to. - * - * 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 type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 2; - * @return int - */ - public function getSourceType() - { - return $this->source_type; - } - - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 2; - * @param int $var - * @return $this - */ - public function setSourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\RestoreSourceType::class); - $this->source_type = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\BackupInfo|null - */ - public function getBackupInfo() - { - return $this->readOneof(3); - } - - public function hasBackupInfo() - { - return $this->hasOneof(3); - } - - /** - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\BackupInfo $var - * @return $this - */ - public function setBackupInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\BackupInfo::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * If exists, the name of the long-running operation that will be used to - * track the post-restore optimization process to optimize the performance of - * the restored table. The metadata type of the long-running operation is - * [OptimizeRestoreTableMetadata][]. The response type is - * [Empty][google.protobuf.Empty]. This long-running operation may be - * automatically created by the system if applicable after the - * RestoreTable long-running operation completes successfully. This operation - * may not be created if the table is already optimized or the restore was - * not successful. - * - * Generated from protobuf field string optimize_table_operation_name = 4; - * @return string - */ - public function getOptimizeTableOperationName() - { - return $this->optimize_table_operation_name; - } - - /** - * If exists, the name of the long-running operation that will be used to - * track the post-restore optimization process to optimize the performance of - * the restored table. The metadata type of the long-running operation is - * [OptimizeRestoreTableMetadata][]. The response type is - * [Empty][google.protobuf.Empty]. This long-running operation may be - * automatically created by the system if applicable after the - * RestoreTable long-running operation completes successfully. This operation - * may not be created if the table is already optimized or the restore was - * not successful. - * - * Generated from protobuf field string optimize_table_operation_name = 4; - * @param string $var - * @return $this - */ - public function setOptimizeTableOperationName($var) - { - GPBUtil::checkString($var, True); - $this->optimize_table_operation_name = $var; - - return $this; - } - - /** - * The progress of the - * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 5; - * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null - */ - public function getProgress() - { - return $this->progress; - } - - public function hasProgress() - { - return isset($this->progress); - } - - public function clearProgress() - { - unset($this->progress); - } - - /** - * The progress of the - * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 5; - * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class); - $this->progress = $var; - - return $this; - } - - /** - * @return string - */ - public function getSourceInfo() - { - return $this->whichOneof("source_info"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php deleted file mode 100644 index abdc023aa9c7..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.bigtable.admin.v2.RestoreTableRequest - */ -class RestoreTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table_id = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * @type string $table_id - * Required. The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * @type string $backup - * Name of the backup from which to restore. Values are of the form - * `projects//instances//clusters//backups/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Required. The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - - /** - * Name of the backup from which to restore. Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string backup = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->readOneof(3); - } - - public function hasBackup() - { - return $this->hasOneof(3); - } - - /** - * Name of the backup from which to restore. Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string backup = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php deleted file mode 100644 index ed150a235f5b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php +++ /dev/null @@ -1,334 +0,0 @@ -google.bigtable.admin.v2.Snapshot - */ -class Snapshot extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The source table at the time the snapshot was taken. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_table = null; - /** - * Output only. The size of the data in the source table at the time the - * snapshot was taken. In some cases, this value may be computed - * asynchronously via a background process and a placeholder of 0 will be used - * in the meantime. - * - * Generated from protobuf field int64 data_size_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_size_bytes = 0; - /** - * Output only. The time when the snapshot is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * The time when the snapshot will be deleted. The maximum amount of time a - * snapshot can stay active is 365 days. If 'ttl' is not specified, - * the default maximum of 365 days will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; - */ - protected $delete_time = null; - /** - * Output only. The current state of the snapshot. - * - * Generated from protobuf field .google.bigtable.admin.v2.Snapshot.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 7; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * @type \Google\Cloud\Bigtable\Admin\V2\Table $source_table - * Output only. The source table at the time the snapshot was taken. - * @type int|string $data_size_bytes - * Output only. The size of the data in the source table at the time the - * snapshot was taken. In some cases, this value may be computed - * asynchronously via a background process and a placeholder of 0 will be used - * in the meantime. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the snapshot is created. - * @type \Google\Protobuf\Timestamp $delete_time - * The time when the snapshot will be deleted. The maximum amount of time a - * snapshot can stay active is 365 days. If 'ttl' is not specified, - * the default maximum of 365 days will be used. - * @type int $state - * Output only. The current state of the snapshot. - * @type string $description - * Description of the snapshot. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * 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; - } - - /** - * Output only. The source table at the time the snapshot was taken. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Bigtable\Admin\V2\Table|null - */ - public function getSourceTable() - { - return $this->source_table; - } - - public function hasSourceTable() - { - return isset($this->source_table); - } - - public function clearSourceTable() - { - unset($this->source_table); - } - - /** - * Output only. The source table at the time the snapshot was taken. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Bigtable\Admin\V2\Table $var - * @return $this - */ - public function setSourceTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table::class); - $this->source_table = $var; - - return $this; - } - - /** - * Output only. The size of the data in the source table at the time the - * snapshot was taken. In some cases, this value may be computed - * asynchronously via a background process and a placeholder of 0 will be used - * in the meantime. - * - * Generated from protobuf field int64 data_size_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getDataSizeBytes() - { - return $this->data_size_bytes; - } - - /** - * Output only. The size of the data in the source table at the time the - * snapshot was taken. In some cases, this value may be computed - * asynchronously via a background process and a placeholder of 0 will be used - * in the meantime. - * - * Generated from protobuf field int64 data_size_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDataSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->data_size_bytes = $var; - - return $this; - } - - /** - * Output only. The time when the snapshot is 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 snapshot is 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; - } - - /** - * The time when the snapshot will be deleted. The maximum amount of time a - * snapshot can stay active is 365 days. If 'ttl' is not specified, - * the default maximum of 365 days will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * The time when the snapshot will be deleted. The maximum amount of time a - * snapshot can stay active is 365 days. If 'ttl' is not specified, - * the default maximum of 365 days will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. The current state of the snapshot. - * - * Generated from protobuf field .google.bigtable.admin.v2.Snapshot.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the snapshot. - * - * Generated from protobuf field .google.bigtable.admin.v2.Snapshot.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Snapshot\State::class); - $this->state = $var; - - return $this; - } - - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 7; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 7; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php deleted file mode 100644 index 07c31a2775e2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php +++ /dev/null @@ -1,66 +0,0 @@ -google.bigtable.admin.v2.Snapshot.State - */ -class State -{ - /** - * The state of the snapshot could not be determined. - * - * Generated from protobuf enum STATE_NOT_KNOWN = 0; - */ - const STATE_NOT_KNOWN = 0; - /** - * The snapshot has been successfully created and can serve all requests. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * The snapshot is currently being created, and may be destroyed if the - * creation process encounters an error. A snapshot may not be restored to a - * table while it is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - - private static $valueToName = [ - self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', - self::READY => 'READY', - self::CREATING => 'CREATING', - ]; - - 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\Bigtable\Admin\V2\Snapshot_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php deleted file mode 100644 index 62d29e1d1bfa..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php +++ /dev/null @@ -1,169 +0,0 @@ -google.bigtable.admin.v2.SnapshotTableMetadata - */ -class SnapshotTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this SnapshotTable operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest $original_request - * The request that prompted the initiation of this SnapshotTable operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this SnapshotTable operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this SnapshotTable operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php deleted file mode 100644 index 007e4b8c67ae..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php +++ /dev/null @@ -1,286 +0,0 @@ -google.bigtable.admin.v2.SnapshotTableRequest - */ -class SnapshotTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * - * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot_id = ''; - /** - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 4; - */ - protected $ttl = null; - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - - /** - * @param string $name Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * @param string $cluster Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * @param string $snapshotId Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * @param string $description Description of the snapshot. - * - * @return \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest - * - * @experimental - */ - public static function build(string $name, string $cluster, string $snapshotId, string $description): self - { - return (new self()) - ->setName($name) - ->setCluster($cluster) - ->setSnapshotId($snapshotId) - ->setDescription($description); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type string $cluster - * Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type string $snapshot_id - * Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * @type \Google\Protobuf\Duration $ttl - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * @type string $description - * Description of the snapshot. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * - * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSnapshotId() - { - return $this->snapshot_id; - } - - /** - * Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * - * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSnapshotId($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_id = $var; - - return $this; - } - - /** - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getTtl() - { - return $this->ttl; - } - - public function hasTtl() - { - return isset($this->ttl); - } - - public function clearTtl() - { - unset($this->ttl); - } - - /** - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ttl = $var; - - return $this; - } - - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StandardReadRemoteWrites.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StandardReadRemoteWrites.php deleted file mode 100644 index bc59f6b84f19..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StandardReadRemoteWrites.php +++ /dev/null @@ -1,34 +0,0 @@ -google.bigtable.admin.v2.StandardReadRemoteWrites - */ -class StandardReadRemoteWrites extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php deleted file mode 100644 index 9bc95b2df390..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.bigtable.admin.v2.StorageType - */ -class StorageType -{ - /** - * The user did not specify a storage type. - * - * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; - */ - const STORAGE_TYPE_UNSPECIFIED = 0; - /** - * Flash (SSD) storage should be used. - * - * Generated from protobuf enum SSD = 1; - */ - const SSD = 1; - /** - * Magnetic drive (HDD) storage should be used. - * - * Generated from protobuf enum HDD = 2; - */ - const HDD = 2; - - private static $valueToName = [ - self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', - self::SSD => 'SSD', - self::HDD => 'HDD', - ]; - - 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php deleted file mode 100644 index 046130e31c1a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php +++ /dev/null @@ -1,409 +0,0 @@ -google.bigtable.admin.v2.Table - */ -class Table extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the table. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Map from cluster ID to per-cluster table state. - * If it could not be determined whether or not the table has data in a - * particular cluster (for example, if its zone is unavailable), then - * there will be an entry for the cluster with UNKNOWN `replication_status`. - * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` - * - * Generated from protobuf field map cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $cluster_states; - /** - * The column families configured for this table, mapped by column family ID. - * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` - * - * Generated from protobuf field map column_families = 3; - */ - private $column_families; - /** - * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored - * in this table. Timestamps not matching the granularity will be rejected. If - * unspecified at creation time, the value will be set to `MILLIS`. Views: - * `SCHEMA_VIEW`, `FULL`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $granularity = 0; - /** - * Output only. If this table was restored from another data source (e.g. a - * backup), this field will be populated with information about the restore. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $restore_info = null; - /** - * If specified, enable the change stream on this table. - * Otherwise, the change stream is disabled and the change stream is not - * retained. - * - * Generated from protobuf field .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; - */ - protected $change_stream_config = null; - /** - * Set to true to make the table protected against data loss. i.e. deleting - * the following resources through Admin APIs are prohibited: - * * The table. - * * The column families in the table. - * * The instance containing the table. - * Note one can still delete the data stored in the table through Data APIs. - * - * Generated from protobuf field bool deletion_protection = 9; - */ - protected $deletion_protection = false; - protected $automated_backup_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the table. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` - * @type array|\Google\Protobuf\Internal\MapField $cluster_states - * Output only. Map from cluster ID to per-cluster table state. - * If it could not be determined whether or not the table has data in a - * particular cluster (for example, if its zone is unavailable), then - * there will be an entry for the cluster with UNKNOWN `replication_status`. - * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` - * @type array|\Google\Protobuf\Internal\MapField $column_families - * The column families configured for this table, mapped by column family ID. - * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` - * @type int $granularity - * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored - * in this table. Timestamps not matching the granularity will be rejected. If - * unspecified at creation time, the value will be set to `MILLIS`. Views: - * `SCHEMA_VIEW`, `FULL`. - * @type \Google\Cloud\Bigtable\Admin\V2\RestoreInfo $restore_info - * Output only. If this table was restored from another data source (e.g. a - * backup), this field will be populated with information about the restore. - * @type \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig $change_stream_config - * If specified, enable the change stream on this table. - * Otherwise, the change stream is disabled and the change stream is not - * retained. - * @type bool $deletion_protection - * Set to true to make the table protected against data loss. i.e. deleting - * the following resources through Admin APIs are prohibited: - * * The table. - * * The column families in the table. - * * The instance containing the table. - * Note one can still delete the data stored in the table through Data APIs. - * @type \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy $automated_backup_policy - * If specified, automated backups are enabled for this table. - * Otherwise, automated backups are disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the table. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the table. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` - * - * 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; - } - - /** - * Output only. Map from cluster ID to per-cluster table state. - * If it could not be determined whether or not the table has data in a - * particular cluster (for example, if its zone is unavailable), then - * there will be an entry for the cluster with UNKNOWN `replication_status`. - * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` - * - * Generated from protobuf field map cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getClusterStates() - { - return $this->cluster_states; - } - - /** - * Output only. Map from cluster ID to per-cluster table state. - * If it could not be determined whether or not the table has data in a - * particular cluster (for example, if its zone is unavailable), then - * there will be an entry for the cluster with UNKNOWN `replication_status`. - * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` - * - * Generated from protobuf field map cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setClusterStates($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Table\ClusterState::class); - $this->cluster_states = $arr; - - return $this; - } - - /** - * The column families configured for this table, mapped by column family ID. - * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` - * - * Generated from protobuf field map column_families = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getColumnFamilies() - { - return $this->column_families; - } - - /** - * The column families configured for this table, mapped by column family ID. - * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` - * - * Generated from protobuf field map column_families = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setColumnFamilies($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class); - $this->column_families = $arr; - - return $this; - } - - /** - * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored - * in this table. Timestamps not matching the granularity will be rejected. If - * unspecified at creation time, the value will be set to `MILLIS`. Views: - * `SCHEMA_VIEW`, `FULL`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getGranularity() - { - return $this->granularity; - } - - /** - * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored - * in this table. Timestamps not matching the granularity will be rejected. If - * unspecified at creation time, the value will be set to `MILLIS`. Views: - * `SCHEMA_VIEW`, `FULL`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setGranularity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\TimestampGranularity::class); - $this->granularity = $var; - - return $this; - } - - /** - * Output only. If this table was restored from another data source (e.g. a - * backup), this field will be populated with information about the restore. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Bigtable\Admin\V2\RestoreInfo|null - */ - public function getRestoreInfo() - { - return $this->restore_info; - } - - public function hasRestoreInfo() - { - return isset($this->restore_info); - } - - public function clearRestoreInfo() - { - unset($this->restore_info); - } - - /** - * Output only. If this table was restored from another data source (e.g. a - * backup), this field will be populated with information about the restore. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Bigtable\Admin\V2\RestoreInfo $var - * @return $this - */ - public function setRestoreInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\RestoreInfo::class); - $this->restore_info = $var; - - return $this; - } - - /** - * If specified, enable the change stream on this table. - * Otherwise, the change stream is disabled and the change stream is not - * retained. - * - * Generated from protobuf field .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; - * @return \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig|null - */ - public function getChangeStreamConfig() - { - return $this->change_stream_config; - } - - public function hasChangeStreamConfig() - { - return isset($this->change_stream_config); - } - - public function clearChangeStreamConfig() - { - unset($this->change_stream_config); - } - - /** - * If specified, enable the change stream on this table. - * Otherwise, the change stream is disabled and the change stream is not - * retained. - * - * Generated from protobuf field .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; - * @param \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig $var - * @return $this - */ - public function setChangeStreamConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig::class); - $this->change_stream_config = $var; - - return $this; - } - - /** - * Set to true to make the table protected against data loss. i.e. deleting - * the following resources through Admin APIs are prohibited: - * * The table. - * * The column families in the table. - * * The instance containing the table. - * Note one can still delete the data stored in the table through Data APIs. - * - * Generated from protobuf field bool deletion_protection = 9; - * @return bool - */ - public function getDeletionProtection() - { - return $this->deletion_protection; - } - - /** - * Set to true to make the table protected against data loss. i.e. deleting - * the following resources through Admin APIs are prohibited: - * * The table. - * * The column families in the table. - * * The instance containing the table. - * Note one can still delete the data stored in the table through Data APIs. - * - * Generated from protobuf field bool deletion_protection = 9; - * @param bool $var - * @return $this - */ - public function setDeletionProtection($var) - { - GPBUtil::checkBool($var); - $this->deletion_protection = $var; - - return $this; - } - - /** - * If specified, automated backups are enabled for this table. - * Otherwise, automated backups are disabled. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13; - * @return \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy|null - */ - public function getAutomatedBackupPolicy() - { - return $this->readOneof(13); - } - - public function hasAutomatedBackupPolicy() - { - return $this->hasOneof(13); - } - - /** - * If specified, automated backups are enabled for this table. - * Otherwise, automated backups are disabled. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13; - * @param \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy $var - * @return $this - */ - public function setAutomatedBackupPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * @return string - */ - public function getAutomatedBackupConfig() - { - return $this->whichOneof("automated_backup_config"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/AutomatedBackupPolicy.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/AutomatedBackupPolicy.php deleted file mode 100644 index 4befbef5a7dd..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/AutomatedBackupPolicy.php +++ /dev/null @@ -1,132 +0,0 @@ -google.bigtable.admin.v2.Table.AutomatedBackupPolicy - */ -class AutomatedBackupPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. How long the automated backups should be retained. The only - * supported value at this time is 3 days. - * - * Generated from protobuf field .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $retention_period = null; - /** - * Required. How frequently automated backups should occur. The only - * supported value at this time is 24 hours. - * - * Generated from protobuf field .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frequency = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $retention_period - * Required. How long the automated backups should be retained. The only - * supported value at this time is 3 days. - * @type \Google\Protobuf\Duration $frequency - * Required. How frequently automated backups should occur. The only - * supported value at this time is 24 hours. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Required. How long the automated backups should be retained. The only - * supported value at this time is 3 days. - * - * Generated from protobuf field .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getRetentionPeriod() - { - return $this->retention_period; - } - - public function hasRetentionPeriod() - { - return isset($this->retention_period); - } - - public function clearRetentionPeriod() - { - unset($this->retention_period); - } - - /** - * Required. How long the automated backups should be retained. The only - * supported value at this time is 3 days. - * - * Generated from protobuf field .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRetentionPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->retention_period = $var; - - return $this; - } - - /** - * Required. How frequently automated backups should occur. The only - * supported value at this time is 24 hours. - * - * Generated from protobuf field .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getFrequency() - { - return $this->frequency; - } - - public function hasFrequency() - { - return isset($this->frequency); - } - - public function clearFrequency() - { - unset($this->frequency); - } - - /** - * Required. How frequently automated backups should occur. The only - * supported value at this time is 24 hours. - * - * Generated from protobuf field .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setFrequency($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->frequency = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AutomatedBackupPolicy::class, \Google\Cloud\Bigtable\Admin\V2\Table_AutomatedBackupPolicy::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php deleted file mode 100644 index 73802c4ea588..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php +++ /dev/null @@ -1,120 +0,0 @@ -google.bigtable.admin.v2.Table.ClusterState - */ -class ClusterState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The state of replication for the table in this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.ClusterState.ReplicationState replication_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $replication_state = 0; - /** - * Output only. The encryption information for the table in this cluster. - * If the encryption key protecting this resource is customer managed, then - * its version can be rotated in Cloud Key Management Service (Cloud KMS). - * The primary version of the key and its status will be reflected here when - * changes propagate from Cloud KMS. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $encryption_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $replication_state - * Output only. The state of replication for the table in this cluster. - * @type array<\Google\Cloud\Bigtable\Admin\V2\EncryptionInfo>|\Google\Protobuf\Internal\RepeatedField $encryption_info - * Output only. The encryption information for the table in this cluster. - * If the encryption key protecting this resource is customer managed, then - * its version can be rotated in Cloud Key Management Service (Cloud KMS). - * The primary version of the key and its status will be reflected here when - * changes propagate from Cloud KMS. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The state of replication for the table in this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.ClusterState.ReplicationState replication_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getReplicationState() - { - return $this->replication_state; - } - - /** - * Output only. The state of replication for the table in this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.ClusterState.ReplicationState replication_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setReplicationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\ClusterState\ReplicationState::class); - $this->replication_state = $var; - - return $this; - } - - /** - * Output only. The encryption information for the table in this cluster. - * If the encryption key protecting this resource is customer managed, then - * its version can be rotated in Cloud Key Management Service (Cloud KMS). - * The primary version of the key and its status will be reflected here when - * changes propagate from Cloud KMS. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEncryptionInfo() - { - return $this->encryption_info; - } - - /** - * Output only. The encryption information for the table in this cluster. - * If the encryption key protecting this resource is customer managed, then - * its version can be rotated in Cloud Key Management Service (Cloud KMS). - * The primary version of the key and its status will be reflected here when - * changes propagate from Cloud KMS. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Bigtable\Admin\V2\EncryptionInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEncryptionInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo::class); - $this->encryption_info = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterState::class, \Google\Cloud\Bigtable\Admin\V2\Table_ClusterState::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php deleted file mode 100644 index 483a7181036d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php +++ /dev/null @@ -1,93 +0,0 @@ -google.bigtable.admin.v2.Table.ClusterState.ReplicationState - */ -class ReplicationState -{ - /** - * The replication state of the table is unknown in this cluster. - * - * Generated from protobuf enum STATE_NOT_KNOWN = 0; - */ - const STATE_NOT_KNOWN = 0; - /** - * The cluster was recently created, and the table must finish copying - * over pre-existing data from other clusters before it can begin - * receiving live replication updates and serving Data API requests. - * - * Generated from protobuf enum INITIALIZING = 1; - */ - const INITIALIZING = 1; - /** - * The table is temporarily unable to serve Data API requests from this - * cluster due to planned internal maintenance. - * - * Generated from protobuf enum PLANNED_MAINTENANCE = 2; - */ - const PLANNED_MAINTENANCE = 2; - /** - * The table is temporarily unable to serve Data API requests from this - * cluster due to unplanned or emergency maintenance. - * - * Generated from protobuf enum UNPLANNED_MAINTENANCE = 3; - */ - const UNPLANNED_MAINTENANCE = 3; - /** - * The table can serve Data API requests from this cluster. Depending on - * replication delay, reads may not immediately reflect the state of the - * table in other clusters. - * - * Generated from protobuf enum READY = 4; - */ - const READY = 4; - /** - * The table is fully created and ready for use after a restore, and is - * being optimized for performance. When optimizations are complete, the - * table will transition to `READY` state. - * - * Generated from protobuf enum READY_OPTIMIZING = 5; - */ - const READY_OPTIMIZING = 5; - - private static $valueToName = [ - self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', - self::INITIALIZING => 'INITIALIZING', - self::PLANNED_MAINTENANCE => 'PLANNED_MAINTENANCE', - self::UNPLANNED_MAINTENANCE => 'UNPLANNED_MAINTENANCE', - self::READY => 'READY', - self::READY_OPTIMIZING => 'READY_OPTIMIZING', - ]; - - 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(ReplicationState::class, \Google\Cloud\Bigtable\Admin\V2\Table_ClusterState_ReplicationState::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php deleted file mode 100644 index 67b1b6d1f95f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php +++ /dev/null @@ -1,59 +0,0 @@ -google.bigtable.admin.v2.Table.TimestampGranularity - */ -class TimestampGranularity -{ - /** - * The user did not specify a granularity. Should not be returned. - * When specified during table creation, MILLIS will be used. - * - * Generated from protobuf enum TIMESTAMP_GRANULARITY_UNSPECIFIED = 0; - */ - const TIMESTAMP_GRANULARITY_UNSPECIFIED = 0; - /** - * The table keeps data versioned at a granularity of 1ms. - * - * Generated from protobuf enum MILLIS = 1; - */ - const MILLIS = 1; - - private static $valueToName = [ - self::TIMESTAMP_GRANULARITY_UNSPECIFIED => 'TIMESTAMP_GRANULARITY_UNSPECIFIED', - self::MILLIS => 'MILLIS', - ]; - - 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(TimestampGranularity::class, \Google\Cloud\Bigtable\Admin\V2\Table_TimestampGranularity::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php deleted file mode 100644 index f2355cc4aa83..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.Table.View - */ -class View -{ - /** - * Uses the default view for each method as documented in its request. - * - * Generated from protobuf enum VIEW_UNSPECIFIED = 0; - */ - const VIEW_UNSPECIFIED = 0; - /** - * Only populates `name`. - * - * Generated from protobuf enum NAME_ONLY = 1; - */ - const NAME_ONLY = 1; - /** - * Only populates `name` and fields related to the table's schema. - * - * Generated from protobuf enum SCHEMA_VIEW = 2; - */ - const SCHEMA_VIEW = 2; - /** - * Only populates `name` and fields related to the table's replication - * state. - * - * Generated from protobuf enum REPLICATION_VIEW = 3; - */ - const REPLICATION_VIEW = 3; - /** - * Only populates `name` and fields related to the table's encryption state. - * - * Generated from protobuf enum ENCRYPTION_VIEW = 5; - */ - const ENCRYPTION_VIEW = 5; - /** - * Populates all fields. - * - * Generated from protobuf enum FULL = 4; - */ - const FULL = 4; - - private static $valueToName = [ - self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', - self::NAME_ONLY => 'NAME_ONLY', - self::SCHEMA_VIEW => 'SCHEMA_VIEW', - self::REPLICATION_VIEW => 'REPLICATION_VIEW', - self::ENCRYPTION_VIEW => 'ENCRYPTION_VIEW', - 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(View::class, \Google\Cloud\Bigtable\Admin\V2\Table_View::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type.php deleted file mode 100644 index f1625dfd8270..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type.php +++ /dev/null @@ -1,458 +0,0 @@ - INT64(-1)`, but `STRING("-00001") > STRING("00001)`. - * * Self-delimiting: If we concatenate two encoded values, can we always tell - * where the first one ends and the second one begins? - * - Example: If we encode INT64s to fixed-width STRINGs, the first value - * will always contain exactly N digits, possibly preceded by a sign. - * - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have - * no way to tell where the first one ends. - * * Compatibility: Which other systems have matching encoding schemes? For - * example, does this encoding have a GoogleSQL equivalent? HBase? Java? - * - * Generated from protobuf message google.bigtable.admin.v2.Type - */ -class Type extends \Google\Protobuf\Internal\Message -{ - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $bytes_type - * Bytes - * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBString $string_type - * String - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Int64 $int64_type - * Int64 - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Float32 $float32_type - * Float32 - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Float64 $float64_type - * Float64 - * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBBool $bool_type - * Bool - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Timestamp $timestamp_type - * Timestamp - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Date $date_type - * Date - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate $aggregate_type - * Aggregate - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Struct $struct_type - * Struct - * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBArray $array_type - * Array - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Map $map_type - * Map - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Bytes - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes|null - */ - public function getBytesType() - { - return $this->readOneof(1); - } - - public function hasBytesType() - { - return $this->hasOneof(1); - } - - /** - * Bytes - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $var - * @return $this - */ - public function setBytesType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * String - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.String string_type = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBString|null - */ - public function getStringType() - { - return $this->readOneof(2); - } - - public function hasStringType() - { - return $this->hasOneof(2); - } - - /** - * String - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.String string_type = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBString $var - * @return $this - */ - public function setStringType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBString::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Int64 - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64 int64_type = 5; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Int64|null - */ - public function getInt64Type() - { - return $this->readOneof(5); - } - - public function hasInt64Type() - { - return $this->hasOneof(5); - } - - /** - * Int64 - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64 int64_type = 5; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Int64 $var - * @return $this - */ - public function setInt64Type($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Int64::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Float32 - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Float32 float32_type = 12; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Float32|null - */ - public function getFloat32Type() - { - return $this->readOneof(12); - } - - public function hasFloat32Type() - { - return $this->hasOneof(12); - } - - /** - * Float32 - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Float32 float32_type = 12; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Float32 $var - * @return $this - */ - public function setFloat32Type($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Float32::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Float64 - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Float64 float64_type = 9; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Float64|null - */ - public function getFloat64Type() - { - return $this->readOneof(9); - } - - public function hasFloat64Type() - { - return $this->hasOneof(9); - } - - /** - * Float64 - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Float64 float64_type = 9; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Float64 $var - * @return $this - */ - public function setFloat64Type($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Float64::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Bool - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bool bool_type = 8; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBBool|null - */ - public function getBoolType() - { - return $this->readOneof(8); - } - - public function hasBoolType() - { - return $this->hasOneof(8); - } - - /** - * Bool - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bool bool_type = 8; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBBool $var - * @return $this - */ - public function setBoolType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBBool::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Timestamp - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Timestamp|null - */ - public function getTimestampType() - { - return $this->readOneof(10); - } - - public function hasTimestampType() - { - return $this->hasOneof(10); - } - - /** - * Timestamp - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Timestamp $var - * @return $this - */ - public function setTimestampType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Date - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Date date_type = 11; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Date|null - */ - public function getDateType() - { - return $this->readOneof(11); - } - - public function hasDateType() - { - return $this->hasOneof(11); - } - - /** - * Date - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Date date_type = 11; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Date $var - * @return $this - */ - public function setDateType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Date::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Aggregate - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate|null - */ - public function getAggregateType() - { - return $this->readOneof(6); - } - - public function hasAggregateType() - { - return $this->hasOneof(6); - } - - /** - * Aggregate - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate $var - * @return $this - */ - public function setAggregateType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Struct - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Struct struct_type = 7; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Struct|null - */ - public function getStructType() - { - return $this->readOneof(7); - } - - public function hasStructType() - { - return $this->hasOneof(7); - } - - /** - * Struct - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Struct struct_type = 7; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Struct $var - * @return $this - */ - public function setStructType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Struct::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Array - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Array array_type = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBArray|null - */ - public function getArrayType() - { - return $this->readOneof(3); - } - - public function hasArrayType() - { - return $this->hasOneof(3); - } - - /** - * Array - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Array array_type = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBArray $var - * @return $this - */ - public function setArrayType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBArray::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Map - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Map map_type = 4; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Map|null - */ - public function getMapType() - { - return $this->readOneof(4); - } - - public function hasMapType() - { - return $this->hasOneof(4); - } - - /** - * Map - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Map map_type = 4; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Map $var - * @return $this - */ - public function setMapType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Map::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate.php deleted file mode 100644 index 9c28110eabb3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate.php +++ /dev/null @@ -1,284 +0,0 @@ -google.bigtable.admin.v2.Type.Aggregate - */ -class Aggregate extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the inputs that are accumulated by this `Aggregate`, which must - * specify a full encoding. - * Use `AddInput` mutations to accumulate new inputs. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type input_type = 1; - */ - protected $input_type = null; - /** - * Output only. Type that holds the internal accumulator state for the - * `Aggregate`. This is a function of the `input_type` and `aggregator` - * chosen, and will always specify a full encoding. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_type = null; - protected $aggregator; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type $input_type - * Type of the inputs that are accumulated by this `Aggregate`, which must - * specify a full encoding. - * Use `AddInput` mutations to accumulate new inputs. - * @type \Google\Cloud\Bigtable\Admin\V2\Type $state_type - * Output only. Type that holds the internal accumulator state for the - * `Aggregate`. This is a function of the `input_type` and `aggregator` - * chosen, and will always specify a full encoding. - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum $sum - * Sum aggregator. - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount $hllpp_unique_count - * HyperLogLogPlusPlusUniqueCount aggregator. - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Max $max - * Max aggregator. - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Min $min - * Min aggregator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Type of the inputs that are accumulated by this `Aggregate`, which must - * specify a full encoding. - * Use `AddInput` mutations to accumulate new inputs. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type input_type = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type|null - */ - public function getInputType() - { - return $this->input_type; - } - - public function hasInputType() - { - return isset($this->input_type); - } - - public function clearInputType() - { - unset($this->input_type); - } - - /** - * Type of the inputs that are accumulated by this `Aggregate`, which must - * specify a full encoding. - * Use `AddInput` mutations to accumulate new inputs. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type input_type = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type $var - * @return $this - */ - public function setInputType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); - $this->input_type = $var; - - return $this; - } - - /** - * Output only. Type that holds the internal accumulator state for the - * `Aggregate`. This is a function of the `input_type` and `aggregator` - * chosen, and will always specify a full encoding. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Bigtable\Admin\V2\Type|null - */ - public function getStateType() - { - return $this->state_type; - } - - public function hasStateType() - { - return isset($this->state_type); - } - - public function clearStateType() - { - unset($this->state_type); - } - - /** - * Output only. Type that holds the internal accumulator state for the - * `Aggregate`. This is a function of the `input_type` and `aggregator` - * chosen, and will always specify a full encoding. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Bigtable\Admin\V2\Type $var - * @return $this - */ - public function setStateType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); - $this->state_type = $var; - - return $this; - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum|null - */ - public function getSum() - { - return $this->readOneof(4); - } - - public function hasSum() - { - return $this->hasOneof(4); - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum $var - * @return $this - */ - public function setSum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * HyperLogLogPlusPlusUniqueCount aggregator. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount|null - */ - public function getHllppUniqueCount() - { - return $this->readOneof(5); - } - - public function hasHllppUniqueCount() - { - return $this->hasOneof(5); - } - - /** - * HyperLogLogPlusPlusUniqueCount aggregator. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount $var - * @return $this - */ - public function setHllppUniqueCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Max aggregator. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Max|null - */ - public function getMax() - { - return $this->readOneof(6); - } - - public function hasMax() - { - return $this->hasOneof(6); - } - - /** - * Max aggregator. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Max $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Max::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Min aggregator. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Min|null - */ - public function getMin() - { - return $this->readOneof(7); - } - - public function hasMin() - { - return $this->hasOneof(7); - } - - /** - * Min aggregator. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Min $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Min::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getAggregator() - { - return $this->whichOneof("aggregator"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aggregate::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php deleted file mode 100644 index 1c9423fe762e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php +++ /dev/null @@ -1,42 +0,0 @@ -google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount - */ -class HyperLogLogPlusPlusUniqueCount extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HyperLogLogPlusPlusUniqueCount::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate_HyperLogLogPlusPlusUniqueCount::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Max.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Max.php deleted file mode 100644 index a1ebe235ad1e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Max.php +++ /dev/null @@ -1,38 +0,0 @@ -google.bigtable.admin.v2.Type.Aggregate.Max - */ -class Max extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Max::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate_Max::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Min.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Min.php deleted file mode 100644 index a9adbf1cddd1..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Min.php +++ /dev/null @@ -1,38 +0,0 @@ -google.bigtable.admin.v2.Type.Aggregate.Min - */ -class Min extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Min::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate_Min::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Sum.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Sum.php deleted file mode 100644 index 209569e18bcc..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Aggregate/Sum.php +++ /dev/null @@ -1,38 +0,0 @@ -google.bigtable.admin.v2.Type.Aggregate.Sum - */ -class Sum extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Sum::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate_Sum::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes.php deleted file mode 100644 index 8bd21135affc..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.admin.v2.Type.Bytes - */ -class Bytes extends \Google\Protobuf\Internal\Message -{ - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; - */ - protected $encoding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding $encoding - * The encoding to use when converting to/from lower level types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding|null - */ - public function getEncoding() - { - return $this->encoding; - } - - public function hasEncoding() - { - return isset($this->encoding); - } - - public function clearEncoding() - { - unset($this->encoding); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding::class); - $this->encoding = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Bytes::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bytes::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding.php deleted file mode 100644 index 4f4ea68391c9..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.admin.v2.Type.Bytes.Encoding - */ -class Encoding extends \Google\Protobuf\Internal\Message -{ - protected $encoding; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw $raw - * Use `Raw` encoding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Use `Raw` encoding. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding.Raw raw = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw|null - */ - public function getRaw() - { - return $this->readOneof(1); - } - - public function hasRaw() - { - return $this->hasOneof(1); - } - - /** - * Use `Raw` encoding. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding.Raw raw = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw $var - * @return $this - */ - public function setRaw($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getEncoding() - { - return $this->whichOneof("encoding"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Encoding::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bytes_Encoding::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding/Raw.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding/Raw.php deleted file mode 100644 index 11d29486138a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Bytes/Encoding/Raw.php +++ /dev/null @@ -1,39 +0,0 @@ -google.bigtable.admin.v2.Type.Bytes.Encoding.Raw - */ -class Raw extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Raw::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bytes_Encoding_Raw::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Date.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Date.php deleted file mode 100644 index 45c6dfa345e8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Date.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.admin.v2.Type.Date - */ -class Date extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Date::class, \Google\Cloud\Bigtable\Admin\V2\Type_Date::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float32.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float32.php deleted file mode 100644 index adedacc80961..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float32.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.admin.v2.Type.Float32 - */ -class Float32 extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Float32::class, \Google\Cloud\Bigtable\Admin\V2\Type_Float32::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float64.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float64.php deleted file mode 100644 index d28be7adc3a9..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Float64.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.admin.v2.Type.Float64 - */ -class Float64 extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Float64::class, \Google\Cloud\Bigtable\Admin\V2\Type_Float64::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64.php deleted file mode 100644 index 90641966f566..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.admin.v2.Type.Int64 - */ -class Int64 extends \Google\Protobuf\Internal\Message -{ - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - protected $encoding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding $encoding - * The encoding to use when converting to/from lower level types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding|null - */ - public function getEncoding() - { - return $this->encoding; - } - - public function hasEncoding() - { - return isset($this->encoding); - } - - public function clearEncoding() - { - unset($this->encoding); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding::class); - $this->encoding = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Int64::class, \Google\Cloud\Bigtable\Admin\V2\Type_Int64::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding.php deleted file mode 100644 index 6a18aa7783f8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.admin.v2.Type.Int64.Encoding - */ -class Encoding extends \Google\Protobuf\Internal\Message -{ - protected $encoding; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes $big_endian_bytes - * Use `BigEndianBytes` encoding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Use `BigEndianBytes` encoding. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes|null - */ - public function getBigEndianBytes() - { - return $this->readOneof(1); - } - - public function hasBigEndianBytes() - { - return $this->hasOneof(1); - } - - /** - * Use `BigEndianBytes` encoding. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes $var - * @return $this - */ - public function setBigEndianBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getEncoding() - { - return $this->whichOneof("encoding"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Encoding::class, \Google\Cloud\Bigtable\Admin\V2\Type_Int64_Encoding::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php deleted file mode 100644 index 15ae9f8b2857..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php +++ /dev/null @@ -1,87 +0,0 @@ -google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - */ -class BigEndianBytes extends \Google\Protobuf\Internal\Message -{ - /** - * Deprecated: ignored if set. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - */ - protected $bytes_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $bytes_type - * Deprecated: ignored if set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Deprecated: ignored if set. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes|null - */ - public function getBytesType() - { - return $this->bytes_type; - } - - public function hasBytesType() - { - return isset($this->bytes_type); - } - - public function clearBytesType() - { - unset($this->bytes_type); - } - - /** - * Deprecated: ignored if set. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $var - * @return $this - */ - public function setBytesType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes::class); - $this->bytes_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigEndianBytes::class, \Google\Cloud\Bigtable\Admin\V2\Type_Int64_Encoding_BigEndianBytes::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Map.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Map.php deleted file mode 100644 index a5090f55b29d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Map.php +++ /dev/null @@ -1,134 +0,0 @@ -google.bigtable.admin.v2.Type.Map - */ -class Map extends \Google\Protobuf\Internal\Message -{ - /** - * The type of a map key. - * Only `Bytes`, `String`, and `Int64` are allowed as key types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type key_type = 1; - */ - protected $key_type = null; - /** - * The type of the values in a map. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 2; - */ - protected $value_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type $key_type - * The type of a map key. - * Only `Bytes`, `String`, and `Int64` are allowed as key types. - * @type \Google\Cloud\Bigtable\Admin\V2\Type $value_type - * The type of the values in a map. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The type of a map key. - * Only `Bytes`, `String`, and `Int64` are allowed as key types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type key_type = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type|null - */ - public function getKeyType() - { - return $this->key_type; - } - - public function hasKeyType() - { - return isset($this->key_type); - } - - public function clearKeyType() - { - unset($this->key_type); - } - - /** - * The type of a map key. - * Only `Bytes`, `String`, and `Int64` are allowed as key types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type key_type = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type $var - * @return $this - */ - public function setKeyType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); - $this->key_type = $var; - - return $this; - } - - /** - * The type of the values in a map. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\Type|null - */ - public function getValueType() - { - return $this->value_type; - } - - public function hasValueType() - { - return isset($this->value_type); - } - - public function clearValueType() - { - unset($this->value_type); - } - - /** - * The type of the values in a map. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\Type $var - * @return $this - */ - public function setValueType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); - $this->value_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Map::class, \Google\Cloud\Bigtable\Admin\V2\Type_Map::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBArray.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBArray.php deleted file mode 100644 index 92cf7364257f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBArray.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.admin.v2.Type.Array - */ -class PBArray extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the elements in the array. This must not be `Array`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type element_type = 1; - */ - protected $element_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type $element_type - * The type of the elements in the array. This must not be `Array`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The type of the elements in the array. This must not be `Array`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type element_type = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type|null - */ - public function getElementType() - { - return $this->element_type; - } - - public function hasElementType() - { - return isset($this->element_type); - } - - public function clearElementType() - { - unset($this->element_type); - } - - /** - * The type of the elements in the array. This must not be `Array`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type element_type = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type $var - * @return $this - */ - public function setElementType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); - $this->element_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBArray::class, \Google\Cloud\Bigtable\Admin\V2\Type_Array::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBBool.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBBool.php deleted file mode 100644 index 562251784d1c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBBool.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.admin.v2.Type.Bool - */ -class PBBool extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBBool::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bool::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString.php deleted file mode 100644 index dec7bacd8182..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.admin.v2.Type.String - */ -class PBString extends \Google\Protobuf\Internal\Message -{ - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; - */ - protected $encoding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding $encoding - * The encoding to use when converting to/from lower level types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding|null - */ - public function getEncoding() - { - return $this->encoding; - } - - public function hasEncoding() - { - return isset($this->encoding); - } - - public function clearEncoding() - { - unset($this->encoding); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding::class); - $this->encoding = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBString::class, \Google\Cloud\Bigtable\Admin\V2\Type_String::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding.php deleted file mode 100644 index 1206cfff3b46..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding.php +++ /dev/null @@ -1,116 +0,0 @@ -google.bigtable.admin.v2.Type.String.Encoding - */ -class Encoding extends \Google\Protobuf\Internal\Message -{ - protected $encoding; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Raw $utf8_raw - * Deprecated: if set, converts to an empty `utf8_bytes`. - * @type \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Bytes $utf8_bytes - * Use `Utf8Bytes` encoding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Deprecated: if set, converts to an empty `utf8_bytes`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Raw|null - * @deprecated - */ - public function getUtf8Raw() - { - @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); - return $this->readOneof(1); - } - - public function hasUtf8Raw() - { - @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); - return $this->hasOneof(1); - } - - /** - * Deprecated: if set, converts to an empty `utf8_bytes`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Raw $var - * @return $this - * @deprecated - */ - public function setUtf8Raw($var) - { - @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Raw::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Use `Utf8Bytes` encoding. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Bytes|null - */ - public function getUtf8Bytes() - { - return $this->readOneof(2); - } - - public function hasUtf8Bytes() - { - return $this->hasOneof(2); - } - - /** - * Use `Utf8Bytes` encoding. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Bytes $var - * @return $this - */ - public function setUtf8Bytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\PBString\Encoding\Utf8Bytes::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getEncoding() - { - return $this->whichOneof("encoding"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Encoding::class, \Google\Cloud\Bigtable\Admin\V2\Type_String_Encoding::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Bytes.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Bytes.php deleted file mode 100644 index ec44fa10181f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Bytes.php +++ /dev/null @@ -1,42 +0,0 @@ -google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes - */ -class Utf8Bytes extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Utf8Bytes::class, \Google\Cloud\Bigtable\Admin\V2\Type_String_Encoding_Utf8Bytes::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Raw.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Raw.php deleted file mode 100644 index 810e88c04499..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/PBString/Encoding/Utf8Raw.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw - */ -class Utf8Raw extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Utf8Raw::class, \Google\Cloud\Bigtable\Admin\V2\Type_String_Encoding_Utf8Raw::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct.php deleted file mode 100644 index 5a3904002a62..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct.php +++ /dev/null @@ -1,73 +0,0 @@ -google.bigtable.admin.v2.Type.Struct - */ -class Struct extends \Google\Protobuf\Internal\Message -{ - /** - * The names and types of the fields in this struct. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $fields - * The names and types of the fields in this struct. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The names and types of the fields in this struct. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The names and types of the fields in this struct. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Type\Struct\Field::class); - $this->fields = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Struct::class, \Google\Cloud\Bigtable\Admin\V2\Type_Struct::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct/Field.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct/Field.php deleted file mode 100644 index e90bceae51ec..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Struct/Field.php +++ /dev/null @@ -1,118 +0,0 @@ -google.bigtable.admin.v2.Type.Struct.Field - */ -class Field extends \Google\Protobuf\Internal\Message -{ - /** - * The field name (optional). Fields without a `field_name` are considered - * anonymous and cannot be referenced by name. - * - * Generated from protobuf field string field_name = 1; - */ - protected $field_name = ''; - /** - * The type of values in this field. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type type = 2; - */ - protected $type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_name - * The field name (optional). Fields without a `field_name` are considered - * anonymous and cannot be referenced by name. - * @type \Google\Cloud\Bigtable\Admin\V2\Type $type - * The type of values in this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The field name (optional). Fields without a `field_name` are considered - * anonymous and cannot be referenced by name. - * - * Generated from protobuf field string field_name = 1; - * @return string - */ - public function getFieldName() - { - return $this->field_name; - } - - /** - * The field name (optional). Fields without a `field_name` are considered - * anonymous and cannot be referenced by name. - * - * Generated from protobuf field string field_name = 1; - * @param string $var - * @return $this - */ - public function setFieldName($var) - { - GPBUtil::checkString($var, True); - $this->field_name = $var; - - return $this; - } - - /** - * The type of values in this field. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type type = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\Type|null - */ - public function getType() - { - return $this->type; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * The type of values in this field. - * - * Generated from protobuf field .google.bigtable.admin.v2.Type type = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\Type $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Field::class, \Google\Cloud\Bigtable\Admin\V2\Type_Struct_Field::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Timestamp.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Timestamp.php deleted file mode 100644 index 9f62002a7216..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Type/Timestamp.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.admin.v2.Type.Timestamp - */ -class Timestamp extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Timestamp::class, \Google\Cloud\Bigtable\Admin\V2\Type_Timestamp::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php deleted file mode 100644 index b847a234a946..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php +++ /dev/null @@ -1,156 +0,0 @@ -google.bigtable.admin.v2.UndeleteTableMetadata - */ -class UndeleteTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the table being restored. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the table being restored. - * @type \Google\Protobuf\Timestamp $start_time - * The time at which this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * If set, the time at which this operation finished or was cancelled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The name of the table being restored. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the table being restored. - * - * 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 time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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); - } - - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php deleted file mode 100644 index d3ead7ced6a2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.UndeleteTableRequest - */ -class UndeleteTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\UndeleteTableRequest - * - * @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 unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php deleted file mode 100644 index aa4ccbf47fe0..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.bigtable.admin.v2.UpdateAppProfileMetadata - */ -class UpdateAppProfileMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php deleted file mode 100644 index 5933bed32b54..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.bigtable.admin.v2.UpdateAppProfileRequest - */ -class UpdateAppProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The app profile which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_profile = null; - /** - * Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * If true, ignore safety checks when updating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 3; - */ - protected $ignore_warnings = false; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile Required. The app profile which will (partially) replace the current value. - * @param \Google\Protobuf\FieldMask $updateMask Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * - * @return \Google\Cloud\Bigtable\Admin\V2\UpdateAppProfileRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAppProfile($appProfile) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile $app_profile - * Required. The app profile which will (partially) replace the current value. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * @type bool $ignore_warnings - * If true, ignore safety checks when updating the app profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The app profile which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile|null - */ - public function getAppProfile() - { - return $this->app_profile; - } - - public function hasAppProfile() - { - return isset($this->app_profile); - } - - public function clearAppProfile() - { - unset($this->app_profile); - } - - /** - * Required. The app profile which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $var - * @return $this - */ - public function setAppProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile::class); - $this->app_profile = $var; - - return $this; - } - - /** - * Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * - * 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; - } - - /** - * If true, ignore safety checks when updating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 3; - * @return bool - */ - public function getIgnoreWarnings() - { - return $this->ignore_warnings; - } - - /** - * If true, ignore safety checks when updating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 3; - * @param bool $var - * @return $this - */ - public function setIgnoreWarnings($var) - { - GPBUtil::checkBool($var); - $this->ignore_warnings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewMetadata.php deleted file mode 100644 index 1457fd96929c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewMetadata.php +++ /dev/null @@ -1,170 +0,0 @@ -google.bigtable.admin.v2.UpdateAuthorizedViewMetadata - */ -class UpdateAuthorizedViewMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this UpdateAuthorizedView - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest $original_request - * The request that prompted the initiation of this UpdateAuthorizedView - * operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this UpdateAuthorizedView - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this UpdateAuthorizedView - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewRequest.php deleted file mode 100644 index c5ba84b2314f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAuthorizedViewRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.bigtable.admin.v2.UpdateAuthorizedViewRequest - */ -class UpdateAuthorizedViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The AuthorizedView to update. The `name` in `authorized_view` is - * used to identify the AuthorizedView. AuthorizedView name must in this - * format - * projects//instances//tables/
/authorizedViews/ - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorized_view = null; - /** - * Optional. The list of fields to update. - * A mask specifying which fields in the AuthorizedView resource should be - * updated. This mask is relative to the AuthorizedView resource, not to the - * request message. A field will be overwritten if it is in the mask. If - * empty, all fields set in the request will be overwritten. A special value - * `*` means to overwrite all fields (including fields not set in the - * request). - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Optional. If true, ignore the safety checks when updating the - * AuthorizedView. - * - * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_warnings = false; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView Required. The AuthorizedView to update. The `name` in `authorized_view` is - * used to identify the AuthorizedView. AuthorizedView name must in this - * format - * projects//instances//tables/
/authorizedViews/ - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. - * A mask specifying which fields in the AuthorizedView resource should be - * updated. This mask is relative to the AuthorizedView resource, not to the - * request message. A field will be overwritten if it is in the mask. If - * empty, all fields set in the request will be overwritten. A special value - * `*` means to overwrite all fields (including fields not set in the - * request). - * - * @return \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAuthorizedView($authorizedView) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorized_view - * Required. The AuthorizedView to update. The `name` in `authorized_view` is - * used to identify the AuthorizedView. AuthorizedView name must in this - * format - * projects//instances//tables/
/authorizedViews/ - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to update. - * A mask specifying which fields in the AuthorizedView resource should be - * updated. This mask is relative to the AuthorizedView resource, not to the - * request message. A field will be overwritten if it is in the mask. If - * empty, all fields set in the request will be overwritten. A special value - * `*` means to overwrite all fields (including fields not set in the - * request). - * @type bool $ignore_warnings - * Optional. If true, ignore the safety checks when updating the - * AuthorizedView. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The AuthorizedView to update. The `name` in `authorized_view` is - * used to identify the AuthorizedView. AuthorizedView name must in this - * format - * projects//instances//tables/
/authorizedViews/ - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView|null - */ - public function getAuthorizedView() - { - return $this->authorized_view; - } - - public function hasAuthorizedView() - { - return isset($this->authorized_view); - } - - public function clearAuthorizedView() - { - unset($this->authorized_view); - } - - /** - * Required. The AuthorizedView to update. The `name` in `authorized_view` is - * used to identify the AuthorizedView. AuthorizedView name must in this - * format - * projects//instances//tables/
/authorizedViews/ - * - * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $var - * @return $this - */ - public function setAuthorizedView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView::class); - $this->authorized_view = $var; - - return $this; - } - - /** - * Optional. The list of fields to update. - * A mask specifying which fields in the AuthorizedView resource should be - * updated. This mask is relative to the AuthorizedView resource, not to the - * request message. A field will be overwritten if it is in the mask. If - * empty, all fields set in the request will be overwritten. A special value - * `*` means to overwrite all fields (including fields not set in the - * request). - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. The list of fields to update. - * A mask specifying which fields in the AuthorizedView resource should be - * updated. This mask is relative to the AuthorizedView resource, not to the - * request message. A field will be overwritten if it is in the mask. If - * empty, all fields set in the request will be overwritten. A special value - * `*` means to overwrite all fields (including fields not set in the - * request). - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. If true, ignore the safety checks when updating the - * AuthorizedView. - * - * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreWarnings() - { - return $this->ignore_warnings; - } - - /** - * Optional. If true, ignore the safety checks when updating the - * AuthorizedView. - * - * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreWarnings($var) - { - GPBUtil::checkBool($var); - $this->ignore_warnings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php deleted file mode 100644 index b450460b852b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.bigtable.admin.v2.UpdateBackupRequest - */ -class UpdateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * * `backup.expire_time`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - /** - * Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\Backup $backup Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * - * * `backup.expire_time`. - * @param \Google\Protobuf\FieldMask $updateMask Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * - * @return \Google\Cloud\Bigtable\Admin\V2\UpdateBackupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\Backup $backup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Backup $backup - * Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * * `backup.expire_time`. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * * `backup.expire_time`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * * `backup.expire_time`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * - * 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. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php deleted file mode 100644 index 09fcde08400d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.bigtable.admin.v2.UpdateClusterMetadata - */ -class UpdateClusterMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this UpdateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster $original_request - * The request that prompted the initiation of this UpdateCluster operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this UpdateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this UpdateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php deleted file mode 100644 index 5caa3d20f2a2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.bigtable.admin.v2.UpdateInstanceMetadata - */ -class UpdateInstanceMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this UpdateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest $original_request - * The request that prompted the initiation of this UpdateInstance operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this UpdateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this UpdateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php deleted file mode 100644 index ab407c9bfd1b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php +++ /dev/null @@ -1,156 +0,0 @@ -google.bigtable.admin.v2.UpdateTableMetadata - */ -class UpdateTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the table being updated. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * If set, the time at which this operation finished or was canceled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the table being updated. - * @type \Google\Protobuf\Timestamp $start_time - * The time at which this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * If set, the time at which this operation finished or was canceled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The name of the table being updated. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the table being updated. - * - * 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 time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * If set, the time at which this operation finished or was canceled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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); - } - - /** - * If set, the time at which this operation finished or was canceled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php deleted file mode 100644 index 17d6cb5e06e6..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.bigtable.admin.v2.UpdateTableRequest - */ -class UpdateTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The table to update. - * The table's `name` field is used to identify the table to update. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table = null; - /** - * Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\Table $table Required. The table to update. - * The table's `name` field is used to identify the table to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * - * @return \Google\Cloud\Bigtable\Admin\V2\UpdateTableRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\Table $table, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTable($table) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Table $table - * Required. The table to update. - * The table's `name` field is used to identify the table to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The table to update. - * The table's `name` field is used to identify the table to update. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Table|null - */ - public function getTable() - { - return $this->table; - } - - public function hasTable() - { - return isset($this->table); - } - - public function clearTable() - { - unset($this->table); - } - - /** - * Required. The table to update. - * The table's `name` field is used to identify the table to update. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Table $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table::class); - $this->table = $var; - - return $this; - } - - /** - * Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php deleted file mode 100644 index 4cba3a4e581b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent) - ->setAppProfileId($appProfileId) - ->setAppProfile($appProfile); - - // Call the API and handle any network failures. - try { - /** @var AppProfile $response */ - $response = $bigtableInstanceAdminClient->createAppProfile($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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = '[APP_PROFILE_ID]'; - - create_app_profile_sample($formattedParent, $appProfileId); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php deleted file mode 100644 index 45ebd1a21640..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php +++ /dev/null @@ -1,97 +0,0 @@ -setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableInstanceAdminClient->createCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $clusterId = '[CLUSTER_ID]'; - - create_cluster_sample($formattedParent, $clusterId); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php deleted file mode 100644 index 1abf64ae014f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php +++ /dev/null @@ -1,107 +0,0 @@ -setDisplayName($instanceDisplayName); - $clusters = []; - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance) - ->setClusters($clusters); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableInstanceAdminClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 = BigtableInstanceAdminClient::projectName('[PROJECT]'); - $instanceId = '[INSTANCE_ID]'; - $instanceDisplayName = '[DISPLAY_NAME]'; - - create_instance_sample($formattedParent, $instanceId, $instanceDisplayName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php deleted file mode 100644 index 70ac8bd03282..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName) - ->setIgnoreWarnings($ignoreWarnings); - - // Call the API and handle any network failures. - try { - $bigtableInstanceAdminClient->deleteAppProfile($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 = BigtableInstanceAdminClient::appProfileName( - '[PROJECT]', - '[INSTANCE]', - '[APP_PROFILE]' - ); - $ignoreWarnings = false; - - delete_app_profile_sample($formattedName, $ignoreWarnings); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php deleted file mode 100644 index c4b929dbc4e9..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $bigtableInstanceAdminClient->deleteCluster($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 = BigtableInstanceAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - delete_cluster_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php deleted file mode 100644 index 5b62ae7912cb..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $bigtableInstanceAdminClient->deleteInstance($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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php deleted file mode 100644 index 506431b3c320..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AppProfile $response */ - $response = $bigtableInstanceAdminClient->getAppProfile($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 = BigtableInstanceAdminClient::appProfileName( - '[PROJECT]', - '[INSTANCE]', - '[APP_PROFILE]' - ); - - get_app_profile_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php deleted file mode 100644 index 4a2a93b3f47b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Cluster $response */ - $response = $bigtableInstanceAdminClient->getCluster($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 = BigtableInstanceAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - get_cluster_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php deleted file mode 100644 index a4dfa0fec4aa..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/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 = $bigtableInstanceAdminClient->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 bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php deleted file mode 100644 index 52c1a06c2788..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $bigtableInstanceAdminClient->getInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php deleted file mode 100644 index 6270226f235f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bigtableInstanceAdminClient->listAppProfiles($request); - - /** @var AppProfile $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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - list_app_profiles_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php deleted file mode 100644 index 9c30512f61c7..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListClustersResponse $response */ - $response = $bigtableInstanceAdminClient->listClusters($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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - list_clusters_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php deleted file mode 100644 index bbbd046338d5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bigtableInstanceAdminClient->listHotTablets($request); - - /** @var HotTablet $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 = BigtableInstanceAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - list_hot_tablets_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php deleted file mode 100644 index e9130a75ef95..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php +++ /dev/null @@ -1,72 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListInstancesResponse $response */ - $response = $bigtableInstanceAdminClient->listInstances($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 = BigtableInstanceAdminClient::projectName('[PROJECT]'); - - list_instances_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php deleted file mode 100644 index 11b8850d5686..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php +++ /dev/null @@ -1,85 +0,0 @@ -setCluster($cluster) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableInstanceAdminClient->partialUpdateCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $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 bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php deleted file mode 100644 index b88c9a4ebdab..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php +++ /dev/null @@ -1,90 +0,0 @@ -setDisplayName($instanceDisplayName); - $updateMask = new FieldMask(); - $request = (new PartialUpdateInstanceRequest()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableInstanceAdminClient->partialUpdateInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 -{ - $instanceDisplayName = '[DISPLAY_NAME]'; - - partial_update_instance_sample($instanceDisplayName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php deleted file mode 100644 index 842f6943766b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $bigtableInstanceAdminClient->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 bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php deleted file mode 100644 index a312340f36f4..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php +++ /dev/null @@ -1,78 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $bigtableInstanceAdminClient->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 bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php deleted file mode 100644 index e20dab7c6699..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php +++ /dev/null @@ -1,74 +0,0 @@ -setAppProfile($appProfile) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableInstanceAdminClient->updateAppProfile($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AppProfile $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 bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php deleted file mode 100644 index 99de20c472fd..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($name) - ->setServeNodes($serveNodes); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableInstanceAdminClient->updateCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $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 -{ - $name = '[NAME]'; - $serveNodes = 0; - - update_cluster_sample($name, $serveNodes); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php deleted file mode 100644 index 80667f033185..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name) - ->setDisplayName($displayName) - ->setType($type) - ->setLabels($labels); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $bigtableInstanceAdminClient->updateInstance($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 -{ - $name = '[NAME]'; - $displayName = '[DISPLAY_NAME]'; - $type = Type::TYPE_UNSPECIFIED; - - update_instance_sample($name, $displayName, $type); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php deleted file mode 100644 index fc2182469283..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName) - ->setConsistencyToken($consistencyToken); - - // Call the API and handle any network failures. - try { - /** @var CheckConsistencyResponse $response */ - $response = $bigtableTableAdminClient->checkConsistency($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = '[CONSISTENCY_TOKEN]'; - - check_consistency_sample($formattedName, $consistencyToken); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php deleted file mode 100644 index 230a80427499..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php +++ /dev/null @@ -1,115 +0,0 @@ -/instances//clusters//backups/`. Please see - * {@see BigtableTableAdminClient::backupName()} for help formatting this field. - */ -function copy_backup_sample( - string $formattedParent, - string $backupId, - string $formattedSourceBackup -): void { - // Create a client. - $bigtableTableAdminClient = new BigtableTableAdminClient(); - - // Prepare the request message. - $expireTime = new Timestamp(); - $request = (new CopyBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setSourceBackup($formattedSourceBackup) - ->setExpireTime($expireTime); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->copyBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = '[BACKUP_ID]'; - $formattedSourceBackup = BigtableTableAdminClient::backupName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[BACKUP]' - ); - - copy_backup_sample($formattedParent, $backupId, $formattedSourceBackup); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_authorized_view.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_authorized_view.php deleted file mode 100644 index 312f73588d01..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_authorized_view.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setAuthorizedViewId($authorizedViewId) - ->setAuthorizedView($authorizedView); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->createAuthorizedView($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AuthorizedView $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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $authorizedViewId = '[AUTHORIZED_VIEW_ID]'; - - create_authorized_view_sample($formattedParent, $authorizedViewId); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php deleted file mode 100644 index c19f78fe3afd..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php +++ /dev/null @@ -1,113 +0,0 @@ -setSourceTable($backupSourceTable) - ->setExpireTime($backupExpireTime); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setBackup($backup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->createBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = '[BACKUP_ID]'; - $backupSourceTable = '[SOURCE_TABLE]'; - - create_backup_sample($formattedParent, $backupId, $backupSourceTable); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php deleted file mode 100644 index c9e8e72ab85f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent) - ->setTableId($tableId) - ->setTable($table); - - // Call the API and handle any network failures. - try { - /** @var Table $response */ - $response = $bigtableTableAdminClient->createTable($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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = '[TABLE_ID]'; - - create_table_sample($formattedParent, $tableId); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php deleted file mode 100644 index 6c08c6d4ec0c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php +++ /dev/null @@ -1,110 +0,0 @@ -setParent($formattedParent) - ->setTableId($tableId) - ->setSourceSnapshot($formattedSourceSnapshot); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->createTableFromSnapshot($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Table $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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = '[TABLE_ID]'; - $formattedSourceSnapshot = BigtableTableAdminClient::snapshotName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[SNAPSHOT]' - ); - - create_table_from_snapshot_sample($formattedParent, $tableId, $formattedSourceSnapshot); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_authorized_view.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_authorized_view.php deleted file mode 100644 index 085616ad9754..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_authorized_view.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $bigtableTableAdminClient->deleteAuthorizedView($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 = BigtableTableAdminClient::authorizedViewName( - '[PROJECT]', - '[INSTANCE]', - '[TABLE]', - '[AUTHORIZED_VIEW]' - ); - - delete_authorized_view_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php deleted file mode 100644 index 4cc770fe8a9a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $bigtableTableAdminClient->deleteBackup($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 = BigtableTableAdminClient::backupName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[BACKUP]' - ); - - delete_backup_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php deleted file mode 100644 index 512babb6e5d3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $bigtableTableAdminClient->deleteSnapshot($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 = BigtableTableAdminClient::snapshotName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[SNAPSHOT]' - ); - - delete_snapshot_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php deleted file mode 100644 index a8650aa538b4..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $bigtableTableAdminClient->deleteTable($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - delete_table_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php deleted file mode 100644 index 5a506dbf0a0e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $bigtableTableAdminClient->dropRowRange($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - drop_row_range_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php deleted file mode 100644 index 13a43860b82b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GenerateConsistencyTokenResponse $response */ - $response = $bigtableTableAdminClient->generateConsistencyToken($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - generate_consistency_token_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_authorized_view.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_authorized_view.php deleted file mode 100644 index 5ff1ce4a3a4b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_authorized_view.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AuthorizedView $response */ - $response = $bigtableTableAdminClient->getAuthorizedView($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 = BigtableTableAdminClient::authorizedViewName( - '[PROJECT]', - '[INSTANCE]', - '[TABLE]', - '[AUTHORIZED_VIEW]' - ); - - get_authorized_view_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php deleted file mode 100644 index 5c7fc10e0993..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $bigtableTableAdminClient->getBackup($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 = BigtableTableAdminClient::backupName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[BACKUP]' - ); - - get_backup_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php deleted file mode 100644 index 7ff9af1261b9..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $bigtableTableAdminClient->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 bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php deleted file mode 100644 index 61234e7fbe69..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Snapshot $response */ - $response = $bigtableTableAdminClient->getSnapshot($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 = BigtableTableAdminClient::snapshotName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[SNAPSHOT]' - ); - - get_snapshot_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php deleted file mode 100644 index dfda57e6a47f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Table $response */ - $response = $bigtableTableAdminClient->getTable($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - get_table_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_authorized_views.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_authorized_views.php deleted file mode 100644 index ef36a650e70a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_authorized_views.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bigtableTableAdminClient->listAuthorizedViews($request); - - /** @var AuthorizedView $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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - list_authorized_views_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php deleted file mode 100644 index 94400498e37f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bigtableTableAdminClient->listBackups($request); - - /** @var Backup $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - list_backups_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php deleted file mode 100644 index 73c2aff1f7aa..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bigtableTableAdminClient->listSnapshots($request); - - /** @var Snapshot $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - list_snapshots_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php deleted file mode 100644 index ff3b49bd0d04..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $bigtableTableAdminClient->listTables($request); - - /** @var Table $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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - list_tables_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php deleted file mode 100644 index e8f6e7b9b825..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName) - ->setModifications($modifications); - - // Call the API and handle any network failures. - try { - /** @var Table $response */ - $response = $bigtableTableAdminClient->modifyColumnFamilies($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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - modify_column_families_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php deleted file mode 100644 index d73f60a89edf..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php +++ /dev/null @@ -1,96 +0,0 @@ -/instances/`. Please see - * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. - * @param string $tableId The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - */ -function restore_table_sample(string $formattedParent, string $tableId): void -{ - // Create a client. - $bigtableTableAdminClient = new BigtableTableAdminClient(); - - // Prepare the request message. - $request = (new RestoreTableRequest()) - ->setParent($formattedParent) - ->setTableId($tableId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->restoreTable($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Table $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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = '[TABLE_ID]'; - - restore_table_sample($formattedParent, $tableId); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php deleted file mode 100644 index c51797c13213..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $bigtableTableAdminClient->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 bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php deleted file mode 100644 index 7d7b542a82ef..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php +++ /dev/null @@ -1,107 +0,0 @@ -setName($formattedName) - ->setCluster($formattedCluster) - ->setSnapshotId($snapshotId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->snapshotTable($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Snapshot $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 -{ - $formattedName = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $formattedCluster = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $snapshotId = '[SNAPSHOT_ID]'; - - snapshot_table_sample($formattedName, $formattedCluster, $snapshotId); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php deleted file mode 100644 index 042ceb981136..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php +++ /dev/null @@ -1,79 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $bigtableTableAdminClient->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 bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php deleted file mode 100644 index 3448b8fedff0..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->undeleteTable($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Table $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 -{ - $formattedName = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - undelete_table_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_authorized_view.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_authorized_view.php deleted file mode 100644 index ab69b8924270..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_authorized_view.php +++ /dev/null @@ -1,71 +0,0 @@ -setAuthorizedView($authorizedView); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->updateAuthorizedView($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AuthorizedView $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 bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php deleted file mode 100644 index 575ccfa3be08..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php +++ /dev/null @@ -1,80 +0,0 @@ -setSourceTable($backupSourceTable) - ->setExpireTime($backupExpireTime); - $updateMask = new FieldMask(); - $request = (new UpdateBackupRequest()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $bigtableTableAdminClient->updateBackup($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 -{ - $backupSourceTable = '[SOURCE_TABLE]'; - - update_backup_sample($backupSourceTable); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php deleted file mode 100644 index 9d335ba140ec..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php +++ /dev/null @@ -1,74 +0,0 @@ -setTable($table) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->updateTable($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Table $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 bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableInstanceAdminClient.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableInstanceAdminClient.php deleted file mode 100644 index b45bb6498897..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableInstanceAdminClient.php +++ /dev/null @@ -1,1020 +0,0 @@ - createAppProfileAsync(CreateAppProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAppProfileAsync(DeleteAppProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAppProfileAsync(GetAppProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAppProfilesAsync(ListAppProfilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHotTabletsAsync(ListHotTabletsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface partialUpdateClusterAsync(PartialUpdateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface partialUpdateInstanceAsync(PartialUpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAppProfileAsync(UpdateAppProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClusterAsync(Cluster $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(Instance $request, array $optionalArgs = []) - */ -final class BigtableInstanceAdminClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.bigtable.admin.v2.BigtableInstanceAdmin'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigtableadmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigtableadmin.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigtable.admin', - 'https://www.googleapis.com/auth/bigtable.admin.cluster', - 'https://www.googleapis.com/auth/bigtable.admin.instance', - 'https://www.googleapis.com/auth/cloud-bigtable.admin', - 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bigtable_instance_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a app_profile - * resource. - * - * @param string $project - * @param string $instance - * @param string $appProfile - * - * @return string The formatted app_profile resource. - */ - public static function appProfileName(string $project, string $instance, string $appProfile): string - { - return self::getPathTemplate('appProfile')->render([ - 'project' => $project, - 'instance' => $instance, - 'app_profile' => $appProfile, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $instance, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * 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 project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - appProfile: projects/{project}/instances/{instance}/appProfiles/{app_profile} - * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - instance: projects/{project}/instances/{instance} - * - location: projects/{project}/locations/{location} - * - project: projects/{project} - * - * 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. - * - * Setting the "BIGTABLE_EMULATOR_HOST" environment variable will automatically set - * the API Endpoint to the value specified in the variable, as well as ensure that - * empty credentials are used in the transport layer. - * - * @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 'bigtableadmin.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 = []) - { - $options = $this->setDefaultEmulatorConfig($options); - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an app profile within an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::createAppProfileAsync()} - * . - * - * @example samples/V2/BigtableInstanceAdminClient/create_app_profile.php - * - * @param CreateAppProfileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AppProfile - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAppProfile(CreateAppProfileRequest $request, array $callOptions = []): AppProfile - { - return $this->startApiCall('CreateAppProfile', $request, $callOptions)->wait(); - } - - /** - * Creates a cluster within an instance. - * - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - * - * The async variant is {@see BigtableInstanceAdminClient::createClusterAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/create_cluster.php - * - * @param CreateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); - } - - /** - * Create an instance within a project. - * - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - * - * The async variant is {@see BigtableInstanceAdminClient::createInstanceAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/create_instance.php - * - * @param CreateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes an app profile from an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::deleteAppProfileAsync()} - * . - * - * @example samples/V2/BigtableInstanceAdminClient/delete_app_profile.php - * - * @param DeleteAppProfileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteAppProfile(DeleteAppProfileRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAppProfile', $request, $callOptions)->wait(); - } - - /** - * Deletes a cluster from an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::deleteClusterAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/delete_cluster.php - * - * @param DeleteClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteCluster(DeleteClusterRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); - } - - /** - * Delete an instance from a project. - * - * The async variant is {@see BigtableInstanceAdminClient::deleteInstanceAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/delete_instance.php - * - * @param DeleteInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Gets information about an app profile. - * - * The async variant is {@see BigtableInstanceAdminClient::getAppProfileAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/get_app_profile.php - * - * @param GetAppProfileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AppProfile - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAppProfile(GetAppProfileRequest $request, array $callOptions = []): AppProfile - { - return $this->startApiCall('GetAppProfile', $request, $callOptions)->wait(); - } - - /** - * Gets information about a cluster. - * - * The async variant is {@see BigtableInstanceAdminClient::getClusterAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/get_cluster.php - * - * @param GetClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Cluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster - { - return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for an instance resource. Returns an empty - * policy if an instance exists but does not have a policy set. - * - * The async variant is {@see BigtableInstanceAdminClient::getIamPolicyAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/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(); - } - - /** - * Gets information about an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::getInstanceAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/get_instance.php - * - * @param GetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Lists information about app profiles in an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::listAppProfilesAsync()} - * . - * - * @example samples/V2/BigtableInstanceAdminClient/list_app_profiles.php - * - * @param ListAppProfilesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAppProfiles(ListAppProfilesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAppProfiles', $request, $callOptions); - } - - /** - * Lists information about clusters in an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::listClustersAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/list_clusters.php - * - * @param ListClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListClustersResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listClusters(ListClustersRequest $request, array $callOptions = []): ListClustersResponse - { - return $this->startApiCall('ListClusters', $request, $callOptions)->wait(); - } - - /** - * Lists hot tablets in a cluster, within the time range provided. Hot - * tablets are ordered based on CPU usage. - * - * The async variant is {@see BigtableInstanceAdminClient::listHotTabletsAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php - * - * @param ListHotTabletsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listHotTablets(ListHotTabletsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListHotTablets', $request, $callOptions); - } - - /** - * Lists information about instances in a project. - * - * The async variant is {@see BigtableInstanceAdminClient::listInstancesAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/list_instances.php - * - * @param ListInstancesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListInstancesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): ListInstancesResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions)->wait(); - } - - /** - * Partially updates a cluster within a project. This method is the preferred - * way to update a Cluster. - * - * To enable and update autoscaling, set - * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, - * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it - * are ignored. Note that an update cannot simultaneously set serve_nodes to - * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and - * also specify both in the update_mask. - * - * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, - * and explicitly set a serve_node count via the update_mask. - * - * The async variant is - * {@see BigtableInstanceAdminClient::partialUpdateClusterAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php - * - * @param PartialUpdateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 partialUpdateCluster(PartialUpdateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('PartialUpdateCluster', $request, $callOptions)->wait(); - } - - /** - * Partially updates an instance within a project. This method can modify all - * fields of an Instance and is the preferred way to update an Instance. - * - * The async variant is - * {@see BigtableInstanceAdminClient::partialUpdateInstanceAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/partial_update_instance.php - * - * @param PartialUpdateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 partialUpdateInstance(PartialUpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('PartialUpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on an instance resource. Replaces any - * existing policy. - * - * The async variant is {@see BigtableInstanceAdminClient::setIamPolicyAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/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 the caller has on the specified instance resource. - * - * The async variant is - * {@see BigtableInstanceAdminClient::testIamPermissionsAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/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(); - } - - /** - * Updates an app profile within an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::updateAppProfileAsync()} - * . - * - * @example samples/V2/BigtableInstanceAdminClient/update_app_profile.php - * - * @param UpdateAppProfileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateAppProfile(UpdateAppProfileRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAppProfile', $request, $callOptions)->wait(); - } - - /** - * Updates a cluster within an instance. - * - * Note that UpdateCluster does not support updating - * cluster_config.cluster_autoscaling_config. In order to update it, you - * must use PartialUpdateCluster. - * - * The async variant is {@see BigtableInstanceAdminClient::updateClusterAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/update_cluster.php - * - * @param Cluster $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateCluster(Cluster $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); - } - - /** - * Updates an instance within a project. This method updates only the display - * name and type for an Instance. To update other Instance properties, such as - * labels, use PartialUpdateInstance. - * - * The async variant is {@see BigtableInstanceAdminClient::updateInstanceAsync()} . - * - * @example samples/V2/BigtableInstanceAdminClient/update_instance.php - * - * @param Instance $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateInstance(Instance $request, array $callOptions = []): Instance - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } - - /** Configure the gapic configuration to use a service emulator. */ - private function setDefaultEmulatorConfig(array $options): array - { - $emulatorHost = getenv('BIGTABLE_EMULATOR_HOST'); - if (empty($emulatorHost)) { - return $options; - } - - if ($scheme = parse_url($emulatorHost, PHP_URL_SCHEME)) { - $search = $scheme . '://'; - $emulatorHost = str_replace($search, '', $emulatorHost); - } - - $options['apiEndpoint'] ??= $emulatorHost; - $options['transportConfig']['grpc']['stubOpts']['credentials'] ??= ChannelCredentials::createInsecure(); - $options['credentials'] ??= new InsecureCredentialsWrapper(); - return $options; - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php deleted file mode 100644 index 854d55554863..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php +++ /dev/null @@ -1,1339 +0,0 @@ - checkConsistencyAsync(CheckConsistencyRequest $request, array $optionalArgs = []) - * @method PromiseInterface copyBackupAsync(CopyBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAuthorizedViewAsync(CreateAuthorizedViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface
createTableAsync(CreateTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTableFromSnapshotAsync(CreateTableFromSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAuthorizedViewAsync(DeleteAuthorizedViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSnapshotAsync(DeleteSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTableAsync(DeleteTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface dropRowRangeAsync(DropRowRangeRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateConsistencyTokenAsync(GenerateConsistencyTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAuthorizedViewAsync(GetAuthorizedViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSnapshotAsync(GetSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface
getTableAsync(GetTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAuthorizedViewsAsync(ListAuthorizedViewsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSnapshotsAsync(ListSnapshotsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTablesAsync(ListTablesRequest $request, array $optionalArgs = []) - * @method PromiseInterface
modifyColumnFamiliesAsync(ModifyColumnFamiliesRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreTableAsync(RestoreTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface snapshotTableAsync(SnapshotTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeleteTableAsync(UndeleteTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAuthorizedViewAsync(UpdateAuthorizedViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTableAsync(UpdateTableRequest $request, array $optionalArgs = []) - */ -final class BigtableTableAdminClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.bigtable.admin.v2.BigtableTableAdmin'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigtableadmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigtableadmin.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigtable.admin', - 'https://www.googleapis.com/auth/bigtable.admin.table', - 'https://www.googleapis.com/auth/cloud-bigtable.admin', - 'https://www.googleapis.com/auth/cloud-bigtable.admin.table', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bigtable_table_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * authorized_view resource. - * - * @param string $project - * @param string $instance - * @param string $table - * @param string $authorizedView - * - * @return string The formatted authorized_view resource. - */ - public static function authorizedViewName(string $project, string $instance, string $table, string $authorizedView): string - { - return self::getPathTemplate('authorizedView')->render([ - 'project' => $project, - 'instance' => $instance, - 'table' => $table, - 'authorized_view' => $authorizedView, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName(string $project, string $instance, string $cluster, string $backup): string - { - return self::getPathTemplate('backup')->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $instance, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * crypto_key_version resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * @param string $cryptoKeyVersion - * - * @return string The formatted crypto_key_version resource. - */ - public static function cryptoKeyVersionName(string $project, string $location, string $keyRing, string $cryptoKey, string $cryptoKeyVersion): string - { - return self::getPathTemplate('cryptoKeyVersion')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - 'crypto_key_version' => $cryptoKeyVersion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a snapshot - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * @param string $snapshot - * - * @return string The formatted snapshot resource. - */ - public static function snapshotName(string $project, string $instance, string $cluster, string $snapshot): string - { - return self::getPathTemplate('snapshot')->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - 'snapshot' => $snapshot, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $instance - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName(string $project, string $instance, string $table): string - { - return self::getPathTemplate('table')->render([ - 'project' => $project, - 'instance' => $instance, - 'table' => $table, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - authorizedView: projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view} - * - backup: projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup} - * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} - * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} - * - instance: projects/{project}/instances/{instance} - * - snapshot: projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot} - * - table: projects/{project}/instances/{instance}/tables/{table} - * - * 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. - * - * Setting the "BIGTABLE_EMULATOR_HOST" environment variable will automatically set - * the API Endpoint to the value specified in the variable, as well as ensure that - * empty credentials are used in the transport layer. - * - * @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 'bigtableadmin.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 = []) - { - $options = $this->setDefaultEmulatorConfig($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); - } - - /** - * Checks replication consistency based on a consistency token, that is, if - * replication has caught up based on the conditions specified in the token - * and the check request. - * - * The async variant is {@see BigtableTableAdminClient::checkConsistencyAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/check_consistency.php - * - * @param CheckConsistencyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CheckConsistencyResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function checkConsistency(CheckConsistencyRequest $request, array $callOptions = []): CheckConsistencyResponse - { - return $this->startApiCall('CheckConsistency', $request, $callOptions)->wait(); - } - - /** - * Copy a Cloud Bigtable backup to a new backup in the destination cluster - * located in the destination instance and project. - * - * The async variant is {@see BigtableTableAdminClient::copyBackupAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/copy_backup.php - * - * @param CopyBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 copyBackup(CopyBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CopyBackup', $request, $callOptions)->wait(); - } - - /** - * Creates a new AuthorizedView in a table. - * - * The async variant is - * {@see BigtableTableAdminClient::createAuthorizedViewAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/create_authorized_view.php - * - * @param CreateAuthorizedViewRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createAuthorizedView(CreateAuthorizedViewRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAuthorizedView', $request, $callOptions)->wait(); - } - - /** - * Starts creating a new Cloud Bigtable Backup. The returned backup - * [long-running operation][google.longrunning.Operation] can be used to - * track creation of the backup. The - * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The - * [response][google.longrunning.Operation.response] field type is - * [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the - * returned operation will stop the creation and delete the backup. - * - * The async variant is {@see BigtableTableAdminClient::createBackupAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/create_backup.php - * - * @param CreateBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createBackup(CreateBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBackup', $request, $callOptions)->wait(); - } - - /** - * Creates a new table in the specified instance. - * The table can be created with a full set of initial column families, - * specified in the request. - * - * The async variant is {@see BigtableTableAdminClient::createTableAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/create_table.php - * - * @param CreateTableRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Table - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTable(CreateTableRequest $request, array $callOptions = []): Table - { - return $this->startApiCall('CreateTable', $request, $callOptions)->wait(); - } - - /** - * Creates a new table from the specified snapshot. The target table must - * not exist. The snapshot and the table must be in the same instance. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is - * {@see BigtableTableAdminClient::createTableFromSnapshotAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php - * - * @param CreateTableFromSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createTableFromSnapshot(CreateTableFromSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTableFromSnapshot', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes a specified AuthorizedView. - * - * The async variant is - * {@see BigtableTableAdminClient::deleteAuthorizedViewAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/delete_authorized_view.php - * - * @param DeleteAuthorizedViewRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteAuthorizedView(DeleteAuthorizedViewRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAuthorizedView', $request, $callOptions)->wait(); - } - - /** - * Deletes a pending or completed Cloud Bigtable backup. - * - * The async variant is {@see BigtableTableAdminClient::deleteBackupAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/delete_backup.php - * - * @param DeleteBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteBackup(DeleteBackupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes the specified snapshot. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is {@see BigtableTableAdminClient::deleteSnapshotAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/delete_snapshot.php - * - * @param DeleteSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteSnapshot(DeleteSnapshotRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSnapshot', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes a specified table and all of its data. - * - * The async variant is {@see BigtableTableAdminClient::deleteTableAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/delete_table.php - * - * @param DeleteTableRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteTable(DeleteTableRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTable', $request, $callOptions)->wait(); - } - - /** - * Permanently drop/delete a row range from a specified table. The request can - * specify whether to delete all rows in a table, or only those that match a - * particular prefix. - * - * The async variant is {@see BigtableTableAdminClient::dropRowRangeAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/drop_row_range.php - * - * @param DropRowRangeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 dropRowRange(DropRowRangeRequest $request, array $callOptions = []): void - { - $this->startApiCall('DropRowRange', $request, $callOptions)->wait(); - } - - /** - * Generates a consistency token for a Table, which can be used in - * CheckConsistency to check whether mutations to the table that finished - * before this call started have been replicated. The tokens will be available - * for 90 days. - * - * The async variant is - * {@see BigtableTableAdminClient::generateConsistencyTokenAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/generate_consistency_token.php - * - * @param GenerateConsistencyTokenRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateConsistencyTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateConsistencyToken(GenerateConsistencyTokenRequest $request, array $callOptions = []): GenerateConsistencyTokenResponse - { - return $this->startApiCall('GenerateConsistencyToken', $request, $callOptions)->wait(); - } - - /** - * Gets information from a specified AuthorizedView. - * - * The async variant is {@see BigtableTableAdminClient::getAuthorizedViewAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/get_authorized_view.php - * - * @param GetAuthorizedViewRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AuthorizedView - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAuthorizedView(GetAuthorizedViewRequest $request, array $callOptions = []): AuthorizedView - { - return $this->startApiCall('GetAuthorizedView', $request, $callOptions)->wait(); - } - - /** - * Gets metadata on a pending or completed Cloud Bigtable Backup. - * - * The async variant is {@see BigtableTableAdminClient::getBackupAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/get_backup.php - * - * @param GetBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Backup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a Table or Backup resource. - * Returns an empty policy if the resource exists but does not have a policy - * set. - * - * The async variant is {@see BigtableTableAdminClient::getIamPolicyAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/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(); - } - - /** - * Gets metadata information about the specified snapshot. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is {@see BigtableTableAdminClient::getSnapshotAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/get_snapshot.php - * - * @param GetSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Snapshot - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSnapshot(GetSnapshotRequest $request, array $callOptions = []): Snapshot - { - return $this->startApiCall('GetSnapshot', $request, $callOptions)->wait(); - } - - /** - * Gets metadata information about the specified table. - * - * The async variant is {@see BigtableTableAdminClient::getTableAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/get_table.php - * - * @param GetTableRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Table - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTable(GetTableRequest $request, array $callOptions = []): Table - { - return $this->startApiCall('GetTable', $request, $callOptions)->wait(); - } - - /** - * Lists all AuthorizedViews from a specific table. - * - * The async variant is {@see BigtableTableAdminClient::listAuthorizedViewsAsync()} - * . - * - * @example samples/V2/BigtableTableAdminClient/list_authorized_views.php - * - * @param ListAuthorizedViewsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAuthorizedViews(ListAuthorizedViewsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAuthorizedViews', $request, $callOptions); - } - - /** - * Lists Cloud Bigtable backups. Returns both completed and pending - * backups. - * - * The async variant is {@see BigtableTableAdminClient::listBackupsAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/list_backups.php - * - * @param ListBackupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackups', $request, $callOptions); - } - - /** - * Lists all snapshots associated with the specified cluster. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is {@see BigtableTableAdminClient::listSnapshotsAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/list_snapshots.php - * - * @param ListSnapshotsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSnapshots(ListSnapshotsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSnapshots', $request, $callOptions); - } - - /** - * Lists all tables served from a specified instance. - * - * The async variant is {@see BigtableTableAdminClient::listTablesAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/list_tables.php - * - * @param ListTablesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTables(ListTablesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTables', $request, $callOptions); - } - - /** - * Performs a series of column family modifications on the specified table. - * Either all or none of the modifications will occur before this method - * returns, but data requests received prior to that point may see a table - * where only some modifications have taken effect. - * - * The async variant is - * {@see BigtableTableAdminClient::modifyColumnFamiliesAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/modify_column_families.php - * - * @param ModifyColumnFamiliesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Table - * - * @throws ApiException Thrown if the API call fails. - */ - public function modifyColumnFamilies(ModifyColumnFamiliesRequest $request, array $callOptions = []): Table - { - return $this->startApiCall('ModifyColumnFamilies', $request, $callOptions)->wait(); - } - - /** - * Create a new table by restoring from a completed backup. The - * returned table [long-running operation][google.longrunning.Operation] can - * be used to track the progress of the operation, and to cancel it. The - * [metadata][google.longrunning.Operation.metadata] field type is - * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The - * [response][google.longrunning.Operation.response] type is - * [Table][google.bigtable.admin.v2.Table], if successful. - * - * The async variant is {@see BigtableTableAdminClient::restoreTableAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/restore_table.php - * - * @param RestoreTableRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 restoreTable(RestoreTableRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RestoreTable', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on a Table or Backup resource. - * Replaces any existing policy. - * - * The async variant is {@see BigtableTableAdminClient::setIamPolicyAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/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(); - } - - /** - * Creates a new snapshot in the specified cluster from the specified - * source table. The cluster and the table must be in the same instance. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is {@see BigtableTableAdminClient::snapshotTableAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/snapshot_table.php - * - * @param SnapshotTableRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 snapshotTable(SnapshotTableRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SnapshotTable', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that the caller has on the specified Table or Backup - * resource. - * - * The async variant is {@see BigtableTableAdminClient::testIamPermissionsAsync()} - * . - * - * @example samples/V2/BigtableTableAdminClient/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(); - } - - /** - * Restores a specified table which was accidentally deleted. - * - * The async variant is {@see BigtableTableAdminClient::undeleteTableAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/undelete_table.php - * - * @param UndeleteTableRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 undeleteTable(UndeleteTableRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UndeleteTable', $request, $callOptions)->wait(); - } - - /** - * Updates an AuthorizedView in a table. - * - * The async variant is - * {@see BigtableTableAdminClient::updateAuthorizedViewAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/update_authorized_view.php - * - * @param UpdateAuthorizedViewRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateAuthorizedView(UpdateAuthorizedViewRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAuthorizedView', $request, $callOptions)->wait(); - } - - /** - * Updates a pending or completed Cloud Bigtable Backup. - * - * The async variant is {@see BigtableTableAdminClient::updateBackupAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/update_backup.php - * - * @param UpdateBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Backup - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBackup(UpdateBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('UpdateBackup', $request, $callOptions)->wait(); - } - - /** - * Updates a specified table. - * - * The async variant is {@see BigtableTableAdminClient::updateTableAsync()} . - * - * @example samples/V2/BigtableTableAdminClient/update_table.php - * - * @param UpdateTableRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateTable(UpdateTableRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTable', $request, $callOptions)->wait(); - } - - /** Configure the gapic configuration to use a service emulator. */ - private function setDefaultEmulatorConfig(array $options): array - { - $emulatorHost = getenv('BIGTABLE_EMULATOR_HOST'); - if (empty($emulatorHost)) { - return $options; - } - - if ($scheme = parse_url($emulatorHost, PHP_URL_SCHEME)) { - $search = $scheme . '://'; - $emulatorHost = str_replace($search, '', $emulatorHost); - } - - $options['apiEndpoint'] ??= $emulatorHost; - $options['transportConfig']['grpc']['stubOpts']['credentials'] ??= ChannelCredentials::createInsecure(); - $options['credentials'] ??= new InsecureCredentialsWrapper(); - return $options; - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json b/owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json deleted file mode 100644 index fecd9cc3d7ed..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.bigtable.admin.v2", - "libraryPackage": "Google\\Cloud\\Bigtable\\Admin\\V2", - "services": { - "BigtableInstanceAdmin": { - "clients": { - "grpc": { - "libraryClient": "BigtableInstanceAdminGapicClient", - "rpcs": { - "CreateAppProfile": { - "methods": [ - "createAppProfile" - ] - }, - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteAppProfile": { - "methods": [ - "deleteAppProfile" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "GetAppProfile": { - "methods": [ - "getAppProfile" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "ListAppProfiles": { - "methods": [ - "listAppProfiles" - ] - }, - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "ListHotTablets": { - "methods": [ - "listHotTablets" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "PartialUpdateCluster": { - "methods": [ - "partialUpdateCluster" - ] - }, - "PartialUpdateInstance": { - "methods": [ - "partialUpdateInstance" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateAppProfile": { - "methods": [ - "updateAppProfile" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - } - } - } - } - }, - "BigtableTableAdmin": { - "clients": { - "grpc": { - "libraryClient": "BigtableTableAdminGapicClient", - "rpcs": { - "CheckConsistency": { - "methods": [ - "checkConsistency" - ] - }, - "CopyBackup": { - "methods": [ - "copyBackup" - ] - }, - "CreateAuthorizedView": { - "methods": [ - "createAuthorizedView" - ] - }, - "CreateBackup": { - "methods": [ - "createBackup" - ] - }, - "CreateTable": { - "methods": [ - "createTable" - ] - }, - "CreateTableFromSnapshot": { - "methods": [ - "createTableFromSnapshot" - ] - }, - "DeleteAuthorizedView": { - "methods": [ - "deleteAuthorizedView" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteSnapshot": { - "methods": [ - "deleteSnapshot" - ] - }, - "DeleteTable": { - "methods": [ - "deleteTable" - ] - }, - "DropRowRange": { - "methods": [ - "dropRowRange" - ] - }, - "GenerateConsistencyToken": { - "methods": [ - "generateConsistencyToken" - ] - }, - "GetAuthorizedView": { - "methods": [ - "getAuthorizedView" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetSnapshot": { - "methods": [ - "getSnapshot" - ] - }, - "GetTable": { - "methods": [ - "getTable" - ] - }, - "ListAuthorizedViews": { - "methods": [ - "listAuthorizedViews" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListSnapshots": { - "methods": [ - "listSnapshots" - ] - }, - "ListTables": { - "methods": [ - "listTables" - ] - }, - "ModifyColumnFamilies": { - "methods": [ - "modifyColumnFamilies" - ] - }, - "RestoreTable": { - "methods": [ - "restoreTable" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "SnapshotTable": { - "methods": [ - "snapshotTable" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UndeleteTable": { - "methods": [ - "undeleteTable" - ] - }, - "UpdateAuthorizedView": { - "methods": [ - "updateAuthorizedView" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "UpdateTable": { - "methods": [ - "updateTable" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json deleted file mode 100644 index 536c98a6fb2b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "interfaces": { - "google.bigtable.admin.v2.BigtableInstanceAdmin": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateAppProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteAppProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAppProfile": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetCluster": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListAppProfiles": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListClusters": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListHotTablets": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "PartialUpdateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "PartialUpdateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAppProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php deleted file mode 100644 index 4232256b1ba6..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php +++ /dev/null @@ -1,349 +0,0 @@ - [ - 'google.bigtable.admin.v2.BigtableInstanceAdmin' => [ - 'CreateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata', - 'initialPollDelayMillis' => '5000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '60000', - 'totalPollTimeoutMillis' => '21600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateInstanceMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'PartialUpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'cluster.name', - 'fieldAccessors' => [ - 'getCluster', - 'getName', - ], - ], - ], - ], - 'PartialUpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateInstanceMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'UpdateAppProfile' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AppProfile', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateAppProfileMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'app_profile.name', - 'fieldAccessors' => [ - 'getAppProfile', - 'getName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateClusterMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateAppProfile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\AppProfile', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppProfile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAppProfile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\AppProfile', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Cluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAppProfiles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAppProfiles', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListAppProfilesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListClusters' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListHotTablets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getHotTablets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListHotTabletsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListInstancesResponse', - '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', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'appProfile' => 'projects/{project}/instances/{instance}/appProfiles/{app_profile}', - 'cluster' => 'projects/{project}/instances/{instance}/clusters/{cluster}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'instance' => 'projects/{project}/instances/{instance}', - 'location' => 'projects/{project}/locations/{location}', - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php deleted file mode 100644 index a92f99ec26d8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php +++ /dev/null @@ -1,338 +0,0 @@ - [ - 'google.bigtable.admin.v2.BigtableInstanceAdmin' => [ - 'CreateAppProfile' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/appProfiles', - 'body' => 'app_profile', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'app_profile_id', - ], - ], - 'CreateCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/clusters', - 'body' => 'cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cluster_id', - ], - ], - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/instances', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppProfile' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/appProfiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'ignore_warnings', - ], - ], - 'DeleteCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAppProfile' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/appProfiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAppProfiles' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/appProfiles', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/clusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListHotTablets' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/hotTablets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PartialUpdateCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{cluster.name=projects/*/instances/*/clusters/*}', - 'body' => 'cluster', - 'placeholders' => [ - 'cluster.name' => [ - 'getters' => [ - 'getCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'PartialUpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{instance.name=projects/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateAppProfile' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}', - 'body' => 'app_profile', - 'placeholders' => [ - 'app_profile.name' => [ - 'getters' => [ - 'getAppProfile', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateCluster' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*}', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{name=projects/*/instances/*}', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=operations/**}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=operations/projects/**}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json deleted file mode 100644 index 47b0c167c97c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "interfaces": { - "google.bigtable.admin.v2.BigtableTableAdmin": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CheckConsistency": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CopyBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateAuthorizedView": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateTableFromSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteAuthorizedView": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DropRowRange": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GenerateConsistencyToken": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAuthorizedView": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetTable": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListAuthorizedViews": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListSnapshots": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListTables": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ModifyColumnFamilies": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RestoreTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SnapshotTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UndeleteTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAuthorizedView": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php deleted file mode 100644 index c2ada4e51105..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php +++ /dev/null @@ -1,495 +0,0 @@ - [ - 'google.bigtable.admin.v2.BigtableTableAdmin' => [ - 'CopyBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Backup', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CopyBackupMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAuthorizedView' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AuthorizedView', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Backup', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateBackupMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTableFromSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotMetadata', - 'initialPollDelayMillis' => '5000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '60000', - 'totalPollTimeoutMillis' => '3600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RestoreTable' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\RestoreTableMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SnapshotTable' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Snapshot', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\SnapshotTableMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UndeleteTable' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UndeleteTableMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAuthorizedView' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AuthorizedView', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'authorized_view.name', - 'fieldAccessors' => [ - 'getAuthorizedView', - 'getName', - ], - ], - ], - ], - 'UpdateTable' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateTableMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'table.name', - 'fieldAccessors' => [ - 'getTable', - 'getName', - ], - ], - ], - ], - 'CheckConsistency' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\CheckConsistencyResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateTable' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Table', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAuthorizedView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSnapshot' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTable' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DropRowRange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateConsistencyToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAuthorizedView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\AuthorizedView', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetSnapshot' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Snapshot', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTable' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Table', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAuthorizedViews' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAuthorizedViews', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSnapshots' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSnapshots', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListSnapshotsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTables' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTables', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListTablesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ModifyColumnFamilies' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Table', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Backup', - 'headerParams' => [ - [ - 'keyName' => 'backup.name', - 'fieldAccessors' => [ - 'getBackup', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'authorizedView' => 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}', - 'backup' => 'projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}', - 'cluster' => 'projects/{project}/instances/{instance}/clusters/{cluster}', - 'cryptoKeyVersion' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}', - 'instance' => 'projects/{project}/instances/{instance}', - 'snapshot' => 'projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}', - 'table' => 'projects/{project}/instances/{instance}/tables/{table}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php deleted file mode 100644 index 70910ee9a916..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php +++ /dev/null @@ -1,459 +0,0 @@ - [ - 'google.bigtable.admin.v2.BigtableTableAdmin' => [ - 'CheckConsistency' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:checkConsistency', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CopyBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups:copy', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAuthorizedView' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews', - 'body' => 'authorized_view', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'authorized_view_id', - ], - ], - 'CreateBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups', - 'body' => 'backup', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backup_id', - ], - ], - 'CreateTable' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTableFromSnapshot' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAuthorizedView' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSnapshot' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTable' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DropRowRange' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:dropRowRange', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateConsistencyToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAuthorizedView' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetSnapshot' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTable' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAuthorizedViews' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSnapshots' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/snapshots', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTables' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ModifyColumnFamilies' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RestoreTable' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables:restore', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SnapshotTable' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:snapshot', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UndeleteTable' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:undelete', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAuthorizedView' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}', - 'body' => 'authorized_view', - 'placeholders' => [ - 'authorized_view.name' => [ - 'getters' => [ - 'getAuthorizedView', - 'getName', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}', - 'body' => 'backup', - 'placeholders' => [ - 'backup.name' => [ - 'getters' => [ - 'getBackup', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateTable' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{table.name=projects/*/instances/*/tables/*}', - 'body' => 'table', - 'placeholders' => [ - 'table.name' => [ - 'getters' => [ - 'getTable', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=operations/**}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=operations/projects/**}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php deleted file mode 100644 index 7b5c8c4fb05f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php +++ /dev/null @@ -1,2070 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigtableInstanceAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigtableInstanceAdminClient($options); - } - - /** @test */ - public function createAppProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = 'appProfileId1262094415'; - $appProfile = new AppProfile(); - $request = (new CreateAppProfileRequest()) - ->setParent($formattedParent) - ->setAppProfileId($appProfileId) - ->setAppProfile($appProfile); - $response = $gapicClient->createAppProfile($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAppProfileId(); - $this->assertProtobufEquals($appProfileId, $actualValue); - $actualValue = $actualRequestObject->getAppProfile(); - $this->assertProtobufEquals($appProfile, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAppProfileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = 'appProfileId1262094415'; - $appProfile = new AppProfile(); - $request = (new CreateAppProfileRequest()) - ->setParent($formattedParent) - ->setAppProfileId($appProfileId) - ->setAppProfile($appProfile); - try { - $gapicClient->createAppProfile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createClusterTest() - { - $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/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $location = 'location1901043637'; - $serveNodes = 1288838783; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setServeNodes($serveNodes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($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.bigtable.admin.v2.BigtableInstanceAdmin/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClusterId(); - $this->assertProtobufEquals($clusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $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 createClusterExceptionTest() - { - $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/createClusterTest'); - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - 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 createInstanceTest() - { - $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/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $satisfiesPzs = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $clustersValue = new Cluster(); - $valueName = 'valueName-765894756'; - $clustersValue->setName($valueName); - $valueServeNodes = 370436813; - $clustersValue->setServeNodes($valueServeNodes); - $clusters = [ - 'clustersKey' => $clustersValue, - ]; - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance) - ->setClusters($clusters); - $response = $gapicClient->createInstance($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.bigtable.admin.v2.BigtableInstanceAdmin/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualApiRequestObject->getClusters(); - $this->assertProtobufEquals($clusters, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $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 createInstanceExceptionTest() - { - $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/createInstanceTest'); - $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->projectName('[PROJECT]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $clustersValue = new Cluster(); - $valueName = 'valueName-765894756'; - $clustersValue->setName($valueName); - $valueServeNodes = 370436813; - $clustersValue->setServeNodes($valueServeNodes); - $clusters = [ - 'clustersKey' => $clustersValue, - ]; - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance) - ->setClusters($clusters); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - 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 deleteAppProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $ignoreWarnings = true; - $request = (new DeleteAppProfileRequest()) - ->setName($formattedName) - ->setIgnoreWarnings($ignoreWarnings); - $gapicClient->deleteAppProfile($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getIgnoreWarnings(); - $this->assertProtobufEquals($ignoreWarnings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAppProfileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $ignoreWarnings = true; - $request = (new DeleteAppProfileRequest()) - ->setName($formattedName) - ->setIgnoreWarnings($ignoreWarnings); - try { - $gapicClient->deleteAppProfile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $gapicClient->deleteCluster($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $gapicClient->deleteInstance($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAppProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $request = (new GetAppProfileRequest()) - ->setName($formattedName); - $response = $gapicClient->getAppProfile($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAppProfileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $request = (new GetAppProfileRequest()) - ->setName($formattedName); - try { - $gapicClient->getAppProfile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $serveNodes = 1288838783; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $expectedResponse->setServeNodes($serveNodes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigtable.admin.v2.BigtableInstanceAdmin/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 getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $satisfiesPzs = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppProfilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $appProfilesElement = new AppProfile(); - $appProfiles = [ - $appProfilesElement, - ]; - $expectedResponse = new ListAppProfilesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAppProfiles($appProfiles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListAppProfilesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAppProfiles($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAppProfiles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListAppProfiles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppProfilesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListAppProfilesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAppProfiles($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClusters($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHotTabletsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hotTabletsElement = new HotTablet(); - $hotTablets = [ - $hotTabletsElement, - ]; - $expectedResponse = new ListHotTabletsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHotTablets($hotTablets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListHotTabletsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listHotTablets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHotTablets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListHotTablets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHotTabletsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListHotTabletsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listHotTablets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->projectName('[PROJECT]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function partialUpdateClusterTest() - { - $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/partialUpdateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $location = 'location1901043637'; - $serveNodes = 1288838783; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setServeNodes($serveNodes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/partialUpdateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $updateMask = new FieldMask(); - $request = (new PartialUpdateClusterRequest()) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->partialUpdateCluster($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.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateClusterTest'); - $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 partialUpdateClusterExceptionTest() - { - $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/partialUpdateClusterTest'); - $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 - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $updateMask = new FieldMask(); - $request = (new PartialUpdateClusterRequest()) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->partialUpdateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateClusterTest'); - 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 partialUpdateInstanceTest() - { - $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/partialUpdateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $satisfiesPzs = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/partialUpdateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $updateMask = new FieldMask(); - $request = (new PartialUpdateInstanceRequest()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - $response = $gapicClient->partialUpdateInstance($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.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); - $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 partialUpdateInstanceExceptionTest() - { - $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/partialUpdateInstanceTest'); - $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 - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $updateMask = new FieldMask(); - $request = (new PartialUpdateInstanceRequest()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - $response = $gapicClient->partialUpdateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); - 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 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.bigtable.admin.v2.BigtableInstanceAdmin/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.bigtable.admin.v2.BigtableInstanceAdmin/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 updateAppProfileTest() - { - $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/updateAppProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAppProfileTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $appProfile = new AppProfile(); - $updateMask = new FieldMask(); - $request = (new UpdateAppProfileRequest()) - ->setAppProfile($appProfile) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAppProfile($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.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAppProfile(); - $this->assertProtobufEquals($appProfile, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); - $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 updateAppProfileExceptionTest() - { - $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/updateAppProfileTest'); - $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 - $appProfile = new AppProfile(); - $updateMask = new FieldMask(); - $request = (new UpdateAppProfileRequest()) - ->setAppProfile($appProfile) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAppProfile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); - 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 updateClusterTest() - { - $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/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $location2 = 'location21541837352'; - $serveNodes2 = 1623486220; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location2); - $expectedResponse->setServeNodes($serveNodes2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $serveNodes = 1288838783; - $request = (new Cluster()) - ->setName($name) - ->setServeNodes($serveNodes); - $response = $gapicClient->updateCluster($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.bigtable.admin.v2.BigtableInstanceAdmin/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getServeNodes(); - $this->assertProtobufEquals($serveNodes, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - $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 updateClusterExceptionTest() - { - $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/updateClusterTest'); - $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 - $name = 'name3373707'; - $serveNodes = 1288838783; - $request = (new Cluster()) - ->setName($name) - ->setServeNodes($serveNodes); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - 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 updateInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName2 = 'displayName21615000987'; - $satisfiesPzs2 = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName2); - $expectedResponse->setSatisfiesPzs($satisfiesPzs2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $type = Type::TYPE_UNSPECIFIED; - $labelsValue = 'labelsValue950036658'; - $labels = [ - 'labelsKey' => $labelsValue, - ]; - $request = (new Instance()) - ->setName($name) - ->setDisplayName($displayName) - ->setType($type) - ->setLabels($labels); - $response = $gapicClient->updateInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getDisplayName(); - $this->assertProtobufEquals($displayName, $actualValue); - $actualValue = $actualRequestObject->getType(); - $this->assertProtobufEquals($type, $actualValue); - $actualValue = $actualRequestObject->getLabels(); - $this->assertProtobufEquals($labels, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $type = Type::TYPE_UNSPECIFIED; - $labelsValue = 'labelsValue950036658'; - $labels = [ - 'labelsKey' => $labelsValue, - ]; - $request = (new Instance()) - ->setName($name) - ->setDisplayName($displayName) - ->setType($type) - ->setLabels($labels); - try { - $gapicClient->updateInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAppProfileAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = 'appProfileId1262094415'; - $appProfile = new AppProfile(); - $request = (new CreateAppProfileRequest()) - ->setParent($formattedParent) - ->setAppProfileId($appProfileId) - ->setAppProfile($appProfile); - $response = $gapicClient->createAppProfileAsync($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.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAppProfileId(); - $this->assertProtobufEquals($appProfileId, $actualValue); - $actualValue = $actualRequestObject->getAppProfile(); - $this->assertProtobufEquals($appProfile, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php deleted file mode 100644 index f2439bbf284a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php +++ /dev/null @@ -1,2806 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigtableTableAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigtableTableAdminClient($options); - } - - /** @test */ - public function checkConsistencyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $consistent = true; - $expectedResponse = new CheckConsistencyResponse(); - $expectedResponse->setConsistent($consistent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = 'consistencyToken-1090516718'; - $request = (new CheckConsistencyRequest()) - ->setName($formattedName) - ->setConsistencyToken($consistencyToken); - $response = $gapicClient->checkConsistency($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CheckConsistency', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getConsistencyToken(); - $this->assertProtobufEquals($consistencyToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkConsistencyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = 'consistencyToken-1090516718'; - $request = (new CheckConsistencyRequest()) - ->setName($formattedName) - ->setConsistencyToken($consistencyToken); - try { - $gapicClient->checkConsistency($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function copyBackupTest() - { - $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/copyBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup2 = 'sourceBackup2889376921'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup2); - $expectedResponse->setSizeBytes($sizeBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/copyBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $formattedSourceBackup = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $expireTime = new Timestamp(); - $request = (new CopyBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setSourceBackup($formattedSourceBackup) - ->setExpireTime($expireTime); - $response = $gapicClient->copyBackup($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.bigtable.admin.v2.BigtableTableAdmin/CopyBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $actualValue); - $actualValue = $actualApiRequestObject->getSourceBackup(); - $this->assertProtobufEquals($formattedSourceBackup, $actualValue); - $actualValue = $actualApiRequestObject->getExpireTime(); - $this->assertProtobufEquals($expireTime, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyBackupTest'); - $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 copyBackupExceptionTest() - { - $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/copyBackupTest'); - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $formattedSourceBackup = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $expireTime = new Timestamp(); - $request = (new CopyBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setSourceBackup($formattedSourceBackup) - ->setExpireTime($expireTime); - $response = $gapicClient->copyBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyBackupTest'); - 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 createAuthorizedViewTest() - { - $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/createAuthorizedViewTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $deletionProtection = true; - $expectedResponse = new AuthorizedView(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAuthorizedViewTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $authorizedViewId = 'authorizedViewId1171901009'; - $authorizedView = new AuthorizedView(); - $request = (new CreateAuthorizedViewRequest()) - ->setParent($formattedParent) - ->setAuthorizedViewId($authorizedViewId) - ->setAuthorizedView($authorizedView); - $response = $gapicClient->createAuthorizedView($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.bigtable.admin.v2.BigtableTableAdmin/CreateAuthorizedView', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizedViewId(); - $this->assertProtobufEquals($authorizedViewId, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizedView(); - $this->assertProtobufEquals($authorizedView, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthorizedViewTest'); - $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 createAuthorizedViewExceptionTest() - { - $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/createAuthorizedViewTest'); - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $authorizedViewId = 'authorizedViewId1171901009'; - $authorizedView = new AuthorizedView(); - $request = (new CreateAuthorizedViewRequest()) - ->setParent($formattedParent) - ->setAuthorizedViewId($authorizedViewId) - ->setAuthorizedView($authorizedView); - $response = $gapicClient->createAuthorizedView($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthorizedViewTest'); - 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 createBackupTest() - { - $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/createBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup = 'sourceBackup-258292122'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup); - $expectedResponse->setSizeBytes($sizeBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setBackup($backup); - $response = $gapicClient->createBackup($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.bigtable.admin.v2.BigtableTableAdmin/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - $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 createBackupExceptionTest() - { - $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/createBackupTest'); - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setBackup($backup); - $response = $gapicClient->createBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - 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 createTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $table = new Table(); - $request = (new CreateTableRequest()) - ->setParent($formattedParent) - ->setTableId($tableId) - ->setTable($table); - $response = $gapicClient->createTable($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CreateTable', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTableId(); - $this->assertProtobufEquals($tableId, $actualValue); - $actualValue = $actualRequestObject->getTable(); - $this->assertProtobufEquals($table, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTableExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $table = new Table(); - $request = (new CreateTableRequest()) - ->setParent($formattedParent) - ->setTableId($tableId) - ->setTable($table); - try { - $gapicClient->createTable($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTableFromSnapshotTest() - { - $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/createTableFromSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTableFromSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $formattedSourceSnapshot = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new CreateTableFromSnapshotRequest()) - ->setParent($formattedParent) - ->setTableId($tableId) - ->setSourceSnapshot($formattedSourceSnapshot); - $response = $gapicClient->createTableFromSnapshot($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.bigtable.admin.v2.BigtableTableAdmin/CreateTableFromSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTableId(); - $this->assertProtobufEquals($tableId, $actualValue); - $actualValue = $actualApiRequestObject->getSourceSnapshot(); - $this->assertProtobufEquals($formattedSourceSnapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTableFromSnapshotTest'); - $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 createTableFromSnapshotExceptionTest() - { - $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/createTableFromSnapshotTest'); - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $formattedSourceSnapshot = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new CreateTableFromSnapshotRequest()) - ->setParent($formattedParent) - ->setTableId($tableId) - ->setSourceSnapshot($formattedSourceSnapshot); - $response = $gapicClient->createTableFromSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTableFromSnapshotTest'); - 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 deleteAuthorizedViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); - $request = (new DeleteAuthorizedViewRequest()) - ->setName($formattedName); - $gapicClient->deleteAuthorizedView($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteAuthorizedView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAuthorizedViewExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); - $request = (new DeleteAuthorizedViewRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAuthorizedView($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $gapicClient->deleteBackup($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new DeleteSnapshotRequest()) - ->setName($formattedName); - $gapicClient->deleteSnapshot($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSnapshotExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new DeleteSnapshotRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSnapshot($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new DeleteTableRequest()) - ->setName($formattedName); - $gapicClient->deleteTable($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteTable', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTableExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new DeleteTableRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTable($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function dropRowRangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new DropRowRangeRequest()) - ->setName($formattedName); - $gapicClient->dropRowRange($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DropRowRange', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function dropRowRangeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new DropRowRangeRequest()) - ->setName($formattedName); - try { - $gapicClient->dropRowRange($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateConsistencyTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $consistencyToken = 'consistencyToken-1090516718'; - $expectedResponse = new GenerateConsistencyTokenResponse(); - $expectedResponse->setConsistencyToken($consistencyToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GenerateConsistencyTokenRequest()) - ->setName($formattedName); - $response = $gapicClient->generateConsistencyToken($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GenerateConsistencyToken', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateConsistencyTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GenerateConsistencyTokenRequest()) - ->setName($formattedName); - try { - $gapicClient->generateConsistencyToken($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuthorizedViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $deletionProtection = true; - $expectedResponse = new AuthorizedView(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); - $request = (new GetAuthorizedViewRequest()) - ->setName($formattedName); - $response = $gapicClient->getAuthorizedView($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetAuthorizedView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuthorizedViewExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); - $request = (new GetAuthorizedViewRequest()) - ->setName($formattedName); - try { - $gapicClient->getAuthorizedView($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup = 'sourceBackup-258292122'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.bigtable.admin.v2.BigtableTableAdmin/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 getSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dataSizeBytes = 2110122398; - $description = 'description-1724546052'; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name2); - $expectedResponse->setDataSizeBytes($dataSizeBytes); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new GetSnapshotRequest()) - ->setName($formattedName); - $response = $gapicClient->getSnapshot($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnapshotExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new GetSnapshotRequest()) - ->setName($formattedName); - try { - $gapicClient->getSnapshot($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name2); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GetTableRequest()) - ->setName($formattedName); - $response = $gapicClient->getTable($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetTable', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTableExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GetTableRequest()) - ->setName($formattedName); - try { - $gapicClient->getTable($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuthorizedViewsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $authorizedViewsElement = new AuthorizedView(); - $authorizedViews = [ - $authorizedViewsElement, - ]; - $expectedResponse = new ListAuthorizedViewsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAuthorizedViews($authorizedViews); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ListAuthorizedViewsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAuthorizedViews($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAuthorizedViews()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListAuthorizedViews', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuthorizedViewsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ListAuthorizedViewsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAuthorizedViews($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupsElement = new Backup(); - $backups = [ - $backupsElement, - ]; - $expectedResponse = new ListBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackups($backups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnapshotsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $snapshotsElement = new Snapshot(); - $snapshots = [ - $snapshotsElement, - ]; - $expectedResponse = new ListSnapshotsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSnapshots($snapshots); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListSnapshotsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSnapshots($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListSnapshots', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnapshotsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListSnapshotsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSnapshots($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTablesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tablesElement = new Table(); - $tables = [ - $tablesElement, - ]; - $expectedResponse = new ListTablesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTables($tables); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListTablesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTables($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTables()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListTables', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTablesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListTablesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTables($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyColumnFamiliesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name2); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $modifications = []; - $request = (new ModifyColumnFamiliesRequest()) - ->setName($formattedName) - ->setModifications($modifications); - $response = $gapicClient->modifyColumnFamilies($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ModifyColumnFamilies', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getModifications(); - $this->assertProtobufEquals($modifications, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyColumnFamiliesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $modifications = []; - $request = (new ModifyColumnFamiliesRequest()) - ->setName($formattedName) - ->setModifications($modifications); - try { - $gapicClient->modifyColumnFamilies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreTableTest() - { - $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/restoreTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $request = (new RestoreTableRequest()) - ->setParent($formattedParent) - ->setTableId($tableId); - $response = $gapicClient->restoreTable($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.bigtable.admin.v2.BigtableTableAdmin/RestoreTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTableId(); - $this->assertProtobufEquals($tableId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreTableTest'); - $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 restoreTableExceptionTest() - { - $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/restoreTableTest'); - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $request = (new RestoreTableRequest()) - ->setParent($formattedParent) - ->setTableId($tableId); - $response = $gapicClient->restoreTable($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreTableTest'); - 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 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.bigtable.admin.v2.BigtableTableAdmin/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 snapshotTableTest() - { - $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/snapshotTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $dataSizeBytes = 2110122398; - $description2 = 'description2568623279'; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name2); - $expectedResponse->setDataSizeBytes($dataSizeBytes); - $expectedResponse->setDescription($description2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/snapshotTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $formattedCluster = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $snapshotId = 'snapshotId-168585866'; - $request = (new SnapshotTableRequest()) - ->setName($formattedName) - ->setCluster($formattedCluster) - ->setSnapshotId($snapshotId); - $response = $gapicClient->snapshotTable($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.bigtable.admin.v2.BigtableTableAdmin/SnapshotTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($formattedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshotId(); - $this->assertProtobufEquals($snapshotId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); - $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 snapshotTableExceptionTest() - { - $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/snapshotTableTest'); - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $formattedCluster = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $snapshotId = 'snapshotId-168585866'; - $request = (new SnapshotTableRequest()) - ->setName($formattedName) - ->setCluster($formattedCluster) - ->setSnapshotId($snapshotId); - $response = $gapicClient->snapshotTable($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); - 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 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.bigtable.admin.v2.BigtableTableAdmin/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 undeleteTableTest() - { - $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/undeleteTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name2); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeleteTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new UndeleteTableRequest()) - ->setName($formattedName); - $response = $gapicClient->undeleteTable($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.bigtable.admin.v2.BigtableTableAdmin/UndeleteTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeleteTableTest'); - $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 undeleteTableExceptionTest() - { - $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/undeleteTableTest'); - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new UndeleteTableRequest()) - ->setName($formattedName); - $response = $gapicClient->undeleteTable($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeleteTableTest'); - 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 updateAuthorizedViewTest() - { - $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/updateAuthorizedViewTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $deletionProtection = true; - $expectedResponse = new AuthorizedView(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAuthorizedViewTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $authorizedView = new AuthorizedView(); - $request = (new UpdateAuthorizedViewRequest()) - ->setAuthorizedView($authorizedView); - $response = $gapicClient->updateAuthorizedView($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.bigtable.admin.v2.BigtableTableAdmin/UpdateAuthorizedView', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAuthorizedView(); - $this->assertProtobufEquals($authorizedView, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthorizedViewTest'); - $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 updateAuthorizedViewExceptionTest() - { - $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/updateAuthorizedViewTest'); - $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 - $authorizedView = new AuthorizedView(); - $request = (new UpdateAuthorizedViewRequest()) - ->setAuthorizedView($authorizedView); - $response = $gapicClient->updateAuthorizedView($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthorizedViewTest'); - 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 updateBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup = 'sourceBackup-258292122'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $updateMask = new FieldMask(); - $request = (new UpdateBackupRequest()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBackup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/UpdateBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $updateMask = new FieldMask(); - $request = (new UpdateBackupRequest()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTableTest() - { - $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/updateTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $table = new Table(); - $updateMask = new FieldMask(); - $request = (new UpdateTableRequest()) - ->setTable($table) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateTable($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.bigtable.admin.v2.BigtableTableAdmin/UpdateTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTable(); - $this->assertProtobufEquals($table, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTableTest'); - $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 updateTableExceptionTest() - { - $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/updateTableTest'); - $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 - $table = new Table(); - $updateMask = new FieldMask(); - $request = (new UpdateTableRequest()) - ->setTable($table) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateTable($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTableTest'); - 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 checkConsistencyAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $consistent = true; - $expectedResponse = new CheckConsistencyResponse(); - $expectedResponse->setConsistent($consistent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = 'consistencyToken-1090516718'; - $request = (new CheckConsistencyRequest()) - ->setName($formattedName) - ->setConsistencyToken($consistencyToken); - $response = $gapicClient->checkConsistencyAsync($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.bigtable.admin.v2.BigtableTableAdmin/CheckConsistency', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getConsistencyToken(); - $this->assertProtobufEquals($consistencyToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Bigtable.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Bigtable.php deleted file mode 100644 index 625f960720165017efc773f5f9617be40ddb1e66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12271 zcmds7Pf#1z8TU#+&;xApaAKkSlQ(vZV-P7x?L>~9t^fmx0~jz)Tus$w^#of>T4i@- zLOmRsO!_A?J#;$lO#kJY>7VH|x6X8W=%GF2*7ndDa>*gnLk>BmJ>=Bydw*6dw1DK` zgX@dMzVChSegD7jxBKEtwT&8iGCjkp%r$*hOs{RF{SB6`xsLBxPC30+FO`^^wwy}M zE;BciPEReQ=NDGe(^GRRCt<7S)Ln~Z)9a42US{KK_PTGb!H?S$!S4*`Mo87HFt27> zEIqTBdzJZS(e%yy4Bwc~$&LBdiHn3-Wz+N0>KVC1((tcVUn|>I+Vf2x{ySxR1-okd zwpq5n4L84(E}3PI!RA)lQoU;Vwo^^xhJ~udM$V=MPozCnb3oEdX?2xF6dnZ6&sBZq zR?TvLig}i6*L=ra1k!AFo%w;v@X5$oc`UNCOX(4D$85Icl9$rHTW8_Z(`lFab+>wv z-y0ch2fy+WiZW_;-l$d`)Phs>ve|}A4HkQCoGja{>UXy1ip|Q!9NRE&+m74W)+Hw0 zqoYeMId$KzuD5@b@)Pi#{1o`q-R)drZ`7IRFN0z`&}!f;Q+0?Sut@ud2U}Nc2n^q> z)b3*M4cDyInA^dPmuglXg{<$fhlj)1Wm`JGQ7i_&eg$&CNZ_65t7pi+R>{c&gP&4C zl2Q2~b9*9nLT)o__PE6zQ)G(N6QP9?dS78px}PK%4iUK0$K+Bnyd)e+t~@4J)D;k>h6F-*8;ap@rKv+Z3D!{jKqWC7$afx8s!VzL{V z(Gk++!p)O0_^WRsCGQjVhzv-!%zQdVdSEN$-ejE9KDGxfxFZlzN(eG8l*5_BQU%fgQ(?5vgLCWr4 z4YEE1!}nMl_3AATj2;JlX7(3K?8;2Ca(NQB(MQQ~sIh**v&?E0Ob;3?++thYI{owl z8E8_UG(qX+b42|6tHNQgnpSkv`Yl(do5-?PWqiv3H7vwhTu*V*MATr zgRj;hgP{&&q};QFg`s_D@^fW^odfShh4km*9~&|H97$AAC~UqUEHL&02Uckks#}Ij z4n%yHK13c2sY2*c|9dR-^qzYN&%%f0A()sG)F2N)JL%fotyIN##@>(6II_VKLUY13w_(AoDG>FwdN6BDe z*XjDpWT5F3dY1G+8)!R4&bV)4STPEcs%lUvcLdEp04d_9zp!VuEp^H!|!E!fDx1x-8k#vRn!7)f%Ul{o_ zcK-~sOc=3#eNne!`Pm@>J;tL)(zMG|H}6lNw-@sLxvN% zK7U39mQp4r``z-x29fu3B(-}DYoRpkDH6xV0!`UBaUznjv#EbqBco~rn-hq~tw9Wdr0}tlSED3PD=S?l$5&!(SH#q zCs1u+G4HW(wCS#5?r7((^cg}RZd|{BT_^7}L&Hswd{@*E2>s(LWXN)=0CCiL7g6w? zTMT*$k(46qlF-j&XwwSc1I$KAFRK>C;aK7KJsh$V-C%IpHD>w+HMsI#cfX2(y{(Y3 zb(hCkmCze!{u3^IEp^|?j{c+G_P6NA-jFdg88CAtI=+EX2!(8Mppxnd&$ zlTfd!MN$*{HlC^1VHCrg@XaYg`L%G$$Dv0|Ie5KpoCTZLL^ID1>BhN;Pl}v`tE@Nm zw>TjUGtrkxm%mjL_`}hO7dw)+!6vf;JSY@90U8#pa@~XZ9uWkdf5I&y253L@;)8M$ z3r4~b=p%=*s z!1`>c;$Vp~4BeaX%dMF1tt2@peDy`r#dUO?46eMsIK2y3=p|j(m#3Emk}zW|<&2r> z!sNo$tJ9M!a|`o>F*->4Cl}^d=H{;({7F3ZBaI}22%$6JB%vfDGLwwq$ku+3#I&E3 zXv%$)RO*i!=?g_!s7Dsj6wxEo+31`q#)b~BezXcGSWvfA;curH8oRyG~oRM_RBp9x2#+XyE7FfXujCJZ2NT9|2&e zpVy>9$pNPmXj$LH6H(s2h_6Aea56}p!=xXOka~qlr$8`-PsAGNz6Z2rRy-&q*y%nS z#VtY!8R%SKS7;cVC4Hf1w2#CQl0vH^d??Wx;XuKB6K=ye0+fwCujK}084_aZKLt3Z z`3ACFy#P5?zKN24emd&*(6QCaK46pTwH0XO0>A_Ov4S*DMePK6@D)|S0FWYrNTN7@ z;#a3gZ%)4Yq94UcFIGhym1(5Esa5GlsmLQ6MB)$_@OF$4OuS?=)`HK*#Swgl9DRS)2?s;c0Xv%3+#F zl%3DEK`D*>PKU;RPotMRHntarHgD$h^yZ=3yNUh%Yw@?bNP@Qp2!7GXSPhnyr6bc% zh)P=deX#PQjqn_WF%seX(TV~qc8qiTEk}j@FEu^eu_y2YQ9g|Ouj{La>IY%w_o*9D zcxy)j`+0PK`>GK>^;A^AH`qWq;je-8pMW3GkfE7?V|R>`tq-GY{+^~^ynCB_X!Lwu zzj1G@j_mJKvqQfBZx?y61=FLE^L-1M$_8UmZV*8&z2WVy9U~Vqyvhm<^iTkxqs_qP z=q|)^$GG<8nM8Tp?=(Hvv9|%**$hpi(^>jA4%O$P4!KWVkA4R8QwXS~k+~#9pqwol z+H4|}e)dCc$KVL_jxmHlbCj*m=}&PB;rbp8({{E7*tH7s7wBmLThqtx?6)bReS5zP zUa7Z0&@?i7TIrPhd%i;7jciLTd;qyO84)NPF5UsaeXq4Bb^Tt`Cp!)e?75pShp|!A z3x^sTk*D0R!SSaUIo%eBO}`eEd)wNo9Lo3-9HfuE3z62z=%zZbhU@JSd!fl~U4H$! z@4E$XEU0P!*2JeMVPKv{!YdeNVJfAQ$okhxEXA*PCjAxNxT_cnUsMSC+ZgE&0|qoY zIfhA;gppHSGoh63uVCCEHBECEXp{psJBA+dG%9Pns9)d$H<9mQ@$D=N0Z}UJ<^Wc1 zhN3!7zt3o?k76GhCjum<`Af5Z7=Mm!_joR98V#yi)DRu_1*LpFd7-v=|K2%HjJYUN< zzSf3MZapqfJ}Gfuk8@nbVoV)_NPWZ-`3ZS=i6kc zlA%D6fdBWj&c1nk?d}e0!Mb+CP1|cdz}a`6JrjI&J1V{)4}EYBujb%`_=u0qIi>h0 Je4A_&@;`5!XF31? diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Data.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Data.php deleted file mode 100644 index b349402a17050566c9fa70058ba77a01f7f689f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5521 zcmdT|TW{mW6<)1vSvr(&wCgC^OBlwgKU}5i#d7=bZV@W#;i$(Rl

EF0n*|3VBs$s^?c8@l9Z+Rx8o&_7kH`1eD8N?@e^yn{Dh<6b>6`!a8oY~EE0GX zxP14%C3O<-P86btPb_W55jl+xcfScz9tX_t9`MACy(kUiBV=v2&v=@JidJ^-t8Gc0 zH?Vf4jqUa|BcE7lJmUG?Ei2~fC=MP8yGg;@?5kT4q-T-WJ@mNW@9=YW>4kB-J@IOy zq)0Ru-|opc;>o*)Nfh~yGE%{r`S0dR(% z8;6O|wP3Em(k1gp933N9SE1~)9!J#+=xEjc&rMi5CA#?uEK;oM%gAT63b!O+n43_I z*&9bHt&q|eH_W@RMT^&Ls3Ls<=|2LaH%@t?#Dp!lybZM^jlJMZtuG*Z71wbOgqK<@ zD;-+^J=(a@G%R{xY>Yp%Se?+qhzAk@NWrM{pf6;^Iz_$q zqC^sUUFjmPkkT=rn(69PVOg=+zl1W{@|vgSI#lBD4e69V)Xbj%&`L~(Y9QY(@=JST z|DyzkObY4UCKw_u$4)NGEZCN&WJ#kP*PucyUggNSDX>cRUz1nPnzzB6rVHsM6^ad5 zyQ00b1}jqn_P4N_fl9h^S6e*+W(*ncSjh|`zK&_HQ|z>IcZlrlWs z3=@(%b@E7~ZKmX|oPJJ9pZ*FMx%~(XnG*Y76{z9?V&TWuYyK4L);aS60Yano(TwAk z+|7MrMT?&Th-Tt*b}8$W(b}CaDmuO3NBPH4b;F>KqeU2CS)(lP-kUGKulZ4Y6&4dO zxTvqABvq96VJ*T*#$mqi41{0x4MoEE_59Gi$kR+kqY@}Hz=`=8|E-plQM_T^f(@c4 z*ou9wiK{3~<;sS74(ihi2zgW#u{Pb24JL=(sja9|QZ;@Gn~G6npWaMX_7938lS@04 zKY;BC5~oy9y*FBRk&0==qZWjz1k;p_)Dg(W#~GChgf?+a=r1gzr_`lH0-*HAa7#2u zC*rX~VGRd^gr`~!HHRf++kwV3o9_+1jEi~&af!fEyA|40D71)FaiD# zmj1p3)eQIMLs*Yu-uGPUb_(WHLX6gYBg_^UG!knWs!;z^<^j~iu&;$=lFr|#Q-QLy z%l^Ism6s#BMudU+B~<97>0DKr*(r*e=5Jzmq7ey?<_Q?Ak3}|=!jxA=>yx>{INY9u zO8gnD;6Wo+wE{}F8I>yA{Uu3cDt-ZGpZlC59*09mLQV8#qxJb*Lk@)4Axg)yvu_byUZJ`@DfnXik^z%>@m#Tg(WYDMyZO@Y|h5taH`3n;Qzql zF|1#OTd~!%PxA`^3Z|U?R5ahAYc#MF=k}K9EZn<+L)XMe1YZZBGE_Cf{zC~ik2&kV z4Ex?-{9Wv&{CMQk-Q@>i5(j0h<=L?SiWpBPoC_O*M?hs=C1xpK=W6k=?8XZsX3j(IZjQ>;{(IS-*GE`&}ZG%L>wXC>j6 zGyu;VyOb2MF>->0U`%p1I{Bb5yFl1Gu$swrSn8geCf;=E!@;X46Q1`0mTTqKJ6qu;;?8GGp2e&PJGV<`;cwZ`Y5`3}~rEaOS zijg9KFkkH2`Fjbr@tLszew`}bm6_P|sPwBZ@lHAFYc`bFI}0bzjx6%<internalAddGeneratedFile( - ' -£ -&google/bigtable/v2/feature_flags.protogoogle.bigtable.v2"ž - FeatureFlags - reverse_scans ( -mutate_rows_rate_limit ( -mutate_rows_rate_limit2 (" -last_scanned_row_responses ( -routing_cookie ( - -retry_info (# -client_side_metrics_enabled ( -traffic_director_enabled ( -direct_access_requested - (B» -com.google.bigtable.v2BFeatureFlagsProtoPZ8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepbªGoogle.Cloud.Bigtable.V2ÊGoogle\\Cloud\\Bigtable\\V2êGoogle::Cloud::Bigtable::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/RequestStats.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/RequestStats.php deleted file mode 100644 index e0ba5ca1e11e5c20eda32c7b797367e3114dea6b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1345 zcma)6-A)rh6t4m-NWY0O@`M&e_{AG5U!9%pqQl^MzF^VpbK4mCVQcEfY zii#v*3Q>8Malw>_Q1=kMKRiae-Gk!?CN!6Yq70*flmo%GB0kV0GLNCZrP!x}(bmDb|Qxw=lgkqA(t-8iP1dPhRj!!mBtQG2SyRZI5!;j2rOl2CV;IFPqKM&#Qax z4gJ>F1~iWti4RP{94Xhg<}%z;@;nc7#?p|=BGoGm)M(E(S7Ff^O6e@Fj5E%-0=Fp> z;;*n-XSokcrRATv>(<)(0E^Ysyfs6e(u_5%a@H%j^%`!XK;D$%?7^LSRVqFejIF|) zA8bs=amzI+uti~ha$B0au#_0iq2p*LF%O4^c17>eG}tQ|-(2g=1B`<^KN@h?oP#OB zorTHlZajO9lV?=OBCg#{lP2bklYB>BeaAAD62*vAI?*r&G4pd6v6%36}tW0DQu{ A3;+NC diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/ResponseParams.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/ResponseParams.php deleted file mode 100644 index 932fb13c6dee0f42c50f85259a8169fc148fe696..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 904 zcma)4%Z}496eV5oFoH!vFw$%;Fw$fsNTskrE*(TDlvzM4H0oj$DRLY)V=1*Q+Zl;L z-SaK{13$oLu;eRnoTi;og+w;7e9t-e`kwRpjXGE88BCa9npjpq{uS&w1Er;vR92AJ ziv`m_rr7IB1U@}WSF-rT6jU+xw2Bv92Db{+0Fi%oA7Aewvpot2-_Jk-WhTPR@dxmcL2?7t;NvK-3Y8UCqLPX zW4@l_ZBcC6esJD|8(>2_M8A6|{9jZ0{T3N@_C*)*(=&Ac`sVu&(XC4sWxsqO`+!tfh!~k-OkqdPl(qYw0$AE`NV|`z;Y;U&Xki fVmy!Yn?BAj4>xOn-nx0k{C^tnk*&uov_j}Fj?E-( diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Types.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Types.php deleted file mode 100644 index a7a31f2675de559c80b47807b38e18eaaae236e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2982 zcmb7`Pj4GV6u|2^f9#h~ReM0z0%0hnaiMIA8$#GLAaDM;5+PBWMgpy5jn`vm)b;MN zJDWD3+_>@)_yU|bAn^@2@BujY%$+-LW_InQ>Bdf!$P>@|y+8Bjy?Kwmj*cVvknFO6 z#Z<5^>6{XA%t#c6BJ@I^bkbgr#l#B-5%*ba5wf*UzTH10+gpzhKR`4I)7WD+>4#z8 zXUiSl7qo+mlg6?*jaXtSRR94Uuq2`$BfAIA9uu@n1$B27C15gdurZwwDH;;9)={upfA=evfFKQua<1 zVvHLk_v1i@jUl^_1Hs~e`tBA>yqHHKj1N%Mw);#B4@-Vizn7Vn>UfXTwU4%a$;k~O z;*_1YPDso|8VBpjZ>ivHxN_fcO3jG7JDmAlhaJ-s9>%skifW`p1@-AyJPV=O?G8QO z!5r3yHl)QR_{V_7tCMFKdf&>EYn?Q1zq$p}GDXG;K<8Ajq%G53E0I!tzOiUsCM+p! zIa0KB!&rs+M8rJkYivqk?-ycEl`L{-4Fg+U(b&uwYnaB>6{OZ+q34HGJZxxgL2;ze z+>RDLN9Go*laR`01F9XoAlhI>Veb_hbWjqlJ%XEpW1R>(h%^Wayj=($=Hf`BMJy_& z!TB*3w@^}Br2T%(`a^JbjKyXyjIrRgPN7$35oM9XEYdipry46OtoY6}r6^Jl zpfaG@xlAkO-NJL(qfzUI`D+Pg)QvN~gbEA1u!}b?yQA(>A*>K^w!!VKOao0 z$a;pL^l_?I!UJysC{3!qYq~}o*V2`hyZIK(WvXpdZO%hg{;PH`oX3BdFjchIOPE4N z$MO65<9GtMuy3_l(B(8}>rix;S}hFaqCN|sr)`Dj;cUUpi{D}GUAqfj2z(Z%We+f` zFqbu-;c|6Fp4YI@O%#>IYyMnPcLyuV_#9??@?l8uVwSQ0epDD4-W&uh^^BOCFryZR z0igJ{e5KXpt{Qh?T6J`t_F9of^9z_!1!`EZz2A?^SwoMk zr|AHTtPRGo??+KP4fqcjnir;lsOgujIf0fIKCAIJVIO}F{4|k&&y=Q3sR#|AUjzEG zru+INe(lkh8ODQ}?&%X@JkU)J=J{dT&E*hT?uVmUltvuK(R_M|I_sn5Z&NirgIb$P1D3U# zU#+9Y-}#p7sy%l!rsACX@6a~r IXK)7aKlodoX8-^I diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ArrayValue.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ArrayValue.php deleted file mode 100644 index cb872d55e982..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ArrayValue.php +++ /dev/null @@ -1,67 +0,0 @@ -google.bigtable.v2.ArrayValue - */ -class ArrayValue extends \Google\Protobuf\Internal\Message -{ - /** - * The ordered elements in the array. - * - * Generated from protobuf field repeated .google.bigtable.v2.Value values = 1; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\Value>|\Google\Protobuf\Internal\RepeatedField $values - * The ordered elements in the array. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The ordered elements in the array. - * - * Generated from protobuf field repeated .google.bigtable.v2.Value values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * The ordered elements in the array. - * - * Generated from protobuf field repeated .google.bigtable.v2.Value values = 1; - * @param array<\Google\Cloud\Bigtable\V2\Value>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Value::class); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Cell.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Cell.php deleted file mode 100644 index ae97f1e167af..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Cell.php +++ /dev/null @@ -1,163 +0,0 @@ -google.bigtable.v2.Cell - */ -class Cell extends \Google\Protobuf\Internal\Message -{ - /** - * The cell's stored timestamp, which also uniquely identifies it within - * its column. - * Values are always expressed in microseconds, but individual tables may set - * a coarser granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will only allow - * values of `timestamp_micros` which are multiples of 1000. - * - * Generated from protobuf field int64 timestamp_micros = 1; - */ - protected $timestamp_micros = 0; - /** - * The value stored in the cell. - * May contain any byte string, including the empty string, up to 100MiB in - * length. - * - * Generated from protobuf field bytes value = 2; - */ - protected $value = ''; - /** - * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. - * - * Generated from protobuf field repeated string labels = 3; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $timestamp_micros - * The cell's stored timestamp, which also uniquely identifies it within - * its column. - * Values are always expressed in microseconds, but individual tables may set - * a coarser granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will only allow - * values of `timestamp_micros` which are multiples of 1000. - * @type string $value - * The value stored in the cell. - * May contain any byte string, including the empty string, up to 100MiB in - * length. - * @type array|\Google\Protobuf\Internal\RepeatedField $labels - * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The cell's stored timestamp, which also uniquely identifies it within - * its column. - * Values are always expressed in microseconds, but individual tables may set - * a coarser granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will only allow - * values of `timestamp_micros` which are multiples of 1000. - * - * Generated from protobuf field int64 timestamp_micros = 1; - * @return int|string - */ - public function getTimestampMicros() - { - return $this->timestamp_micros; - } - - /** - * The cell's stored timestamp, which also uniquely identifies it within - * its column. - * Values are always expressed in microseconds, but individual tables may set - * a coarser granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will only allow - * values of `timestamp_micros` which are multiples of 1000. - * - * Generated from protobuf field int64 timestamp_micros = 1; - * @param int|string $var - * @return $this - */ - public function setTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->timestamp_micros = $var; - - return $this; - } - - /** - * The value stored in the cell. - * May contain any byte string, including the empty string, up to 100MiB in - * length. - * - * Generated from protobuf field bytes value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value stored in the cell. - * May contain any byte string, including the empty string, up to 100MiB in - * length. - * - * Generated from protobuf field bytes value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, False); - $this->value = $var; - - return $this; - } - - /** - * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. - * - * Generated from protobuf field repeated string labels = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. - * - * Generated from protobuf field repeated string labels = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php deleted file mode 100644 index 71dc9e6065dd..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php +++ /dev/null @@ -1,436 +0,0 @@ -google.bigtable.v2.CheckAndMutateRowRequest - */ -class CheckAndMutateRowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique name of the table to which the conditional mutation - * should be applied. - * Values are of the form - * `projects//instances//tables/

`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * Optional. The unique name of the AuthorizedView to which the conditional - * mutation should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $authorized_view_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 7; - */ - protected $app_profile_id = ''; - /** - * Required. The key of the row to which the conditional mutation should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $row_key = ''; - /** - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 6; - */ - protected $predicate_filter = null; - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation true_mutations = 4; - */ - private $true_mutations; - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation false_mutations = 5; - */ - private $false_mutations; - - /** - * @param string $tableName Optional. The unique name of the table to which the conditional mutation - * should be applied. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the conditional mutation should be - * applied. - * @param \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $trueMutations Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $falseMutations Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * - * @return \Google\Cloud\Bigtable\V2\CheckAndMutateRowRequest - * - * @experimental - */ - public static function build(string $tableName, string $rowKey, \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter, array $trueMutations, array $falseMutations): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setPredicateFilter($predicateFilter) - ->setTrueMutations($trueMutations) - ->setFalseMutations($falseMutations); - } - - /** - * @param string $tableName Optional. The unique name of the table to which the conditional mutation - * should be applied. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the conditional mutation should be - * applied. - * @param \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $trueMutations Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $falseMutations Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\CheckAndMutateRowRequest - * - * @experimental - */ - public static function buildFromTableNameRowKeyPredicateFilterTrueMutationsFalseMutationsAppProfileId(string $tableName, string $rowKey, \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter, array $trueMutations, array $falseMutations, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setPredicateFilter($predicateFilter) - ->setTrueMutations($trueMutations) - ->setFalseMutations($falseMutations) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Optional. The unique name of the table to which the conditional mutation - * should be applied. - * Values are of the form - * `projects//instances//tables/
`. - * @type string $authorized_view_name - * Optional. The unique name of the AuthorizedView to which the conditional - * mutation should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type string $row_key - * Required. The key of the row to which the conditional mutation should be - * applied. - * @type \Google\Cloud\Bigtable\V2\RowFilter $predicate_filter - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $true_mutations - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $false_mutations - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique name of the table to which the conditional mutation - * should be applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Optional. The unique name of the table to which the conditional mutation - * should be applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * Optional. The unique name of the AuthorizedView to which the conditional - * mutation should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getAuthorizedViewName() - { - return $this->authorized_view_name; - } - - /** - * Optional. The unique name of the AuthorizedView to which the conditional - * mutation should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuthorizedViewName($var) - { - GPBUtil::checkString($var, True); - $this->authorized_view_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 7; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 7; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The key of the row to which the conditional mutation should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * Required. The key of the row to which the conditional mutation should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 6; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getPredicateFilter() - { - return $this->predicate_filter; - } - - public function hasPredicateFilter() - { - return isset($this->predicate_filter); - } - - public function clearPredicateFilter() - { - unset($this->predicate_filter); - } - - /** - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 6; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setPredicateFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->predicate_filter = $var; - - return $this; - } - - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation true_mutations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrueMutations() - { - return $this->true_mutations; - } - - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation true_mutations = 4; - * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrueMutations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->true_mutations = $arr; - - return $this; - } - - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation false_mutations = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFalseMutations() - { - return $this->false_mutations; - } - - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation false_mutations = 5; - * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFalseMutations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->false_mutations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php deleted file mode 100644 index ea562f574e70..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.bigtable.v2.CheckAndMutateRowResponse - */ -class CheckAndMutateRowResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Whether or not the request's `predicate_filter` yielded any results for - * the specified row. - * - * Generated from protobuf field bool predicate_matched = 1; - */ - protected $predicate_matched = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $predicate_matched - * Whether or not the request's `predicate_filter` yielded any results for - * the specified row. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Whether or not the request's `predicate_filter` yielded any results for - * the specified row. - * - * Generated from protobuf field bool predicate_matched = 1; - * @return bool - */ - public function getPredicateMatched() - { - return $this->predicate_matched; - } - - /** - * Whether or not the request's `predicate_filter` yielded any results for - * the specified row. - * - * Generated from protobuf field bool predicate_matched = 1; - * @param bool $var - * @return $this - */ - public function setPredicateMatched($var) - { - GPBUtil::checkBool($var); - $this->predicate_matched = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php deleted file mode 100644 index b2f46bdf290b..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php +++ /dev/null @@ -1,118 +0,0 @@ -google.bigtable.v2.Column - */ -class Column extends \Google\Protobuf\Internal\Message -{ - /** - * The unique key which identifies this column within its family. This is the - * same key that's used to identify the column in, for example, a RowFilter - * which sets its `column_qualifier_regex_filter` field. - * May contain any byte string, including the empty string, up to 16kiB in - * length. - * - * Generated from protobuf field bytes qualifier = 1; - */ - protected $qualifier = ''; - /** - * Must not be empty. Sorted in order of decreasing "timestamp_micros". - * - * Generated from protobuf field repeated .google.bigtable.v2.Cell cells = 2; - */ - private $cells; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $qualifier - * The unique key which identifies this column within its family. This is the - * same key that's used to identify the column in, for example, a RowFilter - * which sets its `column_qualifier_regex_filter` field. - * May contain any byte string, including the empty string, up to 16kiB in - * length. - * @type array<\Google\Cloud\Bigtable\V2\Cell>|\Google\Protobuf\Internal\RepeatedField $cells - * Must not be empty. Sorted in order of decreasing "timestamp_micros". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The unique key which identifies this column within its family. This is the - * same key that's used to identify the column in, for example, a RowFilter - * which sets its `column_qualifier_regex_filter` field. - * May contain any byte string, including the empty string, up to 16kiB in - * length. - * - * Generated from protobuf field bytes qualifier = 1; - * @return string - */ - public function getQualifier() - { - return $this->qualifier; - } - - /** - * The unique key which identifies this column within its family. This is the - * same key that's used to identify the column in, for example, a RowFilter - * which sets its `column_qualifier_regex_filter` field. - * May contain any byte string, including the empty string, up to 16kiB in - * length. - * - * Generated from protobuf field bytes qualifier = 1; - * @param string $var - * @return $this - */ - public function setQualifier($var) - { - GPBUtil::checkString($var, False); - $this->qualifier = $var; - - return $this; - } - - /** - * Must not be empty. Sorted in order of decreasing "timestamp_micros". - * - * Generated from protobuf field repeated .google.bigtable.v2.Cell cells = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCells() - { - return $this->cells; - } - - /** - * Must not be empty. Sorted in order of decreasing "timestamp_micros". - * - * Generated from protobuf field repeated .google.bigtable.v2.Cell cells = 2; - * @param array<\Google\Cloud\Bigtable\V2\Cell>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCells($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Cell::class); - $this->cells = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnMetadata.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnMetadata.php deleted file mode 100644 index 35f3c975b0f7..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnMetadata.php +++ /dev/null @@ -1,111 +0,0 @@ -google.bigtable.v2.ColumnMetadata - */ -class ColumnMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the column. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The type of the column. - * - * Generated from protobuf field .google.bigtable.v2.Type type = 2; - */ - protected $type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the column. - * @type \Google\Cloud\Bigtable\V2\Type $type - * The type of the column. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the column. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the column. - * - * 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 type of the column. - * - * Generated from protobuf field .google.bigtable.v2.Type type = 2; - * @return \Google\Cloud\Bigtable\V2\Type|null - */ - public function getType() - { - return $this->type; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * The type of the column. - * - * Generated from protobuf field .google.bigtable.v2.Type type = 2; - * @param \Google\Cloud\Bigtable\V2\Type $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php deleted file mode 100644 index d5ff522b00d6..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php +++ /dev/null @@ -1,220 +0,0 @@ -google.bigtable.v2.ColumnRange - */ -class ColumnRange extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the column family within which this range falls. - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - protected $start_qualifier; - protected $end_qualifier; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the column family within which this range falls. - * @type string $start_qualifier_closed - * Used when giving an inclusive lower bound for the range. - * @type string $start_qualifier_open - * Used when giving an exclusive lower bound for the range. - * @type string $end_qualifier_closed - * Used when giving an inclusive upper bound for the range. - * @type string $end_qualifier_open - * Used when giving an exclusive upper bound for the range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the column family within which this range falls. - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the column family within which this range falls. - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_qualifier_closed = 2; - * @return string - */ - public function getStartQualifierClosed() - { - return $this->readOneof(2); - } - - public function hasStartQualifierClosed() - { - return $this->hasOneof(2); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_qualifier_closed = 2; - * @param string $var - * @return $this - */ - public function setStartQualifierClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_qualifier_open = 3; - * @return string - */ - public function getStartQualifierOpen() - { - return $this->readOneof(3); - } - - public function hasStartQualifierOpen() - { - return $this->hasOneof(3); - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_qualifier_open = 3; - * @param string $var - * @return $this - */ - public function setStartQualifierOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_qualifier_closed = 4; - * @return string - */ - public function getEndQualifierClosed() - { - return $this->readOneof(4); - } - - public function hasEndQualifierClosed() - { - return $this->hasOneof(4); - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_qualifier_closed = 4; - * @param string $var - * @return $this - */ - public function setEndQualifierClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_qualifier_open = 5; - * @return string - */ - public function getEndQualifierOpen() - { - return $this->readOneof(5); - } - - public function hasEndQualifierOpen() - { - return $this->hasOneof(5); - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_qualifier_open = 5; - * @param string $var - * @return $this - */ - public function setEndQualifierOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getStartQualifier() - { - return $this->whichOneof("start_qualifier"); - } - - /** - * @return string - */ - public function getEndQualifier() - { - return $this->whichOneof("end_qualifier"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryRequest.php deleted file mode 100644 index e51a31680124..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryRequest.php +++ /dev/null @@ -1,383 +0,0 @@ -google.bigtable.v2.ExecuteQueryRequest - */ -class ExecuteQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance against which the query should be - * executed. - * Values are of the form `projects//instances/` - * - * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $instance_name = ''; - /** - * Optional. This value specifies routing for replication. If not specified, - * the `default` application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $app_profile_id = ''; - /** - * Required. The query string. - * - * Generated from protobuf field string query = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Optional. If this request is resuming a previously interrupted query - * execution, `resume_token` should be copied from the last - * PartialResultSet yielded before the interruption. Doing this - * enables the query execution to resume where the last one left - * off. - * The rest of the request parameters must exactly match the - * request that yielded this token. Otherwise the request will fail. - * - * Generated from protobuf field bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resume_token = ''; - /** - * Required. params contains string type keys and Bigtable type values that - * bind to placeholders in the query string. In query string, a parameter - * placeholder consists of the - * `@` character followed by the parameter name (for example, `@firstName`) in - * the query string. - * For example, if - * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. - * - * Generated from protobuf field map params = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - private $params; - protected $data_format; - - /** - * @param string $instanceName Required. The unique name of the instance against which the query should be - * executed. - * Values are of the form `projects//instances/` - * Please see {@see BigtableClient::instanceName()} for help formatting this field. - * @param string $query Required. The query string. - * - * @return \Google\Cloud\Bigtable\V2\ExecuteQueryRequest - * - * @experimental - */ - public static function build(string $instanceName, string $query): self - { - return (new self()) - ->setInstanceName($instanceName) - ->setQuery($query); - } - - /** - * @param string $instanceName Required. The unique name of the instance against which the query should be - * executed. - * Values are of the form `projects//instances/` - * Please see {@see BigtableClient::instanceName()} for help formatting this field. - * @param string $query Required. The query string. - * @param string $appProfileId Optional. This value specifies routing for replication. If not specified, - * the `default` application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\ExecuteQueryRequest - * - * @experimental - */ - public static function buildFromInstanceNameQueryAppProfileId(string $instanceName, string $query, string $appProfileId): self - { - return (new self()) - ->setInstanceName($instanceName) - ->setQuery($query) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_name - * Required. The unique name of the instance against which the query should be - * executed. - * Values are of the form `projects//instances/` - * @type string $app_profile_id - * Optional. This value specifies routing for replication. If not specified, - * the `default` application profile will be used. - * @type string $query - * Required. The query string. - * @type \Google\Cloud\Bigtable\V2\ProtoFormat $proto_format - * Protocol buffer format as described by ProtoSchema and ProtoRows - * messages. - * @type string $resume_token - * Optional. If this request is resuming a previously interrupted query - * execution, `resume_token` should be copied from the last - * PartialResultSet yielded before the interruption. Doing this - * enables the query execution to resume where the last one left - * off. - * The rest of the request parameters must exactly match the - * request that yielded this token. Otherwise the request will fail. - * @type array|\Google\Protobuf\Internal\MapField $params - * Required. params contains string type keys and Bigtable type values that - * bind to placeholders in the query string. In query string, a parameter - * placeholder consists of the - * `@` character followed by the parameter name (for example, `@firstName`) in - * the query string. - * For example, if - * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance against which the query should be - * executed. - * Values are of the form `projects//instances/` - * - * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getInstanceName() - { - return $this->instance_name; - } - - /** - * Required. The unique name of the instance against which the query should be - * executed. - * Values are of the form `projects//instances/` - * - * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInstanceName($var) - { - GPBUtil::checkString($var, True); - $this->instance_name = $var; - - return $this; - } - - /** - * Optional. This value specifies routing for replication. If not specified, - * the `default` application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * Optional. This value specifies routing for replication. If not specified, - * the `default` application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The query string. - * - * Generated from protobuf field string query = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. The query string. - * - * Generated from protobuf field string query = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Protocol buffer format as described by ProtoSchema and ProtoRows - * messages. - * - * Generated from protobuf field .google.bigtable.v2.ProtoFormat proto_format = 4; - * @return \Google\Cloud\Bigtable\V2\ProtoFormat|null - */ - public function getProtoFormat() - { - return $this->readOneof(4); - } - - public function hasProtoFormat() - { - return $this->hasOneof(4); - } - - /** - * Protocol buffer format as described by ProtoSchema and ProtoRows - * messages. - * - * Generated from protobuf field .google.bigtable.v2.ProtoFormat proto_format = 4; - * @param \Google\Cloud\Bigtable\V2\ProtoFormat $var - * @return $this - */ - public function setProtoFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ProtoFormat::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. If this request is resuming a previously interrupted query - * execution, `resume_token` should be copied from the last - * PartialResultSet yielded before the interruption. Doing this - * enables the query execution to resume where the last one left - * off. - * The rest of the request parameters must exactly match the - * request that yielded this token. Otherwise the request will fail. - * - * Generated from protobuf field bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResumeToken() - { - return $this->resume_token; - } - - /** - * Optional. If this request is resuming a previously interrupted query - * execution, `resume_token` should be copied from the last - * PartialResultSet yielded before the interruption. Doing this - * enables the query execution to resume where the last one left - * off. - * The rest of the request parameters must exactly match the - * request that yielded this token. Otherwise the request will fail. - * - * Generated from protobuf field bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->resume_token = $var; - - return $this; - } - - /** - * Required. params contains string type keys and Bigtable type values that - * bind to placeholders in the query string. In query string, a parameter - * placeholder consists of the - * `@` character followed by the parameter name (for example, `@firstName`) in - * the query string. - * For example, if - * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. - * - * Generated from protobuf field map params = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParams() - { - return $this->params; - } - - /** - * Required. params contains string type keys and Bigtable type values that - * bind to placeholders in the query string. In query string, a parameter - * placeholder consists of the - * `@` character followed by the parameter name (for example, `@firstName`) in - * the query string. - * For example, if - * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. - * - * Generated from protobuf field map params = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParams($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Value::class); - $this->params = $arr; - - return $this; - } - - /** - * @return string - */ - public function getDataFormat() - { - return $this->whichOneof("data_format"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryResponse.php deleted file mode 100644 index d007d3387015..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ExecuteQueryResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.bigtable.v2.ExecuteQueryResponse - */ -class ExecuteQueryResponse extends \Google\Protobuf\Internal\Message -{ - protected $response; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\ResultSetMetadata $metadata - * Structure of rows in this response stream. The first (and only the first) - * response streamed from the server will be of this type. - * @type \Google\Cloud\Bigtable\V2\PartialResultSet $results - * A partial result set with row data potentially including additional - * instructions on how recent past and future partial responses should be - * interpreted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Structure of rows in this response stream. The first (and only the first) - * response streamed from the server will be of this type. - * - * Generated from protobuf field .google.bigtable.v2.ResultSetMetadata metadata = 1; - * @return \Google\Cloud\Bigtable\V2\ResultSetMetadata|null - */ - public function getMetadata() - { - return $this->readOneof(1); - } - - public function hasMetadata() - { - return $this->hasOneof(1); - } - - /** - * Structure of rows in this response stream. The first (and only the first) - * response streamed from the server will be of this type. - * - * Generated from protobuf field .google.bigtable.v2.ResultSetMetadata metadata = 1; - * @param \Google\Cloud\Bigtable\V2\ResultSetMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ResultSetMetadata::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A partial result set with row data potentially including additional - * instructions on how recent past and future partial responses should be - * interpreted. - * - * Generated from protobuf field .google.bigtable.v2.PartialResultSet results = 2; - * @return \Google\Cloud\Bigtable\V2\PartialResultSet|null - */ - public function getResults() - { - return $this->readOneof(2); - } - - public function hasResults() - { - return $this->hasOneof(2); - } - - /** - * A partial result set with row data potentially including additional - * instructions on how recent past and future partial responses should be - * interpreted. - * - * Generated from protobuf field .google.bigtable.v2.PartialResultSet results = 2; - * @param \Google\Cloud\Bigtable\V2\PartialResultSet $var - * @return $this - */ - public function setResults($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\PartialResultSet::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getResponse() - { - return $this->whichOneof("response"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php deleted file mode 100644 index 429023c4587d..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php +++ /dev/null @@ -1,122 +0,0 @@ -google.bigtable.v2.Family - */ -class Family extends \Google\Protobuf\Internal\Message -{ - /** - * The unique key which identifies this family within its row. This is the - * same key that's used to identify the family in, for example, a RowFilter - * which sets its "family_name_regex_filter" field. - * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may - * produce cells in a sentinel family with an empty name. - * Must be no greater than 64 characters in length. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Must not be empty. Sorted in order of increasing "qualifier". - * - * Generated from protobuf field repeated .google.bigtable.v2.Column columns = 2; - */ - private $columns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique key which identifies this family within its row. This is the - * same key that's used to identify the family in, for example, a RowFilter - * which sets its "family_name_regex_filter" field. - * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may - * produce cells in a sentinel family with an empty name. - * Must be no greater than 64 characters in length. - * @type array<\Google\Cloud\Bigtable\V2\Column>|\Google\Protobuf\Internal\RepeatedField $columns - * Must not be empty. Sorted in order of increasing "qualifier". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The unique key which identifies this family within its row. This is the - * same key that's used to identify the family in, for example, a RowFilter - * which sets its "family_name_regex_filter" field. - * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may - * produce cells in a sentinel family with an empty name. - * Must be no greater than 64 characters in length. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique key which identifies this family within its row. This is the - * same key that's used to identify the family in, for example, a RowFilter - * which sets its "family_name_regex_filter" field. - * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may - * produce cells in a sentinel family with an empty name. - * Must be no greater than 64 characters in length. - * - * 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; - } - - /** - * Must not be empty. Sorted in order of increasing "qualifier". - * - * Generated from protobuf field repeated .google.bigtable.v2.Column columns = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColumns() - { - return $this->columns; - } - - /** - * Must not be empty. Sorted in order of increasing "qualifier". - * - * Generated from protobuf field repeated .google.bigtable.v2.Column columns = 2; - * @param array<\Google\Cloud\Bigtable\V2\Column>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Column::class); - $this->columns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php deleted file mode 100644 index 51c17b64d53f..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php +++ /dev/null @@ -1,378 +0,0 @@ -google.bigtable.v2.FeatureFlags - */ -class FeatureFlags extends \Google\Protobuf\Internal\Message -{ - /** - * Notify the server that the client supports reverse scans. The server will - * reject ReadRowsRequests with the reverse bit set when this is absent. - * - * Generated from protobuf field bool reverse_scans = 1; - */ - protected $reverse_scans = false; - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, - * this disables partial retries. - * - * Generated from protobuf field bool mutate_rows_rate_limit = 3; - */ - protected $mutate_rows_rate_limit = false; - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. With partial retries - * enabled. - * - * Generated from protobuf field bool mutate_rows_rate_limit2 = 5; - */ - protected $mutate_rows_rate_limit2 = false; - /** - * Notify the server that the client supports the last_scanned_row field - * in ReadRowsResponse for long-running scans. - * - * Generated from protobuf field bool last_scanned_row_responses = 4; - */ - protected $last_scanned_row_responses = false; - /** - * Notify the server that the client supports using encoded routing cookie - * strings to retry requests with. - * - * Generated from protobuf field bool routing_cookie = 6; - */ - protected $routing_cookie = false; - /** - * Notify the server that the client supports using retry info back off - * durations to retry requests with. - * - * Generated from protobuf field bool retry_info = 7; - */ - protected $retry_info = false; - /** - * Notify the server that the client has client side metrics enabled. - * - * Generated from protobuf field bool client_side_metrics_enabled = 8; - */ - protected $client_side_metrics_enabled = false; - /** - * Notify the server that the client using Traffic Director endpoint. - * - * Generated from protobuf field bool traffic_director_enabled = 9; - */ - protected $traffic_director_enabled = false; - /** - * Notify the server that the client explicitly opted in for Direct Access. - * - * Generated from protobuf field bool direct_access_requested = 10; - */ - protected $direct_access_requested = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $reverse_scans - * Notify the server that the client supports reverse scans. The server will - * reject ReadRowsRequests with the reverse bit set when this is absent. - * @type bool $mutate_rows_rate_limit - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, - * this disables partial retries. - * @type bool $mutate_rows_rate_limit2 - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. With partial retries - * enabled. - * @type bool $last_scanned_row_responses - * Notify the server that the client supports the last_scanned_row field - * in ReadRowsResponse for long-running scans. - * @type bool $routing_cookie - * Notify the server that the client supports using encoded routing cookie - * strings to retry requests with. - * @type bool $retry_info - * Notify the server that the client supports using retry info back off - * durations to retry requests with. - * @type bool $client_side_metrics_enabled - * Notify the server that the client has client side metrics enabled. - * @type bool $traffic_director_enabled - * Notify the server that the client using Traffic Director endpoint. - * @type bool $direct_access_requested - * Notify the server that the client explicitly opted in for Direct Access. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\FeatureFlags::initOnce(); - parent::__construct($data); - } - - /** - * Notify the server that the client supports reverse scans. The server will - * reject ReadRowsRequests with the reverse bit set when this is absent. - * - * Generated from protobuf field bool reverse_scans = 1; - * @return bool - */ - public function getReverseScans() - { - return $this->reverse_scans; - } - - /** - * Notify the server that the client supports reverse scans. The server will - * reject ReadRowsRequests with the reverse bit set when this is absent. - * - * Generated from protobuf field bool reverse_scans = 1; - * @param bool $var - * @return $this - */ - public function setReverseScans($var) - { - GPBUtil::checkBool($var); - $this->reverse_scans = $var; - - return $this; - } - - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, - * this disables partial retries. - * - * Generated from protobuf field bool mutate_rows_rate_limit = 3; - * @return bool - */ - public function getMutateRowsRateLimit() - { - return $this->mutate_rows_rate_limit; - } - - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, - * this disables partial retries. - * - * Generated from protobuf field bool mutate_rows_rate_limit = 3; - * @param bool $var - * @return $this - */ - public function setMutateRowsRateLimit($var) - { - GPBUtil::checkBool($var); - $this->mutate_rows_rate_limit = $var; - - return $this; - } - - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. With partial retries - * enabled. - * - * Generated from protobuf field bool mutate_rows_rate_limit2 = 5; - * @return bool - */ - public function getMutateRowsRateLimit2() - { - return $this->mutate_rows_rate_limit2; - } - - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. With partial retries - * enabled. - * - * Generated from protobuf field bool mutate_rows_rate_limit2 = 5; - * @param bool $var - * @return $this - */ - public function setMutateRowsRateLimit2($var) - { - GPBUtil::checkBool($var); - $this->mutate_rows_rate_limit2 = $var; - - return $this; - } - - /** - * Notify the server that the client supports the last_scanned_row field - * in ReadRowsResponse for long-running scans. - * - * Generated from protobuf field bool last_scanned_row_responses = 4; - * @return bool - */ - public function getLastScannedRowResponses() - { - return $this->last_scanned_row_responses; - } - - /** - * Notify the server that the client supports the last_scanned_row field - * in ReadRowsResponse for long-running scans. - * - * Generated from protobuf field bool last_scanned_row_responses = 4; - * @param bool $var - * @return $this - */ - public function setLastScannedRowResponses($var) - { - GPBUtil::checkBool($var); - $this->last_scanned_row_responses = $var; - - return $this; - } - - /** - * Notify the server that the client supports using encoded routing cookie - * strings to retry requests with. - * - * Generated from protobuf field bool routing_cookie = 6; - * @return bool - */ - public function getRoutingCookie() - { - return $this->routing_cookie; - } - - /** - * Notify the server that the client supports using encoded routing cookie - * strings to retry requests with. - * - * Generated from protobuf field bool routing_cookie = 6; - * @param bool $var - * @return $this - */ - public function setRoutingCookie($var) - { - GPBUtil::checkBool($var); - $this->routing_cookie = $var; - - return $this; - } - - /** - * Notify the server that the client supports using retry info back off - * durations to retry requests with. - * - * Generated from protobuf field bool retry_info = 7; - * @return bool - */ - public function getRetryInfo() - { - return $this->retry_info; - } - - /** - * Notify the server that the client supports using retry info back off - * durations to retry requests with. - * - * Generated from protobuf field bool retry_info = 7; - * @param bool $var - * @return $this - */ - public function setRetryInfo($var) - { - GPBUtil::checkBool($var); - $this->retry_info = $var; - - return $this; - } - - /** - * Notify the server that the client has client side metrics enabled. - * - * Generated from protobuf field bool client_side_metrics_enabled = 8; - * @return bool - */ - public function getClientSideMetricsEnabled() - { - return $this->client_side_metrics_enabled; - } - - /** - * Notify the server that the client has client side metrics enabled. - * - * Generated from protobuf field bool client_side_metrics_enabled = 8; - * @param bool $var - * @return $this - */ - public function setClientSideMetricsEnabled($var) - { - GPBUtil::checkBool($var); - $this->client_side_metrics_enabled = $var; - - return $this; - } - - /** - * Notify the server that the client using Traffic Director endpoint. - * - * Generated from protobuf field bool traffic_director_enabled = 9; - * @return bool - */ - public function getTrafficDirectorEnabled() - { - return $this->traffic_director_enabled; - } - - /** - * Notify the server that the client using Traffic Director endpoint. - * - * Generated from protobuf field bool traffic_director_enabled = 9; - * @param bool $var - * @return $this - */ - public function setTrafficDirectorEnabled($var) - { - GPBUtil::checkBool($var); - $this->traffic_director_enabled = $var; - - return $this; - } - - /** - * Notify the server that the client explicitly opted in for Direct Access. - * - * Generated from protobuf field bool direct_access_requested = 10; - * @return bool - */ - public function getDirectAccessRequested() - { - return $this->direct_access_requested; - } - - /** - * Notify the server that the client explicitly opted in for Direct Access. - * - * Generated from protobuf field bool direct_access_requested = 10; - * @param bool $var - * @return $this - */ - public function setDirectAccessRequested($var) - { - GPBUtil::checkBool($var); - $this->direct_access_requested = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php deleted file mode 100644 index 3376ecb5017e..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php +++ /dev/null @@ -1,137 +0,0 @@ -google.bigtable.v2.FullReadStatsView - */ -class FullReadStatsView extends \Google\Protobuf\Internal\Message -{ - /** - * Iteration stats describe how efficient the read is, e.g. comparing - * rows seen vs. rows returned or cells seen vs cells returned can provide an - * indication of read efficiency (the higher the ratio of seen to retuned the - * better). - * - * Generated from protobuf field .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; - */ - protected $read_iteration_stats = null; - /** - * Request latency stats describe the time taken to complete a request, from - * the server side. - * - * Generated from protobuf field .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; - */ - protected $request_latency_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\ReadIterationStats $read_iteration_stats - * Iteration stats describe how efficient the read is, e.g. comparing - * rows seen vs. rows returned or cells seen vs cells returned can provide an - * indication of read efficiency (the higher the ratio of seen to retuned the - * better). - * @type \Google\Cloud\Bigtable\V2\RequestLatencyStats $request_latency_stats - * Request latency stats describe the time taken to complete a request, from - * the server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); - parent::__construct($data); - } - - /** - * Iteration stats describe how efficient the read is, e.g. comparing - * rows seen vs. rows returned or cells seen vs cells returned can provide an - * indication of read efficiency (the higher the ratio of seen to retuned the - * better). - * - * Generated from protobuf field .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; - * @return \Google\Cloud\Bigtable\V2\ReadIterationStats|null - */ - public function getReadIterationStats() - { - return $this->read_iteration_stats; - } - - public function hasReadIterationStats() - { - return isset($this->read_iteration_stats); - } - - public function clearReadIterationStats() - { - unset($this->read_iteration_stats); - } - - /** - * Iteration stats describe how efficient the read is, e.g. comparing - * rows seen vs. rows returned or cells seen vs cells returned can provide an - * indication of read efficiency (the higher the ratio of seen to retuned the - * better). - * - * Generated from protobuf field .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; - * @param \Google\Cloud\Bigtable\V2\ReadIterationStats $var - * @return $this - */ - public function setReadIterationStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadIterationStats::class); - $this->read_iteration_stats = $var; - - return $this; - } - - /** - * Request latency stats describe the time taken to complete a request, from - * the server side. - * - * Generated from protobuf field .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; - * @return \Google\Cloud\Bigtable\V2\RequestLatencyStats|null - */ - public function getRequestLatencyStats() - { - return $this->request_latency_stats; - } - - public function hasRequestLatencyStats() - { - return isset($this->request_latency_stats); - } - - public function clearRequestLatencyStats() - { - unset($this->request_latency_stats); - } - - /** - * Request latency stats describe the time taken to complete a request, from - * the server side. - * - * Generated from protobuf field .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; - * @param \Google\Cloud\Bigtable\V2\RequestLatencyStats $var - * @return $this - */ - public function setRequestLatencyStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RequestLatencyStats::class); - $this->request_latency_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php deleted file mode 100644 index 67233adb93bf..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest - */ -class GenerateInitialChangeStreamPartitionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - */ - protected $app_profile_id = ''; - - /** - * @param string $tableName Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\GenerateInitialChangeStreamPartitionsRequest - * - * @experimental - */ - public static function build(string $tableName): self - { - return (new self()) - ->setTableName($tableName); - } - - /** - * @param string $tableName Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * @return \Google\Cloud\Bigtable\V2\GenerateInitialChangeStreamPartitionsRequest - * - * @experimental - */ - public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php deleted file mode 100644 index 26f241b3bd8c..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse - */ -class GenerateInitialChangeStreamPartitionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A partition of the change stream. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - */ - protected $partition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\StreamPartition $partition - * A partition of the change stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A partition of the change stream. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - * @return \Google\Cloud\Bigtable\V2\StreamPartition|null - */ - public function getPartition() - { - return $this->partition; - } - - public function hasPartition() - { - return isset($this->partition); - } - - public function clearPartition() - { - unset($this->partition); - } - - /** - * A partition of the change stream. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - * @param \Google\Cloud\Bigtable\V2\StreamPartition $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamPartition::class); - $this->partition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php deleted file mode 100644 index 50e64e6e0217..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php +++ /dev/null @@ -1,290 +0,0 @@ -google.bigtable.v2.MutateRowRequest - */ -class MutateRowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique name of the table to which the mutation should be - * applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * Optional. The unique name of the AuthorizedView to which the mutation - * should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $authorized_view_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - */ - protected $app_profile_id = ''; - /** - * Required. The key of the row to which the mutation should be applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $row_key = ''; - /** - * Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $mutations; - - /** - * @param string $tableName Optional. The unique name of the table to which the mutation should be - * applied. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the mutation should be applied. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $mutations Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * - * @return \Google\Cloud\Bigtable\V2\MutateRowRequest - * - * @experimental - */ - public static function build(string $tableName, string $rowKey, array $mutations): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setMutations($mutations); - } - - /** - * @param string $tableName Optional. The unique name of the table to which the mutation should be - * applied. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the mutation should be applied. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $mutations Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\MutateRowRequest - * - * @experimental - */ - public static function buildFromTableNameRowKeyMutationsAppProfileId(string $tableName, string $rowKey, array $mutations, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setMutations($mutations) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Optional. The unique name of the table to which the mutation should be - * applied. - * Values are of the form - * `projects//instances//tables/
`. - * @type string $authorized_view_name - * Optional. The unique name of the AuthorizedView to which the mutation - * should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type string $row_key - * Required. The key of the row to which the mutation should be applied. - * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $mutations - * Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique name of the table to which the mutation should be - * applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Optional. The unique name of the table to which the mutation should be - * applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * Optional. The unique name of the AuthorizedView to which the mutation - * should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getAuthorizedViewName() - { - return $this->authorized_view_name; - } - - /** - * Optional. The unique name of the AuthorizedView to which the mutation - * should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuthorizedViewName($var) - { - GPBUtil::checkString($var, True); - $this->authorized_view_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The key of the row to which the mutation should be applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * Required. The key of the row to which the mutation should be applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMutations() - { - return $this->mutations; - } - - /** - * Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMutations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->mutations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php deleted file mode 100644 index 2a2cc243d6aa..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.bigtable.v2.MutateRowResponse - */ -class MutateRowResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php deleted file mode 100644 index 64ce09021ece..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php +++ /dev/null @@ -1,264 +0,0 @@ -google.bigtable.v2.MutateRowsRequest - */ -class MutateRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique name of the table to which the mutations should be - * applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * Optional. The unique name of the AuthorizedView to which the mutations - * should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $authorized_view_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 3; - */ - protected $app_profile_id = ''; - /** - * Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entries; - - /** - * @param string $tableName Optional. The unique name of the table to which the mutations should be - * applied. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * - * @return \Google\Cloud\Bigtable\V2\MutateRowsRequest - * - * @experimental - */ - public static function build(string $tableName, array $entries): self - { - return (new self()) - ->setTableName($tableName) - ->setEntries($entries); - } - - /** - * @param string $tableName Optional. The unique name of the table to which the mutations should be - * applied. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\MutateRowsRequest - * - * @experimental - */ - public static function buildFromTableNameEntriesAppProfileId(string $tableName, array $entries, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setEntries($entries) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Optional. The unique name of the table to which the mutations should be - * applied. - * Values are of the form - * `projects//instances//tables/
`. - * @type string $authorized_view_name - * Optional. The unique name of the AuthorizedView to which the mutations - * should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type array<\Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry>|\Google\Protobuf\Internal\RepeatedField $entries - * Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique name of the table to which the mutations should be - * applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Optional. The unique name of the table to which the mutations should be - * applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * Optional. The unique name of the AuthorizedView to which the mutations - * should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getAuthorizedViewName() - { - return $this->authorized_view_name; - } - - /** - * Optional. The unique name of the AuthorizedView to which the mutations - * should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuthorizedViewName($var) - { - GPBUtil::checkString($var, True); - $this->authorized_view_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 3; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 3; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php deleted file mode 100644 index 96659f4574ed..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php +++ /dev/null @@ -1,112 +0,0 @@ -google.bigtable.v2.MutateRowsRequest.Entry - */ -class Entry extends \Google\Protobuf\Internal\Message -{ - /** - * The key of the row to which the `mutations` should be applied. - * - * Generated from protobuf field bytes row_key = 1; - */ - protected $row_key = ''; - /** - * Required. Changes to be atomically applied to the specified row. - * Mutations are applied in order, meaning that earlier mutations can be - * masked by later ones. You must specify at least one mutation. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $mutations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $row_key - * The key of the row to which the `mutations` should be applied. - * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $mutations - * Required. Changes to be atomically applied to the specified row. - * Mutations are applied in order, meaning that earlier mutations can be - * masked by later ones. You must specify at least one mutation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The key of the row to which the `mutations` should be applied. - * - * Generated from protobuf field bytes row_key = 1; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * The key of the row to which the `mutations` should be applied. - * - * Generated from protobuf field bytes row_key = 1; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * Required. Changes to be atomically applied to the specified row. - * Mutations are applied in order, meaning that earlier mutations can be - * masked by later ones. You must specify at least one mutation. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMutations() - { - return $this->mutations; - } - - /** - * Required. Changes to be atomically applied to the specified row. - * Mutations are applied in order, meaning that earlier mutations can be - * masked by later ones. You must specify at least one mutation. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMutations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->mutations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Entry::class, \Google\Cloud\Bigtable\V2\MutateRowsRequest_Entry::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php deleted file mode 100644 index 9467b61e1b39..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php +++ /dev/null @@ -1,119 +0,0 @@ -google.bigtable.v2.MutateRowsResponse - */ -class MutateRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * One or more results for Entries from the batch request. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; - */ - private $entries; - /** - * Information about how client should limit the rate (QPS). Primirily used by - * supported official Cloud Bigtable clients. If unset, the rate limit info is - * not provided by the server. - * - * Generated from protobuf field optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; - */ - protected $rate_limit_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\MutateRowsResponse\Entry>|\Google\Protobuf\Internal\RepeatedField $entries - * One or more results for Entries from the batch request. - * @type \Google\Cloud\Bigtable\V2\RateLimitInfo $rate_limit_info - * Information about how client should limit the rate (QPS). Primirily used by - * supported official Cloud Bigtable clients. If unset, the rate limit info is - * not provided by the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * One or more results for Entries from the batch request. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * One or more results for Entries from the batch request. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; - * @param array<\Google\Cloud\Bigtable\V2\MutateRowsResponse\Entry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\MutateRowsResponse\Entry::class); - $this->entries = $arr; - - return $this; - } - - /** - * Information about how client should limit the rate (QPS). Primirily used by - * supported official Cloud Bigtable clients. If unset, the rate limit info is - * not provided by the server. - * - * Generated from protobuf field optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; - * @return \Google\Cloud\Bigtable\V2\RateLimitInfo|null - */ - public function getRateLimitInfo() - { - return $this->rate_limit_info; - } - - public function hasRateLimitInfo() - { - return isset($this->rate_limit_info); - } - - public function clearRateLimitInfo() - { - unset($this->rate_limit_info); - } - - /** - * Information about how client should limit the rate (QPS). Primirily used by - * supported official Cloud Bigtable clients. If unset, the rate limit info is - * not provided by the server. - * - * Generated from protobuf field optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; - * @param \Google\Cloud\Bigtable\V2\RateLimitInfo $var - * @return $this - */ - public function setRateLimitInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RateLimitInfo::class); - $this->rate_limit_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php deleted file mode 100644 index a6049b0d0792..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php +++ /dev/null @@ -1,130 +0,0 @@ -google.bigtable.v2.MutateRowsResponse.Entry - */ -class Entry extends \Google\Protobuf\Internal\Message -{ - /** - * The index into the original request's `entries` list of the Entry - * for which a result is being reported. - * - * Generated from protobuf field int64 index = 1; - */ - protected $index = 0; - /** - * The result of the request Entry identified by `index`. - * Depending on how requests are batched during execution, it is possible - * for one Entry to fail due to an error with another Entry. In the event - * that this occurs, the same error will be reported for both entries. - * - * Generated from protobuf field .google.rpc.Status status = 2; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $index - * The index into the original request's `entries` list of the Entry - * for which a result is being reported. - * @type \Google\Rpc\Status $status - * The result of the request Entry identified by `index`. - * Depending on how requests are batched during execution, it is possible - * for one Entry to fail due to an error with another Entry. In the event - * that this occurs, the same error will be reported for both entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The index into the original request's `entries` list of the Entry - * for which a result is being reported. - * - * Generated from protobuf field int64 index = 1; - * @return int|string - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index into the original request's `entries` list of the Entry - * for which a result is being reported. - * - * Generated from protobuf field int64 index = 1; - * @param int|string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt64($var); - $this->index = $var; - - return $this; - } - - /** - * The result of the request Entry identified by `index`. - * Depending on how requests are batched during execution, it is possible - * for one Entry to fail due to an error with another Entry. In the event - * that this occurs, the same error will be reported for both entries. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The result of the request Entry identified by `index`. - * Depending on how requests are batched during execution, it is possible - * for one Entry to fail due to an error with another Entry. In the event - * that this occurs, the same error will be reported for both entries. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Entry::class, \Google\Cloud\Bigtable\V2\MutateRowsResponse_Entry::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php deleted file mode 100644 index 24f7bf5f7d59..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php +++ /dev/null @@ -1,240 +0,0 @@ -google.bigtable.v2.Mutation - */ -class Mutation extends \Google\Protobuf\Internal\Message -{ - protected $mutation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Mutation\SetCell $set_cell - * Set a cell's value. - * @type \Google\Cloud\Bigtable\V2\Mutation\AddToCell $add_to_cell - * Incrementally updates an `Aggregate` cell. - * @type \Google\Cloud\Bigtable\V2\Mutation\MergeToCell $merge_to_cell - * Merges accumulated state to an `Aggregate` cell. - * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn $delete_from_column - * Deletes cells from a column. - * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily $delete_from_family - * Deletes cells from a column family. - * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow $delete_from_row - * Deletes cells from the entire row. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Set a cell's value. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.SetCell set_cell = 1; - * @return \Google\Cloud\Bigtable\V2\Mutation\SetCell|null - */ - public function getSetCell() - { - return $this->readOneof(1); - } - - public function hasSetCell() - { - return $this->hasOneof(1); - } - - /** - * Set a cell's value. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.SetCell set_cell = 1; - * @param \Google\Cloud\Bigtable\V2\Mutation\SetCell $var - * @return $this - */ - public function setSetCell($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\SetCell::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Incrementally updates an `Aggregate` cell. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.AddToCell add_to_cell = 5; - * @return \Google\Cloud\Bigtable\V2\Mutation\AddToCell|null - */ - public function getAddToCell() - { - return $this->readOneof(5); - } - - public function hasAddToCell() - { - return $this->hasOneof(5); - } - - /** - * Incrementally updates an `Aggregate` cell. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.AddToCell add_to_cell = 5; - * @param \Google\Cloud\Bigtable\V2\Mutation\AddToCell $var - * @return $this - */ - public function setAddToCell($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\AddToCell::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Merges accumulated state to an `Aggregate` cell. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; - * @return \Google\Cloud\Bigtable\V2\Mutation\MergeToCell|null - */ - public function getMergeToCell() - { - return $this->readOneof(6); - } - - public function hasMergeToCell() - { - return $this->hasOneof(6); - } - - /** - * Merges accumulated state to an `Aggregate` cell. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; - * @param \Google\Cloud\Bigtable\V2\Mutation\MergeToCell $var - * @return $this - */ - public function setMergeToCell($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\MergeToCell::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Deletes cells from a column. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromColumn delete_from_column = 2; - * @return \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn|null - */ - public function getDeleteFromColumn() - { - return $this->readOneof(2); - } - - public function hasDeleteFromColumn() - { - return $this->hasOneof(2); - } - - /** - * Deletes cells from a column. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromColumn delete_from_column = 2; - * @param \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn $var - * @return $this - */ - public function setDeleteFromColumn($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Deletes cells from a column family. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromFamily delete_from_family = 3; - * @return \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily|null - */ - public function getDeleteFromFamily() - { - return $this->readOneof(3); - } - - public function hasDeleteFromFamily() - { - return $this->hasOneof(3); - } - - /** - * Deletes cells from a column family. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromFamily delete_from_family = 3; - * @param \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily $var - * @return $this - */ - public function setDeleteFromFamily($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Deletes cells from the entire row. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromRow delete_from_row = 4; - * @return \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow|null - */ - public function getDeleteFromRow() - { - return $this->readOneof(4); - } - - public function hasDeleteFromRow() - { - return $this->hasOneof(4); - } - - /** - * Deletes cells from the entire row. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromRow delete_from_row = 4; - * @param \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow $var - * @return $this - */ - public function setDeleteFromRow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getMutation() - { - return $this->whichOneof("mutation"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/AddToCell.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/AddToCell.php deleted file mode 100644 index 2ef613a1e015..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/AddToCell.php +++ /dev/null @@ -1,222 +0,0 @@ -google.bigtable.v2.Mutation.AddToCell - */ -class AddToCell extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the `Aggregate` family into which new data should be added. - * This must be a family with a `value_type` of `Aggregate`. - * Format: `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - /** - * The qualifier of the column into which new data should be added. This - * must be a `raw_value`. - * - * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; - */ - protected $column_qualifier = null; - /** - * The timestamp of the cell to which new data should be added. This must - * be a `raw_timestamp_micros` that matches the table's `granularity`. - * - * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; - */ - protected $timestamp = null; - /** - * The input value to be accumulated into the specified cell. This must be - * compatible with the family's `value_type.input_type`. - * - * Generated from protobuf field .google.bigtable.v2.Value input = 4; - */ - protected $input = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the `Aggregate` family into which new data should be added. - * This must be a family with a `value_type` of `Aggregate`. - * Format: `[-_.a-zA-Z0-9]+` - * @type \Google\Cloud\Bigtable\V2\Value $column_qualifier - * The qualifier of the column into which new data should be added. This - * must be a `raw_value`. - * @type \Google\Cloud\Bigtable\V2\Value $timestamp - * The timestamp of the cell to which new data should be added. This must - * be a `raw_timestamp_micros` that matches the table's `granularity`. - * @type \Google\Cloud\Bigtable\V2\Value $input - * The input value to be accumulated into the specified cell. This must be - * compatible with the family's `value_type.input_type`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the `Aggregate` family into which new data should be added. - * This must be a family with a `value_type` of `Aggregate`. - * Format: `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the `Aggregate` family into which new data should be added. - * This must be a family with a `value_type` of `Aggregate`. - * Format: `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * The qualifier of the column into which new data should be added. This - * must be a `raw_value`. - * - * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; - * @return \Google\Cloud\Bigtable\V2\Value|null - */ - public function getColumnQualifier() - { - return $this->column_qualifier; - } - - public function hasColumnQualifier() - { - return isset($this->column_qualifier); - } - - public function clearColumnQualifier() - { - unset($this->column_qualifier); - } - - /** - * The qualifier of the column into which new data should be added. This - * must be a `raw_value`. - * - * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; - * @param \Google\Cloud\Bigtable\V2\Value $var - * @return $this - */ - public function setColumnQualifier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); - $this->column_qualifier = $var; - - return $this; - } - - /** - * The timestamp of the cell to which new data should be added. This must - * be a `raw_timestamp_micros` that matches the table's `granularity`. - * - * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; - * @return \Google\Cloud\Bigtable\V2\Value|null - */ - public function getTimestamp() - { - return $this->timestamp; - } - - public function hasTimestamp() - { - return isset($this->timestamp); - } - - public function clearTimestamp() - { - unset($this->timestamp); - } - - /** - * The timestamp of the cell to which new data should be added. This must - * be a `raw_timestamp_micros` that matches the table's `granularity`. - * - * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; - * @param \Google\Cloud\Bigtable\V2\Value $var - * @return $this - */ - public function setTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); - $this->timestamp = $var; - - return $this; - } - - /** - * The input value to be accumulated into the specified cell. This must be - * compatible with the family's `value_type.input_type`. - * - * Generated from protobuf field .google.bigtable.v2.Value input = 4; - * @return \Google\Cloud\Bigtable\V2\Value|null - */ - public function getInput() - { - return $this->input; - } - - public function hasInput() - { - return isset($this->input); - } - - public function clearInput() - { - unset($this->input); - } - - /** - * The input value to be accumulated into the specified cell. This must be - * compatible with the family's `value_type.input_type`. - * - * Generated from protobuf field .google.bigtable.v2.Value input = 4; - * @param \Google\Cloud\Bigtable\V2\Value $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); - $this->input = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AddToCell::class, \Google\Cloud\Bigtable\V2\Mutation_AddToCell::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php deleted file mode 100644 index a91638edfa4a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php +++ /dev/null @@ -1,157 +0,0 @@ -google.bigtable.v2.Mutation.DeleteFromColumn - */ -class DeleteFromColumn extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - /** - * The qualifier of the column from which cells should be deleted. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - */ - protected $column_qualifier = ''; - /** - * The range of timestamps within which cells should be deleted. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange time_range = 3; - */ - protected $time_range = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * @type string $column_qualifier - * The qualifier of the column from which cells should be deleted. - * Can be any byte string, including the empty string. - * @type \Google\Cloud\Bigtable\V2\TimestampRange $time_range - * The range of timestamps within which cells should be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * The qualifier of the column from which cells should be deleted. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @return string - */ - public function getColumnQualifier() - { - return $this->column_qualifier; - } - - /** - * The qualifier of the column from which cells should be deleted. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @param string $var - * @return $this - */ - public function setColumnQualifier($var) - { - GPBUtil::checkString($var, False); - $this->column_qualifier = $var; - - return $this; - } - - /** - * The range of timestamps within which cells should be deleted. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange time_range = 3; - * @return \Google\Cloud\Bigtable\V2\TimestampRange|null - */ - public function getTimeRange() - { - return $this->time_range; - } - - public function hasTimeRange() - { - return isset($this->time_range); - } - - public function clearTimeRange() - { - unset($this->time_range); - } - - /** - * The range of timestamps within which cells should be deleted. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange time_range = 3; - * @param \Google\Cloud\Bigtable\V2\TimestampRange $var - * @return $this - */ - public function setTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\TimestampRange::class); - $this->time_range = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeleteFromColumn::class, \Google\Cloud\Bigtable\V2\Mutation_DeleteFromColumn::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php deleted file mode 100644 index 66cdb291bf3c..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php +++ /dev/null @@ -1,74 +0,0 @@ -google.bigtable.v2.Mutation.DeleteFromFamily - */ -class DeleteFromFamily extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeleteFromFamily::class, \Google\Cloud\Bigtable\V2\Mutation_DeleteFromFamily::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php deleted file mode 100644 index 9200902a1780..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php +++ /dev/null @@ -1,36 +0,0 @@ -google.bigtable.v2.Mutation.DeleteFromRow - */ -class DeleteFromRow extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeleteFromRow::class, \Google\Cloud\Bigtable\V2\Mutation_DeleteFromRow::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/MergeToCell.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/MergeToCell.php deleted file mode 100644 index 391e80f1aeea..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/MergeToCell.php +++ /dev/null @@ -1,227 +0,0 @@ -google.bigtable.v2.Mutation.MergeToCell - */ -class MergeToCell extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the `Aggregate` family into which new data should be added. - * This must be a family with a `value_type` of `Aggregate`. - * Format: `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - /** - * The qualifier of the column into which new data should be added. This - * must be a `raw_value`. - * - * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; - */ - protected $column_qualifier = null; - /** - * The timestamp of the cell to which new data should be added. This must - * be a `raw_timestamp_micros` that matches the table's `granularity`. - * - * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; - */ - protected $timestamp = null; - /** - * The input value to be merged into the specified cell. This must be - * compatible with the family's `value_type.state_type`. Merging `NULL` is - * allowed, but has no effect. - * - * Generated from protobuf field .google.bigtable.v2.Value input = 4; - */ - protected $input = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the `Aggregate` family into which new data should be added. - * This must be a family with a `value_type` of `Aggregate`. - * Format: `[-_.a-zA-Z0-9]+` - * @type \Google\Cloud\Bigtable\V2\Value $column_qualifier - * The qualifier of the column into which new data should be added. This - * must be a `raw_value`. - * @type \Google\Cloud\Bigtable\V2\Value $timestamp - * The timestamp of the cell to which new data should be added. This must - * be a `raw_timestamp_micros` that matches the table's `granularity`. - * @type \Google\Cloud\Bigtable\V2\Value $input - * The input value to be merged into the specified cell. This must be - * compatible with the family's `value_type.state_type`. Merging `NULL` is - * allowed, but has no effect. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the `Aggregate` family into which new data should be added. - * This must be a family with a `value_type` of `Aggregate`. - * Format: `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the `Aggregate` family into which new data should be added. - * This must be a family with a `value_type` of `Aggregate`. - * Format: `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * The qualifier of the column into which new data should be added. This - * must be a `raw_value`. - * - * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; - * @return \Google\Cloud\Bigtable\V2\Value|null - */ - public function getColumnQualifier() - { - return $this->column_qualifier; - } - - public function hasColumnQualifier() - { - return isset($this->column_qualifier); - } - - public function clearColumnQualifier() - { - unset($this->column_qualifier); - } - - /** - * The qualifier of the column into which new data should be added. This - * must be a `raw_value`. - * - * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; - * @param \Google\Cloud\Bigtable\V2\Value $var - * @return $this - */ - public function setColumnQualifier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); - $this->column_qualifier = $var; - - return $this; - } - - /** - * The timestamp of the cell to which new data should be added. This must - * be a `raw_timestamp_micros` that matches the table's `granularity`. - * - * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; - * @return \Google\Cloud\Bigtable\V2\Value|null - */ - public function getTimestamp() - { - return $this->timestamp; - } - - public function hasTimestamp() - { - return isset($this->timestamp); - } - - public function clearTimestamp() - { - unset($this->timestamp); - } - - /** - * The timestamp of the cell to which new data should be added. This must - * be a `raw_timestamp_micros` that matches the table's `granularity`. - * - * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; - * @param \Google\Cloud\Bigtable\V2\Value $var - * @return $this - */ - public function setTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); - $this->timestamp = $var; - - return $this; - } - - /** - * The input value to be merged into the specified cell. This must be - * compatible with the family's `value_type.state_type`. Merging `NULL` is - * allowed, but has no effect. - * - * Generated from protobuf field .google.bigtable.v2.Value input = 4; - * @return \Google\Cloud\Bigtable\V2\Value|null - */ - public function getInput() - { - return $this->input; - } - - public function hasInput() - { - return isset($this->input); - } - - public function clearInput() - { - unset($this->input); - } - - /** - * The input value to be merged into the specified cell. This must be - * compatible with the family's `value_type.state_type`. Merging `NULL` is - * allowed, but has no effect. - * - * Generated from protobuf field .google.bigtable.v2.Value input = 4; - * @param \Google\Cloud\Bigtable\V2\Value $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); - $this->input = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MergeToCell::class, \Google\Cloud\Bigtable\V2\Mutation_MergeToCell::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php deleted file mode 100644 index b156e5d5d564..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php +++ /dev/null @@ -1,196 +0,0 @@ -google.bigtable.v2.Mutation.SetCell - */ -class SetCell extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the family into which new data should be written. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - /** - * The qualifier of the column into which new data should be written. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - */ - protected $column_qualifier = ''; - /** - * The timestamp of the cell into which new data should be written. - * Use -1 for current Bigtable server time. - * Otherwise, the client should set this value itself, noting that the - * default value is a timestamp of zero if the field is left unspecified. - * Values must match the granularity of the table (e.g. micros, millis). - * - * Generated from protobuf field int64 timestamp_micros = 3; - */ - protected $timestamp_micros = 0; - /** - * The value to be written into the specified cell. - * - * Generated from protobuf field bytes value = 4; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the family into which new data should be written. - * Must match `[-_.a-zA-Z0-9]+` - * @type string $column_qualifier - * The qualifier of the column into which new data should be written. - * Can be any byte string, including the empty string. - * @type int|string $timestamp_micros - * The timestamp of the cell into which new data should be written. - * Use -1 for current Bigtable server time. - * Otherwise, the client should set this value itself, noting that the - * default value is a timestamp of zero if the field is left unspecified. - * Values must match the granularity of the table (e.g. micros, millis). - * @type string $value - * The value to be written into the specified cell. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the family into which new data should be written. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the family into which new data should be written. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * The qualifier of the column into which new data should be written. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @return string - */ - public function getColumnQualifier() - { - return $this->column_qualifier; - } - - /** - * The qualifier of the column into which new data should be written. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @param string $var - * @return $this - */ - public function setColumnQualifier($var) - { - GPBUtil::checkString($var, False); - $this->column_qualifier = $var; - - return $this; - } - - /** - * The timestamp of the cell into which new data should be written. - * Use -1 for current Bigtable server time. - * Otherwise, the client should set this value itself, noting that the - * default value is a timestamp of zero if the field is left unspecified. - * Values must match the granularity of the table (e.g. micros, millis). - * - * Generated from protobuf field int64 timestamp_micros = 3; - * @return int|string - */ - public function getTimestampMicros() - { - return $this->timestamp_micros; - } - - /** - * The timestamp of the cell into which new data should be written. - * Use -1 for current Bigtable server time. - * Otherwise, the client should set this value itself, noting that the - * default value is a timestamp of zero if the field is left unspecified. - * Values must match the granularity of the table (e.g. micros, millis). - * - * Generated from protobuf field int64 timestamp_micros = 3; - * @param int|string $var - * @return $this - */ - public function setTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->timestamp_micros = $var; - - return $this; - } - - /** - * The value to be written into the specified cell. - * - * Generated from protobuf field bytes value = 4; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value to be written into the specified cell. - * - * Generated from protobuf field bytes value = 4; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, False); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SetCell::class, \Google\Cloud\Bigtable\V2\Mutation_SetCell::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PartialResultSet.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PartialResultSet.php deleted file mode 100644 index 321757c77992..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PartialResultSet.php +++ /dev/null @@ -1,225 +0,0 @@ -google.bigtable.v2.PartialResultSet - */ -class PartialResultSet extends \Google\Protobuf\Internal\Message -{ - /** - * An opaque token sent by the server to allow query resumption and signal - * the client to accumulate `partial_rows` since the last non-empty - * `resume_token`. On resumption, the resumed query will return the remaining - * rows for this query. - * If there is a batch in progress, a non-empty `resume_token` - * means that that the batch of `partial_rows` will be complete after merging - * the `partial_rows` from this response. The client must only yield - * completed batches to the application, and must ensure that any future - * retries send the latest token to avoid returning duplicate data. - * The server may set 'resume_token' without a 'partial_rows'. If there is a - * batch in progress the client should yield it. - * The server will also send a sentinel `resume_token` when last batch of - * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with - * the sentinel `resume_token`, the server will emit it again without any - * `partial_rows`, then return OK. - * - * Generated from protobuf field bytes resume_token = 5; - */ - protected $resume_token = ''; - /** - * Estimated size of a new batch. The server will always set this when - * returning the first `partial_rows` of a batch, and will not set it at any - * other time. - * The client can use this estimate to allocate an initial buffer for the - * batched results. This helps minimize the number of allocations required, - * though the buffer size may still need to be increased if the estimate is - * too low. - * - * Generated from protobuf field int32 estimated_batch_size = 4; - */ - protected $estimated_batch_size = 0; - protected $partial_rows; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\ProtoRowsBatch $proto_rows_batch - * Partial rows in serialized ProtoRows format. - * @type string $resume_token - * An opaque token sent by the server to allow query resumption and signal - * the client to accumulate `partial_rows` since the last non-empty - * `resume_token`. On resumption, the resumed query will return the remaining - * rows for this query. - * If there is a batch in progress, a non-empty `resume_token` - * means that that the batch of `partial_rows` will be complete after merging - * the `partial_rows` from this response. The client must only yield - * completed batches to the application, and must ensure that any future - * retries send the latest token to avoid returning duplicate data. - * The server may set 'resume_token' without a 'partial_rows'. If there is a - * batch in progress the client should yield it. - * The server will also send a sentinel `resume_token` when last batch of - * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with - * the sentinel `resume_token`, the server will emit it again without any - * `partial_rows`, then return OK. - * @type int $estimated_batch_size - * Estimated size of a new batch. The server will always set this when - * returning the first `partial_rows` of a batch, and will not set it at any - * other time. - * The client can use this estimate to allocate an initial buffer for the - * batched results. This helps minimize the number of allocations required, - * though the buffer size may still need to be increased if the estimate is - * too low. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Partial rows in serialized ProtoRows format. - * - * Generated from protobuf field .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; - * @return \Google\Cloud\Bigtable\V2\ProtoRowsBatch|null - */ - public function getProtoRowsBatch() - { - return $this->readOneof(3); - } - - public function hasProtoRowsBatch() - { - return $this->hasOneof(3); - } - - /** - * Partial rows in serialized ProtoRows format. - * - * Generated from protobuf field .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; - * @param \Google\Cloud\Bigtable\V2\ProtoRowsBatch $var - * @return $this - */ - public function setProtoRowsBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ProtoRowsBatch::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * An opaque token sent by the server to allow query resumption and signal - * the client to accumulate `partial_rows` since the last non-empty - * `resume_token`. On resumption, the resumed query will return the remaining - * rows for this query. - * If there is a batch in progress, a non-empty `resume_token` - * means that that the batch of `partial_rows` will be complete after merging - * the `partial_rows` from this response. The client must only yield - * completed batches to the application, and must ensure that any future - * retries send the latest token to avoid returning duplicate data. - * The server may set 'resume_token' without a 'partial_rows'. If there is a - * batch in progress the client should yield it. - * The server will also send a sentinel `resume_token` when last batch of - * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with - * the sentinel `resume_token`, the server will emit it again without any - * `partial_rows`, then return OK. - * - * Generated from protobuf field bytes resume_token = 5; - * @return string - */ - public function getResumeToken() - { - return $this->resume_token; - } - - /** - * An opaque token sent by the server to allow query resumption and signal - * the client to accumulate `partial_rows` since the last non-empty - * `resume_token`. On resumption, the resumed query will return the remaining - * rows for this query. - * If there is a batch in progress, a non-empty `resume_token` - * means that that the batch of `partial_rows` will be complete after merging - * the `partial_rows` from this response. The client must only yield - * completed batches to the application, and must ensure that any future - * retries send the latest token to avoid returning duplicate data. - * The server may set 'resume_token' without a 'partial_rows'. If there is a - * batch in progress the client should yield it. - * The server will also send a sentinel `resume_token` when last batch of - * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with - * the sentinel `resume_token`, the server will emit it again without any - * `partial_rows`, then return OK. - * - * Generated from protobuf field bytes resume_token = 5; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->resume_token = $var; - - return $this; - } - - /** - * Estimated size of a new batch. The server will always set this when - * returning the first `partial_rows` of a batch, and will not set it at any - * other time. - * The client can use this estimate to allocate an initial buffer for the - * batched results. This helps minimize the number of allocations required, - * though the buffer size may still need to be increased if the estimate is - * too low. - * - * Generated from protobuf field int32 estimated_batch_size = 4; - * @return int - */ - public function getEstimatedBatchSize() - { - return $this->estimated_batch_size; - } - - /** - * Estimated size of a new batch. The server will always set this when - * returning the first `partial_rows` of a batch, and will not set it at any - * other time. - * The client can use this estimate to allocate an initial buffer for the - * batched results. This helps minimize the number of allocations required, - * though the buffer size may still need to be increased if the estimate is - * too low. - * - * Generated from protobuf field int32 estimated_batch_size = 4; - * @param int $var - * @return $this - */ - public function setEstimatedBatchSize($var) - { - GPBUtil::checkInt32($var); - $this->estimated_batch_size = $var; - - return $this; - } - - /** - * @return string - */ - public function getPartialRows() - { - return $this->whichOneof("partial_rows"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php deleted file mode 100644 index 4daf892b444f..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php +++ /dev/null @@ -1,148 +0,0 @@ -google.bigtable.v2.PingAndWarmRequest - */ -class PingAndWarmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - */ - protected $app_profile_id = ''; - - /** - * @param string $name Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. Please see - * {@see BigtableClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\PingAndWarmRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * @param string $name Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. Please see - * {@see BigtableClient::instanceName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\PingAndWarmRequest - * - * @experimental - */ - public static function buildFromNameAppProfileId(string $name, string $appProfileId): self - { - return (new self()) - ->setName($name) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - * - * 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; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php deleted file mode 100644 index a14857274660..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.bigtable.v2.PingAndWarmResponse - */ -class PingAndWarmResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoFormat.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoFormat.php deleted file mode 100644 index 3317d0383327..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoFormat.php +++ /dev/null @@ -1,34 +0,0 @@ -google.bigtable.v2.ProtoFormat - */ -class ProtoFormat extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRows.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRows.php deleted file mode 100644 index 42447f5b08bf..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRows.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.v2.ProtoRows - */ -class ProtoRows extends \Google\Protobuf\Internal\Message -{ - /** - * A proto rows message consists of a list of values. Every N complete values - * defines a row, where N is equal to the number of entries in the - * `metadata.proto_schema.columns` value received in the first response. - * - * Generated from protobuf field repeated .google.bigtable.v2.Value values = 2; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\Value>|\Google\Protobuf\Internal\RepeatedField $values - * A proto rows message consists of a list of values. Every N complete values - * defines a row, where N is equal to the number of entries in the - * `metadata.proto_schema.columns` value received in the first response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * A proto rows message consists of a list of values. Every N complete values - * defines a row, where N is equal to the number of entries in the - * `metadata.proto_schema.columns` value received in the first response. - * - * Generated from protobuf field repeated .google.bigtable.v2.Value values = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * A proto rows message consists of a list of values. Every N complete values - * defines a row, where N is equal to the number of entries in the - * `metadata.proto_schema.columns` value received in the first response. - * - * Generated from protobuf field repeated .google.bigtable.v2.Value values = 2; - * @param array<\Google\Cloud\Bigtable\V2\Value>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Value::class); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRowsBatch.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRowsBatch.php deleted file mode 100644 index 3c7ea10177e7..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoRowsBatch.php +++ /dev/null @@ -1,71 +0,0 @@ -google.bigtable.v2.ProtoRowsBatch - */ -class ProtoRowsBatch extends \Google\Protobuf\Internal\Message -{ - /** - * Merge partial results by concatenating these bytes, then parsing the - * overall value as a `ProtoRows` message. - * - * Generated from protobuf field bytes batch_data = 1; - */ - protected $batch_data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $batch_data - * Merge partial results by concatenating these bytes, then parsing the - * overall value as a `ProtoRows` message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Merge partial results by concatenating these bytes, then parsing the - * overall value as a `ProtoRows` message. - * - * Generated from protobuf field bytes batch_data = 1; - * @return string - */ - public function getBatchData() - { - return $this->batch_data; - } - - /** - * Merge partial results by concatenating these bytes, then parsing the - * overall value as a `ProtoRows` message. - * - * Generated from protobuf field bytes batch_data = 1; - * @param string $var - * @return $this - */ - public function setBatchData($var) - { - GPBUtil::checkString($var, False); - $this->batch_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoSchema.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoSchema.php deleted file mode 100644 index efd883b7c5e2..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ProtoSchema.php +++ /dev/null @@ -1,67 +0,0 @@ -google.bigtable.v2.ProtoSchema - */ -class ProtoSchema extends \Google\Protobuf\Internal\Message -{ - /** - * The columns in the result set. - * - * Generated from protobuf field repeated .google.bigtable.v2.ColumnMetadata columns = 1; - */ - private $columns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\ColumnMetadata>|\Google\Protobuf\Internal\RepeatedField $columns - * The columns in the result set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The columns in the result set. - * - * Generated from protobuf field repeated .google.bigtable.v2.ColumnMetadata columns = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColumns() - { - return $this->columns; - } - - /** - * The columns in the result set. - * - * Generated from protobuf field repeated .google.bigtable.v2.ColumnMetadata columns = 1; - * @param array<\Google\Cloud\Bigtable\V2\ColumnMetadata>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ColumnMetadata::class); - $this->columns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php deleted file mode 100644 index db1f756b6be9..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php +++ /dev/null @@ -1,159 +0,0 @@ -google.bigtable.v2.RateLimitInfo - */ -class RateLimitInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Time that clients should wait before adjusting the target rate again. - * If clients adjust rate too frequently, the impact of the previous - * adjustment may not have been taken into account and may - * over-throttle or under-throttle. If clients adjust rate too slowly, they - * will not be responsive to load changes on server side, and may - * over-throttle or under-throttle. - * - * Generated from protobuf field .google.protobuf.Duration period = 1; - */ - protected $period = null; - /** - * If it has been at least one `period` since the last load adjustment, the - * client should multiply the current load by this value to get the new target - * load. For example, if the current load is 100 and `factor` is 0.8, the new - * target load should be 80. After adjusting, the client should ignore - * `factor` until another `period` has passed. - * The client can measure its load using any unit that's comparable over time - * For example, QPS can be used as long as each request involves a similar - * amount of work. - * - * Generated from protobuf field double factor = 2; - */ - protected $factor = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $period - * Time that clients should wait before adjusting the target rate again. - * If clients adjust rate too frequently, the impact of the previous - * adjustment may not have been taken into account and may - * over-throttle or under-throttle. If clients adjust rate too slowly, they - * will not be responsive to load changes on server side, and may - * over-throttle or under-throttle. - * @type float $factor - * If it has been at least one `period` since the last load adjustment, the - * client should multiply the current load by this value to get the new target - * load. For example, if the current load is 100 and `factor` is 0.8, the new - * target load should be 80. After adjusting, the client should ignore - * `factor` until another `period` has passed. - * The client can measure its load using any unit that's comparable over time - * For example, QPS can be used as long as each request involves a similar - * amount of work. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Time that clients should wait before adjusting the target rate again. - * If clients adjust rate too frequently, the impact of the previous - * adjustment may not have been taken into account and may - * over-throttle or under-throttle. If clients adjust rate too slowly, they - * will not be responsive to load changes on server side, and may - * over-throttle or under-throttle. - * - * Generated from protobuf field .google.protobuf.Duration period = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getPeriod() - { - return $this->period; - } - - public function hasPeriod() - { - return isset($this->period); - } - - public function clearPeriod() - { - unset($this->period); - } - - /** - * Time that clients should wait before adjusting the target rate again. - * If clients adjust rate too frequently, the impact of the previous - * adjustment may not have been taken into account and may - * over-throttle or under-throttle. If clients adjust rate too slowly, they - * will not be responsive to load changes on server side, and may - * over-throttle or under-throttle. - * - * Generated from protobuf field .google.protobuf.Duration period = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->period = $var; - - return $this; - } - - /** - * If it has been at least one `period` since the last load adjustment, the - * client should multiply the current load by this value to get the new target - * load. For example, if the current load is 100 and `factor` is 0.8, the new - * target load should be 80. After adjusting, the client should ignore - * `factor` until another `period` has passed. - * The client can measure its load using any unit that's comparable over time - * For example, QPS can be used as long as each request involves a similar - * amount of work. - * - * Generated from protobuf field double factor = 2; - * @return float - */ - public function getFactor() - { - return $this->factor; - } - - /** - * If it has been at least one `period` since the last load adjustment, the - * client should multiply the current load by this value to get the new target - * load. For example, if the current load is 100 and `factor` is 0.8, the new - * target load should be 80. After adjusting, the client should ignore - * `factor` until another `period` has passed. - * The client can measure its load using any unit that's comparable over time - * For example, QPS can be used as long as each request involves a similar - * amount of work. - * - * Generated from protobuf field double factor = 2; - * @param float $var - * @return $this - */ - public function setFactor($var) - { - GPBUtil::checkDouble($var); - $this->factor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php deleted file mode 100644 index cac57eea1345..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php +++ /dev/null @@ -1,412 +0,0 @@ -google.bigtable.v2.ReadChangeStreamRequest - */ -class ReadChangeStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - */ - protected $app_profile_id = ''; - /** - * The partition to read changes from. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 3; - */ - protected $partition = null; - /** - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - */ - protected $end_time = null; - /** - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_duration = 7; - */ - protected $heartbeat_duration = null; - protected $start_from; - - /** - * @param string $tableName Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamRequest - * - * @experimental - */ - public static function build(string $tableName): self - { - return (new self()) - ->setTableName($tableName); - } - - /** - * @param string $tableName Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamRequest - * - * @experimental - */ - public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * @type \Google\Cloud\Bigtable\V2\StreamPartition $partition - * The partition to read changes from. - * @type \Google\Protobuf\Timestamp $start_time - * Start reading the stream at the specified timestamp. This timestamp must - * be within the change stream retention period, less than or equal to the - * current time, and after change stream creation, whichever is greater. - * This value is inclusive and will be truncated to microsecond granularity. - * @type \Google\Cloud\Bigtable\V2\StreamContinuationTokens $continuation_tokens - * Tokens that describe how to resume reading a stream where reading - * previously left off. If specified, changes will be read starting at the - * the position. Tokens are delivered on the stream as part of `Heartbeat` - * and `CloseStream` messages. - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case - * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be - * returned. - * @type \Google\Protobuf\Timestamp $end_time - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - * @type \Google\Protobuf\Duration $heartbeat_duration - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * The partition to read changes from. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 3; - * @return \Google\Cloud\Bigtable\V2\StreamPartition|null - */ - public function getPartition() - { - return $this->partition; - } - - public function hasPartition() - { - return isset($this->partition); - } - - public function clearPartition() - { - unset($this->partition); - } - - /** - * The partition to read changes from. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 3; - * @param \Google\Cloud\Bigtable\V2\StreamPartition $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamPartition::class); - $this->partition = $var; - - return $this; - } - - /** - * Start reading the stream at the specified timestamp. This timestamp must - * be within the change stream retention period, less than or equal to the - * current time, and after change stream creation, whichever is greater. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->readOneof(4); - } - - public function hasStartTime() - { - return $this->hasOneof(4); - } - - /** - * Start reading the stream at the specified timestamp. This timestamp must - * be within the change stream retention period, less than or equal to the - * current time, and after change stream creation, whichever is greater. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Tokens that describe how to resume reading a stream where reading - * previously left off. If specified, changes will be read starting at the - * the position. Tokens are delivered on the stream as part of `Heartbeat` - * and `CloseStream` messages. - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case - * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be - * returned. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; - * @return \Google\Cloud\Bigtable\V2\StreamContinuationTokens|null - */ - public function getContinuationTokens() - { - return $this->readOneof(6); - } - - public function hasContinuationTokens() - { - return $this->hasOneof(6); - } - - /** - * Tokens that describe how to resume reading a stream where reading - * previously left off. If specified, changes will be read starting at the - * the position. Tokens are delivered on the stream as part of `Heartbeat` - * and `CloseStream` messages. - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case - * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be - * returned. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; - * @param \Google\Cloud\Bigtable\V2\StreamContinuationTokens $var - * @return $this - */ - public function setContinuationTokens($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamContinuationTokens::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - * @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); - } - - /** - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getHeartbeatDuration() - { - return $this->heartbeat_duration; - } - - public function hasHeartbeatDuration() - { - return isset($this->heartbeat_duration); - } - - public function clearHeartbeatDuration() - { - unset($this->heartbeat_duration); - } - - /** - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setHeartbeatDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->heartbeat_duration = $var; - - return $this; - } - - /** - * @return string - */ - public function getStartFrom() - { - return $this->whichOneof("start_from"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php deleted file mode 100644 index bdacae25dce3..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php +++ /dev/null @@ -1,142 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse - */ -class ReadChangeStreamResponse extends \Google\Protobuf\Internal\Message -{ - protected $stream_record; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange $data_change - * A mutation to the partition. - * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat $heartbeat - * A periodic heartbeat message. - * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream $close_stream - * An indication that the stream should be closed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A mutation to the partition. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange|null - */ - public function getDataChange() - { - return $this->readOneof(1); - } - - public function hasDataChange() - { - return $this->hasOneof(1); - } - - /** - * A mutation to the partition. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; - * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange $var - * @return $this - */ - public function setDataChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A periodic heartbeat message. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat|null - */ - public function getHeartbeat() - { - return $this->readOneof(2); - } - - public function hasHeartbeat() - { - return $this->hasOneof(2); - } - - /** - * A periodic heartbeat message. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; - * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat $var - * @return $this - */ - public function setHeartbeat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * An indication that the stream should be closed. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream|null - */ - public function getCloseStream() - { - return $this->readOneof(3); - } - - public function hasCloseStream() - { - return $this->hasOneof(3); - } - - /** - * An indication that the stream should be closed. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; - * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream $var - * @return $this - */ - public function setCloseStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getStreamRecord() - { - return $this->whichOneof("stream_record"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php deleted file mode 100644 index 4551bb34ed65..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php +++ /dev/null @@ -1,179 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.CloseStream - */ -class CloseStream extends \Google\Protobuf\Internal\Message -{ - /** - * The status of the stream. - * - * Generated from protobuf field .google.rpc.Status status = 1; - */ - protected $status = null; - /** - * If non-empty, contains the information needed to resume reading their - * associated partitions. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; - */ - private $continuation_tokens; - /** - * If non-empty, contains the new partitions to start reading from, which - * are related to but not necessarily identical to the partitions for the - * above `continuation_tokens`. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamPartition new_partitions = 3; - */ - private $new_partitions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $status - * The status of the stream. - * @type array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $continuation_tokens - * If non-empty, contains the information needed to resume reading their - * associated partitions. - * @type array<\Google\Cloud\Bigtable\V2\StreamPartition>|\Google\Protobuf\Internal\RepeatedField $new_partitions - * If non-empty, contains the new partitions to start reading from, which - * are related to but not necessarily identical to the partitions for the - * above `continuation_tokens`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The status of the stream. - * - * Generated from protobuf field .google.rpc.Status status = 1; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The status of the stream. - * - * Generated from protobuf field .google.rpc.Status status = 1; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - - /** - * If non-empty, contains the information needed to resume reading their - * associated partitions. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContinuationTokens() - { - return $this->continuation_tokens; - } - - /** - * If non-empty, contains the information needed to resume reading their - * associated partitions. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; - * @param array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContinuationTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\StreamContinuationToken::class); - $this->continuation_tokens = $arr; - - return $this; - } - - /** - * If non-empty, contains the new partitions to start reading from, which - * are related to but not necessarily identical to the partitions for the - * above `continuation_tokens`. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamPartition new_partitions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNewPartitions() - { - return $this->new_partitions; - } - - /** - * If non-empty, contains the new partitions to start reading from, which - * are related to but not necessarily identical to the partitions for the - * above `continuation_tokens`. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamPartition new_partitions = 3; - * @param array<\Google\Cloud\Bigtable\V2\StreamPartition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNewPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\StreamPartition::class); - $this->new_partitions = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloseStream::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_CloseStream::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php deleted file mode 100644 index 9bb24720fb1a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php +++ /dev/null @@ -1,439 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.DataChange - */ -class DataChange extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the mutation. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; - */ - protected $type = 0; - /** - * The cluster where the mutation was applied. - * Not set when `type` is `GARBAGE_COLLECTION`. - * - * Generated from protobuf field string source_cluster_id = 2; - */ - protected $source_cluster_id = ''; - /** - * The row key for all mutations that are part of this `DataChange`. - * If the `DataChange` is chunked across multiple messages, then this field - * will only be set for the first message. - * - * Generated from protobuf field bytes row_key = 3; - */ - protected $row_key = ''; - /** - * The timestamp at which the mutation was applied on the Bigtable server. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_timestamp = 4; - */ - protected $commit_timestamp = null; - /** - * A value that lets stream consumers reconstruct Bigtable's - * conflict resolution semantics. - * https://cloud.google.com/bigtable/docs/writes#conflict-resolution - * In the event that the same row key, column family, column qualifier, - * timestamp are modified on different clusters at the same - * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the - * one chosen for the eventually consistent state of the system. - * - * Generated from protobuf field int32 tiebreaker = 5; - */ - protected $tiebreaker = 0; - /** - * The mutations associated with this change to the partition. - * May contain complete mutations or chunks of a multi-message chunked - * `DataChange` record. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; - */ - private $chunks; - /** - * When true, indicates that the entire `DataChange` has been read - * and the client can safely process the message. - * - * Generated from protobuf field bool done = 8; - */ - protected $done = false; - /** - * An encoded position for this stream's partition to restart reading from. - * This token is for the StreamPartition from the request. - * - * Generated from protobuf field string token = 9; - */ - protected $token = ''; - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 10; - */ - protected $estimated_low_watermark = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The type of the mutation. - * @type string $source_cluster_id - * The cluster where the mutation was applied. - * Not set when `type` is `GARBAGE_COLLECTION`. - * @type string $row_key - * The row key for all mutations that are part of this `DataChange`. - * If the `DataChange` is chunked across multiple messages, then this field - * will only be set for the first message. - * @type \Google\Protobuf\Timestamp $commit_timestamp - * The timestamp at which the mutation was applied on the Bigtable server. - * @type int $tiebreaker - * A value that lets stream consumers reconstruct Bigtable's - * conflict resolution semantics. - * https://cloud.google.com/bigtable/docs/writes#conflict-resolution - * In the event that the same row key, column family, column qualifier, - * timestamp are modified on different clusters at the same - * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the - * one chosen for the eventually consistent state of the system. - * @type array<\Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk>|\Google\Protobuf\Internal\RepeatedField $chunks - * The mutations associated with this change to the partition. - * May contain complete mutations or chunks of a multi-message chunked - * `DataChange` record. - * @type bool $done - * When true, indicates that the entire `DataChange` has been read - * and the client can safely process the message. - * @type string $token - * An encoded position for this stream's partition to restart reading from. - * This token is for the StreamPartition from the request. - * @type \Google\Protobuf\Timestamp $estimated_low_watermark - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The type of the mutation. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the mutation. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The cluster where the mutation was applied. - * Not set when `type` is `GARBAGE_COLLECTION`. - * - * Generated from protobuf field string source_cluster_id = 2; - * @return string - */ - public function getSourceClusterId() - { - return $this->source_cluster_id; - } - - /** - * The cluster where the mutation was applied. - * Not set when `type` is `GARBAGE_COLLECTION`. - * - * Generated from protobuf field string source_cluster_id = 2; - * @param string $var - * @return $this - */ - public function setSourceClusterId($var) - { - GPBUtil::checkString($var, True); - $this->source_cluster_id = $var; - - return $this; - } - - /** - * The row key for all mutations that are part of this `DataChange`. - * If the `DataChange` is chunked across multiple messages, then this field - * will only be set for the first message. - * - * Generated from protobuf field bytes row_key = 3; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * The row key for all mutations that are part of this `DataChange`. - * If the `DataChange` is chunked across multiple messages, then this field - * will only be set for the first message. - * - * Generated from protobuf field bytes row_key = 3; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * The timestamp at which the mutation was applied on the Bigtable server. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_timestamp = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTimestamp() - { - return $this->commit_timestamp; - } - - public function hasCommitTimestamp() - { - return isset($this->commit_timestamp); - } - - public function clearCommitTimestamp() - { - unset($this->commit_timestamp); - } - - /** - * The timestamp at which the mutation was applied on the Bigtable server. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_timestamp = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_timestamp = $var; - - return $this; - } - - /** - * A value that lets stream consumers reconstruct Bigtable's - * conflict resolution semantics. - * https://cloud.google.com/bigtable/docs/writes#conflict-resolution - * In the event that the same row key, column family, column qualifier, - * timestamp are modified on different clusters at the same - * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the - * one chosen for the eventually consistent state of the system. - * - * Generated from protobuf field int32 tiebreaker = 5; - * @return int - */ - public function getTiebreaker() - { - return $this->tiebreaker; - } - - /** - * A value that lets stream consumers reconstruct Bigtable's - * conflict resolution semantics. - * https://cloud.google.com/bigtable/docs/writes#conflict-resolution - * In the event that the same row key, column family, column qualifier, - * timestamp are modified on different clusters at the same - * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the - * one chosen for the eventually consistent state of the system. - * - * Generated from protobuf field int32 tiebreaker = 5; - * @param int $var - * @return $this - */ - public function setTiebreaker($var) - { - GPBUtil::checkInt32($var); - $this->tiebreaker = $var; - - return $this; - } - - /** - * The mutations associated with this change to the partition. - * May contain complete mutations or chunks of a multi-message chunked - * `DataChange` record. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChunks() - { - return $this->chunks; - } - - /** - * The mutations associated with this change to the partition. - * May contain complete mutations or chunks of a multi-message chunked - * `DataChange` record. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; - * @param array<\Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChunks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk::class); - $this->chunks = $arr; - - return $this; - } - - /** - * When true, indicates that the entire `DataChange` has been read - * and the client can safely process the message. - * - * Generated from protobuf field bool done = 8; - * @return bool - */ - public function getDone() - { - return $this->done; - } - - /** - * When true, indicates that the entire `DataChange` has been read - * and the client can safely process the message. - * - * Generated from protobuf field bool done = 8; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->done = $var; - - return $this; - } - - /** - * An encoded position for this stream's partition to restart reading from. - * This token is for the StreamPartition from the request. - * - * Generated from protobuf field string token = 9; - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * An encoded position for this stream's partition to restart reading from. - * This token is for the StreamPartition from the request. - * - * Generated from protobuf field string token = 9; - * @param string $var - * @return $this - */ - public function setToken($var) - { - GPBUtil::checkString($var, True); - $this->token = $var; - - return $this; - } - - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEstimatedLowWatermark() - { - return $this->estimated_low_watermark; - } - - public function hasEstimatedLowWatermark() - { - return isset($this->estimated_low_watermark); - } - - public function clearEstimatedLowWatermark() - { - unset($this->estimated_low_watermark); - } - - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEstimatedLowWatermark($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->estimated_low_watermark = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataChange::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_DataChange::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php deleted file mode 100644 index 0eb4b8204f45..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php +++ /dev/null @@ -1,72 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type - */ -class Type -{ - /** - * The type is unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * A user-initiated mutation. - * - * Generated from protobuf enum USER = 1; - */ - const USER = 1; - /** - * A system-initiated mutation as part of garbage collection. - * https://cloud.google.com/bigtable/docs/garbage-collection - * - * Generated from protobuf enum GARBAGE_COLLECTION = 2; - */ - const GARBAGE_COLLECTION = 2; - /** - * This is a continuation of a multi-message change. - * - * Generated from protobuf enum CONTINUATION = 3; - */ - const CONTINUATION = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::USER => 'USER', - self::GARBAGE_COLLECTION => 'GARBAGE_COLLECTION', - self::CONTINUATION => 'CONTINUATION', - ]; - - 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\Bigtable\V2\ReadChangeStreamResponse_DataChange_Type::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php deleted file mode 100644 index e20a2f711230..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php +++ /dev/null @@ -1,149 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.Heartbeat - */ -class Heartbeat extends \Google\Protobuf\Internal\Message -{ - /** - * A token that can be provided to a subsequent `ReadChangeStream` call - * to pick up reading at the current stream position. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationToken continuation_token = 1; - */ - protected $continuation_token = null; - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 2; - */ - protected $estimated_low_watermark = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\StreamContinuationToken $continuation_token - * A token that can be provided to a subsequent `ReadChangeStream` call - * to pick up reading at the current stream position. - * @type \Google\Protobuf\Timestamp $estimated_low_watermark - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A token that can be provided to a subsequent `ReadChangeStream` call - * to pick up reading at the current stream position. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationToken continuation_token = 1; - * @return \Google\Cloud\Bigtable\V2\StreamContinuationToken|null - */ - public function getContinuationToken() - { - return $this->continuation_token; - } - - public function hasContinuationToken() - { - return isset($this->continuation_token); - } - - public function clearContinuationToken() - { - unset($this->continuation_token); - } - - /** - * A token that can be provided to a subsequent `ReadChangeStream` call - * to pick up reading at the current stream position. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationToken continuation_token = 1; - * @param \Google\Cloud\Bigtable\V2\StreamContinuationToken $var - * @return $this - */ - public function setContinuationToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamContinuationToken::class); - $this->continuation_token = $var; - - return $this; - } - - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEstimatedLowWatermark() - { - return $this->estimated_low_watermark; - } - - public function hasEstimatedLowWatermark() - { - return isset($this->estimated_low_watermark); - } - - public function clearEstimatedLowWatermark() - { - unset($this->estimated_low_watermark); - } - - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEstimatedLowWatermark($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->estimated_low_watermark = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Heartbeat::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_Heartbeat::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php deleted file mode 100644 index 861921c6235d..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php +++ /dev/null @@ -1,136 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.MutationChunk - */ -class MutationChunk extends \Google\Protobuf\Internal\Message -{ - /** - * If set, then the mutation is a `SetCell` with a chunked value across - * multiple messages. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; - */ - protected $chunk_info = null; - /** - * If this is a continuation of a chunked message (`chunked_value_offset` > - * 0), ignore all fields except the `SetCell`'s value and merge it with - * the previous message by concatenating the value fields. - * - * Generated from protobuf field .google.bigtable.v2.Mutation mutation = 2; - */ - protected $mutation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo $chunk_info - * If set, then the mutation is a `SetCell` with a chunked value across - * multiple messages. - * @type \Google\Cloud\Bigtable\V2\Mutation $mutation - * If this is a continuation of a chunked message (`chunked_value_offset` > - * 0), ignore all fields except the `SetCell`'s value and merge it with - * the previous message by concatenating the value fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * If set, then the mutation is a `SetCell` with a chunked value across - * multiple messages. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo|null - */ - public function getChunkInfo() - { - return $this->chunk_info; - } - - public function hasChunkInfo() - { - return isset($this->chunk_info); - } - - public function clearChunkInfo() - { - unset($this->chunk_info); - } - - /** - * If set, then the mutation is a `SetCell` with a chunked value across - * multiple messages. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; - * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo $var - * @return $this - */ - public function setChunkInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo::class); - $this->chunk_info = $var; - - return $this; - } - - /** - * If this is a continuation of a chunked message (`chunked_value_offset` > - * 0), ignore all fields except the `SetCell`'s value and merge it with - * the previous message by concatenating the value fields. - * - * Generated from protobuf field .google.bigtable.v2.Mutation mutation = 2; - * @return \Google\Cloud\Bigtable\V2\Mutation|null - */ - public function getMutation() - { - return $this->mutation; - } - - public function hasMutation() - { - return isset($this->mutation); - } - - public function clearMutation() - { - unset($this->mutation); - } - - /** - * If this is a continuation of a chunked message (`chunked_value_offset` > - * 0), ignore all fields except the `SetCell`'s value and merge it with - * the previous message by concatenating the value fields. - * - * Generated from protobuf field .google.bigtable.v2.Mutation mutation = 2; - * @param \Google\Cloud\Bigtable\V2\Mutation $var - * @return $this - */ - public function setMutation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->mutation = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MutationChunk::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_MutationChunk::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php deleted file mode 100644 index f8a6c673c8bf..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php +++ /dev/null @@ -1,144 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo - */ -class ChunkInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The total value size of all the chunks that make up the `SetCell`. - * - * Generated from protobuf field int32 chunked_value_size = 1; - */ - protected $chunked_value_size = 0; - /** - * The byte offset of this chunk into the total value size of the - * mutation. - * - * Generated from protobuf field int32 chunked_value_offset = 2; - */ - protected $chunked_value_offset = 0; - /** - * When true, this is the last chunk of a chunked `SetCell`. - * - * Generated from protobuf field bool last_chunk = 3; - */ - protected $last_chunk = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $chunked_value_size - * The total value size of all the chunks that make up the `SetCell`. - * @type int $chunked_value_offset - * The byte offset of this chunk into the total value size of the - * mutation. - * @type bool $last_chunk - * When true, this is the last chunk of a chunked `SetCell`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The total value size of all the chunks that make up the `SetCell`. - * - * Generated from protobuf field int32 chunked_value_size = 1; - * @return int - */ - public function getChunkedValueSize() - { - return $this->chunked_value_size; - } - - /** - * The total value size of all the chunks that make up the `SetCell`. - * - * Generated from protobuf field int32 chunked_value_size = 1; - * @param int $var - * @return $this - */ - public function setChunkedValueSize($var) - { - GPBUtil::checkInt32($var); - $this->chunked_value_size = $var; - - return $this; - } - - /** - * The byte offset of this chunk into the total value size of the - * mutation. - * - * Generated from protobuf field int32 chunked_value_offset = 2; - * @return int - */ - public function getChunkedValueOffset() - { - return $this->chunked_value_offset; - } - - /** - * The byte offset of this chunk into the total value size of the - * mutation. - * - * Generated from protobuf field int32 chunked_value_offset = 2; - * @param int $var - * @return $this - */ - public function setChunkedValueOffset($var) - { - GPBUtil::checkInt32($var); - $this->chunked_value_offset = $var; - - return $this; - } - - /** - * When true, this is the last chunk of a chunked `SetCell`. - * - * Generated from protobuf field bool last_chunk = 3; - * @return bool - */ - public function getLastChunk() - { - return $this->last_chunk; - } - - /** - * When true, this is the last chunk of a chunked `SetCell`. - * - * Generated from protobuf field bool last_chunk = 3; - * @param bool $var - * @return $this - */ - public function setLastChunk($var) - { - GPBUtil::checkBool($var); - $this->last_chunk = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ChunkInfo::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_MutationChunk_ChunkInfo::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php deleted file mode 100644 index f226aa85abc9..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php +++ /dev/null @@ -1,179 +0,0 @@ -google.bigtable.v2.ReadIterationStats - */ -class ReadIterationStats extends \Google\Protobuf\Internal\Message -{ - /** - * The rows seen (scanned) as part of the request. This includes the count of - * rows returned, as captured below. - * - * Generated from protobuf field int64 rows_seen_count = 1; - */ - protected $rows_seen_count = 0; - /** - * The rows returned as part of the request. - * - * Generated from protobuf field int64 rows_returned_count = 2; - */ - protected $rows_returned_count = 0; - /** - * The cells seen (scanned) as part of the request. This includes the count of - * cells returned, as captured below. - * - * Generated from protobuf field int64 cells_seen_count = 3; - */ - protected $cells_seen_count = 0; - /** - * The cells returned as part of the request. - * - * Generated from protobuf field int64 cells_returned_count = 4; - */ - protected $cells_returned_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $rows_seen_count - * The rows seen (scanned) as part of the request. This includes the count of - * rows returned, as captured below. - * @type int|string $rows_returned_count - * The rows returned as part of the request. - * @type int|string $cells_seen_count - * The cells seen (scanned) as part of the request. This includes the count of - * cells returned, as captured below. - * @type int|string $cells_returned_count - * The cells returned as part of the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); - parent::__construct($data); - } - - /** - * The rows seen (scanned) as part of the request. This includes the count of - * rows returned, as captured below. - * - * Generated from protobuf field int64 rows_seen_count = 1; - * @return int|string - */ - public function getRowsSeenCount() - { - return $this->rows_seen_count; - } - - /** - * The rows seen (scanned) as part of the request. This includes the count of - * rows returned, as captured below. - * - * Generated from protobuf field int64 rows_seen_count = 1; - * @param int|string $var - * @return $this - */ - public function setRowsSeenCount($var) - { - GPBUtil::checkInt64($var); - $this->rows_seen_count = $var; - - return $this; - } - - /** - * The rows returned as part of the request. - * - * Generated from protobuf field int64 rows_returned_count = 2; - * @return int|string - */ - public function getRowsReturnedCount() - { - return $this->rows_returned_count; - } - - /** - * The rows returned as part of the request. - * - * Generated from protobuf field int64 rows_returned_count = 2; - * @param int|string $var - * @return $this - */ - public function setRowsReturnedCount($var) - { - GPBUtil::checkInt64($var); - $this->rows_returned_count = $var; - - return $this; - } - - /** - * The cells seen (scanned) as part of the request. This includes the count of - * cells returned, as captured below. - * - * Generated from protobuf field int64 cells_seen_count = 3; - * @return int|string - */ - public function getCellsSeenCount() - { - return $this->cells_seen_count; - } - - /** - * The cells seen (scanned) as part of the request. This includes the count of - * cells returned, as captured below. - * - * Generated from protobuf field int64 cells_seen_count = 3; - * @param int|string $var - * @return $this - */ - public function setCellsSeenCount($var) - { - GPBUtil::checkInt64($var); - $this->cells_seen_count = $var; - - return $this; - } - - /** - * The cells returned as part of the request. - * - * Generated from protobuf field int64 cells_returned_count = 4; - * @return int|string - */ - public function getCellsReturnedCount() - { - return $this->cells_returned_count; - } - - /** - * The cells returned as part of the request. - * - * Generated from protobuf field int64 cells_returned_count = 4; - * @param int|string $var - * @return $this - */ - public function setCellsReturnedCount($var) - { - GPBUtil::checkInt64($var); - $this->cells_returned_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php deleted file mode 100644 index ab877a010aab..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php +++ /dev/null @@ -1,296 +0,0 @@ -google.bigtable.v2.ReadModifyWriteRowRequest - */ -class ReadModifyWriteRowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique name of the table to which the read/modify/write rules - * should be applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * Optional. The unique name of the AuthorizedView to which the - * read/modify/write rules should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $authorized_view_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - */ - protected $app_profile_id = ''; - /** - * Required. The key of the row to which the read/modify/write rules should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $row_key = ''; - /** - * Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $rules; - - /** - * @param string $tableName Optional. The unique name of the table to which the read/modify/write rules - * should be applied. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be - * applied. - * @param \Google\Cloud\Bigtable\V2\ReadModifyWriteRule[] $rules Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * - * @return \Google\Cloud\Bigtable\V2\ReadModifyWriteRowRequest - * - * @experimental - */ - public static function build(string $tableName, string $rowKey, array $rules): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setRules($rules); - } - - /** - * @param string $tableName Optional. The unique name of the table to which the read/modify/write rules - * should be applied. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be - * applied. - * @param \Google\Cloud\Bigtable\V2\ReadModifyWriteRule[] $rules Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\ReadModifyWriteRowRequest - * - * @experimental - */ - public static function buildFromTableNameRowKeyRulesAppProfileId(string $tableName, string $rowKey, array $rules, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setRules($rules) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Optional. The unique name of the table to which the read/modify/write rules - * should be applied. - * Values are of the form - * `projects//instances//tables/
`. - * @type string $authorized_view_name - * Optional. The unique name of the AuthorizedView to which the - * read/modify/write rules should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type string $row_key - * Required. The key of the row to which the read/modify/write rules should be - * applied. - * @type array<\Google\Cloud\Bigtable\V2\ReadModifyWriteRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique name of the table to which the read/modify/write rules - * should be applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Optional. The unique name of the table to which the read/modify/write rules - * should be applied. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * Optional. The unique name of the AuthorizedView to which the - * read/modify/write rules should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getAuthorizedViewName() - { - return $this->authorized_view_name; - } - - /** - * Optional. The unique name of the AuthorizedView to which the - * read/modify/write rules should be applied. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuthorizedViewName($var) - { - GPBUtil::checkString($var, True); - $this->authorized_view_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The key of the row to which the read/modify/write rules should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * Required. The key of the row to which the read/modify/write rules should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\V2\ReadModifyWriteRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadModifyWriteRule::class); - $this->rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php deleted file mode 100644 index 1b1c1cdac4a9..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.bigtable.v2.ReadModifyWriteRowResponse - */ -class ReadModifyWriteRowResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A Row containing the new contents of all cells modified by the request. - * - * Generated from protobuf field .google.bigtable.v2.Row row = 1; - */ - protected $row = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Row $row - * A Row containing the new contents of all cells modified by the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A Row containing the new contents of all cells modified by the request. - * - * Generated from protobuf field .google.bigtable.v2.Row row = 1; - * @return \Google\Cloud\Bigtable\V2\Row|null - */ - public function getRow() - { - return $this->row; - } - - public function hasRow() - { - return isset($this->row); - } - - public function clearRow() - { - unset($this->row); - } - - /** - * A Row containing the new contents of all cells modified by the request. - * - * Generated from protobuf field .google.bigtable.v2.Row row = 1; - * @param \Google\Cloud\Bigtable\V2\Row $var - * @return $this - */ - public function setRow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Row::class); - $this->row = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php deleted file mode 100644 index 1afafb1f597a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php +++ /dev/null @@ -1,204 +0,0 @@ -google.bigtable.v2.ReadModifyWriteRule - */ -class ReadModifyWriteRule extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the family to which the read/modify/write should be applied. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - /** - * The qualifier of the column to which the read/modify/write should be - * applied. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - */ - protected $column_qualifier = ''; - protected $rule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the family to which the read/modify/write should be applied. - * Must match `[-_.a-zA-Z0-9]+` - * @type string $column_qualifier - * The qualifier of the column to which the read/modify/write should be - * applied. - * Can be any byte string, including the empty string. - * @type string $append_value - * Rule specifying that `append_value` be appended to the existing value. - * If the targeted cell is unset, it will be treated as containing the - * empty string. - * @type int|string $increment_amount - * Rule specifying that `increment_amount` be added to the existing value. - * If the targeted cell is unset, it will be treated as containing a zero. - * Otherwise, the targeted cell must contain an 8-byte value (interpreted - * as a 64-bit big-endian signed integer), or the entire request will fail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the family to which the read/modify/write should be applied. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the family to which the read/modify/write should be applied. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * The qualifier of the column to which the read/modify/write should be - * applied. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @return string - */ - public function getColumnQualifier() - { - return $this->column_qualifier; - } - - /** - * The qualifier of the column to which the read/modify/write should be - * applied. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @param string $var - * @return $this - */ - public function setColumnQualifier($var) - { - GPBUtil::checkString($var, False); - $this->column_qualifier = $var; - - return $this; - } - - /** - * Rule specifying that `append_value` be appended to the existing value. - * If the targeted cell is unset, it will be treated as containing the - * empty string. - * - * Generated from protobuf field bytes append_value = 3; - * @return string - */ - public function getAppendValue() - { - return $this->readOneof(3); - } - - public function hasAppendValue() - { - return $this->hasOneof(3); - } - - /** - * Rule specifying that `append_value` be appended to the existing value. - * If the targeted cell is unset, it will be treated as containing the - * empty string. - * - * Generated from protobuf field bytes append_value = 3; - * @param string $var - * @return $this - */ - public function setAppendValue($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Rule specifying that `increment_amount` be added to the existing value. - * If the targeted cell is unset, it will be treated as containing a zero. - * Otherwise, the targeted cell must contain an 8-byte value (interpreted - * as a 64-bit big-endian signed integer), or the entire request will fail. - * - * Generated from protobuf field int64 increment_amount = 4; - * @return int|string - */ - public function getIncrementAmount() - { - return $this->readOneof(4); - } - - public function hasIncrementAmount() - { - return $this->hasOneof(4); - } - - /** - * Rule specifying that `increment_amount` be added to the existing value. - * If the targeted cell is unset, it will be treated as containing a zero. - * Otherwise, the targeted cell must contain an 8-byte value (interpreted - * as a 64-bit big-endian signed integer), or the entire request will fail. - * - * Generated from protobuf field int64 increment_amount = 4; - * @param int|string $var - * @return $this - */ - public function setIncrementAmount($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getRule() - { - return $this->whichOneof("rule"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php deleted file mode 100644 index d8401d3e4c46..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php +++ /dev/null @@ -1,426 +0,0 @@ -google.bigtable.v2.ReadRowsRequest - */ -class ReadRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * Optional. The unique name of the AuthorizedView from which to read. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $authorized_view_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 5; - */ - protected $app_profile_id = ''; - /** - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - * - * Generated from protobuf field .google.bigtable.v2.RowSet rows = 2; - */ - protected $rows = null; - /** - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter filter = 3; - */ - protected $filter = null; - /** - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - * - * Generated from protobuf field int64 rows_limit = 4; - */ - protected $rows_limit = 0; - /** - * The view into RequestStats, as described above. - * - * Generated from protobuf field .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; - */ - protected $request_stats_view = 0; - /** - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * Example result set: - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] - * - * Generated from protobuf field bool reversed = 7; - */ - protected $reversed = false; - - /** - * @param string $tableName Optional. The unique name of the table from which to read. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\ReadRowsRequest - * - * @experimental - */ - public static function build(string $tableName): self - { - return (new self()) - ->setTableName($tableName); - } - - /** - * @param string $tableName Optional. The unique name of the table from which to read. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\ReadRowsRequest - * - * @experimental - */ - public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Optional. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. - * @type string $authorized_view_name - * Optional. The unique name of the AuthorizedView from which to read. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type \Google\Cloud\Bigtable\V2\RowSet $rows - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - * @type \Google\Cloud\Bigtable\V2\RowFilter $filter - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - * @type int|string $rows_limit - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - * @type int $request_stats_view - * The view into RequestStats, as described above. - * @type bool $reversed - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * Example result set: - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Optional. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * Optional. The unique name of the AuthorizedView from which to read. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getAuthorizedViewName() - { - return $this->authorized_view_name; - } - - /** - * Optional. The unique name of the AuthorizedView from which to read. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuthorizedViewName($var) - { - GPBUtil::checkString($var, True); - $this->authorized_view_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 5; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 5; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - * - * Generated from protobuf field .google.bigtable.v2.RowSet rows = 2; - * @return \Google\Cloud\Bigtable\V2\RowSet|null - */ - public function getRows() - { - return $this->rows; - } - - public function hasRows() - { - return isset($this->rows); - } - - public function clearRows() - { - unset($this->rows); - } - - /** - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - * - * Generated from protobuf field .google.bigtable.v2.RowSet rows = 2; - * @param \Google\Cloud\Bigtable\V2\RowSet $var - * @return $this - */ - public function setRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowSet::class); - $this->rows = $var; - - return $this; - } - - /** - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter filter = 3; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter filter = 3; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->filter = $var; - - return $this; - } - - /** - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - * - * Generated from protobuf field int64 rows_limit = 4; - * @return int|string - */ - public function getRowsLimit() - { - return $this->rows_limit; - } - - /** - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - * - * Generated from protobuf field int64 rows_limit = 4; - * @param int|string $var - * @return $this - */ - public function setRowsLimit($var) - { - GPBUtil::checkInt64($var); - $this->rows_limit = $var; - - return $this; - } - - /** - * The view into RequestStats, as described above. - * - * Generated from protobuf field .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; - * @return int - */ - public function getRequestStatsView() - { - return $this->request_stats_view; - } - - /** - * The view into RequestStats, as described above. - * - * Generated from protobuf field .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; - * @param int $var - * @return $this - */ - public function setRequestStatsView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\V2\ReadRowsRequest\RequestStatsView::class); - $this->request_stats_view = $var; - - return $this; - } - - /** - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * Example result set: - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] - * - * Generated from protobuf field bool reversed = 7; - * @return bool - */ - public function getReversed() - { - return $this->reversed; - } - - /** - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * Example result set: - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] - * - * Generated from protobuf field bool reversed = 7; - * @param bool $var - * @return $this - */ - public function setReversed($var) - { - GPBUtil::checkBool($var); - $this->reversed = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php deleted file mode 100644 index 9dd641bbd6dc..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php +++ /dev/null @@ -1,67 +0,0 @@ -google.bigtable.v2.ReadRowsRequest.RequestStatsView - */ -class RequestStatsView -{ - /** - * The default / unset value. The API will default to the NONE option below. - * - * Generated from protobuf enum REQUEST_STATS_VIEW_UNSPECIFIED = 0; - */ - const REQUEST_STATS_VIEW_UNSPECIFIED = 0; - /** - * Do not include any RequestStats in the response. This will leave the - * RequestStats embedded message unset in the response. - * - * Generated from protobuf enum REQUEST_STATS_NONE = 1; - */ - const REQUEST_STATS_NONE = 1; - /** - * Include the full set of available RequestStats in the response, - * applicable to this read. - * - * Generated from protobuf enum REQUEST_STATS_FULL = 2; - */ - const REQUEST_STATS_FULL = 2; - - private static $valueToName = [ - self::REQUEST_STATS_VIEW_UNSPECIFIED => 'REQUEST_STATS_VIEW_UNSPECIFIED', - self::REQUEST_STATS_NONE => 'REQUEST_STATS_NONE', - self::REQUEST_STATS_FULL => 'REQUEST_STATS_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(RequestStatsView::class, \Google\Cloud\Bigtable\V2\ReadRowsRequest_RequestStatsView::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php deleted file mode 100644 index 024cc02abc0c..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php +++ /dev/null @@ -1,233 +0,0 @@ -google.bigtable.v2.ReadRowsResponse - */ -class ReadRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A collection of a row's contents as part of the read request. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; - */ - private $chunks; - /** - * Optionally the server might return the row key of the last row it - * has scanned. The client can use this to construct a more - * efficient retry request if needed: any row keys or portions of - * ranges less than this row key can be dropped from the request. - * This is primarily useful for cases where the server has read a - * lot of data that was filtered out since the last committed row - * key, allowing the client to skip that work on a retry. - * - * Generated from protobuf field bytes last_scanned_row_key = 2; - */ - protected $last_scanned_row_key = ''; - /** - * If requested, provide enhanced query performance statistics. The semantics - * dictate: - * * request_stats is empty on every (streamed) response, except - * * request_stats has non-empty information after all chunks have been - * streamed, where the ReadRowsResponse message only contains - * request_stats. - * * For example, if a read request would have returned an empty - * response instead a single ReadRowsResponse is streamed with empty - * chunks and request_stats filled. - * Visually, response messages will stream as follows: - * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - * \______________________/ \________________________________/ - * Primary response Trailer of RequestStats info - * Or if the read did not return any values: - * {chunks: [], request_stats: {...}} - * \________________________________/ - * Trailer of RequestStats info - * - * Generated from protobuf field .google.bigtable.v2.RequestStats request_stats = 3; - */ - protected $request_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk>|\Google\Protobuf\Internal\RepeatedField $chunks - * A collection of a row's contents as part of the read request. - * @type string $last_scanned_row_key - * Optionally the server might return the row key of the last row it - * has scanned. The client can use this to construct a more - * efficient retry request if needed: any row keys or portions of - * ranges less than this row key can be dropped from the request. - * This is primarily useful for cases where the server has read a - * lot of data that was filtered out since the last committed row - * key, allowing the client to skip that work on a retry. - * @type \Google\Cloud\Bigtable\V2\RequestStats $request_stats - * If requested, provide enhanced query performance statistics. The semantics - * dictate: - * * request_stats is empty on every (streamed) response, except - * * request_stats has non-empty information after all chunks have been - * streamed, where the ReadRowsResponse message only contains - * request_stats. - * * For example, if a read request would have returned an empty - * response instead a single ReadRowsResponse is streamed with empty - * chunks and request_stats filled. - * Visually, response messages will stream as follows: - * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - * \______________________/ \________________________________/ - * Primary response Trailer of RequestStats info - * Or if the read did not return any values: - * {chunks: [], request_stats: {...}} - * \________________________________/ - * Trailer of RequestStats info - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A collection of a row's contents as part of the read request. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChunks() - { - return $this->chunks; - } - - /** - * A collection of a row's contents as part of the read request. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; - * @param array<\Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChunks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk::class); - $this->chunks = $arr; - - return $this; - } - - /** - * Optionally the server might return the row key of the last row it - * has scanned. The client can use this to construct a more - * efficient retry request if needed: any row keys or portions of - * ranges less than this row key can be dropped from the request. - * This is primarily useful for cases where the server has read a - * lot of data that was filtered out since the last committed row - * key, allowing the client to skip that work on a retry. - * - * Generated from protobuf field bytes last_scanned_row_key = 2; - * @return string - */ - public function getLastScannedRowKey() - { - return $this->last_scanned_row_key; - } - - /** - * Optionally the server might return the row key of the last row it - * has scanned. The client can use this to construct a more - * efficient retry request if needed: any row keys or portions of - * ranges less than this row key can be dropped from the request. - * This is primarily useful for cases where the server has read a - * lot of data that was filtered out since the last committed row - * key, allowing the client to skip that work on a retry. - * - * Generated from protobuf field bytes last_scanned_row_key = 2; - * @param string $var - * @return $this - */ - public function setLastScannedRowKey($var) - { - GPBUtil::checkString($var, False); - $this->last_scanned_row_key = $var; - - return $this; - } - - /** - * If requested, provide enhanced query performance statistics. The semantics - * dictate: - * * request_stats is empty on every (streamed) response, except - * * request_stats has non-empty information after all chunks have been - * streamed, where the ReadRowsResponse message only contains - * request_stats. - * * For example, if a read request would have returned an empty - * response instead a single ReadRowsResponse is streamed with empty - * chunks and request_stats filled. - * Visually, response messages will stream as follows: - * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - * \______________________/ \________________________________/ - * Primary response Trailer of RequestStats info - * Or if the read did not return any values: - * {chunks: [], request_stats: {...}} - * \________________________________/ - * Trailer of RequestStats info - * - * Generated from protobuf field .google.bigtable.v2.RequestStats request_stats = 3; - * @return \Google\Cloud\Bigtable\V2\RequestStats|null - */ - public function getRequestStats() - { - return $this->request_stats; - } - - public function hasRequestStats() - { - return isset($this->request_stats); - } - - public function clearRequestStats() - { - unset($this->request_stats); - } - - /** - * If requested, provide enhanced query performance statistics. The semantics - * dictate: - * * request_stats is empty on every (streamed) response, except - * * request_stats has non-empty information after all chunks have been - * streamed, where the ReadRowsResponse message only contains - * request_stats. - * * For example, if a read request would have returned an empty - * response instead a single ReadRowsResponse is streamed with empty - * chunks and request_stats filled. - * Visually, response messages will stream as follows: - * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - * \______________________/ \________________________________/ - * Primary response Trailer of RequestStats info - * Or if the read did not return any values: - * {chunks: [], request_stats: {...}} - * \________________________________/ - * Trailer of RequestStats info - * - * Generated from protobuf field .google.bigtable.v2.RequestStats request_stats = 3; - * @param \Google\Cloud\Bigtable\V2\RequestStats $var - * @return $this - */ - public function setRequestStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RequestStats::class); - $this->request_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php deleted file mode 100644 index 0ff8217f7de4..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php +++ /dev/null @@ -1,560 +0,0 @@ -google.bigtable.v2.ReadRowsResponse.CellChunk - */ -class CellChunk extends \Google\Protobuf\Internal\Message -{ - /** - * The row key for this chunk of data. If the row key is empty, - * this CellChunk is a continuation of the same row as the previous - * CellChunk in the response stream, even if that CellChunk was in a - * previous ReadRowsResponse message. - * - * Generated from protobuf field bytes row_key = 1; - */ - protected $row_key = ''; - /** - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - */ - protected $family_name = null; - /** - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - */ - protected $qualifier = null; - /** - * The cell's stored timestamp, which also uniquely identifies it - * within its column. Values are always expressed in - * microseconds, but individual tables may set a coarser - * granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will - * only allow values of `timestamp_micros` which are multiples of - * 1000. Timestamps are only set in the first CellChunk per cell - * (for cells split into multiple chunks). - * - * Generated from protobuf field int64 timestamp_micros = 4; - */ - protected $timestamp_micros = 0; - /** - * Labels applied to the cell by a - * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set - * on the first CellChunk per cell. - * - * Generated from protobuf field repeated string labels = 5; - */ - private $labels; - /** - * The value stored in the cell. Cell values can be split across - * multiple CellChunks. In that case only the value field will be - * set in CellChunks after the first: the timestamp and labels - * will only be present in the first CellChunk, even if the first - * CellChunk came in a previous ReadRowsResponse. - * - * Generated from protobuf field bytes value = 6; - */ - protected $value = ''; - /** - * If this CellChunk is part of a chunked cell value and this is - * not the final chunk of that cell, value_size will be set to the - * total length of the cell value. The client can use this size - * to pre-allocate memory to hold the full cell value. - * - * Generated from protobuf field int32 value_size = 7; - */ - protected $value_size = 0; - protected $row_status; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $row_key - * The row key for this chunk of data. If the row key is empty, - * this CellChunk is a continuation of the same row as the previous - * CellChunk in the response stream, even if that CellChunk was in a - * previous ReadRowsResponse message. - * @type \Google\Protobuf\StringValue $family_name - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * @type \Google\Protobuf\BytesValue $qualifier - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * @type int|string $timestamp_micros - * The cell's stored timestamp, which also uniquely identifies it - * within its column. Values are always expressed in - * microseconds, but individual tables may set a coarser - * granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will - * only allow values of `timestamp_micros` which are multiples of - * 1000. Timestamps are only set in the first CellChunk per cell - * (for cells split into multiple chunks). - * @type array|\Google\Protobuf\Internal\RepeatedField $labels - * Labels applied to the cell by a - * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set - * on the first CellChunk per cell. - * @type string $value - * The value stored in the cell. Cell values can be split across - * multiple CellChunks. In that case only the value field will be - * set in CellChunks after the first: the timestamp and labels - * will only be present in the first CellChunk, even if the first - * CellChunk came in a previous ReadRowsResponse. - * @type int $value_size - * If this CellChunk is part of a chunked cell value and this is - * not the final chunk of that cell, value_size will be set to the - * total length of the cell value. The client can use this size - * to pre-allocate memory to hold the full cell value. - * @type bool $reset_row - * Indicates that the client should drop all previous chunks for - * `row_key`, as it will be re-read from the beginning. - * @type bool $commit_row - * Indicates that the client can safely process all previous chunks for - * `row_key`, as its data has been fully read. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The row key for this chunk of data. If the row key is empty, - * this CellChunk is a continuation of the same row as the previous - * CellChunk in the response stream, even if that CellChunk was in a - * previous ReadRowsResponse message. - * - * Generated from protobuf field bytes row_key = 1; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * The row key for this chunk of data. If the row key is empty, - * this CellChunk is a continuation of the same row as the previous - * CellChunk in the response stream, even if that CellChunk was in a - * previous ReadRowsResponse message. - * - * Generated from protobuf field bytes row_key = 1; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - * @return \Google\Protobuf\StringValue|null - */ - public function getFamilyName() - { - return $this->family_name; - } - - public function hasFamilyName() - { - return isset($this->family_name); - } - - public function clearFamilyName() - { - unset($this->family_name); - } - - /** - * Returns the unboxed value from getFamilyName() - - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - * @return string|null - */ - public function getFamilyNameUnwrapped() - { - return $this->readWrapperValue("family_name"); - } - - /** - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->family_name = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - * @param string|null $var - * @return $this - */ - public function setFamilyNameUnwrapped($var) - { - $this->writeWrapperValue("family_name", $var); - return $this;} - - /** - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - * @return \Google\Protobuf\BytesValue|null - */ - public function getQualifier() - { - return $this->qualifier; - } - - public function hasQualifier() - { - return isset($this->qualifier); - } - - public function clearQualifier() - { - unset($this->qualifier); - } - - /** - * Returns the unboxed value from getQualifier() - - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - * @return string|null - */ - public function getQualifierUnwrapped() - { - return $this->readWrapperValue("qualifier"); - } - - /** - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - * @param \Google\Protobuf\BytesValue $var - * @return $this - */ - public function setQualifier($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BytesValue::class); - $this->qualifier = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BytesValue object. - - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - * @param string|null $var - * @return $this - */ - public function setQualifierUnwrapped($var) - { - $this->writeWrapperValue("qualifier", $var); - return $this;} - - /** - * The cell's stored timestamp, which also uniquely identifies it - * within its column. Values are always expressed in - * microseconds, but individual tables may set a coarser - * granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will - * only allow values of `timestamp_micros` which are multiples of - * 1000. Timestamps are only set in the first CellChunk per cell - * (for cells split into multiple chunks). - * - * Generated from protobuf field int64 timestamp_micros = 4; - * @return int|string - */ - public function getTimestampMicros() - { - return $this->timestamp_micros; - } - - /** - * The cell's stored timestamp, which also uniquely identifies it - * within its column. Values are always expressed in - * microseconds, but individual tables may set a coarser - * granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will - * only allow values of `timestamp_micros` which are multiples of - * 1000. Timestamps are only set in the first CellChunk per cell - * (for cells split into multiple chunks). - * - * Generated from protobuf field int64 timestamp_micros = 4; - * @param int|string $var - * @return $this - */ - public function setTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->timestamp_micros = $var; - - return $this; - } - - /** - * Labels applied to the cell by a - * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set - * on the first CellChunk per cell. - * - * Generated from protobuf field repeated string labels = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels applied to the cell by a - * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set - * on the first CellChunk per cell. - * - * Generated from protobuf field repeated string labels = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * The value stored in the cell. Cell values can be split across - * multiple CellChunks. In that case only the value field will be - * set in CellChunks after the first: the timestamp and labels - * will only be present in the first CellChunk, even if the first - * CellChunk came in a previous ReadRowsResponse. - * - * Generated from protobuf field bytes value = 6; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value stored in the cell. Cell values can be split across - * multiple CellChunks. In that case only the value field will be - * set in CellChunks after the first: the timestamp and labels - * will only be present in the first CellChunk, even if the first - * CellChunk came in a previous ReadRowsResponse. - * - * Generated from protobuf field bytes value = 6; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, False); - $this->value = $var; - - return $this; - } - - /** - * If this CellChunk is part of a chunked cell value and this is - * not the final chunk of that cell, value_size will be set to the - * total length of the cell value. The client can use this size - * to pre-allocate memory to hold the full cell value. - * - * Generated from protobuf field int32 value_size = 7; - * @return int - */ - public function getValueSize() - { - return $this->value_size; - } - - /** - * If this CellChunk is part of a chunked cell value and this is - * not the final chunk of that cell, value_size will be set to the - * total length of the cell value. The client can use this size - * to pre-allocate memory to hold the full cell value. - * - * Generated from protobuf field int32 value_size = 7; - * @param int $var - * @return $this - */ - public function setValueSize($var) - { - GPBUtil::checkInt32($var); - $this->value_size = $var; - - return $this; - } - - /** - * Indicates that the client should drop all previous chunks for - * `row_key`, as it will be re-read from the beginning. - * - * Generated from protobuf field bool reset_row = 8; - * @return bool - */ - public function getResetRow() - { - return $this->readOneof(8); - } - - public function hasResetRow() - { - return $this->hasOneof(8); - } - - /** - * Indicates that the client should drop all previous chunks for - * `row_key`, as it will be re-read from the beginning. - * - * Generated from protobuf field bool reset_row = 8; - * @param bool $var - * @return $this - */ - public function setResetRow($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Indicates that the client can safely process all previous chunks for - * `row_key`, as its data has been fully read. - * - * Generated from protobuf field bool commit_row = 9; - * @return bool - */ - public function getCommitRow() - { - return $this->readOneof(9); - } - - public function hasCommitRow() - { - return $this->hasOneof(9); - } - - /** - * Indicates that the client can safely process all previous chunks for - * `row_key`, as its data has been fully read. - * - * Generated from protobuf field bool commit_row = 9; - * @param bool $var - * @return $this - */ - public function setCommitRow($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * @return string - */ - public function getRowStatus() - { - return $this->whichOneof("row_status"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CellChunk::class, \Google\Cloud\Bigtable\V2\ReadRowsResponse_CellChunk::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php deleted file mode 100644 index 26a852ba8ea8..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php +++ /dev/null @@ -1,135 +0,0 @@ -google.bigtable.v2.RequestLatencyStats - */ -class RequestLatencyStats extends \Google\Protobuf\Internal\Message -{ - /** - * The latency measured by the frontend server handling this request, from - * when the request was received, to when this value is sent back in the - * response. For more context on the component that is measuring this latency, - * see: https://cloud.google.com/bigtable/docs/overview - * Note: This value may be slightly shorter than the value reported into - * aggregate latency metrics in Monitoring for this request - * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value - * needs to be sent in the response before the latency measurement including - * that transmission is finalized. - * Note: This value includes the end-to-end latency of contacting nodes in - * the targeted cluster, e.g. measuring from when the first byte arrives at - * the frontend server, to when this value is sent back as the last value in - * the response, including any latency incurred by contacting nodes, waiting - * for results from nodes, and finally sending results from nodes back to the - * caller. - * - * Generated from protobuf field .google.protobuf.Duration frontend_server_latency = 1; - */ - protected $frontend_server_latency = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $frontend_server_latency - * The latency measured by the frontend server handling this request, from - * when the request was received, to when this value is sent back in the - * response. For more context on the component that is measuring this latency, - * see: https://cloud.google.com/bigtable/docs/overview - * Note: This value may be slightly shorter than the value reported into - * aggregate latency metrics in Monitoring for this request - * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value - * needs to be sent in the response before the latency measurement including - * that transmission is finalized. - * Note: This value includes the end-to-end latency of contacting nodes in - * the targeted cluster, e.g. measuring from when the first byte arrives at - * the frontend server, to when this value is sent back as the last value in - * the response, including any latency incurred by contacting nodes, waiting - * for results from nodes, and finally sending results from nodes back to the - * caller. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); - parent::__construct($data); - } - - /** - * The latency measured by the frontend server handling this request, from - * when the request was received, to when this value is sent back in the - * response. For more context on the component that is measuring this latency, - * see: https://cloud.google.com/bigtable/docs/overview - * Note: This value may be slightly shorter than the value reported into - * aggregate latency metrics in Monitoring for this request - * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value - * needs to be sent in the response before the latency measurement including - * that transmission is finalized. - * Note: This value includes the end-to-end latency of contacting nodes in - * the targeted cluster, e.g. measuring from when the first byte arrives at - * the frontend server, to when this value is sent back as the last value in - * the response, including any latency incurred by contacting nodes, waiting - * for results from nodes, and finally sending results from nodes back to the - * caller. - * - * Generated from protobuf field .google.protobuf.Duration frontend_server_latency = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getFrontendServerLatency() - { - return $this->frontend_server_latency; - } - - public function hasFrontendServerLatency() - { - return isset($this->frontend_server_latency); - } - - public function clearFrontendServerLatency() - { - unset($this->frontend_server_latency); - } - - /** - * The latency measured by the frontend server handling this request, from - * when the request was received, to when this value is sent back in the - * response. For more context on the component that is measuring this latency, - * see: https://cloud.google.com/bigtable/docs/overview - * Note: This value may be slightly shorter than the value reported into - * aggregate latency metrics in Monitoring for this request - * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value - * needs to be sent in the response before the latency measurement including - * that transmission is finalized. - * Note: This value includes the end-to-end latency of contacting nodes in - * the targeted cluster, e.g. measuring from when the first byte arrives at - * the frontend server, to when this value is sent back as the last value in - * the response, including any latency incurred by contacting nodes, waiting - * for results from nodes, and finally sending results from nodes back to the - * caller. - * - * Generated from protobuf field .google.protobuf.Duration frontend_server_latency = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setFrontendServerLatency($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->frontend_server_latency = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php deleted file mode 100644 index 9726ac0d3f26..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.v2.RequestStats - */ -class RequestStats extends \Google\Protobuf\Internal\Message -{ - protected $stats_view; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\FullReadStatsView $full_read_stats_view - * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL - * view, see package google.bigtable.v2. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); - parent::__construct($data); - } - - /** - * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL - * view, see package google.bigtable.v2. - * - * Generated from protobuf field .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; - * @return \Google\Cloud\Bigtable\V2\FullReadStatsView|null - */ - public function getFullReadStatsView() - { - return $this->readOneof(1); - } - - public function hasFullReadStatsView() - { - return $this->hasOneof(1); - } - - /** - * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL - * view, see package google.bigtable.v2. - * - * Generated from protobuf field .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; - * @param \Google\Cloud\Bigtable\V2\FullReadStatsView $var - * @return $this - */ - public function setFullReadStatsView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\FullReadStatsView::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getStatsView() - { - return $this->whichOneof("stats_view"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php deleted file mode 100644 index 08a68a68ff05..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php +++ /dev/null @@ -1,128 +0,0 @@ -google.bigtable.v2.ResponseParams - */ -class ResponseParams extends \Google\Protobuf\Internal\Message -{ - /** - * The cloud bigtable zone associated with the cluster. - * - * Generated from protobuf field optional string zone_id = 1; - */ - protected $zone_id = null; - /** - * Identifier for a cluster that represents set of - * bigtable resources. - * - * Generated from protobuf field optional string cluster_id = 2; - */ - protected $cluster_id = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $zone_id - * The cloud bigtable zone associated with the cluster. - * @type string $cluster_id - * Identifier for a cluster that represents set of - * bigtable resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\ResponseParams::initOnce(); - parent::__construct($data); - } - - /** - * The cloud bigtable zone associated with the cluster. - * - * Generated from protobuf field optional string zone_id = 1; - * @return string - */ - public function getZoneId() - { - return isset($this->zone_id) ? $this->zone_id : ''; - } - - public function hasZoneId() - { - return isset($this->zone_id); - } - - public function clearZoneId() - { - unset($this->zone_id); - } - - /** - * The cloud bigtable zone associated with the cluster. - * - * Generated from protobuf field optional string zone_id = 1; - * @param string $var - * @return $this - */ - public function setZoneId($var) - { - GPBUtil::checkString($var, True); - $this->zone_id = $var; - - return $this; - } - - /** - * Identifier for a cluster that represents set of - * bigtable resources. - * - * Generated from protobuf field optional string cluster_id = 2; - * @return string - */ - public function getClusterId() - { - return isset($this->cluster_id) ? $this->cluster_id : ''; - } - - public function hasClusterId() - { - return isset($this->cluster_id); - } - - public function clearClusterId() - { - unset($this->cluster_id); - } - - /** - * Identifier for a cluster that represents set of - * bigtable resources. - * - * Generated from protobuf field optional string cluster_id = 2; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResultSetMetadata.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResultSetMetadata.php deleted file mode 100644 index 9e61567a09bd..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResultSetMetadata.php +++ /dev/null @@ -1,75 +0,0 @@ -google.bigtable.v2.ResultSetMetadata - */ -class ResultSetMetadata extends \Google\Protobuf\Internal\Message -{ - protected $schema; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\ProtoSchema $proto_schema - * Schema in proto format - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Schema in proto format - * - * Generated from protobuf field .google.bigtable.v2.ProtoSchema proto_schema = 1; - * @return \Google\Cloud\Bigtable\V2\ProtoSchema|null - */ - public function getProtoSchema() - { - return $this->readOneof(1); - } - - public function hasProtoSchema() - { - return $this->hasOneof(1); - } - - /** - * Schema in proto format - * - * Generated from protobuf field .google.bigtable.v2.ProtoSchema proto_schema = 1; - * @param \Google\Cloud\Bigtable\V2\ProtoSchema $var - * @return $this - */ - public function setProtoSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ProtoSchema::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getSchema() - { - return $this->whichOneof("schema"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php deleted file mode 100644 index ad1d56187e7a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php +++ /dev/null @@ -1,114 +0,0 @@ -google.bigtable.v2.Row - */ -class Row extends \Google\Protobuf\Internal\Message -{ - /** - * The unique key which identifies this row within its table. This is the same - * key that's used to identify the row in, for example, a MutateRowRequest. - * May contain any non-empty byte string up to 4KiB in length. - * - * Generated from protobuf field bytes key = 1; - */ - protected $key = ''; - /** - * May be empty, but only if the entire row is empty. - * The mutual ordering of column families is not specified. - * - * Generated from protobuf field repeated .google.bigtable.v2.Family families = 2; - */ - private $families; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The unique key which identifies this row within its table. This is the same - * key that's used to identify the row in, for example, a MutateRowRequest. - * May contain any non-empty byte string up to 4KiB in length. - * @type array<\Google\Cloud\Bigtable\V2\Family>|\Google\Protobuf\Internal\RepeatedField $families - * May be empty, but only if the entire row is empty. - * The mutual ordering of column families is not specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The unique key which identifies this row within its table. This is the same - * key that's used to identify the row in, for example, a MutateRowRequest. - * May contain any non-empty byte string up to 4KiB in length. - * - * Generated from protobuf field bytes key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The unique key which identifies this row within its table. This is the same - * key that's used to identify the row in, for example, a MutateRowRequest. - * May contain any non-empty byte string up to 4KiB in length. - * - * Generated from protobuf field bytes key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, False); - $this->key = $var; - - return $this; - } - - /** - * May be empty, but only if the entire row is empty. - * The mutual ordering of column families is not specified. - * - * Generated from protobuf field repeated .google.bigtable.v2.Family families = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFamilies() - { - return $this->families; - } - - /** - * May be empty, but only if the entire row is empty. - * The mutual ordering of column families is not specified. - * - * Generated from protobuf field repeated .google.bigtable.v2.Family families = 2; - * @param array<\Google\Cloud\Bigtable\V2\Family>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFamilies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Family::class); - $this->families = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php deleted file mode 100644 index 3d05e40a7922..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php +++ /dev/null @@ -1,990 +0,0 @@ -google.bigtable.v2.RowFilter - */ -class RowFilter extends \Google\Protobuf\Internal\Message -{ - protected $filter; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\RowFilter\Chain $chain - * Applies several RowFilters to the data in sequence, progressively - * narrowing the results. - * @type \Google\Cloud\Bigtable\V2\RowFilter\Interleave $interleave - * Applies several RowFilters to the data in parallel and combines the - * results. - * @type \Google\Cloud\Bigtable\V2\RowFilter\Condition $condition - * Applies one of two possible RowFilters to the data based on the output of - * a predicate RowFilter. - * @type bool $sink - * ADVANCED USE ONLY. - * Hook for introspection into the RowFilter. Outputs all cells directly to - * the output of the read rather than to any parent filter. Consider the - * following example: - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched - * Despite being excluded by the qualifier filter, a copy of every cell - * that reaches the sink is present in the final result. - * As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], - * duplicate cells are possible, and appear in an unspecified mutual order. - * In this case we have a duplicate with column "A:B" and timestamp 2, - * because one copy passed through the all filter while the other was - * passed through the label and sink. Note that one copy has label "foo", - * while the other does not. - * Cannot be used within the `predicate_filter`, `true_filter`, or - * `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. - * @type bool $pass_all_filter - * Matches all cells, regardless of input. Functionally equivalent to - * leaving `filter` unset, but included for completeness. - * @type bool $block_all_filter - * Does not match any cells, regardless of input. Useful for temporarily - * disabling just part of a filter. - * @type string $row_key_regex_filter - * Matches only cells from rows whose keys satisfy the given RE2 regex. In - * other words, passes through the entire row when the key matches, and - * otherwise produces an empty row. - * Note that, since row keys can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary key. - * @type float $row_sample_filter - * Matches all cells from a row with probability p, and matches no cells - * from the row with probability 1-p. - * @type string $family_name_regex_filter - * Matches only cells from columns whose families satisfy the given RE2 - * regex. For technical reasons, the regex must not contain the `:` - * character, even if it is not being used as a literal. - * Note that, since column families cannot contain the new line character - * `\n`, it is sufficient to use `.` as a full wildcard when matching - * column family names. - * @type string $column_qualifier_regex_filter - * Matches only cells from columns whose qualifiers satisfy the given RE2 - * regex. - * Note that, since column qualifiers can contain arbitrary bytes, the `\C` - * escape sequence must be used if a true wildcard is desired. The `.` - * character will not match the new line character `\n`, which may be - * present in a binary qualifier. - * @type \Google\Cloud\Bigtable\V2\ColumnRange $column_range_filter - * Matches only cells from columns within the given range. - * @type \Google\Cloud\Bigtable\V2\TimestampRange $timestamp_range_filter - * Matches only cells with timestamps within the given range. - * @type string $value_regex_filter - * Matches only cells with values that satisfy the given regular expression. - * Note that, since cell values can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary value. - * @type \Google\Cloud\Bigtable\V2\ValueRange $value_range_filter - * Matches only cells with values that fall within the given range. - * @type int $cells_per_row_offset_filter - * Skips the first N cells of each row, matching all subsequent cells. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * @type int $cells_per_row_limit_filter - * Matches only the first N cells of each row. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * @type int $cells_per_column_limit_filter - * Matches only the most recent N cells within each column. For example, - * if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, - * skip all earlier cells in `foo:bar`, and then begin matching again in - * column `foo:bar2`. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * @type bool $strip_value_transformer - * Replaces each cell's value with the empty string. - * @type string $apply_label_transformer - * Applies the given label to all cells in the output row. This allows - * the client to determine which results were produced from which part of - * the filter. - * Values must be at most 15 characters in length, and match the RE2 - * pattern `[a-z0-9\\-]+` - * Due to a technical limitation, it is not currently possible to apply - * multiple labels to a cell. As a result, a Chain may have no more than - * one sub-filter which contains a `apply_label_transformer`. It is okay for - * an Interleave to contain multiple `apply_label_transformers`, as they - * will be applied to separate copies of the input. This may be relaxed in - * the future. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Applies several RowFilters to the data in sequence, progressively - * narrowing the results. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Chain chain = 1; - * @return \Google\Cloud\Bigtable\V2\RowFilter\Chain|null - */ - public function getChain() - { - return $this->readOneof(1); - } - - public function hasChain() - { - return $this->hasOneof(1); - } - - /** - * Applies several RowFilters to the data in sequence, progressively - * narrowing the results. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Chain chain = 1; - * @param \Google\Cloud\Bigtable\V2\RowFilter\Chain $var - * @return $this - */ - public function setChain($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter\Chain::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Applies several RowFilters to the data in parallel and combines the - * results. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Interleave interleave = 2; - * @return \Google\Cloud\Bigtable\V2\RowFilter\Interleave|null - */ - public function getInterleave() - { - return $this->readOneof(2); - } - - public function hasInterleave() - { - return $this->hasOneof(2); - } - - /** - * Applies several RowFilters to the data in parallel and combines the - * results. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Interleave interleave = 2; - * @param \Google\Cloud\Bigtable\V2\RowFilter\Interleave $var - * @return $this - */ - public function setInterleave($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter\Interleave::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Applies one of two possible RowFilters to the data based on the output of - * a predicate RowFilter. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Condition condition = 3; - * @return \Google\Cloud\Bigtable\V2\RowFilter\Condition|null - */ - public function getCondition() - { - return $this->readOneof(3); - } - - public function hasCondition() - { - return $this->hasOneof(3); - } - - /** - * Applies one of two possible RowFilters to the data based on the output of - * a predicate RowFilter. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Condition condition = 3; - * @param \Google\Cloud\Bigtable\V2\RowFilter\Condition $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter\Condition::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * ADVANCED USE ONLY. - * Hook for introspection into the RowFilter. Outputs all cells directly to - * the output of the read rather than to any parent filter. Consider the - * following example: - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched - * Despite being excluded by the qualifier filter, a copy of every cell - * that reaches the sink is present in the final result. - * As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], - * duplicate cells are possible, and appear in an unspecified mutual order. - * In this case we have a duplicate with column "A:B" and timestamp 2, - * because one copy passed through the all filter while the other was - * passed through the label and sink. Note that one copy has label "foo", - * while the other does not. - * Cannot be used within the `predicate_filter`, `true_filter`, or - * `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. - * - * Generated from protobuf field bool sink = 16; - * @return bool - */ - public function getSink() - { - return $this->readOneof(16); - } - - public function hasSink() - { - return $this->hasOneof(16); - } - - /** - * ADVANCED USE ONLY. - * Hook for introspection into the RowFilter. Outputs all cells directly to - * the output of the read rather than to any parent filter. Consider the - * following example: - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched - * Despite being excluded by the qualifier filter, a copy of every cell - * that reaches the sink is present in the final result. - * As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], - * duplicate cells are possible, and appear in an unspecified mutual order. - * In this case we have a duplicate with column "A:B" and timestamp 2, - * because one copy passed through the all filter while the other was - * passed through the label and sink. Note that one copy has label "foo", - * while the other does not. - * Cannot be used within the `predicate_filter`, `true_filter`, or - * `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. - * - * Generated from protobuf field bool sink = 16; - * @param bool $var - * @return $this - */ - public function setSink($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Matches all cells, regardless of input. Functionally equivalent to - * leaving `filter` unset, but included for completeness. - * - * Generated from protobuf field bool pass_all_filter = 17; - * @return bool - */ - public function getPassAllFilter() - { - return $this->readOneof(17); - } - - public function hasPassAllFilter() - { - return $this->hasOneof(17); - } - - /** - * Matches all cells, regardless of input. Functionally equivalent to - * leaving `filter` unset, but included for completeness. - * - * Generated from protobuf field bool pass_all_filter = 17; - * @param bool $var - * @return $this - */ - public function setPassAllFilter($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Does not match any cells, regardless of input. Useful for temporarily - * disabling just part of a filter. - * - * Generated from protobuf field bool block_all_filter = 18; - * @return bool - */ - public function getBlockAllFilter() - { - return $this->readOneof(18); - } - - public function hasBlockAllFilter() - { - return $this->hasOneof(18); - } - - /** - * Does not match any cells, regardless of input. Useful for temporarily - * disabling just part of a filter. - * - * Generated from protobuf field bool block_all_filter = 18; - * @param bool $var - * @return $this - */ - public function setBlockAllFilter($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Matches only cells from rows whose keys satisfy the given RE2 regex. In - * other words, passes through the entire row when the key matches, and - * otherwise produces an empty row. - * Note that, since row keys can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary key. - * - * Generated from protobuf field bytes row_key_regex_filter = 4; - * @return string - */ - public function getRowKeyRegexFilter() - { - return $this->readOneof(4); - } - - public function hasRowKeyRegexFilter() - { - return $this->hasOneof(4); - } - - /** - * Matches only cells from rows whose keys satisfy the given RE2 regex. In - * other words, passes through the entire row when the key matches, and - * otherwise produces an empty row. - * Note that, since row keys can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary key. - * - * Generated from protobuf field bytes row_key_regex_filter = 4; - * @param string $var - * @return $this - */ - public function setRowKeyRegexFilter($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Matches all cells from a row with probability p, and matches no cells - * from the row with probability 1-p. - * - * Generated from protobuf field double row_sample_filter = 14; - * @return float - */ - public function getRowSampleFilter() - { - return $this->readOneof(14); - } - - public function hasRowSampleFilter() - { - return $this->hasOneof(14); - } - - /** - * Matches all cells from a row with probability p, and matches no cells - * from the row with probability 1-p. - * - * Generated from protobuf field double row_sample_filter = 14; - * @param float $var - * @return $this - */ - public function setRowSampleFilter($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Matches only cells from columns whose families satisfy the given RE2 - * regex. For technical reasons, the regex must not contain the `:` - * character, even if it is not being used as a literal. - * Note that, since column families cannot contain the new line character - * `\n`, it is sufficient to use `.` as a full wildcard when matching - * column family names. - * - * Generated from protobuf field string family_name_regex_filter = 5; - * @return string - */ - public function getFamilyNameRegexFilter() - { - return $this->readOneof(5); - } - - public function hasFamilyNameRegexFilter() - { - return $this->hasOneof(5); - } - - /** - * Matches only cells from columns whose families satisfy the given RE2 - * regex. For technical reasons, the regex must not contain the `:` - * character, even if it is not being used as a literal. - * Note that, since column families cannot contain the new line character - * `\n`, it is sufficient to use `.` as a full wildcard when matching - * column family names. - * - * Generated from protobuf field string family_name_regex_filter = 5; - * @param string $var - * @return $this - */ - public function setFamilyNameRegexFilter($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Matches only cells from columns whose qualifiers satisfy the given RE2 - * regex. - * Note that, since column qualifiers can contain arbitrary bytes, the `\C` - * escape sequence must be used if a true wildcard is desired. The `.` - * character will not match the new line character `\n`, which may be - * present in a binary qualifier. - * - * Generated from protobuf field bytes column_qualifier_regex_filter = 6; - * @return string - */ - public function getColumnQualifierRegexFilter() - { - return $this->readOneof(6); - } - - public function hasColumnQualifierRegexFilter() - { - return $this->hasOneof(6); - } - - /** - * Matches only cells from columns whose qualifiers satisfy the given RE2 - * regex. - * Note that, since column qualifiers can contain arbitrary bytes, the `\C` - * escape sequence must be used if a true wildcard is desired. The `.` - * character will not match the new line character `\n`, which may be - * present in a binary qualifier. - * - * Generated from protobuf field bytes column_qualifier_regex_filter = 6; - * @param string $var - * @return $this - */ - public function setColumnQualifierRegexFilter($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Matches only cells from columns within the given range. - * - * Generated from protobuf field .google.bigtable.v2.ColumnRange column_range_filter = 7; - * @return \Google\Cloud\Bigtable\V2\ColumnRange|null - */ - public function getColumnRangeFilter() - { - return $this->readOneof(7); - } - - public function hasColumnRangeFilter() - { - return $this->hasOneof(7); - } - - /** - * Matches only cells from columns within the given range. - * - * Generated from protobuf field .google.bigtable.v2.ColumnRange column_range_filter = 7; - * @param \Google\Cloud\Bigtable\V2\ColumnRange $var - * @return $this - */ - public function setColumnRangeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ColumnRange::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Matches only cells with timestamps within the given range. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange timestamp_range_filter = 8; - * @return \Google\Cloud\Bigtable\V2\TimestampRange|null - */ - public function getTimestampRangeFilter() - { - return $this->readOneof(8); - } - - public function hasTimestampRangeFilter() - { - return $this->hasOneof(8); - } - - /** - * Matches only cells with timestamps within the given range. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange timestamp_range_filter = 8; - * @param \Google\Cloud\Bigtable\V2\TimestampRange $var - * @return $this - */ - public function setTimestampRangeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\TimestampRange::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Matches only cells with values that satisfy the given regular expression. - * Note that, since cell values can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary value. - * - * Generated from protobuf field bytes value_regex_filter = 9; - * @return string - */ - public function getValueRegexFilter() - { - return $this->readOneof(9); - } - - public function hasValueRegexFilter() - { - return $this->hasOneof(9); - } - - /** - * Matches only cells with values that satisfy the given regular expression. - * Note that, since cell values can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary value. - * - * Generated from protobuf field bytes value_regex_filter = 9; - * @param string $var - * @return $this - */ - public function setValueRegexFilter($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Matches only cells with values that fall within the given range. - * - * Generated from protobuf field .google.bigtable.v2.ValueRange value_range_filter = 15; - * @return \Google\Cloud\Bigtable\V2\ValueRange|null - */ - public function getValueRangeFilter() - { - return $this->readOneof(15); - } - - public function hasValueRangeFilter() - { - return $this->hasOneof(15); - } - - /** - * Matches only cells with values that fall within the given range. - * - * Generated from protobuf field .google.bigtable.v2.ValueRange value_range_filter = 15; - * @param \Google\Cloud\Bigtable\V2\ValueRange $var - * @return $this - */ - public function setValueRangeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ValueRange::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Skips the first N cells of each row, matching all subsequent cells. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_row_offset_filter = 10; - * @return int - */ - public function getCellsPerRowOffsetFilter() - { - return $this->readOneof(10); - } - - public function hasCellsPerRowOffsetFilter() - { - return $this->hasOneof(10); - } - - /** - * Skips the first N cells of each row, matching all subsequent cells. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_row_offset_filter = 10; - * @param int $var - * @return $this - */ - public function setCellsPerRowOffsetFilter($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Matches only the first N cells of each row. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_row_limit_filter = 11; - * @return int - */ - public function getCellsPerRowLimitFilter() - { - return $this->readOneof(11); - } - - public function hasCellsPerRowLimitFilter() - { - return $this->hasOneof(11); - } - - /** - * Matches only the first N cells of each row. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_row_limit_filter = 11; - * @param int $var - * @return $this - */ - public function setCellsPerRowLimitFilter($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Matches only the most recent N cells within each column. For example, - * if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, - * skip all earlier cells in `foo:bar`, and then begin matching again in - * column `foo:bar2`. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_column_limit_filter = 12; - * @return int - */ - public function getCellsPerColumnLimitFilter() - { - return $this->readOneof(12); - } - - public function hasCellsPerColumnLimitFilter() - { - return $this->hasOneof(12); - } - - /** - * Matches only the most recent N cells within each column. For example, - * if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, - * skip all earlier cells in `foo:bar`, and then begin matching again in - * column `foo:bar2`. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_column_limit_filter = 12; - * @param int $var - * @return $this - */ - public function setCellsPerColumnLimitFilter($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Replaces each cell's value with the empty string. - * - * Generated from protobuf field bool strip_value_transformer = 13; - * @return bool - */ - public function getStripValueTransformer() - { - return $this->readOneof(13); - } - - public function hasStripValueTransformer() - { - return $this->hasOneof(13); - } - - /** - * Replaces each cell's value with the empty string. - * - * Generated from protobuf field bool strip_value_transformer = 13; - * @param bool $var - * @return $this - */ - public function setStripValueTransformer($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Applies the given label to all cells in the output row. This allows - * the client to determine which results were produced from which part of - * the filter. - * Values must be at most 15 characters in length, and match the RE2 - * pattern `[a-z0-9\\-]+` - * Due to a technical limitation, it is not currently possible to apply - * multiple labels to a cell. As a result, a Chain may have no more than - * one sub-filter which contains a `apply_label_transformer`. It is okay for - * an Interleave to contain multiple `apply_label_transformers`, as they - * will be applied to separate copies of the input. This may be relaxed in - * the future. - * - * Generated from protobuf field string apply_label_transformer = 19; - * @return string - */ - public function getApplyLabelTransformer() - { - return $this->readOneof(19); - } - - public function hasApplyLabelTransformer() - { - return $this->hasOneof(19); - } - - /** - * Applies the given label to all cells in the output row. This allows - * the client to determine which results were produced from which part of - * the filter. - * Values must be at most 15 characters in length, and match the RE2 - * pattern `[a-z0-9\\-]+` - * Due to a technical limitation, it is not currently possible to apply - * multiple labels to a cell. As a result, a Chain may have no more than - * one sub-filter which contains a `apply_label_transformer`. It is okay for - * an Interleave to contain multiple `apply_label_transformers`, as they - * will be applied to separate copies of the input. This may be relaxed in - * the future. - * - * Generated from protobuf field string apply_label_transformer = 19; - * @param string $var - * @return $this - */ - public function setApplyLabelTransformer($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * @return string - */ - public function getFilter() - { - return $this->whichOneof("filter"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php deleted file mode 100644 index 5d9a60a3cea2..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.v2.RowFilter.Chain - */ -class Chain extends \Google\Protobuf\Internal\Message -{ - /** - * The elements of "filters" are chained together to process the input row: - * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row - * The full chain is executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - */ - private $filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $filters - * The elements of "filters" are chained together to process the input row: - * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row - * The full chain is executed atomically. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The elements of "filters" are chained together to process the input row: - * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row - * The full chain is executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilters() - { - return $this->filters; - } - - /** - * The elements of "filters" are chained together to process the input row: - * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row - * The full chain is executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - * @param array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->filters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Chain::class, \Google\Cloud\Bigtable\V2\RowFilter_Chain::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php deleted file mode 100644 index f7e66bf81817..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php +++ /dev/null @@ -1,189 +0,0 @@ -google.bigtable.v2.RowFilter.Condition - */ -class Condition extends \Google\Protobuf\Internal\Message -{ - /** - * If `predicate_filter` outputs any cells, then `true_filter` will be - * evaluated on the input row. Otherwise, `false_filter` will be evaluated. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 1; - */ - protected $predicate_filter = null; - /** - * The filter to apply to the input row if `predicate_filter` returns any - * results. If not provided, no results will be returned in the true case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter true_filter = 2; - */ - protected $true_filter = null; - /** - * The filter to apply to the input row if `predicate_filter` does not - * return any results. If not provided, no results will be returned in the - * false case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter false_filter = 3; - */ - protected $false_filter = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\RowFilter $predicate_filter - * If `predicate_filter` outputs any cells, then `true_filter` will be - * evaluated on the input row. Otherwise, `false_filter` will be evaluated. - * @type \Google\Cloud\Bigtable\V2\RowFilter $true_filter - * The filter to apply to the input row if `predicate_filter` returns any - * results. If not provided, no results will be returned in the true case. - * @type \Google\Cloud\Bigtable\V2\RowFilter $false_filter - * The filter to apply to the input row if `predicate_filter` does not - * return any results. If not provided, no results will be returned in the - * false case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * If `predicate_filter` outputs any cells, then `true_filter` will be - * evaluated on the input row. Otherwise, `false_filter` will be evaluated. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 1; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getPredicateFilter() - { - return $this->predicate_filter; - } - - public function hasPredicateFilter() - { - return isset($this->predicate_filter); - } - - public function clearPredicateFilter() - { - unset($this->predicate_filter); - } - - /** - * If `predicate_filter` outputs any cells, then `true_filter` will be - * evaluated on the input row. Otherwise, `false_filter` will be evaluated. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 1; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setPredicateFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->predicate_filter = $var; - - return $this; - } - - /** - * The filter to apply to the input row if `predicate_filter` returns any - * results. If not provided, no results will be returned in the true case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter true_filter = 2; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getTrueFilter() - { - return $this->true_filter; - } - - public function hasTrueFilter() - { - return isset($this->true_filter); - } - - public function clearTrueFilter() - { - unset($this->true_filter); - } - - /** - * The filter to apply to the input row if `predicate_filter` returns any - * results. If not provided, no results will be returned in the true case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter true_filter = 2; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setTrueFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->true_filter = $var; - - return $this; - } - - /** - * The filter to apply to the input row if `predicate_filter` does not - * return any results. If not provided, no results will be returned in the - * false case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter false_filter = 3; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getFalseFilter() - { - return $this->false_filter; - } - - public function hasFalseFilter() - { - return isset($this->false_filter); - } - - public function clearFalseFilter() - { - unset($this->false_filter); - } - - /** - * The filter to apply to the input row if `predicate_filter` does not - * return any results. If not provided, no results will be returned in the - * false case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter false_filter = 3; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setFalseFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->false_filter = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Condition::class, \Google\Cloud\Bigtable\V2\RowFilter_Condition::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php deleted file mode 100644 index 92485f18e91d..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php +++ /dev/null @@ -1,159 +0,0 @@ -google.bigtable.v2.RowFilter.Interleave - */ -class Interleave extends \Google\Protobuf\Internal\Message -{ - /** - * The elements of "filters" all process a copy of the input row, and the - * results are pooled, sorted, and combined into a single output row. - * If multiple cells are produced with the same column and timestamp, - * they will all appear in the output row in an unspecified mutual order. - * Consider the following example, with three filters: - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 - * All interleaved filters are executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - */ - private $filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $filters - * The elements of "filters" all process a copy of the input row, and the - * results are pooled, sorted, and combined into a single output row. - * If multiple cells are produced with the same column and timestamp, - * they will all appear in the output row in an unspecified mutual order. - * Consider the following example, with three filters: - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 - * All interleaved filters are executed atomically. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The elements of "filters" all process a copy of the input row, and the - * results are pooled, sorted, and combined into a single output row. - * If multiple cells are produced with the same column and timestamp, - * they will all appear in the output row in an unspecified mutual order. - * Consider the following example, with three filters: - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 - * All interleaved filters are executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilters() - { - return $this->filters; - } - - /** - * The elements of "filters" all process a copy of the input row, and the - * results are pooled, sorted, and combined into a single output row. - * If multiple cells are produced with the same column and timestamp, - * they will all appear in the output row in an unspecified mutual order. - * Consider the following example, with three filters: - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 - * All interleaved filters are executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - * @param array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->filters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Interleave::class, \Google\Cloud\Bigtable\V2\RowFilter_Interleave::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php deleted file mode 100644 index f4782f92295a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php +++ /dev/null @@ -1,183 +0,0 @@ -google.bigtable.v2.RowRange - */ -class RowRange extends \Google\Protobuf\Internal\Message -{ - protected $start_key; - protected $end_key; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $start_key_closed - * Used when giving an inclusive lower bound for the range. - * @type string $start_key_open - * Used when giving an exclusive lower bound for the range. - * @type string $end_key_open - * Used when giving an exclusive upper bound for the range. - * @type string $end_key_closed - * Used when giving an inclusive upper bound for the range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_key_closed = 1; - * @return string - */ - public function getStartKeyClosed() - { - return $this->readOneof(1); - } - - public function hasStartKeyClosed() - { - return $this->hasOneof(1); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_key_closed = 1; - * @param string $var - * @return $this - */ - public function setStartKeyClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_key_open = 2; - * @return string - */ - public function getStartKeyOpen() - { - return $this->readOneof(2); - } - - public function hasStartKeyOpen() - { - return $this->hasOneof(2); - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_key_open = 2; - * @param string $var - * @return $this - */ - public function setStartKeyOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_key_open = 3; - * @return string - */ - public function getEndKeyOpen() - { - return $this->readOneof(3); - } - - public function hasEndKeyOpen() - { - return $this->hasOneof(3); - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_key_open = 3; - * @param string $var - * @return $this - */ - public function setEndKeyOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_key_closed = 4; - * @return string - */ - public function getEndKeyClosed() - { - return $this->readOneof(4); - } - - public function hasEndKeyClosed() - { - return $this->hasOneof(4); - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_key_closed = 4; - * @param string $var - * @return $this - */ - public function setEndKeyClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getStartKey() - { - return $this->whichOneof("start_key"); - } - - /** - * @return string - */ - public function getEndKey() - { - return $this->whichOneof("end_key"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php deleted file mode 100644 index 5c8335823bb8..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php +++ /dev/null @@ -1,101 +0,0 @@ -google.bigtable.v2.RowSet - */ -class RowSet extends \Google\Protobuf\Internal\Message -{ - /** - * Single rows included in the set. - * - * Generated from protobuf field repeated bytes row_keys = 1; - */ - private $row_keys; - /** - * Contiguous row ranges included in the set. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowRange row_ranges = 2; - */ - private $row_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $row_keys - * Single rows included in the set. - * @type array<\Google\Cloud\Bigtable\V2\RowRange>|\Google\Protobuf\Internal\RepeatedField $row_ranges - * Contiguous row ranges included in the set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Single rows included in the set. - * - * Generated from protobuf field repeated bytes row_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRowKeys() - { - return $this->row_keys; - } - - /** - * Single rows included in the set. - * - * Generated from protobuf field repeated bytes row_keys = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRowKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->row_keys = $arr; - - return $this; - } - - /** - * Contiguous row ranges included in the set. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowRange row_ranges = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRowRanges() - { - return $this->row_ranges; - } - - /** - * Contiguous row ranges included in the set. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowRange row_ranges = 2; - * @param array<\Google\Cloud\Bigtable\V2\RowRange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRowRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\RowRange::class); - $this->row_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php deleted file mode 100644 index de1a618ad0bc..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.bigtable.v2.SampleRowKeysRequest - */ -class SampleRowKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * Optional. The unique name of the AuthorizedView from which to sample row - * keys. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $authorized_view_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - */ - protected $app_profile_id = ''; - - /** - * @param string $tableName Optional. The unique name of the table from which to sample row keys. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\SampleRowKeysRequest - * - * @experimental - */ - public static function build(string $tableName): self - { - return (new self()) - ->setTableName($tableName); - } - - /** - * @param string $tableName Optional. The unique name of the table from which to sample row keys. - * - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\SampleRowKeysRequest - * - * @experimental - */ - public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Optional. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. - * @type string $authorized_view_name - * Optional. The unique name of the AuthorizedView from which to sample row - * keys. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Optional. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * Optional. The unique name of the AuthorizedView from which to sample row - * keys. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getAuthorizedViewName() - { - return $this->authorized_view_name; - } - - /** - * Optional. The unique name of the AuthorizedView from which to sample row - * keys. - * Values are of the form - * `projects//instances//tables/
/authorizedViews/`. - * - * Generated from protobuf field string authorized_view_name = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuthorizedViewName($var) - { - GPBUtil::checkString($var, True); - $this->authorized_view_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php deleted file mode 100644 index 1c38c831d343..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php +++ /dev/null @@ -1,137 +0,0 @@ -google.bigtable.v2.SampleRowKeysResponse - */ -class SampleRowKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sorted streamed sequence of sample row keys in the table. The table might - * have contents before the first row key in the list and after the last one, - * but a key containing the empty string indicates "end of table" and will be - * the last response given, if present. - * Note that row keys in this list may not have ever been written to or read - * from, and users should therefore not make any assumptions about the row key - * structure that are specific to their use case. - * - * Generated from protobuf field bytes row_key = 1; - */ - protected $row_key = ''; - /** - * Approximate total storage space used by all rows in the table which precede - * `row_key`. Buffering the contents of all rows between two subsequent - * samples would require space roughly equal to the difference in their - * `offset_bytes` fields. - * - * Generated from protobuf field int64 offset_bytes = 2; - */ - protected $offset_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $row_key - * Sorted streamed sequence of sample row keys in the table. The table might - * have contents before the first row key in the list and after the last one, - * but a key containing the empty string indicates "end of table" and will be - * the last response given, if present. - * Note that row keys in this list may not have ever been written to or read - * from, and users should therefore not make any assumptions about the row key - * structure that are specific to their use case. - * @type int|string $offset_bytes - * Approximate total storage space used by all rows in the table which precede - * `row_key`. Buffering the contents of all rows between two subsequent - * samples would require space roughly equal to the difference in their - * `offset_bytes` fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Sorted streamed sequence of sample row keys in the table. The table might - * have contents before the first row key in the list and after the last one, - * but a key containing the empty string indicates "end of table" and will be - * the last response given, if present. - * Note that row keys in this list may not have ever been written to or read - * from, and users should therefore not make any assumptions about the row key - * structure that are specific to their use case. - * - * Generated from protobuf field bytes row_key = 1; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * Sorted streamed sequence of sample row keys in the table. The table might - * have contents before the first row key in the list and after the last one, - * but a key containing the empty string indicates "end of table" and will be - * the last response given, if present. - * Note that row keys in this list may not have ever been written to or read - * from, and users should therefore not make any assumptions about the row key - * structure that are specific to their use case. - * - * Generated from protobuf field bytes row_key = 1; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * Approximate total storage space used by all rows in the table which precede - * `row_key`. Buffering the contents of all rows between two subsequent - * samples would require space roughly equal to the difference in their - * `offset_bytes` fields. - * - * Generated from protobuf field int64 offset_bytes = 2; - * @return int|string - */ - public function getOffsetBytes() - { - return $this->offset_bytes; - } - - /** - * Approximate total storage space used by all rows in the table which precede - * `row_key`. Buffering the contents of all rows between two subsequent - * samples would require space roughly equal to the difference in their - * `offset_bytes` fields. - * - * Generated from protobuf field int64 offset_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setOffsetBytes($var) - { - GPBUtil::checkInt64($var); - $this->offset_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php deleted file mode 100644 index 9a623c62ebaa..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php +++ /dev/null @@ -1,113 +0,0 @@ -google.bigtable.v2.StreamContinuationToken - */ -class StreamContinuationToken extends \Google\Protobuf\Internal\Message -{ - /** - * The partition that this token applies to. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - */ - protected $partition = null; - /** - * An encoded position in the stream to restart reading from. - * - * Generated from protobuf field string token = 2; - */ - protected $token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\StreamPartition $partition - * The partition that this token applies to. - * @type string $token - * An encoded position in the stream to restart reading from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The partition that this token applies to. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - * @return \Google\Cloud\Bigtable\V2\StreamPartition|null - */ - public function getPartition() - { - return $this->partition; - } - - public function hasPartition() - { - return isset($this->partition); - } - - public function clearPartition() - { - unset($this->partition); - } - - /** - * The partition that this token applies to. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - * @param \Google\Cloud\Bigtable\V2\StreamPartition $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamPartition::class); - $this->partition = $var; - - return $this; - } - - /** - * An encoded position in the stream to restart reading from. - * - * Generated from protobuf field string token = 2; - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * An encoded position in the stream to restart reading from. - * - * Generated from protobuf field string token = 2; - * @param string $var - * @return $this - */ - public function setToken($var) - { - GPBUtil::checkString($var, True); - $this->token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php deleted file mode 100644 index 471a816ecaeb..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php +++ /dev/null @@ -1,69 +0,0 @@ -google.bigtable.v2.StreamContinuationTokens - */ -class StreamContinuationTokens extends \Google\Protobuf\Internal\Message -{ - /** - * List of continuation tokens. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; - */ - private $tokens; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $tokens - * List of continuation tokens. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * List of continuation tokens. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * List of continuation tokens. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; - * @param array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\StreamContinuationToken::class); - $this->tokens = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php deleted file mode 100644 index 2efb7f58fd23..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php +++ /dev/null @@ -1,82 +0,0 @@ -google.bigtable.v2.StreamPartition - */ -class StreamPartition extends \Google\Protobuf\Internal\Message -{ - /** - * The row range covered by this partition and is specified by - * [`start_key_closed`, `end_key_open`). - * - * Generated from protobuf field .google.bigtable.v2.RowRange row_range = 1; - */ - protected $row_range = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\RowRange $row_range - * The row range covered by this partition and is specified by - * [`start_key_closed`, `end_key_open`). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The row range covered by this partition and is specified by - * [`start_key_closed`, `end_key_open`). - * - * Generated from protobuf field .google.bigtable.v2.RowRange row_range = 1; - * @return \Google\Cloud\Bigtable\V2\RowRange|null - */ - public function getRowRange() - { - return $this->row_range; - } - - public function hasRowRange() - { - return isset($this->row_range); - } - - public function clearRowRange() - { - unset($this->row_range); - } - - /** - * The row range covered by this partition and is specified by - * [`start_key_closed`, `end_key_open`). - * - * Generated from protobuf field .google.bigtable.v2.RowRange row_range = 1; - * @param \Google\Cloud\Bigtable\V2\RowRange $var - * @return $this - */ - public function setRowRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowRange::class); - $this->row_range = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php deleted file mode 100644 index ddd1bcea30d4..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php +++ /dev/null @@ -1,101 +0,0 @@ -google.bigtable.v2.TimestampRange - */ -class TimestampRange extends \Google\Protobuf\Internal\Message -{ - /** - * Inclusive lower bound. If left empty, interpreted as 0. - * - * Generated from protobuf field int64 start_timestamp_micros = 1; - */ - protected $start_timestamp_micros = 0; - /** - * Exclusive upper bound. If left empty, interpreted as infinity. - * - * Generated from protobuf field int64 end_timestamp_micros = 2; - */ - protected $end_timestamp_micros = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $start_timestamp_micros - * Inclusive lower bound. If left empty, interpreted as 0. - * @type int|string $end_timestamp_micros - * Exclusive upper bound. If left empty, interpreted as infinity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Inclusive lower bound. If left empty, interpreted as 0. - * - * Generated from protobuf field int64 start_timestamp_micros = 1; - * @return int|string - */ - public function getStartTimestampMicros() - { - return $this->start_timestamp_micros; - } - - /** - * Inclusive lower bound. If left empty, interpreted as 0. - * - * Generated from protobuf field int64 start_timestamp_micros = 1; - * @param int|string $var - * @return $this - */ - public function setStartTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->start_timestamp_micros = $var; - - return $this; - } - - /** - * Exclusive upper bound. If left empty, interpreted as infinity. - * - * Generated from protobuf field int64 end_timestamp_micros = 2; - * @return int|string - */ - public function getEndTimestampMicros() - { - return $this->end_timestamp_micros; - } - - /** - * Exclusive upper bound. If left empty, interpreted as infinity. - * - * Generated from protobuf field int64 end_timestamp_micros = 2; - * @param int|string $var - * @return $this - */ - public function setEndTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->end_timestamp_micros = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type.php deleted file mode 100644 index 0000b3ed8eba..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type.php +++ /dev/null @@ -1,458 +0,0 @@ - INT64(-1)`, but `STRING("-00001") > STRING("00001)`. - * * Self-delimiting: If we concatenate two encoded values, can we always tell - * where the first one ends and the second one begins? - * - Example: If we encode INT64s to fixed-width STRINGs, the first value - * will always contain exactly N digits, possibly preceded by a sign. - * - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have - * no way to tell where the first one ends. - * * Compatibility: Which other systems have matching encoding schemes? For - * example, does this encoding have a GoogleSQL equivalent? HBase? Java? - * - * Generated from protobuf message google.bigtable.v2.Type - */ -class Type extends \Google\Protobuf\Internal\Message -{ - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type\Bytes $bytes_type - * Bytes - * @type \Google\Cloud\Bigtable\V2\Type\PBString $string_type - * String - * @type \Google\Cloud\Bigtable\V2\Type\Int64 $int64_type - * Int64 - * @type \Google\Cloud\Bigtable\V2\Type\Float32 $float32_type - * Float32 - * @type \Google\Cloud\Bigtable\V2\Type\Float64 $float64_type - * Float64 - * @type \Google\Cloud\Bigtable\V2\Type\PBBool $bool_type - * Bool - * @type \Google\Cloud\Bigtable\V2\Type\Timestamp $timestamp_type - * Timestamp - * @type \Google\Cloud\Bigtable\V2\Type\Date $date_type - * Date - * @type \Google\Cloud\Bigtable\V2\Type\Aggregate $aggregate_type - * Aggregate - * @type \Google\Cloud\Bigtable\V2\Type\Struct $struct_type - * Struct - * @type \Google\Cloud\Bigtable\V2\Type\PBArray $array_type - * Array - * @type \Google\Cloud\Bigtable\V2\Type\Map $map_type - * Map - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Bytes - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; - * @return \Google\Cloud\Bigtable\V2\Type\Bytes|null - */ - public function getBytesType() - { - return $this->readOneof(1); - } - - public function hasBytesType() - { - return $this->hasOneof(1); - } - - /** - * Bytes - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; - * @param \Google\Cloud\Bigtable\V2\Type\Bytes $var - * @return $this - */ - public function setBytesType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Bytes::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * String - * - * Generated from protobuf field .google.bigtable.v2.Type.String string_type = 2; - * @return \Google\Cloud\Bigtable\V2\Type\PBString|null - */ - public function getStringType() - { - return $this->readOneof(2); - } - - public function hasStringType() - { - return $this->hasOneof(2); - } - - /** - * String - * - * Generated from protobuf field .google.bigtable.v2.Type.String string_type = 2; - * @param \Google\Cloud\Bigtable\V2\Type\PBString $var - * @return $this - */ - public function setStringType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBString::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Int64 - * - * Generated from protobuf field .google.bigtable.v2.Type.Int64 int64_type = 5; - * @return \Google\Cloud\Bigtable\V2\Type\Int64|null - */ - public function getInt64Type() - { - return $this->readOneof(5); - } - - public function hasInt64Type() - { - return $this->hasOneof(5); - } - - /** - * Int64 - * - * Generated from protobuf field .google.bigtable.v2.Type.Int64 int64_type = 5; - * @param \Google\Cloud\Bigtable\V2\Type\Int64 $var - * @return $this - */ - public function setInt64Type($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Int64::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Float32 - * - * Generated from protobuf field .google.bigtable.v2.Type.Float32 float32_type = 12; - * @return \Google\Cloud\Bigtable\V2\Type\Float32|null - */ - public function getFloat32Type() - { - return $this->readOneof(12); - } - - public function hasFloat32Type() - { - return $this->hasOneof(12); - } - - /** - * Float32 - * - * Generated from protobuf field .google.bigtable.v2.Type.Float32 float32_type = 12; - * @param \Google\Cloud\Bigtable\V2\Type\Float32 $var - * @return $this - */ - public function setFloat32Type($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Float32::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Float64 - * - * Generated from protobuf field .google.bigtable.v2.Type.Float64 float64_type = 9; - * @return \Google\Cloud\Bigtable\V2\Type\Float64|null - */ - public function getFloat64Type() - { - return $this->readOneof(9); - } - - public function hasFloat64Type() - { - return $this->hasOneof(9); - } - - /** - * Float64 - * - * Generated from protobuf field .google.bigtable.v2.Type.Float64 float64_type = 9; - * @param \Google\Cloud\Bigtable\V2\Type\Float64 $var - * @return $this - */ - public function setFloat64Type($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Float64::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Bool - * - * Generated from protobuf field .google.bigtable.v2.Type.Bool bool_type = 8; - * @return \Google\Cloud\Bigtable\V2\Type\PBBool|null - */ - public function getBoolType() - { - return $this->readOneof(8); - } - - public function hasBoolType() - { - return $this->hasOneof(8); - } - - /** - * Bool - * - * Generated from protobuf field .google.bigtable.v2.Type.Bool bool_type = 8; - * @param \Google\Cloud\Bigtable\V2\Type\PBBool $var - * @return $this - */ - public function setBoolType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBBool::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Timestamp - * - * Generated from protobuf field .google.bigtable.v2.Type.Timestamp timestamp_type = 10; - * @return \Google\Cloud\Bigtable\V2\Type\Timestamp|null - */ - public function getTimestampType() - { - return $this->readOneof(10); - } - - public function hasTimestampType() - { - return $this->hasOneof(10); - } - - /** - * Timestamp - * - * Generated from protobuf field .google.bigtable.v2.Type.Timestamp timestamp_type = 10; - * @param \Google\Cloud\Bigtable\V2\Type\Timestamp $var - * @return $this - */ - public function setTimestampType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Date - * - * Generated from protobuf field .google.bigtable.v2.Type.Date date_type = 11; - * @return \Google\Cloud\Bigtable\V2\Type\Date|null - */ - public function getDateType() - { - return $this->readOneof(11); - } - - public function hasDateType() - { - return $this->hasOneof(11); - } - - /** - * Date - * - * Generated from protobuf field .google.bigtable.v2.Type.Date date_type = 11; - * @param \Google\Cloud\Bigtable\V2\Type\Date $var - * @return $this - */ - public function setDateType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Date::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Aggregate - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate aggregate_type = 6; - * @return \Google\Cloud\Bigtable\V2\Type\Aggregate|null - */ - public function getAggregateType() - { - return $this->readOneof(6); - } - - public function hasAggregateType() - { - return $this->hasOneof(6); - } - - /** - * Aggregate - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate aggregate_type = 6; - * @param \Google\Cloud\Bigtable\V2\Type\Aggregate $var - * @return $this - */ - public function setAggregateType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Struct - * - * Generated from protobuf field .google.bigtable.v2.Type.Struct struct_type = 7; - * @return \Google\Cloud\Bigtable\V2\Type\Struct|null - */ - public function getStructType() - { - return $this->readOneof(7); - } - - public function hasStructType() - { - return $this->hasOneof(7); - } - - /** - * Struct - * - * Generated from protobuf field .google.bigtable.v2.Type.Struct struct_type = 7; - * @param \Google\Cloud\Bigtable\V2\Type\Struct $var - * @return $this - */ - public function setStructType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Struct::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Array - * - * Generated from protobuf field .google.bigtable.v2.Type.Array array_type = 3; - * @return \Google\Cloud\Bigtable\V2\Type\PBArray|null - */ - public function getArrayType() - { - return $this->readOneof(3); - } - - public function hasArrayType() - { - return $this->hasOneof(3); - } - - /** - * Array - * - * Generated from protobuf field .google.bigtable.v2.Type.Array array_type = 3; - * @param \Google\Cloud\Bigtable\V2\Type\PBArray $var - * @return $this - */ - public function setArrayType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBArray::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Map - * - * Generated from protobuf field .google.bigtable.v2.Type.Map map_type = 4; - * @return \Google\Cloud\Bigtable\V2\Type\Map|null - */ - public function getMapType() - { - return $this->readOneof(4); - } - - public function hasMapType() - { - return $this->hasOneof(4); - } - - /** - * Map - * - * Generated from protobuf field .google.bigtable.v2.Type.Map map_type = 4; - * @param \Google\Cloud\Bigtable\V2\Type\Map $var - * @return $this - */ - public function setMapType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Map::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate.php deleted file mode 100644 index efd66b84d05b..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate.php +++ /dev/null @@ -1,284 +0,0 @@ -google.bigtable.v2.Type.Aggregate - */ -class Aggregate extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the inputs that are accumulated by this `Aggregate`, which must - * specify a full encoding. - * Use `AddInput` mutations to accumulate new inputs. - * - * Generated from protobuf field .google.bigtable.v2.Type input_type = 1; - */ - protected $input_type = null; - /** - * Output only. Type that holds the internal accumulator state for the - * `Aggregate`. This is a function of the `input_type` and `aggregator` - * chosen, and will always specify a full encoding. - * - * Generated from protobuf field .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_type = null; - protected $aggregator; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type $input_type - * Type of the inputs that are accumulated by this `Aggregate`, which must - * specify a full encoding. - * Use `AddInput` mutations to accumulate new inputs. - * @type \Google\Cloud\Bigtable\V2\Type $state_type - * Output only. Type that holds the internal accumulator state for the - * `Aggregate`. This is a function of the `input_type` and `aggregator` - * chosen, and will always specify a full encoding. - * @type \Google\Cloud\Bigtable\V2\Type\Aggregate\Sum $sum - * Sum aggregator. - * @type \Google\Cloud\Bigtable\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount $hllpp_unique_count - * HyperLogLogPlusPlusUniqueCount aggregator. - * @type \Google\Cloud\Bigtable\V2\Type\Aggregate\Max $max - * Max aggregator. - * @type \Google\Cloud\Bigtable\V2\Type\Aggregate\Min $min - * Min aggregator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Type of the inputs that are accumulated by this `Aggregate`, which must - * specify a full encoding. - * Use `AddInput` mutations to accumulate new inputs. - * - * Generated from protobuf field .google.bigtable.v2.Type input_type = 1; - * @return \Google\Cloud\Bigtable\V2\Type|null - */ - public function getInputType() - { - return $this->input_type; - } - - public function hasInputType() - { - return isset($this->input_type); - } - - public function clearInputType() - { - unset($this->input_type); - } - - /** - * Type of the inputs that are accumulated by this `Aggregate`, which must - * specify a full encoding. - * Use `AddInput` mutations to accumulate new inputs. - * - * Generated from protobuf field .google.bigtable.v2.Type input_type = 1; - * @param \Google\Cloud\Bigtable\V2\Type $var - * @return $this - */ - public function setInputType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); - $this->input_type = $var; - - return $this; - } - - /** - * Output only. Type that holds the internal accumulator state for the - * `Aggregate`. This is a function of the `input_type` and `aggregator` - * chosen, and will always specify a full encoding. - * - * Generated from protobuf field .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Bigtable\V2\Type|null - */ - public function getStateType() - { - return $this->state_type; - } - - public function hasStateType() - { - return isset($this->state_type); - } - - public function clearStateType() - { - unset($this->state_type); - } - - /** - * Output only. Type that holds the internal accumulator state for the - * `Aggregate`. This is a function of the `input_type` and `aggregator` - * chosen, and will always specify a full encoding. - * - * Generated from protobuf field .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Bigtable\V2\Type $var - * @return $this - */ - public function setStateType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); - $this->state_type = $var; - - return $this; - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Sum sum = 4; - * @return \Google\Cloud\Bigtable\V2\Type\Aggregate\Sum|null - */ - public function getSum() - { - return $this->readOneof(4); - } - - public function hasSum() - { - return $this->hasOneof(4); - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Sum sum = 4; - * @param \Google\Cloud\Bigtable\V2\Type\Aggregate\Sum $var - * @return $this - */ - public function setSum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate\Sum::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * HyperLogLogPlusPlusUniqueCount aggregator. - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; - * @return \Google\Cloud\Bigtable\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount|null - */ - public function getHllppUniqueCount() - { - return $this->readOneof(5); - } - - public function hasHllppUniqueCount() - { - return $this->hasOneof(5); - } - - /** - * HyperLogLogPlusPlusUniqueCount aggregator. - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; - * @param \Google\Cloud\Bigtable\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount $var - * @return $this - */ - public function setHllppUniqueCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate\HyperLogLogPlusPlusUniqueCount::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Max aggregator. - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Max max = 6; - * @return \Google\Cloud\Bigtable\V2\Type\Aggregate\Max|null - */ - public function getMax() - { - return $this->readOneof(6); - } - - public function hasMax() - { - return $this->hasOneof(6); - } - - /** - * Max aggregator. - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Max max = 6; - * @param \Google\Cloud\Bigtable\V2\Type\Aggregate\Max $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate\Max::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Min aggregator. - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Min min = 7; - * @return \Google\Cloud\Bigtable\V2\Type\Aggregate\Min|null - */ - public function getMin() - { - return $this->readOneof(7); - } - - public function hasMin() - { - return $this->hasOneof(7); - } - - /** - * Min aggregator. - * - * Generated from protobuf field .google.bigtable.v2.Type.Aggregate.Min min = 7; - * @param \Google\Cloud\Bigtable\V2\Type\Aggregate\Min $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Aggregate\Min::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getAggregator() - { - return $this->whichOneof("aggregator"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aggregate::class, \Google\Cloud\Bigtable\V2\Type_Aggregate::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php deleted file mode 100644 index 4c4bfed012b3..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/HyperLogLogPlusPlusUniqueCount.php +++ /dev/null @@ -1,42 +0,0 @@ -google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount - */ -class HyperLogLogPlusPlusUniqueCount extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HyperLogLogPlusPlusUniqueCount::class, \Google\Cloud\Bigtable\V2\Type_Aggregate_HyperLogLogPlusPlusUniqueCount::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Max.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Max.php deleted file mode 100644 index eb735d381cdf..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Max.php +++ /dev/null @@ -1,38 +0,0 @@ -google.bigtable.v2.Type.Aggregate.Max - */ -class Max extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Max::class, \Google\Cloud\Bigtable\V2\Type_Aggregate_Max::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Min.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Min.php deleted file mode 100644 index 13500014fafb..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Min.php +++ /dev/null @@ -1,38 +0,0 @@ -google.bigtable.v2.Type.Aggregate.Min - */ -class Min extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Min::class, \Google\Cloud\Bigtable\V2\Type_Aggregate_Min::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Sum.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Sum.php deleted file mode 100644 index df53d9cbe95f..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Aggregate/Sum.php +++ /dev/null @@ -1,38 +0,0 @@ -google.bigtable.v2.Type.Aggregate.Sum - */ -class Sum extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Sum::class, \Google\Cloud\Bigtable\V2\Type_Aggregate_Sum::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes.php deleted file mode 100644 index d917db5a3ce1..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.v2.Type.Bytes - */ -class Bytes extends \Google\Protobuf\Internal\Message -{ - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; - */ - protected $encoding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding $encoding - * The encoding to use when converting to/from lower level types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; - * @return \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding|null - */ - public function getEncoding() - { - return $this->encoding; - } - - public function hasEncoding() - { - return isset($this->encoding); - } - - public function clearEncoding() - { - unset($this->encoding); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; - * @param \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding::class); - $this->encoding = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Bytes::class, \Google\Cloud\Bigtable\V2\Type_Bytes::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding.php deleted file mode 100644 index c42a574fe96a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.v2.Type.Bytes.Encoding - */ -class Encoding extends \Google\Protobuf\Internal\Message -{ - protected $encoding; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding\Raw $raw - * Use `Raw` encoding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Use `Raw` encoding. - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; - * @return \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding\Raw|null - */ - public function getRaw() - { - return $this->readOneof(1); - } - - public function hasRaw() - { - return $this->hasOneof(1); - } - - /** - * Use `Raw` encoding. - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; - * @param \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding\Raw $var - * @return $this - */ - public function setRaw($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Bytes\Encoding\Raw::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getEncoding() - { - return $this->whichOneof("encoding"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Encoding::class, \Google\Cloud\Bigtable\V2\Type_Bytes_Encoding::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding/Raw.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding/Raw.php deleted file mode 100644 index ac7f617bb59c..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Bytes/Encoding/Raw.php +++ /dev/null @@ -1,39 +0,0 @@ -google.bigtable.v2.Type.Bytes.Encoding.Raw - */ -class Raw extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Raw::class, \Google\Cloud\Bigtable\V2\Type_Bytes_Encoding_Raw::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Date.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Date.php deleted file mode 100644 index fdcf13439190..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Date.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.v2.Type.Date - */ -class Date extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Date::class, \Google\Cloud\Bigtable\V2\Type_Date::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float32.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float32.php deleted file mode 100644 index fb0d845917a3..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float32.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.v2.Type.Float32 - */ -class Float32 extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Float32::class, \Google\Cloud\Bigtable\V2\Type_Float32::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float64.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float64.php deleted file mode 100644 index d8e9770f447a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Float64.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.v2.Type.Float64 - */ -class Float64 extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Float64::class, \Google\Cloud\Bigtable\V2\Type_Float64::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64.php deleted file mode 100644 index f535202b8c73..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.v2.Type.Int64 - */ -class Int64 extends \Google\Protobuf\Internal\Message -{ - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - */ - protected $encoding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type\Int64\Encoding $encoding - * The encoding to use when converting to/from lower level types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - * @return \Google\Cloud\Bigtable\V2\Type\Int64\Encoding|null - */ - public function getEncoding() - { - return $this->encoding; - } - - public function hasEncoding() - { - return isset($this->encoding); - } - - public function clearEncoding() - { - unset($this->encoding); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - * @param \Google\Cloud\Bigtable\V2\Type\Int64\Encoding $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Int64\Encoding::class); - $this->encoding = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Int64::class, \Google\Cloud\Bigtable\V2\Type_Int64::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding.php deleted file mode 100644 index e9cf46b73553..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.v2.Type.Int64.Encoding - */ -class Encoding extends \Google\Protobuf\Internal\Message -{ - protected $encoding; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type\Int64\Encoding\BigEndianBytes $big_endian_bytes - * Use `BigEndianBytes` encoding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Use `BigEndianBytes` encoding. - * - * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * @return \Google\Cloud\Bigtable\V2\Type\Int64\Encoding\BigEndianBytes|null - */ - public function getBigEndianBytes() - { - return $this->readOneof(1); - } - - public function hasBigEndianBytes() - { - return $this->hasOneof(1); - } - - /** - * Use `BigEndianBytes` encoding. - * - * Generated from protobuf field .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * @param \Google\Cloud\Bigtable\V2\Type\Int64\Encoding\BigEndianBytes $var - * @return $this - */ - public function setBigEndianBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Int64\Encoding\BigEndianBytes::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getEncoding() - { - return $this->whichOneof("encoding"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Encoding::class, \Google\Cloud\Bigtable\V2\Type_Int64_Encoding::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding/BigEndianBytes.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding/BigEndianBytes.php deleted file mode 100644 index 50020d3b2248..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Int64/Encoding/BigEndianBytes.php +++ /dev/null @@ -1,87 +0,0 @@ -google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes - */ -class BigEndianBytes extends \Google\Protobuf\Internal\Message -{ - /** - * Deprecated: ignored if set. - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; - */ - protected $bytes_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type\Bytes $bytes_type - * Deprecated: ignored if set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Deprecated: ignored if set. - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; - * @return \Google\Cloud\Bigtable\V2\Type\Bytes|null - */ - public function getBytesType() - { - return $this->bytes_type; - } - - public function hasBytesType() - { - return isset($this->bytes_type); - } - - public function clearBytesType() - { - unset($this->bytes_type); - } - - /** - * Deprecated: ignored if set. - * - * Generated from protobuf field .google.bigtable.v2.Type.Bytes bytes_type = 1; - * @param \Google\Cloud\Bigtable\V2\Type\Bytes $var - * @return $this - */ - public function setBytesType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\Bytes::class); - $this->bytes_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigEndianBytes::class, \Google\Cloud\Bigtable\V2\Type_Int64_Encoding_BigEndianBytes::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Map.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Map.php deleted file mode 100644 index 3e1ca5948521..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Map.php +++ /dev/null @@ -1,134 +0,0 @@ -google.bigtable.v2.Type.Map - */ -class Map extends \Google\Protobuf\Internal\Message -{ - /** - * The type of a map key. - * Only `Bytes`, `String`, and `Int64` are allowed as key types. - * - * Generated from protobuf field .google.bigtable.v2.Type key_type = 1; - */ - protected $key_type = null; - /** - * The type of the values in a map. - * - * Generated from protobuf field .google.bigtable.v2.Type value_type = 2; - */ - protected $value_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type $key_type - * The type of a map key. - * Only `Bytes`, `String`, and `Int64` are allowed as key types. - * @type \Google\Cloud\Bigtable\V2\Type $value_type - * The type of the values in a map. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The type of a map key. - * Only `Bytes`, `String`, and `Int64` are allowed as key types. - * - * Generated from protobuf field .google.bigtable.v2.Type key_type = 1; - * @return \Google\Cloud\Bigtable\V2\Type|null - */ - public function getKeyType() - { - return $this->key_type; - } - - public function hasKeyType() - { - return isset($this->key_type); - } - - public function clearKeyType() - { - unset($this->key_type); - } - - /** - * The type of a map key. - * Only `Bytes`, `String`, and `Int64` are allowed as key types. - * - * Generated from protobuf field .google.bigtable.v2.Type key_type = 1; - * @param \Google\Cloud\Bigtable\V2\Type $var - * @return $this - */ - public function setKeyType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); - $this->key_type = $var; - - return $this; - } - - /** - * The type of the values in a map. - * - * Generated from protobuf field .google.bigtable.v2.Type value_type = 2; - * @return \Google\Cloud\Bigtable\V2\Type|null - */ - public function getValueType() - { - return $this->value_type; - } - - public function hasValueType() - { - return isset($this->value_type); - } - - public function clearValueType() - { - unset($this->value_type); - } - - /** - * The type of the values in a map. - * - * Generated from protobuf field .google.bigtable.v2.Type value_type = 2; - * @param \Google\Cloud\Bigtable\V2\Type $var - * @return $this - */ - public function setValueType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); - $this->value_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Map::class, \Google\Cloud\Bigtable\V2\Type_Map::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBArray.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBArray.php deleted file mode 100644 index 71bbb92cadac..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBArray.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.v2.Type.Array - */ -class PBArray extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the elements in the array. This must not be `Array`. - * - * Generated from protobuf field .google.bigtable.v2.Type element_type = 1; - */ - protected $element_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type $element_type - * The type of the elements in the array. This must not be `Array`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The type of the elements in the array. This must not be `Array`. - * - * Generated from protobuf field .google.bigtable.v2.Type element_type = 1; - * @return \Google\Cloud\Bigtable\V2\Type|null - */ - public function getElementType() - { - return $this->element_type; - } - - public function hasElementType() - { - return isset($this->element_type); - } - - public function clearElementType() - { - unset($this->element_type); - } - - /** - * The type of the elements in the array. This must not be `Array`. - * - * Generated from protobuf field .google.bigtable.v2.Type element_type = 1; - * @param \Google\Cloud\Bigtable\V2\Type $var - * @return $this - */ - public function setElementType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); - $this->element_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBArray::class, \Google\Cloud\Bigtable\V2\Type_Array::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBBool.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBBool.php deleted file mode 100644 index 9de6cd8f9cab..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBBool.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.v2.Type.Bool - */ -class PBBool extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBBool::class, \Google\Cloud\Bigtable\V2\Type_Bool::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString.php deleted file mode 100644 index fbb2f0da8c4a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.v2.Type.String - */ -class PBString extends \Google\Protobuf\Internal\Message -{ - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding encoding = 1; - */ - protected $encoding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type\PBString\Encoding $encoding - * The encoding to use when converting to/from lower level types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding encoding = 1; - * @return \Google\Cloud\Bigtable\V2\Type\PBString\Encoding|null - */ - public function getEncoding() - { - return $this->encoding; - } - - public function hasEncoding() - { - return isset($this->encoding); - } - - public function clearEncoding() - { - unset($this->encoding); - } - - /** - * The encoding to use when converting to/from lower level types. - * - * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding encoding = 1; - * @param \Google\Cloud\Bigtable\V2\Type\PBString\Encoding $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBString\Encoding::class); - $this->encoding = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBString::class, \Google\Cloud\Bigtable\V2\Type_String::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding.php deleted file mode 100644 index a1c87729cc70..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding.php +++ /dev/null @@ -1,116 +0,0 @@ -google.bigtable.v2.Type.String.Encoding - */ -class Encoding extends \Google\Protobuf\Internal\Message -{ - protected $encoding; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Raw $utf8_raw - * Deprecated: if set, converts to an empty `utf8_bytes`. - * @type \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Bytes $utf8_bytes - * Use `Utf8Bytes` encoding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * Deprecated: if set, converts to an empty `utf8_bytes`. - * - * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; - * @return \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Raw|null - * @deprecated - */ - public function getUtf8Raw() - { - @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); - return $this->readOneof(1); - } - - public function hasUtf8Raw() - { - @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); - return $this->hasOneof(1); - } - - /** - * Deprecated: if set, converts to an empty `utf8_bytes`. - * - * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; - * @param \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Raw $var - * @return $this - * @deprecated - */ - public function setUtf8Raw($var) - { - @trigger_error('utf8_raw is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Raw::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Use `Utf8Bytes` encoding. - * - * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; - * @return \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Bytes|null - */ - public function getUtf8Bytes() - { - return $this->readOneof(2); - } - - public function hasUtf8Bytes() - { - return $this->hasOneof(2); - } - - /** - * Use `Utf8Bytes` encoding. - * - * Generated from protobuf field .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; - * @param \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Bytes $var - * @return $this - */ - public function setUtf8Bytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type\PBString\Encoding\Utf8Bytes::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getEncoding() - { - return $this->whichOneof("encoding"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Encoding::class, \Google\Cloud\Bigtable\V2\Type_String_Encoding::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Bytes.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Bytes.php deleted file mode 100644 index 998216c290b9..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Bytes.php +++ /dev/null @@ -1,42 +0,0 @@ -google.bigtable.v2.Type.String.Encoding.Utf8Bytes - */ -class Utf8Bytes extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Utf8Bytes::class, \Google\Cloud\Bigtable\V2\Type_String_Encoding_Utf8Bytes::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Raw.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Raw.php deleted file mode 100644 index 22a1bf75dcaa..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/PBString/Encoding/Utf8Raw.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.v2.Type.String.Encoding.Utf8Raw - */ -class Utf8Raw extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Utf8Raw::class, \Google\Cloud\Bigtable\V2\Type_String_Encoding_Utf8Raw::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct.php deleted file mode 100644 index 01b9fbc598fa..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct.php +++ /dev/null @@ -1,73 +0,0 @@ -google.bigtable.v2.Type.Struct - */ -class Struct extends \Google\Protobuf\Internal\Message -{ - /** - * The names and types of the fields in this struct. - * - * Generated from protobuf field repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $fields - * The names and types of the fields in this struct. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The names and types of the fields in this struct. - * - * Generated from protobuf field repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The names and types of the fields in this struct. - * - * Generated from protobuf field repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - * @param array<\Google\Cloud\Bigtable\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Type\Struct\Field::class); - $this->fields = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Struct::class, \Google\Cloud\Bigtable\V2\Type_Struct::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct/Field.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct/Field.php deleted file mode 100644 index 0aa221b2a746..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Struct/Field.php +++ /dev/null @@ -1,118 +0,0 @@ -google.bigtable.v2.Type.Struct.Field - */ -class Field extends \Google\Protobuf\Internal\Message -{ - /** - * The field name (optional). Fields without a `field_name` are considered - * anonymous and cannot be referenced by name. - * - * Generated from protobuf field string field_name = 1; - */ - protected $field_name = ''; - /** - * The type of values in this field. - * - * Generated from protobuf field .google.bigtable.v2.Type type = 2; - */ - protected $type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_name - * The field name (optional). Fields without a `field_name` are considered - * anonymous and cannot be referenced by name. - * @type \Google\Cloud\Bigtable\V2\Type $type - * The type of values in this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - - /** - * The field name (optional). Fields without a `field_name` are considered - * anonymous and cannot be referenced by name. - * - * Generated from protobuf field string field_name = 1; - * @return string - */ - public function getFieldName() - { - return $this->field_name; - } - - /** - * The field name (optional). Fields without a `field_name` are considered - * anonymous and cannot be referenced by name. - * - * Generated from protobuf field string field_name = 1; - * @param string $var - * @return $this - */ - public function setFieldName($var) - { - GPBUtil::checkString($var, True); - $this->field_name = $var; - - return $this; - } - - /** - * The type of values in this field. - * - * Generated from protobuf field .google.bigtable.v2.Type type = 2; - * @return \Google\Cloud\Bigtable\V2\Type|null - */ - public function getType() - { - return $this->type; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * The type of values in this field. - * - * Generated from protobuf field .google.bigtable.v2.Type type = 2; - * @param \Google\Cloud\Bigtable\V2\Type $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Field::class, \Google\Cloud\Bigtable\V2\Type_Struct_Field::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Timestamp.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Timestamp.php deleted file mode 100644 index 3c437f884597..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Type/Timestamp.php +++ /dev/null @@ -1,37 +0,0 @@ -google.bigtable.v2.Type.Timestamp - */ -class Timestamp extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Types::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Timestamp::class, \Google\Cloud\Bigtable\V2\Type_Timestamp::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Value.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Value.php deleted file mode 100644 index d35a8ede4c5b..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Value.php +++ /dev/null @@ -1,477 +0,0 @@ -google.bigtable.v2.Value - */ -class Value extends \Google\Protobuf\Internal\Message -{ - /** - * The verified `Type` of this `Value`, if it cannot be inferred. - * Read results will never specify the encoding for `type` since the value - * will already have been decoded by the server. Furthermore, the `type` will - * be omitted entirely if it can be inferred from a previous response. The - * exact semantics for inferring `type` will vary, and are therefore - * documented separately for each read method. - * When using composite types (Struct, Array, Map) only the outermost `Value` - * will specify the `type`. This top-level `type` will define the types for - * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. - * If a nested `Value` provides a `type` on write, the request will be - * rejected with INVALID_ARGUMENT. - * - * Generated from protobuf field .google.bigtable.v2.Type type = 7; - */ - protected $type = null; - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Type $type - * The verified `Type` of this `Value`, if it cannot be inferred. - * Read results will never specify the encoding for `type` since the value - * will already have been decoded by the server. Furthermore, the `type` will - * be omitted entirely if it can be inferred from a previous response. The - * exact semantics for inferring `type` will vary, and are therefore - * documented separately for each read method. - * When using composite types (Struct, Array, Map) only the outermost `Value` - * will specify the `type`. This top-level `type` will define the types for - * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. - * If a nested `Value` provides a `type` on write, the request will be - * rejected with INVALID_ARGUMENT. - * @type string $raw_value - * Represents a raw byte sequence with no type information. - * The `type` field must be omitted. - * @type int|string $raw_timestamp_micros - * Represents a raw cell timestamp with no type information. - * The `type` field must be omitted. - * @type string $bytes_value - * Represents a typed value transported as a byte sequence. - * @type string $string_value - * Represents a typed value transported as a string. - * @type int|string $int_value - * Represents a typed value transported as an integer. - * @type bool $bool_value - * Represents a typed value transported as a boolean. - * @type float $float_value - * Represents a typed value transported as a floating point number. - * @type \Google\Protobuf\Timestamp $timestamp_value - * Represents a typed value transported as a timestamp. - * @type \Google\Type\Date $date_value - * Represents a typed value transported as a date. - * @type \Google\Cloud\Bigtable\V2\ArrayValue $array_value - * Represents a typed value transported as a sequence of values. - * To differentiate between `Struct`, `Array`, and `Map`, the outermost - * `Value` must provide an explicit `type` on write. This `type` will - * apply recursively to the nested `Struct` fields, `Array` elements, - * or `Map` key/value pairs, which *must not* supply their own `type`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The verified `Type` of this `Value`, if it cannot be inferred. - * Read results will never specify the encoding for `type` since the value - * will already have been decoded by the server. Furthermore, the `type` will - * be omitted entirely if it can be inferred from a previous response. The - * exact semantics for inferring `type` will vary, and are therefore - * documented separately for each read method. - * When using composite types (Struct, Array, Map) only the outermost `Value` - * will specify the `type`. This top-level `type` will define the types for - * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. - * If a nested `Value` provides a `type` on write, the request will be - * rejected with INVALID_ARGUMENT. - * - * Generated from protobuf field .google.bigtable.v2.Type type = 7; - * @return \Google\Cloud\Bigtable\V2\Type|null - */ - public function getType() - { - return $this->type; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * The verified `Type` of this `Value`, if it cannot be inferred. - * Read results will never specify the encoding for `type` since the value - * will already have been decoded by the server. Furthermore, the `type` will - * be omitted entirely if it can be inferred from a previous response. The - * exact semantics for inferring `type` will vary, and are therefore - * documented separately for each read method. - * When using composite types (Struct, Array, Map) only the outermost `Value` - * will specify the `type`. This top-level `type` will define the types for - * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. - * If a nested `Value` provides a `type` on write, the request will be - * rejected with INVALID_ARGUMENT. - * - * Generated from protobuf field .google.bigtable.v2.Type type = 7; - * @param \Google\Cloud\Bigtable\V2\Type $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Represents a raw byte sequence with no type information. - * The `type` field must be omitted. - * - * Generated from protobuf field bytes raw_value = 8; - * @return string - */ - public function getRawValue() - { - return $this->readOneof(8); - } - - public function hasRawValue() - { - return $this->hasOneof(8); - } - - /** - * Represents a raw byte sequence with no type information. - * The `type` field must be omitted. - * - * Generated from protobuf field bytes raw_value = 8; - * @param string $var - * @return $this - */ - public function setRawValue($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Represents a raw cell timestamp with no type information. - * The `type` field must be omitted. - * - * Generated from protobuf field int64 raw_timestamp_micros = 9; - * @return int|string - */ - public function getRawTimestampMicros() - { - return $this->readOneof(9); - } - - public function hasRawTimestampMicros() - { - return $this->hasOneof(9); - } - - /** - * Represents a raw cell timestamp with no type information. - * The `type` field must be omitted. - * - * Generated from protobuf field int64 raw_timestamp_micros = 9; - * @param int|string $var - * @return $this - */ - public function setRawTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Represents a typed value transported as a byte sequence. - * - * Generated from protobuf field bytes bytes_value = 2; - * @return string - */ - public function getBytesValue() - { - return $this->readOneof(2); - } - - public function hasBytesValue() - { - return $this->hasOneof(2); - } - - /** - * Represents a typed value transported as a byte sequence. - * - * Generated from protobuf field bytes bytes_value = 2; - * @param string $var - * @return $this - */ - public function setBytesValue($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Represents a typed value transported as a string. - * - * Generated from protobuf field string string_value = 3; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(3); - } - - public function hasStringValue() - { - return $this->hasOneof(3); - } - - /** - * Represents a typed value transported as a string. - * - * Generated from protobuf field string string_value = 3; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Represents a typed value transported as an integer. - * - * Generated from protobuf field int64 int_value = 6; - * @return int|string - */ - public function getIntValue() - { - return $this->readOneof(6); - } - - public function hasIntValue() - { - return $this->hasOneof(6); - } - - /** - * Represents a typed value transported as an integer. - * - * Generated from protobuf field int64 int_value = 6; - * @param int|string $var - * @return $this - */ - public function setIntValue($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Represents a typed value transported as a boolean. - * - * Generated from protobuf field bool bool_value = 10; - * @return bool - */ - public function getBoolValue() - { - return $this->readOneof(10); - } - - public function hasBoolValue() - { - return $this->hasOneof(10); - } - - /** - * Represents a typed value transported as a boolean. - * - * Generated from protobuf field bool bool_value = 10; - * @param bool $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Represents a typed value transported as a floating point number. - * - * Generated from protobuf field double float_value = 11; - * @return float - */ - public function getFloatValue() - { - return $this->readOneof(11); - } - - public function hasFloatValue() - { - return $this->hasOneof(11); - } - - /** - * Represents a typed value transported as a floating point number. - * - * Generated from protobuf field double float_value = 11; - * @param float $var - * @return $this - */ - public function setFloatValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Represents a typed value transported as a timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 12; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimestampValue() - { - return $this->readOneof(12); - } - - public function hasTimestampValue() - { - return $this->hasOneof(12); - } - - /** - * Represents a typed value transported as a timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 12; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestampValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Represents a typed value transported as a date. - * - * Generated from protobuf field .google.type.Date date_value = 13; - * @return \Google\Type\Date|null - */ - public function getDateValue() - { - return $this->readOneof(13); - } - - public function hasDateValue() - { - return $this->hasOneof(13); - } - - /** - * Represents a typed value transported as a date. - * - * Generated from protobuf field .google.type.Date date_value = 13; - * @param \Google\Type\Date $var - * @return $this - */ - public function setDateValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Represents a typed value transported as a sequence of values. - * To differentiate between `Struct`, `Array`, and `Map`, the outermost - * `Value` must provide an explicit `type` on write. This `type` will - * apply recursively to the nested `Struct` fields, `Array` elements, - * or `Map` key/value pairs, which *must not* supply their own `type`. - * - * Generated from protobuf field .google.bigtable.v2.ArrayValue array_value = 4; - * @return \Google\Cloud\Bigtable\V2\ArrayValue|null - */ - public function getArrayValue() - { - return $this->readOneof(4); - } - - public function hasArrayValue() - { - return $this->hasOneof(4); - } - - /** - * Represents a typed value transported as a sequence of values. - * To differentiate between `Struct`, `Array`, and `Map`, the outermost - * `Value` must provide an explicit `type` on write. This `type` will - * apply recursively to the nested `Struct` fields, `Array` elements, - * or `Map` key/value pairs, which *must not* supply their own `type`. - * - * Generated from protobuf field .google.bigtable.v2.ArrayValue array_value = 4; - * @param \Google\Cloud\Bigtable\V2\ArrayValue $var - * @return $this - */ - public function setArrayValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ArrayValue::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php deleted file mode 100644 index a3dc913e427c..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php +++ /dev/null @@ -1,183 +0,0 @@ -google.bigtable.v2.ValueRange - */ -class ValueRange extends \Google\Protobuf\Internal\Message -{ - protected $start_value; - protected $end_value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $start_value_closed - * Used when giving an inclusive lower bound for the range. - * @type string $start_value_open - * Used when giving an exclusive lower bound for the range. - * @type string $end_value_closed - * Used when giving an inclusive upper bound for the range. - * @type string $end_value_open - * Used when giving an exclusive upper bound for the range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_value_closed = 1; - * @return string - */ - public function getStartValueClosed() - { - return $this->readOneof(1); - } - - public function hasStartValueClosed() - { - return $this->hasOneof(1); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_value_closed = 1; - * @param string $var - * @return $this - */ - public function setStartValueClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_value_open = 2; - * @return string - */ - public function getStartValueOpen() - { - return $this->readOneof(2); - } - - public function hasStartValueOpen() - { - return $this->hasOneof(2); - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_value_open = 2; - * @param string $var - * @return $this - */ - public function setStartValueOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_value_closed = 3; - * @return string - */ - public function getEndValueClosed() - { - return $this->readOneof(3); - } - - public function hasEndValueClosed() - { - return $this->hasOneof(3); - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_value_closed = 3; - * @param string $var - * @return $this - */ - public function setEndValueClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_value_open = 4; - * @return string - */ - public function getEndValueOpen() - { - return $this->readOneof(4); - } - - public function hasEndValueOpen() - { - return $this->hasOneof(4); - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_value_open = 4; - * @param string $var - * @return $this - */ - public function setEndValueOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getStartValue() - { - return $this->whichOneof("start_value"); - } - - /** - * @return string - */ - public function getEndValue() - { - return $this->whichOneof("end_value"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php deleted file mode 100644 index a82003186c39..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php +++ /dev/null @@ -1,79 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey The key of the row to which the conditional mutation should be - * applied. - */ -function check_and_mutate_row_sample(string $formattedTableName, string $rowKey): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $request = (new CheckAndMutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey); - - // Call the API and handle any network failures. - try { - /** @var CheckAndMutateRowResponse $response */ - $response = $bigtableClient->checkAndMutateRow($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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '...'; - - check_and_mutate_row_sample($formattedTableName, $rowKey); -} -// [END bigtable_v2_generated_Bigtable_CheckAndMutateRow_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/execute_query.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/execute_query.php deleted file mode 100644 index 166de231d987..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/execute_query.php +++ /dev/null @@ -1,83 +0,0 @@ -/instances/` - * Please see {@see BigtableClient::instanceName()} for help formatting this field. - * @param string $query The query string. - */ -function execute_query_sample(string $formattedInstanceName, string $query): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $params = []; - $request = (new ExecuteQueryRequest()) - ->setInstanceName($formattedInstanceName) - ->setQuery($query) - ->setParams($params); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->executeQuery($request); - - /** @var ExecuteQueryResponse $element */ - foreach ($stream->readAll() 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 -{ - $formattedInstanceName = BigtableClient::instanceName('[PROJECT]', '[INSTANCE]'); - $query = '[QUERY]'; - - execute_query_sample($formattedInstanceName, $query); -} -// [END bigtable_v2_generated_Bigtable_ExecuteQuery_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php deleted file mode 100644 index 9c2f00e074a3..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php +++ /dev/null @@ -1,82 +0,0 @@ -/instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - */ -function generate_initial_change_stream_partitions_sample(string $formattedTableName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $request = (new GenerateInitialChangeStreamPartitionsRequest()) - ->setTableName($formattedTableName); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->generateInitialChangeStreamPartitions($request); - - /** @var GenerateInitialChangeStreamPartitionsResponse $element */ - foreach ($stream->readAll() 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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - generate_initial_change_stream_partitions_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php deleted file mode 100644 index 68cd97f0b50e..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php +++ /dev/null @@ -1,82 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey The key of the row to which the mutation should be applied. - */ -function mutate_row_sample(string $formattedTableName, string $rowKey): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $mutations = [new Mutation()]; - $request = (new MutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setMutations($mutations); - - // Call the API and handle any network failures. - try { - /** @var MutateRowResponse $response */ - $response = $bigtableClient->mutateRow($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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '...'; - - mutate_row_sample($formattedTableName, $rowKey); -} -// [END bigtable_v2_generated_Bigtable_MutateRow_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php deleted file mode 100644 index de9db55dbba0..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php +++ /dev/null @@ -1,89 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - */ -function mutate_rows_sample(string $formattedTableName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $entriesMutations = [new Mutation()]; - $entry = (new Entry()) - ->setMutations($entriesMutations); - $entries = [$entry,]; - $request = (new MutateRowsRequest()) - ->setTableName($formattedTableName) - ->setEntries($entries); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->mutateRows($request); - - /** @var MutateRowsResponse $element */ - foreach ($stream->readAll() 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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - mutate_rows_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_MutateRows_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php deleted file mode 100644 index 314ad63bb531..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php +++ /dev/null @@ -1,74 +0,0 @@ -/instances/`. Please see - * {@see BigtableClient::instanceName()} for help formatting this field. - */ -function ping_and_warm_sample(string $formattedName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $request = (new PingAndWarmRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PingAndWarmResponse $response */ - $response = $bigtableClient->pingAndWarm($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 = BigtableClient::instanceName('[PROJECT]', '[INSTANCE]'); - - ping_and_warm_sample($formattedName); -} -// [END bigtable_v2_generated_Bigtable_PingAndWarm_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php deleted file mode 100644 index 243f166d9131..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php +++ /dev/null @@ -1,82 +0,0 @@ -/instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - */ -function read_change_stream_sample(string $formattedTableName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $request = (new ReadChangeStreamRequest()) - ->setTableName($formattedTableName); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->readChangeStream($request); - - /** @var ReadChangeStreamResponse $element */ - foreach ($stream->readAll() 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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - read_change_stream_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_ReadChangeStream_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php deleted file mode 100644 index 9c80a76b634e..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php +++ /dev/null @@ -1,86 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey The key of the row to which the read/modify/write rules should be - * applied. - */ -function read_modify_write_row_sample(string $formattedTableName, string $rowKey): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $rules = [new ReadModifyWriteRule()]; - $request = (new ReadModifyWriteRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setRules($rules); - - // Call the API and handle any network failures. - try { - /** @var ReadModifyWriteRowResponse $response */ - $response = $bigtableClient->readModifyWriteRow($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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '...'; - - read_modify_write_row_sample($formattedTableName, $rowKey); -} -// [END bigtable_v2_generated_Bigtable_ReadModifyWriteRow_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php deleted file mode 100644 index 1811a00c41f5..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php +++ /dev/null @@ -1,83 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - */ -function read_rows_sample(string $formattedTableName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $request = (new ReadRowsRequest()) - ->setTableName($formattedTableName); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->readRows($request); - - /** @var ReadRowsResponse $element */ - foreach ($stream->readAll() 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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - read_rows_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_ReadRows_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php deleted file mode 100644 index f15be7dc6929..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php +++ /dev/null @@ -1,82 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - */ -function sample_row_keys_sample(string $formattedTableName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare the request message. - $request = (new SampleRowKeysRequest()) - ->setTableName($formattedTableName); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->sampleRowKeys($request); - - /** @var SampleRowKeysResponse $element */ - foreach ($stream->readAll() 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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - sample_row_keys_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_SampleRowKeys_sync] diff --git a/owl-bot-staging/Bigtable/v2/src/V2/Client/BigtableClient.php b/owl-bot-staging/Bigtable/v2/src/V2/Client/BigtableClient.php deleted file mode 100644 index 24c6994dd499..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/Client/BigtableClient.php +++ /dev/null @@ -1,559 +0,0 @@ - checkAndMutateRowAsync(CheckAndMutateRowRequest $request, array $optionalArgs = []) - * @method PromiseInterface mutateRowAsync(MutateRowRequest $request, array $optionalArgs = []) - * @method PromiseInterface pingAndWarmAsync(PingAndWarmRequest $request, array $optionalArgs = []) - * @method PromiseInterface readModifyWriteRowAsync(ReadModifyWriteRowRequest $request, array $optionalArgs = []) - */ -final class BigtableClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.bigtable.v2.Bigtable'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigtable.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigtable.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigtable.data', - 'https://www.googleapis.com/auth/bigtable.data.readonly', - 'https://www.googleapis.com/auth/cloud-bigtable.data', - 'https://www.googleapis.com/auth/cloud-bigtable.data.readonly', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bigtable_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * authorized_view resource. - * - * @param string $project - * @param string $instance - * @param string $table - * @param string $authorizedView - * - * @return string The formatted authorized_view resource. - */ - public static function authorizedViewName(string $project, string $instance, string $table, string $authorizedView): string - { - return self::getPathTemplate('authorizedView')->render([ - 'project' => $project, - 'instance' => $instance, - 'table' => $table, - 'authorized_view' => $authorizedView, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $instance - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName(string $project, string $instance, string $table): string - { - return self::getPathTemplate('table')->render([ - 'project' => $project, - 'instance' => $instance, - 'table' => $table, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - authorizedView: projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view} - * - instance: projects/{project}/instances/{instance} - * - table: projects/{project}/instances/{instance}/tables/{table} - * - * 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. - * - * Setting the "BIGTABLE_EMULATOR_HOST" environment variable will automatically set - * the API Endpoint to the value specified in the variable, as well as ensure that - * empty credentials are used in the transport layer. - * - * @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 'bigtable.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 = []) - { - $options = $this->setDefaultEmulatorConfig($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); - } - - /** - * Mutates a row atomically based on the output of a predicate Reader filter. - * - * The async variant is {@see BigtableClient::checkAndMutateRowAsync()} . - * - * @example samples/V2/BigtableClient/check_and_mutate_row.php - * - * @param CheckAndMutateRowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CheckAndMutateRowResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function checkAndMutateRow(CheckAndMutateRowRequest $request, array $callOptions = []): CheckAndMutateRowResponse - { - return $this->startApiCall('CheckAndMutateRow', $request, $callOptions)->wait(); - } - - /** - * Executes a BTQL query against a particular Cloud Bigtable instance. - * - * @example samples/V2/BigtableClient/execute_query.php - * - * @param ExecuteQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function executeQuery(ExecuteQueryRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ExecuteQuery', $request, $callOptions); - } - - /** - * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Returns the current list of partitions that make up the table's - * change stream. The union of partitions will cover the entire keyspace. - * Partitions can be read with `ReadChangeStream`. - * - * @example samples/V2/BigtableClient/generate_initial_change_stream_partitions.php - * - * @param GenerateInitialChangeStreamPartitionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateInitialChangeStreamPartitions(GenerateInitialChangeStreamPartitionsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('GenerateInitialChangeStreamPartitions', $request, $callOptions); - } - - /** - * Mutates a row atomically. Cells already present in the row are left - * unchanged unless explicitly changed by `mutation`. - * - * The async variant is {@see BigtableClient::mutateRowAsync()} . - * - * @example samples/V2/BigtableClient/mutate_row.php - * - * @param MutateRowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MutateRowResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function mutateRow(MutateRowRequest $request, array $callOptions = []): MutateRowResponse - { - return $this->startApiCall('MutateRow', $request, $callOptions)->wait(); - } - - /** - * Mutates multiple rows in a batch. Each individual row is mutated - * atomically as in MutateRow, but the entire batch is not executed - * atomically. - * - * @example samples/V2/BigtableClient/mutate_rows.php - * - * @param MutateRowsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function mutateRows(MutateRowsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('MutateRows', $request, $callOptions); - } - - /** - * Warm up associated instance metadata for this connection. - * This call is not required but may be useful for connection keep-alive. - * - * The async variant is {@see BigtableClient::pingAndWarmAsync()} . - * - * @example samples/V2/BigtableClient/ping_and_warm.php - * - * @param PingAndWarmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PingAndWarmResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function pingAndWarm(PingAndWarmRequest $request, array $callOptions = []): PingAndWarmResponse - { - return $this->startApiCall('PingAndWarm', $request, $callOptions)->wait(); - } - - /** - * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Reads changes from a table's change stream. Changes will - * reflect both user-initiated mutations and mutations that are caused by - * garbage collection. - * - * @example samples/V2/BigtableClient/read_change_stream.php - * - * @param ReadChangeStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function readChangeStream(ReadChangeStreamRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ReadChangeStream', $request, $callOptions); - } - - /** - * Modifies a row atomically on the server. The method reads the latest - * existing timestamp and value from the specified columns and writes a new - * entry based on pre-defined read/modify/write rules. The new value for the - * timestamp is the greater of the existing timestamp or the current server - * time. The method returns the new contents of all modified cells. - * - * The async variant is {@see BigtableClient::readModifyWriteRowAsync()} . - * - * @example samples/V2/BigtableClient/read_modify_write_row.php - * - * @param ReadModifyWriteRowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReadModifyWriteRowResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function readModifyWriteRow(ReadModifyWriteRowRequest $request, array $callOptions = []): ReadModifyWriteRowResponse - { - return $this->startApiCall('ReadModifyWriteRow', $request, $callOptions)->wait(); - } - - /** - * Streams back the contents of all requested rows in key order, optionally - * applying the same Reader filter to each. Depending on their size, - * rows and cells may be broken up across multiple responses, but - * atomicity of each row will still be preserved. See the - * ReadRowsResponse documentation for details. - * - * @example samples/V2/BigtableClient/read_rows.php - * - * @param ReadRowsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function readRows(ReadRowsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ReadRows', $request, $callOptions); - } - - /** - * Returns a sample of row keys in the table. The returned row keys will - * delimit contiguous sections of the table of approximately equal size, - * which can be used to break up the data for distributed tasks like - * mapreduces. - * - * @example samples/V2/BigtableClient/sample_row_keys.php - * - * @param SampleRowKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function sampleRowKeys(SampleRowKeysRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('SampleRowKeys', $request, $callOptions); - } - - /** Configure the gapic configuration to use a service emulator. */ - private function setDefaultEmulatorConfig(array $options): array - { - $emulatorHost = getenv('BIGTABLE_EMULATOR_HOST'); - if (empty($emulatorHost)) { - return $options; - } - - if ($scheme = parse_url($emulatorHost, PHP_URL_SCHEME)) { - $search = $scheme . '://'; - $emulatorHost = str_replace($search, '', $emulatorHost); - } - - $options['apiEndpoint'] ??= $emulatorHost; - $options['transportConfig']['grpc']['stubOpts']['credentials'] ??= ChannelCredentials::createInsecure(); - $options['credentials'] ??= new InsecureCredentialsWrapper(); - return $options; - } -} diff --git a/owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json deleted file mode 100644 index fe7b9844ea9d..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.bigtable.v2", - "libraryPackage": "Google\\Cloud\\Bigtable\\V2", - "services": { - "Bigtable": { - "clients": { - "grpc": { - "libraryClient": "BigtableGapicClient", - "rpcs": { - "CheckAndMutateRow": { - "methods": [ - "checkAndMutateRow" - ] - }, - "ExecuteQuery": { - "methods": [ - "executeQuery" - ] - }, - "GenerateInitialChangeStreamPartitions": { - "methods": [ - "generateInitialChangeStreamPartitions" - ] - }, - "MutateRow": { - "methods": [ - "mutateRow" - ] - }, - "MutateRows": { - "methods": [ - "mutateRows" - ] - }, - "PingAndWarm": { - "methods": [ - "pingAndWarm" - ] - }, - "ReadChangeStream": { - "methods": [ - "readChangeStream" - ] - }, - "ReadModifyWriteRow": { - "methods": [ - "readModifyWriteRow" - ] - }, - "ReadRows": { - "methods": [ - "readRows" - ] - }, - "SampleRowKeys": { - "methods": [ - "sampleRowKeys" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json deleted file mode 100644 index ee5dae96485d..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "interfaces": { - "google.bigtable.v2.Bigtable": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CheckAndMutateRow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExecuteQuery": { - "timeout_millis": 60000 - }, - "GenerateInitialChangeStreamPartitions": { - "timeout_millis": 60000 - }, - "MutateRow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "MutateRows": { - "timeout_millis": 60000 - }, - "PingAndWarm": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ReadChangeStream": { - "timeout_millis": 60000 - }, - "ReadModifyWriteRow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ReadRows": { - "timeout_millis": 60000 - }, - "SampleRowKeys": { - "timeout_millis": 60000 - } - } - } - } -} diff --git a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php deleted file mode 100644 index 77b7d119b420..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php +++ /dev/null @@ -1,297 +0,0 @@ - [ - 'google.bigtable.v2.Bigtable' => [ - 'CheckAndMutateRow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\CheckAndMutateRowResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - [ - 'keyName' => 'authorized_view_name', - 'fieldAccessors' => [ - 'getAuthorizedViewName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', - ], - ], - ], - ], - 'ExecuteQuery' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\ExecuteQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getInstanceName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - ], - ], - 'GenerateInitialChangeStreamPartitions' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\GenerateInitialChangeStreamPartitionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - ], - ], - ], - 'MutateRow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\MutateRowResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - [ - 'keyName' => 'authorized_view_name', - 'fieldAccessors' => [ - 'getAuthorizedViewName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', - ], - ], - ], - ], - 'MutateRows' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\MutateRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - [ - 'keyName' => 'authorized_view_name', - 'fieldAccessors' => [ - 'getAuthorizedViewName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', - ], - ], - ], - ], - 'PingAndWarm' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\PingAndWarmResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - ], - ], - 'ReadChangeStream' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\ReadChangeStreamResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - ], - ], - ], - 'ReadModifyWriteRow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\ReadModifyWriteRowResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - [ - 'keyName' => 'authorized_view_name', - 'fieldAccessors' => [ - 'getAuthorizedViewName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', - ], - ], - ], - ], - 'ReadRows' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\ReadRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - [ - 'keyName' => 'authorized_view_name', - 'fieldAccessors' => [ - 'getAuthorizedViewName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', - ], - ], - ], - ], - 'SampleRowKeys' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\SampleRowKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - [ - 'keyName' => 'authorized_view_name', - 'fieldAccessors' => [ - 'getAuthorizedViewName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', - ], - ], - ], - ], - 'templateMap' => [ - 'authorizedView' => 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}', - 'instance' => 'projects/{project}/instances/{instance}', - 'table' => 'projects/{project}/instances/{instance}/tables/{table}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php deleted file mode 100644 index 33dbd11ee56e..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php +++ /dev/null @@ -1,219 +0,0 @@ - [ - 'google.bigtable.v2.Bigtable' => [ - 'CheckAndMutateRow' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'authorized_view_name' => [ - 'getters' => [ - 'getAuthorizedViewName', - ], - ], - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'ExecuteQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{instance_name=projects/*/instances/*}:executeQuery', - 'body' => '*', - 'placeholders' => [ - 'instance_name' => [ - 'getters' => [ - 'getInstanceName', - ], - ], - ], - ], - 'GenerateInitialChangeStreamPartitions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions', - 'body' => '*', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'MutateRow' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'authorized_view_name' => [ - 'getters' => [ - 'getAuthorizedViewName', - ], - ], - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'MutateRows' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'authorized_view_name' => [ - 'getters' => [ - 'getAuthorizedViewName', - ], - ], - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'PingAndWarm' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*}:ping', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ReadChangeStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream', - 'body' => '*', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'ReadModifyWriteRow' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'authorized_view_name' => [ - 'getters' => [ - 'getAuthorizedViewName', - ], - ], - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'ReadRows' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readRows', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'authorized_view_name' => [ - 'getters' => [ - 'getAuthorizedViewName', - ], - ], - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'SampleRowKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys', - ], - ], - 'placeholders' => [ - 'authorized_view_name' => [ - 'getters' => [ - 'getAuthorizedViewName', - ], - ], - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php b/owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php deleted file mode 100644 index 087592d15bce..000000000000 --- a/owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php +++ /dev/null @@ -1,881 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigtableClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigtableClient($options); - } - - /** @test */ - public function checkAndMutateRowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $predicateMatched = true; - $expectedResponse = new CheckAndMutateRowResponse(); - $expectedResponse->setPredicateMatched($predicateMatched); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $request = (new CheckAndMutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey); - $response = $gapicClient->checkAndMutateRow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/CheckAndMutateRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkAndMutateRowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $request = (new CheckAndMutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey); - try { - $gapicClient->checkAndMutateRow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executeQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ExecuteQueryResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ExecuteQueryResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ExecuteQueryResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedInstanceName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $query = 'query107944136'; - $paramsValue = new Value(); - $params = [ - 'paramsKey' => $paramsValue, - ]; - $request = (new ExecuteQueryRequest()) - ->setInstanceName($formattedInstanceName) - ->setQuery($query) - ->setParams($params); - $serverStream = $gapicClient->executeQuery($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/ExecuteQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getInstanceName(); - $this->assertProtobufEquals($formattedInstanceName, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $actualValue = $actualRequestObject->getParams(); - $this->assertProtobufEquals($params, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executeQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $formattedInstanceName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $query = 'query107944136'; - $paramsValue = new Value(); - $params = [ - 'paramsKey' => $paramsValue, - ]; - $request = (new ExecuteQueryRequest()) - ->setInstanceName($formattedInstanceName) - ->setQuery($query) - ->setParams($params); - $serverStream = $gapicClient->executeQuery($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateInitialChangeStreamPartitionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateInitialChangeStreamPartitionsResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new GenerateInitialChangeStreamPartitionsResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new GenerateInitialChangeStreamPartitionsResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GenerateInitialChangeStreamPartitionsRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->generateInitialChangeStreamPartitions($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/GenerateInitialChangeStreamPartitions', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateInitialChangeStreamPartitionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GenerateInitialChangeStreamPartitionsRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->generateInitialChangeStreamPartitions($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mutateRowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new MutateRowResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $mutations = []; - $request = (new MutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setMutations($mutations); - $response = $gapicClient->mutateRow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/MutateRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $actualValue = $actualRequestObject->getMutations(); - $this->assertProtobufEquals($mutations, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mutateRowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $mutations = []; - $request = (new MutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setMutations($mutations); - try { - $gapicClient->mutateRow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mutateRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new MutateRowsResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new MutateRowsResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new MutateRowsResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $entries = []; - $request = (new MutateRowsRequest()) - ->setTableName($formattedTableName) - ->setEntries($entries); - $serverStream = $gapicClient->mutateRows($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/MutateRows', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getEntries(); - $this->assertProtobufEquals($entries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mutateRowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $entries = []; - $request = (new MutateRowsRequest()) - ->setTableName($formattedTableName) - ->setEntries($entries); - $serverStream = $gapicClient->mutateRows($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pingAndWarmTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new PingAndWarmResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new PingAndWarmRequest()) - ->setName($formattedName); - $response = $gapicClient->pingAndWarm($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/PingAndWarm', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pingAndWarmExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new PingAndWarmRequest()) - ->setName($formattedName); - try { - $gapicClient->pingAndWarm($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readChangeStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReadChangeStreamResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ReadChangeStreamResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ReadChangeStreamResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ReadChangeStreamRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->readChangeStream($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/ReadChangeStream', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readChangeStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ReadChangeStreamRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->readChangeStream($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readModifyWriteRowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReadModifyWriteRowResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $rules = []; - $request = (new ReadModifyWriteRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setRules($rules); - $response = $gapicClient->readModifyWriteRow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/ReadModifyWriteRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $actualValue = $actualRequestObject->getRules(); - $this->assertProtobufEquals($rules, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readModifyWriteRowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $rules = []; - $request = (new ReadModifyWriteRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setRules($rules); - try { - $gapicClient->readModifyWriteRow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $lastScannedRowKey = '-126'; - $expectedResponse = new ReadRowsResponse(); - $expectedResponse->setLastScannedRowKey($lastScannedRowKey); - $transport->addResponse($expectedResponse); - $lastScannedRowKey2 = '-75'; - $expectedResponse2 = new ReadRowsResponse(); - $expectedResponse2->setLastScannedRowKey($lastScannedRowKey2); - $transport->addResponse($expectedResponse2); - $lastScannedRowKey3 = '-74'; - $expectedResponse3 = new ReadRowsResponse(); - $expectedResponse3->setLastScannedRowKey($lastScannedRowKey3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ReadRowsRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->readRows($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/ReadRows', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readRowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ReadRowsRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->readRows($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sampleRowKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $rowKey = '122'; - $offsetBytes = 889884095; - $expectedResponse = new SampleRowKeysResponse(); - $expectedResponse->setRowKey($rowKey); - $expectedResponse->setOffsetBytes($offsetBytes); - $transport->addResponse($expectedResponse); - $rowKey2 = '-83'; - $offsetBytes2 = 480126386; - $expectedResponse2 = new SampleRowKeysResponse(); - $expectedResponse2->setRowKey($rowKey2); - $expectedResponse2->setOffsetBytes($offsetBytes2); - $transport->addResponse($expectedResponse2); - $rowKey3 = '-82'; - $offsetBytes3 = 480126387; - $expectedResponse3 = new SampleRowKeysResponse(); - $expectedResponse3->setRowKey($rowKey3); - $expectedResponse3->setOffsetBytes($offsetBytes3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new SampleRowKeysRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->sampleRowKeys($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/SampleRowKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sampleRowKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new SampleRowKeysRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->sampleRowKeys($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkAndMutateRowAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $predicateMatched = true; - $expectedResponse = new CheckAndMutateRowResponse(); - $expectedResponse->setPredicateMatched($predicateMatched); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $request = (new CheckAndMutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey); - $response = $gapicClient->checkAndMutateRowAsync($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.bigtable.v2.Bigtable/CheckAndMutateRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Billing/v1/proto/src/GPBMetadata/Google/Cloud/Billing/V1/CloudBilling.php b/owl-bot-staging/Billing/v1/proto/src/GPBMetadata/Google/Cloud/Billing/V1/CloudBilling.php deleted file mode 100644 index f20152be253e5205f20a09485a5998d67409ccb8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5856 zcmcIo%WoS+7-yXlnrYOMN!q$jNVnTU(!{YFr-ia@+OE?!1W^*TDTiRmTH9l1>3VnB zU8kf`1VSKH;#hIxLJ!=KkbpCsx$wFm9}ov5ME``In3l1D$W~oc6D!-IyNN{0HeIu7>SCo;uOnNmnoUd7k)0F8>#O3MtLx&8>nrQ0 zFsoy>>?)GQhG{l*l&|V$tCp{5x~>_G{MNkpq0Bzys9XRHwTT={ts-%Gt#}K$YE5<3 z(lQlMS|TD!MNdTOt@%p;RCU#HM0&u!gB>8^e^#raYgN&4RTux9(VVhoXs)K}+5>FN zqF7gT2VntW+Iq{Vx|(T-gkjaFqUp1uCzH^gu}p0IqR26=5r1G`lvWHE*@mi@t|O;v zYnE%;YnW7)8_4Z=k$jmx%hVEaT3wv>Fv@ZWE#%iOiZ*gvwsDE#CIWUlf0ZIU zrdV1@F$|M}Zl5X=;;{E&eH6 z)ZOen(|g`?#*3d;H?9(RJl2S^)83!*SRR4n|V3_Mk` zV1`=DjrDY5bDSLRK>2`#5pck?kdaPd2?vV!M?S^V-54=jv z@A&__%ll?L|ICqqio)UE57N&9fH;BQK~=Ztwa^u#ZbIxUpSP*6jst)LMhMGVjXH72 zbK(RT3*h!Ua{_P-Wn`!o9o488y#UB}o+xX;OIao(7YJemxJiZsJB^c#YQ z!C+m}agL?Eoa^Qk%`xIxLD~l6k(wL}w`~L!@O;4W4%Rp@eW*~HVr~p|gB*)8^9no; zju_}Yw;TjWbT8Qm5BXjOZsv_{SXEXWq%sqzCMKp}*KSglG@}IRM*)oAweXOSQ6B0A zNn;2X!E+oo(VG}{9vo^>fMwFPXbcY(GTiAnE9v;pbtZ!JPyjEGSccP?d-T5>)suR} ztYGTVRFgguz+@a0mRT!cj8#^r1!}mmSa!{FJAzSawX$klqI;y)=r~5^8iQ7-zhfC`pW$z81iVTjtjPmd5J<)^JnP z3_2fh5!0#URnkT3u>v^PkH=PhW2W%=C>UNMTQw_v_?ZAkLJbwp$EHDumc=yFcVCib z+X|gPAO8C1qtqmvAWOy$8A*$*<*^3l-yOD!gYK#}GMgK%6#)RmzaK=v`5JxziR)u>5;*1-MYMn6NtSEBs zjQ#_5xvdP7_+(jMr7kE<750pr%)2oBDFw!&=FJ|sqsWuv{tXANv!O8TZRHqqGvCCr zUbLuDUkFlEVCA5cjjK|kNQVV1N(n+AVu#-e;8=8{hcEA$WAM|N>s*9Ne^c5`Kn|~KTI&S2^i?NX7 zSpF62x7*4IT8Ru~&j_a({Ay-@Q{>1E0DdBXVeH_}?HWqlD0~IXZO!NWhaCRV0F8IU zmaesxgM5-xTzNQ0UCcj5^m_7e(pCN`MsvsiA&AC*xDT4waUbA{v)+A`f+|S+gK~Tr zWMKw=k8f4$crX*B$Zl$mLmpb-bifZ`5{~g~AC#=J?zWY&F7B>23jU(Bu&+nm5Kv;m z-`Irk>H-TKSZMbP6LVwwA0k^6v?ck{Gd%C)Cf=wp#EsYBO=?_t1qx5qxZQyY%X};R zpo~+Cm^x-9e@gg8c_eJQuI0%2{Qdj)1E+blkkb1&_!w;uW@dTeev6h+ZfenL;3T|P|Pkzv;ti@US4Gv9pk?e6Lq)}95o zg%UA{t+=EqGSuV`)0EML}4r3Y*oMP+Tk5ZsAhL^lX*n zgtlq6b&^qa(`#lLnyza`JJVhE2V_-o72Rx$%rAhUbckaqDiKOs`3>SKO`NZnn2UOW zx~S)U7xmrc6#!LN97kXi1>Y0A0s;Rluc2$I;JAv5|K>GE)(p+n6kYoUlX)bx6x|`{ z;G}KKGgMbI4S_DG8Y)@1EBHRC?Yw1T@{fctrY(vGVo@&}F0lk1nI&{%*VL{i3;ht~Jx<>S7p6n@I&9u+AbejZ>IdhN^_B9Pz<0>8N>^s(a z7O8KT2I+lx4Xg9g=UPxzso9K*xQ={Zh+wBhxC6hY;Ql#?&d>VBBI^n<=nApBJQqx4 z6idSnp#|_;WA0|)o=&tV%5o!sIWV{qGq3|JkF8}*hGfmSAz*<)xT}k(WI7ZTeD09&~=-bva7r_4YSirjj~|- zyDky47TD$r@1-x{=Bel+de=`Pn?V36(EHv&x&xyT09ed0)+43%NrCW$)RS9EN7H)& zGcLnKG|{$A&kBlwEb<(sO=QYER)(?kw+Tqb;mN`T!LtTMxr=tlT*km;b}j@rq_r67 z06z&Mj@RiZSX-Z(>%fQgAulbA#R-{^%-#zf9q&dl2%{LS;PWu0wA)yFrl@|cefBK$ z^&%ZEVD%OtrFyna47De#rqLxf4MwKtEV7AP;L>jsFnx0G2rLgzrl1W|FcsF}xu>x1 zVi|LM8OB|W*rdrEI|w*seL zU}#M$SDyM#H>#Vpuka(0{+WYhOr!YEV32h`m5_<--M-+&)`&H%DsA#mgcDSR(~n`0 zP0YYl?dewWSegLCrAjp~RWP7&7)3}B5d2EuSvIlpq*5!((bzzG6)sjZ$KCPIIA@zY z_wbHEscuoda_}C>crrv!LN?@@`^50&CauEE(bbNHX9eN2FdAwtuBHts^vyTenw~iZ zd5QF9IvLyKJqMF)7nJHSz7-g@6qJ@gAM*GAk`n()AD``n74b}GO~zD~3g_u6y9lGi zX!@E=8F;$&CHN>Nd(A-Zk0MIN<2a&BG16bd)M2gxn)hIk9#a95*ZL!gXIwuNvwsf2 zc!9nwf(HcunuGCp@%Y8Qj^k!Q1?HB{Xzk~ao_!}>`0njLZxR#yIDHm{^x%KsU^L8_ z?|-<2CgJw|`{&Ry*m~)m6p)1laD%@_19;{0=TR6)=H3Cj49xw;{VrWS}5 z>3H?on_`Q5_Ng!W;e`;dp=~pIy<$!XRFH+$Sc!i9lo%;g)(W*s>6gT8iM?7y=3UJD kuU2t)xiQS{D-Z5OPl!eTofmr+_I(mEOaJM100#j70s2@5asU7T diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo.php deleted file mode 100644 index d8930f249f8d..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.billing.v1.AggregationInfo - */ -class AggregationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1; - */ - protected $aggregation_level = 0; - /** - * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2; - */ - protected $aggregation_interval = 0; - /** - * The number of intervals to aggregate over. - * Example: If aggregation_level is "DAILY" and aggregation_count is 14, - * aggregation will be over 14 days. - * - * Generated from protobuf field int32 aggregation_count = 3; - */ - protected $aggregation_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $aggregation_level - * @type int $aggregation_interval - * @type int $aggregation_count - * The number of intervals to aggregate over. - * Example: If aggregation_level is "DAILY" and aggregation_count is 14, - * aggregation will be over 14 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1; - * @return int - */ - public function getAggregationLevel() - { - return $this->aggregation_level; - } - - /** - * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1; - * @param int $var - * @return $this - */ - public function setAggregationLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Billing\V1\AggregationInfo\AggregationLevel::class); - $this->aggregation_level = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2; - * @return int - */ - public function getAggregationInterval() - { - return $this->aggregation_interval; - } - - /** - * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2; - * @param int $var - * @return $this - */ - public function setAggregationInterval($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Billing\V1\AggregationInfo\AggregationInterval::class); - $this->aggregation_interval = $var; - - return $this; - } - - /** - * The number of intervals to aggregate over. - * Example: If aggregation_level is "DAILY" and aggregation_count is 14, - * aggregation will be over 14 days. - * - * Generated from protobuf field int32 aggregation_count = 3; - * @return int - */ - public function getAggregationCount() - { - return $this->aggregation_count; - } - - /** - * The number of intervals to aggregate over. - * Example: If aggregation_level is "DAILY" and aggregation_count is 14, - * aggregation will be over 14 days. - * - * Generated from protobuf field int32 aggregation_count = 3; - * @param int $var - * @return $this - */ - public function setAggregationCount($var) - { - GPBUtil::checkInt32($var); - $this->aggregation_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationInterval.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationInterval.php deleted file mode 100644 index f2b1053e1ddd..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationInterval.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.billing.v1.AggregationInfo.AggregationInterval - */ -class AggregationInterval -{ - /** - * Generated from protobuf enum AGGREGATION_INTERVAL_UNSPECIFIED = 0; - */ - const AGGREGATION_INTERVAL_UNSPECIFIED = 0; - /** - * Generated from protobuf enum DAILY = 1; - */ - const DAILY = 1; - /** - * Generated from protobuf enum MONTHLY = 2; - */ - const MONTHLY = 2; - - private static $valueToName = [ - self::AGGREGATION_INTERVAL_UNSPECIFIED => 'AGGREGATION_INTERVAL_UNSPECIFIED', - self::DAILY => 'DAILY', - self::MONTHLY => 'MONTHLY', - ]; - - 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(AggregationInterval::class, \Google\Cloud\Billing\V1\AggregationInfo_AggregationInterval::class); - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationLevel.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationLevel.php deleted file mode 100644 index f1a3ae2babba..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/AggregationInfo/AggregationLevel.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.billing.v1.AggregationInfo.AggregationLevel - */ -class AggregationLevel -{ - /** - * Generated from protobuf enum AGGREGATION_LEVEL_UNSPECIFIED = 0; - */ - const AGGREGATION_LEVEL_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ACCOUNT = 1; - */ - const ACCOUNT = 1; - /** - * Generated from protobuf enum PROJECT = 2; - */ - const PROJECT = 2; - - private static $valueToName = [ - self::AGGREGATION_LEVEL_UNSPECIFIED => 'AGGREGATION_LEVEL_UNSPECIFIED', - self::ACCOUNT => 'ACCOUNT', - self::PROJECT => 'PROJECT', - ]; - - 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(AggregationLevel::class, \Google\Cloud\Billing\V1\AggregationInfo_AggregationLevel::class); - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/BillingAccount.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/BillingAccount.php deleted file mode 100644 index b0a029317d58..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/BillingAccount.php +++ /dev/null @@ -1,277 +0,0 @@ -google.cloud.billing.v1.BillingAccount - */ -class BillingAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the billing account. The resource name - * has the form `billingAccounts/{billing_account_id}`. For example, - * `billingAccounts/012345-567890-ABCDEF` would be the resource name for - * billing account `012345-567890-ABCDEF`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. True if the billing account is open, and will therefore be - * charged for any usage on associated projects. False if the billing account - * is closed, and therefore projects associated with it are unable to use paid - * services. - * - * Generated from protobuf field bool open = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $open = false; - /** - * The display name given to the billing account, such as `My Billing - * Account`. This name is displayed in the Google Cloud Console. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * If this account is a - * [subaccount](https://cloud.google.com/billing/docs/concepts), then this - * will be the resource name of the parent billing account that it is being - * resold through. - * Otherwise this will be empty. - * - * Generated from protobuf field string master_billing_account = 4; - */ - protected $master_billing_account = ''; - /** - * Output only. The billing account's parent resource identifier. - * Use the `MoveBillingAccount` method to update the account's parent resource - * if it is a organization. - * Format: - * - `organizations/{organization_id}`, for example, - * `organizations/12345678` - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * Generated from protobuf field string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the billing account. The resource name - * has the form `billingAccounts/{billing_account_id}`. For example, - * `billingAccounts/012345-567890-ABCDEF` would be the resource name for - * billing account `012345-567890-ABCDEF`. - * @type bool $open - * Output only. True if the billing account is open, and will therefore be - * charged for any usage on associated projects. False if the billing account - * is closed, and therefore projects associated with it are unable to use paid - * services. - * @type string $display_name - * The display name given to the billing account, such as `My Billing - * Account`. This name is displayed in the Google Cloud Console. - * @type string $master_billing_account - * If this account is a - * [subaccount](https://cloud.google.com/billing/docs/concepts), then this - * will be the resource name of the parent billing account that it is being - * resold through. - * Otherwise this will be empty. - * @type string $parent - * Output only. The billing account's parent resource identifier. - * Use the `MoveBillingAccount` method to update the account's parent resource - * if it is a organization. - * Format: - * - `organizations/{organization_id}`, for example, - * `organizations/12345678` - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the billing account. The resource name - * has the form `billingAccounts/{billing_account_id}`. For example, - * `billingAccounts/012345-567890-ABCDEF` would be the resource name for - * billing account `012345-567890-ABCDEF`. - * - * 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 billing account. The resource name - * has the form `billingAccounts/{billing_account_id}`. For example, - * `billingAccounts/012345-567890-ABCDEF` would be the resource name for - * billing account `012345-567890-ABCDEF`. - * - * 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. True if the billing account is open, and will therefore be - * charged for any usage on associated projects. False if the billing account - * is closed, and therefore projects associated with it are unable to use paid - * services. - * - * Generated from protobuf field bool open = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getOpen() - { - return $this->open; - } - - /** - * Output only. True if the billing account is open, and will therefore be - * charged for any usage on associated projects. False if the billing account - * is closed, and therefore projects associated with it are unable to use paid - * services. - * - * Generated from protobuf field bool open = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setOpen($var) - { - GPBUtil::checkBool($var); - $this->open = $var; - - return $this; - } - - /** - * The display name given to the billing account, such as `My Billing - * Account`. This name is displayed in the Google Cloud Console. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name given to the billing account, such as `My Billing - * Account`. This name is displayed in the Google Cloud Console. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * If this account is a - * [subaccount](https://cloud.google.com/billing/docs/concepts), then this - * will be the resource name of the parent billing account that it is being - * resold through. - * Otherwise this will be empty. - * - * Generated from protobuf field string master_billing_account = 4; - * @return string - */ - public function getMasterBillingAccount() - { - return $this->master_billing_account; - } - - /** - * If this account is a - * [subaccount](https://cloud.google.com/billing/docs/concepts), then this - * will be the resource name of the parent billing account that it is being - * resold through. - * Otherwise this will be empty. - * - * Generated from protobuf field string master_billing_account = 4; - * @param string $var - * @return $this - */ - public function setMasterBillingAccount($var) - { - GPBUtil::checkString($var, True); - $this->master_billing_account = $var; - - return $this; - } - - /** - * Output only. The billing account's parent resource identifier. - * Use the `MoveBillingAccount` method to update the account's parent resource - * if it is a organization. - * Format: - * - `organizations/{organization_id}`, for example, - * `organizations/12345678` - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * Generated from protobuf field string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Output only. The billing account's parent resource identifier. - * Use the `MoveBillingAccount` method to update the account's parent resource - * if it is a organization. - * Format: - * - `organizations/{organization_id}`, for example, - * `organizations/12345678` - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * Generated from protobuf field string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Category.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Category.php deleted file mode 100644 index 85efb2d9828d..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Category.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.billing.v1.Category - */ -class Category extends \Google\Protobuf\Internal\Message -{ - /** - * The display name of the service this SKU belongs to. - * - * Generated from protobuf field string service_display_name = 1; - */ - protected $service_display_name = ''; - /** - * The type of product the SKU refers to. - * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. - * - * Generated from protobuf field string resource_family = 2; - */ - protected $resource_family = ''; - /** - * A group classification for related SKUs. - * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. - * - * Generated from protobuf field string resource_group = 3; - */ - protected $resource_group = ''; - /** - * Represents how the SKU is consumed. - * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. - * - * Generated from protobuf field string usage_type = 4; - */ - protected $usage_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_display_name - * The display name of the service this SKU belongs to. - * @type string $resource_family - * The type of product the SKU refers to. - * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. - * @type string $resource_group - * A group classification for related SKUs. - * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. - * @type string $usage_type - * Represents how the SKU is consumed. - * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * The display name of the service this SKU belongs to. - * - * Generated from protobuf field string service_display_name = 1; - * @return string - */ - public function getServiceDisplayName() - { - return $this->service_display_name; - } - - /** - * The display name of the service this SKU belongs to. - * - * Generated from protobuf field string service_display_name = 1; - * @param string $var - * @return $this - */ - public function setServiceDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->service_display_name = $var; - - return $this; - } - - /** - * The type of product the SKU refers to. - * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. - * - * Generated from protobuf field string resource_family = 2; - * @return string - */ - public function getResourceFamily() - { - return $this->resource_family; - } - - /** - * The type of product the SKU refers to. - * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. - * - * Generated from protobuf field string resource_family = 2; - * @param string $var - * @return $this - */ - public function setResourceFamily($var) - { - GPBUtil::checkString($var, True); - $this->resource_family = $var; - - return $this; - } - - /** - * A group classification for related SKUs. - * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. - * - * Generated from protobuf field string resource_group = 3; - * @return string - */ - public function getResourceGroup() - { - return $this->resource_group; - } - - /** - * A group classification for related SKUs. - * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. - * - * Generated from protobuf field string resource_group = 3; - * @param string $var - * @return $this - */ - public function setResourceGroup($var) - { - GPBUtil::checkString($var, True); - $this->resource_group = $var; - - return $this; - } - - /** - * Represents how the SKU is consumed. - * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. - * - * Generated from protobuf field string usage_type = 4; - * @return string - */ - public function getUsageType() - { - return $this->usage_type; - } - - /** - * Represents how the SKU is consumed. - * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. - * - * Generated from protobuf field string usage_type = 4; - * @param string $var - * @return $this - */ - public function setUsageType($var) - { - GPBUtil::checkString($var, True); - $this->usage_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/CreateBillingAccountRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/CreateBillingAccountRequest.php deleted file mode 100644 index f4908a58e921..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/CreateBillingAccountRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.billing.v1.CreateBillingAccountRequest - */ -class CreateBillingAccountRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The billing account resource to create. - * Currently CreateBillingAccount only supports subaccount creation, so - * any created billing accounts must be under a provided parent billing - * account. - * - * Generated from protobuf field .google.cloud.billing.v1.BillingAccount billing_account = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $billing_account = null; - /** - * Optional. The parent to create a billing account from. - * Format: - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $parent = ''; - - /** - * @param \Google\Cloud\Billing\V1\BillingAccount $billingAccount Required. The billing account resource to create. - * Currently CreateBillingAccount only supports subaccount creation, so - * any created billing accounts must be under a provided parent billing - * account. - * - * @return \Google\Cloud\Billing\V1\CreateBillingAccountRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Billing\V1\BillingAccount $billingAccount): self - { - return (new self()) - ->setBillingAccount($billingAccount); - } - - /** - * @param \Google\Cloud\Billing\V1\BillingAccount $billingAccount Required. The billing account resource to create. - * Currently CreateBillingAccount only supports subaccount creation, so - * any created billing accounts must be under a provided parent billing - * account. - * @param string $parent Optional. The parent to create a billing account from. - * Format: - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * @return \Google\Cloud\Billing\V1\CreateBillingAccountRequest - * - * @experimental - */ - public static function buildFromBillingAccountParent(\Google\Cloud\Billing\V1\BillingAccount $billingAccount, string $parent): self - { - return (new self()) - ->setBillingAccount($billingAccount) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Billing\V1\BillingAccount $billing_account - * Required. The billing account resource to create. - * Currently CreateBillingAccount only supports subaccount creation, so - * any created billing accounts must be under a provided parent billing - * account. - * @type string $parent - * Optional. The parent to create a billing account from. - * Format: - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Required. The billing account resource to create. - * Currently CreateBillingAccount only supports subaccount creation, so - * any created billing accounts must be under a provided parent billing - * account. - * - * Generated from protobuf field .google.cloud.billing.v1.BillingAccount billing_account = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Billing\V1\BillingAccount|null - */ - public function getBillingAccount() - { - return $this->billing_account; - } - - public function hasBillingAccount() - { - return isset($this->billing_account); - } - - public function clearBillingAccount() - { - unset($this->billing_account); - } - - /** - * Required. The billing account resource to create. - * Currently CreateBillingAccount only supports subaccount creation, so - * any created billing accounts must be under a provided parent billing - * account. - * - * Generated from protobuf field .google.cloud.billing.v1.BillingAccount billing_account = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Billing\V1\BillingAccount $var - * @return $this - */ - public function setBillingAccount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\BillingAccount::class); - $this->billing_account = $var; - - return $this; - } - - /** - * Optional. The parent to create a billing account from. - * Format: - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. The parent to create a billing account from. - * Format: - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy.php deleted file mode 100644 index 62a3391e2bd0..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.billing.v1.GeoTaxonomy - */ -class GeoTaxonomy extends \Google\Protobuf\Internal\Message -{ - /** - * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. - * - * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; - */ - protected $type = 0; - /** - * The list of regions associated with a sku. Empty for Global skus, which are - * associated with all Google Cloud regions. - * - * Generated from protobuf field repeated string regions = 2; - */ - private $regions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. - * @type array|\Google\Protobuf\Internal\RepeatedField $regions - * The list of regions associated with a sku. Empty for Global skus, which are - * associated with all Google Cloud regions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. - * - * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. - * - * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Billing\V1\GeoTaxonomy\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The list of regions associated with a sku. Empty for Global skus, which are - * associated with all Google Cloud regions. - * - * Generated from protobuf field repeated string regions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegions() - { - return $this->regions; - } - - /** - * The list of regions associated with a sku. Empty for Global skus, which are - * associated with all Google Cloud regions. - * - * Generated from protobuf field repeated string regions = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->regions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy/Type.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy/Type.php deleted file mode 100644 index 8374985261bb..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GeoTaxonomy/Type.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.billing.v1.GeoTaxonomy.Type - */ -class Type -{ - /** - * The type is not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * The sku is global in nature, e.g. a license sku. Global skus are - * available in all regions, and so have an empty region list. - * - * Generated from protobuf enum GLOBAL = 1; - */ - const PBGLOBAL = 1; - /** - * The sku is available in a specific region, e.g. "us-west2". - * - * Generated from protobuf enum REGIONAL = 2; - */ - const REGIONAL = 2; - /** - * The sku is associated with multiple regions, e.g. "us-west2" and - * "us-east1". - * - * Generated from protobuf enum MULTI_REGIONAL = 3; - */ - const MULTI_REGIONAL = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PBGLOBAL => 'GLOBAL', - self::REGIONAL => 'REGIONAL', - self::MULTI_REGIONAL => 'MULTI_REGIONAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Billing\V1\GeoTaxonomy_Type::class); - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetBillingAccountRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetBillingAccountRequest.php deleted file mode 100644 index b98ae19f16c9..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetBillingAccountRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.billing.v1.GetBillingAccountRequest - */ -class GetBillingAccountRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the billing account to retrieve. For - * example, `billingAccounts/012345-567890-ABCDEF`. - * - * 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 billing account to retrieve. For - * example, `billingAccounts/012345-567890-ABCDEF`. Please see - * {@see CloudBillingClient::billingAccountName()} for help formatting this field. - * - * @return \Google\Cloud\Billing\V1\GetBillingAccountRequest - * - * @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 billing account to retrieve. For - * example, `billingAccounts/012345-567890-ABCDEF`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the billing account to retrieve. For - * example, `billingAccounts/012345-567890-ABCDEF`. - * - * 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 billing account to retrieve. For - * example, `billingAccounts/012345-567890-ABCDEF`. - * - * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetProjectBillingInfoRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetProjectBillingInfoRequest.php deleted file mode 100644 index 80d4f29f30bc..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/GetProjectBillingInfoRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.billing.v1.GetProjectBillingInfoRequest - */ -class GetProjectBillingInfoRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project for which billing information is - * retrieved. For example, `projects/tokyo-rain-123`. - * - * 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 project for which billing information is - * retrieved. For example, `projects/tokyo-rain-123`. Please see - * {@see CloudBillingClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Billing\V1\GetProjectBillingInfoRequest - * - * @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 project for which billing information is - * retrieved. For example, `projects/tokyo-rain-123`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project for which billing information is - * retrieved. For example, `projects/tokyo-rain-123`. - * - * 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 project for which billing information is - * retrieved. For example, `projects/tokyo-rain-123`. - * - * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsRequest.php deleted file mode 100644 index 8a5225f250ca..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsRequest.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.billing.v1.ListBillingAccountsRequest - */ -class ListBillingAccountsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Requested page size. The maximum page size is 100; this is also the - * default. - * - * Generated from protobuf field int32 page_size = 1; - */ - protected $page_size = 0; - /** - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListBillingAccounts` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * Options for how to filter the returned billing accounts. - * This only supports filtering for - * [subaccounts](https://cloud.google.com/billing/docs/concepts) under a - * single provided parent billing account. - * (for example, - * `master_billing_account=billingAccounts/012345-678901-ABCDEF`). - * Boolean algebra and other fields are not currently supported. - * - * Generated from protobuf field string filter = 3; - */ - protected $filter = ''; - /** - * Optional. The parent resource to list billing accounts from. - * Format: - * - `organizations/{organization_id}`, for example, - * `organizations/12345678` - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $parent = ''; - - /** - * @param string $parent Optional. The parent resource to list billing accounts from. - * Format: - * - `organizations/{organization_id}`, for example, - * `organizations/12345678` - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * @return \Google\Cloud\Billing\V1\ListBillingAccountsRequest - * - * @experimental - */ - public static function buildFromParent(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $page_size - * Requested page size. The maximum page size is 100; this is also the - * default. - * @type string $page_token - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListBillingAccounts` - * call. If unspecified, the first page of results is returned. - * @type string $filter - * Options for how to filter the returned billing accounts. - * This only supports filtering for - * [subaccounts](https://cloud.google.com/billing/docs/concepts) under a - * single provided parent billing account. - * (for example, - * `master_billing_account=billingAccounts/012345-678901-ABCDEF`). - * Boolean algebra and other fields are not currently supported. - * @type string $parent - * Optional. The parent resource to list billing accounts from. - * Format: - * - `organizations/{organization_id}`, for example, - * `organizations/12345678` - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Requested page size. The maximum page size is 100; this is also the - * default. - * - * Generated from protobuf field int32 page_size = 1; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The maximum page size is 100; this is also the - * default. - * - * Generated from protobuf field int32 page_size = 1; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListBillingAccounts` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListBillingAccounts` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Options for how to filter the returned billing accounts. - * This only supports filtering for - * [subaccounts](https://cloud.google.com/billing/docs/concepts) under a - * single provided parent billing account. - * (for example, - * `master_billing_account=billingAccounts/012345-678901-ABCDEF`). - * Boolean algebra and other fields are not currently supported. - * - * Generated from protobuf field string filter = 3; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Options for how to filter the returned billing accounts. - * This only supports filtering for - * [subaccounts](https://cloud.google.com/billing/docs/concepts) under a - * single provided parent billing account. - * (for example, - * `master_billing_account=billingAccounts/012345-678901-ABCDEF`). - * Boolean algebra and other fields are not currently supported. - * - * Generated from protobuf field string filter = 3; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The parent resource to list billing accounts from. - * Format: - * - `organizations/{organization_id}`, for example, - * `organizations/12345678` - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. The parent resource to list billing accounts from. - * Format: - * - `organizations/{organization_id}`, for example, - * `organizations/12345678` - * - `billingAccounts/{billing_account_id}`, for example, - * `billingAccounts/012345-567890-ABCDEF` - * - * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsResponse.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsResponse.php deleted file mode 100644 index f5588f486fbc..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListBillingAccountsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.billing.v1.ListBillingAccountsResponse - */ -class ListBillingAccountsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of billing accounts. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.BillingAccount billing_accounts = 1; - */ - private $billing_accounts; - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListBillingAccounts` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * 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\Billing\V1\BillingAccount>|\Google\Protobuf\Internal\RepeatedField $billing_accounts - * A list of billing accounts. - * @type string $next_page_token - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListBillingAccounts` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * A list of billing accounts. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.BillingAccount billing_accounts = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBillingAccounts() - { - return $this->billing_accounts; - } - - /** - * A list of billing accounts. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.BillingAccount billing_accounts = 1; - * @param array<\Google\Cloud\Billing\V1\BillingAccount>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBillingAccounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\BillingAccount::class); - $this->billing_accounts = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListBillingAccounts` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListBillingAccounts` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoRequest.php deleted file mode 100644 index 30ca6e1f929f..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoRequest.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.billing.v1.ListProjectBillingInfoRequest - */ -class ListProjectBillingInfoRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the billing account associated with the - * projects that you want to list. For example, - * `billingAccounts/012345-567890-ABCDEF`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Requested page size. The maximum page size is 100; this is also the - * default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous `ListProjectBillingInfo` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The resource name of the billing account associated with the - * projects that you want to list. For example, - * `billingAccounts/012345-567890-ABCDEF`. Please see - * {@see CloudBillingClient::billingAccountName()} for help formatting this field. - * - * @return \Google\Cloud\Billing\V1\ListProjectBillingInfoRequest - * - * @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 billing account associated with the - * projects that you want to list. For example, - * `billingAccounts/012345-567890-ABCDEF`. - * @type int $page_size - * Requested page size. The maximum page size is 100; this is also the - * default. - * @type string $page_token - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous `ListProjectBillingInfo` - * call. If unspecified, the first page of results is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the billing account associated with the - * projects that you want to list. For example, - * `billingAccounts/012345-567890-ABCDEF`. - * - * 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 billing account associated with the - * projects that you want to list. For example, - * `billingAccounts/012345-567890-ABCDEF`. - * - * 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; - } - - /** - * Requested page size. The maximum page size is 100; this is also the - * default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The maximum page size is 100; this is also the - * default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous `ListProjectBillingInfo` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous `ListProjectBillingInfo` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoResponse.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoResponse.php deleted file mode 100644 index f2a9c1eb6519..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListProjectBillingInfoResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.billing.v1.ListProjectBillingInfoResponse - */ -class ListProjectBillingInfoResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of `ProjectBillingInfo` resources representing the projects - * associated with the billing account. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 1; - */ - private $project_billing_info; - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListProjectBillingInfo` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * 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\Billing\V1\ProjectBillingInfo>|\Google\Protobuf\Internal\RepeatedField $project_billing_info - * A list of `ProjectBillingInfo` resources representing the projects - * associated with the billing account. - * @type string $next_page_token - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListProjectBillingInfo` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * A list of `ProjectBillingInfo` resources representing the projects - * associated with the billing account. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProjectBillingInfo() - { - return $this->project_billing_info; - } - - /** - * A list of `ProjectBillingInfo` resources representing the projects - * associated with the billing account. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 1; - * @param array<\Google\Cloud\Billing\V1\ProjectBillingInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProjectBillingInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\ProjectBillingInfo::class); - $this->project_billing_info = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListProjectBillingInfo` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListProjectBillingInfo` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesRequest.php deleted file mode 100644 index 5588e0ded1a6..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.billing.v1.ListServicesRequest - */ -class ListServicesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Requested page size. Defaults to 5000. - * - * Generated from protobuf field int32 page_size = 1; - */ - protected $page_size = 0; - /** - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListServices` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $page_size - * Requested page size. Defaults to 5000. - * @type string $page_token - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListServices` - * call. If unspecified, the first page of results is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * Requested page size. Defaults to 5000. - * - * Generated from protobuf field int32 page_size = 1; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Defaults to 5000. - * - * Generated from protobuf field int32 page_size = 1; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListServices` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListServices` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesResponse.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesResponse.php deleted file mode 100644 index 4961aae23306..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListServicesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.billing.v1.ListServicesResponse - */ -class ListServicesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of services. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.Service services = 1; - */ - private $services; - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListServices` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * 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\Billing\V1\Service>|\Google\Protobuf\Internal\RepeatedField $services - * A list of services. - * @type string $next_page_token - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListServices` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * A list of services. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.Service services = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServices() - { - return $this->services; - } - - /** - * A list of services. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.Service services = 1; - * @param array<\Google\Cloud\Billing\V1\Service>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\Service::class); - $this->services = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListServices` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListServices` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusRequest.php deleted file mode 100644 index 4c0ec5d04aec..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusRequest.php +++ /dev/null @@ -1,332 +0,0 @@ -google.cloud.billing.v1.ListSkusRequest - */ -class ListSkusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the service. - * Example: "services/6F81-5844-456A" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional inclusive start time of the time range for which the pricing - * versions will be returned. Timestamps in the future are not allowed. - * The time range has to be within a single calendar month in - * America/Los_Angeles timezone. Time range as a whole is optional. If not - * specified, the latest pricing will be returned (up to 12 hours old at - * most). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * Optional exclusive end time of the time range for which the pricing - * versions will be returned. Timestamps in the future are not allowed. - * The time range has to be within a single calendar month in - * America/Los_Angeles timezone. Time range as a whole is optional. If not - * specified, the latest pricing will be returned (up to 12 hours old at - * most). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - /** - * The ISO 4217 currency code for the pricing info in the response proto. - * Will use the conversion rate as of start_time. - * Optional. If not specified USD will be used. - * - * Generated from protobuf field string currency_code = 4; - */ - protected $currency_code = ''; - /** - * Requested page size. Defaults to 5000. - * - * Generated from protobuf field int32 page_size = 5; - */ - protected $page_size = 0; - /** - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListSkus` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 6; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the service. - * Example: "services/6F81-5844-456A" - * Please see {@see CloudCatalogClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\Billing\V1\ListSkusRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the service. - * Example: "services/6F81-5844-456A" - * @type \Google\Protobuf\Timestamp $start_time - * Optional inclusive start time of the time range for which the pricing - * versions will be returned. Timestamps in the future are not allowed. - * The time range has to be within a single calendar month in - * America/Los_Angeles timezone. Time range as a whole is optional. If not - * specified, the latest pricing will be returned (up to 12 hours old at - * most). - * @type \Google\Protobuf\Timestamp $end_time - * Optional exclusive end time of the time range for which the pricing - * versions will be returned. Timestamps in the future are not allowed. - * The time range has to be within a single calendar month in - * America/Los_Angeles timezone. Time range as a whole is optional. If not - * specified, the latest pricing will be returned (up to 12 hours old at - * most). - * @type string $currency_code - * The ISO 4217 currency code for the pricing info in the response proto. - * Will use the conversion rate as of start_time. - * Optional. If not specified USD will be used. - * @type int $page_size - * Requested page size. Defaults to 5000. - * @type string $page_token - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListSkus` - * call. If unspecified, the first page of results is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the service. - * Example: "services/6F81-5844-456A" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the service. - * Example: "services/6F81-5844-456A" - * - * 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 inclusive start time of the time range for which the pricing - * versions will be returned. Timestamps in the future are not allowed. - * The time range has to be within a single calendar month in - * America/Los_Angeles timezone. Time range as a whole is optional. If not - * specified, the latest pricing will be returned (up to 12 hours old at - * most). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 inclusive start time of the time range for which the pricing - * versions will be returned. Timestamps in the future are not allowed. - * The time range has to be within a single calendar month in - * America/Los_Angeles timezone. Time range as a whole is optional. If not - * specified, the latest pricing will be returned (up to 12 hours old at - * most). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 exclusive end time of the time range for which the pricing - * versions will be returned. Timestamps in the future are not allowed. - * The time range has to be within a single calendar month in - * America/Los_Angeles timezone. Time range as a whole is optional. If not - * specified, the latest pricing will be returned (up to 12 hours old at - * most). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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); - } - - /** - * Optional exclusive end time of the time range for which the pricing - * versions will be returned. Timestamps in the future are not allowed. - * The time range has to be within a single calendar month in - * America/Los_Angeles timezone. Time range as a whole is optional. If not - * specified, the latest pricing will be returned (up to 12 hours old at - * most). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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 ISO 4217 currency code for the pricing info in the response proto. - * Will use the conversion rate as of start_time. - * Optional. If not specified USD will be used. - * - * Generated from protobuf field string currency_code = 4; - * @return string - */ - public function getCurrencyCode() - { - return $this->currency_code; - } - - /** - * The ISO 4217 currency code for the pricing info in the response proto. - * Will use the conversion rate as of start_time. - * Optional. If not specified USD will be used. - * - * Generated from protobuf field string currency_code = 4; - * @param string $var - * @return $this - */ - public function setCurrencyCode($var) - { - GPBUtil::checkString($var, True); - $this->currency_code = $var; - - return $this; - } - - /** - * Requested page size. Defaults to 5000. - * - * Generated from protobuf field int32 page_size = 5; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Defaults to 5000. - * - * Generated from protobuf field int32 page_size = 5; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListSkus` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 6; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to return. This should be a - * `next_page_token` value returned from a previous `ListSkus` - * call. If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 6; - * @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/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusResponse.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusResponse.php deleted file mode 100644 index 64aa6cbc0ee9..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ListSkusResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.billing.v1.ListSkusResponse - */ -class ListSkusResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of public SKUs of the given service. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.Sku skus = 1; - */ - private $skus; - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListSkus` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * 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\Billing\V1\Sku>|\Google\Protobuf\Internal\RepeatedField $skus - * The list of public SKUs of the given service. - * @type string $next_page_token - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListSkus` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * The list of public SKUs of the given service. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.Sku skus = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSkus() - { - return $this->skus; - } - - /** - * The list of public SKUs of the given service. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.Sku skus = 1; - * @param array<\Google\Cloud\Billing\V1\Sku>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSkus($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\Sku::class); - $this->skus = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListSkus` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. To retrieve the next page, - * call `ListSkus` again with the `page_token` field set to this - * value. This field is empty if there are no more results to retrieve. - * - * 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/Billing/v1/proto/src/Google/Cloud/Billing/V1/MoveBillingAccountRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/MoveBillingAccountRequest.php deleted file mode 100644 index 98e023593485..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/MoveBillingAccountRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.billing.v1.MoveBillingAccountRequest - */ -class MoveBillingAccountRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the billing account to move. - * Must be of the form `billingAccounts/{billing_account_id}`. - * The specified billing account cannot be a subaccount, since a subaccount - * always belongs to the same organization as its parent account. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The resource name of the Organization to move - * the billing account under. - * Must be of the form `organizations/{organization_id}`. - * - * Generated from protobuf field string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $destination_parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the billing account to move. - * Must be of the form `billingAccounts/{billing_account_id}`. - * The specified billing account cannot be a subaccount, since a subaccount - * always belongs to the same organization as its parent account. - * @type string $destination_parent - * Required. The resource name of the Organization to move - * the billing account under. - * Must be of the form `organizations/{organization_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the billing account to move. - * Must be of the form `billingAccounts/{billing_account_id}`. - * The specified billing account cannot be a subaccount, since a subaccount - * always belongs to the same organization as its parent account. - * - * 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 billing account to move. - * Must be of the form `billingAccounts/{billing_account_id}`. - * The specified billing account cannot be a subaccount, since a subaccount - * always belongs to the same organization as its parent account. - * - * 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 resource name of the Organization to move - * the billing account under. - * Must be of the form `organizations/{organization_id}`. - * - * Generated from protobuf field string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDestinationParent() - { - return $this->destination_parent; - } - - /** - * Required. The resource name of the Organization to move - * the billing account under. - * Must be of the form `organizations/{organization_id}`. - * - * Generated from protobuf field string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDestinationParent($var) - { - GPBUtil::checkString($var, True); - $this->destination_parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression.php deleted file mode 100644 index 4b6c2ec6c177..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression.php +++ /dev/null @@ -1,346 +0,0 @@ -google.cloud.billing.v1.PricingExpression - */ -class PricingExpression extends \Google\Protobuf\Internal\Message -{ - /** - * The short hand for unit of usage this pricing is specified in. - * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". - * - * Generated from protobuf field string usage_unit = 1; - */ - protected $usage_unit = ''; - /** - * The recommended quantity of units for displaying pricing info. When - * displaying pricing info it is recommended to display: - * (unit_price * display_quantity) per display_quantity usage_unit. - * This field does not affect the pricing formula and is for display purposes - * only. - * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and - * the display_quantity is "1000" then the recommended way of displaying the - * pricing info is "0.10 USD per 1000 GB" - * - * Generated from protobuf field double display_quantity = 2; - */ - protected $display_quantity = 0.0; - /** - * The list of tiered rates for this pricing. The total cost is computed by - * applying each of the tiered rates on usage. This repeated list is sorted - * by ascending order of start_usage_amount. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - private $tiered_rates; - /** - * The unit of usage in human readable form. - * Example: "gibi byte". - * - * Generated from protobuf field string usage_unit_description = 4; - */ - protected $usage_unit_description = ''; - /** - * The base unit for the SKU which is the unit used in usage exports. - * Example: "By" - * - * Generated from protobuf field string base_unit = 5; - */ - protected $base_unit = ''; - /** - * The base unit in human readable form. - * Example: "byte". - * - * Generated from protobuf field string base_unit_description = 6; - */ - protected $base_unit_description = ''; - /** - * Conversion factor for converting from price per usage_unit to price per - * base_unit, and start_usage_amount to start_usage_amount in base_unit. - * unit_price / base_unit_conversion_factor = price per base_unit. - * start_usage_amount * base_unit_conversion_factor = start_usage_amount in - * base_unit. - * - * Generated from protobuf field double base_unit_conversion_factor = 7; - */ - protected $base_unit_conversion_factor = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $usage_unit - * The short hand for unit of usage this pricing is specified in. - * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". - * @type float $display_quantity - * The recommended quantity of units for displaying pricing info. When - * displaying pricing info it is recommended to display: - * (unit_price * display_quantity) per display_quantity usage_unit. - * This field does not affect the pricing formula and is for display purposes - * only. - * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and - * the display_quantity is "1000" then the recommended way of displaying the - * pricing info is "0.10 USD per 1000 GB" - * @type array<\Google\Cloud\Billing\V1\PricingExpression\TierRate>|\Google\Protobuf\Internal\RepeatedField $tiered_rates - * The list of tiered rates for this pricing. The total cost is computed by - * applying each of the tiered rates on usage. This repeated list is sorted - * by ascending order of start_usage_amount. - * @type string $usage_unit_description - * The unit of usage in human readable form. - * Example: "gibi byte". - * @type string $base_unit - * The base unit for the SKU which is the unit used in usage exports. - * Example: "By" - * @type string $base_unit_description - * The base unit in human readable form. - * Example: "byte". - * @type float $base_unit_conversion_factor - * Conversion factor for converting from price per usage_unit to price per - * base_unit, and start_usage_amount to start_usage_amount in base_unit. - * unit_price / base_unit_conversion_factor = price per base_unit. - * start_usage_amount * base_unit_conversion_factor = start_usage_amount in - * base_unit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * The short hand for unit of usage this pricing is specified in. - * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". - * - * Generated from protobuf field string usage_unit = 1; - * @return string - */ - public function getUsageUnit() - { - return $this->usage_unit; - } - - /** - * The short hand for unit of usage this pricing is specified in. - * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". - * - * Generated from protobuf field string usage_unit = 1; - * @param string $var - * @return $this - */ - public function setUsageUnit($var) - { - GPBUtil::checkString($var, True); - $this->usage_unit = $var; - - return $this; - } - - /** - * The recommended quantity of units for displaying pricing info. When - * displaying pricing info it is recommended to display: - * (unit_price * display_quantity) per display_quantity usage_unit. - * This field does not affect the pricing formula and is for display purposes - * only. - * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and - * the display_quantity is "1000" then the recommended way of displaying the - * pricing info is "0.10 USD per 1000 GB" - * - * Generated from protobuf field double display_quantity = 2; - * @return float - */ - public function getDisplayQuantity() - { - return $this->display_quantity; - } - - /** - * The recommended quantity of units for displaying pricing info. When - * displaying pricing info it is recommended to display: - * (unit_price * display_quantity) per display_quantity usage_unit. - * This field does not affect the pricing formula and is for display purposes - * only. - * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and - * the display_quantity is "1000" then the recommended way of displaying the - * pricing info is "0.10 USD per 1000 GB" - * - * Generated from protobuf field double display_quantity = 2; - * @param float $var - * @return $this - */ - public function setDisplayQuantity($var) - { - GPBUtil::checkDouble($var); - $this->display_quantity = $var; - - return $this; - } - - /** - * The list of tiered rates for this pricing. The total cost is computed by - * applying each of the tiered rates on usage. This repeated list is sorted - * by ascending order of start_usage_amount. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTieredRates() - { - return $this->tiered_rates; - } - - /** - * The list of tiered rates for this pricing. The total cost is computed by - * applying each of the tiered rates on usage. This repeated list is sorted - * by ascending order of start_usage_amount. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - * @param array<\Google\Cloud\Billing\V1\PricingExpression\TierRate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTieredRates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\PricingExpression\TierRate::class); - $this->tiered_rates = $arr; - - return $this; - } - - /** - * The unit of usage in human readable form. - * Example: "gibi byte". - * - * Generated from protobuf field string usage_unit_description = 4; - * @return string - */ - public function getUsageUnitDescription() - { - return $this->usage_unit_description; - } - - /** - * The unit of usage in human readable form. - * Example: "gibi byte". - * - * Generated from protobuf field string usage_unit_description = 4; - * @param string $var - * @return $this - */ - public function setUsageUnitDescription($var) - { - GPBUtil::checkString($var, True); - $this->usage_unit_description = $var; - - return $this; - } - - /** - * The base unit for the SKU which is the unit used in usage exports. - * Example: "By" - * - * Generated from protobuf field string base_unit = 5; - * @return string - */ - public function getBaseUnit() - { - return $this->base_unit; - } - - /** - * The base unit for the SKU which is the unit used in usage exports. - * Example: "By" - * - * Generated from protobuf field string base_unit = 5; - * @param string $var - * @return $this - */ - public function setBaseUnit($var) - { - GPBUtil::checkString($var, True); - $this->base_unit = $var; - - return $this; - } - - /** - * The base unit in human readable form. - * Example: "byte". - * - * Generated from protobuf field string base_unit_description = 6; - * @return string - */ - public function getBaseUnitDescription() - { - return $this->base_unit_description; - } - - /** - * The base unit in human readable form. - * Example: "byte". - * - * Generated from protobuf field string base_unit_description = 6; - * @param string $var - * @return $this - */ - public function setBaseUnitDescription($var) - { - GPBUtil::checkString($var, True); - $this->base_unit_description = $var; - - return $this; - } - - /** - * Conversion factor for converting from price per usage_unit to price per - * base_unit, and start_usage_amount to start_usage_amount in base_unit. - * unit_price / base_unit_conversion_factor = price per base_unit. - * start_usage_amount * base_unit_conversion_factor = start_usage_amount in - * base_unit. - * - * Generated from protobuf field double base_unit_conversion_factor = 7; - * @return float - */ - public function getBaseUnitConversionFactor() - { - return $this->base_unit_conversion_factor; - } - - /** - * Conversion factor for converting from price per usage_unit to price per - * base_unit, and start_usage_amount to start_usage_amount in base_unit. - * unit_price / base_unit_conversion_factor = price per base_unit. - * start_usage_amount * base_unit_conversion_factor = start_usage_amount in - * base_unit. - * - * Generated from protobuf field double base_unit_conversion_factor = 7; - * @param float $var - * @return $this - */ - public function setBaseUnitConversionFactor($var) - { - GPBUtil::checkDouble($var); - $this->base_unit_conversion_factor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression/TierRate.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression/TierRate.php deleted file mode 100644 index d5f1471b2652..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingExpression/TierRate.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.billing.v1.PricingExpression.TierRate - */ -class TierRate extends \Google\Protobuf\Internal\Message -{ - /** - * Usage is priced at this rate only after this amount. - * Example: start_usage_amount of 10 indicates that the usage will be priced - * at the unit_price after the first 10 usage_units. - * - * Generated from protobuf field double start_usage_amount = 1; - */ - protected $start_usage_amount = 0.0; - /** - * The price per unit of usage. - * Example: unit_price of amount $10 indicates that each unit will cost $10. - * - * Generated from protobuf field .google.type.Money unit_price = 2; - */ - protected $unit_price = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $start_usage_amount - * Usage is priced at this rate only after this amount. - * Example: start_usage_amount of 10 indicates that the usage will be priced - * at the unit_price after the first 10 usage_units. - * @type \Google\Type\Money $unit_price - * The price per unit of usage. - * Example: unit_price of amount $10 indicates that each unit will cost $10. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * Usage is priced at this rate only after this amount. - * Example: start_usage_amount of 10 indicates that the usage will be priced - * at the unit_price after the first 10 usage_units. - * - * Generated from protobuf field double start_usage_amount = 1; - * @return float - */ - public function getStartUsageAmount() - { - return $this->start_usage_amount; - } - - /** - * Usage is priced at this rate only after this amount. - * Example: start_usage_amount of 10 indicates that the usage will be priced - * at the unit_price after the first 10 usage_units. - * - * Generated from protobuf field double start_usage_amount = 1; - * @param float $var - * @return $this - */ - public function setStartUsageAmount($var) - { - GPBUtil::checkDouble($var); - $this->start_usage_amount = $var; - - return $this; - } - - /** - * The price per unit of usage. - * Example: unit_price of amount $10 indicates that each unit will cost $10. - * - * Generated from protobuf field .google.type.Money unit_price = 2; - * @return \Google\Type\Money|null - */ - public function getUnitPrice() - { - return $this->unit_price; - } - - public function hasUnitPrice() - { - return isset($this->unit_price); - } - - public function clearUnitPrice() - { - unset($this->unit_price); - } - - /** - * The price per unit of usage. - * Example: unit_price of amount $10 indicates that each unit will cost $10. - * - * Generated from protobuf field .google.type.Money unit_price = 2; - * @param \Google\Type\Money $var - * @return $this - */ - public function setUnitPrice($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->unit_price = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TierRate::class, \Google\Cloud\Billing\V1\PricingExpression_TierRate::class); - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingInfo.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingInfo.php deleted file mode 100644 index 2c7ad6e6c20d..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/PricingInfo.php +++ /dev/null @@ -1,277 +0,0 @@ -google.cloud.billing.v1.PricingInfo - */ -class PricingInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The timestamp from which this pricing was effective within the requested - * time range. This is guaranteed to be greater than or equal to the - * start_time field in the request and less than the end_time field in the - * request. If a time range was not specified in the request this field will - * be equivalent to a time within the last 12 hours, indicating the latest - * pricing info. - * - * Generated from protobuf field .google.protobuf.Timestamp effective_time = 1; - */ - protected $effective_time = null; - /** - * An optional human readable summary of the pricing information, has a - * maximum length of 256 characters. - * - * Generated from protobuf field string summary = 2; - */ - protected $summary = ''; - /** - * Expresses the pricing formula. See `PricingExpression` for an example. - * - * Generated from protobuf field .google.cloud.billing.v1.PricingExpression pricing_expression = 3; - */ - protected $pricing_expression = null; - /** - * Aggregation Info. This can be left unspecified if the pricing expression - * doesn't require aggregation. - * - * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo aggregation_info = 4; - */ - protected $aggregation_info = null; - /** - * Conversion rate used for currency conversion, from USD to the currency - * specified in the request. This includes any surcharge collected for billing - * in non USD currency. If a currency is not specified in the request this - * defaults to 1.0. - * Example: USD * currency_conversion_rate = JPY - * - * Generated from protobuf field double currency_conversion_rate = 5; - */ - protected $currency_conversion_rate = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $effective_time - * The timestamp from which this pricing was effective within the requested - * time range. This is guaranteed to be greater than or equal to the - * start_time field in the request and less than the end_time field in the - * request. If a time range was not specified in the request this field will - * be equivalent to a time within the last 12 hours, indicating the latest - * pricing info. - * @type string $summary - * An optional human readable summary of the pricing information, has a - * maximum length of 256 characters. - * @type \Google\Cloud\Billing\V1\PricingExpression $pricing_expression - * Expresses the pricing formula. See `PricingExpression` for an example. - * @type \Google\Cloud\Billing\V1\AggregationInfo $aggregation_info - * Aggregation Info. This can be left unspecified if the pricing expression - * doesn't require aggregation. - * @type float $currency_conversion_rate - * Conversion rate used for currency conversion, from USD to the currency - * specified in the request. This includes any surcharge collected for billing - * in non USD currency. If a currency is not specified in the request this - * defaults to 1.0. - * Example: USD * currency_conversion_rate = JPY - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * The timestamp from which this pricing was effective within the requested - * time range. This is guaranteed to be greater than or equal to the - * start_time field in the request and less than the end_time field in the - * request. If a time range was not specified in the request this field will - * be equivalent to a time within the last 12 hours, indicating the latest - * pricing info. - * - * Generated from protobuf field .google.protobuf.Timestamp effective_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEffectiveTime() - { - return $this->effective_time; - } - - public function hasEffectiveTime() - { - return isset($this->effective_time); - } - - public function clearEffectiveTime() - { - unset($this->effective_time); - } - - /** - * The timestamp from which this pricing was effective within the requested - * time range. This is guaranteed to be greater than or equal to the - * start_time field in the request and less than the end_time field in the - * request. If a time range was not specified in the request this field will - * be equivalent to a time within the last 12 hours, indicating the latest - * pricing info. - * - * Generated from protobuf field .google.protobuf.Timestamp effective_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEffectiveTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->effective_time = $var; - - return $this; - } - - /** - * An optional human readable summary of the pricing information, has a - * maximum length of 256 characters. - * - * Generated from protobuf field string summary = 2; - * @return string - */ - public function getSummary() - { - return $this->summary; - } - - /** - * An optional human readable summary of the pricing information, has a - * maximum length of 256 characters. - * - * Generated from protobuf field string summary = 2; - * @param string $var - * @return $this - */ - public function setSummary($var) - { - GPBUtil::checkString($var, True); - $this->summary = $var; - - return $this; - } - - /** - * Expresses the pricing formula. See `PricingExpression` for an example. - * - * Generated from protobuf field .google.cloud.billing.v1.PricingExpression pricing_expression = 3; - * @return \Google\Cloud\Billing\V1\PricingExpression|null - */ - public function getPricingExpression() - { - return $this->pricing_expression; - } - - public function hasPricingExpression() - { - return isset($this->pricing_expression); - } - - public function clearPricingExpression() - { - unset($this->pricing_expression); - } - - /** - * Expresses the pricing formula. See `PricingExpression` for an example. - * - * Generated from protobuf field .google.cloud.billing.v1.PricingExpression pricing_expression = 3; - * @param \Google\Cloud\Billing\V1\PricingExpression $var - * @return $this - */ - public function setPricingExpression($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\PricingExpression::class); - $this->pricing_expression = $var; - - return $this; - } - - /** - * Aggregation Info. This can be left unspecified if the pricing expression - * doesn't require aggregation. - * - * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo aggregation_info = 4; - * @return \Google\Cloud\Billing\V1\AggregationInfo|null - */ - public function getAggregationInfo() - { - return $this->aggregation_info; - } - - public function hasAggregationInfo() - { - return isset($this->aggregation_info); - } - - public function clearAggregationInfo() - { - unset($this->aggregation_info); - } - - /** - * Aggregation Info. This can be left unspecified if the pricing expression - * doesn't require aggregation. - * - * Generated from protobuf field .google.cloud.billing.v1.AggregationInfo aggregation_info = 4; - * @param \Google\Cloud\Billing\V1\AggregationInfo $var - * @return $this - */ - public function setAggregationInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\AggregationInfo::class); - $this->aggregation_info = $var; - - return $this; - } - - /** - * Conversion rate used for currency conversion, from USD to the currency - * specified in the request. This includes any surcharge collected for billing - * in non USD currency. If a currency is not specified in the request this - * defaults to 1.0. - * Example: USD * currency_conversion_rate = JPY - * - * Generated from protobuf field double currency_conversion_rate = 5; - * @return float - */ - public function getCurrencyConversionRate() - { - return $this->currency_conversion_rate; - } - - /** - * Conversion rate used for currency conversion, from USD to the currency - * specified in the request. This includes any surcharge collected for billing - * in non USD currency. If a currency is not specified in the request this - * defaults to 1.0. - * Example: USD * currency_conversion_rate = JPY - * - * Generated from protobuf field double currency_conversion_rate = 5; - * @param float $var - * @return $this - */ - public function setCurrencyConversionRate($var) - { - GPBUtil::checkDouble($var); - $this->currency_conversion_rate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ProjectBillingInfo.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ProjectBillingInfo.php deleted file mode 100644 index 27b7019fb7d8..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/ProjectBillingInfo.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.billing.v1.ProjectBillingInfo - */ -class ProjectBillingInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for the `ProjectBillingInfo`; has the form - * `projects/{project_id}/billingInfo`. For example, the resource name for the - * billing information for project `tokyo-rain-123` would be - * `projects/tokyo-rain-123/billingInfo`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The ID of the project that this `ProjectBillingInfo` - * represents, such as `tokyo-rain-123`. This is a convenience field so that - * you don't need to parse the `name` field to obtain a project ID. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $project_id = ''; - /** - * The resource name of the billing account associated with the project, if - * any. For example, `billingAccounts/012345-567890-ABCDEF`. - * - * Generated from protobuf field string billing_account_name = 3; - */ - protected $billing_account_name = ''; - /** - * Output only. True if the project is associated with an open billing - * account, to which usage on the project is charged. False if the project is - * associated with a closed billing account, or no billing account at all, and - * therefore cannot use paid services. - * - * Generated from protobuf field bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $billing_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for the `ProjectBillingInfo`; has the form - * `projects/{project_id}/billingInfo`. For example, the resource name for the - * billing information for project `tokyo-rain-123` would be - * `projects/tokyo-rain-123/billingInfo`. - * @type string $project_id - * Output only. The ID of the project that this `ProjectBillingInfo` - * represents, such as `tokyo-rain-123`. This is a convenience field so that - * you don't need to parse the `name` field to obtain a project ID. - * @type string $billing_account_name - * The resource name of the billing account associated with the project, if - * any. For example, `billingAccounts/012345-567890-ABCDEF`. - * @type bool $billing_enabled - * Output only. True if the project is associated with an open billing - * account, to which usage on the project is charged. False if the project is - * associated with a closed billing account, or no billing account at all, and - * therefore cannot use paid services. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for the `ProjectBillingInfo`; has the form - * `projects/{project_id}/billingInfo`. For example, the resource name for the - * billing information for project `tokyo-rain-123` would be - * `projects/tokyo-rain-123/billingInfo`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name for the `ProjectBillingInfo`; has the form - * `projects/{project_id}/billingInfo`. For example, the resource name for the - * billing information for project `tokyo-rain-123` would be - * `projects/tokyo-rain-123/billingInfo`. - * - * 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. The ID of the project that this `ProjectBillingInfo` - * represents, such as `tokyo-rain-123`. This is a convenience field so that - * you don't need to parse the `name` field to obtain a project ID. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Output only. The ID of the project that this `ProjectBillingInfo` - * represents, such as `tokyo-rain-123`. This is a convenience field so that - * you don't need to parse the `name` field to obtain a project ID. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * The resource name of the billing account associated with the project, if - * any. For example, `billingAccounts/012345-567890-ABCDEF`. - * - * Generated from protobuf field string billing_account_name = 3; - * @return string - */ - public function getBillingAccountName() - { - return $this->billing_account_name; - } - - /** - * The resource name of the billing account associated with the project, if - * any. For example, `billingAccounts/012345-567890-ABCDEF`. - * - * Generated from protobuf field string billing_account_name = 3; - * @param string $var - * @return $this - */ - public function setBillingAccountName($var) - { - GPBUtil::checkString($var, True); - $this->billing_account_name = $var; - - return $this; - } - - /** - * Output only. True if the project is associated with an open billing - * account, to which usage on the project is charged. False if the project is - * associated with a closed billing account, or no billing account at all, and - * therefore cannot use paid services. - * - * Generated from protobuf field bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getBillingEnabled() - { - return $this->billing_enabled; - } - - /** - * Output only. True if the project is associated with an open billing - * account, to which usage on the project is charged. False if the project is - * associated with a closed billing account, or no billing account at all, and - * therefore cannot use paid services. - * - * Generated from protobuf field bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setBillingEnabled($var) - { - GPBUtil::checkBool($var); - $this->billing_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Service.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Service.php deleted file mode 100644 index 72890292bfc8..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Service.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.billing.v1.Service - */ -class Service extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the service. - * Example: "services/6F81-5844-456A" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The identifier for the service. - * Example: "6F81-5844-456A" - * - * Generated from protobuf field string service_id = 2; - */ - protected $service_id = ''; - /** - * A human readable display name for this service. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * The business under which the service is offered. - * Ex. "businessEntities/GCP", "businessEntities/Maps" - * - * Generated from protobuf field string business_entity_name = 4; - */ - protected $business_entity_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name for the service. - * Example: "services/6F81-5844-456A" - * @type string $service_id - * The identifier for the service. - * Example: "6F81-5844-456A" - * @type string $display_name - * A human readable display name for this service. - * @type string $business_entity_name - * The business under which the service is offered. - * Ex. "businessEntities/GCP", "businessEntities/Maps" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * The resource name for the service. - * Example: "services/6F81-5844-456A" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the service. - * Example: "services/6F81-5844-456A" - * - * 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 identifier for the service. - * Example: "6F81-5844-456A" - * - * Generated from protobuf field string service_id = 2; - * @return string - */ - public function getServiceId() - { - return $this->service_id; - } - - /** - * The identifier for the service. - * Example: "6F81-5844-456A" - * - * Generated from protobuf field string service_id = 2; - * @param string $var - * @return $this - */ - public function setServiceId($var) - { - GPBUtil::checkString($var, True); - $this->service_id = $var; - - return $this; - } - - /** - * A human readable display name for this service. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A human readable display name for this service. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The business under which the service is offered. - * Ex. "businessEntities/GCP", "businessEntities/Maps" - * - * Generated from protobuf field string business_entity_name = 4; - * @return string - */ - public function getBusinessEntityName() - { - return $this->business_entity_name; - } - - /** - * The business under which the service is offered. - * Ex. "businessEntities/GCP", "businessEntities/Maps" - * - * Generated from protobuf field string business_entity_name = 4; - * @param string $var - * @return $this - */ - public function setBusinessEntityName($var) - { - GPBUtil::checkString($var, True); - $this->business_entity_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Sku.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Sku.php deleted file mode 100644 index c96446d386ce..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/Sku.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.billing.v1.Sku - */ -class Sku extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the SKU. - * Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The identifier for the SKU. - * Example: "D041-B8A1-6E0B" - * - * Generated from protobuf field string sku_id = 2; - */ - protected $sku_id = ''; - /** - * A human readable description of the SKU, has a maximum length of 256 - * characters. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The category hierarchy of this SKU, purely for organizational purpose. - * - * Generated from protobuf field .google.cloud.billing.v1.Category category = 4; - */ - protected $category = null; - /** - * List of service regions this SKU is offered at. - * Example: "asia-east1" - * Service regions can be found at https://cloud.google.com/about/locations/ - * - * Generated from protobuf field repeated string service_regions = 5; - */ - private $service_regions; - /** - * A timeline of pricing info for this SKU in chronological order. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6; - */ - private $pricing_info; - /** - * Identifies the service provider. - * This is 'Google' for first party services in Google Cloud Platform. - * - * Generated from protobuf field string service_provider_name = 7; - */ - protected $service_provider_name = ''; - /** - * The geographic taxonomy for this sku. - * - * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; - */ - protected $geo_taxonomy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name for the SKU. - * Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" - * @type string $sku_id - * The identifier for the SKU. - * Example: "D041-B8A1-6E0B" - * @type string $description - * A human readable description of the SKU, has a maximum length of 256 - * characters. - * @type \Google\Cloud\Billing\V1\Category $category - * The category hierarchy of this SKU, purely for organizational purpose. - * @type array|\Google\Protobuf\Internal\RepeatedField $service_regions - * List of service regions this SKU is offered at. - * Example: "asia-east1" - * Service regions can be found at https://cloud.google.com/about/locations/ - * @type array<\Google\Cloud\Billing\V1\PricingInfo>|\Google\Protobuf\Internal\RepeatedField $pricing_info - * A timeline of pricing info for this SKU in chronological order. - * @type string $service_provider_name - * Identifies the service provider. - * This is 'Google' for first party services in Google Cloud Platform. - * @type \Google\Cloud\Billing\V1\GeoTaxonomy $geo_taxonomy - * The geographic taxonomy for this sku. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce(); - parent::__construct($data); - } - - /** - * The resource name for the SKU. - * Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the SKU. - * Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" - * - * 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 identifier for the SKU. - * Example: "D041-B8A1-6E0B" - * - * Generated from protobuf field string sku_id = 2; - * @return string - */ - public function getSkuId() - { - return $this->sku_id; - } - - /** - * The identifier for the SKU. - * Example: "D041-B8A1-6E0B" - * - * Generated from protobuf field string sku_id = 2; - * @param string $var - * @return $this - */ - public function setSkuId($var) - { - GPBUtil::checkString($var, True); - $this->sku_id = $var; - - return $this; - } - - /** - * A human readable description of the SKU, has a maximum length of 256 - * characters. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A human readable description of the SKU, has a maximum length of 256 - * characters. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The category hierarchy of this SKU, purely for organizational purpose. - * - * Generated from protobuf field .google.cloud.billing.v1.Category category = 4; - * @return \Google\Cloud\Billing\V1\Category|null - */ - public function getCategory() - { - return $this->category; - } - - public function hasCategory() - { - return isset($this->category); - } - - public function clearCategory() - { - unset($this->category); - } - - /** - * The category hierarchy of this SKU, purely for organizational purpose. - * - * Generated from protobuf field .google.cloud.billing.v1.Category category = 4; - * @param \Google\Cloud\Billing\V1\Category $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\Category::class); - $this->category = $var; - - return $this; - } - - /** - * List of service regions this SKU is offered at. - * Example: "asia-east1" - * Service regions can be found at https://cloud.google.com/about/locations/ - * - * Generated from protobuf field repeated string service_regions = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceRegions() - { - return $this->service_regions; - } - - /** - * List of service regions this SKU is offered at. - * Example: "asia-east1" - * Service regions can be found at https://cloud.google.com/about/locations/ - * - * Generated from protobuf field repeated string service_regions = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->service_regions = $arr; - - return $this; - } - - /** - * A timeline of pricing info for this SKU in chronological order. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPricingInfo() - { - return $this->pricing_info; - } - - /** - * A timeline of pricing info for this SKU in chronological order. - * - * Generated from protobuf field repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6; - * @param array<\Google\Cloud\Billing\V1\PricingInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPricingInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\V1\PricingInfo::class); - $this->pricing_info = $arr; - - return $this; - } - - /** - * Identifies the service provider. - * This is 'Google' for first party services in Google Cloud Platform. - * - * Generated from protobuf field string service_provider_name = 7; - * @return string - */ - public function getServiceProviderName() - { - return $this->service_provider_name; - } - - /** - * Identifies the service provider. - * This is 'Google' for first party services in Google Cloud Platform. - * - * Generated from protobuf field string service_provider_name = 7; - * @param string $var - * @return $this - */ - public function setServiceProviderName($var) - { - GPBUtil::checkString($var, True); - $this->service_provider_name = $var; - - return $this; - } - - /** - * The geographic taxonomy for this sku. - * - * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; - * @return \Google\Cloud\Billing\V1\GeoTaxonomy|null - */ - public function getGeoTaxonomy() - { - return $this->geo_taxonomy; - } - - public function hasGeoTaxonomy() - { - return isset($this->geo_taxonomy); - } - - public function clearGeoTaxonomy() - { - unset($this->geo_taxonomy); - } - - /** - * The geographic taxonomy for this sku. - * - * Generated from protobuf field .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; - * @param \Google\Cloud\Billing\V1\GeoTaxonomy $var - * @return $this - */ - public function setGeoTaxonomy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\GeoTaxonomy::class); - $this->geo_taxonomy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateBillingAccountRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateBillingAccountRequest.php deleted file mode 100644 index 79a12b28f130..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateBillingAccountRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.billing.v1.UpdateBillingAccountRequest - */ -class UpdateBillingAccountRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the billing account resource to be updated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The billing account resource to replace the resource on the - * server. - * - * Generated from protobuf field .google.cloud.billing.v1.BillingAccount account = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $account = null; - /** - * The update mask applied to the resource. - * Only "display_name" is currently supported. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * @param string $name Required. The name of the billing account resource to be updated. Please see - * {@see CloudBillingClient::billingAccountName()} for help formatting this field. - * @param \Google\Cloud\Billing\V1\BillingAccount $account Required. The billing account resource to replace the resource on the - * server. - * - * @return \Google\Cloud\Billing\V1\UpdateBillingAccountRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Billing\V1\BillingAccount $account): self - { - return (new self()) - ->setName($name) - ->setAccount($account); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the billing account resource to be updated. - * @type \Google\Cloud\Billing\V1\BillingAccount $account - * Required. The billing account resource to replace the resource on the - * server. - * @type \Google\Protobuf\FieldMask $update_mask - * The update mask applied to the resource. - * Only "display_name" is currently supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the billing account resource to be updated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the billing account resource to be updated. - * - * 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 billing account resource to replace the resource on the - * server. - * - * Generated from protobuf field .google.cloud.billing.v1.BillingAccount account = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Billing\V1\BillingAccount|null - */ - public function getAccount() - { - return $this->account; - } - - public function hasAccount() - { - return isset($this->account); - } - - public function clearAccount() - { - unset($this->account); - } - - /** - * Required. The billing account resource to replace the resource on the - * server. - * - * Generated from protobuf field .google.cloud.billing.v1.BillingAccount account = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Billing\V1\BillingAccount $var - * @return $this - */ - public function setAccount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\BillingAccount::class); - $this->account = $var; - - return $this; - } - - /** - * The update mask applied to the resource. - * Only "display_name" is currently supported. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The update mask applied to the resource. - * Only "display_name" is currently supported. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateProjectBillingInfoRequest.php b/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateProjectBillingInfoRequest.php deleted file mode 100644 index 3e5bdc3369ac..000000000000 --- a/owl-bot-staging/Billing/v1/proto/src/Google/Cloud/Billing/V1/UpdateProjectBillingInfoRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.billing.v1.UpdateProjectBillingInfoRequest - */ -class UpdateProjectBillingInfoRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project associated with the billing - * information that you want to update. For example, - * `projects/tokyo-rain-123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The new billing information for the project. Output-only fields are - * ignored; thus, you can leave empty all fields except - * `billing_account_name`. - * - * Generated from protobuf field .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 2; - */ - protected $project_billing_info = null; - - /** - * @param string $name Required. The resource name of the project associated with the billing - * information that you want to update. For example, - * `projects/tokyo-rain-123`. - * @param \Google\Cloud\Billing\V1\ProjectBillingInfo $projectBillingInfo The new billing information for the project. Output-only fields are - * ignored; thus, you can leave empty all fields except - * `billing_account_name`. - * - * @return \Google\Cloud\Billing\V1\UpdateProjectBillingInfoRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Billing\V1\ProjectBillingInfo $projectBillingInfo): self - { - return (new self()) - ->setName($name) - ->setProjectBillingInfo($projectBillingInfo); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the project associated with the billing - * information that you want to update. For example, - * `projects/tokyo-rain-123`. - * @type \Google\Cloud\Billing\V1\ProjectBillingInfo $project_billing_info - * The new billing information for the project. Output-only fields are - * ignored; thus, you can leave empty all fields except - * `billing_account_name`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project associated with the billing - * information that you want to update. For example, - * `projects/tokyo-rain-123`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the project associated with the billing - * information that you want to update. For example, - * `projects/tokyo-rain-123`. - * - * 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; - } - - /** - * The new billing information for the project. Output-only fields are - * ignored; thus, you can leave empty all fields except - * `billing_account_name`. - * - * Generated from protobuf field .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 2; - * @return \Google\Cloud\Billing\V1\ProjectBillingInfo|null - */ - public function getProjectBillingInfo() - { - return $this->project_billing_info; - } - - public function hasProjectBillingInfo() - { - return isset($this->project_billing_info); - } - - public function clearProjectBillingInfo() - { - unset($this->project_billing_info); - } - - /** - * The new billing information for the project. Output-only fields are - * ignored; thus, you can leave empty all fields except - * `billing_account_name`. - * - * Generated from protobuf field .google.cloud.billing.v1.ProjectBillingInfo project_billing_info = 2; - * @param \Google\Cloud\Billing\V1\ProjectBillingInfo $var - * @return $this - */ - public function setProjectBillingInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\ProjectBillingInfo::class); - $this->project_billing_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/create_billing_account.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/create_billing_account.php deleted file mode 100644 index db22674467c5..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/create_billing_account.php +++ /dev/null @@ -1,73 +0,0 @@ -setBillingAccount($billingAccount); - - // Call the API and handle any network failures. - try { - /** @var BillingAccount $response */ - $response = $cloudBillingClient->createBillingAccount($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_billing_account.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_billing_account.php deleted file mode 100644 index fdc26cf0cf42..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_billing_account.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BillingAccount $response */ - $response = $cloudBillingClient->getBillingAccount($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 = CloudBillingClient::billingAccountName('[BILLING_ACCOUNT]'); - - get_billing_account_sample($formattedName); -} -// [END cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_iam_policy.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_iam_policy.php deleted file mode 100644 index 167a07d46372..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_iam_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $cloudBillingClient->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 cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_project_billing_info.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_project_billing_info.php deleted file mode 100644 index 0620623c5790..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/get_project_billing_info.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ProjectBillingInfo $response */ - $response = $cloudBillingClient->getProjectBillingInfo($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 = CloudBillingClient::projectName('[PROJECT]'); - - get_project_billing_info_sample($formattedName); -} -// [END cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_billing_accounts.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_billing_accounts.php deleted file mode 100644 index f030853f6ca3..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_billing_accounts.php +++ /dev/null @@ -1,64 +0,0 @@ -listBillingAccounts($request); - - /** @var BillingAccount $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 cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_project_billing_info.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_project_billing_info.php deleted file mode 100644 index 1abfebe31624..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/list_project_billing_info.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudBillingClient->listProjectBillingInfo($request); - - /** @var ProjectBillingInfo $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudBillingClient::billingAccountName('[BILLING_ACCOUNT]'); - - list_project_billing_info_sample($formattedName); -} -// [END cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/move_billing_account.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/move_billing_account.php deleted file mode 100644 index d20882ff5de1..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/move_billing_account.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName) - ->setDestinationParent($formattedDestinationParent); - - // Call the API and handle any network failures. - try { - /** @var BillingAccount $response */ - $response = $cloudBillingClient->moveBillingAccount($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 = CloudBillingClient::billingAccountName('[BILLING_ACCOUNT]'); - $formattedDestinationParent = CloudBillingClient::organizationName('[ORGANIZATION]'); - - move_billing_account_sample($formattedName, $formattedDestinationParent); -} -// [END cloudbilling_v1_generated_CloudBilling_MoveBillingAccount_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/set_iam_policy.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/set_iam_policy.php deleted file mode 100644 index fafbe488a850..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/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 = $cloudBillingClient->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 cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/test_iam_permissions.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/test_iam_permissions.php deleted file mode 100644 index 61ba0ecaf9cf..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $cloudBillingClient->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 cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_billing_account.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_billing_account.php deleted file mode 100644 index b3c0a27b78d1..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_billing_account.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName) - ->setAccount($account); - - // Call the API and handle any network failures. - try { - /** @var BillingAccount $response */ - $response = $cloudBillingClient->updateBillingAccount($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 = CloudBillingClient::billingAccountName('[BILLING_ACCOUNT]'); - - update_billing_account_sample($formattedName); -} -// [END cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_project_billing_info.php b/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_project_billing_info.php deleted file mode 100644 index f18bc819c68a..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudBillingClient/update_project_billing_info.php +++ /dev/null @@ -1,103 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var ProjectBillingInfo $response */ - $response = $cloudBillingClient->updateProjectBillingInfo($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 -{ - $name = '[NAME]'; - - update_project_billing_info_sample($name); -} -// [END cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_services.php b/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_services.php deleted file mode 100644 index 8aa91e545a29..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_services.php +++ /dev/null @@ -1,62 +0,0 @@ -listServices($request); - - /** @var Service $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 cloudbilling_v1_generated_CloudCatalog_ListServices_sync] diff --git a/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_skus.php b/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_skus.php deleted file mode 100644 index 3dde886ac7e9..000000000000 --- a/owl-bot-staging/Billing/v1/samples/V1/CloudCatalogClient/list_skus.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudCatalogClient->listSkus($request); - - /** @var Sku $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 = CloudCatalogClient::serviceName('[SERVICE]'); - - list_skus_sample($formattedParent); -} -// [END cloudbilling_v1_generated_CloudCatalog_ListSkus_sync] diff --git a/owl-bot-staging/Billing/v1/src/V1/Client/CloudBillingClient.php b/owl-bot-staging/Billing/v1/src/V1/Client/CloudBillingClient.php deleted file mode 100644 index 8cfa9a134033..000000000000 --- a/owl-bot-staging/Billing/v1/src/V1/Client/CloudBillingClient.php +++ /dev/null @@ -1,659 +0,0 @@ - createBillingAccountAsync(CreateBillingAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBillingAccountAsync(GetBillingAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProjectBillingInfoAsync(GetProjectBillingInfoRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBillingAccountsAsync(ListBillingAccountsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProjectBillingInfoAsync(ListProjectBillingInfoRequest $request, array $optionalArgs = []) - * @method PromiseInterface moveBillingAccountAsync(MoveBillingAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBillingAccountAsync(UpdateBillingAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest $request, array $optionalArgs = []) - */ -final class CloudBillingClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.billing.v1.CloudBilling'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudbilling.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudbilling.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-billing', - 'https://www.googleapis.com/auth/cloud-billing.readonly', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_billing_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_billing_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_billing_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_billing_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account resource. - */ - public static function billingAccountName(string $billingAccount): string - { - return self::getPathTemplate('billingAccount')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_billing_account resource. - * - * @param string $organization - * @param string $billingAccount - * - * @return string The formatted organization_billing_account resource. - */ - public static function organizationBillingAccountName(string $organization, string $billingAccount): string - { - return self::getPathTemplate('organizationBillingAccount')->render([ - 'organization' => $organization, - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_billing_info resource. - * - * @param string $project - * - * @return string The formatted project_billing_info resource. - */ - public static function projectBillingInfoName(string $project): string - { - return self::getPathTemplate('projectBillingInfo')->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - billingAccount: billingAccounts/{billing_account} - * - organization: organizations/{organization} - * - organizationBillingAccount: organizations/{organization}/billingAccounts/{billing_account} - * - project: projects/{project} - * - projectBillingInfo: projects/{project}/billingInfo - * - * 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 'cloudbilling.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); - } - - /** - * This method creates [billing - * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). - * - * Google Cloud resellers should use the - * Channel Services APIs, - * [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) - * and - * [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). - * - * When creating a subaccount, the current authenticated user must have the - * `billing.accounts.update` IAM permission on the parent account, which is - * typically given to billing account - * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). - * This method will return an error if the parent account has not been - * provisioned for subaccounts. - * - * The async variant is {@see CloudBillingClient::createBillingAccountAsync()} . - * - * @example samples/V1/CloudBillingClient/create_billing_account.php - * - * @param CreateBillingAccountRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BillingAccount - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBillingAccount(CreateBillingAccountRequest $request, array $callOptions = []): BillingAccount - { - return $this->startApiCall('CreateBillingAccount', $request, $callOptions)->wait(); - } - - /** - * Gets information about a billing account. The current authenticated user - * must be a [viewer of the billing - * account](https://cloud.google.com/billing/docs/how-to/billing-access). - * - * The async variant is {@see CloudBillingClient::getBillingAccountAsync()} . - * - * @example samples/V1/CloudBillingClient/get_billing_account.php - * - * @param GetBillingAccountRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BillingAccount - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBillingAccount(GetBillingAccountRequest $request, array $callOptions = []): BillingAccount - { - return $this->startApiCall('GetBillingAccount', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a billing account. - * The caller must have the `billing.accounts.getIamPolicy` permission on the - * account, which is often given to billing account - * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). - * - * The async variant is {@see CloudBillingClient::getIamPolicyAsync()} . - * - * @example samples/V1/CloudBillingClient/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(); - } - - /** - * Gets the billing information for a project. The current authenticated user - * must have the `resourcemanager.projects.get` permission for the project, - * which can be granted by assigning the [Project - * Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) - * role. - * - * The async variant is {@see CloudBillingClient::getProjectBillingInfoAsync()} . - * - * @example samples/V1/CloudBillingClient/get_project_billing_info.php - * - * @param GetProjectBillingInfoRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProjectBillingInfo - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProjectBillingInfo(GetProjectBillingInfoRequest $request, array $callOptions = []): ProjectBillingInfo - { - return $this->startApiCall('GetProjectBillingInfo', $request, $callOptions)->wait(); - } - - /** - * Lists the billing accounts that the current authenticated user has - * permission to - * [view](https://cloud.google.com/billing/docs/how-to/billing-access). - * - * The async variant is {@see CloudBillingClient::listBillingAccountsAsync()} . - * - * @example samples/V1/CloudBillingClient/list_billing_accounts.php - * - * @param ListBillingAccountsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBillingAccounts(ListBillingAccountsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBillingAccounts', $request, $callOptions); - } - - /** - * Lists the projects associated with a billing account. The current - * authenticated user must have the `billing.resourceAssociations.list` IAM - * permission, which is often given to billing account - * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). - * - * The async variant is {@see CloudBillingClient::listProjectBillingInfoAsync()} . - * - * @example samples/V1/CloudBillingClient/list_project_billing_info.php - * - * @param ListProjectBillingInfoRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listProjectBillingInfo(ListProjectBillingInfoRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProjectBillingInfo', $request, $callOptions); - } - - /** - * Changes which parent organization a billing account belongs to. - * - * The async variant is {@see CloudBillingClient::moveBillingAccountAsync()} . - * - * @example samples/V1/CloudBillingClient/move_billing_account.php - * - * @param MoveBillingAccountRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BillingAccount - * - * @throws ApiException Thrown if the API call fails. - */ - public function moveBillingAccount(MoveBillingAccountRequest $request, array $callOptions = []): BillingAccount - { - return $this->startApiCall('MoveBillingAccount', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy for a billing account. Replaces any existing - * policy. - * The caller must have the `billing.accounts.setIamPolicy` permission on the - * account, which is often given to billing account - * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). - * - * The async variant is {@see CloudBillingClient::setIamPolicyAsync()} . - * - * @example samples/V1/CloudBillingClient/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(); - } - - /** - * Tests the access control policy for a billing account. This method takes - * the resource and a set of permissions as input and returns the subset of - * the input permissions that the caller is allowed for that resource. - * - * The async variant is {@see CloudBillingClient::testIamPermissionsAsync()} . - * - * @example samples/V1/CloudBillingClient/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(); - } - - /** - * Updates a billing account's fields. - * Currently the only field that can be edited is `display_name`. - * The current authenticated user must have the `billing.accounts.update` - * IAM permission, which is typically given to the - * [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) - * of the billing account. - * - * The async variant is {@see CloudBillingClient::updateBillingAccountAsync()} . - * - * @example samples/V1/CloudBillingClient/update_billing_account.php - * - * @param UpdateBillingAccountRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BillingAccount - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBillingAccount(UpdateBillingAccountRequest $request, array $callOptions = []): BillingAccount - { - return $this->startApiCall('UpdateBillingAccount', $request, $callOptions)->wait(); - } - - /** - * Sets or updates the billing account associated with a project. You specify - * the new billing account by setting the `billing_account_name` in the - * `ProjectBillingInfo` resource to the resource name of a billing account. - * Associating a project with an open billing account enables billing on the - * project and allows charges for resource usage. If the project already had a - * billing account, this method changes the billing account used for resource - * usage charges. - * - * *Note:* Incurred charges that have not yet been reported in the transaction - * history of the Google Cloud Console might be billed to the new billing - * account, even if the charge occurred before the new billing account was - * assigned to the project. - * - * The current authenticated user must have ownership privileges for both - * the - * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo - * ) and the [billing - * account](https://cloud.google.com/billing/docs/how-to/billing-access). - * - * You can disable billing on the project by setting the - * `billing_account_name` field to empty. This action disassociates the - * current billing account from the project. Any billable activity of your - * in-use services will stop, and your application could stop functioning as - * expected. Any unbilled charges to date will be billed to the previously - * associated account. The current authenticated user must be either an owner - * of the project or an owner of the billing account for the project. - * - * Note that associating a project with a *closed* billing account will have - * much the same effect as disabling billing on the project: any paid - * resources used by the project will be shut down. Thus, unless you wish to - * disable billing, you should always call this method with the name of an - * *open* billing account. - * - * The async variant is {@see CloudBillingClient::updateProjectBillingInfoAsync()} - * . - * - * @example samples/V1/CloudBillingClient/update_project_billing_info.php - * - * @param UpdateProjectBillingInfoRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProjectBillingInfo - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateProjectBillingInfo(UpdateProjectBillingInfoRequest $request, array $callOptions = []): ProjectBillingInfo - { - return $this->startApiCall('UpdateProjectBillingInfo', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Billing/v1/src/V1/Client/CloudCatalogClient.php b/owl-bot-staging/Billing/v1/src/V1/Client/CloudCatalogClient.php deleted file mode 100644 index 43ab99307e96..000000000000 --- a/owl-bot-staging/Billing/v1/src/V1/Client/CloudCatalogClient.php +++ /dev/null @@ -1,267 +0,0 @@ - listServicesAsync(ListServicesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSkusAsync(ListSkusRequest $request, array $optionalArgs = []) - */ -final class CloudCatalogClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.billing.v1.CloudCatalog'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudbilling.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudbilling.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-billing', - 'https://www.googleapis.com/auth/cloud-billing.readonly', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_catalog_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_catalog_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_catalog_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_catalog_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $service): string - { - return self::getPathTemplate('service')->render([ - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - service: services/{service} - * - * 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 'cloudbilling.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); - } - - /** - * Lists all public cloud services. - * - * The async variant is {@see CloudCatalogClient::listServicesAsync()} . - * - * @example samples/V1/CloudCatalogClient/list_services.php - * - * @param ListServicesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listServices(ListServicesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListServices', $request, $callOptions); - } - - /** - * Lists all publicly available SKUs for a given cloud service. - * - * The async variant is {@see CloudCatalogClient::listSkusAsync()} . - * - * @example samples/V1/CloudCatalogClient/list_skus.php - * - * @param ListSkusRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSkus(ListSkusRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSkus', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Billing/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Billing/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 2a4be5d5a8ee..000000000000 --- a/owl-bot-staging/Billing/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.billing.v1", - "libraryPackage": "Google\\Cloud\\Billing\\V1", - "services": { - "CloudBilling": { - "clients": { - "grpc": { - "libraryClient": "CloudBillingGapicClient", - "rpcs": { - "CreateBillingAccount": { - "methods": [ - "createBillingAccount" - ] - }, - "GetBillingAccount": { - "methods": [ - "getBillingAccount" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetProjectBillingInfo": { - "methods": [ - "getProjectBillingInfo" - ] - }, - "ListBillingAccounts": { - "methods": [ - "listBillingAccounts" - ] - }, - "ListProjectBillingInfo": { - "methods": [ - "listProjectBillingInfo" - ] - }, - "MoveBillingAccount": { - "methods": [ - "moveBillingAccount" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateBillingAccount": { - "methods": [ - "updateBillingAccount" - ] - }, - "UpdateProjectBillingInfo": { - "methods": [ - "updateProjectBillingInfo" - ] - } - } - } - } - }, - "CloudCatalog": { - "clients": { - "grpc": { - "libraryClient": "CloudCatalogGapicClient", - "rpcs": { - "ListServices": { - "methods": [ - "listServices" - ] - }, - "ListSkus": { - "methods": [ - "listSkus" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_client_config.json b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_client_config.json deleted file mode 100644 index 361a072c3d27..000000000000 --- a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_client_config.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "interfaces": { - "google.cloud.billing.v1.CloudBilling": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateBillingAccount": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBillingAccount": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetProjectBillingInfo": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBillingAccounts": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListProjectBillingInfo": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "MoveBillingAccount": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateBillingAccount": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateProjectBillingInfo": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_descriptor_config.php b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_descriptor_config.php deleted file mode 100644 index 8ca1e982a3d7..000000000000 --- a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_descriptor_config.php +++ /dev/null @@ -1,189 +0,0 @@ - [ - 'google.cloud.billing.v1.CloudBilling' => [ - 'CreateBillingAccount' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\BillingAccount', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetBillingAccount' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\BillingAccount', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetProjectBillingInfo' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\ProjectBillingInfo', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBillingAccounts' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBillingAccounts', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\ListBillingAccountsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProjectBillingInfo' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProjectBillingInfo', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\ListProjectBillingInfoResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'MoveBillingAccount' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\BillingAccount', - 'headerParams' => [ - [ - 'keyName' => 'destination_parent', - 'fieldAccessors' => [ - 'getDestinationParent', - ], - ], - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - 'UpdateBillingAccount' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\BillingAccount', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateProjectBillingInfo' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\ProjectBillingInfo', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'billingAccount' => 'billingAccounts/{billing_account}', - 'organization' => 'organizations/{organization}', - 'organizationBillingAccount' => 'organizations/{organization}/billingAccounts/{billing_account}', - 'project' => 'projects/{project}', - 'projectBillingInfo' => 'projects/{project}/billingInfo', - ], - ], - ], -]; diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_rest_client_config.php b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_rest_client_config.php deleted file mode 100644 index b2500432e22c..000000000000 --- a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_billing_rest_client_config.php +++ /dev/null @@ -1,190 +0,0 @@ - [ - 'google.cloud.billing.v1.CloudBilling' => [ - 'CreateBillingAccount' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/billingAccounts', - 'body' => 'billing_account', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*}/billingAccounts', - 'body' => 'billing_account', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=billingAccounts/*}/subAccounts', - 'body' => 'billing_account', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetBillingAccount' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=billingAccounts/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=billingAccounts/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetProjectBillingInfo' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/billingInfo', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBillingAccounts' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/billingAccounts', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*}/billingAccounts', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=billingAccounts/*}/subAccounts', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProjectBillingInfo' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=billingAccounts/*}/projects', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'MoveBillingAccount' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=billingAccounts/*}:move', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{destination_parent=organizations/*}/{name=billingAccounts/*}:move', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'destination_parent' => [ - 'getters' => [ - 'getDestinationParent', - ], - ], - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=billingAccounts/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=billingAccounts/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateBillingAccount' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=billingAccounts/*}', - 'body' => 'account', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateProjectBillingInfo' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{name=projects/*}/billingInfo', - 'body' => 'project_billing_info', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_client_config.json b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_client_config.json deleted file mode 100644 index defb23b62279..000000000000 --- a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_client_config.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "interfaces": { - "google.cloud.billing.v1.CloudCatalog": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_2_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "ListServices": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "ListSkus": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_descriptor_config.php b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_descriptor_config.php deleted file mode 100644 index e4ea2ad57c7c..000000000000 --- a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_descriptor_config.php +++ /dev/null @@ -1,63 +0,0 @@ - [ - 'google.cloud.billing.v1.CloudCatalog' => [ - 'ListServices' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getServices', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\ListServicesResponse', - ], - 'ListSkus' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSkus', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Billing\V1\ListSkusResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'service' => 'services/{service}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_rest_client_config.php b/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_rest_client_config.php deleted file mode 100644 index e4490137b9cb..000000000000 --- a/owl-bot-staging/Billing/v1/src/V1/resources/cloud_catalog_rest_client_config.php +++ /dev/null @@ -1,44 +0,0 @@ - [ - 'google.cloud.billing.v1.CloudCatalog' => [ - 'ListServices' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/services', - ], - 'ListSkus' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=services/*}/skus', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudBillingClientTest.php b/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudBillingClientTest.php deleted file mode 100644 index a5b507bfb320..000000000000 --- a/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudBillingClientTest.php +++ /dev/null @@ -1,896 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudBillingClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudBillingClient($options); - } - - /** @test */ - public function createBillingAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $open = true; - $displayName = 'displayName1615086568'; - $masterBillingAccount = 'masterBillingAccount1503143052'; - $parent2 = 'parent21175163357'; - $expectedResponse = new BillingAccount(); - $expectedResponse->setName($name); - $expectedResponse->setOpen($open); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMasterBillingAccount($masterBillingAccount); - $expectedResponse->setParent($parent2); - $transport->addResponse($expectedResponse); - // Mock request - $billingAccount = new BillingAccount(); - $request = (new CreateBillingAccountRequest()) - ->setBillingAccount($billingAccount); - $response = $gapicClient->createBillingAccount($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.billing.v1.CloudBilling/CreateBillingAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getBillingAccount(); - $this->assertProtobufEquals($billingAccount, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBillingAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $billingAccount = new BillingAccount(); - $request = (new CreateBillingAccountRequest()) - ->setBillingAccount($billingAccount); - try { - $gapicClient->createBillingAccount($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBillingAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $open = true; - $displayName = 'displayName1615086568'; - $masterBillingAccount = 'masterBillingAccount1503143052'; - $parent = 'parent-995424086'; - $expectedResponse = new BillingAccount(); - $expectedResponse->setName($name2); - $expectedResponse->setOpen($open); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMasterBillingAccount($masterBillingAccount); - $expectedResponse->setParent($parent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); - $request = (new GetBillingAccountRequest()) - ->setName($formattedName); - $response = $gapicClient->getBillingAccount($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.billing.v1.CloudBilling/GetBillingAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBillingAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); - $request = (new GetBillingAccountRequest()) - ->setName($formattedName); - try { - $gapicClient->getBillingAccount($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.billing.v1.CloudBilling/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 getProjectBillingInfoTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $projectId = 'projectId-1969970175'; - $billingAccountName = 'billingAccountName-1056086879'; - $billingEnabled = false; - $expectedResponse = new ProjectBillingInfo(); - $expectedResponse->setName($name2); - $expectedResponse->setProjectId($projectId); - $expectedResponse->setBillingAccountName($billingAccountName); - $expectedResponse->setBillingEnabled($billingEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $request = (new GetProjectBillingInfoRequest()) - ->setName($formattedName); - $response = $gapicClient->getProjectBillingInfo($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.billing.v1.CloudBilling/GetProjectBillingInfo', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProjectBillingInfoExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->projectName('[PROJECT]'); - $request = (new GetProjectBillingInfoRequest()) - ->setName($formattedName); - try { - $gapicClient->getProjectBillingInfo($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBillingAccountsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $billingAccountsElement = new BillingAccount(); - $billingAccounts = [ - $billingAccountsElement, - ]; - $expectedResponse = new ListBillingAccountsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBillingAccounts($billingAccounts); - $transport->addResponse($expectedResponse); - $request = new ListBillingAccountsRequest(); - $response = $gapicClient->listBillingAccounts($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBillingAccounts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.billing.v1.CloudBilling/ListBillingAccounts', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBillingAccountsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 ListBillingAccountsRequest(); - try { - $gapicClient->listBillingAccounts($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProjectBillingInfoTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $projectBillingInfoElement = new ProjectBillingInfo(); - $projectBillingInfo = [ - $projectBillingInfoElement, - ]; - $expectedResponse = new ListProjectBillingInfoResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProjectBillingInfo($projectBillingInfo); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); - $request = (new ListProjectBillingInfoRequest()) - ->setName($formattedName); - $response = $gapicClient->listProjectBillingInfo($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProjectBillingInfo()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.billing.v1.CloudBilling/ListProjectBillingInfo', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProjectBillingInfoExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); - $request = (new ListProjectBillingInfoRequest()) - ->setName($formattedName); - try { - $gapicClient->listProjectBillingInfo($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function moveBillingAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $open = true; - $displayName = 'displayName1615086568'; - $masterBillingAccount = 'masterBillingAccount1503143052'; - $parent = 'parent-995424086'; - $expectedResponse = new BillingAccount(); - $expectedResponse->setName($name2); - $expectedResponse->setOpen($open); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMasterBillingAccount($masterBillingAccount); - $expectedResponse->setParent($parent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); - $formattedDestinationParent = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new MoveBillingAccountRequest()) - ->setName($formattedName) - ->setDestinationParent($formattedDestinationParent); - $response = $gapicClient->moveBillingAccount($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.billing.v1.CloudBilling/MoveBillingAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getDestinationParent(); - $this->assertProtobufEquals($formattedDestinationParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function moveBillingAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); - $formattedDestinationParent = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new MoveBillingAccountRequest()) - ->setName($formattedName) - ->setDestinationParent($formattedDestinationParent); - try { - $gapicClient->moveBillingAccount($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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.billing.v1.CloudBilling/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.billing.v1.CloudBilling/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 updateBillingAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $open = true; - $displayName = 'displayName1615086568'; - $masterBillingAccount = 'masterBillingAccount1503143052'; - $parent = 'parent-995424086'; - $expectedResponse = new BillingAccount(); - $expectedResponse->setName($name2); - $expectedResponse->setOpen($open); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMasterBillingAccount($masterBillingAccount); - $expectedResponse->setParent($parent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); - $account = new BillingAccount(); - $request = (new UpdateBillingAccountRequest()) - ->setName($formattedName) - ->setAccount($account); - $response = $gapicClient->updateBillingAccount($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.billing.v1.CloudBilling/UpdateBillingAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getAccount(); - $this->assertProtobufEquals($account, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBillingAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); - $account = new BillingAccount(); - $request = (new UpdateBillingAccountRequest()) - ->setName($formattedName) - ->setAccount($account); - try { - $gapicClient->updateBillingAccount($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProjectBillingInfoTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $projectId = 'projectId-1969970175'; - $billingAccountName = 'billingAccountName-1056086879'; - $billingEnabled = false; - $expectedResponse = new ProjectBillingInfo(); - $expectedResponse->setName($name2); - $expectedResponse->setProjectId($projectId); - $expectedResponse->setBillingAccountName($billingAccountName); - $expectedResponse->setBillingEnabled($billingEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new UpdateProjectBillingInfoRequest()) - ->setName($name); - $response = $gapicClient->updateProjectBillingInfo($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.billing.v1.CloudBilling/UpdateProjectBillingInfo', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProjectBillingInfoExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new UpdateProjectBillingInfoRequest()) - ->setName($name); - try { - $gapicClient->updateProjectBillingInfo($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBillingAccountAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $open = true; - $displayName = 'displayName1615086568'; - $masterBillingAccount = 'masterBillingAccount1503143052'; - $parent2 = 'parent21175163357'; - $expectedResponse = new BillingAccount(); - $expectedResponse->setName($name); - $expectedResponse->setOpen($open); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMasterBillingAccount($masterBillingAccount); - $expectedResponse->setParent($parent2); - $transport->addResponse($expectedResponse); - // Mock request - $billingAccount = new BillingAccount(); - $request = (new CreateBillingAccountRequest()) - ->setBillingAccount($billingAccount); - $response = $gapicClient->createBillingAccountAsync($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.billing.v1.CloudBilling/CreateBillingAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getBillingAccount(); - $this->assertProtobufEquals($billingAccount, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudCatalogClientTest.php b/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudCatalogClientTest.php deleted file mode 100644 index 8a0e8144a0d3..000000000000 --- a/owl-bot-staging/Billing/v1/tests/Unit/V1/Client/CloudCatalogClientTest.php +++ /dev/null @@ -1,234 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudCatalogClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudCatalogClient($options); - } - - /** @test */ - public function listServicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $servicesElement = new Service(); - $services = [ - $servicesElement, - ]; - $expectedResponse = new ListServicesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServices($services); - $transport->addResponse($expectedResponse); - $request = new ListServicesRequest(); - $response = $gapicClient->listServices($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.billing.v1.CloudCatalog/ListServices', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServicesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 ListServicesRequest(); - try { - $gapicClient->listServices($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSkusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $skusElement = new Sku(); - $skus = [ - $skusElement, - ]; - $expectedResponse = new ListSkusResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSkus($skus); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->serviceName('[SERVICE]'); - $request = (new ListSkusRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSkus($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSkus()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.billing.v1.CloudCatalog/ListSkus', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSkusExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->serviceName('[SERVICE]'); - $request = (new ListSkusRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSkus($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServicesAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $servicesElement = new Service(); - $services = [ - $servicesElement, - ]; - $expectedResponse = new ListServicesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServices($services); - $transport->addResponse($expectedResponse); - $request = new ListServicesRequest(); - $response = $gapicClient->listServicesAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.billing.v1.CloudCatalog/ListServices', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetModel.php b/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetModel.php deleted file mode 100644 index ac3eb139bb539f6bd17418ed957b3d1ae906a580..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3128 zcmb7G&2k$>5RRAV1PDoZ|g#)F;Q2Mj2LY9Oir$|cF)@XNR4Xk#z zc6L>ml%IiD;9)p$U*8a0S$>wLNeHso(5InX;4v~ z1{LLL@M`-7faMU*b+vRL9Ku`B@z0Nj4zqL~k`VtrWZYyf3mI|PubA47J|YgMh(B*T zid-vXo~sK$+qLM{V_o?awhw&|so2qHp>+g1$jqSOhBR=AGpJE+1YA6u2*B+`_?0@-?`CxU$a%yNo(^g^tOT zc|oakn$@Y3%b;Bvm-M|+2^~EQ-3s6Txc;$E2Q}2)2SN@!mmXh?k)?X}4T}p?w(X=2 zyC~qTggL?EBlvF}iXX0AZBtV7D`b6ZfHu8U^VM%p@whq@tN99s_YU^et{ZBcq-G&vLao-`w zrrcT(TUr%XRjlTSIjG=V8kaN0!6QSRa%o-$a)|cAcS@_k5}A0B8|JP{__Hg~D$cS5 z2_Fku6K;iLBxvk8wi!eY<+(*YjjagJ4z-d{CYf_A@%9bUl;)S>If=SfM zNirngDo-c*-&3$MPnBjsmiyGg#Hek?oQoo7irOqIp%+8;#r`#|4H{0!(DZ4*yaXX? zpDAw75SMA!Xd<*Dk*ZSr*DALX!Kl;o8f4!!%m0~z)iXuWK7;ks>S8b!MX`v$Q>ywc z$Y5TsZ4L=%JSPHND}HrlfM*UdDgrC(lHY?x`Ahp4)+^;+qh}trdYyW;vD>KEve&Rd zR;!2IZoSnvak*8?rm#V>yX|hhTJH7hwRm+Q|91-3&&ff%2P=5P@Mvg;p3kh)K1*r$ zVU1g3Iw9ti1{}2~lTmWfo`H@X%kXl*JJFn1sA-Lf>r#hf2c~0nXvC$ixg#06s$ox$L)PCHbeYNnL4+^W-OLg{DKN)S0(lL|T<~{*OgiQZ0-WEyoCs zi6n<_f;O91Cc%4f=2#LAhhb4y$1;a}iXr}o5ePd`!RNW1O zV|8>JZdt@ZwUQuitlY9pt8k^uYK&7|CEa0{eg~^og#1os?rx&HO!4Y5T9v3X&Ndp5 znTuGBBTtQ4v}hQ%pyA}TeRDQ?W-o!vl2lkxDCuqZ8joyz}~g4-8WK>Gsn)vkE= znf=$Dde7{4>*fA|=%%x6b{9Tsw5rX+THP!+o2J6_u-R~<{=@l=1?^L~H$x=-n&8rv zHCTx_IifL9c^g*dInbT};Cm_vO>tq$q%+0!S(b7#ibsaveL>rTWifH2rJ9HrTc)1$ zVC`(-v`x5QEjMv+l)Gl9-fgsN?__=x77yC3{yyfKfg9f+mb?9WH@l!M!}ZtoayOf< z`~nZ~c9_L>*$l2^)%=%_+m3i`c2aM4l=bY2#yjT7JNMGY`zLv9bAR|k-6{ArT$1H} a{wR3?JykEwxrgbck5Xx=o{lGQ0`NZy&f%i~ diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetService.php b/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetService.php deleted file mode 100644 index 031bf94e9cfc..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/GPBMetadata/Google/Cloud/Billing/Budgets/V1/BudgetService.php +++ /dev/null @@ -1,61 +0,0 @@ -internalAddGeneratedFile( - ' -ä -4google/cloud/billing/budgets/v1/budget_service.protogoogle.cloud.billing.budgets.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/billing/budgets/v1/budget_model.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"‘ -CreateBudgetRequest< -parent ( B,àAúA&$billingbudgets.googleapis.com/Budget< -budget ( 2\'.google.cloud.billing.budgets.v1.BudgetBàA"‰ -UpdateBudgetRequest< -budget ( 2\'.google.cloud.billing.budgets.v1.BudgetBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"N -GetBudgetRequest: -name ( B,àAúA& -$billingbudgets.googleapis.com/Budget"— -ListBudgetsRequest< -parent ( B,àAúA&$billingbudgets.googleapis.com/Budget -scope ( BàA - page_size (BàA - -page_token ( BàA"h -ListBudgetsResponse8 -budgets ( 2\'.google.cloud.billing.budgets.v1.Budget -next_page_token ( "Q -DeleteBudgetRequest: -name ( B,àAúA& -$billingbudgets.googleapis.com/Budget2÷ - BudgetServiceµ - CreateBudget4.google.cloud.billing.budgets.v1.CreateBudgetRequest\'.google.cloud.billing.budgets.v1.Budget"FÚA parent,budget‚Óä“0"&/v1/{parent=billingAccounts/*}/budgets:budgetÁ - UpdateBudget4.google.cloud.billing.budgets.v1.UpdateBudgetRequest\'.google.cloud.billing.budgets.v1.Budget"RÚAbudget,update_mask‚Óä“72-/v1/{budget.name=billingAccounts/*/budgets/*}:budgetž - GetBudget1.google.cloud.billing.budgets.v1.GetBudgetRequest\'.google.cloud.billing.budgets.v1.Budget"5ÚAname‚Óä“(&/v1/{name=billingAccounts/*/budgets/*}± - ListBudgets3.google.cloud.billing.budgets.v1.ListBudgetsRequest4.google.cloud.billing.budgets.v1.ListBudgetsResponse"7ÚAparent‚Óä“(&/v1/{parent=billingAccounts/*}/budgets“ - DeleteBudget4.google.cloud.billing.budgets.v1.DeleteBudgetRequest.google.protobuf.Empty"5ÚAname‚Óä“(*&/v1/{name=billingAccounts/*/budgets/*}ÊAbillingbudgets.googleapis.comÒA\\https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-platformBz -#com.google.cloud.billing.budgets.v1BBudgetServiceProtoPZ=cloud.google.com/go/billing/budgets/apiv1/budgetspb;budgetspbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Budget.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Budget.php deleted file mode 100644 index 0da2acd85199..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Budget.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.billing.budgets.v1.Budget - */ -class Budget extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of the budget. - * The resource name implies the scope of a budget. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * User data for display name in UI. The name must be less than or equal to 60 - * characters. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Optional. Filters that define which resources are used to compute the - * actual spend against the budget amount, such as projects, services, and the - * budget's time period, as well as other filters. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $budget_filter = null; - /** - * Required. Budgeted amount. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $amount = null; - /** - * Optional. Rules that trigger alerts (notifications of thresholds - * being crossed) when spend exceeds the specified percentages of the budget. - * Optional for `pubsubTopic` notifications. - * Required if using email notifications. - * - * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $threshold_rules; - /** - * Optional. Rules to apply to notifications sent based on budget spend and - * thresholds. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $notifications_rule = null; - /** - * Optional. Etag to validate that the object is unchanged for a - * read-modify-write operation. - * An empty etag causes an update to overwrite other changes. - * - * Generated from protobuf field string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Resource name of the budget. - * The resource name implies the scope of a budget. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * @type string $display_name - * User data for display name in UI. The name must be less than or equal to 60 - * characters. - * @type \Google\Cloud\Billing\Budgets\V1\Filter $budget_filter - * Optional. Filters that define which resources are used to compute the - * actual spend against the budget amount, such as projects, services, and the - * budget's time period, as well as other filters. - * @type \Google\Cloud\Billing\Budgets\V1\BudgetAmount $amount - * Required. Budgeted amount. - * @type array<\Google\Cloud\Billing\Budgets\V1\ThresholdRule>|\Google\Protobuf\Internal\RepeatedField $threshold_rules - * Optional. Rules that trigger alerts (notifications of thresholds - * being crossed) when spend exceeds the specified percentages of the budget. - * Optional for `pubsubTopic` notifications. - * Required if using email notifications. - * @type \Google\Cloud\Billing\Budgets\V1\NotificationsRule $notifications_rule - * Optional. Rules to apply to notifications sent based on budget spend and - * thresholds. - * @type string $etag - * Optional. Etag to validate that the object is unchanged for a - * read-modify-write operation. - * An empty etag causes an update to overwrite other changes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of the budget. - * The resource name implies the scope of a budget. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of the budget. - * The resource name implies the scope of a budget. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * - * 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; - } - - /** - * User data for display name in UI. The name must be less than or equal to 60 - * characters. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User data for display name in UI. The name must be less than or equal to 60 - * characters. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Filters that define which resources are used to compute the - * actual spend against the budget amount, such as projects, services, and the - * budget's time period, as well as other filters. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Billing\Budgets\V1\Filter|null - */ - public function getBudgetFilter() - { - return $this->budget_filter; - } - - public function hasBudgetFilter() - { - return isset($this->budget_filter); - } - - public function clearBudgetFilter() - { - unset($this->budget_filter); - } - - /** - * Optional. Filters that define which resources are used to compute the - * actual spend against the budget amount, such as projects, services, and the - * budget's time period, as well as other filters. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Billing\Budgets\V1\Filter $var - * @return $this - */ - public function setBudgetFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\Filter::class); - $this->budget_filter = $var; - - return $this; - } - - /** - * Required. Budgeted amount. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Billing\Budgets\V1\BudgetAmount|null - */ - public function getAmount() - { - return $this->amount; - } - - public function hasAmount() - { - return isset($this->amount); - } - - public function clearAmount() - { - unset($this->amount); - } - - /** - * Required. Budgeted amount. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Billing\Budgets\V1\BudgetAmount $var - * @return $this - */ - public function setAmount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\BudgetAmount::class); - $this->amount = $var; - - return $this; - } - - /** - * Optional. Rules that trigger alerts (notifications of thresholds - * being crossed) when spend exceeds the specified percentages of the budget. - * Optional for `pubsubTopic` notifications. - * Required if using email notifications. - * - * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThresholdRules() - { - return $this->threshold_rules; - } - - /** - * Optional. Rules that trigger alerts (notifications of thresholds - * being crossed) when spend exceeds the specified percentages of the budget. - * Optional for `pubsubTopic` notifications. - * Required if using email notifications. - * - * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Billing\Budgets\V1\ThresholdRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThresholdRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\Budgets\V1\ThresholdRule::class); - $this->threshold_rules = $arr; - - return $this; - } - - /** - * Optional. Rules to apply to notifications sent based on budget spend and - * thresholds. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Billing\Budgets\V1\NotificationsRule|null - */ - public function getNotificationsRule() - { - return $this->notifications_rule; - } - - public function hasNotificationsRule() - { - return isset($this->notifications_rule); - } - - public function clearNotificationsRule() - { - unset($this->notifications_rule); - } - - /** - * Optional. Rules to apply to notifications sent based on budget spend and - * thresholds. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Billing\Budgets\V1\NotificationsRule $var - * @return $this - */ - public function setNotificationsRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\NotificationsRule::class); - $this->notifications_rule = $var; - - return $this; - } - - /** - * Optional. Etag to validate that the object is unchanged for a - * read-modify-write operation. - * An empty etag causes an update to overwrite other changes. - * - * Generated from protobuf field string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. Etag to validate that the object is unchanged for a - * read-modify-write operation. - * An empty etag causes an update to overwrite other changes. - * - * Generated from protobuf field string etag = 7 [(.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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/BudgetAmount.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/BudgetAmount.php deleted file mode 100644 index b63478635cbd..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/BudgetAmount.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.billing.budgets.v1.BudgetAmount - */ -class BudgetAmount extends \Google\Protobuf\Internal\Message -{ - protected $budget_amount; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Money $specified_amount - * A specified amount to use as the budget. - * `currency_code` is optional. If specified when creating a budget, it must - * match the currency of the billing account. If specified when updating a - * budget, it must match the currency_code of the existing budget. - * The `currency_code` is provided on output. - * @type \Google\Cloud\Billing\Budgets\V1\LastPeriodAmount $last_period_amount - * Use the last period's actual spend as the budget for the present period. - * LastPeriodAmount can only be set when the budget's time period is a - * [Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period]. - * It cannot be set in combination with - * [Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); - parent::__construct($data); - } - - /** - * A specified amount to use as the budget. - * `currency_code` is optional. If specified when creating a budget, it must - * match the currency of the billing account. If specified when updating a - * budget, it must match the currency_code of the existing budget. - * The `currency_code` is provided on output. - * - * Generated from protobuf field .google.type.Money specified_amount = 1; - * @return \Google\Type\Money|null - */ - public function getSpecifiedAmount() - { - return $this->readOneof(1); - } - - public function hasSpecifiedAmount() - { - return $this->hasOneof(1); - } - - /** - * A specified amount to use as the budget. - * `currency_code` is optional. If specified when creating a budget, it must - * match the currency of the billing account. If specified when updating a - * budget, it must match the currency_code of the existing budget. - * The `currency_code` is provided on output. - * - * Generated from protobuf field .google.type.Money specified_amount = 1; - * @param \Google\Type\Money $var - * @return $this - */ - public function setSpecifiedAmount($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Use the last period's actual spend as the budget for the present period. - * LastPeriodAmount can only be set when the budget's time period is a - * [Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period]. - * It cannot be set in combination with - * [Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period]. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2; - * @return \Google\Cloud\Billing\Budgets\V1\LastPeriodAmount|null - */ - public function getLastPeriodAmount() - { - return $this->readOneof(2); - } - - public function hasLastPeriodAmount() - { - return $this->hasOneof(2); - } - - /** - * Use the last period's actual spend as the budget for the present period. - * LastPeriodAmount can only be set when the budget's time period is a - * [Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period]. - * It cannot be set in combination with - * [Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period]. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2; - * @param \Google\Cloud\Billing\Budgets\V1\LastPeriodAmount $var - * @return $this - */ - public function setLastPeriodAmount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\LastPeriodAmount::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getBudgetAmount() - { - return $this->whichOneof("budget_amount"); - } - -} - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CalendarPeriod.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CalendarPeriod.php deleted file mode 100644 index a517dd6f338e..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CalendarPeriod.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.billing.budgets.v1.CalendarPeriod - */ -class CalendarPeriod -{ - /** - * Calendar period is unset. This is the default if the budget is for a - * custom time period (CustomPeriod). - * - * Generated from protobuf enum CALENDAR_PERIOD_UNSPECIFIED = 0; - */ - const CALENDAR_PERIOD_UNSPECIFIED = 0; - /** - * A month. Month starts on the first day of each month, such as January 1, - * February 1, March 1, and so on. - * - * Generated from protobuf enum MONTH = 1; - */ - const MONTH = 1; - /** - * A quarter. Quarters start on dates January 1, April 1, July 1, and October - * 1 of each year. - * - * Generated from protobuf enum QUARTER = 2; - */ - const QUARTER = 2; - /** - * A year. Year starts on January 1. - * - * Generated from protobuf enum YEAR = 3; - */ - const YEAR = 3; - - private static $valueToName = [ - self::CALENDAR_PERIOD_UNSPECIFIED => 'CALENDAR_PERIOD_UNSPECIFIED', - self::MONTH => 'MONTH', - self::QUARTER => 'QUARTER', - self::YEAR => 'YEAR', - ]; - - 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CreateBudgetRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CreateBudgetRequest.php deleted file mode 100644 index a1bb4781c765..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CreateBudgetRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.billing.budgets.v1.CreateBudgetRequest - */ -class CreateBudgetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the billing account to create the budget in. Values - * are of the form `billingAccounts/{billingAccountId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Budget to create. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $budget = null; - - /** - * @param string $parent Required. The name of the billing account to create the budget in. Values - * are of the form `billingAccounts/{billingAccountId}`. Please see - * {@see BudgetServiceClient::billingAccountName()} for help formatting this field. - * @param \Google\Cloud\Billing\Budgets\V1\Budget $budget Required. Budget to create. - * - * @return \Google\Cloud\Billing\Budgets\V1\CreateBudgetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Billing\Budgets\V1\Budget $budget): self - { - return (new self()) - ->setParent($parent) - ->setBudget($budget); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the billing account to create the budget in. Values - * are of the form `billingAccounts/{billingAccountId}`. - * @type \Google\Cloud\Billing\Budgets\V1\Budget $budget - * Required. Budget to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the billing account to create the budget in. Values - * are of the form `billingAccounts/{billingAccountId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the billing account to create the budget in. Values - * are of the form `billingAccounts/{billingAccountId}`. - * - * 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. Budget to create. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Billing\Budgets\V1\Budget|null - */ - public function getBudget() - { - return $this->budget; - } - - public function hasBudget() - { - return isset($this->budget); - } - - public function clearBudget() - { - unset($this->budget); - } - - /** - * Required. Budget to create. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Billing\Budgets\V1\Budget $var - * @return $this - */ - public function setBudget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\Budget::class); - $this->budget = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CustomPeriod.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CustomPeriod.php deleted file mode 100644 index e7b18a2688b0..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/CustomPeriod.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.billing.budgets.v1.CustomPeriod - */ -class CustomPeriod extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The start date must be after January 1, 2017. - * - * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_date = null; - /** - * Optional. The end date of the time period. Budgets with elapsed end date - * won't be processed. If unset, specifies to track all usage incurred since - * the start_date. - * - * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_date = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Date $start_date - * Required. The start date must be after January 1, 2017. - * @type \Google\Type\Date $end_date - * Optional. The end date of the time period. Budgets with elapsed end date - * won't be processed. If unset, specifies to track all usage incurred since - * the start_date. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The start date must be after January 1, 2017. - * - * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\Date|null - */ - public function getStartDate() - { - return $this->start_date; - } - - public function hasStartDate() - { - return isset($this->start_date); - } - - public function clearStartDate() - { - unset($this->start_date); - } - - /** - * Required. The start date must be after January 1, 2017. - * - * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setStartDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->start_date = $var; - - return $this; - } - - /** - * Optional. The end date of the time period. Budgets with elapsed end date - * won't be processed. If unset, specifies to track all usage incurred since - * the start_date. - * - * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Date|null - */ - public function getEndDate() - { - return $this->end_date; - } - - public function hasEndDate() - { - return isset($this->end_date); - } - - public function clearEndDate() - { - unset($this->end_date); - } - - /** - * Optional. The end date of the time period. Budgets with elapsed end date - * won't be processed. If unset, specifies to track all usage incurred since - * the start_date. - * - * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setEndDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->end_date = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/DeleteBudgetRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/DeleteBudgetRequest.php deleted file mode 100644 index 4bdbd4788aa0..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/DeleteBudgetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.billing.budgets.v1.DeleteBudgetRequest - */ -class DeleteBudgetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the budget to delete. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the budget to delete. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Please see - * {@see BudgetServiceClient::budgetName()} for help formatting this field. - * - * @return \Google\Cloud\Billing\Budgets\V1\DeleteBudgetRequest - * - * @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. Name of the budget to delete. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the budget to delete. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * - * 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. Name of the budget to delete. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * - * 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter.php deleted file mode 100644 index a9a8df097c50..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter.php +++ /dev/null @@ -1,496 +0,0 @@ -google.cloud.billing.budgets.v1.Filter - */ -class Filter extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A set of projects of the form `projects/{project}`, - * specifying that usage from only this set of projects should be - * included in the budget. If omitted, the report includes all usage for - * the billing account, regardless of which project the usage occurred on. - * - * Generated from protobuf field repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $projects; - /** - * Optional. A set of folder and organization names of the form - * `folders/{folderId}` or `organizations/{organizationId}`, specifying that - * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the budget includes all usage that the billing - * account pays for. If the folder or organization contains projects that are - * paid for by a different Cloud Billing account, the budget *doesn't* apply - * to those projects. - * - * Generated from protobuf field repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $resource_ancestors; - /** - * Optional. If - * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] - * is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be - * subtracted from gross cost to determine the spend for threshold - * calculations. See [a list of acceptable credit type - * values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). - * If - * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] - * is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. - * - * Generated from protobuf field repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $credit_types; - /** - * Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment credit_types_treatment = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $credit_types_treatment = 0; - /** - * Optional. A set of services of the form `services/{service_id}`, - * specifying that usage from only this set of services should be - * included in the budget. If omitted, the report includes usage for - * all the services. - * The service names are available through the Catalog API: - * https://cloud.google.com/billing/v1/how-tos/catalog-api. - * - * Generated from protobuf field repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $services; - /** - * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, - * specifying that usage from only this set of subaccounts should be included - * in the budget. If a subaccount is set to the name of the parent account, - * usage from the parent account is included. If the field is omitted, - * the report includes usage from the parent account and all subaccounts, - * if they exist. - * - * Generated from protobuf field repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $subaccounts; - /** - * Optional. A single label and value pair specifying that usage from only - * this set of labeled resources should be included in the budget. If omitted, - * the report includes all labeled and unlabeled usage. - * An object containing a single `"key": value` pair. Example: `{ "name": - * "wrench" }`. - * _Currently, multiple entries or multiple values per entry are not - * allowed._ - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - protected $usage_period; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $projects - * Optional. A set of projects of the form `projects/{project}`, - * specifying that usage from only this set of projects should be - * included in the budget. If omitted, the report includes all usage for - * the billing account, regardless of which project the usage occurred on. - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_ancestors - * Optional. A set of folder and organization names of the form - * `folders/{folderId}` or `organizations/{organizationId}`, specifying that - * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the budget includes all usage that the billing - * account pays for. If the folder or organization contains projects that are - * paid for by a different Cloud Billing account, the budget *doesn't* apply - * to those projects. - * @type array|\Google\Protobuf\Internal\RepeatedField $credit_types - * Optional. If - * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] - * is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be - * subtracted from gross cost to determine the spend for threshold - * calculations. See [a list of acceptable credit type - * values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). - * If - * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] - * is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. - * @type int $credit_types_treatment - * Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. - * @type array|\Google\Protobuf\Internal\RepeatedField $services - * Optional. A set of services of the form `services/{service_id}`, - * specifying that usage from only this set of services should be - * included in the budget. If omitted, the report includes usage for - * all the services. - * The service names are available through the Catalog API: - * https://cloud.google.com/billing/v1/how-tos/catalog-api. - * @type array|\Google\Protobuf\Internal\RepeatedField $subaccounts - * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, - * specifying that usage from only this set of subaccounts should be included - * in the budget. If a subaccount is set to the name of the parent account, - * usage from the parent account is included. If the field is omitted, - * the report includes usage from the parent account and all subaccounts, - * if they exist. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. A single label and value pair specifying that usage from only - * this set of labeled resources should be included in the budget. If omitted, - * the report includes all labeled and unlabeled usage. - * An object containing a single `"key": value` pair. Example: `{ "name": - * "wrench" }`. - * _Currently, multiple entries or multiple values per entry are not - * allowed._ - * @type int $calendar_period - * Optional. Specifies to track usage for recurring calendar period. - * For example, assume that CalendarPeriod.QUARTER is set. The budget - * tracks usage from April 1 to June 30, when the current calendar month is - * April, May, June. After that, it tracks usage from July 1 to - * September 30 when the current calendar month is July, August, September, - * so on. - * @type \Google\Cloud\Billing\Budgets\V1\CustomPeriod $custom_period - * Optional. Specifies to track usage from any start date (required) to any - * end date (optional). This time period is static, it does not recur. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A set of projects of the form `projects/{project}`, - * specifying that usage from only this set of projects should be - * included in the budget. If omitted, the report includes all usage for - * the billing account, regardless of which project the usage occurred on. - * - * Generated from protobuf field repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProjects() - { - return $this->projects; - } - - /** - * Optional. A set of projects of the form `projects/{project}`, - * specifying that usage from only this set of projects should be - * included in the budget. If omitted, the report includes all usage for - * the billing account, regardless of which project the usage occurred on. - * - * Generated from protobuf field repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->projects = $arr; - - return $this; - } - - /** - * Optional. A set of folder and organization names of the form - * `folders/{folderId}` or `organizations/{organizationId}`, specifying that - * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the budget includes all usage that the billing - * account pays for. If the folder or organization contains projects that are - * paid for by a different Cloud Billing account, the budget *doesn't* apply - * to those projects. - * - * Generated from protobuf field repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceAncestors() - { - return $this->resource_ancestors; - } - - /** - * Optional. A set of folder and organization names of the form - * `folders/{folderId}` or `organizations/{organizationId}`, specifying that - * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the budget includes all usage that the billing - * account pays for. If the folder or organization contains projects that are - * paid for by a different Cloud Billing account, the budget *doesn't* apply - * to those projects. - * - * Generated from protobuf field repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceAncestors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_ancestors = $arr; - - return $this; - } - - /** - * Optional. If - * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] - * is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be - * subtracted from gross cost to determine the spend for threshold - * calculations. See [a list of acceptable credit type - * values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). - * If - * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] - * is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. - * - * Generated from protobuf field repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCreditTypes() - { - return $this->credit_types; - } - - /** - * Optional. If - * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] - * is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be - * subtracted from gross cost to determine the spend for threshold - * calculations. See [a list of acceptable credit type - * values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). - * If - * [Filter.credit_types_treatment][google.cloud.billing.budgets.v1.Filter.credit_types_treatment] - * is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. - * - * Generated from protobuf field repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCreditTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->credit_types = $arr; - - return $this; - } - - /** - * Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment credit_types_treatment = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCreditTypesTreatment() - { - return $this->credit_types_treatment; - } - - /** - * Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment credit_types_treatment = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCreditTypesTreatment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Billing\Budgets\V1\Filter\CreditTypesTreatment::class); - $this->credit_types_treatment = $var; - - return $this; - } - - /** - * Optional. A set of services of the form `services/{service_id}`, - * specifying that usage from only this set of services should be - * included in the budget. If omitted, the report includes usage for - * all the services. - * The service names are available through the Catalog API: - * https://cloud.google.com/billing/v1/how-tos/catalog-api. - * - * Generated from protobuf field repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServices() - { - return $this->services; - } - - /** - * Optional. A set of services of the form `services/{service_id}`, - * specifying that usage from only this set of services should be - * included in the budget. If omitted, the report includes usage for - * all the services. - * The service names are available through the Catalog API: - * https://cloud.google.com/billing/v1/how-tos/catalog-api. - * - * Generated from protobuf field repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->services = $arr; - - return $this; - } - - /** - * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, - * specifying that usage from only this set of subaccounts should be included - * in the budget. If a subaccount is set to the name of the parent account, - * usage from the parent account is included. If the field is omitted, - * the report includes usage from the parent account and all subaccounts, - * if they exist. - * - * Generated from protobuf field repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubaccounts() - { - return $this->subaccounts; - } - - /** - * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, - * specifying that usage from only this set of subaccounts should be included - * in the budget. If a subaccount is set to the name of the parent account, - * usage from the parent account is included. If the field is omitted, - * the report includes usage from the parent account and all subaccounts, - * if they exist. - * - * Generated from protobuf field repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubaccounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subaccounts = $arr; - - return $this; - } - - /** - * Optional. A single label and value pair specifying that usage from only - * this set of labeled resources should be included in the budget. If omitted, - * the report includes all labeled and unlabeled usage. - * An object containing a single `"key": value` pair. Example: `{ "name": - * "wrench" }`. - * _Currently, multiple entries or multiple values per entry are not - * allowed._ - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. A single label and value pair specifying that usage from only - * this set of labeled resources should be included in the budget. If omitted, - * the report includes all labeled and unlabeled usage. - * An object containing a single `"key": value` pair. Example: `{ "name": - * "wrench" }`. - * _Currently, multiple entries or multiple values per entry are not - * allowed._ - * - * 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::MESSAGE, \Google\Protobuf\ListValue::class); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Specifies to track usage for recurring calendar period. - * For example, assume that CalendarPeriod.QUARTER is set. The budget - * tracks usage from April 1 to June 30, when the current calendar month is - * April, May, June. After that, it tracks usage from July 1 to - * September 30 when the current calendar month is July, August, September, - * so on. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.CalendarPeriod calendar_period = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCalendarPeriod() - { - return $this->readOneof(8); - } - - public function hasCalendarPeriod() - { - return $this->hasOneof(8); - } - - /** - * Optional. Specifies to track usage for recurring calendar period. - * For example, assume that CalendarPeriod.QUARTER is set. The budget - * tracks usage from April 1 to June 30, when the current calendar month is - * April, May, June. After that, it tracks usage from July 1 to - * September 30 when the current calendar month is July, August, September, - * so on. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.CalendarPeriod calendar_period = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCalendarPeriod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Billing\Budgets\V1\CalendarPeriod::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Optional. Specifies to track usage from any start date (required) to any - * end date (optional). This time period is static, it does not recur. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.CustomPeriod custom_period = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Billing\Budgets\V1\CustomPeriod|null - */ - public function getCustomPeriod() - { - return $this->readOneof(9); - } - - public function hasCustomPeriod() - { - return $this->hasOneof(9); - } - - /** - * Optional. Specifies to track usage from any start date (required) to any - * end date (optional). This time period is static, it does not recur. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.CustomPeriod custom_period = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Billing\Budgets\V1\CustomPeriod $var - * @return $this - */ - public function setCustomPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\CustomPeriod::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * @return string - */ - public function getUsagePeriod() - { - return $this->whichOneof("usage_period"); - } - -} - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter/CreditTypesTreatment.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter/CreditTypesTreatment.php deleted file mode 100644 index d37364e875dd..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/Filter/CreditTypesTreatment.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment - */ -class CreditTypesTreatment -{ - /** - * Generated from protobuf enum CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0; - */ - const CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0; - /** - * All types of credit are subtracted from the gross cost to determine the - * spend for threshold calculations. - * - * Generated from protobuf enum INCLUDE_ALL_CREDITS = 1; - */ - const INCLUDE_ALL_CREDITS = 1; - /** - * All types of credit are added to the net cost to determine the spend for - * threshold calculations. - * - * Generated from protobuf enum EXCLUDE_ALL_CREDITS = 2; - */ - const EXCLUDE_ALL_CREDITS = 2; - /** - * [Credit - * types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type) - * specified in the credit_types field are subtracted from the - * gross cost to determine the spend for threshold calculations. - * - * Generated from protobuf enum INCLUDE_SPECIFIED_CREDITS = 3; - */ - const INCLUDE_SPECIFIED_CREDITS = 3; - - private static $valueToName = [ - self::CREDIT_TYPES_TREATMENT_UNSPECIFIED => 'CREDIT_TYPES_TREATMENT_UNSPECIFIED', - self::INCLUDE_ALL_CREDITS => 'INCLUDE_ALL_CREDITS', - self::EXCLUDE_ALL_CREDITS => 'EXCLUDE_ALL_CREDITS', - self::INCLUDE_SPECIFIED_CREDITS => 'INCLUDE_SPECIFIED_CREDITS', - ]; - - 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(CreditTypesTreatment::class, \Google\Cloud\Billing\Budgets\V1\Filter_CreditTypesTreatment::class); - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/GetBudgetRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/GetBudgetRequest.php deleted file mode 100644 index 1c12b459606a..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/GetBudgetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.billing.budgets.v1.GetBudgetRequest - */ -class GetBudgetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of budget to get. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of budget to get. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Please see - * {@see BudgetServiceClient::budgetName()} for help formatting this field. - * - * @return \Google\Cloud\Billing\Budgets\V1\GetBudgetRequest - * - * @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. Name of budget to get. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of budget to get. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * - * 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. Name of budget to get. Values are of the form - * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - * - * 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/LastPeriodAmount.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/LastPeriodAmount.php deleted file mode 100644 index 9849a3486905..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/LastPeriodAmount.php +++ /dev/null @@ -1,39 +0,0 @@ -google.cloud.billing.budgets.v1.LastPeriodAmount - */ -class LastPeriodAmount extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsRequest.php deleted file mode 100644 index cc94ff1ad6ac..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.billing.budgets.v1.ListBudgetsRequest - */ -class ListBudgetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of billing account to list budgets under. Values - * are of the form `billingAccounts/{billingAccountId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Set the scope of the budgets to be returned, in the format of the - * resource name. The scope of a budget is the cost that it tracks, such as - * costs for a single project, or the costs for all projects in a folder. Only - * project scope (in the format of "projects/project-id" or "projects/123") is - * supported in this field. When this field is set to a project's resource - * name, the budgets returned are tracking the costs for that project. - * - * Generated from protobuf field string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scope = ''; - /** - * Optional. The maximum number of budgets to return per page. - * The default and maximum value are 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value returned by the last `ListBudgetsResponse` which - * indicates that this is a continuation of a prior `ListBudgets` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of billing account to list budgets under. Values - * are of the form `billingAccounts/{billingAccountId}`. Please see - * {@see BudgetServiceClient::billingAccountName()} for help formatting this field. - * - * @return \Google\Cloud\Billing\Budgets\V1\ListBudgetsRequest - * - * @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. Name of billing account to list budgets under. Values - * are of the form `billingAccounts/{billingAccountId}`. - * @type string $scope - * Optional. Set the scope of the budgets to be returned, in the format of the - * resource name. The scope of a budget is the cost that it tracks, such as - * costs for a single project, or the costs for all projects in a folder. Only - * project scope (in the format of "projects/project-id" or "projects/123") is - * supported in this field. When this field is set to a project's resource - * name, the budgets returned are tracking the costs for that project. - * @type int $page_size - * Optional. The maximum number of budgets to return per page. - * The default and maximum value are 100. - * @type string $page_token - * Optional. The value returned by the last `ListBudgetsResponse` which - * indicates that this is a continuation of a prior `ListBudgets` call, - * and that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of billing account to list budgets under. Values - * are of the form `billingAccounts/{billingAccountId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of billing account to list budgets under. Values - * are of the form `billingAccounts/{billingAccountId}`. - * - * 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. Set the scope of the budgets to be returned, in the format of the - * resource name. The scope of a budget is the cost that it tracks, such as - * costs for a single project, or the costs for all projects in a folder. Only - * project scope (in the format of "projects/project-id" or "projects/123") is - * supported in this field. When this field is set to a project's resource - * name, the budgets returned are tracking the costs for that project. - * - * Generated from protobuf field string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Optional. Set the scope of the budgets to be returned, in the format of the - * resource name. The scope of a budget is the cost that it tracks, such as - * costs for a single project, or the costs for all projects in a folder. Only - * project scope (in the format of "projects/project-id" or "projects/123") is - * supported in this field. When this field is set to a project's resource - * name, the budgets returned are tracking the costs for that project. - * - * Generated from protobuf field string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. The maximum number of budgets to return per page. - * The default and maximum value are 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of budgets to return per page. - * The default and maximum value are 100. - * - * 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. The value returned by the last `ListBudgetsResponse` which - * indicates that this is a continuation of a prior `ListBudgets` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The value returned by the last `ListBudgetsResponse` which - * indicates that this is a continuation of a prior `ListBudgets` call, - * and that the system should return the next page of data. - * - * 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsResponse.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsResponse.php deleted file mode 100644 index c00fba71972a..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ListBudgetsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.billing.budgets.v1.ListBudgetsResponse - */ -class ListBudgetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of the budgets owned by the requested billing account. - * - * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.Budget budgets = 1; - */ - private $budgets; - /** - * If not empty, indicates that there may be more budgets that match the - * request; this value should be passed in a new `ListBudgetsRequest`. - * - * 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\Billing\Budgets\V1\Budget>|\Google\Protobuf\Internal\RepeatedField $budgets - * List of the budgets owned by the requested billing account. - * @type string $next_page_token - * If not empty, indicates that there may be more budgets that match the - * request; this value should be passed in a new `ListBudgetsRequest`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); - parent::__construct($data); - } - - /** - * List of the budgets owned by the requested billing account. - * - * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.Budget budgets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBudgets() - { - return $this->budgets; - } - - /** - * List of the budgets owned by the requested billing account. - * - * Generated from protobuf field repeated .google.cloud.billing.budgets.v1.Budget budgets = 1; - * @param array<\Google\Cloud\Billing\Budgets\V1\Budget>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBudgets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Billing\Budgets\V1\Budget::class); - $this->budgets = $arr; - - return $this; - } - - /** - * If not empty, indicates that there may be more budgets that match the - * request; this value should be passed in a new `ListBudgetsRequest`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If not empty, indicates that there may be more budgets that match the - * request; this value should be passed in a new `ListBudgetsRequest`. - * - * 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/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/NotificationsRule.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/NotificationsRule.php deleted file mode 100644 index cb57f006391a..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/NotificationsRule.php +++ /dev/null @@ -1,416 +0,0 @@ -google.cloud.billing.budgets.v1.NotificationsRule - */ -class NotificationsRule extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The name of the Pub/Sub topic where budget-related messages are - * published, in the form `projects/{project_id}/topics/{topic_id}`. Updates - * are sent to the topic at regular intervals; the timing of the updates is - * not dependent on the [threshold rules](#thresholdrule) you've set. - * Note that if you want your - * [Pub/Sub JSON - * object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) - * to contain data for `alertThresholdExceeded`, you need at least one - * [alert threshold rule](#thresholdrule). When you set threshold rules, you - * must also enable at least one of the email notification options, either - * using the default IAM recipients or Cloud Monitoring email notification - * channels. - * To use Pub/Sub topics with budgets, you must do the following: - * 1. Create the Pub/Sub topic - * before connecting it to your budget. For guidance, see - * [Manage programmatic budget alert - * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - * 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on - * the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. - * For additional details on Pub/Sub roles and permissions, see - * [Permissions required for this - * task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). - * - * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $pubsub_topic = ''; - /** - * Optional. Required when - * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic] - * is set. The schema version of the notification sent to - * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]. - * Only "1.0" is accepted. It represents the JSON schema as defined in - * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. - * - * Generated from protobuf field string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $schema_version = ''; - /** - * Optional. Email targets to send notifications to when a threshold is - * exceeded. This is in addition to the `DefaultIamRecipients` who receive - * alert emails based on their billing account IAM role. The value is the full - * REST resource name of a Cloud Monitoring email notification channel with - * the form `projects/{project_id}/notificationChannels/{channel_id}`. A - * maximum of 5 email notifications are allowed. - * To customize budget alert email recipients with monitoring notification - * channels, you _must create the monitoring notification channels before - * you link them to a budget_. For guidance on setting up notification - * channels to use with budgets, see - * [Customize budget alert email - * recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). - * For Cloud Billing budget alerts, you _must use email notification - * channels_. The other types of notification channels are _not_ - * supported, such as Slack, SMS, or PagerDuty. If you want to - * [send budget notifications to - * Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), - * use a pubsubTopic and configure - * [programmatic - * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - * - * Generated from protobuf field repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $monitoring_notification_channels; - /** - * Optional. When set to true, disables default notifications sent when a - * threshold is exceeded. Default notifications are sent to those with Billing - * Account Administrator and Billing Account User IAM roles for the target - * account. - * - * Generated from protobuf field bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_default_iam_recipients = false; - /** - * Optional. When set to true, and when the budget has a single project - * configured, notifications will be sent to project level recipients of that - * project. This field will be ignored if the budget has multiple or no - * project configured. - * Currently, project level recipients are the users with `Owner` role on a - * cloud project. - * - * Generated from protobuf field bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_project_level_recipients = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pubsub_topic - * Optional. The name of the Pub/Sub topic where budget-related messages are - * published, in the form `projects/{project_id}/topics/{topic_id}`. Updates - * are sent to the topic at regular intervals; the timing of the updates is - * not dependent on the [threshold rules](#thresholdrule) you've set. - * Note that if you want your - * [Pub/Sub JSON - * object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) - * to contain data for `alertThresholdExceeded`, you need at least one - * [alert threshold rule](#thresholdrule). When you set threshold rules, you - * must also enable at least one of the email notification options, either - * using the default IAM recipients or Cloud Monitoring email notification - * channels. - * To use Pub/Sub topics with budgets, you must do the following: - * 1. Create the Pub/Sub topic - * before connecting it to your budget. For guidance, see - * [Manage programmatic budget alert - * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - * 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on - * the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. - * For additional details on Pub/Sub roles and permissions, see - * [Permissions required for this - * task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). - * @type string $schema_version - * Optional. Required when - * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic] - * is set. The schema version of the notification sent to - * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]. - * Only "1.0" is accepted. It represents the JSON schema as defined in - * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. - * @type array|\Google\Protobuf\Internal\RepeatedField $monitoring_notification_channels - * Optional. Email targets to send notifications to when a threshold is - * exceeded. This is in addition to the `DefaultIamRecipients` who receive - * alert emails based on their billing account IAM role. The value is the full - * REST resource name of a Cloud Monitoring email notification channel with - * the form `projects/{project_id}/notificationChannels/{channel_id}`. A - * maximum of 5 email notifications are allowed. - * To customize budget alert email recipients with monitoring notification - * channels, you _must create the monitoring notification channels before - * you link them to a budget_. For guidance on setting up notification - * channels to use with budgets, see - * [Customize budget alert email - * recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). - * For Cloud Billing budget alerts, you _must use email notification - * channels_. The other types of notification channels are _not_ - * supported, such as Slack, SMS, or PagerDuty. If you want to - * [send budget notifications to - * Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), - * use a pubsubTopic and configure - * [programmatic - * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - * @type bool $disable_default_iam_recipients - * Optional. When set to true, disables default notifications sent when a - * threshold is exceeded. Default notifications are sent to those with Billing - * Account Administrator and Billing Account User IAM roles for the target - * account. - * @type bool $enable_project_level_recipients - * Optional. When set to true, and when the budget has a single project - * configured, notifications will be sent to project level recipients of that - * project. This field will be ignored if the budget has multiple or no - * project configured. - * Currently, project level recipients are the users with `Owner` role on a - * cloud project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The name of the Pub/Sub topic where budget-related messages are - * published, in the form `projects/{project_id}/topics/{topic_id}`. Updates - * are sent to the topic at regular intervals; the timing of the updates is - * not dependent on the [threshold rules](#thresholdrule) you've set. - * Note that if you want your - * [Pub/Sub JSON - * object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) - * to contain data for `alertThresholdExceeded`, you need at least one - * [alert threshold rule](#thresholdrule). When you set threshold rules, you - * must also enable at least one of the email notification options, either - * using the default IAM recipients or Cloud Monitoring email notification - * channels. - * To use Pub/Sub topics with budgets, you must do the following: - * 1. Create the Pub/Sub topic - * before connecting it to your budget. For guidance, see - * [Manage programmatic budget alert - * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - * 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on - * the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. - * For additional details on Pub/Sub roles and permissions, see - * [Permissions required for this - * task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). - * - * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPubsubTopic() - { - return $this->pubsub_topic; - } - - /** - * Optional. The name of the Pub/Sub topic where budget-related messages are - * published, in the form `projects/{project_id}/topics/{topic_id}`. Updates - * are sent to the topic at regular intervals; the timing of the updates is - * not dependent on the [threshold rules](#thresholdrule) you've set. - * Note that if you want your - * [Pub/Sub JSON - * object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) - * to contain data for `alertThresholdExceeded`, you need at least one - * [alert threshold rule](#thresholdrule). When you set threshold rules, you - * must also enable at least one of the email notification options, either - * using the default IAM recipients or Cloud Monitoring email notification - * channels. - * To use Pub/Sub topics with budgets, you must do the following: - * 1. Create the Pub/Sub topic - * before connecting it to your budget. For guidance, see - * [Manage programmatic budget alert - * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - * 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on - * the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. - * For additional details on Pub/Sub roles and permissions, see - * [Permissions required for this - * task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). - * - * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic = $var; - - return $this; - } - - /** - * Optional. Required when - * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic] - * is set. The schema version of the notification sent to - * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]. - * Only "1.0" is accepted. It represents the JSON schema as defined in - * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. - * - * Generated from protobuf field string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSchemaVersion() - { - return $this->schema_version; - } - - /** - * Optional. Required when - * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic] - * is set. The schema version of the notification sent to - * [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]. - * Only "1.0" is accepted. It represents the JSON schema as defined in - * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. - * - * Generated from protobuf field string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSchemaVersion($var) - { - GPBUtil::checkString($var, True); - $this->schema_version = $var; - - return $this; - } - - /** - * Optional. Email targets to send notifications to when a threshold is - * exceeded. This is in addition to the `DefaultIamRecipients` who receive - * alert emails based on their billing account IAM role. The value is the full - * REST resource name of a Cloud Monitoring email notification channel with - * the form `projects/{project_id}/notificationChannels/{channel_id}`. A - * maximum of 5 email notifications are allowed. - * To customize budget alert email recipients with monitoring notification - * channels, you _must create the monitoring notification channels before - * you link them to a budget_. For guidance on setting up notification - * channels to use with budgets, see - * [Customize budget alert email - * recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). - * For Cloud Billing budget alerts, you _must use email notification - * channels_. The other types of notification channels are _not_ - * supported, such as Slack, SMS, or PagerDuty. If you want to - * [send budget notifications to - * Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), - * use a pubsubTopic and configure - * [programmatic - * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - * - * Generated from protobuf field repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMonitoringNotificationChannels() - { - return $this->monitoring_notification_channels; - } - - /** - * Optional. Email targets to send notifications to when a threshold is - * exceeded. This is in addition to the `DefaultIamRecipients` who receive - * alert emails based on their billing account IAM role. The value is the full - * REST resource name of a Cloud Monitoring email notification channel with - * the form `projects/{project_id}/notificationChannels/{channel_id}`. A - * maximum of 5 email notifications are allowed. - * To customize budget alert email recipients with monitoring notification - * channels, you _must create the monitoring notification channels before - * you link them to a budget_. For guidance on setting up notification - * channels to use with budgets, see - * [Customize budget alert email - * recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). - * For Cloud Billing budget alerts, you _must use email notification - * channels_. The other types of notification channels are _not_ - * supported, such as Slack, SMS, or PagerDuty. If you want to - * [send budget notifications to - * Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), - * use a pubsubTopic and configure - * [programmatic - * notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - * - * Generated from protobuf field repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMonitoringNotificationChannels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->monitoring_notification_channels = $arr; - - return $this; - } - - /** - * Optional. When set to true, disables default notifications sent when a - * threshold is exceeded. Default notifications are sent to those with Billing - * Account Administrator and Billing Account User IAM roles for the target - * account. - * - * Generated from protobuf field bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableDefaultIamRecipients() - { - return $this->disable_default_iam_recipients; - } - - /** - * Optional. When set to true, disables default notifications sent when a - * threshold is exceeded. Default notifications are sent to those with Billing - * Account Administrator and Billing Account User IAM roles for the target - * account. - * - * Generated from protobuf field bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableDefaultIamRecipients($var) - { - GPBUtil::checkBool($var); - $this->disable_default_iam_recipients = $var; - - return $this; - } - - /** - * Optional. When set to true, and when the budget has a single project - * configured, notifications will be sent to project level recipients of that - * project. This field will be ignored if the budget has multiple or no - * project configured. - * Currently, project level recipients are the users with `Owner` role on a - * cloud project. - * - * Generated from protobuf field bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableProjectLevelRecipients() - { - return $this->enable_project_level_recipients; - } - - /** - * Optional. When set to true, and when the budget has a single project - * configured, notifications will be sent to project level recipients of that - * project. This field will be ignored if the budget has multiple or no - * project configured. - * Currently, project level recipients are the users with `Owner` role on a - * cloud project. - * - * Generated from protobuf field bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableProjectLevelRecipients($var) - { - GPBUtil::checkBool($var); - $this->enable_project_level_recipients = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule.php deleted file mode 100644 index fdb59867e7a2..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.billing.budgets.v1.ThresholdRule - */ -class ThresholdRule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Send an alert when this threshold is exceeded. - * This is a 1.0-based percentage, so 0.5 = 50%. - * Validation: non-negative number. - * - * Generated from protobuf field double threshold_percent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $threshold_percent = 0.0; - /** - * Optional. The type of basis used to determine if spend has passed the - * threshold. Behavior defaults to CURRENT_SPEND if not set. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.ThresholdRule.Basis spend_basis = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $spend_basis = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $threshold_percent - * Required. Send an alert when this threshold is exceeded. - * This is a 1.0-based percentage, so 0.5 = 50%. - * Validation: non-negative number. - * @type int $spend_basis - * Optional. The type of basis used to determine if spend has passed the - * threshold. Behavior defaults to CURRENT_SPEND if not set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. Send an alert when this threshold is exceeded. - * This is a 1.0-based percentage, so 0.5 = 50%. - * Validation: non-negative number. - * - * Generated from protobuf field double threshold_percent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getThresholdPercent() - { - return $this->threshold_percent; - } - - /** - * Required. Send an alert when this threshold is exceeded. - * This is a 1.0-based percentage, so 0.5 = 50%. - * Validation: non-negative number. - * - * Generated from protobuf field double threshold_percent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setThresholdPercent($var) - { - GPBUtil::checkDouble($var); - $this->threshold_percent = $var; - - return $this; - } - - /** - * Optional. The type of basis used to determine if spend has passed the - * threshold. Behavior defaults to CURRENT_SPEND if not set. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.ThresholdRule.Basis spend_basis = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSpendBasis() - { - return $this->spend_basis; - } - - /** - * Optional. The type of basis used to determine if spend has passed the - * threshold. Behavior defaults to CURRENT_SPEND if not set. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.ThresholdRule.Basis spend_basis = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSpendBasis($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Billing\Budgets\V1\ThresholdRule\Basis::class); - $this->spend_basis = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule/Basis.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule/Basis.php deleted file mode 100644 index 030c1ca09a1b..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/ThresholdRule/Basis.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.billing.budgets.v1.ThresholdRule.Basis - */ -class Basis -{ - /** - * Unspecified threshold basis. - * - * Generated from protobuf enum BASIS_UNSPECIFIED = 0; - */ - const BASIS_UNSPECIFIED = 0; - /** - * Use current spend as the basis for comparison against the threshold. - * - * Generated from protobuf enum CURRENT_SPEND = 1; - */ - const CURRENT_SPEND = 1; - /** - * Use forecasted spend for the period as the basis for comparison against - * the threshold. - * FORECASTED_SPEND can only be set when the budget's time period is a - * [Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period]. - * It cannot be set in combination with - * [Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period]. - * - * Generated from protobuf enum FORECASTED_SPEND = 2; - */ - const FORECASTED_SPEND = 2; - - private static $valueToName = [ - self::BASIS_UNSPECIFIED => 'BASIS_UNSPECIFIED', - self::CURRENT_SPEND => 'CURRENT_SPEND', - self::FORECASTED_SPEND => 'FORECASTED_SPEND', - ]; - - 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(Basis::class, \Google\Cloud\Billing\Budgets\V1\ThresholdRule_Basis::class); - diff --git a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/UpdateBudgetRequest.php b/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/UpdateBudgetRequest.php deleted file mode 100644 index 7f5ed69c5deb..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/proto/src/Google/Cloud/Billing/Budgets/V1/UpdateBudgetRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.billing.budgets.v1.UpdateBudgetRequest - */ -class UpdateBudgetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated budget object. - * The budget to update is specified by the budget name in the budget. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $budget = null; - /** - * Optional. Indicates which fields in the provided budget to update. - * Read-only fields (such as `name`) cannot be changed. If this is not - * provided, then only fields with non-default values from the request are - * updated. See - * https://developers.google.com/protocol-buffers/docs/proto3#default for more - * details about default values. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Billing\Budgets\V1\Budget $budget Required. The updated budget object. - * The budget to update is specified by the budget name in the budget. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Indicates which fields in the provided budget to update. - * Read-only fields (such as `name`) cannot be changed. If this is not - * provided, then only fields with non-default values from the request are - * updated. See - * https://developers.google.com/protocol-buffers/docs/proto3#default for more - * details about default values. - * - * @return \Google\Cloud\Billing\Budgets\V1\UpdateBudgetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Billing\Budgets\V1\Budget $budget, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBudget($budget) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Billing\Budgets\V1\Budget $budget - * Required. The updated budget object. - * The budget to update is specified by the budget name in the budget. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Indicates which fields in the provided budget to update. - * Read-only fields (such as `name`) cannot be changed. If this is not - * provided, then only fields with non-default values from the request are - * updated. See - * https://developers.google.com/protocol-buffers/docs/proto3#default for more - * details about default values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Billing\Budgets\V1\BudgetService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated budget object. - * The budget to update is specified by the budget name in the budget. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Billing\Budgets\V1\Budget|null - */ - public function getBudget() - { - return $this->budget; - } - - public function hasBudget() - { - return isset($this->budget); - } - - public function clearBudget() - { - unset($this->budget); - } - - /** - * Required. The updated budget object. - * The budget to update is specified by the budget name in the budget. - * - * Generated from protobuf field .google.cloud.billing.budgets.v1.Budget budget = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Billing\Budgets\V1\Budget $var - * @return $this - */ - public function setBudget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Billing\Budgets\V1\Budget::class); - $this->budget = $var; - - return $this; - } - - /** - * Optional. Indicates which fields in the provided budget to update. - * Read-only fields (such as `name`) cannot be changed. If this is not - * provided, then only fields with non-default values from the request are - * updated. See - * https://developers.google.com/protocol-buffers/docs/proto3#default for more - * details about default values. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Indicates which fields in the provided budget to update. - * Read-only fields (such as `name`) cannot be changed. If this is not - * provided, then only fields with non-default values from the request are - * updated. See - * https://developers.google.com/protocol-buffers/docs/proto3#default for more - * details about default values. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/create_budget.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/create_budget.php deleted file mode 100644 index b24aaebc7fd2..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/create_budget.php +++ /dev/null @@ -1,79 +0,0 @@ -setAmount($budgetAmount); - $request = (new CreateBudgetRequest()) - ->setParent($formattedParent) - ->setBudget($budget); - - // Call the API and handle any network failures. - try { - /** @var Budget $response */ - $response = $budgetServiceClient->createBudget($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 = BudgetServiceClient::billingAccountName('[BILLING_ACCOUNT]'); - - create_budget_sample($formattedParent); -} -// [END billingbudgets_v1_generated_BudgetService_CreateBudget_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/delete_budget.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/delete_budget.php deleted file mode 100644 index 95a60fe73613..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/delete_budget.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $budgetServiceClient->deleteBudget($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 = BudgetServiceClient::budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); - - delete_budget_sample($formattedName); -} -// [END billingbudgets_v1_generated_BudgetService_DeleteBudget_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/get_budget.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/get_budget.php deleted file mode 100644 index 9f1da7f3db08..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/get_budget.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Budget $response */ - $response = $budgetServiceClient->getBudget($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 = BudgetServiceClient::budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); - - get_budget_sample($formattedName); -} -// [END billingbudgets_v1_generated_BudgetService_GetBudget_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/list_budgets.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/list_budgets.php deleted file mode 100644 index ccb583365fad..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/list_budgets.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $budgetServiceClient->listBudgets($request); - - /** @var Budget $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 = BudgetServiceClient::billingAccountName('[BILLING_ACCOUNT]'); - - list_budgets_sample($formattedParent); -} -// [END billingbudgets_v1_generated_BudgetService_ListBudgets_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/update_budget.php b/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/update_budget.php deleted file mode 100644 index 5e9bdda7e2af..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/samples/V1/BudgetServiceClient/update_budget.php +++ /dev/null @@ -1,66 +0,0 @@ -setAmount($budgetAmount); - $request = (new UpdateBudgetRequest()) - ->setBudget($budget); - - // Call the API and handle any network failures. - try { - /** @var Budget $response */ - $response = $budgetServiceClient->updateBudget($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END billingbudgets_v1_generated_BudgetService_UpdateBudget_sync] diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/Client/BudgetServiceClient.php b/owl-bot-staging/BillingBudgets/v1/src/V1/Client/BudgetServiceClient.php deleted file mode 100644 index faf7e8493001..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/src/V1/Client/BudgetServiceClient.php +++ /dev/null @@ -1,382 +0,0 @@ - createBudgetAsync(CreateBudgetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBudgetAsync(DeleteBudgetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBudgetAsync(GetBudgetRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBudgetsAsync(ListBudgetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBudgetAsync(UpdateBudgetRequest $request, array $optionalArgs = []) - */ -final class BudgetServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.billing.budgets.v1.BudgetService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'billingbudgets.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'billingbudgets.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-billing', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/budget_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/budget_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/budget_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/budget_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account resource. - */ - public static function billingAccountName(string $billingAccount): string - { - return self::getPathTemplate('billingAccount')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a budget - * resource. - * - * @param string $billingAccount - * @param string $budget - * - * @return string The formatted budget resource. - */ - public static function budgetName(string $billingAccount, string $budget): string - { - return self::getPathTemplate('budget')->render([ - 'billing_account' => $billingAccount, - 'budget' => $budget, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - billingAccount: billingAccounts/{billing_account} - * - budget: billingAccounts/{billing_account}/budgets/{budget} - * - * 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 'billingbudgets.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new budget. See - * [Quotas and limits](https://cloud.google.com/billing/quotas) - * for more information on the limits of the number of budgets you can create. - * - * The async variant is {@see BudgetServiceClient::createBudgetAsync()} . - * - * @example samples/V1/BudgetServiceClient/create_budget.php - * - * @param CreateBudgetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Budget - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBudget(CreateBudgetRequest $request, array $callOptions = []): Budget - { - return $this->startApiCall('CreateBudget', $request, $callOptions)->wait(); - } - - /** - * Deletes a budget. Returns successfully if already deleted. - * - * The async variant is {@see BudgetServiceClient::deleteBudgetAsync()} . - * - * @example samples/V1/BudgetServiceClient/delete_budget.php - * - * @param DeleteBudgetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteBudget(DeleteBudgetRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBudget', $request, $callOptions)->wait(); - } - - /** - * Returns a budget. - * - * WARNING: There are some fields exposed on the Google Cloud Console that - * aren't available on this API. When reading from the API, you will not - * see these fields in the return value, though they may have been set - * in the Cloud Console. - * - * The async variant is {@see BudgetServiceClient::getBudgetAsync()} . - * - * @example samples/V1/BudgetServiceClient/get_budget.php - * - * @param GetBudgetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Budget - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBudget(GetBudgetRequest $request, array $callOptions = []): Budget - { - return $this->startApiCall('GetBudget', $request, $callOptions)->wait(); - } - - /** - * Returns a list of budgets for a billing account. - * - * WARNING: There are some fields exposed on the Google Cloud Console that - * aren't available on this API. When reading from the API, you will not - * see these fields in the return value, though they may have been set - * in the Cloud Console. - * - * The async variant is {@see BudgetServiceClient::listBudgetsAsync()} . - * - * @example samples/V1/BudgetServiceClient/list_budgets.php - * - * @param ListBudgetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBudgets(ListBudgetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBudgets', $request, $callOptions); - } - - /** - * Updates a budget and returns the updated budget. - * - * WARNING: There are some fields exposed on the Google Cloud Console that - * aren't available on this API. Budget fields that are not exposed in - * this API will not be changed by this method. - * - * The async variant is {@see BudgetServiceClient::updateBudgetAsync()} . - * - * @example samples/V1/BudgetServiceClient/update_budget.php - * - * @param UpdateBudgetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Budget - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBudget(UpdateBudgetRequest $request, array $callOptions = []): Budget - { - return $this->startApiCall('UpdateBudget', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BillingBudgets/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 483462dfa32a..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.billing.budgets.v1", - "libraryPackage": "Google\\Cloud\\Billing\\Budgets\\V1", - "services": { - "BudgetService": { - "clients": { - "grpc": { - "libraryClient": "BudgetServiceGapicClient", - "rpcs": { - "CreateBudget": { - "methods": [ - "createBudget" - ] - }, - "DeleteBudget": { - "methods": [ - "deleteBudget" - ] - }, - "GetBudget": { - "methods": [ - "getBudget" - ] - }, - "ListBudgets": { - "methods": [ - "listBudgets" - ] - }, - "UpdateBudget": { - "methods": [ - "updateBudget" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_client_config.json b/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_client_config.json deleted file mode 100644 index e874f8e03dc2..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_client_config.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "interfaces": { - "google.cloud.billing.budgets.v1.BudgetService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateBudget": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteBudget": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetBudget": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBudgets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateBudget": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_descriptor_config.php b/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_descriptor_config.php deleted file mode 100644 index 31788f25dfc6..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_descriptor_config.php +++ /dev/null @@ -1,101 +0,0 @@ - [ - 'google.cloud.billing.budgets.v1.BudgetService' => [ - 'CreateBudget' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Billing\Budgets\V1\Budget', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBudget' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBudget' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Billing\Budgets\V1\Budget', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBudgets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBudgets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Billing\Budgets\V1\ListBudgetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBudget' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Billing\Budgets\V1\Budget', - 'headerParams' => [ - [ - 'keyName' => 'budget.name', - 'fieldAccessors' => [ - 'getBudget', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'billingAccount' => 'billingAccounts/{billing_account}', - 'budget' => 'billingAccounts/{billing_account}/budgets/{budget}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_rest_client_config.php b/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_rest_client_config.php deleted file mode 100644 index 13ac0525c7a7..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/src/V1/resources/budget_service_rest_client_config.php +++ /dev/null @@ -1,87 +0,0 @@ - [ - 'google.cloud.billing.budgets.v1.BudgetService' => [ - 'CreateBudget' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=billingAccounts/*}/budgets', - 'body' => 'budget', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBudget' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=billingAccounts/*/budgets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBudget' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=billingAccounts/*/budgets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBudgets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=billingAccounts/*}/budgets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBudget' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{budget.name=billingAccounts/*/budgets/*}', - 'body' => 'budget', - 'placeholders' => [ - 'budget.name' => [ - 'getters' => [ - 'getBudget', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/BillingBudgets/v1/tests/Unit/V1/Client/BudgetServiceClientTest.php b/owl-bot-staging/BillingBudgets/v1/tests/Unit/V1/Client/BudgetServiceClientTest.php deleted file mode 100644 index d5207f2c8781..000000000000 --- a/owl-bot-staging/BillingBudgets/v1/tests/Unit/V1/Client/BudgetServiceClientTest.php +++ /dev/null @@ -1,459 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BudgetServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BudgetServiceClient($options); - } - - /** @test */ - public function createBudgetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new Budget(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); - $budget = new Budget(); - $budgetAmount = new BudgetAmount(); - $budget->setAmount($budgetAmount); - $request = (new CreateBudgetRequest()) - ->setParent($formattedParent) - ->setBudget($budget); - $response = $gapicClient->createBudget($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.billing.budgets.v1.BudgetService/CreateBudget', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBudget(); - $this->assertProtobufEquals($budget, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBudgetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); - $budget = new Budget(); - $budgetAmount = new BudgetAmount(); - $budget->setAmount($budgetAmount); - $request = (new CreateBudgetRequest()) - ->setParent($formattedParent) - ->setBudget($budget); - try { - $gapicClient->createBudget($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBudgetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); - $request = (new DeleteBudgetRequest()) - ->setName($formattedName); - $gapicClient->deleteBudget($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.billing.budgets.v1.BudgetService/DeleteBudget', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBudgetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); - $request = (new DeleteBudgetRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBudget($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBudgetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new Budget(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); - $request = (new GetBudgetRequest()) - ->setName($formattedName); - $response = $gapicClient->getBudget($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.billing.budgets.v1.BudgetService/GetBudget', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBudgetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->budgetName('[BILLING_ACCOUNT]', '[BUDGET]'); - $request = (new GetBudgetRequest()) - ->setName($formattedName); - try { - $gapicClient->getBudget($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBudgetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $budgetsElement = new Budget(); - $budgets = [ - $budgetsElement, - ]; - $expectedResponse = new ListBudgetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBudgets($budgets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); - $request = (new ListBudgetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBudgets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBudgets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.billing.budgets.v1.BudgetService/ListBudgets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBudgetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->billingAccountName('[BILLING_ACCOUNT]'); - $request = (new ListBudgetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBudgets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBudgetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new Budget(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $budget = new Budget(); - $budgetAmount = new BudgetAmount(); - $budget->setAmount($budgetAmount); - $request = (new UpdateBudgetRequest()) - ->setBudget($budget); - $response = $gapicClient->updateBudget($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.billing.budgets.v1.BudgetService/UpdateBudget', $actualFuncCall); - $actualValue = $actualRequestObject->getBudget(); - $this->assertProtobufEquals($budget, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBudgetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $budget = new Budget(); - $budgetAmount = new BudgetAmount(); - $budget->setAmount($budgetAmount); - $request = (new UpdateBudgetRequest()) - ->setBudget($budget); - try { - $gapicClient->updateBudget($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBudgetAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new Budget(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->billingAccountName('[BILLING_ACCOUNT]'); - $budget = new Budget(); - $budgetAmount = new BudgetAmount(); - $budget->setAmount($budgetAmount); - $request = (new CreateBudgetRequest()) - ->setParent($formattedParent) - ->setBudget($budget); - $response = $gapicClient->createBudgetAsync($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.billing.budgets.v1.BudgetService/CreateBudget', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBudget(); - $this->assertProtobufEquals($budget, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Resources.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Resources.php deleted file mode 100644 index ea2ac719c1bbeacd734535236aeaf09946b18369..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4629 zcmcIo&2JM&6ld2E-~|%1d<8?x)*uL_IM{p?Orcua8)MAinKPd)P&aO}+Nt{ultFi7MQ@4h#`_nWuxYvzkD?M)l5 z$VF^oNAqw;Zg0!pCYEi-@+{plFROau5ap$sLU2rO&u@ZkONGnd)2n6Hy+Coxf*j2bxx~fde|{FqgBAJ?hxCv zoElZlW_#EhxRt$Gyb+pZaHK0Q1{|~5F_MpE&++kY>$2=%&v(p6oHqm58T@KZaGhe4 z)-u6HCx~L2@ko}fMPMv<$z#UCOzo@76?a6Do8*e=!q0^L3XW*k{8efZp zU9ml0hhIO2JMR%#(v@IQibrE=LNunf(uoTpvSyP(WCnqmxEzXjn9{GjYJf4gFr^KWMnC*noKm%%FCXxt}10VGatF0Nx=Bp9j(hQ#` z2cxFB=(Oh zX%=G7@ph2Qk^)CqI$@e2?@2T(J`fV$!?o$6>4RARL4cb>^KT8G55i#wTGywHnGaz< z*@49VMN+y2H;UzIPAQ{WwOqxbb*HGH(2-FrB~svoh3WyDHjb( z=S_jiqMwm4nT894Y}i|dr897X)xoH`2a%loHwGsMYgieT5X|pwJ*{zCY+S|P0@J=a68pN^Lwde%dr{yVVficb__dYy^ zP*M96lYN*Q&iw0Ddlo?oqp)^aJsI3wOXpHNNG0JMw5p}T$JWv zHdHOBm5q2TX~VoaN<)(2l3H1=*7NF$T4_#-si8&z<;vCkGo(}sNLi&bHY!((l)wcz zTc~f;S1ZG}s9Gs+#Kq*FA{tQRKkpq`_3u|^xId zS2#44BEk55vjYbMoB)MLGv_LrTcT{ji6%;j~M7 zrbbT>G!cy+J&$>tecsXLGU`;6M+~JJ5tB^pJ$`Y%gpjxAWGPmzOK#iwL=HC4<<3hom+n;A5fyh%a6x_Z2@O~tSO%mKoXX1yY zk0HTqFfyq2EZ<0vm^v~+zT4u=1o>{mM-PxQ`^TiSa7xV=7-zb*i0^U6SIvj4Mg&9s zI}h$MeflpBBl;tPq5i#0n&~sMvm^Su1qm@OB>xiN)L1Oi?s1ehC{~Jx;V#gQCz1{i znd8zmdYEu^LXhV4Er%8jyJw?eX=;@%oRXg%ZpT= zU0$Se{PIHCeGigaOaBvTwZc1&@RDOhuSIV;UW?ZPxNMf=WwR3iv)Q$Ddxrbq&h^3h Y`Lo~-Vb_(zzSj+0Gq@DkfgOPV0hR^sh5!Hn diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Service.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/GPBMetadata/Google/Cloud/Binaryauthorization/V1/Service.php deleted file mode 100644 index e9d7a87b50e5a431b20d4799554766233df864cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5005 zcmcIoO>o;p6h>~zG@JghkT$q~suF0LG%|Ll{3s2r?6_%|Hc1oLop#K4WO# zl(dse51hEcaN^Fu5pE2_iBk_8;Fc4^aN@>+8HN-4qgABDb>-0Jq)k0V{-L_}h2&=L@yC^R#R^;;ReB~@L z_1z9OktVOY?y8M)rtNl`xrXH!c*E!fYc94P7=h(Fx%GU`M|j;bk;=RS;23S>dxnYR zxuxPw6c|k-FluwmQLRKB)rz|v)vEbv08HEPeR+jD1P_5s{=81ZwoKU%$O}z*%<}7& zV+EFBTMtNNGjhwYeMD?`?`?G)lY*3~!J=cL@$)kGN%xL|q*iOR&Mb`hVtp3fc+{TiM{R7%s#b(lR9TWHZ-)*E3m!ws*-HsCO0 z;nKx$si*9PjUO7F2#r`9AUet+N_@C@a+R}7`-QR1E?-qvz|lDrEV)GI8_VdU4j~_2 z0sCnu8IfdZe6X1RP0#$RPlEH^Xy7j<4EQSPXgTgjxdUFl?UCMtl76p(0gt_ic^)cE zs@%LM%_{d%+(%$2KS*G>gc0$~>%_$ZbBXviFv&rP`XWO;1tuAhg0QyX7^|e|?u3oq z50Dwa5irCVa&g^ij$~N;^u=%%91trb`^e*=!c;2o0w#xl2S7r$cqX9h3A!WTDd-lS zl=s0fCtN%czT>!QI`@YAkpy13VfhhqU$}oJtiJ>XJ(88WPo@gv{6z=>V2=X#L*y{R z2Nev4cVO^6(vA_l3I+{U*Dm%+_V@K2Bs>m|IOyY`9(yOty>br>&mtS`F1Kfpv%BCJ zDTb8|KS1rIPX4$4ew4sil}u?WL0%DTbS;`@2NR8$NaSxgR@PkYtlFoA4wxCs$xz{} z8a5Kr`_!&pS&_q&;D{T&s7}Tv;tAxdW8ipfRp_$b!PdzBNN&ns5_s(?0ffmnzyNX5 zvAOOK7jC7JWh&q5GII=v!J#H{$X8FDbROSzcwbN!z(Ba+7=X*=mD@Ke_1g<8OXbr1 zwfXYw(HG!BaG+XV=Ko3XG|1|eN_nNCSLPQN>g1EJ&R6x~jq=e<;dcN|(62M{jrZUt z>r-vg&cY9}Y94+mfx)O%!%L~+jP{2K&-T-DmB}rg4T49%{_$DnG(1Ts$U{0AX2_tS z4b#s}3Ui;oZwdy7>dmp_*SZD zVitQ0<&Ai)j6#liC;K8uQa79MCqjL4Xr-h+X|zYYb6a{u8squR>;&UkVBA$YVu6B> z5&pdd4khLid?yv<2^$eay4u@e$~&P_ph93p!r~D*;E%f34g7-SAUWVt<{)V#;2#r_ ziw{wiodA?%aZEhDII`8py3*KvR1N)$@6BIybu9=yU(4n0-@m_OF-JQoKR!=+wh^>k z+%9~c0f*xwm-N-IC2)k)fBY$&7J>9S0H`~x1Pguj*b8ypoPnpdd#vr6{J^>0WS<)? ze`f#;XCgV`UPrcvFrns?3^>(uRKodGMD_F`XnXHjxC*tfz$9>8DJ3Kw6Tx=xq-tL8 z^{u2y6VHqH;-?vKiJY56E?*Z%D02E*b-UgZ5w(!P-9=4aW4i0p zegoogle.cloud.binaryauthorization.v1.AdmissionRule - */ -class AdmissionRule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. How this admission rule will be evaluated. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $evaluation_mode = 0; - /** - * Optional. The resource names of the attestors that must attest to - * a container image, in the format `projects/*/attestors/*`. Each - * attestor must exist before a policy can reference it. To add an attestor - * to a policy the principal issuing the policy change request must be able - * to read the attestor resource. - * Note: this field must be non-empty when the evaluation_mode field specifies - * REQUIRE_ATTESTATION, otherwise it must be empty. - * - * Generated from protobuf field repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $require_attestations_by; - /** - * Required. The action when a pod creation is denied by the admission rule. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $enforcement_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $evaluation_mode - * Required. How this admission rule will be evaluated. - * @type array|\Google\Protobuf\Internal\RepeatedField $require_attestations_by - * Optional. The resource names of the attestors that must attest to - * a container image, in the format `projects/*/attestors/*`. Each - * attestor must exist before a policy can reference it. To add an attestor - * to a policy the principal issuing the policy change request must be able - * to read the attestor resource. - * Note: this field must be non-empty when the evaluation_mode field specifies - * REQUIRE_ATTESTATION, otherwise it must be empty. - * @type int $enforcement_mode - * Required. The action when a pod creation is denied by the admission rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. How this admission rule will be evaluated. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getEvaluationMode() - { - return $this->evaluation_mode; - } - - /** - * Required. How this admission rule will be evaluated. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setEvaluationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule\EvaluationMode::class); - $this->evaluation_mode = $var; - - return $this; - } - - /** - * Optional. The resource names of the attestors that must attest to - * a container image, in the format `projects/*/attestors/*`. Each - * attestor must exist before a policy can reference it. To add an attestor - * to a policy the principal issuing the policy change request must be able - * to read the attestor resource. - * Note: this field must be non-empty when the evaluation_mode field specifies - * REQUIRE_ATTESTATION, otherwise it must be empty. - * - * Generated from protobuf field repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequireAttestationsBy() - { - return $this->require_attestations_by; - } - - /** - * Optional. The resource names of the attestors that must attest to - * a container image, in the format `projects/*/attestors/*`. Each - * attestor must exist before a policy can reference it. To add an attestor - * to a policy the principal issuing the policy change request must be able - * to read the attestor resource. - * Note: this field must be non-empty when the evaluation_mode field specifies - * REQUIRE_ATTESTATION, otherwise it must be empty. - * - * Generated from protobuf field repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequireAttestationsBy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->require_attestations_by = $arr; - - return $this; - } - - /** - * Required. The action when a pod creation is denied by the admission rule. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getEnforcementMode() - { - return $this->enforcement_mode; - } - - /** - * Required. The action when a pod creation is denied by the admission rule. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setEnforcementMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule\EnforcementMode::class); - $this->enforcement_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EnforcementMode.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EnforcementMode.php deleted file mode 100644 index 577a398fc23c..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EnforcementMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode - */ -class EnforcementMode -{ - /** - * Do not use. - * - * Generated from protobuf enum ENFORCEMENT_MODE_UNSPECIFIED = 0; - */ - const ENFORCEMENT_MODE_UNSPECIFIED = 0; - /** - * Enforce the admission rule by blocking the pod creation. - * - * Generated from protobuf enum ENFORCED_BLOCK_AND_AUDIT_LOG = 1; - */ - const ENFORCED_BLOCK_AND_AUDIT_LOG = 1; - /** - * Dryrun mode: Audit logging only. This will allow the pod creation as if - * the admission request had specified break-glass. - * - * Generated from protobuf enum DRYRUN_AUDIT_LOG_ONLY = 2; - */ - const DRYRUN_AUDIT_LOG_ONLY = 2; - - private static $valueToName = [ - self::ENFORCEMENT_MODE_UNSPECIFIED => 'ENFORCEMENT_MODE_UNSPECIFIED', - self::ENFORCED_BLOCK_AND_AUDIT_LOG => 'ENFORCED_BLOCK_AND_AUDIT_LOG', - self::DRYRUN_AUDIT_LOG_ONLY => 'DRYRUN_AUDIT_LOG_ONLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EnforcementMode::class, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule_EnforcementMode::class); - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EvaluationMode.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EvaluationMode.php deleted file mode 100644 index 81cc9a636e88..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionRule/EvaluationMode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode - */ -class EvaluationMode -{ - /** - * Do not use. - * - * Generated from protobuf enum EVALUATION_MODE_UNSPECIFIED = 0; - */ - const EVALUATION_MODE_UNSPECIFIED = 0; - /** - * This rule allows all all pod creations. - * - * Generated from protobuf enum ALWAYS_ALLOW = 1; - */ - const ALWAYS_ALLOW = 1; - /** - * This rule allows a pod creation if all the attestors listed in - * 'require_attestations_by' have valid attestations for all of the - * images in the pod spec. - * - * Generated from protobuf enum REQUIRE_ATTESTATION = 2; - */ - const REQUIRE_ATTESTATION = 2; - /** - * This rule denies all pod creations. - * - * Generated from protobuf enum ALWAYS_DENY = 3; - */ - const ALWAYS_DENY = 3; - - private static $valueToName = [ - self::EVALUATION_MODE_UNSPECIFIED => 'EVALUATION_MODE_UNSPECIFIED', - self::ALWAYS_ALLOW => 'ALWAYS_ALLOW', - self::REQUIRE_ATTESTATION => 'REQUIRE_ATTESTATION', - self::ALWAYS_DENY => 'ALWAYS_DENY', - ]; - - 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(EvaluationMode::class, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule_EvaluationMode::class); - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionWhitelistPattern.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionWhitelistPattern.php deleted file mode 100644 index 7d0e33969045..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AdmissionWhitelistPattern.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern - */ -class AdmissionWhitelistPattern extends \Google\Protobuf\Internal\Message -{ - /** - * An image name pattern to allowlist, in the form `registry/path/to/image`. - * This supports a trailing `*` wildcard, but this is allowed only in - * text after the `registry/` part. This also supports a trailing `**` - * wildcard which matches subdirectories of a given entry. - * - * Generated from protobuf field string name_pattern = 1; - */ - protected $name_pattern = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name_pattern - * An image name pattern to allowlist, in the form `registry/path/to/image`. - * This supports a trailing `*` wildcard, but this is allowed only in - * text after the `registry/` part. This also supports a trailing `**` - * wildcard which matches subdirectories of a given entry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * An image name pattern to allowlist, in the form `registry/path/to/image`. - * This supports a trailing `*` wildcard, but this is allowed only in - * text after the `registry/` part. This also supports a trailing `**` - * wildcard which matches subdirectories of a given entry. - * - * Generated from protobuf field string name_pattern = 1; - * @return string - */ - public function getNamePattern() - { - return $this->name_pattern; - } - - /** - * An image name pattern to allowlist, in the form `registry/path/to/image`. - * This supports a trailing `*` wildcard, but this is allowed only in - * text after the `registry/` part. This also supports a trailing `**` - * wildcard which matches subdirectories of a given entry. - * - * Generated from protobuf field string name_pattern = 1; - * @param string $var - * @return $this - */ - public function setNamePattern($var) - { - GPBUtil::checkString($var, True); - $this->name_pattern = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Attestor.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Attestor.php deleted file mode 100644 index 823512f34ddc..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Attestor.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.binaryauthorization.v1.Attestor - */ -class Attestor extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name, in the format: - * `projects/*/attestors/*`. This field may not be updated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. A descriptive comment. This field may be updated. - * The field may be displayed in chooser dialogs. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Time when the attestor was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - protected $attestor_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name, in the format: - * `projects/*/attestors/*`. This field may not be updated. - * @type string $description - * Optional. A descriptive comment. This field may be updated. - * The field may be displayed in chooser dialogs. - * @type \Google\Cloud\BinaryAuthorization\V1\UserOwnedGrafeasNote $user_owned_grafeas_note - * This specifies how an attestation will be read, and how it will be used - * during policy enforcement. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time when the attestor was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name, in the format: - * `projects/*/attestors/*`. This field may not be updated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name, in the format: - * `projects/*/attestors/*`. This field may not be updated. - * - * 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. A descriptive comment. This field may be updated. - * The field may be displayed in chooser dialogs. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A descriptive comment. This field may be updated. - * The field may be displayed in chooser dialogs. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * This specifies how an attestation will be read, and how it will be used - * during policy enforcement. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * @return \Google\Cloud\BinaryAuthorization\V1\UserOwnedGrafeasNote|null - */ - public function getUserOwnedGrafeasNote() - { - return $this->readOneof(3); - } - - public function hasUserOwnedGrafeasNote() - { - return $this->hasOneof(3); - } - - /** - * This specifies how an attestation will be read, and how it will be used - * during policy enforcement. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * @param \Google\Cloud\BinaryAuthorization\V1\UserOwnedGrafeasNote $var - * @return $this - */ - public function setUserOwnedGrafeasNote($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\UserOwnedGrafeasNote::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Output only. Time when the attestor 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. Time when the attestor 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; - } - - /** - * @return string - */ - public function getAttestorType() - { - return $this->whichOneof("attestor_type"); - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AttestorPublicKey.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AttestorPublicKey.php deleted file mode 100644 index e667ea8a3f9c..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/AttestorPublicKey.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.binaryauthorization.v1.AttestorPublicKey - */ -class AttestorPublicKey extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A descriptive comment. This field may be updated. - * - * Generated from protobuf field string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $comment = ''; - /** - * The ID of this public key. - * Signatures verified by BinAuthz must include the ID of the public key that - * can be used to verify them, and that ID must match the contents of this - * field exactly. - * Additional restrictions on this field can be imposed based on which public - * key type is encapsulated. See the documentation on `public_key` cases below - * for details. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - protected $public_key; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $comment - * Optional. A descriptive comment. This field may be updated. - * @type string $id - * The ID of this public key. - * Signatures verified by BinAuthz must include the ID of the public key that - * can be used to verify them, and that ID must match the contents of this - * field exactly. - * Additional restrictions on this field can be imposed based on which public - * key type is encapsulated. See the documentation on `public_key` cases below - * for details. - * @type string $ascii_armored_pgp_public_key - * ASCII-armored representation of a PGP public key, as the entire output by - * the command `gpg --export --armor foo@example.com` (either LF or CRLF - * line endings). - * When using this field, `id` should be left blank. The BinAuthz API - * handlers will calculate the ID and fill it in automatically. BinAuthz - * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as - * upper-case hex. If `id` is provided by the caller, it will be - * overwritten by the API-calculated ID. - * @type \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey $pkix_public_key - * A raw PKIX SubjectPublicKeyInfo format public key. - * NOTE: `id` may be explicitly provided by the caller when using this - * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left - * blank, a default one will be computed based on the digest of the DER - * encoding of the public key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A descriptive comment. This field may be updated. - * - * Generated from protobuf field string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getComment() - { - return $this->comment; - } - - /** - * Optional. A descriptive comment. This field may be updated. - * - * Generated from protobuf field string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setComment($var) - { - GPBUtil::checkString($var, True); - $this->comment = $var; - - return $this; - } - - /** - * The ID of this public key. - * Signatures verified by BinAuthz must include the ID of the public key that - * can be used to verify them, and that ID must match the contents of this - * field exactly. - * Additional restrictions on this field can be imposed based on which public - * key type is encapsulated. See the documentation on `public_key` cases below - * for details. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The ID of this public key. - * Signatures verified by BinAuthz must include the ID of the public key that - * can be used to verify them, and that ID must match the contents of this - * field exactly. - * Additional restrictions on this field can be imposed based on which public - * key type is encapsulated. See the documentation on `public_key` cases below - * for details. - * - * Generated from protobuf field string id = 2; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * ASCII-armored representation of a PGP public key, as the entire output by - * the command `gpg --export --armor foo@example.com` (either LF or CRLF - * line endings). - * When using this field, `id` should be left blank. The BinAuthz API - * handlers will calculate the ID and fill it in automatically. BinAuthz - * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as - * upper-case hex. If `id` is provided by the caller, it will be - * overwritten by the API-calculated ID. - * - * Generated from protobuf field string ascii_armored_pgp_public_key = 3; - * @return string - */ - public function getAsciiArmoredPgpPublicKey() - { - return $this->readOneof(3); - } - - public function hasAsciiArmoredPgpPublicKey() - { - return $this->hasOneof(3); - } - - /** - * ASCII-armored representation of a PGP public key, as the entire output by - * the command `gpg --export --armor foo@example.com` (either LF or CRLF - * line endings). - * When using this field, `id` should be left blank. The BinAuthz API - * handlers will calculate the ID and fill it in automatically. BinAuthz - * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as - * upper-case hex. If `id` is provided by the caller, it will be - * overwritten by the API-calculated ID. - * - * Generated from protobuf field string ascii_armored_pgp_public_key = 3; - * @param string $var - * @return $this - */ - public function setAsciiArmoredPgpPublicKey($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A raw PKIX SubjectPublicKeyInfo format public key. - * NOTE: `id` may be explicitly provided by the caller when using this - * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left - * blank, a default one will be computed based on the digest of the DER - * encoding of the public key. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - * @return \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey|null - */ - public function getPkixPublicKey() - { - return $this->readOneof(5); - } - - public function hasPkixPublicKey() - { - return $this->hasOneof(5); - } - - /** - * A raw PKIX SubjectPublicKeyInfo format public key. - * NOTE: `id` may be explicitly provided by the caller when using this - * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left - * blank, a default one will be computed based on the digest of the DER - * encoding of the public key. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - * @param \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey $var - * @return $this - */ - public function setPkixPublicKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getPublicKey() - { - return $this->whichOneof("public_key"); - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/CreateAttestorRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/CreateAttestorRequest.php deleted file mode 100644 index 60d6da8c9ebf..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/CreateAttestorRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.binaryauthorization.v1.CreateAttestorRequest - */ -class CreateAttestorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. - * - * Generated from protobuf field string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attestor_id = ''; - /** - * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, - * in the format `projects/*/attestors/*`. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attestor = null; - - /** - * @param string $parent Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. Please see - * {@see BinauthzManagementServiceV1Client::projectName()} for help formatting this field. - * @param string $attestorId Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. - * @param \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, - * in the format `projects/*/attestors/*`. - * - * @return \Google\Cloud\BinaryAuthorization\V1\CreateAttestorRequest - * - * @experimental - */ - public static function build(string $parent, string $attestorId, \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor): self - { - return (new self()) - ->setParent($parent) - ->setAttestorId($attestorId) - ->setAttestor($attestor); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. - * @type string $attestor_id - * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. - * @type \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor - * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, - * in the format `projects/*/attestors/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. - * - * Generated from protobuf field string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAttestorId() - { - return $this->attestor_id; - } - - /** - * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. - * - * Generated from protobuf field string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAttestorId($var) - { - GPBUtil::checkString($var, True); - $this->attestor_id = $var; - - return $this; - } - - /** - * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, - * in the format `projects/*/attestors/*`. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BinaryAuthorization\V1\Attestor|null - */ - public function getAttestor() - { - return $this->attestor; - } - - public function hasAttestor() - { - return isset($this->attestor); - } - - public function clearAttestor() - { - unset($this->attestor); - } - - /** - * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, - * in the format `projects/*/attestors/*`. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BinaryAuthorization\V1\Attestor $var - * @return $this - */ - public function setAttestor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\Attestor::class); - $this->attestor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/DeleteAttestorRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/DeleteAttestorRequest.php deleted file mode 100644 index b0df352faa1d..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/DeleteAttestorRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.binaryauthorization.v1.DeleteAttestorRequest - */ -class DeleteAttestorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format - * `projects/*/attestors/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format - * `projects/*/attestors/*`. Please see - * {@see BinauthzManagementServiceV1Client::attestorName()} for help formatting this field. - * - * @return \Google\Cloud\BinaryAuthorization\V1\DeleteAttestorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format - * `projects/*/attestors/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format - * `projects/*/attestors/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format - * `projects/*/attestors/*`. - * - * 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/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetAttestorRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetAttestorRequest.php deleted file mode 100644 index 1eca782c6323..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetAttestorRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.binaryauthorization.v1.GetAttestorRequest - */ -class GetAttestorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format - * `projects/*/attestors/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format - * `projects/*/attestors/*`. Please see - * {@see BinauthzManagementServiceV1Client::attestorName()} for help formatting this field. - * - * @return \Google\Cloud\BinaryAuthorization\V1\GetAttestorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format - * `projects/*/attestors/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format - * `projects/*/attestors/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format - * `projects/*/attestors/*`. - * - * 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/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetPolicyRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetPolicyRequest.php deleted file mode 100644 index be8fcb28d126..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.binaryauthorization.v1.GetPolicyRequest - */ -class GetPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, - * in the format `projects/*/policy`. - * - * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, - * in the format `projects/*/policy`. Please see - * {@see BinauthzManagementServiceV1Client::policyName()} for help formatting this field. - * - * @return \Google\Cloud\BinaryAuthorization\V1\GetPolicyRequest - * - * @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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, - * in the format `projects/*/policy`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, - * in the format `projects/*/policy`. - * - * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, - * in the format `projects/*/policy`. - * - * 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/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetSystemPolicyRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetSystemPolicyRequest.php deleted file mode 100644 index 6a2924097b64..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/GetSystemPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.binaryauthorization.v1.GetSystemPolicyRequest - */ -class GetSystemPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name, in the format `locations/*/policy`. - * Note that the system policy is not associated with a project. - * - * 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, in the format `locations/*/policy`. - * Note that the system policy is not associated with a project. Please see - * {@see SystemPolicyV1Client::policyName()} for help formatting this field. - * - * @return \Google\Cloud\BinaryAuthorization\V1\GetSystemPolicyRequest - * - * @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, in the format `locations/*/policy`. - * Note that the system policy is not associated with a project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name, in the format `locations/*/policy`. - * Note that the system policy is not associated with a project. - * - * 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, in the format `locations/*/policy`. - * Note that the system policy is not associated with a project. - * - * 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/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsRequest.php deleted file mode 100644 index 0ec66e3b59bb..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.binaryauthorization.v1.ListAttestorsRequest - */ -class ListAttestorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project associated with the - * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server may return fewer results than requested. If - * unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. Typically, - * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned - * from the previous call to the `ListAttestors` method. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the project associated with the - * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. Please see - * {@see BinauthzManagementServiceV1Client::projectName()} for help formatting this field. - * - * @return \Google\Cloud\BinaryAuthorization\V1\ListAttestorsRequest - * - * @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 project associated with the - * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. - * @type int $page_size - * Requested page size. The server may return fewer results than requested. If - * unspecified, the server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. Typically, - * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned - * from the previous call to the `ListAttestors` method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project associated with the - * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. - * - * 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 project associated with the - * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. - * - * 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; - } - - /** - * Requested page size. The server may return fewer results than requested. If - * unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server may return fewer results than requested. If - * unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. Typically, - * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned - * from the previous call to the `ListAttestors` method. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. Typically, - * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned - * from the previous call to the `ListAttestors` method. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsResponse.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsResponse.php deleted file mode 100644 index 190c546198a4..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ListAttestorsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.binaryauthorization.v1.ListAttestorsResponse - */ -class ListAttestorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. - * - * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - private $attestors; - /** - * A token to retrieve the next page of results. Pass this value in the - * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the - * `ListAttestors` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\BinaryAuthorization\V1\Attestor>|\Google\Protobuf\Internal\RepeatedField $attestors - * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. - * @type string $next_page_token - * A token to retrieve the next page of results. Pass this value in the - * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the - * `ListAttestors` method to retrieve the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. - * - * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttestors() - { - return $this->attestors; - } - - /** - * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. - * - * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - * @param array<\Google\Cloud\BinaryAuthorization\V1\Attestor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttestors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\Attestor::class); - $this->attestors = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Pass this value in the - * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the - * `ListAttestors` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Pass this value in the - * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the - * `ListAttestors` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey.php deleted file mode 100644 index 47ab5f4c9428..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.binaryauthorization.v1.PkixPublicKey - */ -class PkixPublicKey extends \Google\Protobuf\Internal\Message -{ - /** - * A PEM-encoded public key, as described in - * https://tools.ietf.org/html/rfc7468#section-13 - * - * Generated from protobuf field string public_key_pem = 1; - */ - protected $public_key_pem = ''; - /** - * The signature algorithm used to verify a message against a signature using - * this key. - * These signature algorithm must match the structure and any object - * identifiers encoded in `public_key_pem` (i.e. this algorithm must match - * that of the public key). - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - */ - protected $signature_algorithm = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $public_key_pem - * A PEM-encoded public key, as described in - * https://tools.ietf.org/html/rfc7468#section-13 - * @type int $signature_algorithm - * The signature algorithm used to verify a message against a signature using - * this key. - * These signature algorithm must match the structure and any object - * identifiers encoded in `public_key_pem` (i.e. this algorithm must match - * that of the public key). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A PEM-encoded public key, as described in - * https://tools.ietf.org/html/rfc7468#section-13 - * - * Generated from protobuf field string public_key_pem = 1; - * @return string - */ - public function getPublicKeyPem() - { - return $this->public_key_pem; - } - - /** - * A PEM-encoded public key, as described in - * https://tools.ietf.org/html/rfc7468#section-13 - * - * Generated from protobuf field string public_key_pem = 1; - * @param string $var - * @return $this - */ - public function setPublicKeyPem($var) - { - GPBUtil::checkString($var, True); - $this->public_key_pem = $var; - - return $this; - } - - /** - * The signature algorithm used to verify a message against a signature using - * this key. - * These signature algorithm must match the structure and any object - * identifiers encoded in `public_key_pem` (i.e. this algorithm must match - * that of the public key). - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * @return int - */ - public function getSignatureAlgorithm() - { - return $this->signature_algorithm; - } - - /** - * The signature algorithm used to verify a message against a signature using - * this key. - * These signature algorithm must match the structure and any object - * identifiers encoded in `public_key_pem` (i.e. this algorithm must match - * that of the public key). - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * @param int $var - * @return $this - */ - public function setSignatureAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey\SignatureAlgorithm::class); - $this->signature_algorithm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey/SignatureAlgorithm.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey/SignatureAlgorithm.php deleted file mode 100644 index 9e645d939452..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/PkixPublicKey/SignatureAlgorithm.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm - */ -class SignatureAlgorithm -{ - /** - * Not specified. - * - * Generated from protobuf enum SIGNATURE_ALGORITHM_UNSPECIFIED = 0; - */ - const SIGNATURE_ALGORITHM_UNSPECIFIED = 0; - /** - * RSASSA-PSS 2048 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_PSS_2048_SHA256 = 1; - */ - const RSA_PSS_2048_SHA256 = 1; - /** - * RSASSA-PSS 3072 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_PSS_3072_SHA256 = 2; - */ - const RSA_PSS_3072_SHA256 = 2; - /** - * RSASSA-PSS 4096 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_PSS_4096_SHA256 = 3; - */ - const RSA_PSS_4096_SHA256 = 3; - /** - * RSASSA-PSS 4096 bit key with a SHA512 digest. - * - * Generated from protobuf enum RSA_PSS_4096_SHA512 = 4; - */ - const RSA_PSS_4096_SHA512 = 4; - /** - * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_2048_SHA256 = 5; - */ - const RSA_SIGN_PKCS1_2048_SHA256 = 5; - /** - * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_3072_SHA256 = 6; - */ - const RSA_SIGN_PKCS1_3072_SHA256 = 6; - /** - * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA256 = 7; - */ - const RSA_SIGN_PKCS1_4096_SHA256 = 7; - /** - * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA512 = 8; - */ - const RSA_SIGN_PKCS1_4096_SHA512 = 8; - /** - * ECDSA on the NIST P-256 curve with a SHA256 digest. - * - * Generated from protobuf enum ECDSA_P256_SHA256 = 9; - */ - const ECDSA_P256_SHA256 = 9; - /** - * ECDSA on the NIST P-256 curve with a SHA256 digest. - * - * Generated from protobuf enum EC_SIGN_P256_SHA256 = 9; - */ - const EC_SIGN_P256_SHA256 = 9; - /** - * ECDSA on the NIST P-384 curve with a SHA384 digest. - * - * Generated from protobuf enum ECDSA_P384_SHA384 = 10; - */ - const ECDSA_P384_SHA384 = 10; - /** - * ECDSA on the NIST P-384 curve with a SHA384 digest. - * - * Generated from protobuf enum EC_SIGN_P384_SHA384 = 10; - */ - const EC_SIGN_P384_SHA384 = 10; - /** - * ECDSA on the NIST P-521 curve with a SHA512 digest. - * - * Generated from protobuf enum ECDSA_P521_SHA512 = 11; - */ - const ECDSA_P521_SHA512 = 11; - /** - * ECDSA on the NIST P-521 curve with a SHA512 digest. - * - * Generated from protobuf enum EC_SIGN_P521_SHA512 = 11; - */ - const EC_SIGN_P521_SHA512 = 11; - - private static $valueToName = [ - self::SIGNATURE_ALGORITHM_UNSPECIFIED => 'SIGNATURE_ALGORITHM_UNSPECIFIED', - self::RSA_PSS_2048_SHA256 => 'RSA_PSS_2048_SHA256', - self::RSA_PSS_3072_SHA256 => 'RSA_PSS_3072_SHA256', - self::RSA_PSS_4096_SHA256 => 'RSA_PSS_4096_SHA256', - self::RSA_PSS_4096_SHA512 => 'RSA_PSS_4096_SHA512', - self::RSA_SIGN_PKCS1_2048_SHA256 => 'RSA_SIGN_PKCS1_2048_SHA256', - self::RSA_SIGN_PKCS1_3072_SHA256 => 'RSA_SIGN_PKCS1_3072_SHA256', - self::RSA_SIGN_PKCS1_4096_SHA256 => 'RSA_SIGN_PKCS1_4096_SHA256', - self::RSA_SIGN_PKCS1_4096_SHA512 => 'RSA_SIGN_PKCS1_4096_SHA512', - self::ECDSA_P256_SHA256 => 'ECDSA_P256_SHA256', - self::EC_SIGN_P256_SHA256 => 'EC_SIGN_P256_SHA256', - self::ECDSA_P384_SHA384 => 'ECDSA_P384_SHA384', - self::EC_SIGN_P384_SHA384 => 'EC_SIGN_P384_SHA384', - self::ECDSA_P521_SHA512 => 'ECDSA_P521_SHA512', - self::EC_SIGN_P521_SHA512 => 'EC_SIGN_P521_SHA512', - ]; - - 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(SignatureAlgorithm::class, \Google\Cloud\BinaryAuthorization\V1\PkixPublicKey_SignatureAlgorithm::class); - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy.php deleted file mode 100644 index c7d740cd0928..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy.php +++ /dev/null @@ -1,469 +0,0 @@ -google.cloud.binaryauthorization.v1.Policy - */ -class Policy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name, in the format `projects/*/policy`. There is - * at most one policy per project. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. A descriptive comment. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Controls the evaluation of a Google-maintained global admission - * policy for common system-level images. Images not covered by the global - * policy will be subject to the project admission policy. This setting - * has no effect when specified inside a global admission policy. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $global_policy_evaluation_mode = 0; - /** - * Optional. Admission policy allowlisting. A matching admission request will - * always be permitted. This feature is typically used to exclude Google or - * third-party infrastructure images from Binary Authorization policies. - * - * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admission_whitelist_patterns; - /** - * Optional. Per-cluster admission rules. Cluster spec format: - * `location.clusterId`. There can be at most one admission rule per cluster - * spec. - * A `location` is either a compute zone (e.g. us-central1-a) or a region - * (e.g. us-central1). - * For `clusterId` syntax restrictions see - * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - * - * Generated from protobuf field map cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $cluster_admission_rules; - /** - * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: - * [a-z.-]+, e.g. 'some-namespace' - * - * Generated from protobuf field map kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $kubernetes_namespace_admission_rules; - /** - * Optional. Per-kubernetes-service-account admission rules. Service account - * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' - * - * Generated from protobuf field map kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $kubernetes_service_account_admission_rules; - /** - * Optional. Per-istio-service-identity admission rules. Istio service - * identity spec format: - * spiffe:///ns//sa/ or - * /ns//sa/ - * e.g. spiffe://example.com/ns/test-ns/sa/default - * - * Generated from protobuf field map istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $istio_service_identity_admission_rules; - /** - * Required. Default admission rule for a cluster without a per-cluster, per- - * kubernetes-service-account, or per-istio-service-identity admission rule. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $default_admission_rule = null; - /** - * Output only. Time when the policy was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name, in the format `projects/*/policy`. There is - * at most one policy per project. - * @type string $description - * Optional. A descriptive comment. - * @type int $global_policy_evaluation_mode - * Optional. Controls the evaluation of a Google-maintained global admission - * policy for common system-level images. Images not covered by the global - * policy will be subject to the project admission policy. This setting - * has no effect when specified inside a global admission policy. - * @type array<\Google\Cloud\BinaryAuthorization\V1\AdmissionWhitelistPattern>|\Google\Protobuf\Internal\RepeatedField $admission_whitelist_patterns - * Optional. Admission policy allowlisting. A matching admission request will - * always be permitted. This feature is typically used to exclude Google or - * third-party infrastructure images from Binary Authorization policies. - * @type array|\Google\Protobuf\Internal\MapField $cluster_admission_rules - * Optional. Per-cluster admission rules. Cluster spec format: - * `location.clusterId`. There can be at most one admission rule per cluster - * spec. - * A `location` is either a compute zone (e.g. us-central1-a) or a region - * (e.g. us-central1). - * For `clusterId` syntax restrictions see - * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - * @type array|\Google\Protobuf\Internal\MapField $kubernetes_namespace_admission_rules - * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: - * [a-z.-]+, e.g. 'some-namespace' - * @type array|\Google\Protobuf\Internal\MapField $kubernetes_service_account_admission_rules - * Optional. Per-kubernetes-service-account admission rules. Service account - * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' - * @type array|\Google\Protobuf\Internal\MapField $istio_service_identity_admission_rules - * Optional. Per-istio-service-identity admission rules. Istio service - * identity spec format: - * spiffe:///ns//sa/ or - * /ns//sa/ - * e.g. spiffe://example.com/ns/test-ns/sa/default - * @type \Google\Cloud\BinaryAuthorization\V1\AdmissionRule $default_admission_rule - * Required. Default admission rule for a cluster without a per-cluster, per- - * kubernetes-service-account, or per-istio-service-identity admission rule. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time when the policy was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name, in the format `projects/*/policy`. There is - * at most one policy per project. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name, in the format `projects/*/policy`. There is - * at most one policy per project. - * - * 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; - } - - /** - * Optional. A descriptive comment. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A descriptive comment. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Controls the evaluation of a Google-maintained global admission - * policy for common system-level images. Images not covered by the global - * policy will be subject to the project admission policy. This setting - * has no effect when specified inside a global admission policy. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getGlobalPolicyEvaluationMode() - { - return $this->global_policy_evaluation_mode; - } - - /** - * Optional. Controls the evaluation of a Google-maintained global admission - * policy for common system-level images. Images not covered by the global - * policy will be subject to the project admission policy. This setting - * has no effect when specified inside a global admission policy. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setGlobalPolicyEvaluationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\Policy\GlobalPolicyEvaluationMode::class); - $this->global_policy_evaluation_mode = $var; - - return $this; - } - - /** - * Optional. Admission policy allowlisting. A matching admission request will - * always be permitted. This feature is typically used to exclude Google or - * third-party infrastructure images from Binary Authorization policies. - * - * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdmissionWhitelistPatterns() - { - return $this->admission_whitelist_patterns; - } - - /** - * Optional. Admission policy allowlisting. A matching admission request will - * always be permitted. This feature is typically used to exclude Google or - * third-party infrastructure images from Binary Authorization policies. - * - * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\BinaryAuthorization\V1\AdmissionWhitelistPattern>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdmissionWhitelistPatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionWhitelistPattern::class); - $this->admission_whitelist_patterns = $arr; - - return $this; - } - - /** - * Optional. Per-cluster admission rules. Cluster spec format: - * `location.clusterId`. There can be at most one admission rule per cluster - * spec. - * A `location` is either a compute zone (e.g. us-central1-a) or a region - * (e.g. us-central1). - * For `clusterId` syntax restrictions see - * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - * - * Generated from protobuf field map cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getClusterAdmissionRules() - { - return $this->cluster_admission_rules; - } - - /** - * Optional. Per-cluster admission rules. Cluster spec format: - * `location.clusterId`. There can be at most one admission rule per cluster - * spec. - * A `location` is either a compute zone (e.g. us-central1-a) or a region - * (e.g. us-central1). - * For `clusterId` syntax restrictions see - * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - * - * Generated from protobuf field map cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setClusterAdmissionRules($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); - $this->cluster_admission_rules = $arr; - - return $this; - } - - /** - * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: - * [a-z.-]+, e.g. 'some-namespace' - * - * Generated from protobuf field map kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getKubernetesNamespaceAdmissionRules() - { - return $this->kubernetes_namespace_admission_rules; - } - - /** - * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: - * [a-z.-]+, e.g. 'some-namespace' - * - * Generated from protobuf field map kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setKubernetesNamespaceAdmissionRules($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); - $this->kubernetes_namespace_admission_rules = $arr; - - return $this; - } - - /** - * Optional. Per-kubernetes-service-account admission rules. Service account - * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' - * - * Generated from protobuf field map kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getKubernetesServiceAccountAdmissionRules() - { - return $this->kubernetes_service_account_admission_rules; - } - - /** - * Optional. Per-kubernetes-service-account admission rules. Service account - * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' - * - * Generated from protobuf field map kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setKubernetesServiceAccountAdmissionRules($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); - $this->kubernetes_service_account_admission_rules = $arr; - - return $this; - } - - /** - * Optional. Per-istio-service-identity admission rules. Istio service - * identity spec format: - * spiffe:///ns//sa/ or - * /ns//sa/ - * e.g. spiffe://example.com/ns/test-ns/sa/default - * - * Generated from protobuf field map istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getIstioServiceIdentityAdmissionRules() - { - return $this->istio_service_identity_admission_rules; - } - - /** - * Optional. Per-istio-service-identity admission rules. Istio service - * identity spec format: - * spiffe:///ns//sa/ or - * /ns//sa/ - * e.g. spiffe://example.com/ns/test-ns/sa/default - * - * Generated from protobuf field map istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setIstioServiceIdentityAdmissionRules($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); - $this->istio_service_identity_admission_rules = $arr; - - return $this; - } - - /** - * Required. Default admission rule for a cluster without a per-cluster, per- - * kubernetes-service-account, or per-istio-service-identity admission rule. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BinaryAuthorization\V1\AdmissionRule|null - */ - public function getDefaultAdmissionRule() - { - return $this->default_admission_rule; - } - - public function hasDefaultAdmissionRule() - { - return isset($this->default_admission_rule); - } - - public function clearDefaultAdmissionRule() - { - unset($this->default_admission_rule); - } - - /** - * Required. Default admission rule for a cluster without a per-cluster, per- - * kubernetes-service-account, or per-istio-service-identity admission rule. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BinaryAuthorization\V1\AdmissionRule $var - * @return $this - */ - public function setDefaultAdmissionRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\AdmissionRule::class); - $this->default_admission_rule = $var; - - return $this; - } - - /** - * Output only. Time when the policy 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. Time when the policy 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; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy/GlobalPolicyEvaluationMode.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy/GlobalPolicyEvaluationMode.php deleted file mode 100644 index 5239abed7073..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/Policy/GlobalPolicyEvaluationMode.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode - */ -class GlobalPolicyEvaluationMode -{ - /** - * Not specified: DISABLE is assumed. - * - * Generated from protobuf enum GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; - */ - const GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; - /** - * Enables system policy evaluation. - * - * Generated from protobuf enum ENABLE = 1; - */ - const ENABLE = 1; - /** - * Disables system policy evaluation. - * - * Generated from protobuf enum DISABLE = 2; - */ - const DISABLE = 2; - - private static $valueToName = [ - self::GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED => 'GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED', - self::ENABLE => 'ENABLE', - self::DISABLE => 'DISABLE', - ]; - - 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(GlobalPolicyEvaluationMode::class, \Google\Cloud\BinaryAuthorization\V1\Policy_GlobalPolicyEvaluationMode::class); - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdateAttestorRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdateAttestorRequest.php deleted file mode 100644 index 370dfb0587a8..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdateAttestorRequest.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.binaryauthorization.v1.UpdateAttestorRequest - */ -class UpdateAttestorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name - * in the request URL, in the format `projects/*/attestors/*`. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attestor = null; - - /** - * @param \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name - * in the request URL, in the format `projects/*/attestors/*`. - * - * @return \Google\Cloud\BinaryAuthorization\V1\UpdateAttestorRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BinaryAuthorization\V1\Attestor $attestor): self - { - return (new self()) - ->setAttestor($attestor); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BinaryAuthorization\V1\Attestor $attestor - * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name - * in the request URL, in the format `projects/*/attestors/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name - * in the request URL, in the format `projects/*/attestors/*`. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BinaryAuthorization\V1\Attestor|null - */ - public function getAttestor() - { - return $this->attestor; - } - - public function hasAttestor() - { - return isset($this->attestor); - } - - public function clearAttestor() - { - unset($this->attestor); - } - - /** - * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name - * in the request URL, in the format `projects/*/attestors/*`. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BinaryAuthorization\V1\Attestor $var - * @return $this - */ - public function setAttestor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\Attestor::class); - $this->attestor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdatePolicyRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdatePolicyRequest.php deleted file mode 100644 index 839ecddda32e..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UpdatePolicyRequest.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.binaryauthorization.v1.UpdatePolicyRequest - */ -class UpdatePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will - * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in - * the request URL, in the format `projects/*/policy`. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = null; - - /** - * @param \Google\Cloud\BinaryAuthorization\V1\Policy $policy Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will - * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in - * the request URL, in the format `projects/*/policy`. - * - * @return \Google\Cloud\BinaryAuthorization\V1\UpdatePolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\BinaryAuthorization\V1\Policy $policy): self - { - return (new self()) - ->setPolicy($policy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BinaryAuthorization\V1\Policy $policy - * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will - * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in - * the request URL, in the format `projects/*/policy`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will - * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in - * the request URL, in the format `projects/*/policy`. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BinaryAuthorization\V1\Policy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will - * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in - * the request URL, in the format `projects/*/policy`. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BinaryAuthorization\V1\Policy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1\Policy::class); - $this->policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UserOwnedGrafeasNote.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UserOwnedGrafeasNote.php deleted file mode 100644 index 13b690e61359..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/UserOwnedGrafeasNote.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote - */ -class UserOwnedGrafeasNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Grafeas resource name of a Attestation.Authority Note, - * created by the user, in the format: `projects/*/notes/*`. This field may - * not be updated. - * An attestation by this attestor is stored as a Grafeas - * Attestation.Authority Occurrence that names a container image and that - * links to this Note. Grafeas is an external dependency. - * - * Generated from protobuf field string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $note_reference = ''; - /** - * Optional. Public keys that verify attestations signed by this - * attestor. This field may be updated. - * If this field is non-empty, one of the specified public keys must - * verify that an attestation was signed by this attestor for the - * image specified in the admission request. - * If this field is empty, this attestor always returns that no - * valid attestations exist. - * - * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $public_keys; - /** - * Output only. This field will contain the service account email address - * that this Attestor will use as the principal when querying Container - * Analysis. Attestor administrators must grant this service account the - * IAM role needed to read attestations from the [note_reference][Note] in - * Container Analysis (`containeranalysis.notes.occurrences.viewer`). - * This email address is fixed for the lifetime of the Attestor, but callers - * should not make any other assumptions about the service account email; - * future versions may use an email based on a different naming pattern. - * - * Generated from protobuf field string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delegation_service_account_email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $note_reference - * Required. The Grafeas resource name of a Attestation.Authority Note, - * created by the user, in the format: `projects/*/notes/*`. This field may - * not be updated. - * An attestation by this attestor is stored as a Grafeas - * Attestation.Authority Occurrence that names a container image and that - * links to this Note. Grafeas is an external dependency. - * @type array<\Google\Cloud\BinaryAuthorization\V1\AttestorPublicKey>|\Google\Protobuf\Internal\RepeatedField $public_keys - * Optional. Public keys that verify attestations signed by this - * attestor. This field may be updated. - * If this field is non-empty, one of the specified public keys must - * verify that an attestation was signed by this attestor for the - * image specified in the admission request. - * If this field is empty, this attestor always returns that no - * valid attestations exist. - * @type string $delegation_service_account_email - * Output only. This field will contain the service account email address - * that this Attestor will use as the principal when querying Container - * Analysis. Attestor administrators must grant this service account the - * IAM role needed to read attestations from the [note_reference][Note] in - * Container Analysis (`containeranalysis.notes.occurrences.viewer`). - * This email address is fixed for the lifetime of the Attestor, but callers - * should not make any other assumptions about the service account email; - * future versions may use an email based on a different naming pattern. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Grafeas resource name of a Attestation.Authority Note, - * created by the user, in the format: `projects/*/notes/*`. This field may - * not be updated. - * An attestation by this attestor is stored as a Grafeas - * Attestation.Authority Occurrence that names a container image and that - * links to this Note. Grafeas is an external dependency. - * - * Generated from protobuf field string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNoteReference() - { - return $this->note_reference; - } - - /** - * Required. The Grafeas resource name of a Attestation.Authority Note, - * created by the user, in the format: `projects/*/notes/*`. This field may - * not be updated. - * An attestation by this attestor is stored as a Grafeas - * Attestation.Authority Occurrence that names a container image and that - * links to this Note. Grafeas is an external dependency. - * - * Generated from protobuf field string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNoteReference($var) - { - GPBUtil::checkString($var, True); - $this->note_reference = $var; - - return $this; - } - - /** - * Optional. Public keys that verify attestations signed by this - * attestor. This field may be updated. - * If this field is non-empty, one of the specified public keys must - * verify that an attestation was signed by this attestor for the - * image specified in the admission request. - * If this field is empty, this attestor always returns that no - * valid attestations exist. - * - * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPublicKeys() - { - return $this->public_keys; - } - - /** - * Optional. Public keys that verify attestations signed by this - * attestor. This field may be updated. - * If this field is non-empty, one of the specified public keys must - * verify that an attestation was signed by this attestor for the - * image specified in the admission request. - * If this field is empty, this attestor always returns that no - * valid attestations exist. - * - * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\BinaryAuthorization\V1\AttestorPublicKey>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPublicKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1\AttestorPublicKey::class); - $this->public_keys = $arr; - - return $this; - } - - /** - * Output only. This field will contain the service account email address - * that this Attestor will use as the principal when querying Container - * Analysis. Attestor administrators must grant this service account the - * IAM role needed to read attestations from the [note_reference][Note] in - * Container Analysis (`containeranalysis.notes.occurrences.viewer`). - * This email address is fixed for the lifetime of the Attestor, but callers - * should not make any other assumptions about the service account email; - * future versions may use an email based on a different naming pattern. - * - * Generated from protobuf field string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDelegationServiceAccountEmail() - { - return $this->delegation_service_account_email; - } - - /** - * Output only. This field will contain the service account email address - * that this Attestor will use as the principal when querying Container - * Analysis. Attestor administrators must grant this service account the - * IAM role needed to read attestations from the [note_reference][Note] in - * Container Analysis (`containeranalysis.notes.occurrences.viewer`). - * This email address is fixed for the lifetime of the Attestor, but callers - * should not make any other assumptions about the service account email; - * future versions may use an email based on a different naming pattern. - * - * Generated from protobuf field string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDelegationServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->delegation_service_account_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceRequest.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceRequest.php deleted file mode 100644 index 5f9e80630122..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest - */ -class ValidateAttestationOccurrenceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the - * [occurrence][grafeas.v1.Occurrence], in the format - * `projects/*/attestors/*`. - * - * Generated from protobuf field string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attestor = ''; - /** - * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to - * be checked that it can be verified by the Attestor. It does not have to be - * an existing entity in Container Analysis. It must otherwise be a valid - * AttestationOccurrence. - * - * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attestation = null; - /** - * Required. The resource name of the [Note][grafeas.v1.Note] to which the - * containing [Occurrence][grafeas.v1.Occurrence] is associated. - * - * Generated from protobuf field string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $occurrence_note = ''; - /** - * Required. The URI of the artifact (e.g. container image) that is the - * subject of the containing [Occurrence][grafeas.v1.Occurrence]. - * - * Generated from protobuf field string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $occurrence_resource_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $attestor - * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the - * [occurrence][grafeas.v1.Occurrence], in the format - * `projects/*/attestors/*`. - * @type \Grafeas\V1\AttestationOccurrence $attestation - * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to - * be checked that it can be verified by the Attestor. It does not have to be - * an existing entity in Container Analysis. It must otherwise be a valid - * AttestationOccurrence. - * @type string $occurrence_note - * Required. The resource name of the [Note][grafeas.v1.Note] to which the - * containing [Occurrence][grafeas.v1.Occurrence] is associated. - * @type string $occurrence_resource_uri - * Required. The URI of the artifact (e.g. container image) that is the - * subject of the containing [Occurrence][grafeas.v1.Occurrence]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the - * [occurrence][grafeas.v1.Occurrence], in the format - * `projects/*/attestors/*`. - * - * Generated from protobuf field string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAttestor() - { - return $this->attestor; - } - - /** - * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the - * [occurrence][grafeas.v1.Occurrence], in the format - * `projects/*/attestors/*`. - * - * Generated from protobuf field string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAttestor($var) - { - GPBUtil::checkString($var, True); - $this->attestor = $var; - - return $this; - } - - /** - * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to - * be checked that it can be verified by the Attestor. It does not have to be - * an existing entity in Container Analysis. It must otherwise be a valid - * AttestationOccurrence. - * - * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Grafeas\V1\AttestationOccurrence|null - */ - public function getAttestation() - { - return $this->attestation; - } - - public function hasAttestation() - { - return isset($this->attestation); - } - - public function clearAttestation() - { - unset($this->attestation); - } - - /** - * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to - * be checked that it can be verified by the Attestor. It does not have to be - * an existing entity in Container Analysis. It must otherwise be a valid - * AttestationOccurrence. - * - * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Grafeas\V1\AttestationOccurrence $var - * @return $this - */ - public function setAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AttestationOccurrence::class); - $this->attestation = $var; - - return $this; - } - - /** - * Required. The resource name of the [Note][grafeas.v1.Note] to which the - * containing [Occurrence][grafeas.v1.Occurrence] is associated. - * - * Generated from protobuf field string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOccurrenceNote() - { - return $this->occurrence_note; - } - - /** - * Required. The resource name of the [Note][grafeas.v1.Note] to which the - * containing [Occurrence][grafeas.v1.Occurrence] is associated. - * - * Generated from protobuf field string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOccurrenceNote($var) - { - GPBUtil::checkString($var, True); - $this->occurrence_note = $var; - - return $this; - } - - /** - * Required. The URI of the artifact (e.g. container image) that is the - * subject of the containing [Occurrence][grafeas.v1.Occurrence]. - * - * Generated from protobuf field string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOccurrenceResourceUri() - { - return $this->occurrence_resource_uri; - } - - /** - * Required. The URI of the artifact (e.g. container image) that is the - * subject of the containing [Occurrence][grafeas.v1.Occurrence]. - * - * Generated from protobuf field string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOccurrenceResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->occurrence_resource_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse.php deleted file mode 100644 index e2ab9e3c1582..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse - */ -class ValidateAttestationOccurrenceResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of the Attestation validation. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - */ - protected $result = 0; - /** - * The reason for denial if the Attestation couldn't be validated. - * - * Generated from protobuf field string denial_reason = 2; - */ - protected $denial_reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $result - * The result of the Attestation validation. - * @type string $denial_reason - * The reason for denial if the Attestation couldn't be validated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The result of the Attestation validation. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * The result of the Attestation validation. - * - * Generated from protobuf field .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * @param int $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1\ValidateAttestationOccurrenceResponse\Result::class); - $this->result = $var; - - return $this; - } - - /** - * The reason for denial if the Attestation couldn't be validated. - * - * Generated from protobuf field string denial_reason = 2; - * @return string - */ - public function getDenialReason() - { - return $this->denial_reason; - } - - /** - * The reason for denial if the Attestation couldn't be validated. - * - * Generated from protobuf field string denial_reason = 2; - * @param string $var - * @return $this - */ - public function setDenialReason($var) - { - GPBUtil::checkString($var, True); - $this->denial_reason = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse/Result.php b/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse/Result.php deleted file mode 100644 index d8e6ba122e86..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/proto/src/Google/Cloud/BinaryAuthorization/V1/ValidateAttestationOccurrenceResponse/Result.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result - */ -class Result -{ - /** - * Unspecified. - * - * Generated from protobuf enum RESULT_UNSPECIFIED = 0; - */ - const RESULT_UNSPECIFIED = 0; - /** - * The Attestation was able to verified by the Attestor. - * - * Generated from protobuf enum VERIFIED = 1; - */ - const VERIFIED = 1; - /** - * The Attestation was not able to verified by the Attestor. - * - * Generated from protobuf enum ATTESTATION_NOT_VERIFIABLE = 2; - */ - const ATTESTATION_NOT_VERIFIABLE = 2; - - private static $valueToName = [ - self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', - self::VERIFIED => 'VERIFIED', - self::ATTESTATION_NOT_VERIFIABLE => 'ATTESTATION_NOT_VERIFIABLE', - ]; - - 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\BinaryAuthorization\V1\ValidateAttestationOccurrenceResponse_Result::class); - diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/create_attestor.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/create_attestor.php deleted file mode 100644 index 66a7920a5f31..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/create_attestor.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($attestorName); - $request = (new CreateAttestorRequest()) - ->setParent($formattedParent) - ->setAttestorId($attestorId) - ->setAttestor($attestor); - - // Call the API and handle any network failures. - try { - /** @var Attestor $response */ - $response = $binauthzManagementServiceV1Client->createAttestor($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 = BinauthzManagementServiceV1Client::projectName('[PROJECT]'); - $attestorId = '[ATTESTOR_ID]'; - $attestorName = '[NAME]'; - - create_attestor_sample($formattedParent, $attestorId, $attestorName); -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php deleted file mode 100644 index eb7275ea89ed..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $binauthzManagementServiceV1Client->deleteAttestor($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 = BinauthzManagementServiceV1Client::attestorName('[PROJECT]', '[ATTESTOR]'); - - delete_attestor_sample($formattedName); -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_attestor.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_attestor.php deleted file mode 100644 index c3b798e2b3bb..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_attestor.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Attestor $response */ - $response = $binauthzManagementServiceV1Client->getAttestor($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 = BinauthzManagementServiceV1Client::attestorName('[PROJECT]', '[ATTESTOR]'); - - get_attestor_sample($formattedName); -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_policy.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_policy.php deleted file mode 100644 index 957eb0eca0e6..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/get_policy.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $binauthzManagementServiceV1Client->getPolicy($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 = BinauthzManagementServiceV1Client::policyName('[PROJECT]'); - - get_policy_sample($formattedName); -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/list_attestors.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/list_attestors.php deleted file mode 100644 index 41e9cf1fa30f..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/list_attestors.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $binauthzManagementServiceV1Client->listAttestors($request); - - /** @var Attestor $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 = BinauthzManagementServiceV1Client::projectName('[PROJECT]'); - - list_attestors_sample($formattedParent); -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_attestor.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_attestor.php deleted file mode 100644 index 1bda6e56fabb..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_attestor.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($attestorName); - $request = (new UpdateAttestorRequest()) - ->setAttestor($attestor); - - // Call the API and handle any network failures. - try { - /** @var Attestor $response */ - $response = $binauthzManagementServiceV1Client->updateAttestor($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 -{ - $attestorName = '[NAME]'; - - update_attestor_sample($attestorName); -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_policy.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_policy.php deleted file mode 100644 index 75059607354c..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/BinauthzManagementServiceV1Client/update_policy.php +++ /dev/null @@ -1,89 +0,0 @@ -setEvaluationMode($policyDefaultAdmissionRuleEvaluationMode) - ->setEnforcementMode($policyDefaultAdmissionRuleEnforcementMode); - $policy = (new Policy()) - ->setDefaultAdmissionRule($policyDefaultAdmissionRule); - $request = (new UpdatePolicyRequest()) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $binauthzManagementServiceV1Client->updatePolicy($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 -{ - $policyDefaultAdmissionRuleEvaluationMode = EvaluationMode::EVALUATION_MODE_UNSPECIFIED; - $policyDefaultAdmissionRuleEnforcementMode = EnforcementMode::ENFORCEMENT_MODE_UNSPECIFIED; - - update_policy_sample( - $policyDefaultAdmissionRuleEvaluationMode, - $policyDefaultAdmissionRuleEnforcementMode - ); -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/SystemPolicyV1Client/get_system_policy.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/SystemPolicyV1Client/get_system_policy.php deleted file mode 100644 index 8a4ac91afbe2..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/SystemPolicyV1Client/get_system_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $systemPolicyV1Client->getSystemPolicy($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 = SystemPolicyV1Client::policyName('[PROJECT]'); - - get_system_policy_sample($formattedName); -} -// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php b/owl-bot-staging/BinaryAuthorization/v1/samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php deleted file mode 100644 index c74c501c35ae..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php +++ /dev/null @@ -1,87 +0,0 @@ -setAttestor($attestor) - ->setAttestation($attestation) - ->setOccurrenceNote($occurrenceNote) - ->setOccurrenceResourceUri($occurrenceResourceUri); - - // Call the API and handle any network failures. - try { - /** @var ValidateAttestationOccurrenceResponse $response */ - $response = $validationHelperV1Client->validateAttestationOccurrence($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 -{ - $attestor = '[ATTESTOR]'; - $occurrenceNote = '[OCCURRENCE_NOTE]'; - $occurrenceResourceUri = '[OCCURRENCE_RESOURCE_URI]'; - - validate_attestation_occurrence_sample($attestor, $occurrenceNote, $occurrenceResourceUri); -} -// [END binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_sync] diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/BinauthzManagementServiceV1Client.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/BinauthzManagementServiceV1Client.php deleted file mode 100644 index 117607386d7a..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/BinauthzManagementServiceV1Client.php +++ /dev/null @@ -1,499 +0,0 @@ - createAttestorAsync(CreateAttestorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAttestorAsync(DeleteAttestorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAttestorAsync(GetAttestorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPolicyAsync(GetPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAttestorsAsync(ListAttestorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAttestorAsync(UpdateAttestorRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePolicyAsync(UpdatePolicyRequest $request, array $optionalArgs = []) - */ -final class BinauthzManagementServiceV1Client -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'binaryauthorization.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'binaryauthorization.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/binauthz_management_service_v1_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/binauthz_management_service_v1_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/binauthz_management_service_v1_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/binauthz_management_service_v1_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a attestor - * resource. - * - * @param string $project - * @param string $attestor - * - * @return string The formatted attestor resource. - */ - public static function attestorName(string $project, string $attestor): string - { - return self::getPathTemplate('attestor')->render([ - 'project' => $project, - 'attestor' => $attestor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * location_policy resource. - * - * @param string $location - * - * @return string The formatted location_policy resource. - */ - public static function locationPolicyName(string $location): string - { - return self::getPathTemplate('locationPolicy')->render([ - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a policy - * resource. - * - * @param string $project - * - * @return string The formatted policy resource. - */ - public static function policyName(string $project): string - { - return self::getPathTemplate('policy')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_policy resource. - * - * @param string $project - * - * @return string The formatted project_policy resource. - */ - public static function projectPolicyName(string $project): string - { - return self::getPathTemplate('projectPolicy')->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - attestor: projects/{project}/attestors/{attestor} - * - locationPolicy: locations/{location}/policy - * - policy: projects/{project}/policy - * - project: projects/{project} - * - projectPolicy: projects/{project}/policy - * - * 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 'binaryauthorization.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new - * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, - * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. - * - * The async variant is - * {@see BinauthzManagementServiceV1Client::createAttestorAsync()} . - * - * @example samples/V1/BinauthzManagementServiceV1Client/create_attestor.php - * - * @param CreateAttestorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Attestor - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAttestor(CreateAttestorRequest $request, array $callOptions = []): Attestor - { - return $this->startApiCall('CreateAttestor', $request, $callOptions)->wait(); - } - - /** - * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - * The async variant is - * {@see BinauthzManagementServiceV1Client::deleteAttestorAsync()} . - * - * @example samples/V1/BinauthzManagementServiceV1Client/delete_attestor.php - * - * @param DeleteAttestorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteAttestor(DeleteAttestorRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAttestor', $request, $callOptions)->wait(); - } - - /** - * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. - * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - * The async variant is - * {@see BinauthzManagementServiceV1Client::getAttestorAsync()} . - * - * @example samples/V1/BinauthzManagementServiceV1Client/get_attestor.php - * - * @param GetAttestorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Attestor - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAttestor(GetAttestorRequest $request, array $callOptions = []): Attestor - { - return $this->startApiCall('GetAttestor', $request, $callOptions)->wait(); - } - - /** - * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to - * a container image, before the project is allowed to deploy that - * image. There is at most one policy per project. All image admission - * requests are permitted if a project has no policy. - * - * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default - * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. - * - * The async variant is {@see BinauthzManagementServiceV1Client::getPolicyAsync()} - * . - * - * @example samples/V1/BinauthzManagementServiceV1Client/get_policy.php - * - * @param GetPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 getPolicy(GetPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetPolicy', $request, $callOptions)->wait(); - } - - /** - * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. - * Returns INVALID_ARGUMENT if the project does not exist. - * - * The async variant is - * {@see BinauthzManagementServiceV1Client::listAttestorsAsync()} . - * - * @example samples/V1/BinauthzManagementServiceV1Client/list_attestors.php - * - * @param ListAttestorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAttestors(ListAttestorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAttestors', $request, $callOptions); - } - - /** - * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. - * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - * The async variant is - * {@see BinauthzManagementServiceV1Client::updateAttestorAsync()} . - * - * @example samples/V1/BinauthzManagementServiceV1Client/update_attestor.php - * - * @param UpdateAttestorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Attestor - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAttestor(UpdateAttestorRequest $request, array $callOptions = []): Attestor - { - return $this->startApiCall('UpdateAttestor', $request, $callOptions)->wait(); - } - - /** - * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the - * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race - * conditions with concurrent policy enforcement (or management!) - * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - * if the request is malformed. - * - * The async variant is - * {@see BinauthzManagementServiceV1Client::updatePolicyAsync()} . - * - * @example samples/V1/BinauthzManagementServiceV1Client/update_policy.php - * - * @param UpdatePolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updatePolicy(UpdatePolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('UpdatePolicy', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/SystemPolicyV1Client.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/SystemPolicyV1Client.php deleted file mode 100644 index 5453a006d220..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/SystemPolicyV1Client.php +++ /dev/null @@ -1,267 +0,0 @@ - getSystemPolicyAsync(GetSystemPolicyRequest $request, array $optionalArgs = []) - */ -final class SystemPolicyV1Client -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.binaryauthorization.v1.SystemPolicyV1'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'binaryauthorization.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'binaryauthorization.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/system_policy_v1_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/system_policy_v1_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/system_policy_v1_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/system_policy_v1_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * location_policy resource. - * - * @param string $location - * - * @return string The formatted location_policy resource. - */ - public static function locationPolicyName(string $location): string - { - return self::getPathTemplate('locationPolicy')->render([ - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a policy - * resource. - * - * @param string $project - * - * @return string The formatted policy resource. - */ - public static function policyName(string $project): string - { - return self::getPathTemplate('policy')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_policy resource. - * - * @param string $project - * - * @return string The formatted project_policy resource. - */ - public static function projectPolicyName(string $project): string - { - return self::getPathTemplate('projectPolicy')->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - locationPolicy: locations/{location}/policy - * - policy: projects/{project}/policy - * - projectPolicy: projects/{project}/policy - * - * 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 'binaryauthorization.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); - } - - /** - * Gets the current system policy in the specified location. - * - * The async variant is {@see SystemPolicyV1Client::getSystemPolicyAsync()} . - * - * @example samples/V1/SystemPolicyV1Client/get_system_policy.php - * - * @param GetSystemPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 getSystemPolicy(GetSystemPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetSystemPolicy', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/ValidationHelperV1Client.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/ValidationHelperV1Client.php deleted file mode 100644 index e6334785f64e..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/Client/ValidationHelperV1Client.php +++ /dev/null @@ -1,191 +0,0 @@ - validateAttestationOccurrenceAsync(ValidateAttestationOccurrenceRequest $request, array $optionalArgs = []) - */ -final class ValidationHelperV1Client -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.binaryauthorization.v1.ValidationHelperV1'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'binaryauthorization.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'binaryauthorization.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/validation_helper_v1_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/validation_helper_v1_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/validation_helper_v1_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/validation_helper_v1_rest_client_config.php', - ], - ], - ]; - } - - /** - * 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 'binaryauthorization.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); - } - - /** - * Returns whether the given Attestation for the given image URI - * was signed by the given Attestor - * - * The async variant is - * {@see ValidationHelperV1Client::validateAttestationOccurrenceAsync()} . - * - * @example samples/V1/ValidationHelperV1Client/validate_attestation_occurrence.php - * - * @param ValidateAttestationOccurrenceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ValidateAttestationOccurrenceResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function validateAttestationOccurrence(ValidateAttestationOccurrenceRequest $request, array $callOptions = []): ValidateAttestationOccurrenceResponse - { - return $this->startApiCall('ValidateAttestationOccurrence', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BinaryAuthorization/v1/src/V1/gapic_metadata.json deleted file mode 100644 index c9a7e431c389..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.binaryauthorization.v1", - "libraryPackage": "Google\\Cloud\\BinaryAuthorization\\V1", - "services": { - "BinauthzManagementServiceV1": { - "clients": { - "grpc": { - "libraryClient": "BinauthzManagementServiceV1GapicClient", - "rpcs": { - "CreateAttestor": { - "methods": [ - "createAttestor" - ] - }, - "DeleteAttestor": { - "methods": [ - "deleteAttestor" - ] - }, - "GetAttestor": { - "methods": [ - "getAttestor" - ] - }, - "GetPolicy": { - "methods": [ - "getPolicy" - ] - }, - "ListAttestors": { - "methods": [ - "listAttestors" - ] - }, - "UpdateAttestor": { - "methods": [ - "updateAttestor" - ] - }, - "UpdatePolicy": { - "methods": [ - "updatePolicy" - ] - } - } - } - } - }, - "SystemPolicyV1": { - "clients": { - "grpc": { - "libraryClient": "SystemPolicyV1GapicClient", - "rpcs": { - "GetSystemPolicy": { - "methods": [ - "getSystemPolicy" - ] - } - } - } - } - }, - "ValidationHelperV1": { - "clients": { - "grpc": { - "libraryClient": "ValidationHelperV1GapicClient", - "rpcs": { - "ValidateAttestationOccurrence": { - "methods": [ - "validateAttestationOccurrence" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_client_config.json b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_client_config.json deleted file mode 100644 index 3cfeb608e755..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_client_config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "interfaces": { - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateAttestor": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAttestor": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAttestor": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPolicy": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAttestors": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAttestor": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdatePolicy": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_descriptor_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_descriptor_config.php deleted file mode 100644 index bb1b92f5375b..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_descriptor_config.php +++ /dev/null @@ -1,129 +0,0 @@ - [ - 'google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1' => [ - 'CreateAttestor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Attestor', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAttestor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAttestor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Attestor', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAttestors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAttestors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\ListAttestorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAttestor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Attestor', - 'headerParams' => [ - [ - 'keyName' => 'attestor.name', - 'fieldAccessors' => [ - 'getAttestor', - 'getName', - ], - ], - ], - ], - 'UpdatePolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'policy.name', - 'fieldAccessors' => [ - 'getPolicy', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'attestor' => 'projects/{project}/attestors/{attestor}', - 'locationPolicy' => 'locations/{location}/policy', - 'policy' => 'projects/{project}/policy', - 'project' => 'projects/{project}', - 'projectPolicy' => 'projects/{project}/policy', - ], - ], - ], -]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_rest_client_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_rest_client_config.php deleted file mode 100644 index af98c0b1d9be..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/binauthz_management_service_v1_rest_client_config.php +++ /dev/null @@ -1,171 +0,0 @@ - [ - 'google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1' => [ - 'CreateAttestor' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/attestors', - 'body' => 'attestor', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'attestor_id', - ], - ], - 'DeleteAttestor' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/attestors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAttestor' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/attestors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/policy}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAttestors' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/attestors', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAttestor' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{attestor.name=projects/*/attestors/*}', - 'body' => 'attestor', - 'placeholders' => [ - 'attestor.name' => [ - 'getters' => [ - 'getAttestor', - 'getName', - ], - ], - ], - ], - 'UpdatePolicy' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{policy.name=projects/*/policy}', - 'body' => 'policy', - 'placeholders' => [ - 'policy.name' => [ - 'getters' => [ - 'getPolicy', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/policy}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/policy}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/policy}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_client_config.json b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_client_config.json deleted file mode 100644 index d4b5bd72fb30..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_client_config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "interfaces": { - "google.cloud.binaryauthorization.v1.SystemPolicyV1": { - "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": { - "GetSystemPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_descriptor_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_descriptor_config.php deleted file mode 100644 index 793669b40206..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_descriptor_config.php +++ /dev/null @@ -1,45 +0,0 @@ - [ - 'google.cloud.binaryauthorization.v1.SystemPolicyV1' => [ - 'GetSystemPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'locationPolicy' => 'locations/{location}/policy', - 'policy' => 'projects/{project}/policy', - 'projectPolicy' => 'projects/{project}/policy', - ], - ], - ], -]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_rest_client_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_rest_client_config.php deleted file mode 100644 index ed9921930ee4..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/system_policy_v1_rest_client_config.php +++ /dev/null @@ -1,97 +0,0 @@ - [ - 'google.cloud.binaryauthorization.v1.SystemPolicyV1' => [ - 'GetSystemPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=locations/*/policy}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/policy}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/policy}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/policy}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_client_config.json b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_client_config.json deleted file mode 100644 index 1cb08ec3c89a..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_client_config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "interfaces": { - "google.cloud.binaryauthorization.v1.ValidationHelperV1": { - "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": { - "ValidateAttestationOccurrence": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_descriptor_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_descriptor_config.php deleted file mode 100644 index 48f7cbf0f6f2..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_descriptor_config.php +++ /dev/null @@ -1,40 +0,0 @@ - [ - 'google.cloud.binaryauthorization.v1.ValidationHelperV1' => [ - 'ValidateAttestationOccurrence' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BinaryAuthorization\V1\ValidateAttestationOccurrenceResponse', - 'headerParams' => [ - [ - 'keyName' => 'attestor', - 'fieldAccessors' => [ - 'getAttestor', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_rest_client_config.php b/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_rest_client_config.php deleted file mode 100644 index 6505b99035b4..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/src/V1/resources/validation_helper_v1_rest_client_config.php +++ /dev/null @@ -1,98 +0,0 @@ - [ - 'google.cloud.binaryauthorization.v1.ValidationHelperV1' => [ - 'ValidateAttestationOccurrence' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence', - 'body' => '*', - 'placeholders' => [ - 'attestor' => [ - 'getters' => [ - 'getAttestor', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/policy}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/policy}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/policy}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/attestors/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/BinauthzManagementServiceV1ClientTest.php b/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/BinauthzManagementServiceV1ClientTest.php deleted file mode 100644 index c82b57c34aab..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/BinauthzManagementServiceV1ClientTest.php +++ /dev/null @@ -1,610 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BinauthzManagementServiceV1Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BinauthzManagementServiceV1Client($options); - } - - /** @test */ - public function createAttestorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Attestor(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $attestorId = 'attestorId-696764206'; - $attestor = new Attestor(); - $attestorName = 'attestorName-125367661'; - $attestor->setName($attestorName); - $request = (new CreateAttestorRequest()) - ->setParent($formattedParent) - ->setAttestorId($attestorId) - ->setAttestor($attestor); - $response = $gapicClient->createAttestor($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.binaryauthorization.v1.BinauthzManagementServiceV1/CreateAttestor', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAttestorId(); - $this->assertProtobufEquals($attestorId, $actualValue); - $actualValue = $actualRequestObject->getAttestor(); - $this->assertProtobufEquals($attestor, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAttestorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->projectName('[PROJECT]'); - $attestorId = 'attestorId-696764206'; - $attestor = new Attestor(); - $attestorName = 'attestorName-125367661'; - $attestor->setName($attestorName); - $request = (new CreateAttestorRequest()) - ->setParent($formattedParent) - ->setAttestorId($attestorId) - ->setAttestor($attestor); - try { - $gapicClient->createAttestor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAttestorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attestorName('[PROJECT]', '[ATTESTOR]'); - $request = (new DeleteAttestorRequest()) - ->setName($formattedName); - $gapicClient->deleteAttestor($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/DeleteAttestor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAttestorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->attestorName('[PROJECT]', '[ATTESTOR]'); - $request = (new DeleteAttestorRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAttestor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttestorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Attestor(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attestorName('[PROJECT]', '[ATTESTOR]'); - $request = (new GetAttestorRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttestor($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.binaryauthorization.v1.BinauthzManagementServiceV1/GetAttestor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttestorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->attestorName('[PROJECT]', '[ATTESTOR]'); - $request = (new GetAttestorRequest()) - ->setName($formattedName); - try { - $gapicClient->getAttestor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyName('[PROJECT]'); - $request = (new GetPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getPolicy($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.binaryauthorization.v1.BinauthzManagementServiceV1/GetPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->policyName('[PROJECT]'); - $request = (new GetPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttestorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attestorsElement = new Attestor(); - $attestors = [ - $attestorsElement, - ]; - $expectedResponse = new ListAttestorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttestors($attestors); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListAttestorsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAttestors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttestors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/ListAttestors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttestorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->projectName('[PROJECT]'); - $request = (new ListAttestorsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAttestors($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAttestorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Attestor(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $attestor = new Attestor(); - $attestorName = 'attestorName-125367661'; - $attestor->setName($attestorName); - $request = (new UpdateAttestorRequest()) - ->setAttestor($attestor); - $response = $gapicClient->updateAttestor($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.binaryauthorization.v1.BinauthzManagementServiceV1/UpdateAttestor', $actualFuncCall); - $actualValue = $actualRequestObject->getAttestor(); - $this->assertProtobufEquals($attestor, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAttestorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $attestor = new Attestor(); - $attestorName = 'attestorName-125367661'; - $attestor->setName($attestorName); - $request = (new UpdateAttestorRequest()) - ->setAttestor($attestor); - try { - $gapicClient->updateAttestor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $policy = new Policy(); - $policyDefaultAdmissionRule = new AdmissionRule(); - $defaultAdmissionRuleEvaluationMode = EvaluationMode::EVALUATION_MODE_UNSPECIFIED; - $policyDefaultAdmissionRule->setEvaluationMode($defaultAdmissionRuleEvaluationMode); - $defaultAdmissionRuleEnforcementMode = EnforcementMode::ENFORCEMENT_MODE_UNSPECIFIED; - $policyDefaultAdmissionRule->setEnforcementMode($defaultAdmissionRuleEnforcementMode); - $policy->setDefaultAdmissionRule($policyDefaultAdmissionRule); - $request = (new UpdatePolicyRequest()) - ->setPolicy($policy); - $response = $gapicClient->updatePolicy($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.binaryauthorization.v1.BinauthzManagementServiceV1/UpdatePolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $policy = new Policy(); - $policyDefaultAdmissionRule = new AdmissionRule(); - $defaultAdmissionRuleEvaluationMode = EvaluationMode::EVALUATION_MODE_UNSPECIFIED; - $policyDefaultAdmissionRule->setEvaluationMode($defaultAdmissionRuleEvaluationMode); - $defaultAdmissionRuleEnforcementMode = EnforcementMode::ENFORCEMENT_MODE_UNSPECIFIED; - $policyDefaultAdmissionRule->setEnforcementMode($defaultAdmissionRuleEnforcementMode); - $policy->setDefaultAdmissionRule($policyDefaultAdmissionRule); - $request = (new UpdatePolicyRequest()) - ->setPolicy($policy); - try { - $gapicClient->updatePolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAttestorAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Attestor(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $attestorId = 'attestorId-696764206'; - $attestor = new Attestor(); - $attestorName = 'attestorName-125367661'; - $attestor->setName($attestorName); - $request = (new CreateAttestorRequest()) - ->setParent($formattedParent) - ->setAttestorId($attestorId) - ->setAttestor($attestor); - $response = $gapicClient->createAttestorAsync($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.binaryauthorization.v1.BinauthzManagementServiceV1/CreateAttestor', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAttestorId(); - $this->assertProtobufEquals($attestorId, $actualValue); - $actualValue = $actualRequestObject->getAttestor(); - $this->assertProtobufEquals($attestor, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/SystemPolicyV1ClientTest.php b/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/SystemPolicyV1ClientTest.php deleted file mode 100644 index 4dd82a5b98be..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/SystemPolicyV1ClientTest.php +++ /dev/null @@ -1,159 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SystemPolicyV1Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SystemPolicyV1Client($options); - } - - /** @test */ - public function getSystemPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyName('[PROJECT]'); - $request = (new GetSystemPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getSystemPolicy($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.binaryauthorization.v1.SystemPolicyV1/GetSystemPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSystemPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->policyName('[PROJECT]'); - $request = (new GetSystemPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getSystemPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSystemPolicyAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyName('[PROJECT]'); - $request = (new GetSystemPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getSystemPolicyAsync($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.binaryauthorization.v1.SystemPolicyV1/GetSystemPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/ValidationHelperV1ClientTest.php b/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/ValidationHelperV1ClientTest.php deleted file mode 100644 index 4bd275a240a1..000000000000 --- a/owl-bot-staging/BinaryAuthorization/v1/tests/Unit/V1/Client/ValidationHelperV1ClientTest.php +++ /dev/null @@ -1,186 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ValidationHelperV1Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ValidationHelperV1Client($options); - } - - /** @test */ - public function validateAttestationOccurrenceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $denialReason = 'denialReason-884241828'; - $expectedResponse = new ValidateAttestationOccurrenceResponse(); - $expectedResponse->setDenialReason($denialReason); - $transport->addResponse($expectedResponse); - // Mock request - $attestor = 'attestor542920680'; - $attestation = new AttestationOccurrence(); - $occurrenceNote = 'occurrenceNote1860303264'; - $occurrenceResourceUri = 'occurrenceResourceUri334806377'; - $request = (new ValidateAttestationOccurrenceRequest()) - ->setAttestor($attestor) - ->setAttestation($attestation) - ->setOccurrenceNote($occurrenceNote) - ->setOccurrenceResourceUri($occurrenceResourceUri); - $response = $gapicClient->validateAttestationOccurrence($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.binaryauthorization.v1.ValidationHelperV1/ValidateAttestationOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getAttestor(); - $this->assertProtobufEquals($attestor, $actualValue); - $actualValue = $actualRequestObject->getAttestation(); - $this->assertProtobufEquals($attestation, $actualValue); - $actualValue = $actualRequestObject->getOccurrenceNote(); - $this->assertProtobufEquals($occurrenceNote, $actualValue); - $actualValue = $actualRequestObject->getOccurrenceResourceUri(); - $this->assertProtobufEquals($occurrenceResourceUri, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function validateAttestationOccurrenceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $attestor = 'attestor542920680'; - $attestation = new AttestationOccurrence(); - $occurrenceNote = 'occurrenceNote1860303264'; - $occurrenceResourceUri = 'occurrenceResourceUri334806377'; - $request = (new ValidateAttestationOccurrenceRequest()) - ->setAttestor($attestor) - ->setAttestation($attestation) - ->setOccurrenceNote($occurrenceNote) - ->setOccurrenceResourceUri($occurrenceResourceUri); - try { - $gapicClient->validateAttestationOccurrence($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function validateAttestationOccurrenceAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $denialReason = 'denialReason-884241828'; - $expectedResponse = new ValidateAttestationOccurrenceResponse(); - $expectedResponse->setDenialReason($denialReason); - $transport->addResponse($expectedResponse); - // Mock request - $attestor = 'attestor542920680'; - $attestation = new AttestationOccurrence(); - $occurrenceNote = 'occurrenceNote1860303264'; - $occurrenceResourceUri = 'occurrenceResourceUri334806377'; - $request = (new ValidateAttestationOccurrenceRequest()) - ->setAttestor($attestor) - ->setAttestation($attestation) - ->setOccurrenceNote($occurrenceNote) - ->setOccurrenceResourceUri($occurrenceResourceUri); - $response = $gapicClient->validateAttestationOccurrenceAsync($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.binaryauthorization.v1.ValidationHelperV1/ValidateAttestationOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getAttestor(); - $this->assertProtobufEquals($attestor, $actualValue); - $actualValue = $actualRequestObject->getAttestation(); - $this->assertProtobufEquals($attestation, $actualValue); - $actualValue = $actualRequestObject->getOccurrenceNote(); - $this->assertProtobufEquals($occurrenceNote, $actualValue); - $actualValue = $actualRequestObject->getOccurrenceResourceUri(); - $this->assertProtobufEquals($occurrenceResourceUri, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateIssuanceConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateIssuanceConfig.php deleted file mode 100644 index 942ab73cecdc2410125a87d04df07f9d38318b32..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3473 zcmcInOLN;)6t0~|UpR&mli25L8&+mNa+~ZF_w|8xrkn7Z>4&k&d zw+>~#OJ&=!xTRZ$-10gd>d3maZ!?2BMOm(G$d5O+<>gvqdmL3=%X4(9$X(0o8nmPv zme(%n)ZwhdbTqk7Owy%J>0mDTR%5Q~5mTp{ZkZj{EeeMKCfTR1O>`>Po0WCSNtf2VUXKbrGbBh4FL0nf(oHjxiRp9}SK*o>lwG5`qE+-tnCYh@-lW|52_8hZc zk~_q3DOx)#+wn}DGs~2Hg$)dSW>yYt`m&R@g=j6wQLIfLKm<>1n4CH$G1MA$b%)v9 za+)ZrC|$~9*!?#%v!Pqx9P7w4L5zxWCdeh3J04AXmt}`?&oLK8+`fTc{G^_PWZ7ow z3Zq85LU+jlvm8Y^&g$4mKh;edR{hdiF&s4yd4?!n-eIh|&5#?M?Azz-iVEEOjD>iY z+wBH|Y-^A}2kBVVgMAFO? zVPU6YQQTtS48wGb*z%>d@IZPKGB&oc=3<-V(x^QoNdV#%xAv%+8}Kbkw_v!#3?zJR zQ2ZW+5zA>)M{6DChWs~$UsEvkx@cV+L!pum?CW!0bk3r@t&iBmfuO2 z(0T&H25C{l#a8qCpb@#bU=H=~gW{U7wQO?d(5HSoysU621dS{Gm^#^x#N)e`!}wu% zgXe}t++SZUj0Do<$U$&_2b{YPBL?eG0q=F;a4d2d!y8>OfrdH_dAy6oeAAvXvu!=q zY>F$3$#J0NM$pJmAlZSNd-PBvM%T}4cR!cGvs?3DL=OHPu&ea299a~8^1q}Z-#<_3 zWeO&feRT}9OPvE2uS{aPWapn>Exi7LB*_xjVk-zCD9NL1`EOzTJPRkpqy@OH6U|?c z!ilI(i;*}EcWj3pAoFz+W)a^!RpReNm0=j%!a&SQt&= zB?imY8vbt1fBeblpzzvEZ zZoNzw>SC2IR{d2z$*}d{Z$fcr?)OMY4Hy38#vh8QxbnYB-wli@im--X$NvmMIYmLa wvZ}t8Xwt(=7f2A(uSP)WUTYXtx%JU>ykLG9?B|JfzV9k8B!h*!2R(p)05poFSO5S3 diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateManager.php b/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/CertificateManager.php deleted file mode 100644 index e9f8484101f757beb7032795d843c089c510680e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18077 zcmd5^U2Ggz6=v759bdbSbMv=xnr5?UsbeL(&9+wBP26<6UfbK)v1PBV{w%DokchL8)4VfU59-Dg;zW6{x)M0FS&w5Tdjaf(j51MMag65E2r~3!M8iyLWze zJu}`S`ch}+o^#Ldch5cd?p(d5ZE5ISd{(I`x@;8aa^=f>*v9Y1( z@p64zQ>%)ejK`-J<2M!y@!WL2a2807dP6TOnfPYCzFAdLz`#(GsP#|=|9;eQXSMoF!yrYcv}JD~1ld_%4p3b1jH-DuRxrdqGX z3Bh8mtc;zHGoEDZ!&)88Ga0vpTp|_&YZdb~Q_*X3wK%O9WnIx$XXYgee;gu!m}ucC(uB~2|#wOXB6pZX68 zIWcJn3Ee;cBLkFbo>9AR3nX9E)7ji3|r zDx^RQosDJXr3S9vWR{Mv~lH|ppD0jEbYS17&7w|bjp=^f|%WM?$079 z?hfu;&D2$;nT2zXg)MX}b#I;faRi<1AU99V=g^FICaUqZ?{e@ACAPU8FiorI zv@1<1A1ha{+j4c1=IUiMAqej)S1HfLKftG632U3Ndp>;x#RNHN5-Y?;j#PdT9rGN< z6FRIXSXPrT_R4CT%55cJ3BE50LS}g##l5oJCU#e2;|CG+AjzBQnjtmJt-7w>VWp`R ziTgnFt`)K0kD$|Sgyf06gm9&1lw_L+nrk2aI*X20oJMpcZ2=v24dDqJ%FHZV0lZJMY;C8N=e#UU z!_ONsM^$v1kQ16_Yx401u%9JBq%}x0uJ#FzM4Zj1u%f4A`TxjV68w9oN~uSE-cBq|H>V zQY4A>!HfsVUJ$mqCE#Sh&NtRiHi(IT9!7)N*3Ows)!G3Pk_zu35|V?2g!oKUeou8s zg!KrXrY0l1=Z;2TRM$~oRbE%B2Ix+9##j6xiJ(t%o>Eiv#-B$+hEm;t^^i1#E7WX* z>6xG`SAfR?V39_E{sKJ}CiD%|{5FOH#?UDdv zu>s#D-w}aC#!B4l9J12+%uPK*zm}g*^l(SV9Fq zV7=9Jbq99grJKs_)>i+(=pPWmZbRXtsJ~L*mem@oBq^(2yym$qMX3p48R)$)g<1wM z^iU2tdTBJx2Bxx<>m<4&c!h<9&P~~DHVNTl?+g?6y(GyMn)Acyxu9Nf8z{L#__4@n zAPoJ59hCq9w17)Q6Ve?b0aEC~R7(PLq8Xp|RcI~P3WSnu!ugD5!imU69rBT+_={bb z-&ROTY>qrkLA4+K8(_LiLad=afOG?3jzr>cSLATbl3b=!FfWjZg@Yy)(2aKM=+gv1 z9vg&@BfOlGRu*rRR&T5<<+Ayid~SN=Gf)^EkyZMSHg#?tcQT7Ct> zg-O|xDoP}jvW5IwZlq`QA{rFe%t6#c;Fp3kegO6E$W=fJ8m^h>laa&(OiTbD52F6* z+>Eq3Uw{Y&6Xd36bET}5og;xsY&1U)8qUJ}D0J5HR(^LXA5x6@ScY#jD<9Id zA51?TFd0B4Tk-Q88rm#Z*GsIhwCbtJ5L{=0O@WrD3{LMy5NbWcXAx#|l(tM$GfLpA zmw5ou@lYt8K_h&KVO045dYobnC?TY3{H%$9BQZeGI*k~hB~~)8u`^O8^JR30n;V(#mFbpZt#vT&WDJ7Fn~S$ zNh4@C@n#=7Vh?>*9e1q!X;s;s`1e`)uQcPIRsPxFkxKQlB>_eUx9WyTcQ`bqAsClQ z)ozxz;0O=VW#?MhnHCru;5p|w*6W7=8kkDomx3Oq;c074CVQ{p^kaTxTT%2KsOnnv zUce|#q)a-Y+fZ7o_FqMyG~(Ifyx=W#1U8#ci?LfU@JAWWv}tzugkhH~@W8rMvrM^BG{y65IgXL-@^Jd8P-+%n zJty3HN9WOD*F12(Av84Dtni2w0YcGDMv?notlvUM17Eaqz@&2S>%-uKKfQPjUOX72Jf=_Ba=+>MtTt~jnw!q{ts-7UB^_|mswq8mKLWirwEsX zl8e?Qp~TlB_oTSJ1?ld$ekh$~Znz*6^WxvoBd1DVO9XaWM!YwIzZ6A>U8h$5EZ`#Z zX@PI}vw(PPdZE#}H$wHkp1w+hRWMI7faC2p_%lR->j=!B4P0bCZBV@@jiY1iP7%A- z1sBDV^kO0Q3I`#~$C<|iXp8?CK}Q@gKx$>|Ym4PUXesHdaP*|-5HxLvpb7kVKnS90 z{1W_UM-+JM&wnm5OSKSJEfP~A99g>f^b=8pAkw#^=%@=?h&sM(?L}#6vcpe+d!w{1R-prbA*@@*S0N}sl=hsLpqaTXQ<^W(KBI_X9fzVE@)*4o?Y zwp&|rOXu7^xo~hR7VYS^fUob3ZeoeT-R*c}=?YhDj=SKCb^x&CM*(kI%LZX@q9k4r zLC{h;kdwXjCE)lTINuB6nAX0W-9OSHtP zB)Se>mT}s-IBIp=_TeSL-jqO2bsTk_6Q349<)|SE2sgpxp3K6`0CyI_Uz;vnQ z%kti|mS%e(?T;XWAMxl?dco{P4zr+zy{U7-^~5SmpG|~wbjE!f4gV1A#85DtoxEv% z+UeZ@b~^1chpR*_7Sppd16)Hpf+mc%XE&)+Jxuj?s9G4dg)@~mtxr?E6dDsRkF#hA zoI+oTqK6y>r~T%Of%AT&{h#dyD-Mi{c3^x4KkWw?g~i#a=fB|Iuf6EBkHE8j zr0>MRGQ*@FM%mUSK)W1?1ravkn`CA4>-~Y!Im|WqozU2~63EIhuq!Y@k2EW!D%C>##v!@B6Sppt02Pb=V-# z1wU*Mg(o=h3bfi;3JYxgwJBX>mKJ;D`WukzaM&Qu=T$zPZ8w#zT@%u9ZtC9pVpGJ7opAllBoUXEHAw5Z#KXFjUf`|^}HXyZ- z-3+ZG2SFcyW?((v4Xg4nl%kaw@ z_HmPo8rip|GmGHaLC`{1P3tUvx}^Aisj*r!W`FP)H!)oR(}D<^a$`x?nE+C}KU DWh9a; diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/TrustConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/GPBMetadata/Google/Cloud/Certificatemanager/V1/TrustConfig.php deleted file mode 100644 index 96bbcb43930236641b1baecff7bd057e89d83499..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2925 zcmb_ePj4GV6vuXAHP3C6E<$xJB&Kemjzo4zOC{KlBHL*~At6=>5kf0jG z#(@y|%9#r{_yT+cE*!Y=DLD5daN^DEpDeLcC8fD|vpeti-uu1Zd-Fc}I6MsD9@%0( zi>PFM(mNsYkdZJ7WZ(uK>5T^i77;fXh1_G2Nyx@7`FwYuJl%MQ~r$ZK5$E%i%#zJ=8z#s6TsXYMrbi_nRT}HM#tsN$5pGxX% zX)vd)z?}9Jm~*hY2H<*B2(qt0+Zq#2f#6>_?s?oLLQ;u8_qphDpG!_X{sShsP6pHy z4DF}S4#vJKdEgUeu0F&&=nZaE%bq{IJV;FP^LvkE=V~gb(O9^YkoEkIp9+X!PNi2jN9l_ zvfSI$!~ZDBo3NNCtIPYkFbk~`#%X*C*YjU>eXh==#;X5<8GISygq@Yac}GfGFX_m5 zAIqctXvynzDi3RE^;6B8*`$cW8$or0d2D8MucCs+b(q5&W*F03|G5m6TqV`lGm)qi zTwUz0>dXsM$Oe{5p_EHpTd8K6mH0WU&!Ftl9`gito9dIbl&KetpM0N~+uHi6FQXIH z8vW!R!buQ!YnFLgcTXqPl)$TsiRv}&)xN4%P2Lv@qV`@wWz%;LgUGl8iy<3zbNv;! z-Y2iM$}o4t{eJBc+|>8xi1j%NvfaFl(eDL-Gq1*8I%cSLn~s?))2AVm(7%EueZ3@c zbzLg3_^K*TuFB7U^Q)~uC10lsl#bX*%!_dY=8vg2j&-(R7e6T2-#u^2D~>3mjjigoogle.cloud.certificatemanager.v1.Certificate - */ -class Certificate extends \Google\Protobuf\Internal\Message -{ - /** - * A user-defined name of the certificate. Certificate names must be unique - * globally and match pattern `projects/*/locations/*/certificates/*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * One or more paragraphs of text description of a certificate. - * - * Generated from protobuf field string description = 8; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of a Certificate. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of a Certificate. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Set of labels associated with a Certificate. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Output only. The list of Subject Alternative Names of dnsName type defined - * in the certificate (see RFC 5280 4.2.1.6). Managed certificates that - * haven't been provisioned yet have this field populated with a value of the - * managed.domains field. - * - * Generated from protobuf field repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $san_dnsnames; - /** - * Output only. The PEM-encoded certificate chain. - * - * Generated from protobuf field string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pem_certificate = ''; - /** - * Output only. The expiry timestamp of a Certificate. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Immutable. The scope of the certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $scope = 0; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-defined name of the certificate. Certificate names must be unique - * globally and match pattern `projects/*/locations/*/certificates/*`. - * @type string $description - * One or more paragraphs of text description of a certificate. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of a Certificate. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of a Certificate. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of labels associated with a Certificate. - * @type \Google\Cloud\CertificateManager\V1\Certificate\SelfManagedCertificate $self_managed - * If set, defines data of a self-managed certificate. - * @type \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate $managed - * If set, contains configuration and state of a managed certificate. - * @type array|\Google\Protobuf\Internal\RepeatedField $san_dnsnames - * Output only. The list of Subject Alternative Names of dnsName type defined - * in the certificate (see RFC 5280 4.2.1.6). Managed certificates that - * haven't been provisioned yet have this field populated with a value of the - * managed.domains field. - * @type string $pem_certificate - * Output only. The PEM-encoded certificate chain. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The expiry timestamp of a Certificate. - * @type int $scope - * Immutable. The scope of the certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * A user-defined name of the certificate. Certificate names must be unique - * globally and match pattern `projects/*/locations/*/certificates/*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-defined name of the certificate. Certificate names must be unique - * globally and match pattern `projects/*/locations/*/certificates/*`. - * - * 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; - } - - /** - * One or more paragraphs of text description of a certificate. - * - * Generated from protobuf field string description = 8; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * One or more paragraphs of text description of a certificate. - * - * Generated from protobuf field string description = 8; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of a Certificate. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a Certificate. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 last update timestamp of a Certificate. - * - * 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. The last update timestamp of a Certificate. - * - * 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; - } - - /** - * Set of labels associated with a Certificate. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of labels associated with a Certificate. - * - * Generated from protobuf field map labels = 4; - * @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; - } - - /** - * If set, defines data of a self-managed certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; - * @return \Google\Cloud\CertificateManager\V1\Certificate\SelfManagedCertificate|null - */ - public function getSelfManaged() - { - return $this->readOneof(5); - } - - public function hasSelfManaged() - { - return $this->hasOneof(5); - } - - /** - * If set, defines data of a self-managed certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; - * @param \Google\Cloud\CertificateManager\V1\Certificate\SelfManagedCertificate $var - * @return $this - */ - public function setSelfManaged($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate\SelfManagedCertificate::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * If set, contains configuration and state of a managed certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; - * @return \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate|null - */ - public function getManaged() - { - return $this->readOneof(11); - } - - public function hasManaged() - { - return $this->hasOneof(11); - } - - /** - * If set, contains configuration and state of a managed certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; - * @param \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate $var - * @return $this - */ - public function setManaged($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Output only. The list of Subject Alternative Names of dnsName type defined - * in the certificate (see RFC 5280 4.2.1.6). Managed certificates that - * haven't been provisioned yet have this field populated with a value of the - * managed.domains field. - * - * Generated from protobuf field repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSanDnsnames() - { - return $this->san_dnsnames; - } - - /** - * Output only. The list of Subject Alternative Names of dnsName type defined - * in the certificate (see RFC 5280 4.2.1.6). Managed certificates that - * haven't been provisioned yet have this field populated with a value of the - * managed.domains field. - * - * Generated from protobuf field repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSanDnsnames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->san_dnsnames = $arr; - - return $this; - } - - /** - * Output only. The PEM-encoded certificate chain. - * - * Generated from protobuf field string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPemCertificate() - { - return $this->pem_certificate; - } - - /** - * Output only. The PEM-encoded certificate chain. - * - * Generated from protobuf field string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPemCertificate($var) - { - GPBUtil::checkString($var, True); - $this->pem_certificate = $var; - - return $this; - } - - /** - * Output only. The expiry timestamp of a Certificate. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. The expiry timestamp of a Certificate. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Immutable. The scope of the certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * Immutable. The scope of the certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate.php deleted file mode 100644 index 36e90481af0b..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate.php +++ /dev/null @@ -1,296 +0,0 @@ -google.cloud.certificatemanager.v1.Certificate.ManagedCertificate - */ -class ManagedCertificate extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The domains for which a managed SSL certificate will be - * generated. Wildcard domains are only supported with DNS challenge - * resolution. - * - * Generated from protobuf field repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - private $domains; - /** - * Immutable. Authorizations that will be used for performing domain - * authorization. - * - * Generated from protobuf field repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - private $dns_authorizations; - /** - * Immutable. The resource name for a - * [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig] - * used to configure private PKI certificates in the format - * `projects/*/locations/*/certificateIssuanceConfigs/*`. - * If this field is not set, the certificates will instead be publicly - * signed as documented at - * https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. - * - * Generated from protobuf field string issuance_config = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $issuance_config = ''; - /** - * Output only. State of the managed certificate resource. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Information about issues with provisioning a Managed - * Certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $provisioning_issue = null; - /** - * Output only. Detailed state of the latest authorization attempt for each - * domain specified for managed certificate resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $authorization_attempt_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $domains - * Immutable. The domains for which a managed SSL certificate will be - * generated. Wildcard domains are only supported with DNS challenge - * resolution. - * @type array|\Google\Protobuf\Internal\RepeatedField $dns_authorizations - * Immutable. Authorizations that will be used for performing domain - * authorization. - * @type string $issuance_config - * Immutable. The resource name for a - * [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig] - * used to configure private PKI certificates in the format - * `projects/*/locations/*/certificateIssuanceConfigs/*`. - * If this field is not set, the certificates will instead be publicly - * signed as documented at - * https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. - * @type int $state - * Output only. State of the managed certificate resource. - * @type \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue $provisioning_issue - * Output only. Information about issues with provisioning a Managed - * Certificate. - * @type array<\Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo>|\Google\Protobuf\Internal\RepeatedField $authorization_attempt_info - * Output only. Detailed state of the latest authorization attempt for each - * domain specified for managed certificate resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The domains for which a managed SSL certificate will be - * generated. Wildcard domains are only supported with DNS challenge - * resolution. - * - * Generated from protobuf field repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDomains() - { - return $this->domains; - } - - /** - * Immutable. The domains for which a managed SSL certificate will be - * generated. Wildcard domains are only supported with DNS challenge - * resolution. - * - * Generated from protobuf field repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDomains($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->domains = $arr; - - return $this; - } - - /** - * Immutable. Authorizations that will be used for performing domain - * authorization. - * - * Generated from protobuf field repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDnsAuthorizations() - { - return $this->dns_authorizations; - } - - /** - * Immutable. Authorizations that will be used for performing domain - * authorization. - * - * Generated from protobuf field repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDnsAuthorizations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->dns_authorizations = $arr; - - return $this; - } - - /** - * Immutable. The resource name for a - * [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig] - * used to configure private PKI certificates in the format - * `projects/*/locations/*/certificateIssuanceConfigs/*`. - * If this field is not set, the certificates will instead be publicly - * signed as documented at - * https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. - * - * Generated from protobuf field string issuance_config = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getIssuanceConfig() - { - return $this->issuance_config; - } - - /** - * Immutable. The resource name for a - * [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig] - * used to configure private PKI certificates in the format - * `projects/*/locations/*/certificateIssuanceConfigs/*`. - * If this field is not set, the certificates will instead be publicly - * signed as documented at - * https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. - * - * Generated from protobuf field string issuance_config = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIssuanceConfig($var) - { - GPBUtil::checkString($var, True); - $this->issuance_config = $var; - - return $this; - } - - /** - * Output only. State of the managed certificate resource. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the managed certificate resource. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Information about issues with provisioning a Managed - * Certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue|null - */ - public function getProvisioningIssue() - { - return $this->provisioning_issue; - } - - public function hasProvisioningIssue() - { - return isset($this->provisioning_issue); - } - - public function clearProvisioningIssue() - { - unset($this->provisioning_issue); - } - - /** - * Output only. Information about issues with provisioning a Managed - * Certificate. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue $var - * @return $this - */ - public function setProvisioningIssue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue::class); - $this->provisioning_issue = $var; - - return $this; - } - - /** - * Output only. Detailed state of the latest authorization attempt for each - * domain specified for managed certificate resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAuthorizationAttemptInfo() - { - return $this->authorization_attempt_info; - } - - /** - * Output only. Detailed state of the latest authorization attempt for each - * domain specified for managed certificate resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAuthorizationAttemptInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo::class); - $this->authorization_attempt_info = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ManagedCertificate::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo.php deleted file mode 100644 index 7081bd62999f..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo - */ -class AuthorizationAttemptInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Domain name of the authorization attempt. - * - * Generated from protobuf field string domain = 1; - */ - protected $domain = ''; - /** - * Output only. State of the domain for managed certificate issuance. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Reason for failure of the authorization attempt for the - * domain. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_reason = 0; - /** - * Output only. Human readable explanation for reaching the state. - * Provided to help address the configuration issues. Not guaranteed to be - * stable. For programmatic access use FailureReason enum. - * - * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $details = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain - * Domain name of the authorization attempt. - * @type int $state - * Output only. State of the domain for managed certificate issuance. - * @type int $failure_reason - * Output only. Reason for failure of the authorization attempt for the - * domain. - * @type string $details - * Output only. Human readable explanation for reaching the state. - * Provided to help address the configuration issues. Not guaranteed to be - * stable. For programmatic access use FailureReason enum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Domain name of the authorization attempt. - * - * Generated from protobuf field string domain = 1; - * @return string - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Domain name of the authorization attempt. - * - * Generated from protobuf field string domain = 1; - * @param string $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkString($var, True); - $this->domain = $var; - - return $this; - } - - /** - * Output only. State of the domain for managed certificate issuance. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the domain for managed certificate issuance. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Reason for failure of the authorization attempt for the - * domain. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Output only. Reason for failure of the authorization attempt for the - * domain. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\AuthorizationAttemptInfo\FailureReason::class); - $this->failure_reason = $var; - - return $this; - } - - /** - * Output only. Human readable explanation for reaching the state. - * Provided to help address the configuration issues. Not guaranteed to be - * stable. For programmatic access use FailureReason enum. - * - * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Output only. Human readable explanation for reaching the state. - * Provided to help address the configuration issues. Not guaranteed to be - * stable. For programmatic access use FailureReason enum. - * - * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AuthorizationAttemptInfo::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_AuthorizationAttemptInfo::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/FailureReason.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/FailureReason.php deleted file mode 100644 index 3cec790c0492..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/FailureReason.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason - */ -class FailureReason -{ - /** - * FailureReason is unspecified. - * - * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; - */ - const FAILURE_REASON_UNSPECIFIED = 0; - /** - * There was a problem with the user's DNS or load balancer - * configuration for this domain. - * - * Generated from protobuf enum CONFIG = 1; - */ - const CONFIG = 1; - /** - * Certificate issuance forbidden by an explicit CAA record for the - * domain or a failure to check CAA records for the domain. - * - * Generated from protobuf enum CAA = 2; - */ - const CAA = 2; - /** - * Reached a CA or internal rate-limit for the domain, - * e.g. for certificates per top-level private domain. - * - * Generated from protobuf enum RATE_LIMITED = 3; - */ - const RATE_LIMITED = 3; - - private static $valueToName = [ - self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', - self::CONFIG => 'CONFIG', - self::CAA => 'CAA', - self::RATE_LIMITED => 'RATE_LIMITED', - ]; - - 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(FailureReason::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_AuthorizationAttemptInfo_FailureReason::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/State.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/State.php deleted file mode 100644 index 521cf4cb9cfc..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/AuthorizationAttemptInfo/State.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State - */ -class State -{ - /** - * State is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Certificate provisioning for this domain is under way. Google Cloud - * will attempt to authorize the domain. - * - * Generated from protobuf enum AUTHORIZING = 1; - */ - const AUTHORIZING = 1; - /** - * A managed certificate can be provisioned, no issues for this domain. - * - * Generated from protobuf enum AUTHORIZED = 6; - */ - const AUTHORIZED = 6; - /** - * Attempt to authorize the domain failed. This prevents the Managed - * Certificate from being issued. - * See `failure_reason` and `details` fields for more information. - * - * Generated from protobuf enum FAILED = 7; - */ - const FAILED = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::AUTHORIZING => 'AUTHORIZING', - self::AUTHORIZED => 'AUTHORIZED', - 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(State::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_AuthorizationAttemptInfo_State::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue.php deleted file mode 100644 index 298111d31843..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue - */ -class ProvisioningIssue extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Reason for provisioning failures. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reason = 0; - /** - * Output only. Human readable explanation about the issue. Provided to - * help address the configuration issues. Not guaranteed to be stable. For - * programmatic access use Reason enum. - * - * Generated from protobuf field string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $details = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reason - * Output only. Reason for provisioning failures. - * @type string $details - * Output only. Human readable explanation about the issue. Provided to - * help address the configuration issues. Not guaranteed to be stable. For - * programmatic access use Reason enum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Reason for provisioning failures. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getReason() - { - return $this->reason; - } - - /** - * Output only. Reason for provisioning failures. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\Certificate\ManagedCertificate\ProvisioningIssue\Reason::class); - $this->reason = $var; - - return $this; - } - - /** - * Output only. Human readable explanation about the issue. Provided to - * help address the configuration issues. Not guaranteed to be stable. For - * programmatic access use Reason enum. - * - * Generated from protobuf field string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Output only. Human readable explanation about the issue. Provided to - * help address the configuration issues. Not guaranteed to be stable. For - * programmatic access use Reason enum. - * - * Generated from protobuf field string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProvisioningIssue::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_ProvisioningIssue::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue/Reason.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue/Reason.php deleted file mode 100644 index fead58541b1c..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/ProvisioningIssue/Reason.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason - */ -class Reason -{ - /** - * Reason is unspecified. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * Certificate provisioning failed due to an issue with one or more of - * the domains on the certificate. - * For details of which domains failed, consult the - * `authorization_attempt_info` field. - * - * Generated from protobuf enum AUTHORIZATION_ISSUE = 1; - */ - const AUTHORIZATION_ISSUE = 1; - /** - * Exceeded Certificate Authority quotas or internal rate limits of the - * system. Provisioning may take longer to complete. - * - * Generated from protobuf enum RATE_LIMITED = 2; - */ - const RATE_LIMITED = 2; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::AUTHORIZATION_ISSUE => 'AUTHORIZATION_ISSUE', - self::RATE_LIMITED => 'RATE_LIMITED', - ]; - - 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(Reason::class, \Google\Cloud\CertificateManager\V1\Certificate_ManagedCertificate_ProvisioningIssue_Reason::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/State.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/State.php deleted file mode 100644 index 8cfa7a463eb8..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/ManagedCertificate/State.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State - */ -class State -{ - /** - * State is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Certificate Manager attempts to provision or renew the certificate. - * If the process takes longer than expected, consult the - * `provisioning_issue` field. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * Multiple certificate provisioning attempts failed and Certificate - * Manager gave up. To try again, delete and create a new managed - * Certificate resource. - * For details see the `provisioning_issue` field. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The certificate management is working, and a certificate has been - * provisioned. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::FAILED => 'FAILED', - self::ACTIVE => 'ACTIVE', - ]; - - 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\CertificateManager\V1\Certificate_ManagedCertificate_State::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/Scope.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/Scope.php deleted file mode 100644 index 0ad044eb2ff1..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/Scope.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.certificatemanager.v1.Certificate.Scope - */ -class Scope -{ - /** - * Certificates with default scope are served from core Google data centers. - * If unsure, choose this option. - * - * Generated from protobuf enum DEFAULT = 0; - */ - const PBDEFAULT = 0; - /** - * Certificates with scope EDGE_CACHE are special-purposed certificates, - * served from Edge Points of Presence. - * See https://cloud.google.com/vpc/docs/edge-locations. - * - * Generated from protobuf enum EDGE_CACHE = 1; - */ - const EDGE_CACHE = 1; - /** - * Certificates with ALL_REGIONS scope are served from all Google Cloud - * regions. See https://cloud.google.com/compute/docs/regions-zones. - * - * Generated from protobuf enum ALL_REGIONS = 2; - */ - const ALL_REGIONS = 2; - - private static $valueToName = [ - self::PBDEFAULT => 'DEFAULT', - self::EDGE_CACHE => 'EDGE_CACHE', - self::ALL_REGIONS => 'ALL_REGIONS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Scope::class, \Google\Cloud\CertificateManager\V1\Certificate_Scope::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/SelfManagedCertificate.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/SelfManagedCertificate.php deleted file mode 100644 index 86ec18a91142..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/Certificate/SelfManagedCertificate.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate - */ -class SelfManagedCertificate extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. The PEM-encoded certificate chain. - * Leaf certificate comes first, followed by intermediate ones if any. - * - * Generated from protobuf field string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $pem_certificate = ''; - /** - * Input only. The PEM-encoded private key of the leaf certificate. - * - * Generated from protobuf field string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $pem_private_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pem_certificate - * Input only. The PEM-encoded certificate chain. - * Leaf certificate comes first, followed by intermediate ones if any. - * @type string $pem_private_key - * Input only. The PEM-encoded private key of the leaf certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Input only. The PEM-encoded certificate chain. - * Leaf certificate comes first, followed by intermediate ones if any. - * - * Generated from protobuf field string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPemCertificate() - { - return $this->pem_certificate; - } - - /** - * Input only. The PEM-encoded certificate chain. - * Leaf certificate comes first, followed by intermediate ones if any. - * - * Generated from protobuf field string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPemCertificate($var) - { - GPBUtil::checkString($var, True); - $this->pem_certificate = $var; - - return $this; - } - - /** - * Input only. The PEM-encoded private key of the leaf certificate. - * - * Generated from protobuf field string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPemPrivateKey() - { - return $this->pem_private_key; - } - - /** - * Input only. The PEM-encoded private key of the leaf certificate. - * - * Generated from protobuf field string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPemPrivateKey($var) - { - GPBUtil::checkString($var, True); - $this->pem_private_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SelfManagedCertificate::class, \Google\Cloud\CertificateManager\V1\Certificate_SelfManagedCertificate::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig.php deleted file mode 100644 index 5152f1515769..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig.php +++ /dev/null @@ -1,399 +0,0 @@ -google.cloud.certificatemanager.v1.CertificateIssuanceConfig - */ -class CertificateIssuanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * A user-defined name of the certificate issuance config. - * CertificateIssuanceConfig names must be unique globally and match pattern - * `projects/*/locations/*/certificateIssuanceConfigs/*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation timestamp of a CertificateIssuanceConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of a CertificateIssuanceConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Set of labels associated with a CertificateIssuanceConfig. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * One or more paragraphs of text description of a CertificateIssuanceConfig. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Required. The CA that issues the workload certificate. It includes the CA - * address, type, authentication to CA service, etc. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig certificate_authority_config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_authority_config = null; - /** - * Required. Workload certificate lifetime requested. - * - * Generated from protobuf field .google.protobuf.Duration lifetime = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lifetime = null; - /** - * Required. Specifies the percentage of elapsed time of the certificate - * lifetime to wait before renewing the certificate. Must be a number between - * 1-99, inclusive. - * - * Generated from protobuf field int32 rotation_window_percentage = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rotation_window_percentage = 0; - /** - * Required. The key algorithm to use when generating the private key. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm key_algorithm = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_algorithm = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-defined name of the certificate issuance config. - * CertificateIssuanceConfig names must be unique globally and match pattern - * `projects/*/locations/*/certificateIssuanceConfigs/*`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of a CertificateIssuanceConfig. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of a CertificateIssuanceConfig. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of labels associated with a CertificateIssuanceConfig. - * @type string $description - * One or more paragraphs of text description of a CertificateIssuanceConfig. - * @type \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig $certificate_authority_config - * Required. The CA that issues the workload certificate. It includes the CA - * address, type, authentication to CA service, etc. - * @type \Google\Protobuf\Duration $lifetime - * Required. Workload certificate lifetime requested. - * @type int $rotation_window_percentage - * Required. Specifies the percentage of elapsed time of the certificate - * lifetime to wait before renewing the certificate. Must be a number between - * 1-99, inclusive. - * @type int $key_algorithm - * Required. The key algorithm to use when generating the private key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * A user-defined name of the certificate issuance config. - * CertificateIssuanceConfig names must be unique globally and match pattern - * `projects/*/locations/*/certificateIssuanceConfigs/*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-defined name of the certificate issuance config. - * CertificateIssuanceConfig names must be unique globally and match pattern - * `projects/*/locations/*/certificateIssuanceConfigs/*`. - * - * 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; - } - - /** - * Output only. The creation timestamp of a CertificateIssuanceConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a CertificateIssuanceConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 last update timestamp of a CertificateIssuanceConfig. - * - * 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. The last update timestamp of a CertificateIssuanceConfig. - * - * 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; - } - - /** - * Set of labels associated with a CertificateIssuanceConfig. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of labels associated with a CertificateIssuanceConfig. - * - * Generated from protobuf field map labels = 4; - * @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; - } - - /** - * One or more paragraphs of text description of a CertificateIssuanceConfig. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * One or more paragraphs of text description of a CertificateIssuanceConfig. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. The CA that issues the workload certificate. It includes the CA - * address, type, authentication to CA service, etc. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig certificate_authority_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig|null - */ - public function getCertificateAuthorityConfig() - { - return $this->certificate_authority_config; - } - - public function hasCertificateAuthorityConfig() - { - return isset($this->certificate_authority_config); - } - - public function clearCertificateAuthorityConfig() - { - unset($this->certificate_authority_config); - } - - /** - * Required. The CA that issues the workload certificate. It includes the CA - * address, type, authentication to CA service, etc. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig certificate_authority_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig $var - * @return $this - */ - public function setCertificateAuthorityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig::class); - $this->certificate_authority_config = $var; - - return $this; - } - - /** - * Required. Workload certificate lifetime requested. - * - * Generated from protobuf field .google.protobuf.Duration lifetime = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getLifetime() - { - return $this->lifetime; - } - - public function hasLifetime() - { - return isset($this->lifetime); - } - - public function clearLifetime() - { - unset($this->lifetime); - } - - /** - * Required. Workload certificate lifetime requested. - * - * Generated from protobuf field .google.protobuf.Duration lifetime = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLifetime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->lifetime = $var; - - return $this; - } - - /** - * Required. Specifies the percentage of elapsed time of the certificate - * lifetime to wait before renewing the certificate. Must be a number between - * 1-99, inclusive. - * - * Generated from protobuf field int32 rotation_window_percentage = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getRotationWindowPercentage() - { - return $this->rotation_window_percentage; - } - - /** - * Required. Specifies the percentage of elapsed time of the certificate - * lifetime to wait before renewing the certificate. Must be a number between - * 1-99, inclusive. - * - * Generated from protobuf field int32 rotation_window_percentage = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setRotationWindowPercentage($var) - { - GPBUtil::checkInt32($var); - $this->rotation_window_percentage = $var; - - return $this; - } - - /** - * Required. The key algorithm to use when generating the private key. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm key_algorithm = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getKeyAlgorithm() - { - return $this->key_algorithm; - } - - /** - * Required. The key algorithm to use when generating the private key. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm key_algorithm = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setKeyAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\KeyAlgorithm::class); - $this->key_algorithm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig.php deleted file mode 100644 index e060679a5ed1..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig - */ -class CertificateAuthorityConfig extends \Google\Protobuf\Internal\Message -{ - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig $certificate_authority_service_config - * Defines a CertificateAuthorityServiceConfig. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * Defines a CertificateAuthorityServiceConfig. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig certificate_authority_service_config = 1; - * @return \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig|null - */ - public function getCertificateAuthorityServiceConfig() - { - return $this->readOneof(1); - } - - public function hasCertificateAuthorityServiceConfig() - { - return $this->hasOneof(1); - } - - /** - * Defines a CertificateAuthorityServiceConfig. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig certificate_authority_service_config = 1; - * @param \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig $var - * @return $this - */ - public function setCertificateAuthorityServiceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CertificateAuthorityConfig::class, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig_CertificateAuthorityConfig::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig/CertificateAuthorityServiceConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig/CertificateAuthorityServiceConfig.php deleted file mode 100644 index caafaa5e49a2..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/CertificateAuthorityConfig/CertificateAuthorityServiceConfig.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig - */ -class CertificateAuthorityServiceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A CA pool resource used to issue a certificate. - * The CA pool string has a relative resource path following the form - * "projects/{project}/locations/{location}/caPools/{ca_pool}". - * - * Generated from protobuf field string ca_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $ca_pool = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ca_pool - * Required. A CA pool resource used to issue a certificate. - * The CA pool string has a relative resource path following the form - * "projects/{project}/locations/{location}/caPools/{ca_pool}". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A CA pool resource used to issue a certificate. - * The CA pool string has a relative resource path following the form - * "projects/{project}/locations/{location}/caPools/{ca_pool}". - * - * Generated from protobuf field string ca_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCaPool() - { - return $this->ca_pool; - } - - /** - * Required. A CA pool resource used to issue a certificate. - * The CA pool string has a relative resource path following the form - * "projects/{project}/locations/{location}/caPools/{ca_pool}". - * - * Generated from protobuf field string ca_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCaPool($var) - { - GPBUtil::checkString($var, True); - $this->ca_pool = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CertificateAuthorityServiceConfig::class, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthorityServiceConfig::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/KeyAlgorithm.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/KeyAlgorithm.php deleted file mode 100644 index 71f63a4297e3..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateIssuanceConfig/KeyAlgorithm.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm - */ -class KeyAlgorithm -{ - /** - * Unspecified key algorithm. - * - * Generated from protobuf enum KEY_ALGORITHM_UNSPECIFIED = 0; - */ - const KEY_ALGORITHM_UNSPECIFIED = 0; - /** - * Specifies RSA with a 2048-bit modulus. - * - * Generated from protobuf enum RSA_2048 = 1; - */ - const RSA_2048 = 1; - /** - * Specifies ECDSA with curve P256. - * - * Generated from protobuf enum ECDSA_P256 = 4; - */ - const ECDSA_P256 = 4; - - private static $valueToName = [ - self::KEY_ALGORITHM_UNSPECIFIED => 'KEY_ALGORITHM_UNSPECIFIED', - self::RSA_2048 => 'RSA_2048', - self::ECDSA_P256 => 'ECDSA_P256', - ]; - - 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(KeyAlgorithm::class, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig_KeyAlgorithm::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap.php deleted file mode 100644 index 6d10dbd295df..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.certificatemanager.v1.CertificateMap - */ -class CertificateMap extends \Google\Protobuf\Internal\Message -{ - /** - * A user-defined name of the Certificate Map. Certificate Map names must be - * unique globally and match pattern - * `projects/*/locations/*/certificateMaps/*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * One or more paragraphs of text description of a certificate map. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of a Certificate Map. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp of a Certificate Map. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Set of labels associated with a Certificate Map. - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - /** - * Output only. A list of GCLB targets that use this Certificate Map. - * A Target Proxy is only present on this list if it's attached to a - * Forwarding Rule. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $gclb_targets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-defined name of the Certificate Map. Certificate Map names must be - * unique globally and match pattern - * `projects/*/locations/*/certificateMaps/*`. - * @type string $description - * One or more paragraphs of text description of a certificate map. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of a Certificate Map. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp of a Certificate Map. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of labels associated with a Certificate Map. - * @type array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget>|\Google\Protobuf\Internal\RepeatedField $gclb_targets - * Output only. A list of GCLB targets that use this Certificate Map. - * A Target Proxy is only present on this list if it's attached to a - * Forwarding Rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * A user-defined name of the Certificate Map. Certificate Map names must be - * unique globally and match pattern - * `projects/*/locations/*/certificateMaps/*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-defined name of the Certificate Map. Certificate Map names must be - * unique globally and match pattern - * `projects/*/locations/*/certificateMaps/*`. - * - * 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; - } - - /** - * One or more paragraphs of text description of a certificate map. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * One or more paragraphs of text description of a certificate map. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of a Certificate Map. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a Certificate Map. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 update timestamp of a Certificate Map. - * - * 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 update timestamp of a Certificate Map. - * - * 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; - } - - /** - * Set of labels associated with a Certificate Map. - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of labels associated with a Certificate Map. - * - * Generated from protobuf field map labels = 3; - * @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. A list of GCLB targets that use this Certificate Map. - * A Target Proxy is only present on this list if it's attached to a - * Forwarding Rule. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGclbTargets() - { - return $this->gclb_targets; - } - - /** - * Output only. A list of GCLB targets that use this Certificate Map. - * A Target Proxy is only present on this list if it's attached to a - * Forwarding Rule. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGclbTargets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget::class); - $this->gclb_targets = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget.php deleted file mode 100644 index 59c43861885a..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.certificatemanager.v1.CertificateMap.GclbTarget - */ -class GclbTarget extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. IP configurations for this Target Proxy where the - * Certificate Map is serving. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $ip_configs; - protected $target_proxy; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $target_https_proxy - * Output only. This field returns the resource name in the following - * format: - * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`. - * @type string $target_ssl_proxy - * Output only. This field returns the resource name in the following - * format: - * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`. - * @type array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget\IpConfig>|\Google\Protobuf\Internal\RepeatedField $ip_configs - * Output only. IP configurations for this Target Proxy where the - * Certificate Map is serving. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. This field returns the resource name in the following - * format: - * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`. - * - * Generated from protobuf field string target_https_proxy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTargetHttpsProxy() - { - return $this->readOneof(1); - } - - public function hasTargetHttpsProxy() - { - return $this->hasOneof(1); - } - - /** - * Output only. This field returns the resource name in the following - * format: - * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`. - * - * Generated from protobuf field string target_https_proxy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTargetHttpsProxy($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Output only. This field returns the resource name in the following - * format: - * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`. - * - * Generated from protobuf field string target_ssl_proxy = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTargetSslProxy() - { - return $this->readOneof(3); - } - - public function hasTargetSslProxy() - { - return $this->hasOneof(3); - } - - /** - * Output only. This field returns the resource name in the following - * format: - * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`. - * - * Generated from protobuf field string target_ssl_proxy = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTargetSslProxy($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Output only. IP configurations for this Target Proxy where the - * Certificate Map is serving. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpConfigs() - { - return $this->ip_configs; - } - - /** - * Output only. IP configurations for this Target Proxy where the - * Certificate Map is serving. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget\IpConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget\IpConfig::class); - $this->ip_configs = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTargetProxy() - { - return $this->whichOneof("target_proxy"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GclbTarget::class, \Google\Cloud\CertificateManager\V1\CertificateMap_GclbTarget::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget/IpConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget/IpConfig.php deleted file mode 100644 index ab5ed740ef57..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMap/GclbTarget/IpConfig.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig - */ -class IpConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. An external IP address. - * - * Generated from protobuf field string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ip_address = ''; - /** - * Output only. Ports. - * - * Generated from protobuf field repeated uint32 ports = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $ports; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip_address - * Output only. An external IP address. - * @type array|\Google\Protobuf\Internal\RepeatedField $ports - * Output only. Ports. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. An external IP address. - * - * Generated from protobuf field string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * Output only. An external IP address. - * - * Generated from protobuf field string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * Output only. Ports. - * - * Generated from protobuf field repeated uint32 ports = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPorts() - { - return $this->ports; - } - - /** - * Output only. Ports. - * - * Generated from protobuf field repeated uint32 ports = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPorts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); - $this->ports = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IpConfig::class, \Google\Cloud\CertificateManager\V1\CertificateMap_GclbTarget_IpConfig::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry.php deleted file mode 100644 index 4c6b3f1ada5f..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry.php +++ /dev/null @@ -1,388 +0,0 @@ -google.cloud.certificatemanager.v1.CertificateMapEntry - */ -class CertificateMapEntry extends \Google\Protobuf\Internal\Message -{ - /** - * A user-defined name of the Certificate Map Entry. Certificate Map Entry - * names must be unique globally and match pattern - * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * One or more paragraphs of text description of a certificate map entry. - * - * Generated from protobuf field string description = 9; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of a Certificate Map Entry. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp of a Certificate Map Entry. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Set of labels associated with a Certificate Map Entry. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * A set of Certificates defines for the given `hostname`. There can be - * defined up to four certificates in each Certificate Map Entry. Each - * certificate must match pattern `projects/*/locations/*/certificates/*`. - * - * Generated from protobuf field repeated string certificates = 7 [(.google.api.resource_reference) = { - */ - private $certificates; - /** - * Output only. A serving state of this Certificate Map Entry. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - protected $match; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-defined name of the Certificate Map Entry. Certificate Map Entry - * names must be unique globally and match pattern - * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * @type string $description - * One or more paragraphs of text description of a certificate map entry. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of a Certificate Map Entry. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp of a Certificate Map Entry. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of labels associated with a Certificate Map Entry. - * @type string $hostname - * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression - * (`*.example.com`) for a set of hostnames with common suffix. Used as - * Server Name Indication (SNI) for selecting a proper certificate. - * @type int $matcher - * A predefined matcher for particular cases, other than SNI selection. - * @type array|\Google\Protobuf\Internal\RepeatedField $certificates - * A set of Certificates defines for the given `hostname`. There can be - * defined up to four certificates in each Certificate Map Entry. Each - * certificate must match pattern `projects/*/locations/*/certificates/*`. - * @type int $state - * Output only. A serving state of this Certificate Map Entry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * A user-defined name of the Certificate Map Entry. Certificate Map Entry - * names must be unique globally and match pattern - * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-defined name of the Certificate Map Entry. Certificate Map Entry - * names must be unique globally and match pattern - * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * - * 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; - } - - /** - * One or more paragraphs of text description of a certificate map entry. - * - * Generated from protobuf field string description = 9; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * One or more paragraphs of text description of a certificate map entry. - * - * Generated from protobuf field string description = 9; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of a Certificate Map Entry. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a Certificate Map Entry. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 update timestamp of a Certificate Map Entry. - * - * 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. The update timestamp of a Certificate Map Entry. - * - * 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; - } - - /** - * Set of labels associated with a Certificate Map Entry. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of labels associated with a Certificate Map Entry. - * - * Generated from protobuf field map labels = 4; - * @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; - } - - /** - * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression - * (`*.example.com`) for a set of hostnames with common suffix. Used as - * Server Name Indication (SNI) for selecting a proper certificate. - * - * Generated from protobuf field string hostname = 5; - * @return string - */ - public function getHostname() - { - return $this->readOneof(5); - } - - public function hasHostname() - { - return $this->hasOneof(5); - } - - /** - * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression - * (`*.example.com`) for a set of hostnames with common suffix. Used as - * Server Name Indication (SNI) for selecting a proper certificate. - * - * Generated from protobuf field string hostname = 5; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A predefined matcher for particular cases, other than SNI selection. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; - * @return int - */ - public function getMatcher() - { - return $this->readOneof(10); - } - - public function hasMatcher() - { - return $this->hasOneof(10); - } - - /** - * A predefined matcher for particular cases, other than SNI selection. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; - * @param int $var - * @return $this - */ - public function setMatcher($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\CertificateMapEntry\Matcher::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * A set of Certificates defines for the given `hostname`. There can be - * defined up to four certificates in each Certificate Map Entry. Each - * certificate must match pattern `projects/*/locations/*/certificates/*`. - * - * Generated from protobuf field repeated string certificates = 7 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCertificates() - { - return $this->certificates; - } - - /** - * A set of Certificates defines for the given `hostname`. There can be - * defined up to four certificates in each Certificate Map Entry. Each - * certificate must match pattern `projects/*/locations/*/certificates/*`. - * - * Generated from protobuf field repeated string certificates = 7 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCertificates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->certificates = $arr; - - return $this; - } - - /** - * Output only. A serving state of this Certificate Map Entry. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. A serving state of this Certificate Map Entry. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\ServingState::class); - $this->state = $var; - - return $this; - } - - /** - * @return string - */ - public function getMatch() - { - return $this->whichOneof("match"); - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry/Matcher.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry/Matcher.php deleted file mode 100644 index f837e74c7a8b..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CertificateMapEntry/Matcher.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher - */ -class Matcher -{ - /** - * A matcher has't been recognized. - * - * Generated from protobuf enum MATCHER_UNSPECIFIED = 0; - */ - const MATCHER_UNSPECIFIED = 0; - /** - * A primary certificate that is served when SNI wasn't specified in the - * request or SNI couldn't be found in the map. - * - * Generated from protobuf enum PRIMARY = 1; - */ - const PRIMARY = 1; - - private static $valueToName = [ - self::MATCHER_UNSPECIFIED => 'MATCHER_UNSPECIFIED', - self::PRIMARY => 'PRIMARY', - ]; - - 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(Matcher::class, \Google\Cloud\CertificateManager\V1\CertificateMapEntry_Matcher::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateIssuanceConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateIssuanceConfigRequest.php deleted file mode 100644 index 6434e2e05757..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateIssuanceConfigRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest - */ -class CreateCertificateIssuanceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the certificate issuance config. Must be - * in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A user-provided name of the certificate config. - * - * Generated from protobuf field string certificate_issuance_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_issuance_config_id = ''; - /** - * Required. A definition of the certificate issuance config to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_issuance_config = null; - - /** - * @param string $parent Required. The parent resource of the certificate issuance config. Must be - * in the format `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig $certificateIssuanceConfig Required. A definition of the certificate issuance config to create. - * @param string $certificateIssuanceConfigId Required. A user-provided name of the certificate config. - * - * @return \Google\Cloud\CertificateManager\V1\CreateCertificateIssuanceConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig $certificateIssuanceConfig, string $certificateIssuanceConfigId): self - { - return (new self()) - ->setParent($parent) - ->setCertificateIssuanceConfig($certificateIssuanceConfig) - ->setCertificateIssuanceConfigId($certificateIssuanceConfigId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the certificate issuance config. Must be - * in the format `projects/*/locations/*`. - * @type string $certificate_issuance_config_id - * Required. A user-provided name of the certificate config. - * @type \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig $certificate_issuance_config - * Required. A definition of the certificate issuance config to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the certificate issuance config. Must be - * in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the certificate issuance config. Must be - * in the format `projects/*/locations/*`. - * - * 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. A user-provided name of the certificate config. - * - * Generated from protobuf field string certificate_issuance_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCertificateIssuanceConfigId() - { - return $this->certificate_issuance_config_id; - } - - /** - * Required. A user-provided name of the certificate config. - * - * Generated from protobuf field string certificate_issuance_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCertificateIssuanceConfigId($var) - { - GPBUtil::checkString($var, True); - $this->certificate_issuance_config_id = $var; - - return $this; - } - - /** - * Required. A definition of the certificate issuance config to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig|null - */ - public function getCertificateIssuanceConfig() - { - return $this->certificate_issuance_config; - } - - public function hasCertificateIssuanceConfig() - { - return isset($this->certificate_issuance_config); - } - - public function clearCertificateIssuanceConfig() - { - unset($this->certificate_issuance_config); - } - - /** - * Required. A definition of the certificate issuance config to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig $var - * @return $this - */ - public function setCertificateIssuanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig::class); - $this->certificate_issuance_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapEntryRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapEntryRequest.php deleted file mode 100644 index 7c2df97476f0..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapEntryRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest - */ -class CreateCertificateMapEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the certificate map entry. Must be in the - * format `projects/*/locations/*/certificateMaps/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A user-provided name of the certificate map entry. - * - * Generated from protobuf field string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_map_entry_id = ''; - /** - * Required. A definition of the certificate map entry to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_map_entry = null; - - /** - * @param string $parent Required. The parent resource of the certificate map entry. Must be in the - * format `projects/*/locations/*/certificateMaps/*`. Please see - * {@see CertificateManagerClient::certificateMapName()} for help formatting this field. - * @param \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificateMapEntry Required. A definition of the certificate map entry to create. - * @param string $certificateMapEntryId Required. A user-provided name of the certificate map entry. - * - * @return \Google\Cloud\CertificateManager\V1\CreateCertificateMapEntryRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificateMapEntry, string $certificateMapEntryId): self - { - return (new self()) - ->setParent($parent) - ->setCertificateMapEntry($certificateMapEntry) - ->setCertificateMapEntryId($certificateMapEntryId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the certificate map entry. Must be in the - * format `projects/*/locations/*/certificateMaps/*`. - * @type string $certificate_map_entry_id - * Required. A user-provided name of the certificate map entry. - * @type \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificate_map_entry - * Required. A definition of the certificate map entry to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the certificate map entry. Must be in the - * format `projects/*/locations/*/certificateMaps/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the certificate map entry. Must be in the - * format `projects/*/locations/*/certificateMaps/*`. - * - * 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. A user-provided name of the certificate map entry. - * - * Generated from protobuf field string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCertificateMapEntryId() - { - return $this->certificate_map_entry_id; - } - - /** - * Required. A user-provided name of the certificate map entry. - * - * Generated from protobuf field string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCertificateMapEntryId($var) - { - GPBUtil::checkString($var, True); - $this->certificate_map_entry_id = $var; - - return $this; - } - - /** - * Required. A definition of the certificate map entry to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\CertificateMapEntry|null - */ - public function getCertificateMapEntry() - { - return $this->certificate_map_entry; - } - - public function hasCertificateMapEntry() - { - return isset($this->certificate_map_entry); - } - - public function clearCertificateMapEntry() - { - unset($this->certificate_map_entry); - } - - /** - * Required. A definition of the certificate map entry to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\CertificateMapEntry $var - * @return $this - */ - public function setCertificateMapEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateMapEntry::class); - $this->certificate_map_entry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapRequest.php deleted file mode 100644 index 8722fd5327e7..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateMapRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.certificatemanager.v1.CreateCertificateMapRequest - */ -class CreateCertificateMapRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the certificate map. Must be in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A user-provided name of the certificate map. - * - * Generated from protobuf field string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_map_id = ''; - /** - * Required. A definition of the certificate map to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_map = null; - - /** - * @param string $parent Required. The parent resource of the certificate map. Must be in the format - * `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap Required. A definition of the certificate map to create. - * @param string $certificateMapId Required. A user-provided name of the certificate map. - * - * @return \Google\Cloud\CertificateManager\V1\CreateCertificateMapRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap, string $certificateMapId): self - { - return (new self()) - ->setParent($parent) - ->setCertificateMap($certificateMap) - ->setCertificateMapId($certificateMapId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the certificate map. Must be in the format - * `projects/*/locations/*`. - * @type string $certificate_map_id - * Required. A user-provided name of the certificate map. - * @type \Google\Cloud\CertificateManager\V1\CertificateMap $certificate_map - * Required. A definition of the certificate map to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the certificate map. Must be in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the certificate map. Must be in the format - * `projects/*/locations/*`. - * - * 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. A user-provided name of the certificate map. - * - * Generated from protobuf field string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCertificateMapId() - { - return $this->certificate_map_id; - } - - /** - * Required. A user-provided name of the certificate map. - * - * Generated from protobuf field string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCertificateMapId($var) - { - GPBUtil::checkString($var, True); - $this->certificate_map_id = $var; - - return $this; - } - - /** - * Required. A definition of the certificate map to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\CertificateMap|null - */ - public function getCertificateMap() - { - return $this->certificate_map; - } - - public function hasCertificateMap() - { - return isset($this->certificate_map); - } - - public function clearCertificateMap() - { - unset($this->certificate_map); - } - - /** - * Required. A definition of the certificate map to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\CertificateMap $var - * @return $this - */ - public function setCertificateMap($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateMap::class); - $this->certificate_map = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateRequest.php deleted file mode 100644 index 0c98fd3b8a2b..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateCertificateRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.certificatemanager.v1.CreateCertificateRequest - */ -class CreateCertificateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the certificate. Must be in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A user-provided name of the certificate. - * - * Generated from protobuf field string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_id = ''; - /** - * Required. A definition of the certificate to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate = null; - - /** - * @param string $parent Required. The parent resource of the certificate. Must be in the format - * `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\CertificateManager\V1\Certificate $certificate Required. A definition of the certificate to create. - * @param string $certificateId Required. A user-provided name of the certificate. - * - * @return \Google\Cloud\CertificateManager\V1\CreateCertificateRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\CertificateManager\V1\Certificate $certificate, string $certificateId): self - { - return (new self()) - ->setParent($parent) - ->setCertificate($certificate) - ->setCertificateId($certificateId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the certificate. Must be in the format - * `projects/*/locations/*`. - * @type string $certificate_id - * Required. A user-provided name of the certificate. - * @type \Google\Cloud\CertificateManager\V1\Certificate $certificate - * Required. A definition of the certificate to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the certificate. Must be in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the certificate. Must be in the format - * `projects/*/locations/*`. - * - * 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. A user-provided name of the certificate. - * - * Generated from protobuf field string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCertificateId() - { - return $this->certificate_id; - } - - /** - * Required. A user-provided name of the certificate. - * - * Generated from protobuf field string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCertificateId($var) - { - GPBUtil::checkString($var, True); - $this->certificate_id = $var; - - return $this; - } - - /** - * Required. A definition of the certificate to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\Certificate|null - */ - public function getCertificate() - { - return $this->certificate; - } - - public function hasCertificate() - { - return isset($this->certificate); - } - - public function clearCertificate() - { - unset($this->certificate); - } - - /** - * Required. A definition of the certificate to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\Certificate $var - * @return $this - */ - public function setCertificate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate::class); - $this->certificate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateDnsAuthorizationRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateDnsAuthorizationRequest.php deleted file mode 100644 index 4dea85970ea0..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateDnsAuthorizationRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest - */ -class CreateDnsAuthorizationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the dns authorization. Must be in the - * format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A user-provided name of the dns authorization. - * - * Generated from protobuf field string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dns_authorization_id = ''; - /** - * Required. A definition of the dns authorization to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dns_authorization = null; - - /** - * @param string $parent Required. The parent resource of the dns authorization. Must be in the - * format `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization $dnsAuthorization Required. A definition of the dns authorization to create. - * @param string $dnsAuthorizationId Required. A user-provided name of the dns authorization. - * - * @return \Google\Cloud\CertificateManager\V1\CreateDnsAuthorizationRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\CertificateManager\V1\DnsAuthorization $dnsAuthorization, string $dnsAuthorizationId): self - { - return (new self()) - ->setParent($parent) - ->setDnsAuthorization($dnsAuthorization) - ->setDnsAuthorizationId($dnsAuthorizationId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the dns authorization. Must be in the - * format `projects/*/locations/*`. - * @type string $dns_authorization_id - * Required. A user-provided name of the dns authorization. - * @type \Google\Cloud\CertificateManager\V1\DnsAuthorization $dns_authorization - * Required. A definition of the dns authorization to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the dns authorization. Must be in the - * format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the dns authorization. Must be in the - * format `projects/*/locations/*`. - * - * 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. A user-provided name of the dns authorization. - * - * Generated from protobuf field string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDnsAuthorizationId() - { - return $this->dns_authorization_id; - } - - /** - * Required. A user-provided name of the dns authorization. - * - * Generated from protobuf field string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDnsAuthorizationId($var) - { - GPBUtil::checkString($var, True); - $this->dns_authorization_id = $var; - - return $this; - } - - /** - * Required. A definition of the dns authorization to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\DnsAuthorization|null - */ - public function getDnsAuthorization() - { - return $this->dns_authorization; - } - - public function hasDnsAuthorization() - { - return isset($this->dns_authorization); - } - - public function clearDnsAuthorization() - { - unset($this->dns_authorization); - } - - /** - * Required. A definition of the dns authorization to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization $var - * @return $this - */ - public function setDnsAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\DnsAuthorization::class); - $this->dns_authorization = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateTrustConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateTrustConfigRequest.php deleted file mode 100644 index 821b07d26099..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/CreateTrustConfigRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.certificatemanager.v1.CreateTrustConfigRequest - */ -class CreateTrustConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the TrustConfig. Must be in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A user-provided name of the TrustConfig. Must match the regexp - * `[a-z0-9-]{1,63}`. - * - * Generated from protobuf field string trust_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trust_config_id = ''; - /** - * Required. A definition of the TrustConfig to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trust_config = null; - - /** - * @param string $parent Required. The parent resource of the TrustConfig. Must be in the format - * `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\CertificateManager\V1\TrustConfig $trustConfig Required. A definition of the TrustConfig to create. - * @param string $trustConfigId Required. A user-provided name of the TrustConfig. Must match the regexp - * `[a-z0-9-]{1,63}`. - * - * @return \Google\Cloud\CertificateManager\V1\CreateTrustConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\CertificateManager\V1\TrustConfig $trustConfig, string $trustConfigId): self - { - return (new self()) - ->setParent($parent) - ->setTrustConfig($trustConfig) - ->setTrustConfigId($trustConfigId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the TrustConfig. Must be in the format - * `projects/*/locations/*`. - * @type string $trust_config_id - * Required. A user-provided name of the TrustConfig. Must match the regexp - * `[a-z0-9-]{1,63}`. - * @type \Google\Cloud\CertificateManager\V1\TrustConfig $trust_config - * Required. A definition of the TrustConfig to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the TrustConfig. Must be in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the TrustConfig. Must be in the format - * `projects/*/locations/*`. - * - * 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. A user-provided name of the TrustConfig. Must match the regexp - * `[a-z0-9-]{1,63}`. - * - * Generated from protobuf field string trust_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTrustConfigId() - { - return $this->trust_config_id; - } - - /** - * Required. A user-provided name of the TrustConfig. Must match the regexp - * `[a-z0-9-]{1,63}`. - * - * Generated from protobuf field string trust_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTrustConfigId($var) - { - GPBUtil::checkString($var, True); - $this->trust_config_id = $var; - - return $this; - } - - /** - * Required. A definition of the TrustConfig to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\TrustConfig|null - */ - public function getTrustConfig() - { - return $this->trust_config; - } - - public function hasTrustConfig() - { - return isset($this->trust_config); - } - - public function clearTrustConfig() - { - unset($this->trust_config); - } - - /** - * Required. A definition of the TrustConfig to create. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\TrustConfig $var - * @return $this - */ - public function setTrustConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\TrustConfig::class); - $this->trust_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateIssuanceConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateIssuanceConfigRequest.php deleted file mode 100644 index b2c6e62341d8..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateIssuanceConfigRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest - */ -class DeleteCertificateIssuanceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the certificate issuance config to delete. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the certificate issuance config to delete. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. Please see - * {@see CertificateManagerClient::certificateIssuanceConfigName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\DeleteCertificateIssuanceConfigRequest - * - * @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. A name of the certificate issuance config to delete. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the certificate issuance config to delete. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - * - * 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. A name of the certificate issuance config to delete. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapEntryRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapEntryRequest.php deleted file mode 100644 index da88e1c8e7bf..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapEntryRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest - */ -class DeleteCertificateMapEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the certificate map entry to delete. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the certificate map entry to delete. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. Please see - * {@see CertificateManagerClient::certificateMapEntryName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\DeleteCertificateMapEntryRequest - * - * @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. A name of the certificate map entry to delete. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the certificate map entry to delete. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * - * 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. A name of the certificate map entry to delete. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapRequest.php deleted file mode 100644 index af8072648b58..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateMapRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.DeleteCertificateMapRequest - */ -class DeleteCertificateMapRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the certificate map to delete. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the certificate map to delete. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. Please see - * {@see CertificateManagerClient::certificateMapName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\DeleteCertificateMapRequest - * - * @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. A name of the certificate map to delete. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the certificate map to delete. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. - * - * 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. A name of the certificate map to delete. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateRequest.php deleted file mode 100644 index a9a7e8cfeed0..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteCertificateRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.DeleteCertificateRequest - */ -class DeleteCertificateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the certificate to delete. Must be in the format - * `projects/*/locations/*/certificates/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the certificate to delete. Must be in the format - * `projects/*/locations/*/certificates/*`. Please see - * {@see CertificateManagerClient::certificateName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\DeleteCertificateRequest - * - * @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. A name of the certificate to delete. Must be in the format - * `projects/*/locations/*/certificates/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the certificate to delete. Must be in the format - * `projects/*/locations/*/certificates/*`. - * - * 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. A name of the certificate to delete. Must be in the format - * `projects/*/locations/*/certificates/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteDnsAuthorizationRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteDnsAuthorizationRequest.php deleted file mode 100644 index 278f4c74e2f0..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteDnsAuthorizationRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest - */ -class DeleteDnsAuthorizationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the dns authorization to delete. Must be in the format - * `projects/*/locations/*/dnsAuthorizations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the dns authorization to delete. Must be in the format - * `projects/*/locations/*/dnsAuthorizations/*`. Please see - * {@see CertificateManagerClient::dnsAuthorizationName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\DeleteDnsAuthorizationRequest - * - * @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. A name of the dns authorization to delete. Must be in the format - * `projects/*/locations/*/dnsAuthorizations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the dns authorization to delete. Must be in the format - * `projects/*/locations/*/dnsAuthorizations/*`. - * - * 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. A name of the dns authorization to delete. Must be in the format - * `projects/*/locations/*/dnsAuthorizations/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteTrustConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteTrustConfigRequest.php deleted file mode 100644 index ac6965adb38c..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DeleteTrustConfigRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.certificatemanager.v1.DeleteTrustConfigRequest - */ -class DeleteTrustConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the TrustConfig to delete. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The current etag of the TrustConfig. - * If an etag is provided and does not match the current etag of the resource, - * deletion will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - - /** - * @param string $name Required. A name of the TrustConfig to delete. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. Please see - * {@see CertificateManagerClient::trustConfigName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\DeleteTrustConfigRequest - * - * @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. A name of the TrustConfig to delete. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. - * @type string $etag - * The current etag of the TrustConfig. - * If an etag is provided and does not match the current etag of the resource, - * deletion will be blocked and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the TrustConfig to delete. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. - * - * 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. A name of the TrustConfig to delete. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The current etag of the TrustConfig. - * If an etag is provided and does not match the current etag of the resource, - * deletion will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the TrustConfig. - * If an etag is provided and does not match the current etag of the resource, - * deletion will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization.php deleted file mode 100644 index 0b8be3dbfa8e..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization.php +++ /dev/null @@ -1,368 +0,0 @@ -google.cloud.certificatemanager.v1.DnsAuthorization - */ -class DnsAuthorization extends \Google\Protobuf\Internal\Message -{ - /** - * A user-defined name of the dns authorization. DnsAuthorization names must - * be unique globally and match pattern - * `projects/*/locations/*/dnsAuthorizations/*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation timestamp of a DnsAuthorization. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of a DnsAuthorization. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Set of labels associated with a DnsAuthorization. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * One or more paragraphs of text description of a DnsAuthorization. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Required. Immutable. A domain that is being authorized. A DnsAuthorization - * resource covers a single domain and its wildcard, e.g. authorization for - * `example.com` can be used to issue certificates for `example.com` and - * `*.example.com`. - * - * Generated from protobuf field string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $domain = ''; - /** - * Output only. DNS Resource Record that needs to be added to DNS - * configuration. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dns_resource_record = null; - /** - * Immutable. Type of DnsAuthorization. If unset during resource creation the - * following default will be used: - * - in location global: FIXED_RECORD. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-defined name of the dns authorization. DnsAuthorization names must - * be unique globally and match pattern - * `projects/*/locations/*/dnsAuthorizations/*`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of a DnsAuthorization. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of a DnsAuthorization. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of labels associated with a DnsAuthorization. - * @type string $description - * One or more paragraphs of text description of a DnsAuthorization. - * @type string $domain - * Required. Immutable. A domain that is being authorized. A DnsAuthorization - * resource covers a single domain and its wildcard, e.g. authorization for - * `example.com` can be used to issue certificates for `example.com` and - * `*.example.com`. - * @type \Google\Cloud\CertificateManager\V1\DnsAuthorization\DnsResourceRecord $dns_resource_record - * Output only. DNS Resource Record that needs to be added to DNS - * configuration. - * @type int $type - * Immutable. Type of DnsAuthorization. If unset during resource creation the - * following default will be used: - * - in location global: FIXED_RECORD. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * A user-defined name of the dns authorization. DnsAuthorization names must - * be unique globally and match pattern - * `projects/*/locations/*/dnsAuthorizations/*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-defined name of the dns authorization. DnsAuthorization names must - * be unique globally and match pattern - * `projects/*/locations/*/dnsAuthorizations/*`. - * - * 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; - } - - /** - * Output only. The creation timestamp of a DnsAuthorization. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a DnsAuthorization. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 last update timestamp of a DnsAuthorization. - * - * 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. The last update timestamp of a DnsAuthorization. - * - * 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; - } - - /** - * Set of labels associated with a DnsAuthorization. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of labels associated with a DnsAuthorization. - * - * Generated from protobuf field map labels = 4; - * @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; - } - - /** - * One or more paragraphs of text description of a DnsAuthorization. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * One or more paragraphs of text description of a DnsAuthorization. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Immutable. A domain that is being authorized. A DnsAuthorization - * resource covers a single domain and its wildcard, e.g. authorization for - * `example.com` can be used to issue certificates for `example.com` and - * `*.example.com`. - * - * Generated from protobuf field string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Required. Immutable. A domain that is being authorized. A DnsAuthorization - * resource covers a single domain and its wildcard, e.g. authorization for - * `example.com` can be used to issue certificates for `example.com` and - * `*.example.com`. - * - * Generated from protobuf field string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkString($var, True); - $this->domain = $var; - - return $this; - } - - /** - * Output only. DNS Resource Record that needs to be added to DNS - * configuration. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\CertificateManager\V1\DnsAuthorization\DnsResourceRecord|null - */ - public function getDnsResourceRecord() - { - return $this->dns_resource_record; - } - - public function hasDnsResourceRecord() - { - return isset($this->dns_resource_record); - } - - public function clearDnsResourceRecord() - { - unset($this->dns_resource_record); - } - - /** - * Output only. DNS Resource Record that needs to be added to DNS - * configuration. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization\DnsResourceRecord $var - * @return $this - */ - public function setDnsResourceRecord($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\DnsAuthorization\DnsResourceRecord::class); - $this->dns_resource_record = $var; - - return $this; - } - - /** - * Immutable. Type of DnsAuthorization. If unset during resource creation the - * following default will be used: - * - in location global: FIXED_RECORD. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Immutable. Type of DnsAuthorization. If unset during resource creation the - * following default will be used: - * - in location global: FIXED_RECORD. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\CertificateManager\V1\DnsAuthorization\Type::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/DnsResourceRecord.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/DnsResourceRecord.php deleted file mode 100644 index 285655ab9ae8..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/DnsResourceRecord.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord - */ -class DnsResourceRecord extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Fully qualified name of the DNS Resource Record. - * e.g. `_acme-challenge.example.com` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Type of the DNS Resource Record. - * Currently always set to "CNAME". - * - * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = ''; - /** - * Output only. Data of the DNS Resource Record. - * - * Generated from protobuf field string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Fully qualified name of the DNS Resource Record. - * e.g. `_acme-challenge.example.com` - * @type string $type - * Output only. Type of the DNS Resource Record. - * Currently always set to "CNAME". - * @type string $data - * Output only. Data of the DNS Resource Record. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Fully qualified name of the DNS Resource Record. - * e.g. `_acme-challenge.example.com` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Fully qualified name of the DNS Resource Record. - * e.g. `_acme-challenge.example.com` - * - * 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. Type of the DNS Resource Record. - * Currently always set to "CNAME". - * - * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. Type of the DNS Resource Record. - * Currently always set to "CNAME". - * - * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Output only. Data of the DNS Resource Record. - * - * Generated from protobuf field string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Output only. Data of the DNS Resource Record. - * - * Generated from protobuf field string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, True); - $this->data = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DnsResourceRecord::class, \Google\Cloud\CertificateManager\V1\DnsAuthorization_DnsResourceRecord::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/Type.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/Type.php deleted file mode 100644 index 94be08ae1970..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/DnsAuthorization/Type.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.certificatemanager.v1.DnsAuthorization.Type - */ -class Type -{ - /** - * Type is unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * FIXED_RECORD DNS authorization uses DNS-01 validation method. - * - * Generated from protobuf enum FIXED_RECORD = 1; - */ - const FIXED_RECORD = 1; - /** - * PER_PROJECT_RECORD DNS authorization allows for independent management - * of Google-managed certificates with DNS authorization across multiple - * projects. - * - * Generated from protobuf enum PER_PROJECT_RECORD = 2; - */ - const PER_PROJECT_RECORD = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::FIXED_RECORD => 'FIXED_RECORD', - self::PER_PROJECT_RECORD => 'PER_PROJECT_RECORD', - ]; - - 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\CertificateManager\V1\DnsAuthorization_Type::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateIssuanceConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateIssuanceConfigRequest.php deleted file mode 100644 index 80b51ae92c5f..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateIssuanceConfigRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest - */ -class GetCertificateIssuanceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the certificate issuance config to describe. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the certificate issuance config to describe. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. Please see - * {@see CertificateManagerClient::certificateIssuanceConfigName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\GetCertificateIssuanceConfigRequest - * - * @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. A name of the certificate issuance config to describe. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the certificate issuance config to describe. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - * - * 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. A name of the certificate issuance config to describe. Must be in - * the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapEntryRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapEntryRequest.php deleted file mode 100644 index 8b44fefcef84..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapEntryRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest - */ -class GetCertificateMapEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the certificate map entry to describe. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the certificate map entry to describe. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. Please see - * {@see CertificateManagerClient::certificateMapEntryName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\GetCertificateMapEntryRequest - * - * @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. A name of the certificate map entry to describe. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the certificate map entry to describe. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * - * 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. A name of the certificate map entry to describe. Must be in the - * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapRequest.php deleted file mode 100644 index e71586d22dad..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateMapRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.GetCertificateMapRequest - */ -class GetCertificateMapRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the certificate map to describe. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the certificate map to describe. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. Please see - * {@see CertificateManagerClient::certificateMapName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\GetCertificateMapRequest - * - * @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. A name of the certificate map to describe. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the certificate map to describe. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. - * - * 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. A name of the certificate map to describe. Must be in the format - * `projects/*/locations/*/certificateMaps/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateRequest.php deleted file mode 100644 index f7653fe02230..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetCertificateRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.GetCertificateRequest - */ -class GetCertificateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the certificate to describe. Must be in the format - * `projects/*/locations/*/certificates/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the certificate to describe. Must be in the format - * `projects/*/locations/*/certificates/*`. Please see - * {@see CertificateManagerClient::certificateName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\GetCertificateRequest - * - * @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. A name of the certificate to describe. Must be in the format - * `projects/*/locations/*/certificates/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the certificate to describe. Must be in the format - * `projects/*/locations/*/certificates/*`. - * - * 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. A name of the certificate to describe. Must be in the format - * `projects/*/locations/*/certificates/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetDnsAuthorizationRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetDnsAuthorizationRequest.php deleted file mode 100644 index 31910ab7b79c..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetDnsAuthorizationRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest - */ -class GetDnsAuthorizationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the dns authorization to describe. Must be in the - * format `projects/*/locations/*/dnsAuthorizations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the dns authorization to describe. Must be in the - * format `projects/*/locations/*/dnsAuthorizations/*`. Please see - * {@see CertificateManagerClient::dnsAuthorizationName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\GetDnsAuthorizationRequest - * - * @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. A name of the dns authorization to describe. Must be in the - * format `projects/*/locations/*/dnsAuthorizations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the dns authorization to describe. Must be in the - * format `projects/*/locations/*/dnsAuthorizations/*`. - * - * 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. A name of the dns authorization to describe. Must be in the - * format `projects/*/locations/*/dnsAuthorizations/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetTrustConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetTrustConfigRequest.php deleted file mode 100644 index d5c38e8cab6b..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/GetTrustConfigRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.certificatemanager.v1.GetTrustConfigRequest - */ -class GetTrustConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the TrustConfig to describe. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the TrustConfig to describe. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. Please see - * {@see CertificateManagerClient::trustConfigName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\GetTrustConfigRequest - * - * @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. A name of the TrustConfig to describe. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the TrustConfig to describe. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. - * - * 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. A name of the TrustConfig to describe. Must be in the format - * `projects/*/locations/*/trustConfigs/*`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsRequest.php deleted file mode 100644 index 7a6d6405799e..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest - */ -class ListCertificateIssuanceConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of certificate configs to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListCertificateIssuanceConfigsResponse`. - * Indicates that this is a continuation of a prior - * `ListCertificateIssuanceConfigs` call, and that the system should return - * the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter expression to restrict the Certificates Configs returned. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * A list of Certificate Config field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\ListCertificateIssuanceConfigsRequest - * - * @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 project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. - * @type int $page_size - * Maximum number of certificate configs to return per call. - * @type string $page_token - * The value returned by the last `ListCertificateIssuanceConfigsResponse`. - * Indicates that this is a continuation of a prior - * `ListCertificateIssuanceConfigs` call, and that the system should return - * the next page of data. - * @type string $filter - * Filter expression to restrict the Certificates Configs returned. - * @type string $order_by - * A list of Certificate Config field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. - * - * 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 project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. - * - * 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; - } - - /** - * Maximum number of certificate configs to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of certificate configs to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListCertificateIssuanceConfigsResponse`. - * Indicates that this is a continuation of a prior - * `ListCertificateIssuanceConfigs` call, and that the system should return - * the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListCertificateIssuanceConfigsResponse`. - * Indicates that this is a continuation of a prior - * `ListCertificateIssuanceConfigs` call, and that the system should return - * the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter expression to restrict the Certificates Configs returned. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter expression to restrict the Certificates Configs returned. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A list of Certificate Config field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * A list of Certificate Config field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsResponse.php deleted file mode 100644 index 8dfe8101b161..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateIssuanceConfigsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse - */ -class ListCertificateIssuanceConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of certificate configs for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_configs = 1; - */ - private $certificate_issuance_configs; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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\CertificateManager\V1\CertificateIssuanceConfig>|\Google\Protobuf\Internal\RepeatedField $certificate_issuance_configs - * A list of certificate configs for the parent resource. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of certificate configs for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCertificateIssuanceConfigs() - { - return $this->certificate_issuance_configs; - } - - /** - * A list of certificate configs for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateIssuanceConfig certificate_issuance_configs = 1; - * @param array<\Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCertificateIssuanceConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig::class); - $this->certificate_issuance_configs = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesRequest.php deleted file mode 100644 index cb5af48aa95f..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesRequest.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest - */ -class ListCertificateMapEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project, location and certificate map from which the - * certificate map entries should be listed, specified in the format - * `projects/*/locations/*/certificateMaps/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of certificate map entries to return. The service may return - * fewer than this value. - * If unspecified, at most 50 certificate map entries will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListCertificateMapEntriesResponse`. - * Indicates that this is a continuation of a prior - * `ListCertificateMapEntries` call, and that the system should return the - * next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter expression to restrict the returned Certificate Map Entries. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * A list of Certificate Map Entry field names used to specify - * the order of the returned results. The default sorting order is ascending. - * To specify descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project, location and certificate map from which the - * certificate map entries should be listed, specified in the format - * `projects/*/locations/*/certificateMaps/*`. Please see - * {@see CertificateManagerClient::certificateMapName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\ListCertificateMapEntriesRequest - * - * @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 project, location and certificate map from which the - * certificate map entries should be listed, specified in the format - * `projects/*/locations/*/certificateMaps/*`. - * @type int $page_size - * Maximum number of certificate map entries to return. The service may return - * fewer than this value. - * If unspecified, at most 50 certificate map entries will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * The value returned by the last `ListCertificateMapEntriesResponse`. - * Indicates that this is a continuation of a prior - * `ListCertificateMapEntries` call, and that the system should return the - * next page of data. - * @type string $filter - * Filter expression to restrict the returned Certificate Map Entries. - * @type string $order_by - * A list of Certificate Map Entry field names used to specify - * the order of the returned results. The default sorting order is ascending. - * To specify descending order for a field, add a suffix `" desc"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project, location and certificate map from which the - * certificate map entries should be listed, specified in the format - * `projects/*/locations/*/certificateMaps/*`. - * - * 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 project, location and certificate map from which the - * certificate map entries should be listed, specified in the format - * `projects/*/locations/*/certificateMaps/*`. - * - * 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; - } - - /** - * Maximum number of certificate map entries to return. The service may return - * fewer than this value. - * If unspecified, at most 50 certificate map entries will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of certificate map entries to return. The service may return - * fewer than this value. - * If unspecified, at most 50 certificate map entries will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListCertificateMapEntriesResponse`. - * Indicates that this is a continuation of a prior - * `ListCertificateMapEntries` call, and that the system should return the - * next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListCertificateMapEntriesResponse`. - * Indicates that this is a continuation of a prior - * `ListCertificateMapEntries` call, and that the system should return the - * next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter expression to restrict the returned Certificate Map Entries. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter expression to restrict the returned Certificate Map Entries. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A list of Certificate Map Entry field names used to specify - * the order of the returned results. The default sorting order is ascending. - * To specify descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * A list of Certificate Map Entry field names used to specify - * the order of the returned results. The default sorting order is ascending. - * To specify descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesResponse.php deleted file mode 100644 index 35b8335bce6a..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapEntriesResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse - */ -class ListCertificateMapEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of certificate map entries for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; - */ - private $certificate_map_entries; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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\CertificateManager\V1\CertificateMapEntry>|\Google\Protobuf\Internal\RepeatedField $certificate_map_entries - * A list of certificate map entries for the parent resource. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * A list of certificate map entries for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCertificateMapEntries() - { - return $this->certificate_map_entries; - } - - /** - * A list of certificate map entries for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; - * @param array<\Google\Cloud\CertificateManager\V1\CertificateMapEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCertificateMapEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateMapEntry::class); - $this->certificate_map_entries = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsRequest.php deleted file mode 100644 index 57e5279d0399..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.certificatemanager.v1.ListCertificateMapsRequest - */ -class ListCertificateMapsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the certificate maps should - * be listed, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of certificate maps to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListCertificateMapsResponse`. Indicates - * that this is a continuation of a prior `ListCertificateMaps` call, and that - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter expression to restrict the Certificates Maps returned. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * A list of Certificate Map field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location from which the certificate maps should - * be listed, specified in the format `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\ListCertificateMapsRequest - * - * @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 project and location from which the certificate maps should - * be listed, specified in the format `projects/*/locations/*`. - * @type int $page_size - * Maximum number of certificate maps to return per call. - * @type string $page_token - * The value returned by the last `ListCertificateMapsResponse`. Indicates - * that this is a continuation of a prior `ListCertificateMaps` call, and that - * the system should return the next page of data. - * @type string $filter - * Filter expression to restrict the Certificates Maps returned. - * @type string $order_by - * A list of Certificate Map field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the certificate maps should - * be listed, specified in the format `projects/*/locations/*`. - * - * 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 project and location from which the certificate maps should - * be listed, specified in the format `projects/*/locations/*`. - * - * 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; - } - - /** - * Maximum number of certificate maps to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of certificate maps to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListCertificateMapsResponse`. Indicates - * that this is a continuation of a prior `ListCertificateMaps` call, and that - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListCertificateMapsResponse`. Indicates - * that this is a continuation of a prior `ListCertificateMaps` call, and that - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter expression to restrict the Certificates Maps returned. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter expression to restrict the Certificates Maps returned. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A list of Certificate Map field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * A list of Certificate Map field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsResponse.php deleted file mode 100644 index 7d953e5e8fe3..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificateMapsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.certificatemanager.v1.ListCertificateMapsResponse - */ -class ListCertificateMapsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of certificate maps for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; - */ - private $certificate_maps; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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\CertificateManager\V1\CertificateMap>|\Google\Protobuf\Internal\RepeatedField $certificate_maps - * A list of certificate maps for the parent resource. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * A list of certificate maps for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCertificateMaps() - { - return $this->certificate_maps; - } - - /** - * A list of certificate maps for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; - * @param array<\Google\Cloud\CertificateManager\V1\CertificateMap>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCertificateMaps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateMap::class); - $this->certificate_maps = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesRequest.php deleted file mode 100644 index b3961d49e241..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.certificatemanager.v1.ListCertificatesRequest - */ -class ListCertificatesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of certificates to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListCertificatesResponse`. Indicates that - * this is a continuation of a prior `ListCertificates` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter expression to restrict the Certificates returned. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * A list of Certificate field names used to specify the order of the returned - * results. The default sorting order is ascending. To specify descending - * order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\ListCertificatesRequest - * - * @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 project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. - * @type int $page_size - * Maximum number of certificates to return per call. - * @type string $page_token - * The value returned by the last `ListCertificatesResponse`. Indicates that - * this is a continuation of a prior `ListCertificates` call, and that the - * system should return the next page of data. - * @type string $filter - * Filter expression to restrict the Certificates returned. - * @type string $order_by - * A list of Certificate field names used to specify the order of the returned - * results. The default sorting order is ascending. To specify descending - * order for a field, add a suffix `" desc"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. - * - * 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 project and location from which the certificate should be - * listed, specified in the format `projects/*/locations/*`. - * - * 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; - } - - /** - * Maximum number of certificates to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of certificates to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListCertificatesResponse`. Indicates that - * this is a continuation of a prior `ListCertificates` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListCertificatesResponse`. Indicates that - * this is a continuation of a prior `ListCertificates` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter expression to restrict the Certificates returned. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter expression to restrict the Certificates returned. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A list of Certificate field names used to specify the order of the returned - * results. The default sorting order is ascending. To specify descending - * order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * A list of Certificate field names used to specify the order of the returned - * results. The default sorting order is ascending. To specify descending - * order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesResponse.php deleted file mode 100644 index c3a2b6c79ee3..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListCertificatesResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.certificatemanager.v1.ListCertificatesResponse - */ -class ListCertificatesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of certificates for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; - */ - private $certificates; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * A list of 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\CertificateManager\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $certificates - * A list of certificates for the parent resource. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * A list of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * A list of certificates for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCertificates() - { - return $this->certificates; - } - - /** - * A list of certificates for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; - * @param array<\Google\Cloud\CertificateManager\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCertificates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\Certificate::class); - $this->certificates = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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; - } - - /** - * A list of 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; - } - - /** - * A list of 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsRequest.php deleted file mode 100644 index d7f7c2a9dfdc..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest - */ -class ListDnsAuthorizationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the dns authorizations should - * be listed, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of dns authorizations to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates - * that this is a continuation of a prior `ListDnsAuthorizations` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter expression to restrict the Dns Authorizations returned. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * A list of Dns Authorization field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location from which the dns authorizations should - * be listed, specified in the format `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\ListDnsAuthorizationsRequest - * - * @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 project and location from which the dns authorizations should - * be listed, specified in the format `projects/*/locations/*`. - * @type int $page_size - * Maximum number of dns authorizations to return per call. - * @type string $page_token - * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates - * that this is a continuation of a prior `ListDnsAuthorizations` call, and - * that the system should return the next page of data. - * @type string $filter - * Filter expression to restrict the Dns Authorizations returned. - * @type string $order_by - * A list of Dns Authorization field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the dns authorizations should - * be listed, specified in the format `projects/*/locations/*`. - * - * 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 project and location from which the dns authorizations should - * be listed, specified in the format `projects/*/locations/*`. - * - * 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; - } - - /** - * Maximum number of dns authorizations to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of dns authorizations to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates - * that this is a continuation of a prior `ListDnsAuthorizations` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates - * that this is a continuation of a prior `ListDnsAuthorizations` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter expression to restrict the Dns Authorizations returned. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter expression to restrict the Dns Authorizations returned. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A list of Dns Authorization field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * A list of Dns Authorization field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsResponse.php deleted file mode 100644 index ebe8652bff26..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListDnsAuthorizationsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse - */ -class ListDnsAuthorizationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of dns authorizations for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; - */ - private $dns_authorizations; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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\CertificateManager\V1\DnsAuthorization>|\Google\Protobuf\Internal\RepeatedField $dns_authorizations - * A list of dns authorizations for the parent resource. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * A list of dns authorizations for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDnsAuthorizations() - { - return $this->dns_authorizations; - } - - /** - * A list of dns authorizations for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; - * @param array<\Google\Cloud\CertificateManager\V1\DnsAuthorization>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDnsAuthorizations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\DnsAuthorization::class); - $this->dns_authorizations = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsRequest.php deleted file mode 100644 index 4b021251d28e..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.certificatemanager.v1.ListTrustConfigsRequest - */ -class ListTrustConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the TrustConfigs should be - * listed, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of TrustConfigs to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListTrustConfigsResponse`. Indicates - * that this is a continuation of a prior `ListTrustConfigs` call, and that - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter expression to restrict the TrustConfigs returned. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * A list of TrustConfig field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location from which the TrustConfigs should be - * listed, specified in the format `projects/*/locations/*`. Please see - * {@see CertificateManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\CertificateManager\V1\ListTrustConfigsRequest - * - * @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 project and location from which the TrustConfigs should be - * listed, specified in the format `projects/*/locations/*`. - * @type int $page_size - * Maximum number of TrustConfigs to return per call. - * @type string $page_token - * The value returned by the last `ListTrustConfigsResponse`. Indicates - * that this is a continuation of a prior `ListTrustConfigs` call, and that - * the system should return the next page of data. - * @type string $filter - * Filter expression to restrict the TrustConfigs returned. - * @type string $order_by - * A list of TrustConfig field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the TrustConfigs should be - * listed, specified in the format `projects/*/locations/*`. - * - * 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 project and location from which the TrustConfigs should be - * listed, specified in the format `projects/*/locations/*`. - * - * 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; - } - - /** - * Maximum number of TrustConfigs to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of TrustConfigs to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListTrustConfigsResponse`. Indicates - * that this is a continuation of a prior `ListTrustConfigs` call, and that - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListTrustConfigsResponse`. Indicates - * that this is a continuation of a prior `ListTrustConfigs` call, and that - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter expression to restrict the TrustConfigs returned. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter expression to restrict the TrustConfigs returned. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A list of TrustConfig field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * A list of TrustConfig field names used to specify the order of the - * returned results. The default sorting order is ascending. To specify - * descending order for a field, add a suffix `" desc"`. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsResponse.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsResponse.php deleted file mode 100644 index 74a445f8c490..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ListTrustConfigsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.certificatemanager.v1.ListTrustConfigsResponse - */ -class ListTrustConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of TrustConfigs for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig trust_configs = 1; - */ - private $trust_configs; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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\CertificateManager\V1\TrustConfig>|\Google\Protobuf\Internal\RepeatedField $trust_configs - * A list of TrustConfigs for the parent resource. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of TrustConfigs for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig trust_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrustConfigs() - { - return $this->trust_configs; - } - - /** - * A list of TrustConfigs for the parent resource. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig trust_configs = 1; - * @param array<\Google\Cloud\CertificateManager\V1\TrustConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrustConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\TrustConfig::class); - $this->trust_configs = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * 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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/OperationMetadata.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/OperationMetadata.php deleted file mode 100644 index 29a4297349a4..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.certificatemanager.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5; - */ - protected $status_message = ''; - /** - * 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; - */ - protected $requested_cancellation = false; - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Server-defined resource path for the target of the operation. - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_message - * Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * 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 - * API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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 the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * 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; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * 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; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - * @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/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ServingState.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ServingState.php deleted file mode 100644 index 93a9c1284a76..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/ServingState.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.certificatemanager.v1.ServingState - */ -class ServingState -{ - /** - * The status is undefined. - * - * Generated from protobuf enum SERVING_STATE_UNSPECIFIED = 0; - */ - const SERVING_STATE_UNSPECIFIED = 0; - /** - * The configuration is serving. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Update is in progress. Some frontends may serve this configuration. - * - * Generated from protobuf enum PENDING = 2; - */ - const PENDING = 2; - - private static $valueToName = [ - self::SERVING_STATE_UNSPECIFIED => 'SERVING_STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - 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); - } -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig.php deleted file mode 100644 index 1c6979319c90..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig.php +++ /dev/null @@ -1,319 +0,0 @@ -google.cloud.certificatemanager.v1.TrustConfig - */ -class TrustConfig extends \Google\Protobuf\Internal\Message -{ - /** - * A user-defined name of the trust config. TrustConfig names must be - * unique globally and match pattern - * `projects/*/locations/*/trustConfigs/*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation timestamp of a TrustConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of a TrustConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Set of labels associated with a TrustConfig. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * One or more paragraphs of text description of a TrustConfig. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * 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 = 6; - */ - protected $etag = ''; - /** - * Set of trust stores to perform validation against. - * This field is supported when TrustConfig is configured with Load Balancers, - * currently not supported for SPIFFE certificate validation. - * Only one TrustStore specified is currently allowed. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustStore trust_stores = 8; - */ - private $trust_stores; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-defined name of the trust config. TrustConfig names must be - * unique globally and match pattern - * `projects/*/locations/*/trustConfigs/*`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of a TrustConfig. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of a TrustConfig. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of labels associated with a TrustConfig. - * @type string $description - * One or more paragraphs of text description of a TrustConfig. - * @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 array<\Google\Cloud\CertificateManager\V1\TrustConfig\TrustStore>|\Google\Protobuf\Internal\RepeatedField $trust_stores - * Set of trust stores to perform validation against. - * This field is supported when TrustConfig is configured with Load Balancers, - * currently not supported for SPIFFE certificate validation. - * Only one TrustStore specified is currently allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * A user-defined name of the trust config. TrustConfig names must be - * unique globally and match pattern - * `projects/*/locations/*/trustConfigs/*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-defined name of the trust config. TrustConfig names must be - * unique globally and match pattern - * `projects/*/locations/*/trustConfigs/*`. - * - * 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; - } - - /** - * Output only. The creation timestamp of a TrustConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 creation timestamp of a TrustConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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 last update timestamp of a TrustConfig. - * - * 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. The last update timestamp of a TrustConfig. - * - * 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; - } - - /** - * Set of labels associated with a TrustConfig. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of labels associated with a TrustConfig. - * - * Generated from protobuf field map labels = 4; - * @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; - } - - /** - * One or more paragraphs of text description of a TrustConfig. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * One or more paragraphs of text description of a TrustConfig. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $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 = 6; - * @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 = 6; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Set of trust stores to perform validation against. - * This field is supported when TrustConfig is configured with Load Balancers, - * currently not supported for SPIFFE certificate validation. - * Only one TrustStore specified is currently allowed. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustStore trust_stores = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrustStores() - { - return $this->trust_stores; - } - - /** - * Set of trust stores to perform validation against. - * This field is supported when TrustConfig is configured with Load Balancers, - * currently not supported for SPIFFE certificate validation. - * Only one TrustStore specified is currently allowed. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustStore trust_stores = 8; - * @param array<\Google\Cloud\CertificateManager\V1\TrustConfig\TrustStore>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrustStores($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\TrustConfig\TrustStore::class); - $this->trust_stores = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/IntermediateCA.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/IntermediateCA.php deleted file mode 100644 index 3632b6bdf690..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/IntermediateCA.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA - */ -class IntermediateCA extends \Google\Protobuf\Internal\Message -{ - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pem_certificate - * PEM intermediate certificate used for building up paths - * for validation. - * Each certificate provided in PEM format may occupy up to 5kB. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * PEM intermediate certificate used for building up paths - * for validation. - * Each certificate provided in PEM format may occupy up to 5kB. - * - * Generated from protobuf field string pem_certificate = 1; - * @return string - */ - public function getPemCertificate() - { - return $this->readOneof(1); - } - - public function hasPemCertificate() - { - return $this->hasOneof(1); - } - - /** - * PEM intermediate certificate used for building up paths - * for validation. - * Each certificate provided in PEM format may occupy up to 5kB. - * - * Generated from protobuf field string pem_certificate = 1; - * @param string $var - * @return $this - */ - public function setPemCertificate($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IntermediateCA::class, \Google\Cloud\CertificateManager\V1\TrustConfig_IntermediateCA::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustAnchor.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustAnchor.php deleted file mode 100644 index 9301931143e1..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustAnchor.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor - */ -class TrustAnchor extends \Google\Protobuf\Internal\Message -{ - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pem_certificate - * PEM root certificate of the PKI used for validation. - * Each certificate provided in PEM format may occupy up to 5kB. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * PEM root certificate of the PKI used for validation. - * Each certificate provided in PEM format may occupy up to 5kB. - * - * Generated from protobuf field string pem_certificate = 1; - * @return string - */ - public function getPemCertificate() - { - return $this->readOneof(1); - } - - public function hasPemCertificate() - { - return $this->hasOneof(1); - } - - /** - * PEM root certificate of the PKI used for validation. - * Each certificate provided in PEM format may occupy up to 5kB. - * - * Generated from protobuf field string pem_certificate = 1; - * @param string $var - * @return $this - */ - public function setPemCertificate($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TrustAnchor::class, \Google\Cloud\CertificateManager\V1\TrustConfig_TrustAnchor::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustStore.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustStore.php deleted file mode 100644 index d5c8c000c6ae..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/TrustConfig/TrustStore.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.certificatemanager.v1.TrustConfig.TrustStore - */ -class TrustStore extends \Google\Protobuf\Internal\Message -{ - /** - * List of Trust Anchors to be used while performing validation - * against a given TrustStore. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor trust_anchors = 1; - */ - private $trust_anchors; - /** - * Set of intermediate CA certificates used for the path building - * phase of chain validation. - * The field is currently not supported if TrustConfig is used for the - * workload certificate feature. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA intermediate_cas = 2; - */ - private $intermediate_cas; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\CertificateManager\V1\TrustConfig\TrustAnchor>|\Google\Protobuf\Internal\RepeatedField $trust_anchors - * List of Trust Anchors to be used while performing validation - * against a given TrustStore. - * @type array<\Google\Cloud\CertificateManager\V1\TrustConfig\IntermediateCA>|\Google\Protobuf\Internal\RepeatedField $intermediate_cas - * Set of intermediate CA certificates used for the path building - * phase of chain validation. - * The field is currently not supported if TrustConfig is used for the - * workload certificate feature. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * List of Trust Anchors to be used while performing validation - * against a given TrustStore. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor trust_anchors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrustAnchors() - { - return $this->trust_anchors; - } - - /** - * List of Trust Anchors to be used while performing validation - * against a given TrustStore. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor trust_anchors = 1; - * @param array<\Google\Cloud\CertificateManager\V1\TrustConfig\TrustAnchor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrustAnchors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\TrustConfig\TrustAnchor::class); - $this->trust_anchors = $arr; - - return $this; - } - - /** - * Set of intermediate CA certificates used for the path building - * phase of chain validation. - * The field is currently not supported if TrustConfig is used for the - * workload certificate feature. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA intermediate_cas = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntermediateCas() - { - return $this->intermediate_cas; - } - - /** - * Set of intermediate CA certificates used for the path building - * phase of chain validation. - * The field is currently not supported if TrustConfig is used for the - * workload certificate feature. - * - * Generated from protobuf field repeated .google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA intermediate_cas = 2; - * @param array<\Google\Cloud\CertificateManager\V1\TrustConfig\IntermediateCA>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntermediateCas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\TrustConfig\IntermediateCA::class); - $this->intermediate_cas = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TrustStore::class, \Google\Cloud\CertificateManager\V1\TrustConfig_TrustStore::class); - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapEntryRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapEntryRequest.php deleted file mode 100644 index 913b850a98cd..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapEntryRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest - */ -class UpdateCertificateMapEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A definition of the certificate map entry to create map entry. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_map_entry = null; - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificateMapEntry Required. A definition of the certificate map entry to create map entry. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * @return \Google\Cloud\CertificateManager\V1\UpdateCertificateMapEntryRequest - * - * @experimental - */ - public static function build(\Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificateMapEntry, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCertificateMapEntry($certificateMapEntry) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\CertificateManager\V1\CertificateMapEntry $certificate_map_entry - * Required. A definition of the certificate map entry to create map entry. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A definition of the certificate map entry to create map entry. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\CertificateMapEntry|null - */ - public function getCertificateMapEntry() - { - return $this->certificate_map_entry; - } - - public function hasCertificateMapEntry() - { - return isset($this->certificate_map_entry); - } - - public function clearCertificateMapEntry() - { - unset($this->certificate_map_entry); - } - - /** - * Required. A definition of the certificate map entry to create map entry. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\CertificateMapEntry $var - * @return $this - */ - public function setCertificateMapEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateMapEntry::class); - $this->certificate_map_entry = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapRequest.php deleted file mode 100644 index 40f59853d238..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateMapRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.certificatemanager.v1.UpdateCertificateMapRequest - */ -class UpdateCertificateMapRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A definition of the certificate map to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate_map = null; - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap Required. A definition of the certificate map to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * @return \Google\Cloud\CertificateManager\V1\UpdateCertificateMapRequest - * - * @experimental - */ - public static function build(\Google\Cloud\CertificateManager\V1\CertificateMap $certificateMap, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCertificateMap($certificateMap) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\CertificateManager\V1\CertificateMap $certificate_map - * Required. A definition of the certificate map to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A definition of the certificate map to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\CertificateMap|null - */ - public function getCertificateMap() - { - return $this->certificate_map; - } - - public function hasCertificateMap() - { - return isset($this->certificate_map); - } - - public function clearCertificateMap() - { - unset($this->certificate_map); - } - - /** - * Required. A definition of the certificate map to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\CertificateMap $var - * @return $this - */ - public function setCertificateMap($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateMap::class); - $this->certificate_map = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateRequest.php deleted file mode 100644 index e83292dc17f9..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateCertificateRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.certificatemanager.v1.UpdateCertificateRequest - */ -class UpdateCertificateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A definition of the certificate to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $certificate = null; - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\CertificateManager\V1\Certificate $certificate Required. A definition of the certificate to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * @return \Google\Cloud\CertificateManager\V1\UpdateCertificateRequest - * - * @experimental - */ - public static function build(\Google\Cloud\CertificateManager\V1\Certificate $certificate, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCertificate($certificate) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\CertificateManager\V1\Certificate $certificate - * Required. A definition of the certificate to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A definition of the certificate to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\Certificate|null - */ - public function getCertificate() - { - return $this->certificate; - } - - public function hasCertificate() - { - return isset($this->certificate); - } - - public function clearCertificate() - { - unset($this->certificate); - } - - /** - * Required. A definition of the certificate to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\Certificate $var - * @return $this - */ - public function setCertificate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\Certificate::class); - $this->certificate = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateDnsAuthorizationRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateDnsAuthorizationRequest.php deleted file mode 100644 index 52ae22852837..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateDnsAuthorizationRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest - */ -class UpdateDnsAuthorizationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A definition of the dns authorization to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dns_authorization = null; - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization $dnsAuthorization Required. A definition of the dns authorization to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * @return \Google\Cloud\CertificateManager\V1\UpdateDnsAuthorizationRequest - * - * @experimental - */ - public static function build(\Google\Cloud\CertificateManager\V1\DnsAuthorization $dnsAuthorization, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDnsAuthorization($dnsAuthorization) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\CertificateManager\V1\DnsAuthorization $dns_authorization - * Required. A definition of the dns authorization to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. A definition of the dns authorization to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\DnsAuthorization|null - */ - public function getDnsAuthorization() - { - return $this->dns_authorization; - } - - public function hasDnsAuthorization() - { - return isset($this->dns_authorization); - } - - public function clearDnsAuthorization() - { - unset($this->dns_authorization); - } - - /** - * Required. A definition of the dns authorization to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\DnsAuthorization $var - * @return $this - */ - public function setDnsAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\DnsAuthorization::class); - $this->dns_authorization = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateTrustConfigRequest.php b/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateTrustConfigRequest.php deleted file mode 100644 index d4f6811c0ec2..000000000000 --- a/owl-bot-staging/CertificateManager/v1/proto/src/Google/Cloud/CertificateManager/V1/UpdateTrustConfigRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.certificatemanager.v1.UpdateTrustConfigRequest - */ -class UpdateTrustConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A definition of the TrustConfig to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trust_config = null; - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\CertificateManager\V1\TrustConfig $trustConfig Required. A definition of the TrustConfig to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * @return \Google\Cloud\CertificateManager\V1\UpdateTrustConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\CertificateManager\V1\TrustConfig $trustConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTrustConfig($trustConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\CertificateManager\V1\TrustConfig $trust_config - * Required. A definition of the TrustConfig to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Certificatemanager\V1\TrustConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. A definition of the TrustConfig to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\CertificateManager\V1\TrustConfig|null - */ - public function getTrustConfig() - { - return $this->trust_config; - } - - public function hasTrustConfig() - { - return isset($this->trust_config); - } - - public function clearTrustConfig() - { - unset($this->trust_config); - } - - /** - * Required. A definition of the TrustConfig to update. - * - * Generated from protobuf field .google.cloud.certificatemanager.v1.TrustConfig trust_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\CertificateManager\V1\TrustConfig $var - * @return $this - */ - public function setTrustConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\TrustConfig::class); - $this->trust_config = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate.php deleted file mode 100644 index b7b0c10ba8e6..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent) - ->setCertificateId($certificateId) - ->setCertificate($certificate); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->createCertificate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Certificate $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $certificateId = '[CERTIFICATE_ID]'; - - create_certificate_sample($formattedParent, $certificateId); -} -// [END certificatemanager_v1_generated_CertificateManager_CreateCertificate_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_issuance_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_issuance_config.php deleted file mode 100644 index c86e49e703da..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_issuance_config.php +++ /dev/null @@ -1,113 +0,0 @@ -setCertificateAuthorityConfig($certificateIssuanceConfigCertificateAuthorityConfig) - ->setLifetime($certificateIssuanceConfigLifetime) - ->setRotationWindowPercentage($certificateIssuanceConfigRotationWindowPercentage) - ->setKeyAlgorithm($certificateIssuanceConfigKeyAlgorithm); - $request = (new CreateCertificateIssuanceConfigRequest()) - ->setParent($formattedParent) - ->setCertificateIssuanceConfigId($certificateIssuanceConfigId) - ->setCertificateIssuanceConfig($certificateIssuanceConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->createCertificateIssuanceConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CertificateIssuanceConfig $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $certificateIssuanceConfigId = '[CERTIFICATE_ISSUANCE_CONFIG_ID]'; - $certificateIssuanceConfigRotationWindowPercentage = 0; - $certificateIssuanceConfigKeyAlgorithm = KeyAlgorithm::KEY_ALGORITHM_UNSPECIFIED; - - create_certificate_issuance_config_sample( - $formattedParent, - $certificateIssuanceConfigId, - $certificateIssuanceConfigRotationWindowPercentage, - $certificateIssuanceConfigKeyAlgorithm - ); -} -// [END certificatemanager_v1_generated_CertificateManager_CreateCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map.php deleted file mode 100644 index 6eb2c0040bdb..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent) - ->setCertificateMapId($certificateMapId) - ->setCertificateMap($certificateMap); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->createCertificateMap($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CertificateMap $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $certificateMapId = '[CERTIFICATE_MAP_ID]'; - - create_certificate_map_sample($formattedParent, $certificateMapId); -} -// [END certificatemanager_v1_generated_CertificateManager_CreateCertificateMap_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map_entry.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map_entry.php deleted file mode 100644 index 1c2cd0bfac54..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_certificate_map_entry.php +++ /dev/null @@ -1,95 +0,0 @@ -setParent($formattedParent) - ->setCertificateMapEntryId($certificateMapEntryId) - ->setCertificateMapEntry($certificateMapEntry); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->createCertificateMapEntry($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CertificateMapEntry $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 = CertificateManagerClient::certificateMapName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE_MAP]' - ); - $certificateMapEntryId = '[CERTIFICATE_MAP_ENTRY_ID]'; - - create_certificate_map_entry_sample($formattedParent, $certificateMapEntryId); -} -// [END certificatemanager_v1_generated_CertificateManager_CreateCertificateMapEntry_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_dns_authorization.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_dns_authorization.php deleted file mode 100644 index 161fc00f1d55..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_dns_authorization.php +++ /dev/null @@ -1,98 +0,0 @@ -setDomain($dnsAuthorizationDomain); - $request = (new CreateDnsAuthorizationRequest()) - ->setParent($formattedParent) - ->setDnsAuthorizationId($dnsAuthorizationId) - ->setDnsAuthorization($dnsAuthorization); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->createDnsAuthorization($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DnsAuthorization $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $dnsAuthorizationId = '[DNS_AUTHORIZATION_ID]'; - $dnsAuthorizationDomain = '[DOMAIN]'; - - create_dns_authorization_sample($formattedParent, $dnsAuthorizationId, $dnsAuthorizationDomain); -} -// [END certificatemanager_v1_generated_CertificateManager_CreateDnsAuthorization_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_trust_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_trust_config.php deleted file mode 100644 index 29b3c05ba3ff..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/create_trust_config.php +++ /dev/null @@ -1,90 +0,0 @@ -setParent($formattedParent) - ->setTrustConfigId($trustConfigId) - ->setTrustConfig($trustConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->createTrustConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TrustConfig $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $trustConfigId = '[TRUST_CONFIG_ID]'; - - create_trust_config_sample($formattedParent, $trustConfigId); -} -// [END certificatemanager_v1_generated_CertificateManager_CreateTrustConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate.php deleted file mode 100644 index 79018921b0aa..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->deleteCertificate($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 = CertificateManagerClient::certificateName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE]' - ); - - delete_certificate_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_DeleteCertificate_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php deleted file mode 100644 index 1a69d0771ac2..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->deleteCertificateIssuanceConfig($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 = CertificateManagerClient::certificateIssuanceConfigName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE_ISSUANCE_CONFIG]' - ); - - delete_certificate_issuance_config_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_DeleteCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map.php deleted file mode 100644 index b07fe8f2820b..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->deleteCertificateMap($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 = CertificateManagerClient::certificateMapName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE_MAP]' - ); - - delete_certificate_map_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_DeleteCertificateMap_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map_entry.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map_entry.php deleted file mode 100644 index 0f25c54cc822..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_certificate_map_entry.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->deleteCertificateMapEntry($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 = CertificateManagerClient::certificateMapEntryName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE_MAP]', - '[CERTIFICATE_MAP_ENTRY]' - ); - - delete_certificate_map_entry_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_DeleteCertificateMapEntry_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_dns_authorization.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_dns_authorization.php deleted file mode 100644 index af0518dc4eed..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_dns_authorization.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->deleteDnsAuthorization($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 = CertificateManagerClient::dnsAuthorizationName( - '[PROJECT]', - '[LOCATION]', - '[DNS_AUTHORIZATION]' - ); - - delete_dns_authorization_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_DeleteDnsAuthorization_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_trust_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_trust_config.php deleted file mode 100644 index fb85115ae412..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/delete_trust_config.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->deleteTrustConfig($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 = CertificateManagerClient::trustConfigName( - '[PROJECT]', - '[LOCATION]', - '[TRUST_CONFIG]' - ); - - delete_trust_config_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_DeleteTrustConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate.php deleted file mode 100644 index cb33a097875a..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Certificate $response */ - $response = $certificateManagerClient->getCertificate($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 = CertificateManagerClient::certificateName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE]' - ); - - get_certificate_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_GetCertificate_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_issuance_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_issuance_config.php deleted file mode 100644 index e19512679664..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_issuance_config.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CertificateIssuanceConfig $response */ - $response = $certificateManagerClient->getCertificateIssuanceConfig($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 = CertificateManagerClient::certificateIssuanceConfigName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE_ISSUANCE_CONFIG]' - ); - - get_certificate_issuance_config_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_GetCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map.php deleted file mode 100644 index 0e749994bd0b..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CertificateMap $response */ - $response = $certificateManagerClient->getCertificateMap($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 = CertificateManagerClient::certificateMapName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE_MAP]' - ); - - get_certificate_map_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_GetCertificateMap_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map_entry.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map_entry.php deleted file mode 100644 index 678dda0c34e5..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_certificate_map_entry.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CertificateMapEntry $response */ - $response = $certificateManagerClient->getCertificateMapEntry($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 = CertificateManagerClient::certificateMapEntryName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE_MAP]', - '[CERTIFICATE_MAP_ENTRY]' - ); - - get_certificate_map_entry_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_GetCertificateMapEntry_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_dns_authorization.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_dns_authorization.php deleted file mode 100644 index dd1c2d545bc2..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_dns_authorization.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DnsAuthorization $response */ - $response = $certificateManagerClient->getDnsAuthorization($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 = CertificateManagerClient::dnsAuthorizationName( - '[PROJECT]', - '[LOCATION]', - '[DNS_AUTHORIZATION]' - ); - - get_dns_authorization_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_GetDnsAuthorization_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_location.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_location.php deleted file mode 100644 index fa41f81535e8..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/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 certificatemanager_v1_generated_CertificateManager_GetLocation_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_trust_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_trust_config.php deleted file mode 100644 index e791ef35f356..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/get_trust_config.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TrustConfig $response */ - $response = $certificateManagerClient->getTrustConfig($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 = CertificateManagerClient::trustConfigName( - '[PROJECT]', - '[LOCATION]', - '[TRUST_CONFIG]' - ); - - get_trust_config_sample($formattedName); -} -// [END certificatemanager_v1_generated_CertificateManager_GetTrustConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php deleted file mode 100644 index f00b6f079e0f..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $certificateManagerClient->listCertificateIssuanceConfigs($request); - - /** @var CertificateIssuanceConfig $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_certificate_issuance_configs_sample($formattedParent); -} -// [END certificatemanager_v1_generated_CertificateManager_ListCertificateIssuanceConfigs_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_map_entries.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_map_entries.php deleted file mode 100644 index b44956253b5c..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_map_entries.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $certificateManagerClient->listCertificateMapEntries($request); - - /** @var CertificateMapEntry $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 = CertificateManagerClient::certificateMapName( - '[PROJECT]', - '[LOCATION]', - '[CERTIFICATE_MAP]' - ); - - list_certificate_map_entries_sample($formattedParent); -} -// [END certificatemanager_v1_generated_CertificateManager_ListCertificateMapEntries_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_maps.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_maps.php deleted file mode 100644 index 34d88f72fd78..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificate_maps.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $certificateManagerClient->listCertificateMaps($request); - - /** @var CertificateMap $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_certificate_maps_sample($formattedParent); -} -// [END certificatemanager_v1_generated_CertificateManager_ListCertificateMaps_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificates.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificates.php deleted file mode 100644 index ae784f16cefc..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_certificates.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $certificateManagerClient->listCertificates($request); - - /** @var Certificate $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_certificates_sample($formattedParent); -} -// [END certificatemanager_v1_generated_CertificateManager_ListCertificates_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_dns_authorizations.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_dns_authorizations.php deleted file mode 100644 index 33eb22fac0ef..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_dns_authorizations.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $certificateManagerClient->listDnsAuthorizations($request); - - /** @var DnsAuthorization $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_dns_authorizations_sample($formattedParent); -} -// [END certificatemanager_v1_generated_CertificateManager_ListDnsAuthorizations_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_locations.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_locations.php deleted file mode 100644 index 1f0cd8571592..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/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 certificatemanager_v1_generated_CertificateManager_ListLocations_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_trust_configs.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_trust_configs.php deleted file mode 100644 index e1667ef633d9..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/list_trust_configs.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $certificateManagerClient->listTrustConfigs($request); - - /** @var TrustConfig $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 = CertificateManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_trust_configs_sample($formattedParent); -} -// [END certificatemanager_v1_generated_CertificateManager_ListTrustConfigs_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate.php deleted file mode 100644 index fc7a02ac01cf..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate.php +++ /dev/null @@ -1,74 +0,0 @@ -setCertificate($certificate) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->updateCertificate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Certificate $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 certificatemanager_v1_generated_CertificateManager_UpdateCertificate_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map.php deleted file mode 100644 index 06886d1314da..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map.php +++ /dev/null @@ -1,74 +0,0 @@ -setCertificateMap($certificateMap) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->updateCertificateMap($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CertificateMap $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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMap_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map_entry.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map_entry.php deleted file mode 100644 index f847f1d02dd7..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_certificate_map_entry.php +++ /dev/null @@ -1,74 +0,0 @@ -setCertificateMapEntry($certificateMapEntry) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->updateCertificateMapEntry($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CertificateMapEntry $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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMapEntry_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_dns_authorization.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_dns_authorization.php deleted file mode 100644 index a7040b03f6e8..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_dns_authorization.php +++ /dev/null @@ -1,90 +0,0 @@ -setDomain($dnsAuthorizationDomain); - $updateMask = new FieldMask(); - $request = (new UpdateDnsAuthorizationRequest()) - ->setDnsAuthorization($dnsAuthorization) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->updateDnsAuthorization($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DnsAuthorization $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 -{ - $dnsAuthorizationDomain = '[DOMAIN]'; - - update_dns_authorization_sample($dnsAuthorizationDomain); -} -// [END certificatemanager_v1_generated_CertificateManager_UpdateDnsAuthorization_sync] diff --git a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_trust_config.php b/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_trust_config.php deleted file mode 100644 index b9ae6d221556..000000000000 --- a/owl-bot-staging/CertificateManager/v1/samples/V1/CertificateManagerClient/update_trust_config.php +++ /dev/null @@ -1,74 +0,0 @@ -setTrustConfig($trustConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $certificateManagerClient->updateTrustConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TrustConfig $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 certificatemanager_v1_generated_CertificateManager_UpdateTrustConfig_sync] diff --git a/owl-bot-staging/CertificateManager/v1/src/V1/Client/CertificateManagerClient.php b/owl-bot-staging/CertificateManager/v1/src/V1/Client/CertificateManagerClient.php deleted file mode 100644 index 1629f878d723..000000000000 --- a/owl-bot-staging/CertificateManager/v1/src/V1/Client/CertificateManagerClient.php +++ /dev/null @@ -1,1325 +0,0 @@ - createCertificateAsync(CreateCertificateRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCertificateIssuanceConfigAsync(CreateCertificateIssuanceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCertificateMapAsync(CreateCertificateMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCertificateMapEntryAsync(CreateCertificateMapEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDnsAuthorizationAsync(CreateDnsAuthorizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTrustConfigAsync(CreateTrustConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCertificateAsync(DeleteCertificateRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCertificateIssuanceConfigAsync(DeleteCertificateIssuanceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCertificateMapAsync(DeleteCertificateMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCertificateMapEntryAsync(DeleteCertificateMapEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDnsAuthorizationAsync(DeleteDnsAuthorizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTrustConfigAsync(DeleteTrustConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCertificateAsync(GetCertificateRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCertificateIssuanceConfigAsync(GetCertificateIssuanceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCertificateMapAsync(GetCertificateMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCertificateMapEntryAsync(GetCertificateMapEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDnsAuthorizationAsync(GetDnsAuthorizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTrustConfigAsync(GetTrustConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCertificateIssuanceConfigsAsync(ListCertificateIssuanceConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCertificateMapEntriesAsync(ListCertificateMapEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCertificateMapsAsync(ListCertificateMapsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCertificatesAsync(ListCertificatesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDnsAuthorizationsAsync(ListDnsAuthorizationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTrustConfigsAsync(ListTrustConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCertificateAsync(UpdateCertificateRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCertificateMapAsync(UpdateCertificateMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCertificateMapEntryAsync(UpdateCertificateMapEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDnsAuthorizationAsync(UpdateDnsAuthorizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTrustConfigAsync(UpdateTrustConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class CertificateManagerClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.certificatemanager.v1.CertificateManager'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'certificatemanager.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'certificatemanager.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/certificate_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/certificate_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/certificate_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/certificate_manager_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a ca_pool - * resource. - * - * @param string $project - * @param string $location - * @param string $caPool - * - * @return string The formatted ca_pool resource. - */ - public static function caPoolName(string $project, string $location, string $caPool): string - { - return self::getPathTemplate('caPool')->render([ - 'project' => $project, - 'location' => $location, - 'ca_pool' => $caPool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a certificate - * resource. - * - * @param string $project - * @param string $location - * @param string $certificate - * - * @return string The formatted certificate resource. - */ - public static function certificateName(string $project, string $location, string $certificate): string - { - return self::getPathTemplate('certificate')->render([ - 'project' => $project, - 'location' => $location, - 'certificate' => $certificate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * certificate_issuance_config resource. - * - * @param string $project - * @param string $location - * @param string $certificateIssuanceConfig - * - * @return string The formatted certificate_issuance_config resource. - */ - public static function certificateIssuanceConfigName(string $project, string $location, string $certificateIssuanceConfig): string - { - return self::getPathTemplate('certificateIssuanceConfig')->render([ - 'project' => $project, - 'location' => $location, - 'certificate_issuance_config' => $certificateIssuanceConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * certificate_map resource. - * - * @param string $project - * @param string $location - * @param string $certificateMap - * - * @return string The formatted certificate_map resource. - */ - public static function certificateMapName(string $project, string $location, string $certificateMap): string - { - return self::getPathTemplate('certificateMap')->render([ - 'project' => $project, - 'location' => $location, - 'certificate_map' => $certificateMap, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * certificate_map_entry resource. - * - * @param string $project - * @param string $location - * @param string $certificateMap - * @param string $certificateMapEntry - * - * @return string The formatted certificate_map_entry resource. - */ - public static function certificateMapEntryName(string $project, string $location, string $certificateMap, string $certificateMapEntry): string - { - return self::getPathTemplate('certificateMapEntry')->render([ - 'project' => $project, - 'location' => $location, - 'certificate_map' => $certificateMap, - 'certificate_map_entry' => $certificateMapEntry, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * dns_authorization resource. - * - * @param string $project - * @param string $location - * @param string $dnsAuthorization - * - * @return string The formatted dns_authorization resource. - */ - public static function dnsAuthorizationName(string $project, string $location, string $dnsAuthorization): string - { - return self::getPathTemplate('dnsAuthorization')->render([ - 'project' => $project, - 'location' => $location, - 'dns_authorization' => $dnsAuthorization, - ]); - } - - /** - * 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 trust_config - * resource. - * - * @param string $project - * @param string $location - * @param string $trustConfig - * - * @return string The formatted trust_config resource. - */ - public static function trustConfigName(string $project, string $location, string $trustConfig): string - { - return self::getPathTemplate('trustConfig')->render([ - 'project' => $project, - 'location' => $location, - 'trust_config' => $trustConfig, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} - * - certificate: projects/{project}/locations/{location}/certificates/{certificate} - * - certificateIssuanceConfig: projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config} - * - certificateMap: projects/{project}/locations/{location}/certificateMaps/{certificate_map} - * - certificateMapEntry: projects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry} - * - dnsAuthorization: projects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization} - * - location: projects/{project}/locations/{location} - * - trustConfig: projects/{project}/locations/{location}/trustConfigs/{trust_config} - * - * 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 'certificatemanager.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 new Certificate in a given project and location. - * - * The async variant is {@see CertificateManagerClient::createCertificateAsync()} . - * - * @example samples/V1/CertificateManagerClient/create_certificate.php - * - * @param CreateCertificateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createCertificate(CreateCertificateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCertificate', $request, $callOptions)->wait(); - } - - /** - * Creates a new CertificateIssuanceConfig in a given project and location. - * - * The async variant is - * {@see CertificateManagerClient::createCertificateIssuanceConfigAsync()} . - * - * @example samples/V1/CertificateManagerClient/create_certificate_issuance_config.php - * - * @param CreateCertificateIssuanceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createCertificateIssuanceConfig(CreateCertificateIssuanceConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCertificateIssuanceConfig', $request, $callOptions)->wait(); - } - - /** - * Creates a new CertificateMap in a given project and location. - * - * The async variant is - * {@see CertificateManagerClient::createCertificateMapAsync()} . - * - * @example samples/V1/CertificateManagerClient/create_certificate_map.php - * - * @param CreateCertificateMapRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createCertificateMap(CreateCertificateMapRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCertificateMap', $request, $callOptions)->wait(); - } - - /** - * Creates a new CertificateMapEntry in a given project and location. - * - * The async variant is - * {@see CertificateManagerClient::createCertificateMapEntryAsync()} . - * - * @example samples/V1/CertificateManagerClient/create_certificate_map_entry.php - * - * @param CreateCertificateMapEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createCertificateMapEntry(CreateCertificateMapEntryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCertificateMapEntry', $request, $callOptions)->wait(); - } - - /** - * Creates a new DnsAuthorization in a given project and location. - * - * The async variant is - * {@see CertificateManagerClient::createDnsAuthorizationAsync()} . - * - * @example samples/V1/CertificateManagerClient/create_dns_authorization.php - * - * @param CreateDnsAuthorizationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createDnsAuthorization(CreateDnsAuthorizationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDnsAuthorization', $request, $callOptions)->wait(); - } - - /** - * Creates a new TrustConfig in a given project and location. - * - * The async variant is {@see CertificateManagerClient::createTrustConfigAsync()} . - * - * @example samples/V1/CertificateManagerClient/create_trust_config.php - * - * @param CreateTrustConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createTrustConfig(CreateTrustConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTrustConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Certificate. - * - * The async variant is {@see CertificateManagerClient::deleteCertificateAsync()} . - * - * @example samples/V1/CertificateManagerClient/delete_certificate.php - * - * @param DeleteCertificateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteCertificate(DeleteCertificateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCertificate', $request, $callOptions)->wait(); - } - - /** - * Deletes a single CertificateIssuanceConfig. - * - * The async variant is - * {@see CertificateManagerClient::deleteCertificateIssuanceConfigAsync()} . - * - * @example samples/V1/CertificateManagerClient/delete_certificate_issuance_config.php - * - * @param DeleteCertificateIssuanceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteCertificateIssuanceConfig(DeleteCertificateIssuanceConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCertificateIssuanceConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes a single CertificateMap. A Certificate Map can't be deleted - * if it contains Certificate Map Entries. Remove all the entries from - * the map before calling this method. - * - * The async variant is - * {@see CertificateManagerClient::deleteCertificateMapAsync()} . - * - * @example samples/V1/CertificateManagerClient/delete_certificate_map.php - * - * @param DeleteCertificateMapRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteCertificateMap(DeleteCertificateMapRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCertificateMap', $request, $callOptions)->wait(); - } - - /** - * Deletes a single CertificateMapEntry. - * - * The async variant is - * {@see CertificateManagerClient::deleteCertificateMapEntryAsync()} . - * - * @example samples/V1/CertificateManagerClient/delete_certificate_map_entry.php - * - * @param DeleteCertificateMapEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteCertificateMapEntry(DeleteCertificateMapEntryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCertificateMapEntry', $request, $callOptions)->wait(); - } - - /** - * Deletes a single DnsAuthorization. - * - * The async variant is - * {@see CertificateManagerClient::deleteDnsAuthorizationAsync()} . - * - * @example samples/V1/CertificateManagerClient/delete_dns_authorization.php - * - * @param DeleteDnsAuthorizationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteDnsAuthorization(DeleteDnsAuthorizationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDnsAuthorization', $request, $callOptions)->wait(); - } - - /** - * Deletes a single TrustConfig. - * - * The async variant is {@see CertificateManagerClient::deleteTrustConfigAsync()} . - * - * @example samples/V1/CertificateManagerClient/delete_trust_config.php - * - * @param DeleteTrustConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteTrustConfig(DeleteTrustConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteTrustConfig', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Certificate. - * - * The async variant is {@see CertificateManagerClient::getCertificateAsync()} . - * - * @example samples/V1/CertificateManagerClient/get_certificate.php - * - * @param GetCertificateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Certificate - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCertificate(GetCertificateRequest $request, array $callOptions = []): Certificate - { - return $this->startApiCall('GetCertificate', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single CertificateIssuanceConfig. - * - * The async variant is - * {@see CertificateManagerClient::getCertificateIssuanceConfigAsync()} . - * - * @example samples/V1/CertificateManagerClient/get_certificate_issuance_config.php - * - * @param GetCertificateIssuanceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CertificateIssuanceConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCertificateIssuanceConfig(GetCertificateIssuanceConfigRequest $request, array $callOptions = []): CertificateIssuanceConfig - { - return $this->startApiCall('GetCertificateIssuanceConfig', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single CertificateMap. - * - * The async variant is {@see CertificateManagerClient::getCertificateMapAsync()} . - * - * @example samples/V1/CertificateManagerClient/get_certificate_map.php - * - * @param GetCertificateMapRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CertificateMap - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCertificateMap(GetCertificateMapRequest $request, array $callOptions = []): CertificateMap - { - return $this->startApiCall('GetCertificateMap', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single CertificateMapEntry. - * - * The async variant is - * {@see CertificateManagerClient::getCertificateMapEntryAsync()} . - * - * @example samples/V1/CertificateManagerClient/get_certificate_map_entry.php - * - * @param GetCertificateMapEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CertificateMapEntry - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCertificateMapEntry(GetCertificateMapEntryRequest $request, array $callOptions = []): CertificateMapEntry - { - return $this->startApiCall('GetCertificateMapEntry', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single DnsAuthorization. - * - * The async variant is {@see CertificateManagerClient::getDnsAuthorizationAsync()} - * . - * - * @example samples/V1/CertificateManagerClient/get_dns_authorization.php - * - * @param GetDnsAuthorizationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DnsAuthorization - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDnsAuthorization(GetDnsAuthorizationRequest $request, array $callOptions = []): DnsAuthorization - { - return $this->startApiCall('GetDnsAuthorization', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single TrustConfig. - * - * The async variant is {@see CertificateManagerClient::getTrustConfigAsync()} . - * - * @example samples/V1/CertificateManagerClient/get_trust_config.php - * - * @param GetTrustConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TrustConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTrustConfig(GetTrustConfigRequest $request, array $callOptions = []): TrustConfig - { - return $this->startApiCall('GetTrustConfig', $request, $callOptions)->wait(); - } - - /** - * Lists CertificateIssuanceConfigs in a given project and location. - * - * The async variant is - * {@see CertificateManagerClient::listCertificateIssuanceConfigsAsync()} . - * - * @example samples/V1/CertificateManagerClient/list_certificate_issuance_configs.php - * - * @param ListCertificateIssuanceConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCertificateIssuanceConfigs(ListCertificateIssuanceConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCertificateIssuanceConfigs', $request, $callOptions); - } - - /** - * Lists CertificateMapEntries in a given project and location. - * - * The async variant is - * {@see CertificateManagerClient::listCertificateMapEntriesAsync()} . - * - * @example samples/V1/CertificateManagerClient/list_certificate_map_entries.php - * - * @param ListCertificateMapEntriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCertificateMapEntries(ListCertificateMapEntriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCertificateMapEntries', $request, $callOptions); - } - - /** - * Lists CertificateMaps in a given project and location. - * - * The async variant is {@see CertificateManagerClient::listCertificateMapsAsync()} - * . - * - * @example samples/V1/CertificateManagerClient/list_certificate_maps.php - * - * @param ListCertificateMapsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCertificateMaps(ListCertificateMapsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCertificateMaps', $request, $callOptions); - } - - /** - * Lists Certificates in a given project and location. - * - * The async variant is {@see CertificateManagerClient::listCertificatesAsync()} . - * - * @example samples/V1/CertificateManagerClient/list_certificates.php - * - * @param ListCertificatesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCertificates(ListCertificatesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCertificates', $request, $callOptions); - } - - /** - * Lists DnsAuthorizations in a given project and location. - * - * The async variant is - * {@see CertificateManagerClient::listDnsAuthorizationsAsync()} . - * - * @example samples/V1/CertificateManagerClient/list_dns_authorizations.php - * - * @param ListDnsAuthorizationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listDnsAuthorizations(ListDnsAuthorizationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDnsAuthorizations', $request, $callOptions); - } - - /** - * Lists TrustConfigs in a given project and location. - * - * The async variant is {@see CertificateManagerClient::listTrustConfigsAsync()} . - * - * @example samples/V1/CertificateManagerClient/list_trust_configs.php - * - * @param ListTrustConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTrustConfigs(ListTrustConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTrustConfigs', $request, $callOptions); - } - - /** - * Updates a Certificate. - * - * The async variant is {@see CertificateManagerClient::updateCertificateAsync()} . - * - * @example samples/V1/CertificateManagerClient/update_certificate.php - * - * @param UpdateCertificateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateCertificate(UpdateCertificateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCertificate', $request, $callOptions)->wait(); - } - - /** - * Updates a CertificateMap. - * - * The async variant is - * {@see CertificateManagerClient::updateCertificateMapAsync()} . - * - * @example samples/V1/CertificateManagerClient/update_certificate_map.php - * - * @param UpdateCertificateMapRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateCertificateMap(UpdateCertificateMapRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCertificateMap', $request, $callOptions)->wait(); - } - - /** - * Updates a CertificateMapEntry. - * - * The async variant is - * {@see CertificateManagerClient::updateCertificateMapEntryAsync()} . - * - * @example samples/V1/CertificateManagerClient/update_certificate_map_entry.php - * - * @param UpdateCertificateMapEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateCertificateMapEntry(UpdateCertificateMapEntryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCertificateMapEntry', $request, $callOptions)->wait(); - } - - /** - * Updates a DnsAuthorization. - * - * The async variant is - * {@see CertificateManagerClient::updateDnsAuthorizationAsync()} . - * - * @example samples/V1/CertificateManagerClient/update_dns_authorization.php - * - * @param UpdateDnsAuthorizationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateDnsAuthorization(UpdateDnsAuthorizationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDnsAuthorization', $request, $callOptions)->wait(); - } - - /** - * Updates a TrustConfig. - * - * The async variant is {@see CertificateManagerClient::updateTrustConfigAsync()} . - * - * @example samples/V1/CertificateManagerClient/update_trust_config.php - * - * @param UpdateTrustConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateTrustConfig(UpdateTrustConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTrustConfig', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see CertificateManagerClient::getLocationAsync()} . - * - * @example samples/V1/CertificateManagerClient/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 CertificateManagerClient::listLocationsAsync()} . - * - * @example samples/V1/CertificateManagerClient/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/CertificateManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/CertificateManager/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 047c9f1afef5..000000000000 --- a/owl-bot-staging/CertificateManager/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.certificatemanager.v1", - "libraryPackage": "Google\\Cloud\\CertificateManager\\V1", - "services": { - "CertificateManager": { - "clients": { - "grpc": { - "libraryClient": "CertificateManagerGapicClient", - "rpcs": { - "CreateCertificate": { - "methods": [ - "createCertificate" - ] - }, - "CreateCertificateIssuanceConfig": { - "methods": [ - "createCertificateIssuanceConfig" - ] - }, - "CreateCertificateMap": { - "methods": [ - "createCertificateMap" - ] - }, - "CreateCertificateMapEntry": { - "methods": [ - "createCertificateMapEntry" - ] - }, - "CreateDnsAuthorization": { - "methods": [ - "createDnsAuthorization" - ] - }, - "CreateTrustConfig": { - "methods": [ - "createTrustConfig" - ] - }, - "DeleteCertificate": { - "methods": [ - "deleteCertificate" - ] - }, - "DeleteCertificateIssuanceConfig": { - "methods": [ - "deleteCertificateIssuanceConfig" - ] - }, - "DeleteCertificateMap": { - "methods": [ - "deleteCertificateMap" - ] - }, - "DeleteCertificateMapEntry": { - "methods": [ - "deleteCertificateMapEntry" - ] - }, - "DeleteDnsAuthorization": { - "methods": [ - "deleteDnsAuthorization" - ] - }, - "DeleteTrustConfig": { - "methods": [ - "deleteTrustConfig" - ] - }, - "GetCertificate": { - "methods": [ - "getCertificate" - ] - }, - "GetCertificateIssuanceConfig": { - "methods": [ - "getCertificateIssuanceConfig" - ] - }, - "GetCertificateMap": { - "methods": [ - "getCertificateMap" - ] - }, - "GetCertificateMapEntry": { - "methods": [ - "getCertificateMapEntry" - ] - }, - "GetDnsAuthorization": { - "methods": [ - "getDnsAuthorization" - ] - }, - "GetTrustConfig": { - "methods": [ - "getTrustConfig" - ] - }, - "ListCertificateIssuanceConfigs": { - "methods": [ - "listCertificateIssuanceConfigs" - ] - }, - "ListCertificateMapEntries": { - "methods": [ - "listCertificateMapEntries" - ] - }, - "ListCertificateMaps": { - "methods": [ - "listCertificateMaps" - ] - }, - "ListCertificates": { - "methods": [ - "listCertificates" - ] - }, - "ListDnsAuthorizations": { - "methods": [ - "listDnsAuthorizations" - ] - }, - "ListTrustConfigs": { - "methods": [ - "listTrustConfigs" - ] - }, - "UpdateCertificate": { - "methods": [ - "updateCertificate" - ] - }, - "UpdateCertificateMap": { - "methods": [ - "updateCertificateMap" - ] - }, - "UpdateCertificateMapEntry": { - "methods": [ - "updateCertificateMapEntry" - ] - }, - "UpdateDnsAuthorization": { - "methods": [ - "updateDnsAuthorization" - ] - }, - "UpdateTrustConfig": { - "methods": [ - "updateTrustConfig" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_client_config.json b/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_client_config.json deleted file mode 100644 index 64064d313a3d..000000000000 --- a/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_client_config.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "interfaces": { - "google.cloud.certificatemanager.v1.CertificateManager": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateCertificate": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateCertificateIssuanceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateCertificateMap": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateCertificateMapEntry": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateDnsAuthorization": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateTrustConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteCertificate": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteCertificateIssuanceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteCertificateMap": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteCertificateMapEntry": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDnsAuthorization": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteTrustConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetCertificate": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCertificateIssuanceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCertificateMap": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCertificateMapEntry": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDnsAuthorization": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTrustConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListCertificateIssuanceConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCertificateMapEntries": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCertificateMaps": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCertificates": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDnsAuthorizations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTrustConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateCertificate": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCertificateMap": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCertificateMapEntry": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDnsAuthorization": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateTrustConfig": { - "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/CertificateManager/v1/src/V1/resources/certificate_manager_descriptor_config.php b/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_descriptor_config.php deleted file mode 100644 index f125748025cd..000000000000 --- a/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_descriptor_config.php +++ /dev/null @@ -1,592 +0,0 @@ - [ - 'google.cloud.certificatemanager.v1.CertificateManager' => [ - 'CreateCertificate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\Certificate', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCertificateIssuanceConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCertificateMap' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateMap', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCertificateMapEntry' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateMapEntry', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDnsAuthorization' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\DnsAuthorization', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTrustConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\TrustConfig', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCertificate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCertificateIssuanceConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCertificateMap' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCertificateMapEntry' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDnsAuthorization' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTrustConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCertificate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\Certificate', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'certificate.name', - 'fieldAccessors' => [ - 'getCertificate', - 'getName', - ], - ], - ], - ], - 'UpdateCertificateMap' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateMap', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'certificate_map.name', - 'fieldAccessors' => [ - 'getCertificateMap', - 'getName', - ], - ], - ], - ], - 'UpdateCertificateMapEntry' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\CertificateMapEntry', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'certificate_map_entry.name', - 'fieldAccessors' => [ - 'getCertificateMapEntry', - 'getName', - ], - ], - ], - ], - 'UpdateDnsAuthorization' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\DnsAuthorization', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'dns_authorization.name', - 'fieldAccessors' => [ - 'getDnsAuthorization', - 'getName', - ], - ], - ], - ], - 'UpdateTrustConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\CertificateManager\V1\TrustConfig', - 'metadataReturnType' => '\Google\Cloud\CertificateManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'trust_config.name', - 'fieldAccessors' => [ - 'getTrustConfig', - 'getName', - ], - ], - ], - ], - 'GetCertificate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\Certificate', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCertificateIssuanceConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCertificateMap' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\CertificateMap', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCertificateMapEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\CertificateMapEntry', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDnsAuthorization' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\DnsAuthorization', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTrustConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\TrustConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCertificateIssuanceConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCertificateIssuanceConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\ListCertificateIssuanceConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCertificateMapEntries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCertificateMapEntries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\ListCertificateMapEntriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCertificateMaps' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCertificateMaps', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\ListCertificateMapsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCertificates' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCertificates', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\ListCertificatesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDnsAuthorizations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDnsAuthorizations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\ListDnsAuthorizationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTrustConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTrustConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\CertificateManager\V1\ListTrustConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - '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' => [ - 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', - 'certificate' => 'projects/{project}/locations/{location}/certificates/{certificate}', - 'certificateIssuanceConfig' => 'projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config}', - 'certificateMap' => 'projects/{project}/locations/{location}/certificateMaps/{certificate_map}', - 'certificateMapEntry' => 'projects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry}', - 'dnsAuthorization' => 'projects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization}', - 'location' => 'projects/{project}/locations/{location}', - 'trustConfig' => 'projects/{project}/locations/{location}/trustConfigs/{trust_config}', - ], - ], - ], -]; diff --git a/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_rest_client_config.php b/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_rest_client_config.php deleted file mode 100644 index 5036313a7cab..000000000000 --- a/owl-bot-staging/CertificateManager/v1/src/V1/resources/certificate_manager_rest_client_config.php +++ /dev/null @@ -1,468 +0,0 @@ - [ - 'google.cloud.certificatemanager.v1.CertificateManager' => [ - 'CreateCertificate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificates', - 'body' => 'certificate', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'certificate_id', - ], - ], - 'CreateCertificateIssuanceConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs', - 'body' => 'certificate_issuance_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'certificate_issuance_config_id', - ], - ], - 'CreateCertificateMap' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificateMaps', - 'body' => 'certificate_map', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'certificate_map_id', - ], - ], - 'CreateCertificateMapEntry' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries', - 'body' => 'certificate_map_entry', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'certificate_map_entry_id', - ], - ], - 'CreateDnsAuthorization' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dnsAuthorizations', - 'body' => 'dns_authorization', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'dns_authorization_id', - ], - ], - 'CreateTrustConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/trustConfigs', - 'body' => 'trust_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'trust_config_id', - ], - ], - 'DeleteCertificate' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCertificateIssuanceConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCertificateMap' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateMaps/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCertificateMapEntry' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDnsAuthorization' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsAuthorizations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTrustConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/trustConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCertificate' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCertificateIssuanceConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCertificateMap' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateMaps/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCertificateMapEntry' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDnsAuthorization' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsAuthorizations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTrustConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/trustConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCertificateIssuanceConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCertificateMapEntries' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCertificateMaps' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificateMaps', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCertificates' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/certificates', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDnsAuthorizations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dnsAuthorizations', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTrustConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/trustConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCertificate' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{certificate.name=projects/*/locations/*/certificates/*}', - 'body' => 'certificate', - 'placeholders' => [ - 'certificate.name' => [ - 'getters' => [ - 'getCertificate', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateCertificateMap' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{certificate_map.name=projects/*/locations/*/certificateMaps/*}', - 'body' => 'certificate_map', - 'placeholders' => [ - 'certificate_map.name' => [ - 'getters' => [ - 'getCertificateMap', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateCertificateMapEntry' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{certificate_map_entry.name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}', - 'body' => 'certificate_map_entry', - 'placeholders' => [ - 'certificate_map_entry.name' => [ - 'getters' => [ - 'getCertificateMapEntry', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateDnsAuthorization' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{dns_authorization.name=projects/*/locations/*/dnsAuthorizations/*}', - 'body' => 'dns_authorization', - 'placeholders' => [ - 'dns_authorization.name' => [ - 'getters' => [ - 'getDnsAuthorization', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateTrustConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{trust_config.name=projects/*/locations/*/trustConfigs/*}', - 'body' => 'trust_config', - 'placeholders' => [ - 'trust_config.name' => [ - 'getters' => [ - 'getTrustConfig', - '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.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/CertificateManager/v1/tests/Unit/V1/Client/CertificateManagerClientTest.php b/owl-bot-staging/CertificateManager/v1/tests/Unit/V1/Client/CertificateManagerClientTest.php deleted file mode 100644 index 0e3ede80c9e0..000000000000 --- a/owl-bot-staging/CertificateManager/v1/tests/Unit/V1/Client/CertificateManagerClientTest.php +++ /dev/null @@ -1,3399 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CertificateManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CertificateManagerClient($options); - } - - /** @test */ - public function createCertificateTest() - { - $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/createCertificateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $pemCertificate = 'pemCertificate1234463984'; - $expectedResponse = new Certificate(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPemCertificate($pemCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCertificateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $certificateId = 'certificateId1494430915'; - $certificate = new Certificate(); - $request = (new CreateCertificateRequest()) - ->setParent($formattedParent) - ->setCertificateId($certificateId) - ->setCertificate($certificate); - $response = $gapicClient->createCertificate($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.certificatemanager.v1.CertificateManager/CreateCertificate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCertificateId(); - $this->assertProtobufEquals($certificateId, $actualValue); - $actualValue = $actualApiRequestObject->getCertificate(); - $this->assertProtobufEquals($certificate, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCertificateTest'); - $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 createCertificateExceptionTest() - { - $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/createCertificateTest'); - $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]'); - $certificateId = 'certificateId1494430915'; - $certificate = new Certificate(); - $request = (new CreateCertificateRequest()) - ->setParent($formattedParent) - ->setCertificateId($certificateId) - ->setCertificate($certificate); - $response = $gapicClient->createCertificate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCertificateTest'); - 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 createCertificateIssuanceConfigTest() - { - $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/createCertificateIssuanceConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $rotationWindowPercentage = 873917384; - $expectedResponse = new CertificateIssuanceConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRotationWindowPercentage($rotationWindowPercentage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCertificateIssuanceConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $certificateIssuanceConfigId = 'certificateIssuanceConfigId635650044'; - $certificateIssuanceConfig = new CertificateIssuanceConfig(); - $certificateIssuanceConfigCertificateAuthorityConfig = new CertificateAuthorityConfig(); - $certificateIssuanceConfig->setCertificateAuthorityConfig($certificateIssuanceConfigCertificateAuthorityConfig); - $certificateIssuanceConfigLifetime = new Duration(); - $certificateIssuanceConfig->setLifetime($certificateIssuanceConfigLifetime); - $certificateIssuanceConfigRotationWindowPercentage = 1410864292; - $certificateIssuanceConfig->setRotationWindowPercentage($certificateIssuanceConfigRotationWindowPercentage); - $certificateIssuanceConfigKeyAlgorithm = KeyAlgorithm::KEY_ALGORITHM_UNSPECIFIED; - $certificateIssuanceConfig->setKeyAlgorithm($certificateIssuanceConfigKeyAlgorithm); - $request = (new CreateCertificateIssuanceConfigRequest()) - ->setParent($formattedParent) - ->setCertificateIssuanceConfigId($certificateIssuanceConfigId) - ->setCertificateIssuanceConfig($certificateIssuanceConfig); - $response = $gapicClient->createCertificateIssuanceConfig($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.certificatemanager.v1.CertificateManager/CreateCertificateIssuanceConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCertificateIssuanceConfigId(); - $this->assertProtobufEquals($certificateIssuanceConfigId, $actualValue); - $actualValue = $actualApiRequestObject->getCertificateIssuanceConfig(); - $this->assertProtobufEquals($certificateIssuanceConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCertificateIssuanceConfigTest'); - $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 createCertificateIssuanceConfigExceptionTest() - { - $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/createCertificateIssuanceConfigTest'); - $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]'); - $certificateIssuanceConfigId = 'certificateIssuanceConfigId635650044'; - $certificateIssuanceConfig = new CertificateIssuanceConfig(); - $certificateIssuanceConfigCertificateAuthorityConfig = new CertificateAuthorityConfig(); - $certificateIssuanceConfig->setCertificateAuthorityConfig($certificateIssuanceConfigCertificateAuthorityConfig); - $certificateIssuanceConfigLifetime = new Duration(); - $certificateIssuanceConfig->setLifetime($certificateIssuanceConfigLifetime); - $certificateIssuanceConfigRotationWindowPercentage = 1410864292; - $certificateIssuanceConfig->setRotationWindowPercentage($certificateIssuanceConfigRotationWindowPercentage); - $certificateIssuanceConfigKeyAlgorithm = KeyAlgorithm::KEY_ALGORITHM_UNSPECIFIED; - $certificateIssuanceConfig->setKeyAlgorithm($certificateIssuanceConfigKeyAlgorithm); - $request = (new CreateCertificateIssuanceConfigRequest()) - ->setParent($formattedParent) - ->setCertificateIssuanceConfigId($certificateIssuanceConfigId) - ->setCertificateIssuanceConfig($certificateIssuanceConfig); - $response = $gapicClient->createCertificateIssuanceConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCertificateIssuanceConfigTest'); - 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 createCertificateMapTest() - { - $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/createCertificateMapTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new CertificateMap(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCertificateMapTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $certificateMapId = 'certificateMapId-2047700346'; - $certificateMap = new CertificateMap(); - $request = (new CreateCertificateMapRequest()) - ->setParent($formattedParent) - ->setCertificateMapId($certificateMapId) - ->setCertificateMap($certificateMap); - $response = $gapicClient->createCertificateMap($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.certificatemanager.v1.CertificateManager/CreateCertificateMap', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCertificateMapId(); - $this->assertProtobufEquals($certificateMapId, $actualValue); - $actualValue = $actualApiRequestObject->getCertificateMap(); - $this->assertProtobufEquals($certificateMap, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCertificateMapTest'); - $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 createCertificateMapExceptionTest() - { - $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/createCertificateMapTest'); - $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]'); - $certificateMapId = 'certificateMapId-2047700346'; - $certificateMap = new CertificateMap(); - $request = (new CreateCertificateMapRequest()) - ->setParent($formattedParent) - ->setCertificateMapId($certificateMapId) - ->setCertificateMap($certificateMap); - $response = $gapicClient->createCertificateMap($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCertificateMapTest'); - 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 createCertificateMapEntryTest() - { - $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/createCertificateMapEntryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CertificateMapEntry(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCertificateMapEntryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); - $certificateMapEntryId = 'certificateMapEntryId78300467'; - $certificateMapEntry = new CertificateMapEntry(); - $request = (new CreateCertificateMapEntryRequest()) - ->setParent($formattedParent) - ->setCertificateMapEntryId($certificateMapEntryId) - ->setCertificateMapEntry($certificateMapEntry); - $response = $gapicClient->createCertificateMapEntry($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.certificatemanager.v1.CertificateManager/CreateCertificateMapEntry', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCertificateMapEntryId(); - $this->assertProtobufEquals($certificateMapEntryId, $actualValue); - $actualValue = $actualApiRequestObject->getCertificateMapEntry(); - $this->assertProtobufEquals($certificateMapEntry, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCertificateMapEntryTest'); - $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 createCertificateMapEntryExceptionTest() - { - $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/createCertificateMapEntryTest'); - $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->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); - $certificateMapEntryId = 'certificateMapEntryId78300467'; - $certificateMapEntry = new CertificateMapEntry(); - $request = (new CreateCertificateMapEntryRequest()) - ->setParent($formattedParent) - ->setCertificateMapEntryId($certificateMapEntryId) - ->setCertificateMapEntry($certificateMapEntry); - $response = $gapicClient->createCertificateMapEntry($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCertificateMapEntryTest'); - 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 createDnsAuthorizationTest() - { - $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/createDnsAuthorizationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $domain = 'domain-1326197564'; - $expectedResponse = new DnsAuthorization(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDomain($domain); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDnsAuthorizationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dnsAuthorizationId = 'dnsAuthorizationId1795311351'; - $dnsAuthorization = new DnsAuthorization(); - $dnsAuthorizationDomain = 'dnsAuthorizationDomain2013928116'; - $dnsAuthorization->setDomain($dnsAuthorizationDomain); - $request = (new CreateDnsAuthorizationRequest()) - ->setParent($formattedParent) - ->setDnsAuthorizationId($dnsAuthorizationId) - ->setDnsAuthorization($dnsAuthorization); - $response = $gapicClient->createDnsAuthorization($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.certificatemanager.v1.CertificateManager/CreateDnsAuthorization', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDnsAuthorizationId(); - $this->assertProtobufEquals($dnsAuthorizationId, $actualValue); - $actualValue = $actualApiRequestObject->getDnsAuthorization(); - $this->assertProtobufEquals($dnsAuthorization, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDnsAuthorizationTest'); - $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 createDnsAuthorizationExceptionTest() - { - $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/createDnsAuthorizationTest'); - $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]'); - $dnsAuthorizationId = 'dnsAuthorizationId1795311351'; - $dnsAuthorization = new DnsAuthorization(); - $dnsAuthorizationDomain = 'dnsAuthorizationDomain2013928116'; - $dnsAuthorization->setDomain($dnsAuthorizationDomain); - $request = (new CreateDnsAuthorizationRequest()) - ->setParent($formattedParent) - ->setDnsAuthorizationId($dnsAuthorizationId) - ->setDnsAuthorization($dnsAuthorization); - $response = $gapicClient->createDnsAuthorization($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDnsAuthorizationTest'); - 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 createTrustConfigTest() - { - $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/createTrustConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $etag = 'etag3123477'; - $expectedResponse = new TrustConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTrustConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $trustConfigId = 'trustConfigId-1311884783'; - $trustConfig = new TrustConfig(); - $request = (new CreateTrustConfigRequest()) - ->setParent($formattedParent) - ->setTrustConfigId($trustConfigId) - ->setTrustConfig($trustConfig); - $response = $gapicClient->createTrustConfig($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.certificatemanager.v1.CertificateManager/CreateTrustConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTrustConfigId(); - $this->assertProtobufEquals($trustConfigId, $actualValue); - $actualValue = $actualApiRequestObject->getTrustConfig(); - $this->assertProtobufEquals($trustConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTrustConfigTest'); - $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 createTrustConfigExceptionTest() - { - $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/createTrustConfigTest'); - $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]'); - $trustConfigId = 'trustConfigId-1311884783'; - $trustConfig = new TrustConfig(); - $request = (new CreateTrustConfigRequest()) - ->setParent($formattedParent) - ->setTrustConfigId($trustConfigId) - ->setTrustConfig($trustConfig); - $response = $gapicClient->createTrustConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTrustConfigTest'); - 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 deleteCertificateTest() - { - $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/deleteCertificateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCertificateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->certificateName('[PROJECT]', '[LOCATION]', '[CERTIFICATE]'); - $request = (new DeleteCertificateRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCertificate($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.certificatemanager.v1.CertificateManager/DeleteCertificate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCertificateTest'); - $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 deleteCertificateExceptionTest() - { - $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/deleteCertificateTest'); - $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->certificateName('[PROJECT]', '[LOCATION]', '[CERTIFICATE]'); - $request = (new DeleteCertificateRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCertificate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCertificateTest'); - 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 deleteCertificateIssuanceConfigTest() - { - $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/deleteCertificateIssuanceConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCertificateIssuanceConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->certificateIssuanceConfigName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_ISSUANCE_CONFIG]'); - $request = (new DeleteCertificateIssuanceConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCertificateIssuanceConfig($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.certificatemanager.v1.CertificateManager/DeleteCertificateIssuanceConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCertificateIssuanceConfigTest'); - $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 deleteCertificateIssuanceConfigExceptionTest() - { - $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/deleteCertificateIssuanceConfigTest'); - $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->certificateIssuanceConfigName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_ISSUANCE_CONFIG]'); - $request = (new DeleteCertificateIssuanceConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCertificateIssuanceConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCertificateIssuanceConfigTest'); - 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 deleteCertificateMapTest() - { - $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/deleteCertificateMapTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCertificateMapTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); - $request = (new DeleteCertificateMapRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCertificateMap($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.certificatemanager.v1.CertificateManager/DeleteCertificateMap', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCertificateMapTest'); - $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 deleteCertificateMapExceptionTest() - { - $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/deleteCertificateMapTest'); - $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->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); - $request = (new DeleteCertificateMapRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCertificateMap($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCertificateMapTest'); - 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 deleteCertificateMapEntryTest() - { - $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/deleteCertificateMapEntryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCertificateMapEntryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->certificateMapEntryName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]', '[CERTIFICATE_MAP_ENTRY]'); - $request = (new DeleteCertificateMapEntryRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCertificateMapEntry($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.certificatemanager.v1.CertificateManager/DeleteCertificateMapEntry', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCertificateMapEntryTest'); - $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 deleteCertificateMapEntryExceptionTest() - { - $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/deleteCertificateMapEntryTest'); - $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->certificateMapEntryName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]', '[CERTIFICATE_MAP_ENTRY]'); - $request = (new DeleteCertificateMapEntryRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCertificateMapEntry($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCertificateMapEntryTest'); - 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 deleteDnsAuthorizationTest() - { - $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/deleteDnsAuthorizationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDnsAuthorizationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dnsAuthorizationName('[PROJECT]', '[LOCATION]', '[DNS_AUTHORIZATION]'); - $request = (new DeleteDnsAuthorizationRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDnsAuthorization($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.certificatemanager.v1.CertificateManager/DeleteDnsAuthorization', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDnsAuthorizationTest'); - $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 deleteDnsAuthorizationExceptionTest() - { - $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/deleteDnsAuthorizationTest'); - $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->dnsAuthorizationName('[PROJECT]', '[LOCATION]', '[DNS_AUTHORIZATION]'); - $request = (new DeleteDnsAuthorizationRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDnsAuthorization($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDnsAuthorizationTest'); - 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 deleteTrustConfigTest() - { - $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/deleteTrustConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTrustConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->trustConfigName('[PROJECT]', '[LOCATION]', '[TRUST_CONFIG]'); - $request = (new DeleteTrustConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTrustConfig($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.certificatemanager.v1.CertificateManager/DeleteTrustConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTrustConfigTest'); - $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 deleteTrustConfigExceptionTest() - { - $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/deleteTrustConfigTest'); - $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->trustConfigName('[PROJECT]', '[LOCATION]', '[TRUST_CONFIG]'); - $request = (new DeleteTrustConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTrustConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTrustConfigTest'); - 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 getCertificateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $pemCertificate = 'pemCertificate1234463984'; - $expectedResponse = new Certificate(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setPemCertificate($pemCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->certificateName('[PROJECT]', '[LOCATION]', '[CERTIFICATE]'); - $request = (new GetCertificateRequest()) - ->setName($formattedName); - $response = $gapicClient->getCertificate($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.certificatemanager.v1.CertificateManager/GetCertificate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCertificateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->certificateName('[PROJECT]', '[LOCATION]', '[CERTIFICATE]'); - $request = (new GetCertificateRequest()) - ->setName($formattedName); - try { - $gapicClient->getCertificate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCertificateIssuanceConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $rotationWindowPercentage = 873917384; - $expectedResponse = new CertificateIssuanceConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRotationWindowPercentage($rotationWindowPercentage); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->certificateIssuanceConfigName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_ISSUANCE_CONFIG]'); - $request = (new GetCertificateIssuanceConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getCertificateIssuanceConfig($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.certificatemanager.v1.CertificateManager/GetCertificateIssuanceConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCertificateIssuanceConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->certificateIssuanceConfigName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_ISSUANCE_CONFIG]'); - $request = (new GetCertificateIssuanceConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getCertificateIssuanceConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCertificateMapTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new CertificateMap(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); - $request = (new GetCertificateMapRequest()) - ->setName($formattedName); - $response = $gapicClient->getCertificateMap($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.certificatemanager.v1.CertificateManager/GetCertificateMap', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCertificateMapExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); - $request = (new GetCertificateMapRequest()) - ->setName($formattedName); - try { - $gapicClient->getCertificateMap($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCertificateMapEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CertificateMapEntry(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setHostname($hostname); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->certificateMapEntryName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]', '[CERTIFICATE_MAP_ENTRY]'); - $request = (new GetCertificateMapEntryRequest()) - ->setName($formattedName); - $response = $gapicClient->getCertificateMapEntry($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.certificatemanager.v1.CertificateManager/GetCertificateMapEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCertificateMapEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->certificateMapEntryName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]', '[CERTIFICATE_MAP_ENTRY]'); - $request = (new GetCertificateMapEntryRequest()) - ->setName($formattedName); - try { - $gapicClient->getCertificateMapEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDnsAuthorizationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $domain = 'domain-1326197564'; - $expectedResponse = new DnsAuthorization(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setDomain($domain); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dnsAuthorizationName('[PROJECT]', '[LOCATION]', '[DNS_AUTHORIZATION]'); - $request = (new GetDnsAuthorizationRequest()) - ->setName($formattedName); - $response = $gapicClient->getDnsAuthorization($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.certificatemanager.v1.CertificateManager/GetDnsAuthorization', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDnsAuthorizationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dnsAuthorizationName('[PROJECT]', '[LOCATION]', '[DNS_AUTHORIZATION]'); - $request = (new GetDnsAuthorizationRequest()) - ->setName($formattedName); - try { - $gapicClient->getDnsAuthorization($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTrustConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $etag = 'etag3123477'; - $expectedResponse = new TrustConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->trustConfigName('[PROJECT]', '[LOCATION]', '[TRUST_CONFIG]'); - $request = (new GetTrustConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getTrustConfig($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.certificatemanager.v1.CertificateManager/GetTrustConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTrustConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->trustConfigName('[PROJECT]', '[LOCATION]', '[TRUST_CONFIG]'); - $request = (new GetTrustConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getTrustConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCertificateIssuanceConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $certificateIssuanceConfigsElement = new CertificateIssuanceConfig(); - $certificateIssuanceConfigs = [ - $certificateIssuanceConfigsElement, - ]; - $expectedResponse = new ListCertificateIssuanceConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCertificateIssuanceConfigs($certificateIssuanceConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCertificateIssuanceConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCertificateIssuanceConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCertificateIssuanceConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListCertificateIssuanceConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCertificateIssuanceConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListCertificateIssuanceConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCertificateIssuanceConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCertificateMapEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $certificateMapEntriesElement = new CertificateMapEntry(); - $certificateMapEntries = [ - $certificateMapEntriesElement, - ]; - $expectedResponse = new ListCertificateMapEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCertificateMapEntries($certificateMapEntries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); - $request = (new ListCertificateMapEntriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCertificateMapEntries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCertificateMapEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListCertificateMapEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCertificateMapEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->certificateMapName('[PROJECT]', '[LOCATION]', '[CERTIFICATE_MAP]'); - $request = (new ListCertificateMapEntriesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCertificateMapEntries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCertificateMapsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $certificateMapsElement = new CertificateMap(); - $certificateMaps = [ - $certificateMapsElement, - ]; - $expectedResponse = new ListCertificateMapsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCertificateMaps($certificateMaps); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCertificateMapsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCertificateMaps($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCertificateMaps()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListCertificateMaps', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCertificateMapsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListCertificateMapsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCertificateMaps($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCertificatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $certificatesElement = new Certificate(); - $certificates = [ - $certificatesElement, - ]; - $expectedResponse = new ListCertificatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCertificates($certificates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCertificatesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCertificates($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCertificates()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListCertificates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCertificatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListCertificatesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCertificates($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDnsAuthorizationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dnsAuthorizationsElement = new DnsAuthorization(); - $dnsAuthorizations = [ - $dnsAuthorizationsElement, - ]; - $expectedResponse = new ListDnsAuthorizationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDnsAuthorizations($dnsAuthorizations); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDnsAuthorizationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDnsAuthorizations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDnsAuthorizations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListDnsAuthorizations', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDnsAuthorizationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListDnsAuthorizationsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDnsAuthorizations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTrustConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $trustConfigsElement = new TrustConfig(); - $trustConfigs = [ - $trustConfigsElement, - ]; - $expectedResponse = new ListTrustConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTrustConfigs($trustConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTrustConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTrustConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTrustConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.certificatemanager.v1.CertificateManager/ListTrustConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTrustConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListTrustConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTrustConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCertificateTest() - { - $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/updateCertificateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $pemCertificate = 'pemCertificate1234463984'; - $expectedResponse = new Certificate(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPemCertificate($pemCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateCertificateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $certificate = new Certificate(); - $updateMask = new FieldMask(); - $request = (new UpdateCertificateRequest()) - ->setCertificate($certificate) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCertificate($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.certificatemanager.v1.CertificateManager/UpdateCertificate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCertificate(); - $this->assertProtobufEquals($certificate, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCertificateTest'); - $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 updateCertificateExceptionTest() - { - $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/updateCertificateTest'); - $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 - $certificate = new Certificate(); - $updateMask = new FieldMask(); - $request = (new UpdateCertificateRequest()) - ->setCertificate($certificate) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCertificate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCertificateTest'); - 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 updateCertificateMapTest() - { - $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/updateCertificateMapTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new CertificateMap(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateCertificateMapTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $certificateMap = new CertificateMap(); - $updateMask = new FieldMask(); - $request = (new UpdateCertificateMapRequest()) - ->setCertificateMap($certificateMap) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCertificateMap($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.certificatemanager.v1.CertificateManager/UpdateCertificateMap', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCertificateMap(); - $this->assertProtobufEquals($certificateMap, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCertificateMapTest'); - $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 updateCertificateMapExceptionTest() - { - $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/updateCertificateMapTest'); - $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 - $certificateMap = new CertificateMap(); - $updateMask = new FieldMask(); - $request = (new UpdateCertificateMapRequest()) - ->setCertificateMap($certificateMap) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCertificateMap($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCertificateMapTest'); - 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 updateCertificateMapEntryTest() - { - $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/updateCertificateMapEntryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CertificateMapEntry(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateCertificateMapEntryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $certificateMapEntry = new CertificateMapEntry(); - $updateMask = new FieldMask(); - $request = (new UpdateCertificateMapEntryRequest()) - ->setCertificateMapEntry($certificateMapEntry) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCertificateMapEntry($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.certificatemanager.v1.CertificateManager/UpdateCertificateMapEntry', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCertificateMapEntry(); - $this->assertProtobufEquals($certificateMapEntry, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCertificateMapEntryTest'); - $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 updateCertificateMapEntryExceptionTest() - { - $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/updateCertificateMapEntryTest'); - $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 - $certificateMapEntry = new CertificateMapEntry(); - $updateMask = new FieldMask(); - $request = (new UpdateCertificateMapEntryRequest()) - ->setCertificateMapEntry($certificateMapEntry) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCertificateMapEntry($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCertificateMapEntryTest'); - 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 updateDnsAuthorizationTest() - { - $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/updateDnsAuthorizationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $domain = 'domain-1326197564'; - $expectedResponse = new DnsAuthorization(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDomain($domain); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDnsAuthorizationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dnsAuthorization = new DnsAuthorization(); - $dnsAuthorizationDomain = 'dnsAuthorizationDomain2013928116'; - $dnsAuthorization->setDomain($dnsAuthorizationDomain); - $updateMask = new FieldMask(); - $request = (new UpdateDnsAuthorizationRequest()) - ->setDnsAuthorization($dnsAuthorization) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDnsAuthorization($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.certificatemanager.v1.CertificateManager/UpdateDnsAuthorization', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDnsAuthorization(); - $this->assertProtobufEquals($dnsAuthorization, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDnsAuthorizationTest'); - $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 updateDnsAuthorizationExceptionTest() - { - $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/updateDnsAuthorizationTest'); - $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 - $dnsAuthorization = new DnsAuthorization(); - $dnsAuthorizationDomain = 'dnsAuthorizationDomain2013928116'; - $dnsAuthorization->setDomain($dnsAuthorizationDomain); - $updateMask = new FieldMask(); - $request = (new UpdateDnsAuthorizationRequest()) - ->setDnsAuthorization($dnsAuthorization) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDnsAuthorization($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDnsAuthorizationTest'); - 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 updateTrustConfigTest() - { - $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/updateTrustConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $etag = 'etag3123477'; - $expectedResponse = new TrustConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTrustConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $trustConfig = new TrustConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateTrustConfigRequest()) - ->setTrustConfig($trustConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateTrustConfig($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.certificatemanager.v1.CertificateManager/UpdateTrustConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTrustConfig(); - $this->assertProtobufEquals($trustConfig, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTrustConfigTest'); - $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 updateTrustConfigExceptionTest() - { - $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/updateTrustConfigTest'); - $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 - $trustConfig = new TrustConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateTrustConfigRequest()) - ->setTrustConfig($trustConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateTrustConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTrustConfigTest'); - 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 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 createCertificateAsyncTest() - { - $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/createCertificateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $pemCertificate = 'pemCertificate1234463984'; - $expectedResponse = new Certificate(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPemCertificate($pemCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCertificateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $certificateId = 'certificateId1494430915'; - $certificate = new Certificate(); - $request = (new CreateCertificateRequest()) - ->setParent($formattedParent) - ->setCertificateId($certificateId) - ->setCertificate($certificate); - $response = $gapicClient->createCertificateAsync($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.certificatemanager.v1.CertificateManager/CreateCertificate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCertificateId(); - $this->assertProtobufEquals($certificateId, $actualValue); - $actualValue = $actualApiRequestObject->getCertificate(); - $this->assertProtobufEquals($certificate, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCertificateTest'); - $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()); - } -}